From c1ce69fa38cc7b28a532b53b8c263e950827d66b Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 1 Jul 2026 12:06:39 +0200 Subject: [PATCH 01/48] initial commit for no-auth local mode --- api/v1/server/authn/middleware.go | 31 ++++++++++++++++++++++ internal/services/grpc/middleware/auth.go | 32 +++++++++++++++++++++++ pkg/config/loader/loader.go | 7 +++++ pkg/config/server/server.go | 12 +++++++++ 4 files changed, 82 insertions(+) diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index 8c4adc9f5e..df6530c66b 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -60,6 +60,10 @@ func (a *AuthN) authenticate(c echo.Context, r *middleware.RouteInfo) error { return a.handleNoAuth(c) } + if a.config.Auth.NoAuthEnabled && a.config.Auth.CustomAuthenticator == nil { + return a.handleNoAuthBypass(c) + } + var bearerErr error if r.Security.BearerAuth() { @@ -138,6 +142,33 @@ func (a *AuthN) handleNoAuth(c echo.Context) error { return nil } +func (a *AuthN) handleNoAuthBypass(c echo.Context) error { + forbidden := echo.NewHTTPError(http.StatusForbidden, "Please provide valid credentials") + + ctx := c.Request().Context() + + user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Auth.NoAuthUserEmail) + + if err != nil { + a.l.Error().Ctx(ctx).Err(err).Msg("no-auth mode: could not resolve default user") + + return forbidden + } + + c.Set("user", user) + c.Set("auth_strategy", "noauth") + + ctx = context.WithValue(ctx, analytics.UserIDKey, user.ID) + ctx = context.WithValue(ctx, analytics.SourceKey, analytics.SourceUI) + + span := trace.SpanFromContext(ctx) + telemetry.WithAttributes(span, telemetry.AttributeKV{Key: "user.id", Value: user.ID}) + + c.SetRequest(c.Request().WithContext(ctx)) + + return nil +} + func (a *AuthN) handleCookieAuth(c echo.Context) error { forbidden := echo.NewHTTPError(http.StatusForbidden, "Please provide valid credentials") diff --git a/internal/services/grpc/middleware/auth.go b/internal/services/grpc/middleware/auth.go index 644611e5f9..2f9158954d 100644 --- a/internal/services/grpc/middleware/auth.go +++ b/internal/services/grpc/middleware/auth.go @@ -3,6 +3,7 @@ package middleware import ( "context" + "github.com/google/uuid" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/auth" "github.com/rs/zerolog" "go.opentelemetry.io/otel/trace" @@ -30,6 +31,11 @@ func NewAuthN(config *server.ServerConfig) *GRPCAuthN { func (a *GRPCAuthN) Middleware(ctx context.Context) (context.Context, error) { forbidden := status.Errorf(codes.Unauthenticated, "invalid auth token") + + if a.config.Auth.NoAuthEnabled && a.config.Auth.CustomAuthenticator == nil { + return a.noAuthContext(ctx) + } + token, err := auth.AuthFromMD(ctx, "bearer") if err != nil { @@ -70,3 +76,29 @@ func (a *GRPCAuthN) Middleware(ctx context.Context) (context.Context, error) { return context.WithValue(ctx, "tenant", queriedTenant), nil } + +func (a *GRPCAuthN) noAuthContext(ctx context.Context) (context.Context, error) { + forbidden := status.Errorf(codes.Unauthenticated, "invalid auth token") + + tenantId, err := uuid.Parse(a.config.Auth.NoAuthTenantID) + + if err != nil { + a.l.Error().Ctx(ctx).Err(err).Msgf("no-auth mode: invalid default tenant id: %s", err) + return nil, forbidden + } + + queriedTenant, err := a.config.V1.Tenant().GetTenantByID(ctx, tenantId) + + if err != nil { + a.l.Error().Ctx(ctx).Err(err).Msgf("no-auth mode: could not resolve default tenant: %s", err) + return nil, forbidden + } + + ctx = context.WithValue(ctx, analytics.TenantIDKey, tenantId) + ctx = context.WithValue(ctx, analytics.SourceKey, analytics.SourceGRPC) + + span := trace.SpanFromContext(ctx) + telemetry.WithAttributes(span, telemetry.AttributeKV{Key: "tenant.id", Value: tenantId}) + + return context.WithValue(ctx, "tenant", queriedTenant), nil +} diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 46e277fcfd..22f324aaa0 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -594,6 +594,13 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers auth := server.AuthConfig{ RestrictedEmailDomains: getStrArr(cf.Auth.RestrictedEmailDomains), ConfigFile: cf.Auth, + NoAuthEnabled: cf.Auth.NoAuthEnabled, + NoAuthTenantID: dc.Seed.DefaultTenantID, + NoAuthUserEmail: dc.Seed.AdminEmail, + } + + if auth.NoAuthEnabled { + l.Warn().Msg("SERVER_AUTH_NO_AUTH_ENABLED is set: authentication is DISABLED and all requests run as the seed default tenant and admin user. Never enable this in production.") } if cf.Auth.Google.Enabled { diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index 5e6741739c..375687c073 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -454,6 +454,11 @@ type ConfigFileAuth struct { // SetEmailVerified controls whether the user's email is automatically set to verified SetEmailVerified bool `mapstructure:"setEmailVerified" json:"setEmailVerified,omitempty" default:"false"` + // NoAuthEnabled disables all authentication and runs every request as the seed default + // tenant and admin user. Intended for local development only. This is force-disabled in + // hatchet-cloud and ignored whenever a custom authenticator is configured. + NoAuthEnabled bool `mapstructure:"noAuthEnabled" json:"noAuthEnabled,omitempty" default:"false"` + // Configuration options for the cookie Cookie ConfigFileAuthCookie `mapstructure:"cookie" json:"cookie,omitempty"` @@ -617,6 +622,12 @@ type AuthConfig struct { CustomAuthenticator CustomAuthenticator + // NoAuthEnabled, when true, disables authentication and resolves every request to + // NoAuthTenantID / NoAuthUserEmail. Only honored when CustomAuthenticator is nil. + NoAuthEnabled bool + NoAuthTenantID string + NoAuthUserEmail string + // Operations listed here bypass the tenant RBAC check. Use this for // extension operations (e.g. cloud) that handle their own authorization // in handlers. OSS operations in rbac.yaml are still fully checked. @@ -851,6 +862,7 @@ func BindAllEnv(v *viper.Viper) { _ = v.BindEnv("auth.restrictedEmailDomains", "SERVER_AUTH_RESTRICTED_EMAIL_DOMAINS") _ = v.BindEnv("auth.basicAuthEnabled", "SERVER_AUTH_BASIC_AUTH_ENABLED") _ = v.BindEnv("auth.setEmailVerified", "SERVER_AUTH_SET_EMAIL_VERIFIED") + _ = v.BindEnv("auth.noAuthEnabled", "SERVER_AUTH_NO_AUTH_ENABLED") _ = v.BindEnv("auth.cookie.name", "SERVER_AUTH_COOKIE_NAME") _ = v.BindEnv("auth.cookie.domain", "SERVER_AUTH_COOKIE_DOMAIN") _ = v.BindEnv("auth.cookie.secrets", "SERVER_AUTH_COOKIE_SECRETS") From e0eb1c0d623488f88dd7f5bbac21eda4179957a2 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 1 Jul 2026 12:10:46 +0200 Subject: [PATCH 02/48] no-auth authz --- api/v1/server/authz/middleware.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index e94d075492..657f763feb 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -51,6 +51,8 @@ func (a *AuthZ) authorize(c echo.Context, r *middleware.RouteInfo) error { var err error switch c.Get("auth_strategy").(string) { + case "noauth": + err = a.validateUserTenantPermissions(c, r) case "cookie": err = a.handleCookieAuth(c, r) case "bearer": From 31afe32d01a24153c4531e4324a5e336d990be2d Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 1 Jul 2026 13:07:22 +0200 Subject: [PATCH 03/48] CLI and docs --- .../openapi/components/schemas/metadata.yaml | 4 + api/v1/server/handlers/metadata/get.go | 3 + api/v1/server/oas/gen/openapi.gen.go | 710 +++++++++--------- .../internal/drivers/docker/hatchet_lite.go | 43 +- cmd/hatchet-cli/cli/server.go | 18 +- .../app/src/components/layout/app-layout.tsx | 16 +- .../src/components/layout/no-auth-banner.tsx | 14 + .../src/lib/api/generated/data-contracts.ts | 5 + frontend/app/src/pages/authenticated.tsx | 4 + frontend/docs/next-env.d.ts | 3 +- frontend/docs/pages/self-hosting/_meta.js | 1 + .../docs/pages/self-hosting/local-no-auth.mdx | 56 ++ internal/services/grpc/middleware/auth.go | 32 - pkg/client/rest/gen.go | 3 + pkg/config/loader/loader.go | 1 - pkg/config/server/server.go | 5 +- 16 files changed, 509 insertions(+), 409 deletions(-) create mode 100644 frontend/app/src/components/layout/no-auth-banner.tsx create mode 100644 frontend/docs/pages/self-hosting/local-no-auth.mdx diff --git a/api-contracts/openapi/components/schemas/metadata.yaml b/api-contracts/openapi/components/schemas/metadata.yaml index 26f03e1dee..1b2844fd37 100644 --- a/api-contracts/openapi/components/schemas/metadata.yaml +++ b/api-contracts/openapi/components/schemas/metadata.yaml @@ -33,6 +33,10 @@ APIMeta: type: boolean description: whether or not a Prometheus federation server is configured (SERVER_PROMETHEUS_SERVER_URL) on this instance example: false + noAuthEnabled: + type: boolean + description: whether or not authentication is disabled (local no-auth mode) on this instance + example: false APIMetaAuth: type: object diff --git a/api/v1/server/handlers/metadata/get.go b/api/v1/server/handlers/metadata/get.go index 245c5a4337..94611576b5 100644 --- a/api/v1/server/handlers/metadata/get.go +++ b/api/v1/server/handlers/metadata/get.go @@ -36,6 +36,8 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR prometheusServerEnabled := u.config.Prometheus.PrometheusServerURL != "" + noAuthEnabled := u.config.Auth.NoAuthEnabled + meta := gen.APIMeta{ Auth: &gen.APIMetaAuth{ Schemes: &authTypes, @@ -48,6 +50,7 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR AllowChangePassword: &u.config.Runtime.AllowChangePassword, ObservabilityEnabled: &observabilityEnabled, PrometheusServerEnabled: &prometheusServerEnabled, + NoAuthEnabled: &noAuthEnabled, } return gen.MetadataGet200JSONResponse(meta), nil diff --git a/api/v1/server/oas/gen/openapi.gen.go b/api/v1/server/oas/gen/openapi.gen.go index f8e3180ea9..d85260dd52 100644 --- a/api/v1/server/oas/gen/openapi.gen.go +++ b/api/v1/server/oas/gen/openapi.gen.go @@ -425,6 +425,9 @@ type APIMeta struct { AllowSignup *bool `json:"allowSignup,omitempty"` Auth *APIMetaAuth `json:"auth,omitempty"` + // NoAuthEnabled whether or not authentication is disabled (local no-auth mode) on this instance + NoAuthEnabled *bool `json:"noAuthEnabled,omitempty"` + // ObservabilityEnabled whether or not observability (trace collection) is enabled on this instance ObservabilityEnabled *bool `json:"observabilityEnabled,omitempty"` Posthog *APIMetaPosthog `json:"posthog,omitempty"` @@ -17547,359 +17550,360 @@ var swaggerSpec = []string{ "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", + "NzEkZpohqn1/H4dJZPAHCVSKJpGYdoYokb6saVcwY31T5UOz5BsRxiXIiMaQolltGRcNwqtcvx/8dmy/", + "mpSFXgoxzT2blQpBvDqrl4Jq6uJqukasVm3R4NIU+pQCOLg04lD1LtbTend/fXE34OeezBjI/jp/Xykg", + "2SCNKqHlZjewl/pu1pLWim7esYJlvvD9qNhPa848ziQfUVWgMg0p9E0Um/LYI1pavIzU8Iws3WKh1X0d", + "AhKhCZ7iSTYJ+C2ChCAPPGEoPdh/N3OFFRENXNDMF14aJ8gwft2Lru7LlZpkTk9OTqy+WcZh8t5UDR2j", + "Gi3on+FYiTHXc9xSoWvtvAHiRNy12VLMLa0/LwNCzr1ok65CuheI0V/IXhPu7bLB4Hdar7IDT0OVxOoC", + "tE6Rl2wg3blHA/trtTDZkyu35gbkfigMk2CNsg/lUd5h5OfOfT0VT0bLOSmmScaaSUbKvamV3a3sbmX3", + "S8luyxw/oWiv8I9cQTTz0QYULewel5b7Sn1nQyCKSGk24ukNqxONr+mDlmVQ3HhixA0M6FYuupT1RS6q", + "W0KkNmod9ZQsjrf960uRzjpLbG3Ifp7PcJ0mw357fvHx5t272lOST7vSvTkvUOzEeJcXJ0UPnDC41SR/", + "CVbWYDSZIy/xK8KkLJ3XPo6+FDMQOQqYms0mF7y0ptUvKZf4aIvsWFU4ltQuwmokEBniGtCRGupCdKzT", + "QgvNS/NnDGFMql9Vv0AxnfGjZC7jN8WjzasiVC32Ds5M6PXDeDMm/2DDaYOkWVdAWEU/UihcxOwiMzXL", + "BSNLC758wJ5joozChNwd3zgjlyMPj5Z8I2tOS8wrbK4ZFPBmkLwoDcJYZeAUP5tV7oW6ZUZfpoE9yFeI", + "5mgWyZOs8nSTL1tVYGjabJFlc08YLhuiv3pwN5gpTHx6W5m/TDay5jFzeiSQt8i/EXHwLiy1Sv82urkG", + "AuhyIA8fwehWo54FX+ixL4w94Z/pgAYi1Y47vEChpXQYoXjyuLQlJWHfAJHPKm4viZq8aMC2XAd7Oi28", + "lDnhWOszEmnNTCh/yijbnpjZZYHP2nu267tF4wTYztdAtSxFGLmBvtZzOierTb4NNaHPvdiTXSFcOFQQ", + "S+XIaYyQcHuxllJawG81LZ6bKfu2KkgiFiRh8pfLTwHhGMEYxSrDCccoP1b4z9mmzCmN+LUnDB8xUs0x", + "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", + "QRL7nTedzo+vP/6/AAAA//8J+rhG/IcDAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go index e7af069ab1..2d2d7a2d4d 100644 --- a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go +++ b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go @@ -65,6 +65,7 @@ type HatchetLiteOpts struct { overrideGrpcPort int imageTag string pullPolicy pullPolicy + noAuthEnabled bool } func initDefaultHatchetLiteOpts() *HatchetLiteOpts { @@ -122,6 +123,14 @@ func WithPortsCallback(cb func(dashboardPort, grpcPort int)) HatchetLiteOpt { } } +// WithNoAuthMode disables authentication on the local server (local development only). +func WithNoAuthMode(enabled bool) HatchetLiteOpt { + return func(o *HatchetLiteOpts) error { + o.noAuthEnabled = enabled + return nil + } +} + // WithOverrideDashboardPort sets the override dashboard port func WithOverrideDashboardPort(port int) HatchetLiteOpt { return func(o *HatchetLiteOpts) error { @@ -417,21 +426,27 @@ func (d *DockerDriver) startHatchetLiteContainer(ctx context.Context, opts *Hatc labels["com.docker.compose.depends_on"] = opts.postgresName labels["com.docker.compose.image"] = imageInspect.ID + env := []string{ + "DATABASE_URL=postgresql://hatchet:hatchet@" + opts.postgresName + ":5432/hatchet?sslmode=disable", + "SERVER_AUTH_COOKIE_DOMAIN=localhost", + "SERVER_AUTH_COOKIE_INSECURE=t", + "SERVER_GRPC_BIND_ADDRESS=0.0.0.0", + "SERVER_GRPC_INSECURE=t", + "SERVER_GRPC_BROADCAST_ADDRESS=localhost:" + fmt.Sprintf("%d", grpcPort), + "SERVER_GRPC_PORT=" + fmt.Sprintf("%d", hatchetInternalGrpcPort), + "SERVER_URL=http://localhost:" + fmt.Sprintf("%d", dashboardPort), + "SERVER_AUTH_SET_EMAIL_VERIFIED=t", + "SERVER_DEFAULT_ENGINE_VERSION=V1", + "SERVER_INTERNAL_CLIENT_INTERNAL_GRPC_BROADCAST_ADDRESS=localhost:" + fmt.Sprintf("%d", hatchetInternalGrpcPort), + } + + if opts.noAuthEnabled { + env = append(env, "SERVER_AUTH_NO_AUTH_ENABLED=t") + } + containerConfig := &container.Config{ - Image: imageName, - Env: []string{ - "DATABASE_URL=postgresql://hatchet:hatchet@" + opts.postgresName + ":5432/hatchet?sslmode=disable", - "SERVER_AUTH_COOKIE_DOMAIN=localhost", - "SERVER_AUTH_COOKIE_INSECURE=t", - "SERVER_GRPC_BIND_ADDRESS=0.0.0.0", - "SERVER_GRPC_INSECURE=t", - "SERVER_GRPC_BROADCAST_ADDRESS=localhost:" + fmt.Sprintf("%d", grpcPort), - "SERVER_GRPC_PORT=" + fmt.Sprintf("%d", hatchetInternalGrpcPort), - "SERVER_URL=http://localhost:" + fmt.Sprintf("%d", dashboardPort), - "SERVER_AUTH_SET_EMAIL_VERIFIED=t", - "SERVER_DEFAULT_ENGINE_VERSION=V1", - "SERVER_INTERNAL_CLIENT_INTERNAL_GRPC_BROADCAST_ADDRESS=localhost:" + fmt.Sprintf("%d", hatchetInternalGrpcPort), - }, + Image: imageName, + Env: env, ExposedPorts: exposedPorts, Labels: labels, Healthcheck: &container.HealthConfig{ diff --git a/cmd/hatchet-cli/cli/server.go b/cmd/hatchet-cli/cli/server.go index 471f8433d9..f2d00c64bc 100644 --- a/cmd/hatchet-cli/cli/server.go +++ b/cmd/hatchet-cli/cli/server.go @@ -40,7 +40,10 @@ var startCmd = &cobra.Command{ hatchet server start --pull-policy never # Only pull images if they are not already available locally - hatchet server start --pull-policy missing`, + hatchet server start --pull-policy missing + + # Start server with authentication disabled (local development only) + hatchet server start --no-auth-mode`, Run: func(cmd *cobra.Command, args []string) { // Get flag values dashboardPort, _ := cmd.Flags().GetInt("dashboard-port") @@ -49,9 +52,14 @@ var startCmd = &cobra.Command{ profileName, _ := cmd.Flags().GetString("profile") tag, _ := cmd.Flags().GetString("tag") pullPolicy, _ := cmd.Flags().GetString("pull-policy") + noAuthMode, _ := cmd.Flags().GetBool("no-auth-mode") opts := []docker.HatchetLiteOpt{} + if noAuthMode { + opts = append(opts, docker.WithNoAuthMode(true)) + } + if dashboardPort != 0 { opts = append(opts, docker.WithOverrideDashboardPort(dashboardPort)) } @@ -77,8 +85,13 @@ var startCmd = &cobra.Command{ cli.Logger.Fatalf("%v", err) } + additionalMessage := "" + if noAuthMode { + additionalMessage = "No-auth mode is enabled: authentication is disabled. Use for local development only." + } + // Render styled output - fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, "")) + fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, additionalMessage)) }, } @@ -206,6 +219,7 @@ func init() { startCmd.Flags().StringP("profile", "n", "local", "Name for the local profile (default: local)") startCmd.Flags().StringP("tag", "t", "latest", `Image tag for the hatchet-lite container (e.g. "v0.83.1")`) startCmd.Flags().String("pull-policy", "always", `Image pull policy: "always", "missing", or "never"`) + startCmd.Flags().Bool("no-auth-mode", false, "Disable authentication for the local server (local development only, never use in production)") stopCmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") } diff --git a/frontend/app/src/components/layout/app-layout.tsx b/frontend/app/src/components/layout/app-layout.tsx index 993aeec38e..fdf8eba1ac 100644 --- a/frontend/app/src/components/layout/app-layout.tsx +++ b/frontend/app/src/components/layout/app-layout.tsx @@ -5,6 +5,10 @@ type AppLayoutProps = { header: ReactNode; children: ReactNode; footer?: ReactNode; + /** + * Rendered as a full-width strip above the header on every page (e.g. no-auth mode warning). + */ + banner?: ReactNode; /** * When true, the content area becomes the scroll container. * When false, content is overflow-hidden (useful when a child layout owns scrolling). @@ -17,20 +21,26 @@ export function AppLayout({ header, children, footer, + banner, contentScroll = true, className, }: AppLayoutProps) { const hasFooter = Boolean(footer); + const hasBanner = Boolean(banner); + const gridRows = cn( + hasBanner && (hasFooter ? 'grid-rows-[auto_64px_minmax(0,1fr)_auto]' : 'grid-rows-[auto_64px_minmax(0,1fr)]'), + !hasBanner && (hasFooter ? 'grid-rows-[64px_minmax(0,1fr)_auto]' : 'grid-rows-[64px_minmax(0,1fr)]'), + ); return (
+ {banner} + {header}
diff --git a/frontend/app/src/components/layout/no-auth-banner.tsx b/frontend/app/src/components/layout/no-auth-banner.tsx new file mode 100644 index 0000000000..4d3d16201a --- /dev/null +++ b/frontend/app/src/components/layout/no-auth-banner.tsx @@ -0,0 +1,14 @@ +import { ExclamationTriangleIcon } from '@heroicons/react/24/outline'; + +export function NoAuthBanner() { + return ( +
+ + Heads up: local no-auth mode is on, so there's no sign-in and every request acts as the + default admin. Great for local development, but please don't use it in production. +
+ ); +} diff --git a/frontend/app/src/lib/api/generated/data-contracts.ts b/frontend/app/src/lib/api/generated/data-contracts.ts index 209c6e9023..ac36720247 100644 --- a/frontend/app/src/lib/api/generated/data-contracts.ts +++ b/frontend/app/src/lib/api/generated/data-contracts.ts @@ -1305,6 +1305,11 @@ export interface APIMeta { * @example false */ prometheusServerEnabled?: boolean; + /** + * whether or not authentication is disabled (local no-auth mode) on this instance + * @example false + */ + noAuthEnabled?: boolean; } export interface APIMetaIntegration { diff --git a/frontend/app/src/pages/authenticated.tsx b/frontend/app/src/pages/authenticated.tsx index a16f5641c4..19a249bec6 100644 --- a/frontend/app/src/pages/authenticated.tsx +++ b/frontend/app/src/pages/authenticated.tsx @@ -1,6 +1,7 @@ import { getCloudMetadataQuery } from '../hooks/use-cloud.ts'; import { NewTenantSaverForm } from '@/components/forms/new-tenant-saver-form'; import { AppLayout } from '@/components/layout/app-layout'; +import { NoAuthBanner } from '@/components/layout/no-auth-banner'; import { AddOrgMemberToTenantModal } from '@/components/modals/add-org-member-to-tenant-modal'; import { CreateTenantInviteModal } from '@/components/modals/create-tenant-invite-modal'; import { InviteModal } from '@/components/modals/invite-modal'; @@ -41,6 +42,7 @@ import { globalEmitter } from '@/lib/global-emitter'; import { useContextFromParent } from '@/lib/outlet'; import { REDIRECT_TARGET_KEY } from '@/lib/redirect'; import { OutletWithContext } from '@/lib/router-helpers'; +import useApiMeta from '@/pages/auth/hooks/use-api-meta'; import { useInactivityDetection } from '@/pages/auth/hooks/use-inactivity-detection'; import { PostHogProvider } from '@/providers/posthog'; import { useUserUniverse } from '@/providers/user-universe'; @@ -81,6 +83,7 @@ export async function loader(_args: { request: Request }) { function AuthenticatedInner() { const { tenant, organizationId } = useTenantDetails(); + const { meta } = useApiMeta(); const { capture } = useAnalytics(); const { currentUser, @@ -549,6 +552,7 @@ function AuthenticatedInner() { : undefined} header={ /// +/// // NOTE: This file should not be edited -// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. +// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/frontend/docs/pages/self-hosting/_meta.js b/frontend/docs/pages/self-hosting/_meta.js index 8dc8b9053e..d37effb8ef 100644 --- a/frontend/docs/pages/self-hosting/_meta.js +++ b/frontend/docs/pages/self-hosting/_meta.js @@ -20,6 +20,7 @@ export default { title: "Managing Hatchet", }, "configuration-options": "Engine Configuration Options", + "local-no-auth": "Local No-Auth Mode", "using-pgbouncer": "Using PgBouncer", "prometheus-metrics": { title: "Prometheus Metrics", diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx new file mode 100644 index 0000000000..f5feb19901 --- /dev/null +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -0,0 +1,56 @@ +import { Callout } from "nextra/components"; + +# Local No-Auth Mode + +No-auth mode disables authentication on the Hatchet dashboard and REST API so you can run a local instance without signing in or minting a bearer token for every request. It is intended purely for local development. + + + Never enable no-auth mode in production or on any instance reachable by + untrusted clients. It removes all authentication from the API and dashboard. + + +## What it does + +When enabled, no-auth mode resolves every unauthenticated dashboard and REST API request to the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). Concretely: + +- **Dashboard** loads without a login screen. +- **REST API** calls succeed without a bearer token or session cookie. The tenant is taken from the request URL, and the admin user is authorized against it exactly as a signed-in owner would be. +- A red banner is shown on every dashboard page while it is active. + +## What it does **not** change + +The gRPC engine is unaffected. Workers and SDK clients still authenticate with an API token as usual, and **the token's tenant is authoritative**. This is deliberate: it means there are no surprises about which tenant a worker runs against. + +So the usual multi-tenant flow works normally: + +1. Open the dashboard (no login required) and create a tenant. +2. Create an API token in that tenant. +3. Configure your worker or SDK client with that token — its workflows run in that tenant. + +## Enabling it + +### Hatchet CLI + +Pass `--no-auth-mode` to `hatchet server start`: + +```sh +hatchet server start --no-auth-mode +``` + +### Environment variable + +Set the following on both the API and engine: + +```sh +SERVER_AUTH_NO_AUTH_ENABLED=true +``` + +This maps to `auth.noAuthEnabled` in the server config file. + +## Safety guarantees + +No-auth mode is designed so it cannot be accidentally activated on a managed or production instance: + +- It defaults to **off** and must be explicitly enabled. +- It is **ignored whenever a custom authenticator is configured** (as it always is on Hatchet Cloud), so it can never take effect there. +- The server logs a prominent warning on startup while it is enabled. diff --git a/internal/services/grpc/middleware/auth.go b/internal/services/grpc/middleware/auth.go index 2f9158954d..644611e5f9 100644 --- a/internal/services/grpc/middleware/auth.go +++ b/internal/services/grpc/middleware/auth.go @@ -3,7 +3,6 @@ package middleware import ( "context" - "github.com/google/uuid" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/auth" "github.com/rs/zerolog" "go.opentelemetry.io/otel/trace" @@ -31,11 +30,6 @@ func NewAuthN(config *server.ServerConfig) *GRPCAuthN { func (a *GRPCAuthN) Middleware(ctx context.Context) (context.Context, error) { forbidden := status.Errorf(codes.Unauthenticated, "invalid auth token") - - if a.config.Auth.NoAuthEnabled && a.config.Auth.CustomAuthenticator == nil { - return a.noAuthContext(ctx) - } - token, err := auth.AuthFromMD(ctx, "bearer") if err != nil { @@ -76,29 +70,3 @@ func (a *GRPCAuthN) Middleware(ctx context.Context) (context.Context, error) { return context.WithValue(ctx, "tenant", queriedTenant), nil } - -func (a *GRPCAuthN) noAuthContext(ctx context.Context) (context.Context, error) { - forbidden := status.Errorf(codes.Unauthenticated, "invalid auth token") - - tenantId, err := uuid.Parse(a.config.Auth.NoAuthTenantID) - - if err != nil { - a.l.Error().Ctx(ctx).Err(err).Msgf("no-auth mode: invalid default tenant id: %s", err) - return nil, forbidden - } - - queriedTenant, err := a.config.V1.Tenant().GetTenantByID(ctx, tenantId) - - if err != nil { - a.l.Error().Ctx(ctx).Err(err).Msgf("no-auth mode: could not resolve default tenant: %s", err) - return nil, forbidden - } - - ctx = context.WithValue(ctx, analytics.TenantIDKey, tenantId) - ctx = context.WithValue(ctx, analytics.SourceKey, analytics.SourceGRPC) - - span := trace.SpanFromContext(ctx) - telemetry.WithAttributes(span, telemetry.AttributeKV{Key: "tenant.id", Value: tenantId}) - - return context.WithValue(ctx, "tenant", queriedTenant), nil -} diff --git a/pkg/client/rest/gen.go b/pkg/client/rest/gen.go index 2134a6c0b3..715bc8afa7 100644 --- a/pkg/client/rest/gen.go +++ b/pkg/client/rest/gen.go @@ -422,6 +422,9 @@ type APIMeta struct { AllowSignup *bool `json:"allowSignup,omitempty"` Auth *APIMetaAuth `json:"auth,omitempty"` + // NoAuthEnabled whether or not authentication is disabled (local no-auth mode) on this instance + NoAuthEnabled *bool `json:"noAuthEnabled,omitempty"` + // ObservabilityEnabled whether or not observability (trace collection) is enabled on this instance ObservabilityEnabled *bool `json:"observabilityEnabled,omitempty"` Posthog *APIMetaPosthog `json:"posthog,omitempty"` diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 22f324aaa0..84f4dbf6f3 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -595,7 +595,6 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers RestrictedEmailDomains: getStrArr(cf.Auth.RestrictedEmailDomains), ConfigFile: cf.Auth, NoAuthEnabled: cf.Auth.NoAuthEnabled, - NoAuthTenantID: dc.Seed.DefaultTenantID, NoAuthUserEmail: dc.Seed.AdminEmail, } diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index 375687c073..88628f9259 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -622,10 +622,9 @@ type AuthConfig struct { CustomAuthenticator CustomAuthenticator - // NoAuthEnabled, when true, disables authentication and resolves every request to - // NoAuthTenantID / NoAuthUserEmail. Only honored when CustomAuthenticator is nil. + // NoAuthEnabled, when true, disables API/UI authentication and resolves every request to + // NoAuthUserEmail. Only honored when CustomAuthenticator is nil. NoAuthEnabled bool - NoAuthTenantID string NoAuthUserEmail string // Operations listed here bypass the tenant RBAC check. Use this for From 62f1aaf8700c8236af9bba9f8cde603039ca8f38 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 1 Jul 2026 14:04:31 +0200 Subject: [PATCH 04/48] fix build error --- frontend/app/src/components/layout/app-layout.tsx | 10 ++++++++-- frontend/app/src/components/layout/no-auth-banner.tsx | 5 +++-- frontend/app/src/pages/authenticated.tsx | 6 +++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/frontend/app/src/components/layout/app-layout.tsx b/frontend/app/src/components/layout/app-layout.tsx index fdf8eba1ac..5211b47d2f 100644 --- a/frontend/app/src/components/layout/app-layout.tsx +++ b/frontend/app/src/components/layout/app-layout.tsx @@ -28,8 +28,14 @@ export function AppLayout({ const hasFooter = Boolean(footer); const hasBanner = Boolean(banner); const gridRows = cn( - hasBanner && (hasFooter ? 'grid-rows-[auto_64px_minmax(0,1fr)_auto]' : 'grid-rows-[auto_64px_minmax(0,1fr)]'), - !hasBanner && (hasFooter ? 'grid-rows-[64px_minmax(0,1fr)_auto]' : 'grid-rows-[64px_minmax(0,1fr)]'), + hasBanner && + (hasFooter + ? 'grid-rows-[auto_64px_minmax(0,1fr)_auto]' + : 'grid-rows-[auto_64px_minmax(0,1fr)]'), + !hasBanner && + (hasFooter + ? 'grid-rows-[64px_minmax(0,1fr)_auto]' + : 'grid-rows-[64px_minmax(0,1fr)]'), ); return (
- Heads up: local no-auth mode is on, so there's no sign-in and every request acts as the - default admin. Great for local development, but please don't use it in production. + Heads up: local no-auth mode is on, so there's no sign-in and every + request acts as the default admin. Great for local development, but please + don't use it in production.
); } diff --git a/frontend/app/src/pages/authenticated.tsx b/frontend/app/src/pages/authenticated.tsx index 19a249bec6..767e0b32d9 100644 --- a/frontend/app/src/pages/authenticated.tsx +++ b/frontend/app/src/pages/authenticated.tsx @@ -552,7 +552,11 @@ function AuthenticatedInner() { : undefined} + banner={ + meta && 'noAuthEnabled' in meta && meta.noAuthEnabled ? ( + + ) : undefined + } header={ Date: Wed, 1 Jul 2026 14:05:28 +0200 Subject: [PATCH 05/48] error boundary --- api/v1/server/authn/middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index df6530c66b..ad87da1c24 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -60,7 +60,7 @@ func (a *AuthN) authenticate(c echo.Context, r *middleware.RouteInfo) error { return a.handleNoAuth(c) } - if a.config.Auth.NoAuthEnabled && a.config.Auth.CustomAuthenticator == nil { + if a.config.Auth.NoAuthEnabled { return a.handleNoAuthBypass(c) } From 9e16f52dcddb5e88df60f5e9b9bbcb4a60b38d73 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 1 Jul 2026 14:13:04 +0200 Subject: [PATCH 06/48] documentation changes --- frontend/docs/pages/self-hosting/local-no-auth.mdx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index f5feb19901..4105f56818 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -15,11 +15,10 @@ When enabled, no-auth mode resolves every unauthenticated dashboard and REST API - **Dashboard** loads without a login screen. - **REST API** calls succeed without a bearer token or session cookie. The tenant is taken from the request URL, and the admin user is authorized against it exactly as a signed-in owner would be. -- A red banner is shown on every dashboard page while it is active. ## What it does **not** change -The gRPC engine is unaffected. Workers and SDK clients still authenticate with an API token as usual, and **the token's tenant is authoritative**. This is deliberate: it means there are no surprises about which tenant a worker runs against. +The gRPC engine is unaffected. Workers and SDK clients still authenticate with an API token as usual, and **the token's tenant is authoritative**. This is deliberate in the sense that it means there are no surprises about which tenant a worker runs against. So the usual multi-tenant flow works normally: @@ -46,11 +45,3 @@ SERVER_AUTH_NO_AUTH_ENABLED=true ``` This maps to `auth.noAuthEnabled` in the server config file. - -## Safety guarantees - -No-auth mode is designed so it cannot be accidentally activated on a managed or production instance: - -- It defaults to **off** and must be explicitly enabled. -- It is **ignored whenever a custom authenticator is configured** (as it always is on Hatchet Cloud), so it can never take effect there. -- The server logs a prominent warning on startup while it is enabled. From ad36f411eabb58cd9a7f9bd00a6e270735210a56 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 11:48:18 +0200 Subject: [PATCH 07/48] local keyset --- cmd/hatchet-admin/cli/keyset.go | 42 ++++ cmd/hatchet-admin/cli/quickstart.go | 11 + cmd/hatchet-admin/cli/token.go | 45 +++- .../cli/internal/drivers/docker/token.go | 22 +- .../migrate/migrations_manifest.json | 207 ++++++++++++++++++ pkg/auth/token/token.go | 35 ++- pkg/config/loader/loader.go | 73 +++++- pkg/config/server/server.go | 21 +- pkg/encryption/local.go | 17 ++ 9 files changed, 453 insertions(+), 20 deletions(-) create mode 100644 cmd/hatchet-migrate/migrate/migrations_manifest.json diff --git a/cmd/hatchet-admin/cli/keyset.go b/cmd/hatchet-admin/cli/keyset.go index 01aac1f93b..7657a30cf5 100644 --- a/cmd/hatchet-admin/cli/keyset.go +++ b/cmd/hatchet-admin/cli/keyset.go @@ -14,6 +14,7 @@ var ( encryptionKeyDir string cloudKMSCredentialsPath string cloudKMSKeyURI string + keysetWithNoAuth bool ) var keysetCmd = &cobra.Command{ @@ -72,6 +73,13 @@ func init() { "", "URI of the key in the CloudKMS repository", ) + + keysetCreateLocalKeysetsCmd.PersistentFlags().BoolVar( + &keysetWithNoAuth, + "no-auth", + false, + "also generate a dedicated JWT keyset for local no-auth mode", + ) } func runCreateLocalKeysets() error { @@ -106,6 +114,12 @@ func runCreateLocalKeysets() error { if err != nil { return err } + + if keysetWithNoAuth { + if err := writeNoAuthKeyset(masterKeyBytes); err != nil { + return err + } + } } else { fmt.Println("Master Key Bytes:") fmt.Println(string(masterKeyBytes)) @@ -118,11 +132,39 @@ func runCreateLocalKeysets() error { fmt.Println("Insecure Public Handle EC256 Keyset:") fmt.Println(string(insecurePublicHandleEc256)) + + if keysetWithNoAuth { + noAuthPrivate, noAuthPublic, _, genErr := encryption.GenerateJWTKeysets(masterKeyBytes) + + if genErr != nil { + return genErr + } + + fmt.Println("No-Auth Private EC256 Keyset:") + fmt.Println(string(noAuthPrivate)) + + fmt.Println("No-Auth Public EC256 Keyset:") + fmt.Println(string(noAuthPublic)) + } } return nil } +func writeNoAuthKeyset(masterKeyBytes []byte) error { + privateEc256, publicEc256, _, err := encryption.GenerateJWTKeysets(masterKeyBytes) + + if err != nil { + return err + } + + if err := os.WriteFile(encryptionKeyDir+"/noauth_private_ec256.key", privateEc256, 0600); err != nil { + return err + } + + return os.WriteFile(encryptionKeyDir+"/noauth_public_ec256.key", publicEc256, 0600) +} + func runCreateCloudKMSJWTKeyset() error { if cloudKMSCredentialsPath == "" { return fmt.Errorf("missing required flag --credentials") diff --git a/cmd/hatchet-admin/cli/quickstart.go b/cmd/hatchet-admin/cli/quickstart.go index a5b3247345..1919e002de 100644 --- a/cmd/hatchet-admin/cli/quickstart.go +++ b/cmd/hatchet-admin/cli/quickstart.go @@ -246,6 +246,17 @@ func generateKeys(generated *generatedConfigFiles) error { generated.sc.Encryption.JWT.PrivateJWTKeyset = string(privateEc256) generated.sc.Encryption.JWT.PublicJWTKeyset = string(publicEc256) } + + if generated.sc.Auth.NoAuthEnabled && (overwrite || generated.sc.Auth.NoAuthJWT.PrivateJWTKeyset == "" || generated.sc.Auth.NoAuthJWT.PublicJWTKeyset == "") { + noAuthPrivate, noAuthPublic, _, err := encryption.GenerateJWTKeysets([]byte(generated.sc.Encryption.MasterKeyset)) + + if err != nil { + return err + } + + generated.sc.Auth.NoAuthJWT.PrivateJWTKeyset = string(noAuthPrivate) + generated.sc.Auth.NoAuthJWT.PublicJWTKeyset = string(noAuthPublic) + } } // generate jwt keys diff --git a/cmd/hatchet-admin/cli/token.go b/cmd/hatchet-admin/cli/token.go index 6dcf021222..35696e5c19 100644 --- a/cmd/hatchet-admin/cli/token.go +++ b/cmd/hatchet-admin/cli/token.go @@ -11,6 +11,7 @@ import ( "github.com/google/uuid" "github.com/spf13/cobra" + "github.com/hatchet-dev/hatchet/pkg/auth/token" "github.com/hatchet-dev/hatchet/pkg/config/loader" "github.com/hatchet-dev/hatchet/pkg/config/server" ) @@ -19,6 +20,7 @@ var ( tokenTenantIdStr string tokenName string expiresIn time.Duration + tokenNoAuth bool ) var tokenCmd = &cobra.Command{ @@ -65,18 +67,28 @@ func init() { "Expiration duration for the API token", ) + tokenCreateAPICmd.PersistentFlags().BoolVar( + &tokenNoAuth, + "no-auth", + false, + "sign the token with the no-auth keyset for the default tenant (local no-auth mode)", + ) } func runCreateAPIToken(expiresIn time.Duration) error { // read in the local config configLoader := loader.NewConfigLoader(configDirectory) - cleanup, server, err := configLoader.CreateServerFromConfig("", func(scf *server.ServerConfigFile) { + var cf *server.ServerConfigFile + + cleanup, srv, err := configLoader.CreateServerFromConfig("", func(scf *server.ServerConfigFile) { // disable rabbitmq since it's not needed to create the api token scf.MessageQueue.Enabled = false // disable security checks since we're not running the server scf.SecurityCheck.Enabled = false + + cf = scf }) if err != nil { @@ -85,16 +97,41 @@ func runCreateAPIToken(expiresIn time.Duration) error { defer cleanup() // nolint:errcheck - defer server.Disconnect() // nolint:errcheck + defer srv.Disconnect() // nolint:errcheck expiresAt := time.Now().UTC().Add(expiresIn) - tenantId, err := tenantIDForTokenCreate(server.Seed.DefaultTenantID) + jwtManager := srv.Auth.JWTManager + + tenantId, err := tenantIDForTokenCreate(srv.Seed.DefaultTenantID) if err != nil { return err } - defaultTok, err := server.Auth.JWTManager.GenerateTenantToken(context.Background(), tenantId, tokenName, false, &expiresAt) + if tokenNoAuth { + // no-auth tokens are always scoped to the seed default tenant and signed by the no-auth keyset + tenantId, err = uuid.Parse(srv.Seed.DefaultTenantID) + if err != nil { + return err + } + + noAuthEncryptionSvc, encErr := loader.LoadNoAuthEncryptionSvc(cf) + if encErr != nil { + return encErr + } + + jwtManager, err = token.NewJWTManager(noAuthEncryptionSvc, srv.V1.APIToken(), &token.TokenOpts{ + Issuer: cf.Runtime.ServerURL, + Audience: cf.Runtime.ServerURL, + GRPCBroadcastAddress: cf.Runtime.GRPCBroadcastAddress, + ServerURL: cf.Runtime.ServerURL, + }) + if err != nil { + return err + } + } + + defaultTok, err := jwtManager.GenerateTenantToken(context.Background(), tenantId, tokenName, false, &expiresAt) if err != nil { return err diff --git a/cmd/hatchet-cli/cli/internal/drivers/docker/token.go b/cmd/hatchet-cli/cli/internal/drivers/docker/token.go index 25a827fd2b..8167f11dba 100644 --- a/cmd/hatchet-cli/cli/internal/drivers/docker/token.go +++ b/cmd/hatchet-cli/cli/internal/drivers/docker/token.go @@ -16,15 +16,21 @@ const defaultTenantID = "707d0855-80ab-4e1f-a156-f1c4546cbf52" func (d *DockerDriver) createHatchetToken(ctx context.Context, hatchetLiteOpts *HatchetLiteOpts) (string, error) { containerName := canonicalContainerName(hatchetLiteOpts.projectName, hatchetLiteOpts.hatchetName) + cmd := []string{ + "./hatchet-admin", + "token", + "create", + "--config", "./config", + "--tenant-id", defaultTenantID, + "--expiresIn", (100 * 365 * 24 * time.Hour).String(), + } + + if hatchetLiteOpts.noAuthEnabled { + cmd = append(cmd, "--no-auth") + } + execConfig := container.ExecOptions{ - Cmd: []string{ - "./hatchet-admin", - "token", - "create", - "--config", "./config", - "--tenant-id", defaultTenantID, - "--expiresIn", (100 * 365 * 24 * time.Hour).String(), - }, + Cmd: cmd, AttachStdout: true, AttachStderr: true, } diff --git a/cmd/hatchet-migrate/migrate/migrations_manifest.json b/cmd/hatchet-migrate/migrate/migrations_manifest.json new file mode 100644 index 0000000000..1818c0fc9f --- /dev/null +++ b/cmd/hatchet-migrate/migrate/migrations_manifest.json @@ -0,0 +1,207 @@ +{ + "20240115180414": "v0.1.0-alpha.0", + "20240122014727": "v0.6.0", + "20240126235456": "v0.7.0", + "20240129040510": "v0.9.0", + "20240202042355": "v0.9.0", + "20240209132837": "v0.11.0", + "20240215162148": "v0.10.2", + "20240216133745": "unreleased", + "20240226051822": "v0.12.0", + "20240227181732": "v0.13.0", + "20240228050417": "v0.13.2", + "20240229232811": "v0.14.0", + "20240304060408": "v0.15.0", + "20240320215205": "v0.17.0", + "20240321215205": "v0.17.0", + "20240326151030": "v0.18.0", + "20240331162333": "v0.18.1", + "20240402034010": "v0.19.2", + "20240424091046": "v0.22.0", + "20240430161943": "v0.22.1", + "20240503190030": "v0.23.0", + "20240506194242": "v0.25.0", + "20240507200816": "v0.25.0", + "20240509213608": "v0.26.0", + "20240514192527": "v0.27.0", + "20240514203126": "v0.28.0", + "20240517204453": "v0.28.1", + "20240520152239": "v0.28.2", + "20240521205311": "v0.28.3", + "20240531142907": "v0.30.0", + "20240531200417": "v0.30.0", + "20240531200418": "v0.30.0", + "20240606145243": "v0.31.0", + "20240625180548": "v0.34.0", + "20240626204339": "v0.34.2", + "20240701144852": "v0.35.0", + "20240703194656": "v0.35.1", + "20240704211315": "v0.36.0", + "20240712142946": "v0.36.5", + "20240715154334": "v0.37.0", + "20240716125857": "v0.38.0", + "20240716143349": "v0.39.0", + "20240726160629": "v0.40.0", + "20240728042317": "v0.41.0", + "20240809131000": "v0.42.0", + "20240812153737": "v0.42.1", + "20240815151244": "v0.42.5", + "20240821170947": "v0.42.10", + "20240823120430": "v0.42.13", + "20240823204123": "v0.43.0", + "20240829142550": "v0.43.2", + "20240904120327": "v0.44.0", + "20240908154802": "v0.44.1", + "20240910205843": "v0.44.5", + "20240911124017": "v0.44.7", + "20240911201831": "v0.44.7", + "20240916115647": "v0.44.8", + "20240918162532": "v0.45.0", + "20240923124809": "v0.46.0", + "20240926210650": "v0.47.0", + "20240927172935": "v0.47.1", + "20240928144316": "v0.48.0", + "20240930202706": "v0.48.1", + "20240930233257": "v0.49.1-alpha.0", + "20241004122206": "v0.49.1-alpha.0", + "20241008124038": "v0.49.3", + "20241011205314": "v0.49.4", + "20241014194326": "v0.50.0-alpha.0", + "20241018142125": "v0.50.0", + "20241022124210": "v0.50.0", + "20241023112235": "v0.50.0", + "20241023223039": "v0.50.1", + "20241025162439": "v0.50.4", + "20241029122625": "v0.51.0-beta.0", + "20241107162939": "v0.51.2", + "20241114175346": "v0.51.4", + "20241121142159": "v0.52.0", + "20241204191714": "v0.52.5", + "20241206231312": "v0.52.12", + "20241216175807": "v0.53.0", + "20241217152316": "v0.53.0", + "20250127160736": "v0.54.0", + "20250224162902": "v0.55.0", + "20250224171706": "v0.55.0", + "20250312151904": "v0.55.3", + "20250313202558": "v0.55.4", + "20250314162314": "v0.55.9", + "20250319143644": "v0.55.17", + "20250319192344": "v0.55.17", + "20250320210345": "v0.55.20", + "20250321144831": "v0.55.22", + "20250323220955": "v0.55.22", + "20250327185734": "v0.57.0", + "20250404160322": "v0.58.3", + "20250407012633": "v0.58.4", + "20250414130637": "v0.58.11", + "20250415212814": "v0.59.0", + "20250417143656": "v0.60.0", + "20250417150604": "v0.60.0", + "20250426012858": "v0.61.1", + "20250507193114": "v0.55.17", + "20250509123031": "v0.62.7", + "20250511175026": "v0.63.0", + "20250512141736": "v0.64.0", + "20250519145912": "v0.64.3", + "20250602191423": "v0.65.0", + "20250604191556": "v0.57.0", + "20250606213933": "v0.65.0", + "20250611144858": "v0.66.0", + "20250612173730": "v0.66.0", + "20250617185713": "v0.66.3", + "20250617192510": "v0.66.3", + "20250623140133": "v0.66.5", + "20250717162353": "v0.68.9", + "20250725183217": "v0.70.0", + "20250726193737": "v0.70.0", + "20250726214427": "v0.70.0", + "20250726225025": "v0.57.0", + "20250730194533": "v0.70.0", + "20250801183812": "v0.57.0", + "20250813183355": "v0.57.0", + "20250817183956": "v0.71.2", + "20250818153710": "v0.57.0", + "20250822193023": "v0.61.1", + "20250824131856": "v0.71.8-alpha.0", + "20250904151226": "v0.73.0", + "20250912162812": "v0.73.0", + "20250912163904": "v0.73.0", + "20250930153446": "v0.73.31", + "20251001122435": "v0.73.34", + "20251001155231": "v0.73.35", + "20251007220652": "v0.73.35", + "20251007231452": "v0.73.35", + "20251008083410": "v0.73.35", + "20251014175925": "v0.73.38", + "20251015164344": "v0.73.43", + "20251022151234": "v0.73.35", + "20251113195351": "v0.73.65", + "20251128190238": "v0.73.80", + "20251205170304": "v0.73.81", + "20251208161245": "v0.73.80", + "20251209220629": "v0.73.88", + "20251210193031": "v0.73.88", + "20251212170748": "v0.73.95", + "20251216163945": "v0.73.88", + "20251216190909": "v0.73.98", + "20251218153621": "v0.73.100", + "20251219181211": "v0.73.100", + "20251222220531": "v0.73.103", + "20251224145920": "v0.73.107", + "20251226153622": "v0.73.107", + "20251229174938": "v0.73.111", + "20260106185235": "v0.74.5", + "20260119123835": "v0.77.0", + "20260121120000": "v0.66.0", + "20260128120000": "v0.73.35", + "20260129222533": "v0.77.33", + "20260129222535": "v0.77.34", + "20260202185136": "v0.61.1", + "20260203170918": "v0.78.7", + "20260210165608": "v0.57.0", + "20260215120000": "v0.78.26", + "20260216000001": "v0.78.27", + "20260216000002": "v0.78.27", + "20260216000003": "v0.78.27", + "20260216000004": "v0.78.27", + "20260219000001": "v0.78.30", + "20260223180620": "v0.79.4", + "20260302193424": "v0.79.15", + "20260313020630": "v0.79.40", + "20260313020631": "v0.80.0", + "20260313020632": "v0.80.0", + "20260313020633": "v0.80.0", + "20260313020634": "v0.80.0", + "20260313020635": "v0.80.0", + "20260316185928": "v0.82.0", + "20260323184100": "v0.82.0", + "20260324135804": "v0.83.0", + "20260331160407": "v0.62.7", + "20260403175605": "v0.83.13", + "20260409022005": "v0.57.0", + "20260409215942": "v0.55.17", + "20260417212701": "v0.83.32", + "20260421184231": "v0.83.36", + "20260424190713": "v0.83.46", + "20260424205453": "v0.83.46", + "20260427142714": "v0.57.0", + "20260427190534": "v0.83.55", + "20260505155051": "v0.85.6", + "20260505195258": "v0.85.9", + "20260506201345": "v0.85.11", + "20260509015727": "v0.79.15", + "20260511164037": "v0.86.10", + "20260511174313": "v0.86.15", + "20260514175834": "v0.86.20", + "20260520204451": "v0.57.0", + "20260520213451": "v0.86.23", + "20260521213214": "v0.86.27", + "20260522014401": "v0.87.6", + "20260529131949": "v0.85.11", + "20260529140000": "v0.57.0", + "20260608141858": "v0.88.7", + "20260611203244": "v0.89.3", + "20260616000000": "v0.90.0", + "20260616120000": "v0.90.11" +} diff --git a/pkg/auth/token/token.go b/pkg/auth/token/token.go index ae08ec9da9..4e8eee4867 100644 --- a/pkg/auth/token/token.go +++ b/pkg/auth/token/token.go @@ -29,21 +29,46 @@ type jwtManagerImpl struct { opts *TokenOpts tokenRepo v1.APITokenRepository verifier jwt.Verifier + // noAuthVerifier verifies the default local no-auth token, signed by a separate keyset. + noAuthVerifier jwt.Verifier } -func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts) (JWTManager, error) { +type JWTManagerOpt func(*jwtManagerImpl) error + +func WithNoAuthVerifier(noAuthEncryptionSvc encryption.EncryptionService) JWTManagerOpt { + return func(j *jwtManagerImpl) error { + verifier, err := jwt.NewVerifier(noAuthEncryptionSvc.GetPublicJWTHandle()) + + if err != nil { + return fmt.Errorf("failed to create no-auth JWT Verifier: %v", err) + } + + j.noAuthVerifier = verifier + return nil + } +} + +func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { verifier, err := jwt.NewVerifier(encryptionSvc.GetPublicJWTHandle()) if err != nil { return nil, fmt.Errorf("failed to create JWT Verifier: %v", err) } - return &jwtManagerImpl{ + m := &jwtManagerImpl{ encryption: encryptionSvc, opts: opts, tokenRepo: tokenRepo, verifier: verifier, - }, nil + } + + for _, opt := range mgrOpts { + if err := opt(m); err != nil { + return nil, err + } + } + + return m, nil } type Token struct { @@ -119,6 +144,10 @@ func (j *jwtManagerImpl) ValidateTenantToken(ctx context.Context, token string) verifiedJwt, err := j.verifier.VerifyAndDecode(token, validator) + if err != nil && j.noAuthVerifier != nil { + verifiedJwt, err = j.noAuthVerifier.VerifyAndDecode(token, validator) + } + if err != nil { return uuid.Nil, uuid.Nil, fmt.Errorf("failed to verify and decode JWT: %v", err) } diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 84f4dbf6f3..18306a2265 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -599,7 +599,12 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers } if auth.NoAuthEnabled { - l.Warn().Msg("SERVER_AUTH_NO_AUTH_ENABLED is set: authentication is DISABLED and all requests run as the seed default tenant and admin user. Never enable this in production.") + l.Warn().Msg("SERVER_AUTH_NO_AUTH_ENABLED is set: dashboard/REST authentication is DISABLED and runs as the seed admin user. Never enable this in production.") + + // no-auth mode is single-tenant; disabling these also hides the corresponding dashboard UI + cf.Runtime.AllowCreateTenant = false + cf.Runtime.AllowSignup = false + cf.Runtime.AllowInvites = false } if cf.Auth.Google.Enabled { @@ -645,12 +650,24 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers } // create a new JWT manager + var jwtManagerOpts []token.JWTManagerOpt + + if cf.Auth.NoAuthEnabled { + noAuthEncryptionSvc, noAuthErr := LoadNoAuthEncryptionSvc(cf) + + if noAuthErr != nil { + return nil, nil, fmt.Errorf("could not load no-auth encryption service: %w", noAuthErr) + } + + jwtManagerOpts = append(jwtManagerOpts, token.WithNoAuthVerifier(noAuthEncryptionSvc)) + } + auth.JWTManager, err = token.NewJWTManager(encryptionSvc, dc.V1.APIToken(), &token.TokenOpts{ Issuer: cf.Runtime.ServerURL, Audience: cf.Runtime.ServerURL, GRPCBroadcastAddress: cf.Runtime.GRPCBroadcastAddress, ServerURL: cf.Runtime.ServerURL, - }) + }, jwtManagerOpts...) if err != nil { return nil, nil, fmt.Errorf("could not create JWT manager: %w", err) @@ -948,6 +965,58 @@ func LoadEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionServic return encryptionSvc, nil } +// LoadNoAuthEncryptionSvc loads the dedicated no-auth JWT keyset, signed against the instance master key. +func LoadNoAuthEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionService, error) { + if cf.Encryption.MasterKeyset == "" && cf.Encryption.MasterKeysetFile == "" { + return nil, fmt.Errorf("no-auth mode requires a local master keyset") + } + + masterKeyset := cf.Encryption.MasterKeyset + + if cf.Encryption.MasterKeysetFile != "" { + masterKeysetBytes, err := loaderutils.GetFileBytes(cf.Encryption.MasterKeysetFile) + + if err != nil { + return nil, fmt.Errorf("could not load master keyset file: %w", err) + } + + masterKeyset = string(masterKeysetBytes) + } + + hasKeys := (cf.Auth.NoAuthJWT.PublicJWTKeyset != "" || cf.Auth.NoAuthJWT.PublicJWTKeysetFile != "") && + (cf.Auth.NoAuthJWT.PrivateJWTKeyset != "" || cf.Auth.NoAuthJWT.PrivateJWTKeysetFile != "") + + if !hasKeys { + return nil, fmt.Errorf("no-auth mode requires a no-auth JWT keyset (set SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET[_FILE] and SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET[_FILE])") + } + + privateJWT := cf.Auth.NoAuthJWT.PrivateJWTKeyset + + if cf.Auth.NoAuthJWT.PrivateJWTKeysetFile != "" { + privateJWTBytes, err := loaderutils.GetFileBytes(cf.Auth.NoAuthJWT.PrivateJWTKeysetFile) + + if err != nil { + return nil, fmt.Errorf("could not load no-auth private jwt keyset file: %w", err) + } + + privateJWT = string(privateJWTBytes) + } + + publicJWT := cf.Auth.NoAuthJWT.PublicJWTKeyset + + if cf.Auth.NoAuthJWT.PublicJWTKeysetFile != "" { + publicJWTBytes, err := loaderutils.GetFileBytes(cf.Auth.NoAuthJWT.PublicJWTKeysetFile) + + if err != nil { + return nil, fmt.Errorf("could not load no-auth public jwt keyset file: %w", err) + } + + publicJWT = string(publicJWTBytes) + } + + return encryption.NewLocalEncryption([]byte(masterKeyset), []byte(privateJWT), []byte(publicJWT)) +} + func loadInternalClient(l *zerolog.Logger, conf *server.InternalClientTLSConfigFile, baseServerTLS shared.TLSConfigFile, grpcBroadcastAddress string, grpcInsecure bool) (*clientv1.GRPCClientFactory, error) { // get gRPC broadcast address broadcastAddress := grpcBroadcastAddress diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index 88628f9259..c5654bd0b3 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -454,11 +454,14 @@ type ConfigFileAuth struct { // SetEmailVerified controls whether the user's email is automatically set to verified SetEmailVerified bool `mapstructure:"setEmailVerified" json:"setEmailVerified,omitempty" default:"false"` - // NoAuthEnabled disables all authentication and runs every request as the seed default - // tenant and admin user. Intended for local development only. This is force-disabled in - // hatchet-cloud and ignored whenever a custom authenticator is configured. + // NoAuthEnabled disables dashboard/REST authentication (local development only). Workers still + // use an API token over gRPC; the default no-auth token is signed by NoAuthJWT. NoAuthEnabled bool `mapstructure:"noAuthEnabled" json:"noAuthEnabled,omitempty" default:"false"` + // NoAuthJWT signs and verifies the default no-auth token. Trusted only when NoAuthEnabled is set, + // so the default token is inert on instances that do not load this keyset. + NoAuthJWT ConfigFileAuthNoAuthJWT `mapstructure:"noAuthJWT" json:"noAuthJWT,omitempty"` + // Configuration options for the cookie Cookie ConfigFileAuthCookie `mapstructure:"cookie" json:"cookie,omitempty"` @@ -469,6 +472,14 @@ type ConfigFileAuth struct { ControlPlaneExchangeTokenConfig ConfigFileAuthControlPlaneExchangeToken `mapstructure:"controlPlaneExchangeToken" json:"controlPlaneExchangeToken,omitempty"` } +// ConfigFileAuthNoAuthJWT holds the dedicated no-auth JWT keyset (base64 raw-encoded JSON, master-encrypted). +type ConfigFileAuthNoAuthJWT struct { + PublicJWTKeyset string `mapstructure:"publicJWTKeyset" json:"publicJWTKeyset,omitempty"` + PublicJWTKeysetFile string `mapstructure:"publicJWTKeysetFile" json:"publicJWTKeysetFile,omitempty"` + PrivateJWTKeyset string `mapstructure:"privateJWTKeyset" json:"privateJWTKeyset,omitempty"` + PrivateJWTKeysetFile string `mapstructure:"privateJWTKeysetFile" json:"privateJWTKeysetFile,omitempty"` +} + type ConfigFileAuthControlPlaneExchangeToken struct { // JWTPublicKeyset and JWTPublicKeysetFile must contain a base64 raw-encoded (no padding) // JSON keyset as produced by the Tink library. These are passed to @@ -862,6 +873,10 @@ func BindAllEnv(v *viper.Viper) { _ = v.BindEnv("auth.basicAuthEnabled", "SERVER_AUTH_BASIC_AUTH_ENABLED") _ = v.BindEnv("auth.setEmailVerified", "SERVER_AUTH_SET_EMAIL_VERIFIED") _ = v.BindEnv("auth.noAuthEnabled", "SERVER_AUTH_NO_AUTH_ENABLED") + _ = v.BindEnv("auth.noAuthJWT.publicJWTKeyset", "SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET") + _ = v.BindEnv("auth.noAuthJWT.publicJWTKeysetFile", "SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET_FILE") + _ = v.BindEnv("auth.noAuthJWT.privateJWTKeyset", "SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET") + _ = v.BindEnv("auth.noAuthJWT.privateJWTKeysetFile", "SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET_FILE") _ = v.BindEnv("auth.cookie.name", "SERVER_AUTH_COOKIE_NAME") _ = v.BindEnv("auth.cookie.domain", "SERVER_AUTH_COOKIE_DOMAIN") _ = v.BindEnv("auth.cookie.secrets", "SERVER_AUTH_COOKIE_SECRETS") diff --git a/pkg/encryption/local.go b/pkg/encryption/local.go index e8a66d0577..bee850f9b2 100644 --- a/pkg/encryption/local.go +++ b/pkg/encryption/local.go @@ -81,6 +81,23 @@ func GenerateLocalKeys() (masterKey []byte, privateEc256 []byte, publicEc256 []b return masterKey, privateEc256, publicEc256, insecurePublicHandleEc256, nil } +// GenerateJWTKeysets creates a new JWT keyset encrypted with an existing master key. +func GenerateJWTKeysets(masterKey []byte) (privateEc256 []byte, publicEc256 []byte, insecurePublicHandleEc256 []byte, err error) { + masterHandle, err := InsecureHandleFromBytes(masterKey) + + if err != nil { + return + } + + a, err := aead.New(masterHandle) + + if err != nil { + return + } + + return generateJWTKeysets(a) +} + func generateLocalMasterKey() ([]byte, *keyset.Handle, error) { aeadTemplate := aead.AES256GCMKeyTemplate() From 3160acbff5207e6c8ce514f5222981720dcc9cbd Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 12:11:09 +0200 Subject: [PATCH 08/48] no auth keyset in hatchet lite + docs --- cmd/hatchet-admin/cli/keyset.go | 28 +++++++ cmd/hatchet-cli/cli/server.go | 5 +- .../docs/pages/self-hosting/local-no-auth.mdx | 73 ++++++++++++++----- hack/lite/start.sh | 14 +++- 4 files changed, 101 insertions(+), 19 deletions(-) diff --git a/cmd/hatchet-admin/cli/keyset.go b/cmd/hatchet-admin/cli/keyset.go index 7657a30cf5..109d6ad6e5 100644 --- a/cmd/hatchet-admin/cli/keyset.go +++ b/cmd/hatchet-admin/cli/keyset.go @@ -48,10 +48,24 @@ var keysetCreateCloudKMSJWTCmd = &cobra.Command{ }, } +var keysetCreateNoAuthKeysCmd = &cobra.Command{ + Use: "create-noauth-keys", + Short: "generate a no-auth JWT keyset from an existing local master key.", + Run: func(cmd *cobra.Command, args []string) { + err := runCreateNoAuthKeys() + + if err != nil { + log.Printf("Fatal: could not run [keyset create-noauth-keys] command: %v", err) + os.Exit(1) + } + }, +} + func init() { rootCmd.AddCommand(keysetCmd) keysetCmd.AddCommand(keysetCreateLocalKeysetsCmd) keysetCmd.AddCommand(keysetCreateCloudKMSJWTCmd) + keysetCmd.AddCommand(keysetCreateNoAuthKeysCmd) keysetCmd.PersistentFlags().StringVar( &encryptionKeyDir, @@ -151,6 +165,20 @@ func runCreateLocalKeysets() error { return nil } +func runCreateNoAuthKeys() error { + if encryptionKeyDir == "" { + return fmt.Errorf("--key-dir is required") + } + + masterKeyBytes, err := os.ReadFile(encryptionKeyDir + "/master.key") + + if err != nil { + return fmt.Errorf("could not read master key: %w", err) + } + + return writeNoAuthKeyset(masterKeyBytes) +} + func writeNoAuthKeyset(masterKeyBytes []byte) error { privateEc256, publicEc256, _, err := encryption.GenerateJWTKeysets(masterKeyBytes) diff --git a/cmd/hatchet-cli/cli/server.go b/cmd/hatchet-cli/cli/server.go index f2d00c64bc..bbc1770ca3 100644 --- a/cmd/hatchet-cli/cli/server.go +++ b/cmd/hatchet-cli/cli/server.go @@ -87,7 +87,10 @@ var startCmd = &cobra.Command{ additionalMessage := "" if noAuthMode { - additionalMessage = "No-auth mode is enabled: authentication is disabled. Use for local development only." + additionalMessage = fmt.Sprintf( + "No-auth mode is enabled (local development only).\nDefault API token for workers (HATCHET_CLIENT_TOKEN):\n%s", + result.Token, + ) } // Render styled output diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index 4105f56818..cfb2f84850 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -2,46 +2,85 @@ import { Callout } from "nextra/components"; # Local No-Auth Mode -No-auth mode disables authentication on the Hatchet dashboard and REST API so you can run a local instance without signing in or minting a bearer token for every request. It is intended purely for local development. +No-auth mode lets you run a local Hatchet instance without signing in to the dashboard or minting your own API token. It is intended purely for local development. Never enable no-auth mode in production or on any instance reachable by - untrusted clients. It removes all authentication from the API and dashboard. + untrusted clients. It removes authentication from the dashboard and REST API. ## What it does -When enabled, no-auth mode resolves every unauthenticated dashboard and REST API request to the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). Concretely: +- **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). +- **REST API** calls succeed without a bearer token or session cookie. +- **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). -- **Dashboard** loads without a login screen. -- **REST API** calls succeed without a bearer token or session cookie. The tenant is taken from the request URL, and the admin user is authorized against it exactly as a signed-in owner would be. +## Workers still use an API token -## What it does **not** change +The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. No-auth mode provides a **default token** so you don't have to create one: -The gRPC engine is unaffected. Workers and SDK clients still authenticate with an API token as usual, and **the token's tenant is authoritative**. This is deliberate in the sense that it means there are no surprises about which tenant a worker runs against. +- The token is signed by a **dedicated no-auth keyset**, separate from the instance's main keyset. The server only trusts this keyset when no-auth mode is enabled, so the default token is inert on any instance that hasn't loaded it. +- It is scoped to the seed default tenant. -So the usual multi-tenant flow works normally: - -1. Open the dashboard (no login required) and create a tenant. -2. Create an API token in that tenant. -3. Configure your worker or SDK client with that token — its workflows run in that tenant. +Point your worker at it via `HATCHET_CLIENT_TOKEN`. ## Enabling it ### Hatchet CLI -Pass `--no-auth-mode` to `hatchet server start`: - ```sh hatchet server start --no-auth-mode ``` -### Environment variable +This prints the default token to use as `HATCHET_CLIENT_TOKEN`. + +### Hatchet Lite (run directly) + +When running the `hatchet-lite` image directly (not through the CLI), set `SERVER_AUTH_NO_AUTH_ENABLED=true`: + +```sh +docker run -e SERVER_AUTH_NO_AUTH_ENABLED=true ... ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest +``` + +On startup the container generates the no-auth keyset and mints the default worker token. Grab it either from the container logs or from the config volume: + +```sh +docker logs # printed under "no-auth mode: worker API token" +# or +docker exec cat ./config/noauth-token +``` -Set the following on both the API and engine: +Then point your worker at it: + +```sh +export HATCHET_CLIENT_TOKEN="" +``` + +The token has the server address baked in, so no other client configuration is needed. + +### Docker Compose + +Set on the API and engine: ```sh SERVER_AUTH_NO_AUTH_ENABLED=true +SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET_FILE=/path/to/noauth_private_ec256.key +SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET_FILE=/path/to/noauth_public_ec256.key ``` -This maps to `auth.noAuthEnabled` in the server config file. +Generate the no-auth keyset alongside your local keys, then mint the default token: + +```sh +# generate the keyset (add --no-auth to create-local-keys, or from an existing master key) +hatchet-admin keyset --key-dir /path/to/keys create-local-keys --no-auth +hatchet-admin keyset --key-dir /path/to/keys create-noauth-keys + +# mint the default token for the seed default tenant +hatchet-admin token create --no-auth +``` + +## How it stays safe + +- Defaults to **off**; must be explicitly enabled. +- The no-auth keyset is generated per instance and trusted only when no-auth mode is on, so the default token cannot authenticate against a normal deployment. +- The server logs a prominent warning on startup, and the dashboard shows a persistent banner, while it is active. diff --git a/hack/lite/start.sh b/hack/lite/start.sh index a9c3175523..05af5b1792 100644 --- a/hack/lite/start.sh +++ b/hack/lite/start.sh @@ -7,8 +7,20 @@ if [ $? -ne 0 ]; then exit 1 fi -# Generate config files +# Generate config files (also generates the no-auth keyset when SERVER_AUTH_NO_AUTH_ENABLED is set) ./hatchet-admin quickstart --skip certs --generated-config-dir ./config --overwrite=false +# In no-auth mode, mint and surface the default worker token +if [ "$SERVER_AUTH_NO_AUTH_ENABLED" = "true" ] || [ "$SERVER_AUTH_NO_AUTH_ENABLED" = "t" ]; then + if [ ! -s ./config/noauth-token ]; then + ./hatchet-admin token create --config ./config --no-auth --name noauth-default > ./config/noauth-token + fi + echo "=================== no-auth mode: worker API token ===================" + echo "Set HATCHET_CLIENT_TOKEN to the value below (also at ./config/noauth-token):" + cat ./config/noauth-token + echo + echo "=====================================================================" +fi + # Run the Go binary ./hatchet-lite --config ./config From 1b90b116c610990e99cd94ac2b845af86ae55144 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 12:17:31 +0200 Subject: [PATCH 09/48] rm stale file --- .../migrate/migrations_manifest.json | 207 ------------------ 1 file changed, 207 deletions(-) delete mode 100644 cmd/hatchet-migrate/migrate/migrations_manifest.json diff --git a/cmd/hatchet-migrate/migrate/migrations_manifest.json b/cmd/hatchet-migrate/migrate/migrations_manifest.json deleted file mode 100644 index 1818c0fc9f..0000000000 --- a/cmd/hatchet-migrate/migrate/migrations_manifest.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "20240115180414": "v0.1.0-alpha.0", - "20240122014727": "v0.6.0", - "20240126235456": "v0.7.0", - "20240129040510": "v0.9.0", - "20240202042355": "v0.9.0", - "20240209132837": "v0.11.0", - "20240215162148": "v0.10.2", - "20240216133745": "unreleased", - "20240226051822": "v0.12.0", - "20240227181732": "v0.13.0", - "20240228050417": "v0.13.2", - "20240229232811": "v0.14.0", - "20240304060408": "v0.15.0", - "20240320215205": "v0.17.0", - "20240321215205": "v0.17.0", - "20240326151030": "v0.18.0", - "20240331162333": "v0.18.1", - "20240402034010": "v0.19.2", - "20240424091046": "v0.22.0", - "20240430161943": "v0.22.1", - "20240503190030": "v0.23.0", - "20240506194242": "v0.25.0", - "20240507200816": "v0.25.0", - "20240509213608": "v0.26.0", - "20240514192527": "v0.27.0", - "20240514203126": "v0.28.0", - "20240517204453": "v0.28.1", - "20240520152239": "v0.28.2", - "20240521205311": "v0.28.3", - "20240531142907": "v0.30.0", - "20240531200417": "v0.30.0", - "20240531200418": "v0.30.0", - "20240606145243": "v0.31.0", - "20240625180548": "v0.34.0", - "20240626204339": "v0.34.2", - "20240701144852": "v0.35.0", - "20240703194656": "v0.35.1", - "20240704211315": "v0.36.0", - "20240712142946": "v0.36.5", - "20240715154334": "v0.37.0", - "20240716125857": "v0.38.0", - "20240716143349": "v0.39.0", - "20240726160629": "v0.40.0", - "20240728042317": "v0.41.0", - "20240809131000": "v0.42.0", - "20240812153737": "v0.42.1", - "20240815151244": "v0.42.5", - "20240821170947": "v0.42.10", - "20240823120430": "v0.42.13", - "20240823204123": "v0.43.0", - "20240829142550": "v0.43.2", - "20240904120327": "v0.44.0", - "20240908154802": "v0.44.1", - "20240910205843": "v0.44.5", - "20240911124017": "v0.44.7", - "20240911201831": "v0.44.7", - "20240916115647": "v0.44.8", - "20240918162532": "v0.45.0", - "20240923124809": "v0.46.0", - "20240926210650": "v0.47.0", - "20240927172935": "v0.47.1", - "20240928144316": "v0.48.0", - "20240930202706": "v0.48.1", - "20240930233257": "v0.49.1-alpha.0", - "20241004122206": "v0.49.1-alpha.0", - "20241008124038": "v0.49.3", - "20241011205314": "v0.49.4", - "20241014194326": "v0.50.0-alpha.0", - "20241018142125": "v0.50.0", - "20241022124210": "v0.50.0", - "20241023112235": "v0.50.0", - "20241023223039": "v0.50.1", - "20241025162439": "v0.50.4", - "20241029122625": "v0.51.0-beta.0", - "20241107162939": "v0.51.2", - "20241114175346": "v0.51.4", - "20241121142159": "v0.52.0", - "20241204191714": "v0.52.5", - "20241206231312": "v0.52.12", - "20241216175807": "v0.53.0", - "20241217152316": "v0.53.0", - "20250127160736": "v0.54.0", - "20250224162902": "v0.55.0", - "20250224171706": "v0.55.0", - "20250312151904": "v0.55.3", - "20250313202558": "v0.55.4", - "20250314162314": "v0.55.9", - "20250319143644": "v0.55.17", - "20250319192344": "v0.55.17", - "20250320210345": "v0.55.20", - "20250321144831": "v0.55.22", - "20250323220955": "v0.55.22", - "20250327185734": "v0.57.0", - "20250404160322": "v0.58.3", - "20250407012633": "v0.58.4", - "20250414130637": "v0.58.11", - "20250415212814": "v0.59.0", - "20250417143656": "v0.60.0", - "20250417150604": "v0.60.0", - "20250426012858": "v0.61.1", - "20250507193114": "v0.55.17", - "20250509123031": "v0.62.7", - "20250511175026": "v0.63.0", - "20250512141736": "v0.64.0", - "20250519145912": "v0.64.3", - "20250602191423": "v0.65.0", - "20250604191556": "v0.57.0", - "20250606213933": "v0.65.0", - "20250611144858": "v0.66.0", - "20250612173730": "v0.66.0", - "20250617185713": "v0.66.3", - "20250617192510": "v0.66.3", - "20250623140133": "v0.66.5", - "20250717162353": "v0.68.9", - "20250725183217": "v0.70.0", - "20250726193737": "v0.70.0", - "20250726214427": "v0.70.0", - "20250726225025": "v0.57.0", - "20250730194533": "v0.70.0", - "20250801183812": "v0.57.0", - "20250813183355": "v0.57.0", - "20250817183956": "v0.71.2", - "20250818153710": "v0.57.0", - "20250822193023": "v0.61.1", - "20250824131856": "v0.71.8-alpha.0", - "20250904151226": "v0.73.0", - "20250912162812": "v0.73.0", - "20250912163904": "v0.73.0", - "20250930153446": "v0.73.31", - "20251001122435": "v0.73.34", - "20251001155231": "v0.73.35", - "20251007220652": "v0.73.35", - "20251007231452": "v0.73.35", - "20251008083410": "v0.73.35", - "20251014175925": "v0.73.38", - "20251015164344": "v0.73.43", - "20251022151234": "v0.73.35", - "20251113195351": "v0.73.65", - "20251128190238": "v0.73.80", - "20251205170304": "v0.73.81", - "20251208161245": "v0.73.80", - "20251209220629": "v0.73.88", - "20251210193031": "v0.73.88", - "20251212170748": "v0.73.95", - "20251216163945": "v0.73.88", - "20251216190909": "v0.73.98", - "20251218153621": "v0.73.100", - "20251219181211": "v0.73.100", - "20251222220531": "v0.73.103", - "20251224145920": "v0.73.107", - "20251226153622": "v0.73.107", - "20251229174938": "v0.73.111", - "20260106185235": "v0.74.5", - "20260119123835": "v0.77.0", - "20260121120000": "v0.66.0", - "20260128120000": "v0.73.35", - "20260129222533": "v0.77.33", - "20260129222535": "v0.77.34", - "20260202185136": "v0.61.1", - "20260203170918": "v0.78.7", - "20260210165608": "v0.57.0", - "20260215120000": "v0.78.26", - "20260216000001": "v0.78.27", - "20260216000002": "v0.78.27", - "20260216000003": "v0.78.27", - "20260216000004": "v0.78.27", - "20260219000001": "v0.78.30", - "20260223180620": "v0.79.4", - "20260302193424": "v0.79.15", - "20260313020630": "v0.79.40", - "20260313020631": "v0.80.0", - "20260313020632": "v0.80.0", - "20260313020633": "v0.80.0", - "20260313020634": "v0.80.0", - "20260313020635": "v0.80.0", - "20260316185928": "v0.82.0", - "20260323184100": "v0.82.0", - "20260324135804": "v0.83.0", - "20260331160407": "v0.62.7", - "20260403175605": "v0.83.13", - "20260409022005": "v0.57.0", - "20260409215942": "v0.55.17", - "20260417212701": "v0.83.32", - "20260421184231": "v0.83.36", - "20260424190713": "v0.83.46", - "20260424205453": "v0.83.46", - "20260427142714": "v0.57.0", - "20260427190534": "v0.83.55", - "20260505155051": "v0.85.6", - "20260505195258": "v0.85.9", - "20260506201345": "v0.85.11", - "20260509015727": "v0.79.15", - "20260511164037": "v0.86.10", - "20260511174313": "v0.86.15", - "20260514175834": "v0.86.20", - "20260520204451": "v0.57.0", - "20260520213451": "v0.86.23", - "20260521213214": "v0.86.27", - "20260522014401": "v0.87.6", - "20260529131949": "v0.85.11", - "20260529140000": "v0.57.0", - "20260608141858": "v0.88.7", - "20260611203244": "v0.89.3", - "20260616000000": "v0.90.0", - "20260616120000": "v0.90.11" -} From 7b917405f37dc42d92da68c21a2943f874d59d36 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 12:29:56 +0200 Subject: [PATCH 10/48] edit doc --- .../docs/pages/self-hosting/local-no-auth.mdx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index cfb2f84850..d5f36cdd70 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -5,8 +5,7 @@ import { Callout } from "nextra/components"; No-auth mode lets you run a local Hatchet instance without signing in to the dashboard or minting your own API token. It is intended purely for local development. - Never enable no-auth mode in production or on any instance reachable by - untrusted clients. It removes authentication from the dashboard and REST API. + No-auth mode should strictly be used for local development and testing. Please don't enable this on a production system which can be accessed by untrusted clients. ## What it does @@ -17,9 +16,9 @@ No-auth mode lets you run a local Hatchet instance without signing in to the das ## Workers still use an API token -The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. No-auth mode provides a **default token** so you don't have to create one: +The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. No-auth mode provides a default token so you don't have to create one: -- The token is signed by a **dedicated no-auth keyset**, separate from the instance's main keyset. The server only trusts this keyset when no-auth mode is enabled, so the default token is inert on any instance that hasn't loaded it. +- The token is signed by a dedicated no-auth keyset, separate from the instance's main keyset. The server only trusts this keyset when no-auth mode is enabled, so the default token is inert on any instance that hasn't loaded it. - It is scoped to the seed default tenant. Point your worker at it via `HATCHET_CLIENT_TOKEN`. @@ -34,9 +33,9 @@ hatchet server start --no-auth-mode This prints the default token to use as `HATCHET_CLIENT_TOKEN`. -### Hatchet Lite (run directly) +### Hatchet Lite -When running the `hatchet-lite` image directly (not through the CLI), set `SERVER_AUTH_NO_AUTH_ENABLED=true`: +When running the `hatchet-lite` image, set `SERVER_AUTH_NO_AUTH_ENABLED=true`: ```sh docker run -e SERVER_AUTH_NO_AUTH_ENABLED=true ... ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest @@ -45,7 +44,7 @@ docker run -e SERVER_AUTH_NO_AUTH_ENABLED=true ... ghcr.io/hatchet-dev/hatchet/h On startup the container generates the no-auth keyset and mints the default worker token. Grab it either from the container logs or from the config volume: ```sh -docker logs # printed under "no-auth mode: worker API token" +docker logs # printed under "no-auth mode: worker API token" # or docker exec cat ./config/noauth-token ``` @@ -79,7 +78,7 @@ hatchet-admin keyset --key-dir /path/to/keys create-noauth-keys hatchet-admin token create --no-auth ``` -## How it stays safe +## Key security awareness implementations - Defaults to **off**; must be explicitly enabled. - The no-auth keyset is generated per instance and trusted only when no-auth mode is on, so the default token cannot authenticate against a normal deployment. From 5ee5b2ef4b2a2179275963cd7b8b3b77df298658 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 12:54:33 +0200 Subject: [PATCH 11/48] no auth user default to seed admin --- api/v1/server/authn/middleware.go | 2 +- hack/lite/start.sh | 2 +- pkg/config/loader/loader.go | 1 - pkg/config/server/server.go | 7 +++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index ad87da1c24..61123488e9 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -147,7 +147,7 @@ func (a *AuthN) handleNoAuthBypass(c echo.Context) error { ctx := c.Request().Context() - user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Auth.NoAuthUserEmail) + user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Seed.AdminEmail) if err != nil { a.l.Error().Ctx(ctx).Err(err).Msg("no-auth mode: could not resolve default user") diff --git a/hack/lite/start.sh b/hack/lite/start.sh index 05af5b1792..f8f1d7a8af 100644 --- a/hack/lite/start.sh +++ b/hack/lite/start.sh @@ -7,7 +7,7 @@ if [ $? -ne 0 ]; then exit 1 fi -# Generate config files (also generates the no-auth keyset when SERVER_AUTH_NO_AUTH_ENABLED is set) +# Generate config files ./hatchet-admin quickstart --skip certs --generated-config-dir ./config --overwrite=false # In no-auth mode, mint and surface the default worker token diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 7dd76e25b9..1804f23654 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -622,7 +622,6 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers RestrictedEmailDomains: getStrArr(cf.Auth.RestrictedEmailDomains), ConfigFile: cf.Auth, NoAuthEnabled: cf.Auth.NoAuthEnabled, - NoAuthUserEmail: dc.Seed.AdminEmail, } if auth.NoAuthEnabled { diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index b46fc0228f..54fd377982 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -633,10 +633,9 @@ type AuthConfig struct { CustomAuthenticator CustomAuthenticator - // NoAuthEnabled, when true, disables API/UI authentication and resolves every request to - // NoAuthUserEmail. Only honored when CustomAuthenticator is nil. - NoAuthEnabled bool - NoAuthUserEmail string + // NoAuthEnabled, when true, disables API/UI authentication and resolves every request to the + // seed admin user. + NoAuthEnabled bool // Operations listed here bypass the tenant RBAC check. Use this for // extension operations (e.g. cloud) that handle their own authorization From 4a3f9cbe7335f49a160353a4d3d087191c1215fc Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 12:55:17 +0200 Subject: [PATCH 12/48] fmt docs --- frontend/docs/pages/self-hosting/local-no-auth.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index d5f36cdd70..f505e333da 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -5,7 +5,9 @@ import { Callout } from "nextra/components"; No-auth mode lets you run a local Hatchet instance without signing in to the dashboard or minting your own API token. It is intended purely for local development. - No-auth mode should strictly be used for local development and testing. Please don't enable this on a production system which can be accessed by untrusted clients. + No-auth mode should strictly be used for local development and testing. Please + don't enable this on a production system which can be accessed by untrusted + clients. ## What it does From 8190d2c5a0b96bf43de81247cb7557b6dc6bf1ca Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 2 Jul 2026 13:15:57 +0200 Subject: [PATCH 13/48] simple test for noauth tokens --- pkg/auth/token/token_noauth_test.go | 89 +++++++++++++++++++++++++++++ pkg/config/loader/loader.go | 18 ++++-- 2 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 pkg/auth/token/token_noauth_test.go diff --git a/pkg/auth/token/token_noauth_test.go b/pkg/auth/token/token_noauth_test.go new file mode 100644 index 0000000000..61167eb6c5 --- /dev/null +++ b/pkg/auth/token/token_noauth_test.go @@ -0,0 +1,89 @@ +//go:build !e2e && !load && !rampup && !integration + +package token_test + +import ( + "context" + "testing" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/hatchet-dev/hatchet/pkg/auth/token" + "github.com/hatchet-dev/hatchet/pkg/encryption" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" +) + +type stubAPITokenRepository struct{} + +func (s *stubAPITokenRepository) CreateAPIToken(ctx context.Context, opts *v1.CreateAPITokenOpts) (*sqlcv1.APIToken, error) { + return &sqlcv1.APIToken{ID: opts.ID, ExpiresAt: pgtype.Timestamp{Time: opts.ExpiresAt, Valid: true}}, nil +} + +func (s *stubAPITokenRepository) GetAPITokenById(ctx context.Context, id uuid.UUID) (*sqlcv1.APIToken, error) { + return &sqlcv1.APIToken{ID: id, Revoked: false, ExpiresAt: pgtype.Timestamp{Time: time.Now().Add(24 * time.Hour), Valid: true}}, nil +} + +func (s *stubAPITokenRepository) ListAPITokensByTenant(ctx context.Context, tenantId uuid.UUID) ([]*sqlcv1.APIToken, error) { + return nil, nil +} + +func (s *stubAPITokenRepository) RevokeAPIToken(ctx context.Context, id uuid.UUID) error { + return nil +} + +func (s *stubAPITokenRepository) DeleteAPIToken(ctx context.Context, tenantId, id uuid.UUID) error { + return nil +} + +func TestNoAuthTokenTrustedOnlyWithVerifier(t *testing.T) { + master, mainPriv, mainPub, _, err := encryption.GenerateLocalKeys() + require.NoError(t, err) + + noAuthPriv, noAuthPub, _, err := encryption.GenerateJWTKeysets(master) + require.NoError(t, err) + + mainEnc, err := encryption.NewLocalEncryption(master, mainPriv, mainPub) + require.NoError(t, err) + + noAuthEnc, err := encryption.NewLocalEncryption(master, noAuthPriv, noAuthPub) + require.NoError(t, err) + + repo := &stubAPITokenRepository{} + opts := &token.TokenOpts{Issuer: "hatchet", Audience: "hatchet", ServerURL: "http://localhost:8080"} + + mgrWithNoAuth, err := token.NewJWTManager(mainEnc, repo, opts, token.WithNoAuthVerifier(noAuthEnc)) + require.NoError(t, err) + + mgrPlain, err := token.NewJWTManager(mainEnc, repo, opts) + require.NoError(t, err) + + noAuthMinter, err := token.NewJWTManager(noAuthEnc, repo, opts) + require.NoError(t, err) + + ctx := context.Background() + tenantID := uuid.New() + + noAuthTok, err := noAuthMinter.GenerateTenantToken(ctx, tenantID, "noauth", false, nil) + require.NoError(t, err) + + gotTenant, _, err := mgrWithNoAuth.ValidateTenantToken(ctx, noAuthTok.Token) + assert.NoError(t, err, "no-auth token should validate when the no-auth verifier is loaded") + assert.Equal(t, tenantID, gotTenant) + + _, _, err = mgrPlain.ValidateTenantToken(ctx, noAuthTok.Token) + assert.Error(t, err, "no-auth token must be rejected without the no-auth verifier") + + mainTok, err := mgrPlain.GenerateTenantToken(ctx, tenantID, "main", false, nil) + require.NoError(t, err) + + _, _, err = mgrPlain.ValidateTenantToken(ctx, mainTok.Token) + assert.NoError(t, err, "main token should validate on a plain manager") + + _, _, err = mgrWithNoAuth.ValidateTenantToken(ctx, mainTok.Token) + assert.NoError(t, err, "main token should validate on a no-auth manager") +} diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 1804f23654..41e37408c4 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -626,13 +626,10 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers if auth.NoAuthEnabled { l.Warn().Msg("SERVER_AUTH_NO_AUTH_ENABLED is set: dashboard/REST authentication is DISABLED and runs as the seed admin user. Never enable this in production.") - - // no-auth mode is single-tenant; disabling these also hides the corresponding dashboard UI - cf.Runtime.AllowCreateTenant = false - cf.Runtime.AllowSignup = false - cf.Runtime.AllowInvites = false } + applyNoAuthConfigOverrides(cf) + if cf.Auth.Google.Enabled { if cf.Auth.Google.ClientID == "" { return nil, nil, fmt.Errorf("google client id is required") @@ -991,7 +988,16 @@ func LoadEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionServic return encryptionSvc, nil } -// LoadNoAuthEncryptionSvc loads the dedicated no-auth JWT keyset, signed against the instance master key. +func applyNoAuthConfigOverrides(cf *server.ServerConfigFile) { + if !cf.Auth.NoAuthEnabled { + return + } + + cf.Runtime.AllowCreateTenant = false + cf.Runtime.AllowSignup = false + cf.Runtime.AllowInvites = false +} + func LoadNoAuthEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionService, error) { if cf.Encryption.MasterKeyset == "" && cf.Encryption.MasterKeysetFile == "" { return nil, fmt.Errorf("no-auth mode requires a local master keyset") From b574633073f10f8b53f716e0f28e5e68fff86795 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 22:24:05 +0200 Subject: [PATCH 14/48] auth disabled go build tag --- .github/workflows/build.yml | 10 + .github/workflows/pre-release.yaml | 148 ++++ .../openapi/components/schemas/metadata.yaml | 4 +- api/v1/server/authn/middleware.go | 11 +- api/v1/server/authz/middleware.go | 2 +- api/v1/server/handlers/metadata/get.go | 5 +- api/v1/server/oas/gen/openapi.gen.go | 712 +++++++++--------- build/package/servers.dockerfile | 5 +- cmd/hatchet-admin/cli/authdisabled.go | 24 + cmd/hatchet-admin/cli/keyset.go | 70 -- cmd/hatchet-admin/cli/quickstart.go | 11 - cmd/hatchet-admin/cli/token.go | 20 +- .../internal/drivers/docker/hatchet_lite.go | 13 - .../cli/internal/drivers/docker/token.go | 22 +- cmd/hatchet-cli/cli/server.go | 21 +- .../app/src/components/layout/app-layout.tsx | 2 +- ...th-banner.tsx => auth-disabled-banner.tsx} | 4 +- .../src/lib/api/generated/data-contracts.ts | 4 +- frontend/app/src/pages/authenticated.tsx | 6 +- frontend/docs/pages/self-hosting/_meta.js | 2 +- .../docs/pages/self-hosting/local-no-auth.mdx | 70 +- hack/lite/start.sh | 14 +- pkg/auth/token/token.go | 67 +- ...uth_test.go => token_authdisabled_test.go} | 25 +- pkg/authmode/disabled.go | 9 + pkg/authmode/enabled.go | 19 + pkg/client/rest/gen.go | 4 +- pkg/config/loader/loader.go | 83 +- pkg/config/loader/loader_authdisabled_test.go | 25 + pkg/config/server/server.go | 25 - pkg/encryption/local.go | 27 +- 31 files changed, 752 insertions(+), 712 deletions(-) create mode 100644 cmd/hatchet-admin/cli/authdisabled.go rename frontend/app/src/components/layout/{no-auth-banner.tsx => auth-disabled-banner.tsx} (80%) rename pkg/auth/token/{token_noauth_test.go => token_authdisabled_test.go} (69%) create mode 100644 pkg/authmode/disabled.go create mode 100644 pkg/authmode/enabled.go create mode 100644 pkg/config/loader/loader_authdisabled_test.go diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 076798e67a..c8037e2395 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,16 @@ jobs: - name: Build servers run: docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=engine + authdisabled: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Build api (authdisabled) + run: docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=api --build-arg GO_BUILD_TAGS=authdisabled + - name: Build engine (authdisabled) + run: docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=engine --build-arg GO_BUILD_TAGS=authdisabled + admin: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 97b95ab2d9..675e6061ec 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -26,9 +26,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 \ + --build-arg SERVER_TARGET=api \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 build-push-hatchet-api-arm: name: hatchet-api runs-on: hatchet-arm64-2 @@ -51,9 +61,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 \ + --build-arg SERVER_TARGET=api \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 build-push-hatchet-api: name: Combine hatchet-api runs-on: ubuntu-latest @@ -81,6 +101,14 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} + - name: Combine :dev + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-api:dev \ + ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev build-push-hatchet-admin-amd: name: hatchet-admin runs-on: ubuntu-latest @@ -103,9 +131,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 \ + --build-arg SERVER_TARGET=admin \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 build-push-hatchet-admin-arm: name: hatchet-admin runs-on: hatchet-arm64-2 @@ -128,9 +166,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 \ + --build-arg SERVER_TARGET=admin \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 build-push-hatchet-admin: name: Combine hatchet-admin runs-on: ubuntu-latest @@ -158,6 +206,14 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}} + - name: Combine :dev + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev \ + ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev build-push-hatchet-engine-amd: name: hatchet-engine runs-on: ubuntu-latest @@ -180,9 +236,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 \ + --build-arg SERVER_TARGET=engine \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 build-push-hatchet-engine-arm: name: hatchet-engine runs-on: hatchet-arm64-2 @@ -205,9 +271,19 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 \ + --build-arg SERVER_TARGET=engine \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 build-push-hatchet-engine: name: Combine hatchet-engine runs-on: ubuntu-latest @@ -235,6 +311,14 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} + - name: Combine :dev + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev \ + ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev build-push-hatchet-migrate-amd: name: hatchet-migrate runs-on: ubuntu-latest @@ -453,9 +537,37 @@ jobs: --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \ --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=lite \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + -t hatchet-lite-dev-tmp:amd64 \ + . & + + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=admin \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + -t hatchet-admin-dev-tmp:amd64 \ + . & + + wait + + DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 \ + --platform linux/amd64 \ + --build-arg HATCHET_LITE_IMAGE=hatchet-lite-dev-tmp:amd64 \ + --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-dev-tmp:amd64 \ + --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 build-push-hatchet-lite-arm: name: hatchet-lite-arm runs-on: hatchet-arm64-2 @@ -512,9 +624,37 @@ jobs: --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:arm64 \ --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:arm64 \ . + - name: Build authdisabled (:dev) + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=lite \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + -t hatchet-lite-dev-tmp:arm64 \ + . & + + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=admin \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + -t hatchet-admin-dev-tmp:arm64 \ + . & + + wait + + DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 \ + --platform linux/arm64 \ + --build-arg HATCHET_LITE_IMAGE=hatchet-lite-dev-tmp:arm64 \ + --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-dev-tmp:arm64 \ + --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:arm64 \ + . - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 combine-hatchet-lite: name: Combine hatchet-lite runs-on: ubuntu-latest @@ -542,6 +682,14 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}} + - name: Combine :dev + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev \ + ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev build-push-hatchet-dashboard-amd: name: hatchet-dashboard-amd runs-on: ubuntu-latest diff --git a/api-contracts/openapi/components/schemas/metadata.yaml b/api-contracts/openapi/components/schemas/metadata.yaml index 1b2844fd37..4fb4be77dd 100644 --- a/api-contracts/openapi/components/schemas/metadata.yaml +++ b/api-contracts/openapi/components/schemas/metadata.yaml @@ -33,9 +33,9 @@ APIMeta: type: boolean description: whether or not a Prometheus federation server is configured (SERVER_PROMETHEUS_SERVER_URL) on this instance example: false - noAuthEnabled: + authDisabled: type: boolean - description: whether or not authentication is disabled (local no-auth mode) on this instance + description: whether or not authentication is disabled (authdisabled build) on this instance example: false APIMetaAuth: diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index 61123488e9..fa3a997959 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -17,6 +17,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/pkg/analytics" + "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" @@ -60,8 +61,8 @@ func (a *AuthN) authenticate(c echo.Context, r *middleware.RouteInfo) error { return a.handleNoAuth(c) } - if a.config.Auth.NoAuthEnabled { - return a.handleNoAuthBypass(c) + if authmode.Disabled { + return a.handleAuthDisabledBypass(c) } var bearerErr error @@ -142,7 +143,7 @@ func (a *AuthN) handleNoAuth(c echo.Context) error { return nil } -func (a *AuthN) handleNoAuthBypass(c echo.Context) error { +func (a *AuthN) handleAuthDisabledBypass(c echo.Context) error { forbidden := echo.NewHTTPError(http.StatusForbidden, "Please provide valid credentials") ctx := c.Request().Context() @@ -150,13 +151,13 @@ func (a *AuthN) handleNoAuthBypass(c echo.Context) error { user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Seed.AdminEmail) if err != nil { - a.l.Error().Ctx(ctx).Err(err).Msg("no-auth mode: could not resolve default user") + a.l.Error().Ctx(ctx).Err(err).Msg("authdisabled: could not resolve default user") return forbidden } c.Set("user", user) - c.Set("auth_strategy", "noauth") + c.Set("auth_strategy", "authdisabled") ctx = context.WithValue(ctx, analytics.UserIDKey, user.ID) ctx = context.WithValue(ctx, analytics.SourceKey, analytics.SourceUI) diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 657f763feb..400fb58dee 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -51,7 +51,7 @@ func (a *AuthZ) authorize(c echo.Context, r *middleware.RouteInfo) error { var err error switch c.Get("auth_strategy").(string) { - case "noauth": + case "authdisabled": err = a.validateUserTenantPermissions(c, r) case "cookie": err = a.handleCookieAuth(c, r) diff --git a/api/v1/server/handlers/metadata/get.go b/api/v1/server/handlers/metadata/get.go index 94611576b5..41f0942f66 100644 --- a/api/v1/server/handlers/metadata/get.go +++ b/api/v1/server/handlers/metadata/get.go @@ -4,6 +4,7 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + "github.com/hatchet-dev/hatchet/pkg/authmode" ) func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetRequestObject) (gen.MetadataGetResponseObject, error) { @@ -36,7 +37,7 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR prometheusServerEnabled := u.config.Prometheus.PrometheusServerURL != "" - noAuthEnabled := u.config.Auth.NoAuthEnabled + authDisabled := authmode.Disabled meta := gen.APIMeta{ Auth: &gen.APIMetaAuth{ @@ -50,7 +51,7 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR AllowChangePassword: &u.config.Runtime.AllowChangePassword, ObservabilityEnabled: &observabilityEnabled, PrometheusServerEnabled: &prometheusServerEnabled, - NoAuthEnabled: &noAuthEnabled, + AuthDisabled: &authDisabled, } return gen.MetadataGet200JSONResponse(meta), nil diff --git a/api/v1/server/oas/gen/openapi.gen.go b/api/v1/server/oas/gen/openapi.gen.go index 125eecfaa0..60483f9059 100644 --- a/api/v1/server/oas/gen/openapi.gen.go +++ b/api/v1/server/oas/gen/openapi.gen.go @@ -425,8 +425,8 @@ type APIMeta struct { AllowSignup *bool `json:"allowSignup,omitempty"` Auth *APIMetaAuth `json:"auth,omitempty"` - // NoAuthEnabled whether or not authentication is disabled (local no-auth mode) on this instance - NoAuthEnabled *bool `json:"noAuthEnabled,omitempty"` + // AuthDisabled whether or not authentication is disabled (authdisabled build) on this instance + AuthDisabled *bool `json:"authDisabled,omitempty"` // ObservabilityEnabled whether or not observability (trace collection) is enabled on this instance ObservabilityEnabled *bool `json:"observabilityEnabled,omitempty"` @@ -17551,360 +17551,360 @@ var swaggerSpec = []string{ "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", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/build/package/servers.dockerfile b/build/package/servers.dockerfile index 5f3f1e0712..a1dcbb4c2e 100644 --- a/build/package/servers.dockerfile +++ b/build/package/servers.dockerfile @@ -44,6 +44,9 @@ ARG VERSION=v0.1.0-alpha.0 # can be set to "api", "engine", "admin" or "lite" ARG SERVER_TARGET +# optional go build tags, e.g. "authdisabled" for :dev images +ARG GO_BUILD_TAGS="" + # check if the target is empty or not set to api, engine, lite, or admin RUN if [ -z "$SERVER_TARGET" ] || [ "$SERVER_TARGET" != "api" ] && [ "$SERVER_TARGET" != "engine" ] && [ "$SERVER_TARGET" != "admin" ] && [ "$SERVER_TARGET" != "lite" ] && [ "$SERVER_TARGET" != "migrate" ]; then \ echo "SERVER_TARGET must be set to 'api', 'engine', 'admin', 'lite', or 'migrate'"; \ @@ -59,7 +62,7 @@ RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi. RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=$GOPATH/pkg/mod \ - go build -ldflags="-w -s -X 'main.Version=${VERSION}'" -a -o ./bin/hatchet-${SERVER_TARGET} ./cmd/hatchet-${SERVER_TARGET} + go build -tags="${GO_BUILD_TAGS}" -ldflags="-w -s -X 'main.Version=${VERSION}'" -a -o ./bin/hatchet-${SERVER_TARGET} ./cmd/hatchet-${SERVER_TARGET} # Deployment environment # ---------------------- diff --git a/cmd/hatchet-admin/cli/authdisabled.go b/cmd/hatchet-admin/cli/authdisabled.go new file mode 100644 index 0000000000..5caedc9128 --- /dev/null +++ b/cmd/hatchet-admin/cli/authdisabled.go @@ -0,0 +1,24 @@ +package cli + +import ( + "os" + + "github.com/spf13/cobra" + + "github.com/hatchet-dev/hatchet/pkg/authmode" +) + +var authDisabledCmd = &cobra.Command{ + Use: "authdisabled", + Short: "exit 0 if this is an authdisabled build, 1 otherwise", + Hidden: true, + Run: func(cmd *cobra.Command, args []string) { + if !authmode.Disabled { + os.Exit(1) + } + }, +} + +func init() { + rootCmd.AddCommand(authDisabledCmd) +} diff --git a/cmd/hatchet-admin/cli/keyset.go b/cmd/hatchet-admin/cli/keyset.go index 109d6ad6e5..01aac1f93b 100644 --- a/cmd/hatchet-admin/cli/keyset.go +++ b/cmd/hatchet-admin/cli/keyset.go @@ -14,7 +14,6 @@ var ( encryptionKeyDir string cloudKMSCredentialsPath string cloudKMSKeyURI string - keysetWithNoAuth bool ) var keysetCmd = &cobra.Command{ @@ -48,24 +47,10 @@ var keysetCreateCloudKMSJWTCmd = &cobra.Command{ }, } -var keysetCreateNoAuthKeysCmd = &cobra.Command{ - Use: "create-noauth-keys", - Short: "generate a no-auth JWT keyset from an existing local master key.", - Run: func(cmd *cobra.Command, args []string) { - err := runCreateNoAuthKeys() - - if err != nil { - log.Printf("Fatal: could not run [keyset create-noauth-keys] command: %v", err) - os.Exit(1) - } - }, -} - func init() { rootCmd.AddCommand(keysetCmd) keysetCmd.AddCommand(keysetCreateLocalKeysetsCmd) keysetCmd.AddCommand(keysetCreateCloudKMSJWTCmd) - keysetCmd.AddCommand(keysetCreateNoAuthKeysCmd) keysetCmd.PersistentFlags().StringVar( &encryptionKeyDir, @@ -87,13 +72,6 @@ func init() { "", "URI of the key in the CloudKMS repository", ) - - keysetCreateLocalKeysetsCmd.PersistentFlags().BoolVar( - &keysetWithNoAuth, - "no-auth", - false, - "also generate a dedicated JWT keyset for local no-auth mode", - ) } func runCreateLocalKeysets() error { @@ -128,12 +106,6 @@ func runCreateLocalKeysets() error { if err != nil { return err } - - if keysetWithNoAuth { - if err := writeNoAuthKeyset(masterKeyBytes); err != nil { - return err - } - } } else { fmt.Println("Master Key Bytes:") fmt.Println(string(masterKeyBytes)) @@ -146,53 +118,11 @@ func runCreateLocalKeysets() error { fmt.Println("Insecure Public Handle EC256 Keyset:") fmt.Println(string(insecurePublicHandleEc256)) - - if keysetWithNoAuth { - noAuthPrivate, noAuthPublic, _, genErr := encryption.GenerateJWTKeysets(masterKeyBytes) - - if genErr != nil { - return genErr - } - - fmt.Println("No-Auth Private EC256 Keyset:") - fmt.Println(string(noAuthPrivate)) - - fmt.Println("No-Auth Public EC256 Keyset:") - fmt.Println(string(noAuthPublic)) - } } return nil } -func runCreateNoAuthKeys() error { - if encryptionKeyDir == "" { - return fmt.Errorf("--key-dir is required") - } - - masterKeyBytes, err := os.ReadFile(encryptionKeyDir + "/master.key") - - if err != nil { - return fmt.Errorf("could not read master key: %w", err) - } - - return writeNoAuthKeyset(masterKeyBytes) -} - -func writeNoAuthKeyset(masterKeyBytes []byte) error { - privateEc256, publicEc256, _, err := encryption.GenerateJWTKeysets(masterKeyBytes) - - if err != nil { - return err - } - - if err := os.WriteFile(encryptionKeyDir+"/noauth_private_ec256.key", privateEc256, 0600); err != nil { - return err - } - - return os.WriteFile(encryptionKeyDir+"/noauth_public_ec256.key", publicEc256, 0600) -} - func runCreateCloudKMSJWTKeyset() error { if cloudKMSCredentialsPath == "" { return fmt.Errorf("missing required flag --credentials") diff --git a/cmd/hatchet-admin/cli/quickstart.go b/cmd/hatchet-admin/cli/quickstart.go index 1919e002de..a5b3247345 100644 --- a/cmd/hatchet-admin/cli/quickstart.go +++ b/cmd/hatchet-admin/cli/quickstart.go @@ -246,17 +246,6 @@ func generateKeys(generated *generatedConfigFiles) error { generated.sc.Encryption.JWT.PrivateJWTKeyset = string(privateEc256) generated.sc.Encryption.JWT.PublicJWTKeyset = string(publicEc256) } - - if generated.sc.Auth.NoAuthEnabled && (overwrite || generated.sc.Auth.NoAuthJWT.PrivateJWTKeyset == "" || generated.sc.Auth.NoAuthJWT.PublicJWTKeyset == "") { - noAuthPrivate, noAuthPublic, _, err := encryption.GenerateJWTKeysets([]byte(generated.sc.Encryption.MasterKeyset)) - - if err != nil { - return err - } - - generated.sc.Auth.NoAuthJWT.PrivateJWTKeyset = string(noAuthPrivate) - generated.sc.Auth.NoAuthJWT.PublicJWTKeyset = string(noAuthPublic) - } } // generate jwt keys diff --git a/cmd/hatchet-admin/cli/token.go b/cmd/hatchet-admin/cli/token.go index 35696e5c19..88314170ee 100644 --- a/cmd/hatchet-admin/cli/token.go +++ b/cmd/hatchet-admin/cli/token.go @@ -12,6 +12,7 @@ import ( "github.com/spf13/cobra" "github.com/hatchet-dev/hatchet/pkg/auth/token" + "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/loader" "github.com/hatchet-dev/hatchet/pkg/config/server" ) @@ -20,7 +21,6 @@ var ( tokenTenantIdStr string tokenName string expiresIn time.Duration - tokenNoAuth bool ) var tokenCmd = &cobra.Command{ @@ -66,13 +66,6 @@ func init() { 90*24*time.Hour, "Expiration duration for the API token", ) - - tokenCreateAPICmd.PersistentFlags().BoolVar( - &tokenNoAuth, - "no-auth", - false, - "sign the token with the no-auth keyset for the default tenant (local no-auth mode)", - ) } func runCreateAPIToken(expiresIn time.Duration) error { @@ -108,19 +101,14 @@ func runCreateAPIToken(expiresIn time.Duration) error { return err } - if tokenNoAuth { - // no-auth tokens are always scoped to the seed default tenant and signed by the no-auth keyset + if authmode.Disabled { + // authdisabled builds mint the default-tenant token signed by the embedded keyset tenantId, err = uuid.Parse(srv.Seed.DefaultTenantID) if err != nil { return err } - noAuthEncryptionSvc, encErr := loader.LoadNoAuthEncryptionSvc(cf) - if encErr != nil { - return encErr - } - - jwtManager, err = token.NewJWTManager(noAuthEncryptionSvc, srv.V1.APIToken(), &token.TokenOpts{ + jwtManager, err = token.NewJWTManagerFromKeysets(authmode.EmbeddedPrivateKeyset(), authmode.EmbeddedPublicKeyset(), srv.V1.APIToken(), &token.TokenOpts{ Issuer: cf.Runtime.ServerURL, Audience: cf.Runtime.ServerURL, GRPCBroadcastAddress: cf.Runtime.GRPCBroadcastAddress, diff --git a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go index 2d2d7a2d4d..c8c010f082 100644 --- a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go +++ b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go @@ -65,7 +65,6 @@ type HatchetLiteOpts struct { overrideGrpcPort int imageTag string pullPolicy pullPolicy - noAuthEnabled bool } func initDefaultHatchetLiteOpts() *HatchetLiteOpts { @@ -123,14 +122,6 @@ func WithPortsCallback(cb func(dashboardPort, grpcPort int)) HatchetLiteOpt { } } -// WithNoAuthMode disables authentication on the local server (local development only). -func WithNoAuthMode(enabled bool) HatchetLiteOpt { - return func(o *HatchetLiteOpts) error { - o.noAuthEnabled = enabled - return nil - } -} - // WithOverrideDashboardPort sets the override dashboard port func WithOverrideDashboardPort(port int) HatchetLiteOpt { return func(o *HatchetLiteOpts) error { @@ -440,10 +431,6 @@ func (d *DockerDriver) startHatchetLiteContainer(ctx context.Context, opts *Hatc "SERVER_INTERNAL_CLIENT_INTERNAL_GRPC_BROADCAST_ADDRESS=localhost:" + fmt.Sprintf("%d", hatchetInternalGrpcPort), } - if opts.noAuthEnabled { - env = append(env, "SERVER_AUTH_NO_AUTH_ENABLED=t") - } - containerConfig := &container.Config{ Image: imageName, Env: env, diff --git a/cmd/hatchet-cli/cli/internal/drivers/docker/token.go b/cmd/hatchet-cli/cli/internal/drivers/docker/token.go index 8167f11dba..25a827fd2b 100644 --- a/cmd/hatchet-cli/cli/internal/drivers/docker/token.go +++ b/cmd/hatchet-cli/cli/internal/drivers/docker/token.go @@ -16,21 +16,15 @@ const defaultTenantID = "707d0855-80ab-4e1f-a156-f1c4546cbf52" func (d *DockerDriver) createHatchetToken(ctx context.Context, hatchetLiteOpts *HatchetLiteOpts) (string, error) { containerName := canonicalContainerName(hatchetLiteOpts.projectName, hatchetLiteOpts.hatchetName) - cmd := []string{ - "./hatchet-admin", - "token", - "create", - "--config", "./config", - "--tenant-id", defaultTenantID, - "--expiresIn", (100 * 365 * 24 * time.Hour).String(), - } - - if hatchetLiteOpts.noAuthEnabled { - cmd = append(cmd, "--no-auth") - } - execConfig := container.ExecOptions{ - Cmd: cmd, + Cmd: []string{ + "./hatchet-admin", + "token", + "create", + "--config", "./config", + "--tenant-id", defaultTenantID, + "--expiresIn", (100 * 365 * 24 * time.Hour).String(), + }, AttachStdout: true, AttachStderr: true, } diff --git a/cmd/hatchet-cli/cli/server.go b/cmd/hatchet-cli/cli/server.go index bbc1770ca3..471f8433d9 100644 --- a/cmd/hatchet-cli/cli/server.go +++ b/cmd/hatchet-cli/cli/server.go @@ -40,10 +40,7 @@ var startCmd = &cobra.Command{ hatchet server start --pull-policy never # Only pull images if they are not already available locally - hatchet server start --pull-policy missing - - # Start server with authentication disabled (local development only) - hatchet server start --no-auth-mode`, + hatchet server start --pull-policy missing`, Run: func(cmd *cobra.Command, args []string) { // Get flag values dashboardPort, _ := cmd.Flags().GetInt("dashboard-port") @@ -52,14 +49,9 @@ var startCmd = &cobra.Command{ profileName, _ := cmd.Flags().GetString("profile") tag, _ := cmd.Flags().GetString("tag") pullPolicy, _ := cmd.Flags().GetString("pull-policy") - noAuthMode, _ := cmd.Flags().GetBool("no-auth-mode") opts := []docker.HatchetLiteOpt{} - if noAuthMode { - opts = append(opts, docker.WithNoAuthMode(true)) - } - if dashboardPort != 0 { opts = append(opts, docker.WithOverrideDashboardPort(dashboardPort)) } @@ -85,16 +77,8 @@ var startCmd = &cobra.Command{ cli.Logger.Fatalf("%v", err) } - additionalMessage := "" - if noAuthMode { - additionalMessage = fmt.Sprintf( - "No-auth mode is enabled (local development only).\nDefault API token for workers (HATCHET_CLIENT_TOKEN):\n%s", - result.Token, - ) - } - // Render styled output - fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, additionalMessage)) + fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, "")) }, } @@ -222,7 +206,6 @@ func init() { startCmd.Flags().StringP("profile", "n", "local", "Name for the local profile (default: local)") startCmd.Flags().StringP("tag", "t", "latest", `Image tag for the hatchet-lite container (e.g. "v0.83.1")`) startCmd.Flags().String("pull-policy", "always", `Image pull policy: "always", "missing", or "never"`) - startCmd.Flags().Bool("no-auth-mode", false, "Disable authentication for the local server (local development only, never use in production)") stopCmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") } diff --git a/frontend/app/src/components/layout/app-layout.tsx b/frontend/app/src/components/layout/app-layout.tsx index 5211b47d2f..cc2b30cfe6 100644 --- a/frontend/app/src/components/layout/app-layout.tsx +++ b/frontend/app/src/components/layout/app-layout.tsx @@ -6,7 +6,7 @@ type AppLayoutProps = { children: ReactNode; footer?: ReactNode; /** - * Rendered as a full-width strip above the header on every page (e.g. no-auth mode warning). + * Rendered as a full-width strip above the header on every page (e.g. authdisabled warning). */ banner?: ReactNode; /** diff --git a/frontend/app/src/components/layout/no-auth-banner.tsx b/frontend/app/src/components/layout/auth-disabled-banner.tsx similarity index 80% rename from frontend/app/src/components/layout/no-auth-banner.tsx rename to frontend/app/src/components/layout/auth-disabled-banner.tsx index 9eb3e6923f..40dc716f54 100644 --- a/frontend/app/src/components/layout/no-auth-banner.tsx +++ b/frontend/app/src/components/layout/auth-disabled-banner.tsx @@ -1,13 +1,13 @@ import { ExclamationTriangleIcon } from '@heroicons/react/24/outline'; -export function NoAuthBanner() { +export function AuthDisabledBanner() { return (
- Heads up: local no-auth mode is on, so there's no sign-in and every + Heads up: authentication is disabled, so there's no sign-in and every request acts as the default admin. Great for local development, but please don't use it in production.
diff --git a/frontend/app/src/lib/api/generated/data-contracts.ts b/frontend/app/src/lib/api/generated/data-contracts.ts index 464380db76..2c83899581 100644 --- a/frontend/app/src/lib/api/generated/data-contracts.ts +++ b/frontend/app/src/lib/api/generated/data-contracts.ts @@ -1306,10 +1306,10 @@ export interface APIMeta { */ prometheusServerEnabled?: boolean; /** - * whether or not authentication is disabled (local no-auth mode) on this instance + * whether or not authentication is disabled (authdisabled build) on this instance * @example false */ - noAuthEnabled?: boolean; + authDisabled?: boolean; } export interface APIMetaIntegration { diff --git a/frontend/app/src/pages/authenticated.tsx b/frontend/app/src/pages/authenticated.tsx index 767e0b32d9..54861f77e5 100644 --- a/frontend/app/src/pages/authenticated.tsx +++ b/frontend/app/src/pages/authenticated.tsx @@ -1,7 +1,7 @@ import { getCloudMetadataQuery } from '../hooks/use-cloud.ts'; import { NewTenantSaverForm } from '@/components/forms/new-tenant-saver-form'; import { AppLayout } from '@/components/layout/app-layout'; -import { NoAuthBanner } from '@/components/layout/no-auth-banner'; +import { AuthDisabledBanner } from '@/components/layout/auth-disabled-banner'; import { AddOrgMemberToTenantModal } from '@/components/modals/add-org-member-to-tenant-modal'; import { CreateTenantInviteModal } from '@/components/modals/create-tenant-invite-modal'; import { InviteModal } from '@/components/modals/invite-modal'; @@ -553,8 +553,8 @@ function AuthenticatedInner() { + meta && 'authDisabled' in meta && meta.authDisabled ? ( + ) : undefined } header={ diff --git a/frontend/docs/pages/self-hosting/_meta.js b/frontend/docs/pages/self-hosting/_meta.js index d37effb8ef..fab6abbcd3 100644 --- a/frontend/docs/pages/self-hosting/_meta.js +++ b/frontend/docs/pages/self-hosting/_meta.js @@ -20,7 +20,7 @@ export default { title: "Managing Hatchet", }, "configuration-options": "Engine Configuration Options", - "local-no-auth": "Local No-Auth Mode", + "local-no-auth": "Auth-Disabled Dev Images", "using-pgbouncer": "Using PgBouncer", "prometheus-metrics": { title: "Prometheus Metrics", diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index f505e333da..1e814362f7 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -1,54 +1,44 @@ import { Callout } from "nextra/components"; -# Local No-Auth Mode +# Auth-disabled (dev) images -No-auth mode lets you run a local Hatchet instance without signing in to the dashboard or minting your own API token. It is intended purely for local development. +Hatchet publishes a set of `:dev` images built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the `:dev` images — it cannot be turned on by configuration, and the regular (versioned) images can never disable authentication. - No-auth mode should strictly be used for local development and testing. Please - don't enable this on a production system which can be accessed by untrusted - clients. + The `:dev` images are for local development and testing only. Never run them on + a system reachable by untrusted clients. -## What it does +## What the `:dev` images do - **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). - **REST API** calls succeed without a bearer token or session cookie. - **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). +- The dashboard shows a persistent banner and the server logs a warning while authentication is disabled. ## Workers still use an API token -The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. No-auth mode provides a default token so you don't have to create one: +The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The `:dev` images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: -- The token is signed by a dedicated no-auth keyset, separate from the instance's main keyset. The server only trusts this keyset when no-auth mode is enabled, so the default token is inert on any instance that hasn't loaded it. -- It is scoped to the seed default tenant. +- The keyset is embedded (via `go:embed`) only in `:dev` builds. The regular images never compile it in, so the default token is inert against any normal deployment. +- The token is scoped to the seed default tenant. Point your worker at it via `HATCHET_CLIENT_TOKEN`. -## Enabling it +## Running it -### Hatchet CLI +Use the `:dev` tag of the image you'd normally run — e.g. `hatchet-lite`: ```sh -hatchet server start --no-auth-mode +docker run ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev ``` -This prints the default token to use as `HATCHET_CLIENT_TOKEN`. - -### Hatchet Lite - -When running the `hatchet-lite` image, set `SERVER_AUTH_NO_AUTH_ENABLED=true`: +On startup the container mints the default worker token and prints it, and also writes it to the config volume. Grab it from the logs or the volume: ```sh -docker run -e SERVER_AUTH_NO_AUTH_ENABLED=true ... ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest -``` - -On startup the container generates the no-auth keyset and mints the default worker token. Grab it either from the container logs or from the config volume: - -```sh -docker logs # printed under "no-auth mode: worker API token" +docker logs # printed under "authdisabled build: worker API token" # or -docker exec cat ./config/noauth-token +docker exec cat ./config/authdisabled-token ``` Then point your worker at it: @@ -57,31 +47,15 @@ Then point your worker at it: export HATCHET_CLIENT_TOKEN="" ``` -The token has the server address baked in, so no other client configuration is needed. +The `hatchet-api` / `hatchet-engine` images have `:dev` variants too; the Hatchet CLI can run the dev stack with `hatchet server start --tag dev`. -### Docker Compose +## Building it yourself -Set on the API and engine: +The `:dev` images are the regular Docker builds with the `authdisabled` Go build tag: ```sh -SERVER_AUTH_NO_AUTH_ENABLED=true -SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET_FILE=/path/to/noauth_private_ec256.key -SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET_FILE=/path/to/noauth_public_ec256.key +docker build -f build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=api \ + --build-arg GO_BUILD_TAGS=authdisabled \ + . ``` - -Generate the no-auth keyset alongside your local keys, then mint the default token: - -```sh -# generate the keyset (add --no-auth to create-local-keys, or from an existing master key) -hatchet-admin keyset --key-dir /path/to/keys create-local-keys --no-auth -hatchet-admin keyset --key-dir /path/to/keys create-noauth-keys - -# mint the default token for the seed default tenant -hatchet-admin token create --no-auth -``` - -## Key security awareness implementations - -- Defaults to **off**; must be explicitly enabled. -- The no-auth keyset is generated per instance and trusted only when no-auth mode is on, so the default token cannot authenticate against a normal deployment. -- The server logs a prominent warning on startup, and the dashboard shows a persistent banner, while it is active. diff --git a/hack/lite/start.sh b/hack/lite/start.sh index f8f1d7a8af..15164529cd 100644 --- a/hack/lite/start.sh +++ b/hack/lite/start.sh @@ -10,14 +10,14 @@ fi # Generate config files ./hatchet-admin quickstart --skip certs --generated-config-dir ./config --overwrite=false -# In no-auth mode, mint and surface the default worker token -if [ "$SERVER_AUTH_NO_AUTH_ENABLED" = "true" ] || [ "$SERVER_AUTH_NO_AUTH_ENABLED" = "t" ]; then - if [ ! -s ./config/noauth-token ]; then - ./hatchet-admin token create --config ./config --no-auth --name noauth-default > ./config/noauth-token +# In authdisabled (:dev) builds, mint and surface the default worker token +if ./hatchet-admin authdisabled; then + if [ ! -s ./config/authdisabled-token ]; then + ./hatchet-admin token create --config ./config --name authdisabled-default > ./config/authdisabled-token fi - echo "=================== no-auth mode: worker API token ===================" - echo "Set HATCHET_CLIENT_TOKEN to the value below (also at ./config/noauth-token):" - cat ./config/noauth-token + echo "================ authdisabled build: worker API token ===============" + echo "Set HATCHET_CLIENT_TOKEN to the value below (also at ./config/authdisabled-token):" + cat ./config/authdisabled-token echo echo "=====================================================================" fi diff --git a/pkg/auth/token/token.go b/pkg/auth/token/token.go index 4e8eee4867..94df7dbcbc 100644 --- a/pkg/auth/token/token.go +++ b/pkg/auth/token/token.go @@ -7,6 +7,7 @@ import ( "github.com/google/uuid" "github.com/tink-crypto/tink-go/jwt" + "github.com/tink-crypto/tink-go/keyset" "github.com/hatchet-dev/hatchet/pkg/encryption" v1 "github.com/hatchet-dev/hatchet/pkg/repository" @@ -25,41 +26,71 @@ type TokenOpts struct { } type jwtManagerImpl struct { - encryption encryption.EncryptionService - opts *TokenOpts - tokenRepo v1.APITokenRepository - verifier jwt.Verifier - // noAuthVerifier verifies the default local no-auth token, signed by a separate keyset. - noAuthVerifier jwt.Verifier + privateHandle *keyset.Handle + opts *TokenOpts + tokenRepo v1.APITokenRepository + verifier jwt.Verifier + // authDisabledVerifier verifies the default token signed by the embedded authdisabled keyset. + authDisabledVerifier jwt.Verifier } type JWTManagerOpt func(*jwtManagerImpl) error -func WithNoAuthVerifier(noAuthEncryptionSvc encryption.EncryptionService) JWTManagerOpt { +// WithAuthDisabledVerifier additionally trusts tokens signed by the given (embedded authdisabled) +// public keyset. Only used in authdisabled builds. +func WithAuthDisabledVerifier(publicKeyset []byte) JWTManagerOpt { return func(j *jwtManagerImpl) error { - verifier, err := jwt.NewVerifier(noAuthEncryptionSvc.GetPublicJWTHandle()) + handle, err := encryption.InsecureHandleFromBytes(publicKeyset) if err != nil { - return fmt.Errorf("failed to create no-auth JWT Verifier: %v", err) + return fmt.Errorf("failed to read authdisabled public keyset: %v", err) } - j.noAuthVerifier = verifier + verifier, err := jwt.NewVerifier(handle) + + if err != nil { + return fmt.Errorf("failed to create authdisabled JWT Verifier: %v", err) + } + + j.authDisabledVerifier = verifier return nil } } func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { - verifier, err := jwt.NewVerifier(encryptionSvc.GetPublicJWTHandle()) + return newJWTManager(encryptionSvc.GetPrivateJWTHandle(), encryptionSvc.GetPublicJWTHandle(), tokenRepo, opts, mgrOpts...) +} + +// NewJWTManagerFromKeysets builds a JWTManager directly from cleartext JWT keysets, used to sign +// the default token with the embedded authdisabled keyset. +func NewJWTManagerFromKeysets(privateKeyset, publicKeyset []byte, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { + privateHandle, err := encryption.InsecureHandleFromBytes(privateKeyset) + + if err != nil { + return nil, fmt.Errorf("failed to read private keyset: %v", err) + } + + publicHandle, err := encryption.InsecureHandleFromBytes(publicKeyset) + + if err != nil { + return nil, fmt.Errorf("failed to read public keyset: %v", err) + } + + return newJWTManager(privateHandle, publicHandle, tokenRepo, opts, mgrOpts...) +} + +func newJWTManager(privateHandle, publicHandle *keyset.Handle, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { + verifier, err := jwt.NewVerifier(publicHandle) if err != nil { return nil, fmt.Errorf("failed to create JWT Verifier: %v", err) } m := &jwtManagerImpl{ - encryption: encryptionSvc, - opts: opts, - tokenRepo: tokenRepo, - verifier: verifier, + privateHandle: privateHandle, + opts: opts, + tokenRepo: tokenRepo, + verifier: verifier, } for _, opt := range mgrOpts { @@ -79,7 +110,7 @@ type Token struct { func (j *jwtManagerImpl) createToken(ctx context.Context, tenantId uuid.UUID, name string, id *uuid.UUID, expires *time.Time) (*Token, error) { // Retrieve the JWT Signer primitive from privateKeysetHandle. - signer, err := jwt.NewSigner(j.encryption.GetPrivateJWTHandle()) + signer, err := jwt.NewSigner(j.privateHandle) if err != nil { return nil, fmt.Errorf("failed to create JWT Signer: %v", err) @@ -144,8 +175,8 @@ func (j *jwtManagerImpl) ValidateTenantToken(ctx context.Context, token string) verifiedJwt, err := j.verifier.VerifyAndDecode(token, validator) - if err != nil && j.noAuthVerifier != nil { - verifiedJwt, err = j.noAuthVerifier.VerifyAndDecode(token, validator) + if err != nil && j.authDisabledVerifier != nil { + verifiedJwt, err = j.authDisabledVerifier.VerifyAndDecode(token, validator) } if err != nil { diff --git a/pkg/auth/token/token_noauth_test.go b/pkg/auth/token/token_authdisabled_test.go similarity index 69% rename from pkg/auth/token/token_noauth_test.go rename to pkg/auth/token/token_authdisabled_test.go index 61167eb6c5..8990199bf2 100644 --- a/pkg/auth/token/token_noauth_test.go +++ b/pkg/auth/token/token_authdisabled_test.go @@ -40,43 +40,40 @@ func (s *stubAPITokenRepository) DeleteAPIToken(ctx context.Context, tenantId, i return nil } -func TestNoAuthTokenTrustedOnlyWithVerifier(t *testing.T) { +func TestAuthDisabledTokenTrustedOnlyWithVerifier(t *testing.T) { master, mainPriv, mainPub, _, err := encryption.GenerateLocalKeys() require.NoError(t, err) - noAuthPriv, noAuthPub, _, err := encryption.GenerateJWTKeysets(master) + adPriv, adPub, err := encryption.GenerateInsecureJWTKeyset() require.NoError(t, err) mainEnc, err := encryption.NewLocalEncryption(master, mainPriv, mainPub) require.NoError(t, err) - noAuthEnc, err := encryption.NewLocalEncryption(master, noAuthPriv, noAuthPub) - require.NoError(t, err) - repo := &stubAPITokenRepository{} opts := &token.TokenOpts{Issuer: "hatchet", Audience: "hatchet", ServerURL: "http://localhost:8080"} - mgrWithNoAuth, err := token.NewJWTManager(mainEnc, repo, opts, token.WithNoAuthVerifier(noAuthEnc)) + mgrWithAuthDisabled, err := token.NewJWTManager(mainEnc, repo, opts, token.WithAuthDisabledVerifier(adPub)) require.NoError(t, err) mgrPlain, err := token.NewJWTManager(mainEnc, repo, opts) require.NoError(t, err) - noAuthMinter, err := token.NewJWTManager(noAuthEnc, repo, opts) + minter, err := token.NewJWTManagerFromKeysets(adPriv, adPub, repo, opts) require.NoError(t, err) ctx := context.Background() tenantID := uuid.New() - noAuthTok, err := noAuthMinter.GenerateTenantToken(ctx, tenantID, "noauth", false, nil) + adTok, err := minter.GenerateTenantToken(ctx, tenantID, "authdisabled", false, nil) require.NoError(t, err) - gotTenant, _, err := mgrWithNoAuth.ValidateTenantToken(ctx, noAuthTok.Token) - assert.NoError(t, err, "no-auth token should validate when the no-auth verifier is loaded") + gotTenant, _, err := mgrWithAuthDisabled.ValidateTenantToken(ctx, adTok.Token) + assert.NoError(t, err, "embedded-keyset token should validate in an authdisabled build") assert.Equal(t, tenantID, gotTenant) - _, _, err = mgrPlain.ValidateTenantToken(ctx, noAuthTok.Token) - assert.Error(t, err, "no-auth token must be rejected without the no-auth verifier") + _, _, err = mgrPlain.ValidateTenantToken(ctx, adTok.Token) + assert.Error(t, err, "embedded-keyset token must be rejected without the authdisabled verifier") mainTok, err := mgrPlain.GenerateTenantToken(ctx, tenantID, "main", false, nil) require.NoError(t, err) @@ -84,6 +81,6 @@ func TestNoAuthTokenTrustedOnlyWithVerifier(t *testing.T) { _, _, err = mgrPlain.ValidateTenantToken(ctx, mainTok.Token) assert.NoError(t, err, "main token should validate on a plain manager") - _, _, err = mgrWithNoAuth.ValidateTenantToken(ctx, mainTok.Token) - assert.NoError(t, err, "main token should validate on a no-auth manager") + _, _, err = mgrWithAuthDisabled.ValidateTenantToken(ctx, mainTok.Token) + assert.NoError(t, err, "main token should validate on an authdisabled manager") } diff --git a/pkg/authmode/disabled.go b/pkg/authmode/disabled.go new file mode 100644 index 0000000000..4977a37deb --- /dev/null +++ b/pkg/authmode/disabled.go @@ -0,0 +1,9 @@ +//go:build !authdisabled + +package authmode + +const Disabled = false + +func EmbeddedPrivateKeyset() []byte { return nil } + +func EmbeddedPublicKeyset() []byte { return nil } diff --git a/pkg/authmode/enabled.go b/pkg/authmode/enabled.go new file mode 100644 index 0000000000..5492078499 --- /dev/null +++ b/pkg/authmode/enabled.go @@ -0,0 +1,19 @@ +//go:build authdisabled + +package authmode + +import _ "embed" + +// Disabled reports whether this binary was built with authentication disabled (the `authdisabled` +// build tag). Only `:dev` images are built this way; production builds have Disabled == false. +const Disabled = true + +//go:embed keyset/private_ec256.key +var privateKeyset []byte + +//go:embed keyset/public_ec256.key +var publicKeyset []byte + +func EmbeddedPrivateKeyset() []byte { return privateKeyset } + +func EmbeddedPublicKeyset() []byte { return publicKeyset } diff --git a/pkg/client/rest/gen.go b/pkg/client/rest/gen.go index f36d658de7..65766df6f8 100644 --- a/pkg/client/rest/gen.go +++ b/pkg/client/rest/gen.go @@ -422,8 +422,8 @@ type APIMeta struct { AllowSignup *bool `json:"allowSignup,omitempty"` Auth *APIMetaAuth `json:"auth,omitempty"` - // NoAuthEnabled whether or not authentication is disabled (local no-auth mode) on this instance - NoAuthEnabled *bool `json:"noAuthEnabled,omitempty"` + // AuthDisabled whether or not authentication is disabled (authdisabled build) on this instance + AuthDisabled *bool `json:"authDisabled,omitempty"` // ObservabilityEnabled whether or not observability (trace collection) is enabled on this instance ObservabilityEnabled *bool `json:"observabilityEnabled,omitempty"` diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index a0f674ff78..5c8a3227c6 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -30,6 +30,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/auth/exchangetoken" "github.com/hatchet-dev/hatchet/pkg/auth/oauth" "github.com/hatchet-dev/hatchet/pkg/auth/token" + "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/client" "github.com/hatchet-dev/hatchet/pkg/config/database" "github.com/hatchet-dev/hatchet/pkg/config/loader/loaderutils" @@ -640,14 +641,13 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers auth := server.AuthConfig{ RestrictedEmailDomains: getStrArr(cf.Auth.RestrictedEmailDomains), ConfigFile: cf.Auth, - NoAuthEnabled: cf.Auth.NoAuthEnabled, } - if auth.NoAuthEnabled { - l.Warn().Msg("SERVER_AUTH_NO_AUTH_ENABLED is set: dashboard/REST authentication is DISABLED and runs as the seed admin user. Never enable this in production.") - } + if authmode.Disabled { + l.Warn().Msg("This is an authdisabled build: dashboard/REST authentication is DISABLED and runs as the seed admin user. Never use this in production.") - applyNoAuthConfigOverrides(cf) + applyAuthDisabledOverrides(&cf.Runtime) + } if cf.Auth.Google.Enabled { if cf.Auth.Google.ClientID == "" { @@ -694,14 +694,8 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers // create a new JWT manager var jwtManagerOpts []token.JWTManagerOpt - if cf.Auth.NoAuthEnabled { - noAuthEncryptionSvc, noAuthErr := LoadNoAuthEncryptionSvc(cf) - - if noAuthErr != nil { - return nil, nil, fmt.Errorf("could not load no-auth encryption service: %w", noAuthErr) - } - - jwtManagerOpts = append(jwtManagerOpts, token.WithNoAuthVerifier(noAuthEncryptionSvc)) + if authmode.Disabled { + jwtManagerOpts = append(jwtManagerOpts, token.WithAuthDisabledVerifier(authmode.EmbeddedPublicKeyset())) } auth.JWTManager, err = token.NewJWTManager(encryptionSvc, dc.V1.APIToken(), &token.TokenOpts{ @@ -1009,65 +1003,10 @@ func LoadEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionServic return encryptionSvc, nil } -func applyNoAuthConfigOverrides(cf *server.ServerConfigFile) { - if !cf.Auth.NoAuthEnabled { - return - } - - cf.Runtime.AllowCreateTenant = false - cf.Runtime.AllowSignup = false - cf.Runtime.AllowInvites = false -} - -func LoadNoAuthEncryptionSvc(cf *server.ServerConfigFile) (encryption.EncryptionService, error) { - if cf.Encryption.MasterKeyset == "" && cf.Encryption.MasterKeysetFile == "" { - return nil, fmt.Errorf("no-auth mode requires a local master keyset") - } - - masterKeyset := cf.Encryption.MasterKeyset - - if cf.Encryption.MasterKeysetFile != "" { - masterKeysetBytes, err := loaderutils.GetFileBytes(cf.Encryption.MasterKeysetFile) - - if err != nil { - return nil, fmt.Errorf("could not load master keyset file: %w", err) - } - - masterKeyset = string(masterKeysetBytes) - } - - hasKeys := (cf.Auth.NoAuthJWT.PublicJWTKeyset != "" || cf.Auth.NoAuthJWT.PublicJWTKeysetFile != "") && - (cf.Auth.NoAuthJWT.PrivateJWTKeyset != "" || cf.Auth.NoAuthJWT.PrivateJWTKeysetFile != "") - - if !hasKeys { - return nil, fmt.Errorf("no-auth mode requires a no-auth JWT keyset (set SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET[_FILE] and SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET[_FILE])") - } - - privateJWT := cf.Auth.NoAuthJWT.PrivateJWTKeyset - - if cf.Auth.NoAuthJWT.PrivateJWTKeysetFile != "" { - privateJWTBytes, err := loaderutils.GetFileBytes(cf.Auth.NoAuthJWT.PrivateJWTKeysetFile) - - if err != nil { - return nil, fmt.Errorf("could not load no-auth private jwt keyset file: %w", err) - } - - privateJWT = string(privateJWTBytes) - } - - publicJWT := cf.Auth.NoAuthJWT.PublicJWTKeyset - - if cf.Auth.NoAuthJWT.PublicJWTKeysetFile != "" { - publicJWTBytes, err := loaderutils.GetFileBytes(cf.Auth.NoAuthJWT.PublicJWTKeysetFile) - - if err != nil { - return nil, fmt.Errorf("could not load no-auth public jwt keyset file: %w", err) - } - - publicJWT = string(publicJWTBytes) - } - - return encryption.NewLocalEncryption([]byte(masterKeyset), []byte(privateJWT), []byte(publicJWT)) +func applyAuthDisabledOverrides(rt *server.ConfigFileRuntime) { + rt.AllowCreateTenant = false + rt.AllowSignup = false + rt.AllowInvites = false } func loadInternalClient(l *zerolog.Logger, conf *server.InternalClientTLSConfigFile, baseServerTLS shared.TLSConfigFile, grpcBroadcastAddress string, grpcInsecure bool) (*clientv1.GRPCClientFactory, error) { diff --git a/pkg/config/loader/loader_authdisabled_test.go b/pkg/config/loader/loader_authdisabled_test.go new file mode 100644 index 0000000000..b9d625c4c3 --- /dev/null +++ b/pkg/config/loader/loader_authdisabled_test.go @@ -0,0 +1,25 @@ +//go:build !e2e && !load && !rampup && !integration + +package loader + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/hatchet-dev/hatchet/pkg/config/server" +) + +func TestApplyAuthDisabledOverrides(t *testing.T) { + rt := &server.ConfigFileRuntime{ + AllowCreateTenant: true, + AllowSignup: true, + AllowInvites: true, + } + + applyAuthDisabledOverrides(rt) + + assert.False(t, rt.AllowCreateTenant, "authdisabled must disable tenant creation") + assert.False(t, rt.AllowSignup, "authdisabled must disable signup") + assert.False(t, rt.AllowInvites, "authdisabled must disable invites") +} diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index 54fd377982..f4aaf91a7b 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -454,14 +454,6 @@ type ConfigFileAuth struct { // SetEmailVerified controls whether the user's email is automatically set to verified SetEmailVerified bool `mapstructure:"setEmailVerified" json:"setEmailVerified,omitempty" default:"false"` - // NoAuthEnabled disables dashboard/REST authentication (local development only). Workers still - // use an API token over gRPC; the default no-auth token is signed by NoAuthJWT. - NoAuthEnabled bool `mapstructure:"noAuthEnabled" json:"noAuthEnabled,omitempty" default:"false"` - - // NoAuthJWT signs and verifies the default no-auth token. Trusted only when NoAuthEnabled is set, - // so the default token is inert on instances that do not load this keyset. - NoAuthJWT ConfigFileAuthNoAuthJWT `mapstructure:"noAuthJWT" json:"noAuthJWT,omitempty"` - // Configuration options for the cookie Cookie ConfigFileAuthCookie `mapstructure:"cookie" json:"cookie,omitempty"` @@ -472,14 +464,6 @@ type ConfigFileAuth struct { ControlPlaneExchangeTokenConfig ConfigFileAuthControlPlaneExchangeToken `mapstructure:"controlPlaneExchangeToken" json:"controlPlaneExchangeToken,omitempty"` } -// ConfigFileAuthNoAuthJWT holds the dedicated no-auth JWT keyset (base64 raw-encoded JSON, master-encrypted). -type ConfigFileAuthNoAuthJWT struct { - PublicJWTKeyset string `mapstructure:"publicJWTKeyset" json:"publicJWTKeyset,omitempty"` - PublicJWTKeysetFile string `mapstructure:"publicJWTKeysetFile" json:"publicJWTKeysetFile,omitempty"` - PrivateJWTKeyset string `mapstructure:"privateJWTKeyset" json:"privateJWTKeyset,omitempty"` - PrivateJWTKeysetFile string `mapstructure:"privateJWTKeysetFile" json:"privateJWTKeysetFile,omitempty"` -} - type ConfigFileAuthControlPlaneExchangeToken struct { // JWTPublicKeyset and JWTPublicKeysetFile must contain a base64 raw-encoded (no padding) // JSON keyset as produced by the Tink library. These are passed to @@ -633,10 +617,6 @@ type AuthConfig struct { CustomAuthenticator CustomAuthenticator - // NoAuthEnabled, when true, disables API/UI authentication and resolves every request to the - // seed admin user. - NoAuthEnabled bool - // Operations listed here bypass the tenant RBAC check. Use this for // extension operations (e.g. cloud) that handle their own authorization // in handlers. OSS operations in rbac.yaml are still fully checked. @@ -873,11 +853,6 @@ func BindAllEnv(v *viper.Viper) { _ = v.BindEnv("auth.restrictedEmailDomains", "SERVER_AUTH_RESTRICTED_EMAIL_DOMAINS") _ = v.BindEnv("auth.basicAuthEnabled", "SERVER_AUTH_BASIC_AUTH_ENABLED") _ = v.BindEnv("auth.setEmailVerified", "SERVER_AUTH_SET_EMAIL_VERIFIED") - _ = v.BindEnv("auth.noAuthEnabled", "SERVER_AUTH_NO_AUTH_ENABLED") - _ = v.BindEnv("auth.noAuthJWT.publicJWTKeyset", "SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET") - _ = v.BindEnv("auth.noAuthJWT.publicJWTKeysetFile", "SERVER_AUTH_NO_AUTH_JWT_PUBLIC_KEYSET_FILE") - _ = v.BindEnv("auth.noAuthJWT.privateJWTKeyset", "SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET") - _ = v.BindEnv("auth.noAuthJWT.privateJWTKeysetFile", "SERVER_AUTH_NO_AUTH_JWT_PRIVATE_KEYSET_FILE") _ = v.BindEnv("auth.cookie.name", "SERVER_AUTH_COOKIE_NAME") _ = v.BindEnv("auth.cookie.domain", "SERVER_AUTH_COOKIE_DOMAIN") _ = v.BindEnv("auth.cookie.secrets", "SERVER_AUTH_COOKIE_SECRETS") diff --git a/pkg/encryption/local.go b/pkg/encryption/local.go index bee850f9b2..1e5d0e3676 100644 --- a/pkg/encryption/local.go +++ b/pkg/encryption/local.go @@ -81,21 +81,34 @@ func GenerateLocalKeys() (masterKey []byte, privateEc256 []byte, publicEc256 []b return masterKey, privateEc256, publicEc256, insecurePublicHandleEc256, nil } -// GenerateJWTKeysets creates a new JWT keyset encrypted with an existing master key. -func GenerateJWTKeysets(masterKey []byte) (privateEc256 []byte, publicEc256 []byte, insecurePublicHandleEc256 []byte, err error) { - masterHandle, err := InsecureHandleFromBytes(masterKey) +// GenerateInsecureJWTKeyset creates a cleartext (unencrypted) ES256 JWT keyset. Only for the +// committed authdisabled keyset, which is embedded into dev builds and never used in production. +func GenerateInsecureJWTKeyset() (privateEc256 []byte, publicEc256 []byte, err error) { + privateHandle, err := keyset.NewHandle(jwt.ES256Template()) if err != nil { - return + return nil, nil, fmt.Errorf("failed to create new keyset handle with ES256 template: %w", err) } - a, err := aead.New(masterHandle) + privateEc256, err = insecureBytesFromHandle(privateHandle) if err != nil { - return + return nil, nil, err + } + + publicHandle, err := privateHandle.Public() + + if err != nil { + return nil, nil, fmt.Errorf("failed to get public keyset: %w", err) + } + + publicEc256, err = insecureBytesFromHandle(publicHandle) + + if err != nil { + return nil, nil, err } - return generateJWTKeysets(a) + return privateEc256, publicEc256, nil } func generateLocalMasterKey() ([]byte, *keyset.Handle, error) { From a2621cf3bacfdc6405e62b30121228bf59b4ee39 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 22:38:46 +0200 Subject: [PATCH 15/48] dev image --- .github/workflows/pre-release.yaml | 80 ++++++++-------- .github/workflows/release.yaml | 12 +++ .../internal/drivers/docker/hatchet_lite.go | 15 ++- cmd/hatchet-cli/cli/server.go | 96 ++++++++++++------- .../docs/pages/self-hosting/local-no-auth.mdx | 12 ++- 5 files changed, 134 insertions(+), 81 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 675e6061ec..03f07a0812 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -29,7 +29,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 \ --build-arg SERVER_TARGET=api \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -38,7 +38,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 build-push-hatchet-api-arm: name: hatchet-api runs-on: hatchet-arm64-2 @@ -64,7 +64,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 \ --build-arg SERVER_TARGET=api \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -73,7 +73,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-arm64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 build-push-hatchet-api: name: Combine hatchet-api runs-on: ubuntu-latest @@ -103,12 +103,12 @@ jobs: docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} - name: Combine :dev run: | - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 - docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-api:dev \ - ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-amd64 \ - ghcr.io/hatchet-dev/hatchet/hatchet-api:dev-arm64 - docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api:dev + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}} \ + ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}} build-push-hatchet-admin-amd: name: hatchet-admin runs-on: ubuntu-latest @@ -134,7 +134,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 \ --build-arg SERVER_TARGET=admin \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -143,7 +143,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 build-push-hatchet-admin-arm: name: hatchet-admin runs-on: hatchet-arm64-2 @@ -169,7 +169,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 \ --build-arg SERVER_TARGET=admin \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -178,7 +178,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-arm64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 build-push-hatchet-admin: name: Combine hatchet-admin runs-on: ubuntu-latest @@ -208,12 +208,12 @@ jobs: docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}} - name: Combine :dev run: | - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 - docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev \ - ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-amd64 \ - ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev-arm64 - docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin:dev + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}} \ + ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}} build-push-hatchet-engine-amd: name: hatchet-engine runs-on: ubuntu-latest @@ -239,7 +239,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 \ --build-arg SERVER_TARGET=engine \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -248,7 +248,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-amd64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 build-push-hatchet-engine-arm: name: hatchet-engine runs-on: hatchet-arm64-2 @@ -274,7 +274,7 @@ jobs: - name: Build authdisabled (:dev) run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 \ --build-arg SERVER_TARGET=engine \ --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --build-arg GO_BUILD_TAGS=authdisabled \ @@ -283,7 +283,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-arm64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 build-push-hatchet-engine: name: Combine hatchet-engine runs-on: ubuntu-latest @@ -313,12 +313,12 @@ jobs: docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} - name: Combine :dev run: | - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 - docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev \ - ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-amd64 \ - ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev-arm64 - docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine:dev + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}} \ + ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}} build-push-hatchet-migrate-amd: name: hatchet-migrate runs-on: ubuntu-latest @@ -558,7 +558,7 @@ jobs: wait DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-amd64 \ --platform linux/amd64 \ --build-arg HATCHET_LITE_IMAGE=hatchet-lite-dev-tmp:amd64 \ --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-dev-tmp:amd64 \ @@ -567,7 +567,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-amd64 build-push-hatchet-lite-arm: name: hatchet-lite-arm runs-on: hatchet-arm64-2 @@ -645,7 +645,7 @@ jobs: wait DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-arm64 \ --platform linux/arm64 \ --build-arg HATCHET_LITE_IMAGE=hatchet-lite-dev-tmp:arm64 \ --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-dev-tmp:arm64 \ @@ -654,7 +654,7 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 - docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-arm64 combine-hatchet-lite: name: Combine hatchet-lite runs-on: ubuntu-latest @@ -684,12 +684,12 @@ jobs: docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}} - name: Combine :dev run: | - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 - docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 - docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev \ - ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-amd64 \ - ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev-arm64 - docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}} \ + ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}} build-push-hatchet-dashboard-amd: name: hatchet-dashboard-amd runs-on: ubuntu-latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 58687f30b2..5ab175a9f3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -150,6 +150,18 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest + - name: Pull and push authdisabled (:dev) images + run: | + for img in hatchet-api hatchet-engine hatchet-admin hatchet-lite; do + docker pull ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker pull ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-amd64 + + docker manifest create ghcr.io/hatchet-dev/hatchet/$img-dev:latest \ + ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-arm64 + + docker manifest push ghcr.io/hatchet-dev/hatchet/$img-dev:latest + done - name: Pull and push hatchet-dashboard run: | docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64 diff --git a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go index c8c010f082..8256f35e22 100644 --- a/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go +++ b/cmd/hatchet-cli/cli/internal/drivers/docker/hatchet_lite.go @@ -52,6 +52,9 @@ const ( startingGrpcPort = 7077 hatchetInternalDashboardPort = 8888 hatchetInternalGrpcPort = 7077 + + defaultLiteImageRepo = "ghcr.io/hatchet-dev/hatchet/hatchet-lite" + devLiteImageRepo = "ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev" ) type HatchetLiteOpts struct { @@ -63,6 +66,7 @@ type HatchetLiteOpts struct { serviceName string overrideDashboardPort int overrideGrpcPort int + imageRepo string imageTag string pullPolicy pullPolicy } @@ -73,11 +77,20 @@ func initDefaultHatchetLiteOpts() *HatchetLiteOpts { hatchetName: defaulthatchetName, projectName: defaultprojectName, serviceName: defaultserviceName, + imageRepo: defaultLiteImageRepo, imageTag: "latest", pullPolicy: pullPolicyAlways, } } +// WithDevImage runs the auth-disabled hatchet-lite-dev image instead of hatchet-lite. +func WithDevImage() HatchetLiteOpt { + return func(o *HatchetLiteOpts) error { + o.imageRepo = devLiteImageRepo + return nil + } +} + type HatchetLiteOpt func(*HatchetLiteOpts) error func WithPostgresName(name string) HatchetLiteOpt { @@ -389,7 +402,7 @@ func (d *DockerDriver) stopPostgresContainer(ctx context.Context, opts *HatchetL } func (d *DockerDriver) startHatchetLiteContainer(ctx context.Context, opts *HatchetLiteOpts, networkId string, dashboardPort, grpcPort int, sharedLabels map[string]string) error { - imageName := "ghcr.io/hatchet-dev/hatchet/hatchet-lite:" + opts.imageTag + imageName := opts.imageRepo + ":" + opts.imageTag containerName := canonicalContainerName(opts.projectName, opts.hatchetName) if err := d.pullImageWithPolicy(ctx, imageName, opts.pullPolicy); err != nil { diff --git a/cmd/hatchet-cli/cli/server.go b/cmd/hatchet-cli/cli/server.go index 471f8433d9..ce01704967 100644 --- a/cmd/hatchet-cli/cli/server.go +++ b/cmd/hatchet-cli/cli/server.go @@ -42,44 +42,61 @@ var startCmd = &cobra.Command{ # Only pull images if they are not already available locally hatchet server start --pull-policy missing`, Run: func(cmd *cobra.Command, args []string) { - // Get flag values - dashboardPort, _ := cmd.Flags().GetInt("dashboard-port") - grpcPort, _ := cmd.Flags().GetInt("grpc-port") - projectName, _ := cmd.Flags().GetString("project-name") - profileName, _ := cmd.Flags().GetString("profile") - tag, _ := cmd.Flags().GetString("tag") - pullPolicy, _ := cmd.Flags().GetString("pull-policy") + runServerStart(cmd, false) + }, +} - opts := []docker.HatchetLiteOpt{} +var devStartCmd = &cobra.Command{ + Use: "dev-start", + Short: "Start a local auth-disabled Hatchet server (hatchet-lite-dev) using Docker", + Long: `Start a local Hatchet server with authentication disabled, using the hatchet-lite-dev image. Intended for local development only: the dashboard needs no login and a default worker token is printed.`, + Example: ` # Start an auth-disabled local server + hatchet server dev-start`, + Run: func(cmd *cobra.Command, args []string) { + runServerStart(cmd, true) + }, +} - if dashboardPort != 0 { - opts = append(opts, docker.WithOverrideDashboardPort(dashboardPort)) - } +func runServerStart(cmd *cobra.Command, dev bool) { + dashboardPort, _ := cmd.Flags().GetInt("dashboard-port") + grpcPort, _ := cmd.Flags().GetInt("grpc-port") + projectName, _ := cmd.Flags().GetString("project-name") + profileName, _ := cmd.Flags().GetString("profile") + tag, _ := cmd.Flags().GetString("tag") + pullPolicy, _ := cmd.Flags().GetString("pull-policy") - if grpcPort != 0 { - opts = append(opts, docker.WithOverrideGrpcPort(grpcPort)) - } + opts := []docker.HatchetLiteOpt{} - if projectName != "" { - opts = append(opts, docker.WithProjectName(projectName)) - } + if dev { + opts = append(opts, docker.WithDevImage()) + } - if tag != "" { - opts = append(opts, docker.WithImageTag(tag)) - } + if dashboardPort != 0 { + opts = append(opts, docker.WithOverrideDashboardPort(dashboardPort)) + } - if pullPolicy != "" { - opts = append(opts, docker.WithPullPolicy(pullPolicy)) - } + if grpcPort != 0 { + opts = append(opts, docker.WithOverrideGrpcPort(grpcPort)) + } - result, err := startLocalServer(cmd, profileName, opts...) - if err != nil { - cli.Logger.Fatalf("%v", err) - } + if projectName != "" { + opts = append(opts, docker.WithProjectName(projectName)) + } - // Render styled output - fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, "")) - }, + if tag != "" { + opts = append(opts, docker.WithImageTag(tag)) + } + + if pullPolicy != "" { + opts = append(opts, docker.WithPullPolicy(pullPolicy)) + } + + result, err := startLocalServer(cmd, profileName, opts...) + if err != nil { + cli.Logger.Fatalf("%v", err) + } + + fmt.Println(serverStartedView(result.ProfileName, result.DashboardPort, result.GrpcPort, "")) } var stopCmd = &cobra.Command{ @@ -193,19 +210,24 @@ func serverStartedView(profileName string, dashboardPort, grpcPort int, addition return styles.SuccessBox.Render(strings.Join(lines, "\n")) } +func addServerStartFlags(cmd *cobra.Command) { + cmd.Flags().IntP("dashboard-port", "d", 0, "Port for the Hatchet dashboard (default: auto-detect starting at 8888)") + cmd.Flags().IntP("grpc-port", "g", 0, "Port for the Hatchet gRPC server (default: auto-detect starting at 7077)") + cmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") + cmd.Flags().StringP("profile", "n", "local", "Name for the local profile (default: local)") + cmd.Flags().StringP("tag", "t", "latest", `Image tag for the hatchet-lite container (e.g. "v0.83.1")`) + cmd.Flags().String("pull-policy", "always", `Image pull policy: "always", "missing", or "never"`) +} + func init() { rootCmd.AddCommand(serverCmd) serverCmd.AddCommand(startCmd) + serverCmd.AddCommand(devStartCmd) serverCmd.AddCommand(stopCmd) - // Add flags for server command - startCmd.Flags().IntP("dashboard-port", "d", 0, "Port for the Hatchet dashboard (default: auto-detect starting at 8888)") - startCmd.Flags().IntP("grpc-port", "g", 0, "Port for the Hatchet gRPC server (default: auto-detect starting at 7077)") - startCmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") - startCmd.Flags().StringP("profile", "n", "local", "Name for the local profile (default: local)") - startCmd.Flags().StringP("tag", "t", "latest", `Image tag for the hatchet-lite container (e.g. "v0.83.1")`) - startCmd.Flags().String("pull-policy", "always", `Image pull policy: "always", "missing", or "never"`) + addServerStartFlags(startCmd) + addServerStartFlags(devStartCmd) stopCmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") } diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index 1e814362f7..a0af5417aa 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -27,10 +27,16 @@ Point your worker at it via `HATCHET_CLIENT_TOKEN`. ## Running it -Use the `:dev` tag of the image you'd normally run — e.g. `hatchet-lite`: +The easiest way is the Hatchet CLI, which runs the `hatchet-lite-dev` image: ```sh -docker run ghcr.io/hatchet-dev/hatchet/hatchet-lite:dev +hatchet server dev-start +``` + +Or run the image directly: + +```sh +docker run ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest ``` On startup the container mints the default worker token and prints it, and also writes it to the config volume. Grab it from the logs or the volume: @@ -47,7 +53,7 @@ Then point your worker at it: export HATCHET_CLIENT_TOKEN="" ``` -The `hatchet-api` / `hatchet-engine` images have `:dev` variants too; the Hatchet CLI can run the dev stack with `hatchet server start --tag dev`. +The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have `-dev` variants too (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). ## Building it yourself From f7b85f6c3bb2fa4400ad6b4e53b67d73f7e01ce8 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 22:40:51 +0200 Subject: [PATCH 16/48] rename strings --- .github/workflows/pre-release.yaml | 24 ++++++++++++------------ .github/workflows/release.yaml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 03f07a0812..599f168891 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -26,7 +26,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 \ @@ -61,7 +61,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 \ @@ -101,7 +101,7 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} - - name: Combine :dev + - name: Combine dev image run: | docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-amd64 docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api-dev:${{steps.tag_name.outputs.tag}}-arm64 @@ -131,7 +131,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 \ @@ -166,7 +166,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 \ @@ -206,7 +206,7 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}} - - name: Combine :dev + - name: Combine dev image run: | docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-amd64 docker pull ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:${{steps.tag_name.outputs.tag}}-arm64 @@ -236,7 +236,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/amd64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 \ @@ -271,7 +271,7 @@ jobs: --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ --platform linux/arm64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ -t ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 \ @@ -311,7 +311,7 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} - - name: Combine :dev + - name: Combine dev image run: | docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-amd64 docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:${{steps.tag_name.outputs.tag}}-arm64 @@ -537,7 +537,7 @@ jobs: --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \ --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ --build-arg SERVER_TARGET=lite \ @@ -624,7 +624,7 @@ jobs: --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:arm64 \ --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:arm64 \ . - - name: Build authdisabled (:dev) + - name: Build dev image run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ --build-arg SERVER_TARGET=lite \ @@ -682,7 +682,7 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}} - - name: Combine :dev + - name: Combine dev image run: | docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-amd64 docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:${{steps.tag_name.outputs.tag}}-arm64 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ab175a9f3..a26a5baf10 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -150,7 +150,7 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest - - name: Pull and push authdisabled (:dev) images + - name: Pull and push dev images run: | for img in hatchet-api hatchet-engine hatchet-admin hatchet-lite; do docker pull ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-arm64 From ee09f0059ddd6817b3dfaf5ef07e7af41bfd8398 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 22:48:53 +0200 Subject: [PATCH 17/48] rename files --- pkg/authmode/{enabled.go => authdisabled.go} | 0 pkg/authmode/{disabled.go => default.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pkg/authmode/{enabled.go => authdisabled.go} (100%) rename pkg/authmode/{disabled.go => default.go} (100%) diff --git a/pkg/authmode/enabled.go b/pkg/authmode/authdisabled.go similarity index 100% rename from pkg/authmode/enabled.go rename to pkg/authmode/authdisabled.go diff --git a/pkg/authmode/disabled.go b/pkg/authmode/default.go similarity index 100% rename from pkg/authmode/disabled.go rename to pkg/authmode/default.go From 186511dc9fe6314cf1b1b7000509e6a75e767493 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 22:59:15 +0200 Subject: [PATCH 18/48] update docs --- frontend/docs/pages/self-hosting/local-no-auth.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx index a0af5417aa..f018c7be04 100644 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ b/frontend/docs/pages/self-hosting/local-no-auth.mdx @@ -2,14 +2,14 @@ import { Callout } from "nextra/components"; # Auth-disabled (dev) images -Hatchet publishes a set of `:dev` images built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the `:dev` images — it cannot be turned on by configuration, and the regular (versioned) images can never disable authentication. +Hatchet publishes a set of `-dev` images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the `-dev` images — it cannot be turned on by configuration, and the regular images can never disable authentication. - The `:dev` images are for local development and testing only. Never run them on + The `-dev` images are for local development and testing only. Never run them on a system reachable by untrusted clients. -## What the `:dev` images do +## What the `-dev` images do - **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). - **REST API** calls succeed without a bearer token or session cookie. @@ -18,9 +18,9 @@ Hatchet publishes a set of `:dev` images built with authentication compiled out, ## Workers still use an API token -The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The `:dev` images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: +The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The `-dev` images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: -- The keyset is embedded (via `go:embed`) only in `:dev` builds. The regular images never compile it in, so the default token is inert against any normal deployment. +- The keyset is embedded (via `go:embed`) only in `-dev` builds. The regular images never compile it in, so the default token is inert against any normal deployment. - The token is scoped to the seed default tenant. Point your worker at it via `HATCHET_CLIENT_TOKEN`. @@ -57,7 +57,7 @@ The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have `-dev` varia ## Building it yourself -The `:dev` images are the regular Docker builds with the `authdisabled` Go build tag: +The `-dev` images are the regular Docker builds with the `authdisabled` Go build tag: ```sh docker build -f build/package/servers.dockerfile \ From 2801cf24a2454903eb83efc16ff5a8a45d310eff Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 23:09:22 +0200 Subject: [PATCH 19/48] prose rewording --- frontend/docs/pages/self-hosting/_meta.js | 2 +- .../self-hosting/auth-disabled-images.mdx | 63 +++++++++++++++++ .../docs/pages/self-hosting/local-no-auth.mdx | 67 ------------------- hack/lite/start.sh | 2 +- 4 files changed, 65 insertions(+), 69 deletions(-) create mode 100644 frontend/docs/pages/self-hosting/auth-disabled-images.mdx delete mode 100644 frontend/docs/pages/self-hosting/local-no-auth.mdx diff --git a/frontend/docs/pages/self-hosting/_meta.js b/frontend/docs/pages/self-hosting/_meta.js index fab6abbcd3..c9bf28426c 100644 --- a/frontend/docs/pages/self-hosting/_meta.js +++ b/frontend/docs/pages/self-hosting/_meta.js @@ -20,7 +20,7 @@ export default { title: "Managing Hatchet", }, "configuration-options": "Engine Configuration Options", - "local-no-auth": "Auth-Disabled Dev Images", + "auth-disabled-images": "Auth-Disabled Dev Images", "using-pgbouncer": "Using PgBouncer", "prometheus-metrics": { title: "Prometheus Metrics", diff --git a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx new file mode 100644 index 0000000000..e8158f7375 --- /dev/null +++ b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx @@ -0,0 +1,63 @@ +import { Callout } from "nextra/components"; + +# Auth-disabled (dev) images + +Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the dev images — it cannot be turned on by configuration, and the regular images can never disable authentication. + + + The dev images are for local development and testing only. Never run them on + a system reachable by untrusted clients. + + +## What the dev images do + +- **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). +- **REST API** calls succeed without a bearer token or session cookie. +- **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). +- The dashboard shows a persistent banner and the server logs a warning while authentication is disabled. + +## Workers still use an API token + +The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The dev images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: + +- The keyset is embedded (via `go:embed`) only in dev builds. The regular images never compile it in, so the default token is inert against any normal deployment. +- The token is scoped to the seed default tenant. + +Point your worker at it via `HATCHET_CLIENT_TOKEN`. + +## Running it + +The easiest way is the Hatchet CLI, which starts a Postgres container and the `hatchet-lite-dev` image for you: + +```sh +hatchet server dev-start +``` + +To run it yourself (Docker Compose, Kubernetes, etc.), follow the [Hatchet Lite](/self-hosting/hatchet-lite) guide but swap the image for `ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest`. The dev image still needs an external Postgres and the usual server configuration — the only difference is that authentication is compiled out. + +On startup the container mints the default worker token, prints it, and writes it to the config volume. Grab it from the logs or the volume: + +```sh +docker logs # printed under "authdisabled build: worker API token" +# or +docker exec cat ./config/authdisabled-token +``` + +Then point your worker at it: + +```sh +export HATCHET_CLIENT_TOKEN="" +``` + +The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have dev variants too (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). + +## Building it yourself + +The dev images are the regular Docker builds with the `authdisabled` Go build tag: + +```sh +docker build -f build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=api \ + --build-arg GO_BUILD_TAGS=authdisabled \ + . +``` diff --git a/frontend/docs/pages/self-hosting/local-no-auth.mdx b/frontend/docs/pages/self-hosting/local-no-auth.mdx deleted file mode 100644 index f018c7be04..0000000000 --- a/frontend/docs/pages/self-hosting/local-no-auth.mdx +++ /dev/null @@ -1,67 +0,0 @@ -import { Callout } from "nextra/components"; - -# Auth-disabled (dev) images - -Hatchet publishes a set of `-dev` images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the `-dev` images — it cannot be turned on by configuration, and the regular images can never disable authentication. - - - The `-dev` images are for local development and testing only. Never run them on - a system reachable by untrusted clients. - - -## What the `-dev` images do - -- **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). -- **REST API** calls succeed without a bearer token or session cookie. -- **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). -- The dashboard shows a persistent banner and the server logs a warning while authentication is disabled. - -## Workers still use an API token - -The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The `-dev` images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: - -- The keyset is embedded (via `go:embed`) only in `-dev` builds. The regular images never compile it in, so the default token is inert against any normal deployment. -- The token is scoped to the seed default tenant. - -Point your worker at it via `HATCHET_CLIENT_TOKEN`. - -## Running it - -The easiest way is the Hatchet CLI, which runs the `hatchet-lite-dev` image: - -```sh -hatchet server dev-start -``` - -Or run the image directly: - -```sh -docker run ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest -``` - -On startup the container mints the default worker token and prints it, and also writes it to the config volume. Grab it from the logs or the volume: - -```sh -docker logs # printed under "authdisabled build: worker API token" -# or -docker exec cat ./config/authdisabled-token -``` - -Then point your worker at it: - -```sh -export HATCHET_CLIENT_TOKEN="" -``` - -The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have `-dev` variants too (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). - -## Building it yourself - -The `-dev` images are the regular Docker builds with the `authdisabled` Go build tag: - -```sh -docker build -f build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=api \ - --build-arg GO_BUILD_TAGS=authdisabled \ - . -``` diff --git a/hack/lite/start.sh b/hack/lite/start.sh index 15164529cd..425d2bbb14 100644 --- a/hack/lite/start.sh +++ b/hack/lite/start.sh @@ -10,7 +10,7 @@ fi # Generate config files ./hatchet-admin quickstart --skip certs --generated-config-dir ./config --overwrite=false -# In authdisabled (:dev) builds, mint and surface the default worker token +# In authdisabled builds, mint and surface the default worker token if ./hatchet-admin authdisabled; then if [ ! -s ./config/authdisabled-token ]; then ./hatchet-admin token create --config ./config --name authdisabled-default > ./config/authdisabled-token From 7e70b776fb347d0e093658323a8cd1d289d5cda1 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 3 Jul 2026 23:16:27 +0200 Subject: [PATCH 20/48] upload authmode disabled keyset --- pkg/authmode/keyset/private_ec256.key | 1 + pkg/authmode/keyset/public_ec256.key | 1 + 2 files changed, 2 insertions(+) create mode 100644 pkg/authmode/keyset/private_ec256.key create mode 100644 pkg/authmode/keyset/public_ec256.key diff --git a/pkg/authmode/keyset/private_ec256.key b/pkg/authmode/keyset/private_ec256.key new file mode 100644 index 0000000000..e3ebdfa740 --- /dev/null +++ b/pkg/authmode/keyset/private_ec256.key @@ -0,0 +1 @@ +eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQcml2YXRlS2V5IiwgInZhbHVlIjoiRWtZUUFSb2cwK0MySmVhQmI1N3JlT3M1YTk5Qy9zcDQ5SDg3OGdzYnhwa2xHb3NWbDV3aUlDcklpaHMyK0I4QjRMWUNTeHgrRGNaejhMQkFFa0c3ZEU4ejM4SVFoajF0R2lDWS9EUGtIdmdVSGtxaUF6RnFuWG5EZUNORzF1Z2gwY1huUHBTNmFaMXJ0Zz09IiwgImtleU1hdGVyaWFsVHlwZSI6IkFTWU1NRVRSSUNfUFJJVkFURSJ9LCAic3RhdHVzIjoiRU5BQkxFRCIsICJrZXlJZCI6NzQ0OTUxODM3LCAib3V0cHV0UHJlZml4VHlwZSI6IlRJTksifV19 diff --git a/pkg/authmode/keyset/public_ec256.key b/pkg/authmode/keyset/public_ec256.key new file mode 100644 index 0000000000..c602396352 --- /dev/null +++ b/pkg/authmode/keyset/public_ec256.key @@ -0,0 +1 @@ +eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQdWJsaWNLZXkiLCAidmFsdWUiOiJFQUVhSU5QZ3RpWG1nVytlNjNqck9XdmZRdjdLZVBSL08vSUxHOGFaSlJxTEZaZWNJaUFxeUlvYk52Z2ZBZUMyQWtzY2ZnM0djL0N3UUJKQnUzUlBNOS9DRUlZOWJRPT0iLCAia2V5TWF0ZXJpYWxUeXBlIjoiQVNZTU1FVFJJQ19QVUJMSUMifSwgInN0YXR1cyI6IkVOQUJMRUQiLCAia2V5SWQiOjc0NDk1MTgzNywgIm91dHB1dFByZWZpeFR5cGUiOiJUSU5LIn1dfQ From 6f35c6ab8bfb088d829f3409a0e91eb60ca855b8 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Sun, 5 Jul 2026 21:49:40 +0200 Subject: [PATCH 21/48] format --- cmd/hatchet-cli/cli/server.go | 24 ++++++----------- frontend/docs/pages/self-hosting/_meta.js | 2 +- .../self-hosting/auth-disabled-images.mdx | 27 +++++-------------- 3 files changed, 16 insertions(+), 37 deletions(-) diff --git a/cmd/hatchet-cli/cli/server.go b/cmd/hatchet-cli/cli/server.go index ce01704967..3f33bb5eee 100644 --- a/cmd/hatchet-cli/cli/server.go +++ b/cmd/hatchet-cli/cli/server.go @@ -40,34 +40,27 @@ var startCmd = &cobra.Command{ hatchet server start --pull-policy never # Only pull images if they are not already available locally - hatchet server start --pull-policy missing`, - Run: func(cmd *cobra.Command, args []string) { - runServerStart(cmd, false) - }, -} + hatchet server start --pull-policy missing -var devStartCmd = &cobra.Command{ - Use: "dev-start", - Short: "Start a local auth-disabled Hatchet server (hatchet-lite-dev) using Docker", - Long: `Start a local Hatchet server with authentication disabled, using the hatchet-lite-dev image. Intended for local development only: the dashboard needs no login and a default worker token is printed.`, - Example: ` # Start an auth-disabled local server - hatchet server dev-start`, + # Start with authentication disabled (runs the hatchet-lite-dev image, local development only) + hatchet server start --disable-auth`, Run: func(cmd *cobra.Command, args []string) { - runServerStart(cmd, true) + runServerStart(cmd) }, } -func runServerStart(cmd *cobra.Command, dev bool) { +func runServerStart(cmd *cobra.Command) { dashboardPort, _ := cmd.Flags().GetInt("dashboard-port") grpcPort, _ := cmd.Flags().GetInt("grpc-port") projectName, _ := cmd.Flags().GetString("project-name") profileName, _ := cmd.Flags().GetString("profile") tag, _ := cmd.Flags().GetString("tag") pullPolicy, _ := cmd.Flags().GetString("pull-policy") + disableAuth, _ := cmd.Flags().GetBool("disable-auth") opts := []docker.HatchetLiteOpt{} - if dev { + if disableAuth { opts = append(opts, docker.WithDevImage()) } @@ -217,17 +210,16 @@ func addServerStartFlags(cmd *cobra.Command) { cmd.Flags().StringP("profile", "n", "local", "Name for the local profile (default: local)") cmd.Flags().StringP("tag", "t", "latest", `Image tag for the hatchet-lite container (e.g. "v0.83.1")`) cmd.Flags().String("pull-policy", "always", `Image pull policy: "always", "missing", or "never"`) + cmd.Flags().Bool("disable-auth", false, "Disable authentication by running the hatchet-lite-dev image (local development only)") } func init() { rootCmd.AddCommand(serverCmd) serverCmd.AddCommand(startCmd) - serverCmd.AddCommand(devStartCmd) serverCmd.AddCommand(stopCmd) addServerStartFlags(startCmd) - addServerStartFlags(devStartCmd) stopCmd.Flags().StringP("project-name", "p", "", "Docker project name for containers (default: hatchet-cli)") } diff --git a/frontend/docs/pages/self-hosting/_meta.js b/frontend/docs/pages/self-hosting/_meta.js index c9bf28426c..f34c77d759 100644 --- a/frontend/docs/pages/self-hosting/_meta.js +++ b/frontend/docs/pages/self-hosting/_meta.js @@ -6,6 +6,7 @@ export default { }, "hatchet-lite": "Hatchet Lite", "docker-compose": "Docker Compose", + "auth-disabled-images": "Auth-Disabled Dev Images", "-- Kubernetes": { type: "separator", title: "Kubernetes", @@ -20,7 +21,6 @@ export default { title: "Managing Hatchet", }, "configuration-options": "Engine Configuration Options", - "auth-disabled-images": "Auth-Disabled Dev Images", "using-pgbouncer": "Using PgBouncer", "prometheus-metrics": { title: "Prometheus Metrics", diff --git a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx index e8158f7375..0e9b92a5d7 100644 --- a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx +++ b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx @@ -2,11 +2,10 @@ import { Callout } from "nextra/components"; # Auth-disabled (dev) images -Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. This is a **compile-time** property of the dev images — it cannot be turned on by configuration, and the regular images can never disable authentication. +Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. - The dev images are for local development and testing only. Never run them on - a system reachable by untrusted clients. + The dev images are for local development and testing only. ## What the dev images do @@ -14,11 +13,10 @@ Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `h - **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). - **REST API** calls succeed without a bearer token or session cookie. - **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). -- The dashboard shows a persistent banner and the server logs a warning while authentication is disabled. ## Workers still use an API token -The gRPC engine is unchanged — workers and SDK clients still authenticate with an API token. The dev images embed a fixed keyset and mint a **default token** signed by it, so you don't have to create one: +The gRPC engine is unchanged - workers and SDK clients still authenticate with an API token. The dev images embed a fixed keyset and mint a default token signed by it, so you don't have to create one: - The keyset is embedded (via `go:embed`) only in dev builds. The regular images never compile it in, so the default token is inert against any normal deployment. - The token is scoped to the seed default tenant. @@ -27,18 +25,18 @@ Point your worker at it via `HATCHET_CLIENT_TOKEN`. ## Running it -The easiest way is the Hatchet CLI, which starts a Postgres container and the `hatchet-lite-dev` image for you: +The easiest way is the Hatchet CLI's `--disable-auth` flag, which starts a Postgres container and the `hatchet-lite-dev` image for you: ```sh -hatchet server dev-start +hatchet server start --disable-auth ``` -To run it yourself (Docker Compose, Kubernetes, etc.), follow the [Hatchet Lite](/self-hosting/hatchet-lite) guide but swap the image for `ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest`. The dev image still needs an external Postgres and the usual server configuration — the only difference is that authentication is compiled out. +To run it yourself, follow the [Hatchet Lite](/self-hosting/hatchet-lite) guide but swap the image for `ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest`. The dev image still needs an external Postgres and the usual server configuration - the only difference is that authentication is compiled out. On startup the container mints the default worker token, prints it, and writes it to the config volume. Grab it from the logs or the volume: ```sh -docker logs # printed under "authdisabled build: worker API token" +docker logs # printed under "authdisabled build: worker API token" # or docker exec cat ./config/authdisabled-token ``` @@ -50,14 +48,3 @@ export HATCHET_CLIENT_TOKEN="" ``` The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have dev variants too (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). - -## Building it yourself - -The dev images are the regular Docker builds with the `authdisabled` Go build tag: - -```sh -docker build -f build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=api \ - --build-arg GO_BUILD_TAGS=authdisabled \ - . -``` From 955cecae3165b629508af646e4dfa84fc4f6d9ac Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Sun, 5 Jul 2026 22:07:18 +0200 Subject: [PATCH 22/48] remove code --- api/v1/server/authn/middleware.go | 8 ----- build/package/servers.dockerfile | 2 +- pkg/auth/token/token.go | 13 +++----- pkg/auth/token/token_authdisabled_test.go | 32 +++++++++++++++++-- pkg/authmode/authdisabled.go | 2 -- pkg/config/loader/loader_authdisabled_test.go | 25 --------------- pkg/encryption/local.go | 30 ----------------- 7 files changed, 35 insertions(+), 77 deletions(-) delete mode 100644 pkg/config/loader/loader_authdisabled_test.go diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index fa3a997959..f3222b3681 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -159,14 +159,6 @@ func (a *AuthN) handleAuthDisabledBypass(c echo.Context) error { c.Set("user", user) c.Set("auth_strategy", "authdisabled") - ctx = context.WithValue(ctx, analytics.UserIDKey, user.ID) - ctx = context.WithValue(ctx, analytics.SourceKey, analytics.SourceUI) - - span := trace.SpanFromContext(ctx) - telemetry.WithAttributes(span, telemetry.AttributeKV{Key: "user.id", Value: user.ID}) - - c.SetRequest(c.Request().WithContext(ctx)) - return nil } diff --git a/build/package/servers.dockerfile b/build/package/servers.dockerfile index a1dcbb4c2e..657b2c9330 100644 --- a/build/package/servers.dockerfile +++ b/build/package/servers.dockerfile @@ -44,7 +44,7 @@ ARG VERSION=v0.1.0-alpha.0 # can be set to "api", "engine", "admin" or "lite" ARG SERVER_TARGET -# optional go build tags, e.g. "authdisabled" for :dev images +# optional go build tags, e.g. "authdisabled" for dev images ARG GO_BUILD_TAGS="" # check if the target is empty or not set to api, engine, lite, or admin diff --git a/pkg/auth/token/token.go b/pkg/auth/token/token.go index 94df7dbcbc..c55b2f9624 100644 --- a/pkg/auth/token/token.go +++ b/pkg/auth/token/token.go @@ -26,18 +26,15 @@ type TokenOpts struct { } type jwtManagerImpl struct { - privateHandle *keyset.Handle - opts *TokenOpts - tokenRepo v1.APITokenRepository - verifier jwt.Verifier - // authDisabledVerifier verifies the default token signed by the embedded authdisabled keyset. + privateHandle *keyset.Handle + opts *TokenOpts + tokenRepo v1.APITokenRepository + verifier jwt.Verifier authDisabledVerifier jwt.Verifier } type JWTManagerOpt func(*jwtManagerImpl) error -// WithAuthDisabledVerifier additionally trusts tokens signed by the given (embedded authdisabled) -// public keyset. Only used in authdisabled builds. func WithAuthDisabledVerifier(publicKeyset []byte) JWTManagerOpt { return func(j *jwtManagerImpl) error { handle, err := encryption.InsecureHandleFromBytes(publicKeyset) @@ -61,8 +58,6 @@ func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APIT return newJWTManager(encryptionSvc.GetPrivateJWTHandle(), encryptionSvc.GetPublicJWTHandle(), tokenRepo, opts, mgrOpts...) } -// NewJWTManagerFromKeysets builds a JWTManager directly from cleartext JWT keysets, used to sign -// the default token with the embedded authdisabled keyset. func NewJWTManagerFromKeysets(privateKeyset, publicKeyset []byte, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { privateHandle, err := encryption.InsecureHandleFromBytes(privateKeyset) diff --git a/pkg/auth/token/token_authdisabled_test.go b/pkg/auth/token/token_authdisabled_test.go index 8990199bf2..e07ef49694 100644 --- a/pkg/auth/token/token_authdisabled_test.go +++ b/pkg/auth/token/token_authdisabled_test.go @@ -3,7 +3,9 @@ package token_test import ( + "bytes" "context" + "encoding/base64" "testing" "time" @@ -11,6 +13,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tink-crypto/tink-go/insecurecleartextkeyset" + "github.com/tink-crypto/tink-go/jwt" + "github.com/tink-crypto/tink-go/keyset" "github.com/hatchet-dev/hatchet/pkg/auth/token" "github.com/hatchet-dev/hatchet/pkg/encryption" @@ -44,8 +49,7 @@ func TestAuthDisabledTokenTrustedOnlyWithVerifier(t *testing.T) { master, mainPriv, mainPub, _, err := encryption.GenerateLocalKeys() require.NoError(t, err) - adPriv, adPub, err := encryption.GenerateInsecureJWTKeyset() - require.NoError(t, err) + adPriv, adPub := generateInsecureJWTKeyset(t) mainEnc, err := encryption.NewLocalEncryption(master, mainPriv, mainPub) require.NoError(t, err) @@ -84,3 +88,27 @@ func TestAuthDisabledTokenTrustedOnlyWithVerifier(t *testing.T) { _, _, err = mgrWithAuthDisabled.ValidateTenantToken(ctx, mainTok.Token) assert.NoError(t, err, "main token should validate on an authdisabled manager") } + +func generateInsecureJWTKeyset(t *testing.T) (private, public []byte) { + t.Helper() + + privateHandle, err := keyset.NewHandle(jwt.ES256Template()) + require.NoError(t, err) + + publicHandle, err := privateHandle.Public() + require.NoError(t, err) + + return insecureKeysetBytes(t, privateHandle), insecureKeysetBytes(t, publicHandle) +} + +func insecureKeysetBytes(t *testing.T, kh *keyset.Handle) []byte { + t.Helper() + + buf := new(bytes.Buffer) + require.NoError(t, insecurecleartextkeyset.Write(kh, keyset.NewJSONWriter(buf))) + + out := make([]byte, base64.RawStdEncoding.EncodedLen(buf.Len())) + base64.RawStdEncoding.Encode(out, buf.Bytes()) + + return out +} diff --git a/pkg/authmode/authdisabled.go b/pkg/authmode/authdisabled.go index 5492078499..98a041f07c 100644 --- a/pkg/authmode/authdisabled.go +++ b/pkg/authmode/authdisabled.go @@ -4,8 +4,6 @@ package authmode import _ "embed" -// Disabled reports whether this binary was built with authentication disabled (the `authdisabled` -// build tag). Only `:dev` images are built this way; production builds have Disabled == false. const Disabled = true //go:embed keyset/private_ec256.key diff --git a/pkg/config/loader/loader_authdisabled_test.go b/pkg/config/loader/loader_authdisabled_test.go deleted file mode 100644 index b9d625c4c3..0000000000 --- a/pkg/config/loader/loader_authdisabled_test.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build !e2e && !load && !rampup && !integration - -package loader - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/hatchet-dev/hatchet/pkg/config/server" -) - -func TestApplyAuthDisabledOverrides(t *testing.T) { - rt := &server.ConfigFileRuntime{ - AllowCreateTenant: true, - AllowSignup: true, - AllowInvites: true, - } - - applyAuthDisabledOverrides(rt) - - assert.False(t, rt.AllowCreateTenant, "authdisabled must disable tenant creation") - assert.False(t, rt.AllowSignup, "authdisabled must disable signup") - assert.False(t, rt.AllowInvites, "authdisabled must disable invites") -} diff --git a/pkg/encryption/local.go b/pkg/encryption/local.go index 1e5d0e3676..e8a66d0577 100644 --- a/pkg/encryption/local.go +++ b/pkg/encryption/local.go @@ -81,36 +81,6 @@ func GenerateLocalKeys() (masterKey []byte, privateEc256 []byte, publicEc256 []b return masterKey, privateEc256, publicEc256, insecurePublicHandleEc256, nil } -// GenerateInsecureJWTKeyset creates a cleartext (unencrypted) ES256 JWT keyset. Only for the -// committed authdisabled keyset, which is embedded into dev builds and never used in production. -func GenerateInsecureJWTKeyset() (privateEc256 []byte, publicEc256 []byte, err error) { - privateHandle, err := keyset.NewHandle(jwt.ES256Template()) - - if err != nil { - return nil, nil, fmt.Errorf("failed to create new keyset handle with ES256 template: %w", err) - } - - privateEc256, err = insecureBytesFromHandle(privateHandle) - - if err != nil { - return nil, nil, err - } - - publicHandle, err := privateHandle.Public() - - if err != nil { - return nil, nil, fmt.Errorf("failed to get public keyset: %w", err) - } - - publicEc256, err = insecureBytesFromHandle(publicHandle) - - if err != nil { - return nil, nil, err - } - - return privateEc256, publicEc256, nil -} - func generateLocalMasterKey() ([]byte, *keyset.Handle, error) { aeadTemplate := aead.AES256GCMKeyTemplate() From e84bee178c248ca2d5bbc130b1c8e22c3618322f Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Sun, 5 Jul 2026 22:48:31 +0200 Subject: [PATCH 23/48] fix precommitlint --- .pre-commit-config.yaml | 6 +- api/v1/server/authz/middleware.go | 15 +++++ cmd/hatchet-admin/cli/token.go | 20 +----- pkg/auth/token/token.go | 81 ++++------------------- pkg/auth/token/token_authdisabled_test.go | 38 +++++------ pkg/authmode/authdisabled.go | 11 ++- pkg/authmode/keyset/.gitattributes | 1 + pkg/authmode/keyset/private_ec256.key | 2 +- pkg/authmode/keyset/public_ec256.key | 2 +- pkg/config/loader/loader.go | 14 ++-- pkg/encryption/insecure_jwt.go | 57 ++++++++++++++++ 11 files changed, 128 insertions(+), 119 deletions(-) create mode 100644 pkg/authmode/keyset/.gitattributes create mode 100644 pkg/encryption/insecure_jwt.go diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 774bdff972..88f260e892 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,11 +26,11 @@ repos: exclude: ^examples/ - id: mixed-line-ending args: ["--fix=lf"] - exclude: ^examples/ + exclude: (^examples/|^pkg/authmode/keyset/) - id: end-of-file-fixer - exclude: ^examples/ + exclude: (^examples/|^pkg/authmode/keyset/) - id: trailing-whitespace - exclude: ^examples/ + exclude: (^examples/|^pkg/authmode/keyset/) - id: check-yaml exclude: (^examples/|^cmd/hatchet-cli/cli/templates/) - repo: https://github.com/golangci/golangci-lint diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 400fb58dee..42c0a38875 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -9,6 +9,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" "github.com/hatchet-dev/hatchet/pkg/auth/rbac" + "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) @@ -48,6 +49,10 @@ func (a *AuthZ) authorize(c echo.Context, r *middleware.RouteInfo) error { return nil } + if authmode.Disabled && rbac.OperationIn(r.OperationID, authDisabledDeniedOperations) { + return echo.NewHTTPError(http.StatusForbidden, "This operation is disabled while authentication is disabled") + } + var err error switch c.Get("auth_strategy").(string) { @@ -83,6 +88,16 @@ func (a *AuthZ) handleCookieAuth(c echo.Context, r *middleware.RouteInfo) error return nil } +// identity/membership mutations blocked in authdisabled builds (on top of the Allow* runtime flags) +var authDisabledDeniedOperations = []string{ + "TenantInviteAccept", + "TenantInviteReject", + "TenantInviteUpdate", + "TenantInviteDelete", + "TenantMemberUpdate", + "TenantMemberDelete", +} + var restrictedWithBearerToken = []string{ // bearer tokens cannot read, list, or write other bearer tokens "ApiTokenList", diff --git a/cmd/hatchet-admin/cli/token.go b/cmd/hatchet-admin/cli/token.go index 88314170ee..660e38f564 100644 --- a/cmd/hatchet-admin/cli/token.go +++ b/cmd/hatchet-admin/cli/token.go @@ -11,7 +11,6 @@ import ( "github.com/google/uuid" "github.com/spf13/cobra" - "github.com/hatchet-dev/hatchet/pkg/auth/token" "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/loader" "github.com/hatchet-dev/hatchet/pkg/config/server" @@ -72,16 +71,12 @@ func runCreateAPIToken(expiresIn time.Duration) error { // read in the local config configLoader := loader.NewConfigLoader(configDirectory) - var cf *server.ServerConfigFile - cleanup, srv, err := configLoader.CreateServerFromConfig("", func(scf *server.ServerConfigFile) { // disable rabbitmq since it's not needed to create the api token scf.MessageQueue.Enabled = false // disable security checks since we're not running the server scf.SecurityCheck.Enabled = false - - cf = scf }) if err != nil { @@ -94,32 +89,19 @@ func runCreateAPIToken(expiresIn time.Duration) error { expiresAt := time.Now().UTC().Add(expiresIn) - jwtManager := srv.Auth.JWTManager - tenantId, err := tenantIDForTokenCreate(srv.Seed.DefaultTenantID) if err != nil { return err } if authmode.Disabled { - // authdisabled builds mint the default-tenant token signed by the embedded keyset tenantId, err = uuid.Parse(srv.Seed.DefaultTenantID) if err != nil { return err } - - jwtManager, err = token.NewJWTManagerFromKeysets(authmode.EmbeddedPrivateKeyset(), authmode.EmbeddedPublicKeyset(), srv.V1.APIToken(), &token.TokenOpts{ - Issuer: cf.Runtime.ServerURL, - Audience: cf.Runtime.ServerURL, - GRPCBroadcastAddress: cf.Runtime.GRPCBroadcastAddress, - ServerURL: cf.Runtime.ServerURL, - }) - if err != nil { - return err - } } - defaultTok, err := jwtManager.GenerateTenantToken(context.Background(), tenantId, tokenName, false, &expiresAt) + defaultTok, err := srv.Auth.JWTManager.GenerateTenantToken(context.Background(), tenantId, tokenName, false, &expiresAt) if err != nil { return err diff --git a/pkg/auth/token/token.go b/pkg/auth/token/token.go index c55b2f9624..ae08ec9da9 100644 --- a/pkg/auth/token/token.go +++ b/pkg/auth/token/token.go @@ -7,7 +7,6 @@ import ( "github.com/google/uuid" "github.com/tink-crypto/tink-go/jwt" - "github.com/tink-crypto/tink-go/keyset" "github.com/hatchet-dev/hatchet/pkg/encryption" v1 "github.com/hatchet-dev/hatchet/pkg/repository" @@ -26,75 +25,25 @@ type TokenOpts struct { } type jwtManagerImpl struct { - privateHandle *keyset.Handle - opts *TokenOpts - tokenRepo v1.APITokenRepository - verifier jwt.Verifier - authDisabledVerifier jwt.Verifier + encryption encryption.EncryptionService + opts *TokenOpts + tokenRepo v1.APITokenRepository + verifier jwt.Verifier } -type JWTManagerOpt func(*jwtManagerImpl) error - -func WithAuthDisabledVerifier(publicKeyset []byte) JWTManagerOpt { - return func(j *jwtManagerImpl) error { - handle, err := encryption.InsecureHandleFromBytes(publicKeyset) - - if err != nil { - return fmt.Errorf("failed to read authdisabled public keyset: %v", err) - } - - verifier, err := jwt.NewVerifier(handle) - - if err != nil { - return fmt.Errorf("failed to create authdisabled JWT Verifier: %v", err) - } - - j.authDisabledVerifier = verifier - return nil - } -} - -func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { - return newJWTManager(encryptionSvc.GetPrivateJWTHandle(), encryptionSvc.GetPublicJWTHandle(), tokenRepo, opts, mgrOpts...) -} - -func NewJWTManagerFromKeysets(privateKeyset, publicKeyset []byte, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { - privateHandle, err := encryption.InsecureHandleFromBytes(privateKeyset) - - if err != nil { - return nil, fmt.Errorf("failed to read private keyset: %v", err) - } - - publicHandle, err := encryption.InsecureHandleFromBytes(publicKeyset) - - if err != nil { - return nil, fmt.Errorf("failed to read public keyset: %v", err) - } - - return newJWTManager(privateHandle, publicHandle, tokenRepo, opts, mgrOpts...) -} - -func newJWTManager(privateHandle, publicHandle *keyset.Handle, tokenRepo v1.APITokenRepository, opts *TokenOpts, mgrOpts ...JWTManagerOpt) (JWTManager, error) { - verifier, err := jwt.NewVerifier(publicHandle) +func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts) (JWTManager, error) { + verifier, err := jwt.NewVerifier(encryptionSvc.GetPublicJWTHandle()) if err != nil { return nil, fmt.Errorf("failed to create JWT Verifier: %v", err) } - m := &jwtManagerImpl{ - privateHandle: privateHandle, - opts: opts, - tokenRepo: tokenRepo, - verifier: verifier, - } - - for _, opt := range mgrOpts { - if err := opt(m); err != nil { - return nil, err - } - } - - return m, nil + return &jwtManagerImpl{ + encryption: encryptionSvc, + opts: opts, + tokenRepo: tokenRepo, + verifier: verifier, + }, nil } type Token struct { @@ -105,7 +54,7 @@ type Token struct { func (j *jwtManagerImpl) createToken(ctx context.Context, tenantId uuid.UUID, name string, id *uuid.UUID, expires *time.Time) (*Token, error) { // Retrieve the JWT Signer primitive from privateKeysetHandle. - signer, err := jwt.NewSigner(j.privateHandle) + signer, err := jwt.NewSigner(j.encryption.GetPrivateJWTHandle()) if err != nil { return nil, fmt.Errorf("failed to create JWT Signer: %v", err) @@ -170,10 +119,6 @@ func (j *jwtManagerImpl) ValidateTenantToken(ctx context.Context, token string) verifiedJwt, err := j.verifier.VerifyAndDecode(token, validator) - if err != nil && j.authDisabledVerifier != nil { - verifiedJwt, err = j.authDisabledVerifier.VerifyAndDecode(token, validator) - } - if err != nil { return uuid.Nil, uuid.Nil, fmt.Errorf("failed to verify and decode JWT: %v", err) } diff --git a/pkg/auth/token/token_authdisabled_test.go b/pkg/auth/token/token_authdisabled_test.go index e07ef49694..13f75ce012 100644 --- a/pkg/auth/token/token_authdisabled_test.go +++ b/pkg/auth/token/token_authdisabled_test.go @@ -45,48 +45,48 @@ func (s *stubAPITokenRepository) DeleteAPIToken(ctx context.Context, tenantId, i return nil } -func TestAuthDisabledTokenTrustedOnlyWithVerifier(t *testing.T) { +// TestAuthDisabledKeysetIsolation is the security invariant behind authdisabled mode: the main +// (production) JWT manager can never validate a token signed by the embedded authdisabled keyset, +// and vice versa. The embedded token is only accepted via the separate authdisabled manager, which +// is only wired up (in the gRPC middleware) behind the compile-time authmode.Disabled constant. +func TestAuthDisabledKeysetIsolation(t *testing.T) { master, mainPriv, mainPub, _, err := encryption.GenerateLocalKeys() require.NoError(t, err) - adPriv, adPub := generateInsecureJWTKeyset(t) - mainEnc, err := encryption.NewLocalEncryption(master, mainPriv, mainPub) require.NoError(t, err) + adPriv, adPub := generateInsecureJWTKeyset(t) + adEnc, err := encryption.NewInsecureJWTEncryption(adPriv, adPub) + require.NoError(t, err) + repo := &stubAPITokenRepository{} opts := &token.TokenOpts{Issuer: "hatchet", Audience: "hatchet", ServerURL: "http://localhost:8080"} - mgrWithAuthDisabled, err := token.NewJWTManager(mainEnc, repo, opts, token.WithAuthDisabledVerifier(adPub)) - require.NoError(t, err) - - mgrPlain, err := token.NewJWTManager(mainEnc, repo, opts) + mainMgr, err := token.NewJWTManager(mainEnc, repo, opts) require.NoError(t, err) - minter, err := token.NewJWTManagerFromKeysets(adPriv, adPub, repo, opts) + adMgr, err := token.NewJWTManager(adEnc, repo, opts) require.NoError(t, err) ctx := context.Background() tenantID := uuid.New() - adTok, err := minter.GenerateTenantToken(ctx, tenantID, "authdisabled", false, nil) + adTok, err := adMgr.GenerateTenantToken(ctx, tenantID, "authdisabled", false, nil) require.NoError(t, err) - gotTenant, _, err := mgrWithAuthDisabled.ValidateTenantToken(ctx, adTok.Token) - assert.NoError(t, err, "embedded-keyset token should validate in an authdisabled build") + gotTenant, _, err := adMgr.ValidateTenantToken(ctx, adTok.Token) + assert.NoError(t, err, "embedded-keyset token should validate on the authdisabled manager") assert.Equal(t, tenantID, gotTenant) - _, _, err = mgrPlain.ValidateTenantToken(ctx, adTok.Token) - assert.Error(t, err, "embedded-keyset token must be rejected without the authdisabled verifier") + _, _, err = mainMgr.ValidateTenantToken(ctx, adTok.Token) + assert.Error(t, err, "the main JWT manager must reject the embedded-keyset token") - mainTok, err := mgrPlain.GenerateTenantToken(ctx, tenantID, "main", false, nil) + mainTok, err := mainMgr.GenerateTenantToken(ctx, tenantID, "main", false, nil) require.NoError(t, err) - _, _, err = mgrPlain.ValidateTenantToken(ctx, mainTok.Token) - assert.NoError(t, err, "main token should validate on a plain manager") - - _, _, err = mgrWithAuthDisabled.ValidateTenantToken(ctx, mainTok.Token) - assert.NoError(t, err, "main token should validate on an authdisabled manager") + _, _, err = adMgr.ValidateTenantToken(ctx, mainTok.Token) + assert.Error(t, err, "the authdisabled manager must reject a main-keyset token") } func generateInsecureJWTKeyset(t *testing.T) (private, public []byte) { diff --git a/pkg/authmode/authdisabled.go b/pkg/authmode/authdisabled.go index 98a041f07c..616553b42b 100644 --- a/pkg/authmode/authdisabled.go +++ b/pkg/authmode/authdisabled.go @@ -2,7 +2,10 @@ package authmode -import _ "embed" +import ( + "bytes" + _ "embed" +) const Disabled = true @@ -12,6 +15,8 @@ var privateKeyset []byte //go:embed keyset/public_ec256.key var publicKeyset []byte -func EmbeddedPrivateKeyset() []byte { return privateKeyset } +// TrimSpace guards against an editor adding a trailing newline to the committed keyset files, +// which would corrupt the base64. +func EmbeddedPrivateKeyset() []byte { return bytes.TrimSpace(privateKeyset) } -func EmbeddedPublicKeyset() []byte { return publicKeyset } +func EmbeddedPublicKeyset() []byte { return bytes.TrimSpace(publicKeyset) } diff --git a/pkg/authmode/keyset/.gitattributes b/pkg/authmode/keyset/.gitattributes new file mode 100644 index 0000000000..65fcd050fd --- /dev/null +++ b/pkg/authmode/keyset/.gitattributes @@ -0,0 +1 @@ +*.key -text diff --git a/pkg/authmode/keyset/private_ec256.key b/pkg/authmode/keyset/private_ec256.key index e3ebdfa740..69b731b198 100644 --- a/pkg/authmode/keyset/private_ec256.key +++ b/pkg/authmode/keyset/private_ec256.key @@ -1 +1 @@ -eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQcml2YXRlS2V5IiwgInZhbHVlIjoiRWtZUUFSb2cwK0MySmVhQmI1N3JlT3M1YTk5Qy9zcDQ5SDg3OGdzYnhwa2xHb3NWbDV3aUlDcklpaHMyK0I4QjRMWUNTeHgrRGNaejhMQkFFa0c3ZEU4ejM4SVFoajF0R2lDWS9EUGtIdmdVSGtxaUF6RnFuWG5EZUNORzF1Z2gwY1huUHBTNmFaMXJ0Zz09IiwgImtleU1hdGVyaWFsVHlwZSI6IkFTWU1NRVRSSUNfUFJJVkFURSJ9LCAic3RhdHVzIjoiRU5BQkxFRCIsICJrZXlJZCI6NzQ0OTUxODM3LCAib3V0cHV0UHJlZml4VHlwZSI6IlRJTksifV19 +eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQcml2YXRlS2V5IiwgInZhbHVlIjoiRWtZUUFSb2cwK0MySmVhQmI1N3JlT3M1YTk5Qy9zcDQ5SDg3OGdzYnhwa2xHb3NWbDV3aUlDcklpaHMyK0I4QjRMWUNTeHgrRGNaejhMQkFFa0c3ZEU4ejM4SVFoajF0R2lDWS9EUGtIdmdVSGtxaUF6RnFuWG5EZUNORzF1Z2gwY1huUHBTNmFaMXJ0Zz09IiwgImtleU1hdGVyaWFsVHlwZSI6IkFTWU1NRVRSSUNfUFJJVkFURSJ9LCAic3RhdHVzIjoiRU5BQkxFRCIsICJrZXlJZCI6NzQ0OTUxODM3LCAib3V0cHV0UHJlZml4VHlwZSI6IlRJTksifV19 \ No newline at end of file diff --git a/pkg/authmode/keyset/public_ec256.key b/pkg/authmode/keyset/public_ec256.key index c602396352..1634ab615f 100644 --- a/pkg/authmode/keyset/public_ec256.key +++ b/pkg/authmode/keyset/public_ec256.key @@ -1 +1 @@ -eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQdWJsaWNLZXkiLCAidmFsdWUiOiJFQUVhSU5QZ3RpWG1nVytlNjNqck9XdmZRdjdLZVBSL08vSUxHOGFaSlJxTEZaZWNJaUFxeUlvYk52Z2ZBZUMyQWtzY2ZnM0djL0N3UUJKQnUzUlBNOS9DRUlZOWJRPT0iLCAia2V5TWF0ZXJpYWxUeXBlIjoiQVNZTU1FVFJJQ19QVUJMSUMifSwgInN0YXR1cyI6IkVOQUJMRUQiLCAia2V5SWQiOjc0NDk1MTgzNywgIm91dHB1dFByZWZpeFR5cGUiOiJUSU5LIn1dfQ +eyJwcmltYXJ5S2V5SWQiOjc0NDk1MTgzNywgImtleSI6W3sia2V5RGF0YSI6eyJ0eXBlVXJsIjoidHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuSnd0RWNkc2FQdWJsaWNLZXkiLCAidmFsdWUiOiJFQUVhSU5QZ3RpWG1nVytlNjNqck9XdmZRdjdLZVBSL08vSUxHOGFaSlJxTEZaZWNJaUFxeUlvYk52Z2ZBZUMyQWtzY2ZnM0djL0N3UUJKQnUzUlBNOS9DRUlZOWJRPT0iLCAia2V5TWF0ZXJpYWxUeXBlIjoiQVNZTU1FVFJJQ19QVUJMSUMifSwgInN0YXR1cyI6IkVOQUJMRUQiLCAia2V5SWQiOjc0NDk1MTgzNywgIm91dHB1dFByZWZpeFR5cGUiOiJUSU5LIn1dfQ \ No newline at end of file diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 5c8a3227c6..f7b03b1ef9 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -691,19 +691,22 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers return nil, nil, fmt.Errorf("could not load encryption service: %w", err) } - // create a new JWT manager - var jwtManagerOpts []token.JWTManagerOpt + jwtEncryptionSvc := encryptionSvc if authmode.Disabled { - jwtManagerOpts = append(jwtManagerOpts, token.WithAuthDisabledVerifier(authmode.EmbeddedPublicKeyset())) + jwtEncryptionSvc, err = encryption.NewInsecureJWTEncryption(authmode.EmbeddedPrivateKeyset(), authmode.EmbeddedPublicKeyset()) + + if err != nil { + return nil, nil, fmt.Errorf("could not load authdisabled keyset: %w", err) + } } - auth.JWTManager, err = token.NewJWTManager(encryptionSvc, dc.V1.APIToken(), &token.TokenOpts{ + auth.JWTManager, err = token.NewJWTManager(jwtEncryptionSvc, dc.V1.APIToken(), &token.TokenOpts{ Issuer: cf.Runtime.ServerURL, Audience: cf.Runtime.ServerURL, GRPCBroadcastAddress: cf.Runtime.GRPCBroadcastAddress, ServerURL: cf.Runtime.ServerURL, - }, jwtManagerOpts...) + }) if err != nil { return nil, nil, fmt.Errorf("could not create JWT manager: %w", err) @@ -1007,6 +1010,7 @@ func applyAuthDisabledOverrides(rt *server.ConfigFileRuntime) { rt.AllowCreateTenant = false rt.AllowSignup = false rt.AllowInvites = false + rt.AllowChangePassword = false } func loadInternalClient(l *zerolog.Logger, conf *server.InternalClientTLSConfigFile, baseServerTLS shared.TLSConfigFile, grpcBroadcastAddress string, grpcInsecure bool) (*clientv1.GRPCClientFactory, error) { diff --git a/pkg/encryption/insecure_jwt.go b/pkg/encryption/insecure_jwt.go new file mode 100644 index 0000000000..0b1f3e7fef --- /dev/null +++ b/pkg/encryption/insecure_jwt.go @@ -0,0 +1,57 @@ +package encryption + +import ( + "fmt" + + "github.com/tink-crypto/tink-go/keyset" +) + +type insecureJWTEncryptionService struct { + privateEc256Handle *keyset.Handle + publicEc256Handle *keyset.Handle +} + +// NewInsecureJWTEncryption builds an EncryptionService from cleartext JWT keysets; only the JWT +// handles are usable, Encrypt/Decrypt return errors. +func NewInsecureJWTEncryption(privateEc256, publicEc256 []byte) (*insecureJWTEncryptionService, error) { + privateHandle, err := InsecureHandleFromBytes(privateEc256) + + if err != nil { + return nil, err + } + + publicHandle, err := InsecureHandleFromBytes(publicEc256) + + if err != nil { + return nil, err + } + + return &insecureJWTEncryptionService{ + privateEc256Handle: privateHandle, + publicEc256Handle: publicHandle, + }, nil +} + +func (svc *insecureJWTEncryptionService) Encrypt(plaintext []byte, dataId string) ([]byte, error) { + return nil, fmt.Errorf("encrypt not supported by insecure JWT encryption service") +} + +func (svc *insecureJWTEncryptionService) Decrypt(ciphertext []byte, dataId string) ([]byte, error) { + return nil, fmt.Errorf("decrypt not supported by insecure JWT encryption service") +} + +func (svc *insecureJWTEncryptionService) EncryptString(plaintext string, dataId string) (string, error) { + return "", fmt.Errorf("encrypt not supported by insecure JWT encryption service") +} + +func (svc *insecureJWTEncryptionService) DecryptString(ciphertext string, dataId string) (string, error) { + return "", fmt.Errorf("decrypt not supported by insecure JWT encryption service") +} + +func (svc *insecureJWTEncryptionService) GetPrivateJWTHandle() *keyset.Handle { + return svc.privateEc256Handle +} + +func (svc *insecureJWTEncryptionService) GetPublicJWTHandle() *keyset.Handle { + return svc.publicEc256Handle +} From aa4700c21b4a05377d27d96d8eef790d5a15592f Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Mon, 6 Jul 2026 00:11:18 +0200 Subject: [PATCH 24/48] embed mode: initial commit --- .github/workflows/pre-release.yaml | 14 + .pre-commit-config.yaml | 6 + .task/checksum/dashboard-embed | 1 + Taskfile.yaml | 28 ++ api/v1/server/authn/middleware.go | 2 +- api/v1/server/authz/middleware.go | 2 +- api/v1/server/handlers/metadata/get.go | 2 +- cmd/hatchet-engine/main.go | 9 +- hack/ci/check-version-matches-tag.sh | 32 ++ hatchetembed/.gitattributes | 6 + hatchetembed/dashboard.go | 48 ++ .../assets/ArrowPathIcon-7-QIcdZ1.js | 1 + .../ExclamationTriangleIcon-CruVDzqB.js | 1 + .../dashboard/assets/KeyIcon-DY8qn5rN.js | 1 + .../dashboard/assets/PlusIcon-Cn-pCVk3.js | 1 + .../assets/ServerStackIcon-nXfmiORr.js | 1 + .../dashboard/assets/XMarkIcon-BazlLPpF.js | 1 + .../dashboard/assets/accordion-CBy735bO.js | 1 + .../dashboard/assets/auth-layout-iBwbZOUC.js | 16 + .../dashboard/assets/auth-page-CDHDcFHW.js | 11 + .../assets/authenticated-Dx4rOWYX.js | 1 + .../dashboard/assets/billing-Cllt8jqB.js | 1 + .../assets/billing-required-TKoe60qy.js | 1 + .../assets/confirm-dialog-CMXood8J.js | 1 + .../assets/create-worker-form-CwO9Ppzx.js | 2 + .../assets/data-contracts-BsCw40yT.js | 1 + .../assets/github-button-Bg3zFNFs.js | 1 + .../assets/global-emitter-Y_aFw8Zc.js | 1 + .../dashboard/assets/index--gDRExcs.js | 1 + .../dashboard/assets/index-6bdxZZIJ.js | 1 + .../dashboard/assets/index-B8ZIkEyz.js | 1 + .../dashboard/assets/index-BfCF55uu.js | 1 + .../dashboard/assets/index-BhNMQvJK.js | 1 + .../dashboard/assets/index-BjeCcGOX.js | 1 + .../dashboard/assets/index-Bk1maSCV.js | 1 + .../dashboard/assets/index-BnRg_ecZ.js | 1 + .../dashboard/assets/index-BsmMkLz7.js | 26 + .../dashboard/assets/index-C8__5p50.js | 1 + .../dashboard/assets/index-CFQLfotn.js | 1 + .../dashboard/assets/index-CKuymrZy.js | 8 + .../dashboard/assets/index-CQOYucXO.js | 1 + .../dashboard/assets/index-CZayBdOE.js | 1 + .../dashboard/assets/index-Cav1D8tQ.js | 1 + .../dashboard/assets/index-Cbzx2tRp.js | 1 + .../dashboard/assets/index-CgbK7Qzb.js | 6 + .../dashboard/assets/index-CqFaS3ri.js | 1 + .../dashboard/assets/index-CsdMB0IO.js | 1 + .../dashboard/assets/index-Cv9GYExf.js | 1 + .../dashboard/assets/index-CxZ5d6ga.js | 1 + .../dashboard/assets/index-D3mkQrYj.js | 1 + .../dashboard/assets/index-D5hDqXBK.js | 6 + .../dashboard/assets/index-DK4vQ8G3.js | 1 + .../dashboard/assets/index-DM7I-Hm9.js | 1 + .../dashboard/assets/index-DXK1Y_MW.js | 1 + .../dashboard/assets/index-DoDygpS4.js | 38 ++ .../dashboard/assets/index-DzA9wyrg.js | 1 + .../dashboard/assets/index-Fd0xVSp_.css | 1 + .../dashboard/assets/index-O5nwRdcL.js | 57 +++ .../dashboard/assets/index-Szwct97L.js | 1 + .../dashboard/assets/index-dwVl8GdI.css | 1 + .../dashboard/assets/index-jG0QnzWT.js | 6 + .../dashboard/assets/index-liT-riRX.js | 1 + .../dashboard/assets/index-maO15O3V.js | 1 + .../dashboard/assets/index-oGawEXJa.js | 14 + .../dashboard/assets/index-pi5SpzWM.js | 1 + .../dashboard/assets/index-wypz6hY5.js | 466 ++++++++++++++++++ .../dashboard/assets/index-zTXL414p.js | 1 + .../dashboard/assets/invite-modal-DH7a-93Y.js | 1 + .../assets/managed-compute-cM-46wXY.js | 1 + .../assets/managed-workers-gate-DSQbhr0o.js | 16 + .../new-organization-saver-form-Uz97g08A.js | 1 + .../assets/new-tenant-saver-form-CeUxqioj.js | 1 + .../dashboard/assets/no-auth-C6-sACqc.js | 1 + .../assets/organization-selector-BF1UJlxh.js | 1 + .../dashboard/assets/outlet-C0gyZt4v.js | 1 + .../dashboard/assets/redirect-DImNvkP_.js | 1 + .../assets/resource-limit-columns-7zhUq4Ly.js | 1 + .../assets/resource-limit-status-ynncxZIe.js | 1 + .../assets/resource-not-found-C1NYDT14.js | 1 + .../assets/secret-copier-BNLi8BbD.js | 4 + .../assets/settings-page-header-Dal4BvfD.js | 1 + .../assets/shard-deployment-key-CJfQX3l3.js | 1 + .../dashboard/assets/shield-check-lCThuR8D.js | 6 + .../dashboard/assets/steps-2xcvKVXE.js | 1 + .../dashboard/assets/support-chat-CGvrRU-a.js | 1 + .../dashboard/assets/switch-C23Bp5tT.js | 1 + .../tenant-resource-limits-table-xMx7u5rD.js | 1 + .../assets/tenant-wrapper-DXQKBTdd.js | 1 + .../dashboard/assets/top-nav-CUkIIMqx.js | 26 + .../assets/upgrade-required-BNScyCLS.js | 1 + .../assets/use-analytics-BZxgE2Kk.js | 2 + .../assets/use-pending-invites-DaP3hNjC.js | 1 + .../assets/welcome-modal-state-B1mOgpQO.js | 1 + hatchetembed/dashboard/favicon.svg | 16 + hatchetembed/dashboard/index.html | 24 + hatchetembed/dashboard/noise.png | Bin 0 -> 663717 bytes hatchetembed/hatchetembed.go | 327 ++++++++++++ hatchetembed/options.go | 123 +++++ pkg/config/loader/loader.go | 4 +- pkg/config/server/server.go | 9 + pkg/version/version.go | 12 + sdks/go/examples/embedded/main.go | 85 ++++ 102 files changed, 1517 insertions(+), 8 deletions(-) create mode 100644 .task/checksum/dashboard-embed create mode 100755 hack/ci/check-version-matches-tag.sh create mode 100644 hatchetembed/.gitattributes create mode 100644 hatchetembed/dashboard.go create mode 100644 hatchetembed/dashboard/assets/ArrowPathIcon-7-QIcdZ1.js create mode 100644 hatchetembed/dashboard/assets/ExclamationTriangleIcon-CruVDzqB.js create mode 100644 hatchetembed/dashboard/assets/KeyIcon-DY8qn5rN.js create mode 100644 hatchetembed/dashboard/assets/PlusIcon-Cn-pCVk3.js create mode 100644 hatchetembed/dashboard/assets/ServerStackIcon-nXfmiORr.js create mode 100644 hatchetembed/dashboard/assets/XMarkIcon-BazlLPpF.js create mode 100644 hatchetembed/dashboard/assets/accordion-CBy735bO.js create mode 100644 hatchetembed/dashboard/assets/auth-layout-iBwbZOUC.js create mode 100644 hatchetembed/dashboard/assets/auth-page-CDHDcFHW.js create mode 100644 hatchetembed/dashboard/assets/authenticated-Dx4rOWYX.js create mode 100644 hatchetembed/dashboard/assets/billing-Cllt8jqB.js create mode 100644 hatchetembed/dashboard/assets/billing-required-TKoe60qy.js create mode 100644 hatchetembed/dashboard/assets/confirm-dialog-CMXood8J.js create mode 100644 hatchetembed/dashboard/assets/create-worker-form-CwO9Ppzx.js create mode 100644 hatchetembed/dashboard/assets/data-contracts-BsCw40yT.js create mode 100644 hatchetembed/dashboard/assets/github-button-Bg3zFNFs.js create mode 100644 hatchetembed/dashboard/assets/global-emitter-Y_aFw8Zc.js create mode 100644 hatchetembed/dashboard/assets/index--gDRExcs.js create mode 100644 hatchetembed/dashboard/assets/index-6bdxZZIJ.js create mode 100644 hatchetembed/dashboard/assets/index-B8ZIkEyz.js create mode 100644 hatchetembed/dashboard/assets/index-BfCF55uu.js create mode 100644 hatchetembed/dashboard/assets/index-BhNMQvJK.js create mode 100644 hatchetembed/dashboard/assets/index-BjeCcGOX.js create mode 100644 hatchetembed/dashboard/assets/index-Bk1maSCV.js create mode 100644 hatchetembed/dashboard/assets/index-BnRg_ecZ.js create mode 100644 hatchetembed/dashboard/assets/index-BsmMkLz7.js create mode 100644 hatchetembed/dashboard/assets/index-C8__5p50.js create mode 100644 hatchetembed/dashboard/assets/index-CFQLfotn.js create mode 100644 hatchetembed/dashboard/assets/index-CKuymrZy.js create mode 100644 hatchetembed/dashboard/assets/index-CQOYucXO.js create mode 100644 hatchetembed/dashboard/assets/index-CZayBdOE.js create mode 100644 hatchetembed/dashboard/assets/index-Cav1D8tQ.js create mode 100644 hatchetembed/dashboard/assets/index-Cbzx2tRp.js create mode 100644 hatchetembed/dashboard/assets/index-CgbK7Qzb.js create mode 100644 hatchetembed/dashboard/assets/index-CqFaS3ri.js create mode 100644 hatchetembed/dashboard/assets/index-CsdMB0IO.js create mode 100644 hatchetembed/dashboard/assets/index-Cv9GYExf.js create mode 100644 hatchetembed/dashboard/assets/index-CxZ5d6ga.js create mode 100644 hatchetembed/dashboard/assets/index-D3mkQrYj.js create mode 100644 hatchetembed/dashboard/assets/index-D5hDqXBK.js create mode 100644 hatchetembed/dashboard/assets/index-DK4vQ8G3.js create mode 100644 hatchetembed/dashboard/assets/index-DM7I-Hm9.js create mode 100644 hatchetembed/dashboard/assets/index-DXK1Y_MW.js create mode 100644 hatchetembed/dashboard/assets/index-DoDygpS4.js create mode 100644 hatchetembed/dashboard/assets/index-DzA9wyrg.js create mode 100644 hatchetembed/dashboard/assets/index-Fd0xVSp_.css create mode 100644 hatchetembed/dashboard/assets/index-O5nwRdcL.js create mode 100644 hatchetembed/dashboard/assets/index-Szwct97L.js create mode 100644 hatchetembed/dashboard/assets/index-dwVl8GdI.css create mode 100644 hatchetembed/dashboard/assets/index-jG0QnzWT.js create mode 100644 hatchetembed/dashboard/assets/index-liT-riRX.js create mode 100644 hatchetembed/dashboard/assets/index-maO15O3V.js create mode 100644 hatchetembed/dashboard/assets/index-oGawEXJa.js create mode 100644 hatchetembed/dashboard/assets/index-pi5SpzWM.js create mode 100644 hatchetembed/dashboard/assets/index-wypz6hY5.js create mode 100644 hatchetembed/dashboard/assets/index-zTXL414p.js create mode 100644 hatchetembed/dashboard/assets/invite-modal-DH7a-93Y.js create mode 100644 hatchetembed/dashboard/assets/managed-compute-cM-46wXY.js create mode 100644 hatchetembed/dashboard/assets/managed-workers-gate-DSQbhr0o.js create mode 100644 hatchetembed/dashboard/assets/new-organization-saver-form-Uz97g08A.js create mode 100644 hatchetembed/dashboard/assets/new-tenant-saver-form-CeUxqioj.js create mode 100644 hatchetembed/dashboard/assets/no-auth-C6-sACqc.js create mode 100644 hatchetembed/dashboard/assets/organization-selector-BF1UJlxh.js create mode 100644 hatchetembed/dashboard/assets/outlet-C0gyZt4v.js create mode 100644 hatchetembed/dashboard/assets/redirect-DImNvkP_.js create mode 100644 hatchetembed/dashboard/assets/resource-limit-columns-7zhUq4Ly.js create mode 100644 hatchetembed/dashboard/assets/resource-limit-status-ynncxZIe.js create mode 100644 hatchetembed/dashboard/assets/resource-not-found-C1NYDT14.js create mode 100644 hatchetembed/dashboard/assets/secret-copier-BNLi8BbD.js create mode 100644 hatchetembed/dashboard/assets/settings-page-header-Dal4BvfD.js create mode 100644 hatchetembed/dashboard/assets/shard-deployment-key-CJfQX3l3.js create mode 100644 hatchetembed/dashboard/assets/shield-check-lCThuR8D.js create mode 100644 hatchetembed/dashboard/assets/steps-2xcvKVXE.js create mode 100644 hatchetembed/dashboard/assets/support-chat-CGvrRU-a.js create mode 100644 hatchetembed/dashboard/assets/switch-C23Bp5tT.js create mode 100644 hatchetembed/dashboard/assets/tenant-resource-limits-table-xMx7u5rD.js create mode 100644 hatchetembed/dashboard/assets/tenant-wrapper-DXQKBTdd.js create mode 100644 hatchetembed/dashboard/assets/top-nav-CUkIIMqx.js create mode 100644 hatchetembed/dashboard/assets/upgrade-required-BNScyCLS.js create mode 100644 hatchetembed/dashboard/assets/use-analytics-BZxgE2Kk.js create mode 100644 hatchetembed/dashboard/assets/use-pending-invites-DaP3hNjC.js create mode 100644 hatchetembed/dashboard/assets/welcome-modal-state-B1mOgpQO.js create mode 100644 hatchetembed/dashboard/favicon.svg create mode 100644 hatchetembed/dashboard/index.html create mode 100644 hatchetembed/dashboard/noise.png create mode 100644 hatchetembed/hatchetembed.go create mode 100644 hatchetembed/options.go create mode 100644 pkg/version/version.go create mode 100644 sdks/go/examples/embedded/main.go diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 599f168891..95d3e5b88d 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -4,8 +4,22 @@ on: - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 name: Create prerelease w/ binaries and static assets jobs: + check-version: + name: check version matches tag + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Verify pkg/version matches the tag + run: ./hack/ci/check-version-matches-tag.sh ${{ steps.tag_name.outputs.tag }} build-push-hatchet-api-amd: name: hatchet-api + needs: check-version runs-on: ubuntu-latest steps: - name: Get tag name diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88f260e892..a996d87a8e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,12 @@ repos: language: system pass_filenames: false files: ^sdks/ruby/src/CHANGELOG\.md$ + - id: embed-dashboard + name: rebuild and embed dashboard into hatchetembed + entry: task dashboard:embed + language: system + pass_filenames: false + files: ^frontend/app/ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: diff --git a/.task/checksum/dashboard-embed b/.task/checksum/dashboard-embed new file mode 100644 index 0000000000..0801ec5022 --- /dev/null +++ b/.task/checksum/dashboard-embed @@ -0,0 +1 @@ +ae4a82f5f154c0b8ae343e687038ef5b diff --git a/Taskfile.yaml b/Taskfile.yaml index 50bceb3eb1..612f16b7fe 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -10,6 +10,26 @@ tasks: - task: generate-docs - task: set-env-all - task: seed-dev + dashboard:embed: + desc: Build the frontend and embed it into the hatchetembed package (github.com/hatchet-dev/hatchet/hatchetembed). + # Only rebuilds when a frontend source file has actually changed (checksum fingerprint). + method: checksum + sources: + - frontend/app/src/**/* + - frontend/app/public/**/* + - frontend/app/index.html + - frontend/app/package.json + - frontend/app/vite.config.ts + - frontend/app/tsconfig*.json + - frontend/app/tailwind.config.js + - frontend/app/postcss.config.js + generates: + - hatchetembed/dashboard/**/* + cmds: + - pnpm --dir frontend/app exec vite build --sourcemap false + - rm -rf hatchetembed/dashboard + - mkdir -p hatchetembed/dashboard + - cp -R frontend/app/dist/. hatchetembed/dashboard/ set-env-db: cmds: - | @@ -343,6 +363,8 @@ tasks: msg: "{{.TAG}} is already an annotated tag." - sh: ./hack/ci/release-notes-cli.sh {{.TAG}} msg: "CHANGELOG.md must contain an entry for {{.TAG}}." + - sh: ./hack/ci/check-version-matches-tag.sh {{.TAG}} + msg: "pkg/version/version.go must be bumped to {{.TAG}} (the engine reports it to SDKs and hatchetembed embeds it)." prompt: Create new release for tag {{.TAG}}? cmds: # cleanup=verbatim: markdown header hashes are otherwise stripped as comments. @@ -353,11 +375,13 @@ tasks: desc: Bump patch version (e.g. v0.83.16 → v0.83.17) and push the tag cmds: - | + set -e current=$(git describe --tags --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*') IFS='.' read -r major minor patch <<< "${current#v}" patch=$((patch + 1)) next="v${major}.${minor}.${patch}" echo "Bumping ${current} → ${next}" + ./hack/ci/check-version-matches-tag.sh "${next}" git tag "${next}" git push origin "${next}" @@ -365,11 +389,13 @@ tasks: desc: Bump minor version (e.g. v0.83.16 → v0.84.0) and push the tag cmds: - | + set -e current=$(git describe --tags --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*') IFS='.' read -r major minor patch <<< "${current#v}" minor=$((minor + 1)) next="v${major}.${minor}.0" echo "Bumping ${current} → ${next}" + ./hack/ci/check-version-matches-tag.sh "${next}" git tag "${next}" git push origin "${next}" @@ -377,6 +403,7 @@ tasks: desc: Bump to next alpha pre-release (e.g. v0.83.16 → v0.83.16-alpha.0, or v0.83.16-alpha.0 → v0.83.16-alpha.1) cmds: - | + set -e current=$(git describe --tags --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*') base="${current%%-alpha.*}" if [[ "${current}" == *-alpha.* ]]; then @@ -386,5 +413,6 @@ tasks: next="${base}-alpha.0" fi echo "Bumping ${current} → ${next}" + ./hack/ci/check-version-matches-tag.sh "${next}" git tag "${next}" git push origin "${next}" diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index f3222b3681..6378372a2d 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -61,7 +61,7 @@ func (a *AuthN) authenticate(c echo.Context, r *middleware.RouteInfo) error { return a.handleNoAuth(c) } - if authmode.Disabled { + if authmode.Disabled || a.config.Runtime.AuthDisabled { return a.handleAuthDisabledBypass(c) } diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 42c0a38875..49959d77bc 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -49,7 +49,7 @@ func (a *AuthZ) authorize(c echo.Context, r *middleware.RouteInfo) error { return nil } - if authmode.Disabled && rbac.OperationIn(r.OperationID, authDisabledDeniedOperations) { + if (authmode.Disabled || a.config.Runtime.AuthDisabled) && rbac.OperationIn(r.OperationID, authDisabledDeniedOperations) { return echo.NewHTTPError(http.StatusForbidden, "This operation is disabled while authentication is disabled") } diff --git a/api/v1/server/handlers/metadata/get.go b/api/v1/server/handlers/metadata/get.go index 41f0942f66..f1bd7c10af 100644 --- a/api/v1/server/handlers/metadata/get.go +++ b/api/v1/server/handlers/metadata/get.go @@ -37,7 +37,7 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR prometheusServerEnabled := u.config.Prometheus.PrometheusServerURL != "" - authDisabled := authmode.Disabled + authDisabled := authmode.Disabled || u.config.Runtime.AuthDisabled meta := gen.APIMeta{ Auth: &gen.APIMetaAuth{ diff --git a/cmd/hatchet-engine/main.go b/cmd/hatchet-engine/main.go index 3f7a2d5803..b8a2e47a97 100644 --- a/cmd/hatchet-engine/main.go +++ b/cmd/hatchet-engine/main.go @@ -12,6 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/cmd/hatchet-engine/engine" "github.com/hatchet-dev/hatchet/pkg/cmdutils" "github.com/hatchet-dev/hatchet/pkg/config/loader" + "github.com/hatchet-dev/hatchet/pkg/version" ) var printVersion bool @@ -45,9 +46,11 @@ var rootCmd = &cobra.Command{ }, } -// Version will be linked by an ldflag during build -// FIXME: automate this version update on tag, we use it to version the engine for sdks -var Version = "v0.83.4" +// Version is the engine version reported to SDK clients. Release builds override it via +// `-ldflags "-X main.Version="`; otherwise it falls back to the canonical pkg/version constant, +// which is the single source of truth (kept in sync with the release tag by the +// check-version-matches-tag CI guard). +var Version = version.Version func main() { rootCmd.PersistentFlags().BoolVar( diff --git a/hack/ci/check-version-matches-tag.sh b/hack/ci/check-version-matches-tag.sh new file mode 100755 index 0000000000..b264f57135 --- /dev/null +++ b/hack/ci/check-version-matches-tag.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Fails if the canonical pkg/version constant does not match the release tag. +# +# The engine reports pkg/version.Version to SDK clients, and library consumers such as +# github.com/hatchet-dev/hatchet/hatchetembed read it directly (no ldflag), so it must equal the tag +# being released. Run this from the release pipeline with the tag as the first argument, e.g. +# +# ./hack/ci/check-version-matches-tag.sh v0.83.4 +# +set -eu + +TAG="${1:-}" +if [ -z "$TAG" ]; then + echo "usage: $0 " >&2 + exit 2 +fi + +# Extract the string literal from `const Version = "..."` in pkg/version/version.go. +CONST=$(sed -n 's/^const Version = "\(.*\)".*/\1/p' pkg/version/version.go) + +if [ -z "$CONST" ]; then + echo "could not read Version from pkg/version/version.go" >&2 + exit 1 +fi + +if [ "$CONST" != "$TAG" ]; then + echo "version mismatch: pkg/version.Version is '$CONST' but the tag is '$TAG'." >&2 + echo "Update pkg/version/version.go to '$TAG' before releasing." >&2 + exit 1 +fi + +echo "version OK: pkg/version.Version matches tag $TAG" diff --git a/hatchetembed/.gitattributes b/hatchetembed/.gitattributes new file mode 100644 index 0000000000..2011e1f262 --- /dev/null +++ b/hatchetembed/.gitattributes @@ -0,0 +1,6 @@ +# The dashboard/ directory holds the built frontend, generated by `task dashboard:embed` from +# frontend/app and embedded into this package via go:embed. It is generated output, not source — +# mark it so reviews collapse the diffs, language stats ignore it, and merges don't conflict on it. +dashboard/** linguist-generated=true +dashboard/** -diff +dashboard/** -merge diff --git a/hatchetembed/dashboard.go b/hatchetembed/dashboard.go new file mode 100644 index 0000000000..d75dddaab0 --- /dev/null +++ b/hatchetembed/dashboard.go @@ -0,0 +1,48 @@ +package hatchetembed + +import ( + "embed" + "fmt" + "io/fs" + "net/http" + "path" + "strings" +) + +// dashboardFS holds the built frontend dashboard, embedded into the binary. The contents of the +// dashboard/ directory are generated from frontend/app by `task dashboard:embed`; a placeholder +// index.html is committed so the package always compiles. +// +//go:embed all:dashboard +var dashboardFS embed.FS + +// dashboardHandler returns an http.Handler serving the embedded dashboard single-page app. Requests +// for paths that don't map to a real asset fall back to index.html so client-side routes resolve. +func dashboardHandler() (http.Handler, error) { + sub, err := fs.Sub(dashboardFS, "dashboard") + if err != nil { + return nil, fmt.Errorf("could not open embedded dashboard: %w", err) + } + + indexBytes, err := fs.ReadFile(sub, "index.html") + if err != nil { + return nil, fmt.Errorf("embedded dashboard is missing index.html (build it with `task dashboard:embed`): %w", err) + } + + fileServer := http.FileServer(http.FS(sub)) + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + reqPath := strings.TrimPrefix(path.Clean(r.URL.Path), "/") + + if reqPath != "" { + if _, statErr := fs.Stat(sub, reqPath); statErr == nil { + fileServer.ServeHTTP(w, r) + return + } + } + + // SPA fallback for the index and client-side routes. + w.Header().Set("Content-Type", "text/html; charset=utf-8") + _, _ = w.Write(indexBytes) + }), nil +} diff --git a/hatchetembed/dashboard/assets/ArrowPathIcon-7-QIcdZ1.js b/hatchetembed/dashboard/assets/ArrowPathIcon-7-QIcdZ1.js new file mode 100644 index 0000000000..61cc7c3700 --- /dev/null +++ b/hatchetembed/dashboard/assets/ArrowPathIcon-7-QIcdZ1.js @@ -0,0 +1 @@ +import{k as n}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3f37a688-a59e-41c4-a0c6-4300f6468796",e._sentryDebugIdIdentifier="sentry-dbid-3f37a688-a59e-41c4-a0c6-4300f6468796")}catch{}})();function a({title:e,titleId:r,...t},o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const s=n.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/ExclamationTriangleIcon-CruVDzqB.js b/hatchetembed/dashboard/assets/ExclamationTriangleIcon-CruVDzqB.js new file mode 100644 index 0000000000..e966db1363 --- /dev/null +++ b/hatchetembed/dashboard/assets/ExclamationTriangleIcon-CruVDzqB.js @@ -0,0 +1 @@ +import{k as r}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b4628f1d-f7f8-47a7-95e1-4b959afae7b8",e._sentryDebugIdIdentifier="sentry-dbid-b4628f1d-f7f8-47a7-95e1-4b959afae7b8")}catch{}})();function a({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const f=r.forwardRef(a);export{f as F}; diff --git a/hatchetembed/dashboard/assets/KeyIcon-DY8qn5rN.js b/hatchetembed/dashboard/assets/KeyIcon-DY8qn5rN.js new file mode 100644 index 0000000000..42889835c2 --- /dev/null +++ b/hatchetembed/dashboard/assets/KeyIcon-DY8qn5rN.js @@ -0,0 +1 @@ +import{k as r}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5328728a-2b08-4027-859e-83d9e2500057",e._sentryDebugIdIdentifier="sentry-dbid-5328728a-2b08-4027-859e-83d9e2500057")}catch{}})();function a({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))}const s=r.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/PlusIcon-Cn-pCVk3.js b/hatchetembed/dashboard/assets/PlusIcon-Cn-pCVk3.js new file mode 100644 index 0000000000..ab0be3b0ef --- /dev/null +++ b/hatchetembed/dashboard/assets/PlusIcon-Cn-pCVk3.js @@ -0,0 +1 @@ +import{k as r}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46e058a9-e886-4427-a38d-134901ddb530",e._sentryDebugIdIdentifier="sentry-dbid-46e058a9-e886-4427-a38d-134901ddb530")}catch{}})();function d({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const s=r.forwardRef(d);export{s as F}; diff --git a/hatchetembed/dashboard/assets/ServerStackIcon-nXfmiORr.js b/hatchetembed/dashboard/assets/ServerStackIcon-nXfmiORr.js new file mode 100644 index 0000000000..39a65d230f --- /dev/null +++ b/hatchetembed/dashboard/assets/ServerStackIcon-nXfmiORr.js @@ -0,0 +1 @@ +import{k as n}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c282605c-3217-4bf5-988a-691f7f04ed6f",e._sentryDebugIdIdentifier="sentry-dbid-c282605c-3217-4bf5-988a-691f7f04ed6f")}catch{}})();function o({title:e,titleId:r,...t},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"}))}const f=n.forwardRef(o);export{f as F}; diff --git a/hatchetembed/dashboard/assets/XMarkIcon-BazlLPpF.js b/hatchetembed/dashboard/assets/XMarkIcon-BazlLPpF.js new file mode 100644 index 0000000000..c97eec76da --- /dev/null +++ b/hatchetembed/dashboard/assets/XMarkIcon-BazlLPpF.js @@ -0,0 +1 @@ +import{k as n}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f3b26164-20ca-47d0-a60e-3b158bb9e9cb",e._sentryDebugIdIdentifier="sentry-dbid-f3b26164-20ca-47d0-a60e-3b158bb9e9cb")}catch{}})();function a({title:e,titleId:r,...t},o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const s=n.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/accordion-CBy735bO.js b/hatchetembed/dashboard/assets/accordion-CBy735bO.js new file mode 100644 index 0000000000..30d4dda6b0 --- /dev/null +++ b/hatchetembed/dashboard/assets/accordion-CBy735bO.js @@ -0,0 +1 @@ +import{R as l,j as a,e$ as oe,eK as V,eZ as re,eM as H,eN as te,eJ as ne,eP as ae,eS as ce,k as E,ai as se,e as N}from"./index-wypz6hY5.js";import{R as ie,T as le,a as de,c as K}from"./index-zTXL414p.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2c82b379-b91f-45bb-9ae3-3a6031a911cd",e._sentryDebugIdIdentifier="sentry-dbid-2c82b379-b91f-45bb-9ae3-3a6031a911cd")}catch{}})();var d="Accordion",pe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[D,fe,ue]=oe(d),[A]=ce(d,[ue,K]),k=K(),$=l.forwardRef((e,t)=>{const{type:o,...n}=e,c=n,r=n;return a.jsx(D.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?a.jsx(be,{...r,ref:t}):a.jsx(ve,{...c,ref:t})})});$.displayName=d;var[L,me]=A(d),[z,xe]=A(d,{collapsible:!1}),ve=l.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:c=()=>{},collapsible:r=!1,...i}=e,[s,p]=V({prop:o,defaultProp:n??"",onChange:c,caller:d});return a.jsx(L,{scope:e.__scopeAccordion,value:l.useMemo(()=>s?[s]:[],[s]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:a.jsx(z,{scope:e.__scopeAccordion,collapsible:r,children:a.jsx(G,{...i,ref:t})})})}),be=l.forwardRef((e,t)=>{const{value:o,defaultValue:n,onValueChange:c=()=>{},...r}=e,[i,s]=V({prop:o,defaultProp:n??[],onChange:c,caller:d}),p=l.useCallback(x=>s((u=[])=>[...u,x]),[s]),m=l.useCallback(x=>s((u=[])=>u.filter(h=>h!==x)),[s]);return a.jsx(L,{scope:e.__scopeAccordion,value:i,onItemOpen:p,onItemClose:m,children:a.jsx(z,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(G,{...r,ref:t})})})}),[ge,C]=A(d),G=l.forwardRef((e,t)=>{const{__scopeAccordion:o,disabled:n,dir:c,orientation:r="vertical",...i}=e,s=l.useRef(null),p=te(s,t),m=fe(o),u=ne(c)==="ltr",h=ae(e.onKeyDown,v=>{var M;if(!pe.includes(v.key))return;const X=v.target,I=m().filter(j=>{var O;return!((O=j.ref.current)!=null&&O.disabled)}),b=I.findIndex(j=>j.ref.current===X),T=I.length;if(b===-1)return;v.preventDefault();let f=b;const w=0,y=T-1,_=()=>{f=b+1,f>y&&(f=w)},R=()=>{f=b-1,f{const{__scopeAccordion:o,value:n,...c}=e,r=C(g,o),i=me(g,o),s=k(o),p=re(),m=n&&i.value.includes(n)||!1,x=r.disabled||e.disabled;return a.jsx(Ae,{scope:o,open:m,disabled:x,triggerId:p,children:a.jsx(ie,{"data-orientation":r.orientation,"data-state":F(m),...s,...c,ref:t,disabled:x,open:m,onOpenChange:u=>{u?i.onItemOpen(n):i.onItemClose(n)}})})});U.displayName=g;var J="AccordionHeader",Y=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,c=C(d,o),r=S(J,o);return a.jsx(H.h3,{"data-orientation":c.orientation,"data-state":F(r.open),"data-disabled":r.disabled?"":void 0,...n,ref:t})});Y.displayName=J;var P="AccordionTrigger",Z=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,c=C(d,o),r=S(P,o),i=xe(P,o),s=k(o);return a.jsx(D.ItemSlot,{scope:o,children:a.jsx(le,{"aria-disabled":r.open&&!i.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...s,...n,ref:t})})});Z.displayName=P;var q="AccordionContent",B=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...n}=e,c=C(d,o),r=S(q,o),i=k(o);return a.jsx(de,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});B.displayName=q;function F(e){return e?"open":"closed"}var Ce=$,he=U,Ie=Y,Q=Z,W=B;const Ne=Ce,we=E.forwardRef(({className:e,...t},o)=>a.jsx(he,{ref:o,className:e,...t}));we.displayName="AccordionItem";const ye=E.forwardRef(({className:e,children:t,hideChevron:o,headerClassName:n,...c},r)=>a.jsx(Ie,{className:N("flex",n),children:a.jsxs(Q,{ref:r,className:N("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 gap-x-1",e),...c,children:[t,!o&&a.jsx(se,{className:"h-4 w-4 shrink-0 text-gray-700 transition-transform duration-200 dark:text-gray-300"})]})}));ye.displayName=Q.displayName;const _e=E.forwardRef(({className:e,children:t,...o},n)=>a.jsx(W,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:a.jsx("div",{className:N("pb-4 pt-0",e),children:t})}));_e.displayName=W.displayName;export{Ne as A,we as a,ye as b,_e as c}; diff --git a/hatchetembed/dashboard/assets/auth-layout-iBwbZOUC.js b/hatchetembed/dashboard/assets/auth-layout-iBwbZOUC.js new file mode 100644 index 0000000000..843a135128 --- /dev/null +++ b/hatchetembed/dashboard/assets/auth-layout-iBwbZOUC.js @@ -0,0 +1,16 @@ +import{j as e,H as t}from"./index-wypz6hY5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="ee11c078-ae54-40fb-81b5-501c14d0763e",a._sentryDebugIdIdentifier="sentry-dbid-ee11c078-ae54-40fb-81b5-501c14d0763e")}catch{}})();function l(){return e.jsxs("div",{className:"relative flex h-full w-full flex-col justify-between",children:[e.jsx("div",{className:"relative",children:e.jsx(t,{className:"h-6 w-auto"})}),e.jsx("div",{className:"relative flex z-4 isolate w-full justify-end pb-10 lg:pb-12",children:e.jsxs("div",{className:"max-w-2xl text-right",children:[e.jsx("h1",{className:"text-5xl font-semibold tracking-[-0.02em] dark:text-[#b8d9ff] text-[#000000] lg:text-6xl [text-wrap:balance]",children:"The last orchestrator you’ll ever need"}),e.jsx("p",{className:"mt-4 text-base text-balance dark:text-[#b8d9ff77] dark:mix-blend-plus-lighter",children:"Run fast and reliable workflows for background jobs and agents."})]})})]})}function s({children:a}){const r={"--noise-url":'url("/noise.png")'};return e.jsxs("div",{className:"min-h-screen w-full lg:grid lg:grid-cols-[1fr_round(nearest,50%,24px)]",children:[e.jsxs("div",{className:"relative hidden overflow-hidden bg-muted/30 px-10 py-12 lg:flex",children:[e.jsx("div",{className:` + [--color1:color-mix(in_srgb,_hsl(287_69%_57%)_calc(100%_*_1),_transparent)] + [--color2:color-mix(in_srgb,_hsl(212_100%_60%)_calc(100%_*_.56),_transparent)] + [--direction:bottom] [--scale:5] [--gridSize:24px] [--n:6] [--t:1px] [--g:2px] [--c:#fff7_25%,#0000_0] + + pointer-events-none absolute left-0 bottom-0 w-full overflow-clip + [height:clamp(50rlh,30vh,50rlh)] + [background-color:#b8d9ff14] + [mask-image:linear-gradient(to_var(--direction),transparent_50%,white_100%),var(--noise-url),conic-gradient(at_var(--g)_var(--t),var(--c)),conic-gradient(from_180deg_at_var(--t)_var(--g),var(--c))] + [mask-position:0_0,0%_0%,calc((var(--gridSize)_/_var(--n)_-_var(--g)_+_var(--t))_/_2)_0,round(up,100%,calc(var(--g)*2))_calc((var(--gridSize)_/_var(--n)_-_var(--g)_+_var(--t))_/_2)] + [mask-size:100%,calc(300%*var(--scale))_calc(300%*var(--scale)),calc(var(--gridSize)_/_var(--n))_var(--gridSize),var(--gridSize)_calc(var(--gridSize)_/_var(--n))] + [mask-composite:intersect,add,add,subtract] + + before:absolute before:left-0 before:top-0 before:h-full before:w-full before:opacity-0 before:content-[''] before:bg-[repeating-radial-gradient(circle_at_50%_50%,transparent_0%,var(--color1)_20%,var(--color2)_25%,transparent_32%)] before:animate-[heroPulse_7s_linear_infinite] before:[animation-delay:3.5s] + + after:absolute after:left-0 after:top-0 after:h-full after:w-full after:opacity-0 after:content-[''] after:bg-[repeating-radial-gradient(circle_at_50%_50%,transparent_0%,var(--color2)_9%,var(--color1)_14%,transparent_21%)] after:animate-[heroPulse_6s_linear_infinite]`,style:r}),e.jsx(l,{})]}),e.jsx("div",{className:"w-full overflow-y-auto",children:e.jsx("div",{className:"flex min-h-screen w-full items-center justify-center px-4 py-10 lg:justify-start lg:px-12 lg:py-12",children:e.jsx("div",{className:"w-full max-w-lg",children:e.jsx("div",{className:"flex w-full flex-col justify-center space-y-6",children:a})})})})]})}export{s as A}; diff --git a/hatchetembed/dashboard/assets/auth-page-CDHDcFHW.js b/hatchetembed/dashboard/assets/auth-page-CDHDcFHW.js new file mode 100644 index 0000000000..62989c5cb0 --- /dev/null +++ b/hatchetembed/dashboard/assets/auth-page-CDHDcFHW.js @@ -0,0 +1,11 @@ +import{v as b,w as v,x as N,k as d,j as e,y as w,B as u,z as x,C as k,H as P,R as C}from"./index-wypz6hY5.js";import{A as E}from"./auth-layout-iBwbZOUC.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="ead53c02-f7c0-40d1-b25a-4c902539d10f",t._sentryDebugIdIdentifier="sentry-dbid-ead53c02-f7c0-40d1-b25a-4c902539d10f")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],S=b("arrow-left",I);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],_=b("lock-open",A);function B(){const[t,r]=v(),{toast:a}=N();d.useEffect(()=>{if(t.get("error")&&t.get("error")!==""){a({title:"Error",description:t.get("error")||"",duration:5e3});const s=new URLSearchParams(t);s.delete("error"),r(s)}},[t,r,a])}function z(){return e.jsxs("p",{"data-cy":"auth-legal",className:"w-full text-left text-sm text-gray-500 dark:text-gray-500",children:["By continuing, you agree to our"," ",e.jsx("a",{href:"https://hatchet.run/policies/terms",className:"underline underline-offset-4 hover:text-primary",children:"Terms of Service"}),","," ",e.jsx("a",{href:"https://hatchet.run/policies/cookie",className:"underline underline-offset-4 hover:text-primary",children:"Cookie"}),", and"," ",e.jsx("a",{href:"https://hatchet.run/policies/privacy",className:"underline underline-offset-4 hover:text-primary",children:"Privacy Policies"}),"."]})}const L={google:{href:"users/google/start",label:"Google",icon:e.jsx(x.google,{className:"size-4"})},github:{href:"users/github/start",label:"GitHub",icon:e.jsx(x.gitHub,{className:"size-4"})},sso:{href:"users/sso/start",label:"SSO",icon:e.jsx(_,{className:"size-4"})}};function R(){return e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-muted-foreground/20"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or continue with"})})]})}function D({provider:t,ssoExpanded:r,setSsoExpanded:a}){const s=L[t],{isControlPlaneEnabled:c}=w(),[n,o]=d.useState(""),i=c?"/api/v1/control-plane/":"/api/v1/";return t==="sso"?e.jsxs("div",{className:"w-full flex flex-col gap-2",children:[!r&&e.jsxs(u,{variant:"outline",type:"button",fullWidth:!0,onClick:()=>a(!0),className:"h-11 justify-center gap-2 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[s.icon,s.label]}),r&&e.jsx("div",{className:"flex gap-2",children:e.jsx("input",{type:"text",value:n,onChange:l=>o(l.target.value),placeholder:"Enter your email",className:"h-10 flex-1 rounded-md border border-muted-foreground/20 bg-background px-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})}),r&&e.jsx("a",{href:n?`${i+s.href}?email=${encodeURIComponent(n)}`:"#",onClick:l=>{n||l.preventDefault()},tabIndex:n?0:-1,children:e.jsx(u,{variant:"outline",type:"button",fullWidth:!0,disabled:!n,className:"h-10 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:"Continue"})}),r&&e.jsxs(u,{variant:"ghost",type:"button",size:"sm",onClick:()=>a(!1),className:"h-11 justify-left gap-1 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[e.jsx(S,{className:"size-4"}),"Back"]})]}):!r&&e.jsx("a",{href:i+s.href,className:"w-full",children:e.jsxs(u,{variant:"outline",type:"button",fullWidth:!0,className:"h-11 justify-center gap-2 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[s.icon,s.label]})})}function O({providers:t,ssoExpanded:r,setSsoExpanded:a}){return t.length===0?null:e.jsx("div",{className:"grid sm:grid-flow-col gap-3",children:t.map(s=>e.jsx(D,{provider:s,ssoExpanded:r,setSsoExpanded:a},s))})}function W({title:t,basicSection:r,altAction:a}){var g;B();const{meta:s}=k(),[c,n]=d.useState(!1),o=((g=s==null?void 0:s.auth)==null?void 0:g.schemes)||[],i=o.includes("basic"),l=o.includes("google"),p=o.includes("github"),j=o.includes("sso"),h=[l&&"google",p&&"github",j&&"sso"].filter(Boolean),f=[h.length>0&&e.jsx(O,{providers:h,ssoExpanded:c,setSsoExpanded:n}),!c&&i&&r].filter(Boolean);return e.jsxs(E,{children:[e.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[e.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:e.jsx(P,{className:"h-8 w-auto"})}),e.jsxs("div",{className:"flex w-full flex-col items-center gap-2 lg:flex-row lg:items-center lg:justify-between",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight","data-cy":"auth-title",children:t}),e.jsx("div",{className:"text-sm text-muted-foreground text-center lg:text-right",children:a})]})]}),f.map((y,m)=>e.jsxs(C.Fragment,{children:[y,m{var M,R;const[s,i]=o.useState([]),[g,r]=o.useState(),{handleApiError:u}=he({setFieldErrors:()=>{}}),d=pe(),{tenantMemberListQuery:p}=Xe(),m=xe(),w=Z({...d.organizationGetQuery(t)}),b=Z({...p(n)}),x=new Set((((M=b.data)==null?void 0:M.rows)??[]).map(l=>l.user.email)),S=(((R=w.data)==null?void 0:R.members)??[]).filter(l=>!x.has(l.email)),j=ee({...d.organizationTenantMembersAddMutation(t,n),onSuccess:()=>{m.invalidateQueries({queryKey:["organization:get",t]}),a()},onError:l=>{u(l),r("Failed to add members. Please try again.")}}),N=l=>{i(_=>_.includes(l)?_.filter(Q=>Q!==l):[..._,l])},I=()=>{s.length!==0&&j.mutate({memberIds:s})};return e.jsx(te,{open:!0,onOpenChange:l=>!l&&a(),children:e.jsxs(ne,{className:"max-w-md",children:[e.jsxs(ce,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx(nt,{className:"h-5 w-5"}),"Add Member to Tenant"]}),e.jsx(ve,{children:"Select organization members to add directly to this tenant, bypassing tag matching."})]}),e.jsxs("div",{className:"space-y-4",children:[w.isLoading||b.isLoading?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading members..."}):S.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"All organization members are already in this tenant."}):e.jsx("div",{className:"max-h-64 overflow-y-auto space-y-2",children:S.map(l=>e.jsxs("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[e.jsx(mt,{id:l.metadata.id,checked:s.includes(l.metadata.id),onCheckedChange:()=>N(l.metadata.id)}),e.jsx(X,{htmlFor:l.metadata.id,className:"cursor-pointer text-sm",children:l.email})]},l.metadata.id))}),g&&e.jsx("p",{className:"text-sm text-red-500",children:g}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-2",children:[e.jsx(z,{type:"button",variant:"outline",onClick:a,children:"Cancel"}),e.jsx(z,{onClick:I,disabled:s.length===0||j.isPending,children:j.isPending?"Adding...":"Add Members"})]})]})]})})},Jt=({className:t,...n})=>{var p,m,w,b,x,S;const a=o.useMemo(()=>{const j=n.isCloudEnabled?[$.ADMIN,$.MEMBER]:[$.OWNER,$.ADMIN,$.MEMBER];return Fe({email:Be().email("Invalid email address"),role:ft(j)})},[n.isCloudEnabled]),{register:s,handleSubmit:i,control:g,formState:{errors:r}}=De({resolver:Ge(a)}),u=((m=(p=r.email)==null?void 0:p.message)==null?void 0:m.toString())||((w=n.fieldErrors)==null?void 0:w.email),d=((x=(b=r.role)==null?void 0:b.message)==null?void 0:x.toString())||((S=n.fieldErrors)==null?void 0:S.password);return e.jsxs(ne,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(ce,{children:e.jsx(ae,{children:"Invite new tenant member"})}),e.jsx("div",{className:re("grid gap-6",t),children:e.jsx("form",{onSubmit:i(j=>{n.onSubmit(j)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(X,{htmlFor:"email",children:"Email"}),e.jsx(We,{...s("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:n.isLoading}),u&&e.jsx("div",{className:"text-sm text-red-500",children:u})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(X,{htmlFor:"role",children:"Role"}),e.jsx(Qe,{control:g,name:"role",render:({field:j})=>e.jsxs(Ue,{onValueChange:j.onChange,value:j.value,children:[e.jsx(He,{className:"w-[180px] focus:ring-0 focus-visible:ring-0",children:e.jsx(Ve,{id:"role",placeholder:"Role..."})}),e.jsxs(qe,{children:[!n.isCloudEnabled&&e.jsx(J,{value:"OWNER",children:"Owner"}),e.jsx(J,{value:"ADMIN",children:"Admin"}),e.jsx(J,{value:"MEMBER",children:"Member"})]})]})}),d&&e.jsx("div",{className:"text-sm text-red-500",children:d})]}),e.jsxs(z,{disabled:n.isLoading,children:[n.isLoading&&e.jsx(Ke,{}),"Invite user"]})]})})})]})},Zt=({tenantId:t,onClose:n,onCreated:a})=>{const{getOrganizationIdForTenant:s,isCloudEnabled:i}=gt(),[g,r]=o.useState({}),{handleApiError:u}=he({setFieldErrors:r}),d=xe(),p=s(t),{tenantInviteCreateMutation:m}=Xe(),w=ee({...m(t),onSuccess:b=>{d.invalidateQueries({queryKey:["tenant-invite:list",t]}),a(b),n()},onError:u});return e.jsx(te,{open:!0,onOpenChange:b=>!b&&n(),children:e.jsx(Jt,{isLoading:w.isPending,onSubmit:w.mutate,fieldErrors:g,isCloudEnabled:i,organizationId:p})})},Xt=Fe({email:Be().email("Invalid email address"),role:ht(Y)}),en=({organizationId:t,organizationName:n,onClose:a,onCreated:s})=>{var M,R;const[i,g]=o.useState({}),{isControlPlaneEnabled:r}=$e(),{handleApiError:u}=he({setFieldErrors:g}),{register:d,handleSubmit:p,reset:m,control:w,formState:{errors:b}}=De({resolver:Ge(Xt),defaultValues:{email:"",role:r?Y.MEMBER:Y.OWNER}}),x=xe(),j=pe().organizationInviteCreateMutation(t),N=ee({...j,mutationFn:async l=>{const _={inviteeEmail:l.email,role:l.role};return await j.mutationFn(_),_},onSuccess:l=>{x.invalidateQueries({queryKey:["organization-invites:list",t]}),m(),s(l),a()},onError:u}),I=((R=(M=b.email)==null?void 0:M.message)==null?void 0:R.toString())||(i==null?void 0:i.email);return o.useEffect(()=>{m(),g({})},[m]),e.jsx(te,{open:!0,onOpenChange:l=>!l&&a(),children:e.jsxs(ne,{className:"max-w-md",children:[e.jsxs(ce,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx(nt,{className:"h-5 w-5"}),"Invite Member"]}),e.jsxs(ve,{children:["Invite a new member to ",n]})]}),e.jsxs("form",{onSubmit:p(l=>N.mutate(l)),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(X,{htmlFor:"email",children:"Email Address"}),e.jsx(We,{...d("email"),id:"email",type:"email",placeholder:"name@example.com",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:N.isPending}),I&&e.jsx("div",{className:"text-sm text-red-500",children:I}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"The user will receive an email invitation to join this organization."})]}),r&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(X,{htmlFor:"role",children:"Role"}),e.jsx(Qe,{control:w,name:"role",render:({field:l})=>e.jsxs(Ue,{onValueChange:l.onChange,value:l.value,children:[e.jsx(He,{children:e.jsx(Ve,{placeholder:"Select role..."})}),e.jsxs(qe,{children:[e.jsx(J,{value:Y.MEMBER,children:"Member"}),e.jsx(J,{value:Y.OWNER,children:"Owner"})]})]})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Members can access tenants based on their tags. Owners have full access to all tenants."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4",children:[e.jsx(z,{type:"button",variant:"outline",onClick:a,children:"Cancel"}),e.jsx(z,{type:"submit",disabled:N.isPending,children:N.isPending?"Sending...":"Send Invitation"})]})]})]})})};function tn({tenantId:t,organizationId:n,open:a,onClose:s}){var w,b;const{capture:i}=et(),g=Ye(),{cloud:r,isCloudEnabled:u}=pt(),d=Z({...fe.controlPlane.subscriptionPlans(),enabled:a&&u&&!!(r!=null&&r.canBill)}),p=ee({mutationKey:["welcome:developer-plan"],mutationFn:async()=>{if(!n)throw new Error("No organization id");return(await xt.organizationSubscriptionUpdate(n,{plan:tt.Developer,period:Wt.Monthly})).data},onSuccess:x=>{localStorage.removeItem(F),s(),x.checkoutUrl&&(window.location.href=x.checkoutUrl)}}),m=()=>{localStorage.removeItem(F),s()};return e.jsx(te,{open:a,onOpenChange:x=>{x||m()},children:e.jsx(ne,{className:"max-w-lg text-center",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-md flex-col items-center gap-6",children:[e.jsx(vt,{variant:"mark",className:"h-10 w-10"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ae,{className:"text-center text-2xl",children:"Welcome to Hatchet"}),e.jsx(ve,{className:"text-center text-base text-muted-foreground",children:"You're on the free plan with generous limits to get started. We'll let you know when you're getting close."})]}),e.jsx("ul",{className:"w-full text-left text-base space-y-2.5 rounded-md border border-border/50 bg-muted/30 p-5",children:d.isLoading?e.jsx("li",{className:"flex justify-center py-2",children:e.jsx(Ke,{})}):(b=(w=d.data)==null?void 0:w.freeLimits)==null?void 0:b.map(x=>e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:x.name}),e.jsx("span",{className:"font-medium",children:x.limit.toLocaleString()})]},x.featureId))}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(z,{className:"w-full",disabled:p.isPending,onClick:()=>{i("welcome_modal_add_payment",{tenant_id:t,organization_id:n,cta:"developer_plan"}),p.mutate()},children:p.isPending?"Redirecting…":e.jsx(e.Fragment,{children:"Add a payment method to remove limits →"})}),e.jsx(z,{variant:"ghost",className:"w-full",onClick:()=>{i("welcome_modal_dismissed",{tenant_id:t,organization_id:n,cta:"continue_with_limits"}),m()},children:"Continue with Limits"}),e.jsx(z,{variant:"ghost",className:"w-full",onClick:()=>{i("welcome_modal_view_plans",{tenant_id:t,organization_id:n,cta:"view_plan_options"}),m(),t&&g({to:h.organizationSettingsBillingRoute.to,params:{organization:n??""}})},children:"View Plan Options"})]})]})})})}const ke=["mousedown","mousemove","keypress","scroll","touchstart","click"];function nn(t={}){const{timeoutMs:n=-1,throttleMs:a=1e3,onInactive:s}=t,i=n>0,g=o.useRef(s);o.useEffect(()=>{g.current=s});const r=o.useRef(null),u=o.useRef(null),d=o.useCallback(()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{var m;(m=g.current)==null||m.call(g)},n)},[n]),p=o.useCallback(()=>{u.current||(u.current=setTimeout(()=>{u.current=null},a),d())},[a,d]);return o.useEffect(()=>{if(i)return d(),ke.forEach(m=>{document.addEventListener(m,p,!0)}),()=>{r.current&&clearTimeout(r.current),u.current&&clearTimeout(u.current),ke.forEach(m=>{document.removeEventListener(m,p,!0)})}},[i,n,a,d,p]),{}}const an=o.createContext({isReady:!1});function sn({children:t,user:n}){const{meta:a}=Je(),{tenant:s}=bt(),[i,g]=o.useState(!1),r=o.useMemo(()=>a==null?void 0:a.posthog,[a==null?void 0:a.posthog]);o.useEffect(()=>{if(!i){if(s!=null&&s.analyticsOptOut){console.info("Skipping Analytics initialization due to opt-out, we respect user privacy.");return}!(r!=null&&r.apiKey)||!s||(console.info("Initializing Analytics, opt out in settings."),W.init(r.apiKey,{api_host:r.apiHost||"https://us.i.posthog.com",person_profiles:"identified_only",capture_pageleave:!0,session_recording:{maskAllInputs:!0,maskTextSelector:"*"},persistence:"localStorage+cookie",cross_subdomain_cookie:!0}),g(!0))}},[r,s,i]),o.useEffect(()=>{if(!i||!n)return;const d=jt(localStorage.getItem(Ae));W.identify(`$user_${n.metadata.id}`,{email:n.email,name:n.name,...d&&{referral_key:d}}),d&&localStorage.removeItem(Ae)},[n,i]),o.useEffect(()=>{var d,p;i&&(s!=null&&s.analyticsOptOut?(W.opt_out_capturing(),(p=(d=W).stopSessionRecording)==null||p.call(d)):W.opt_in_capturing())},[s==null?void 0:s.analyticsOptOut,i]);const u={isReady:i};return e.jsx(an.Provider,{value:u,children:e.jsxs(Bt,{client:W,children:[e.jsx(on,{}),t]})})}function on(){const t=Ze(),n=Dt();return o.useEffect(()=>{if(!n)return;let a=window.origin+t.pathname;t.searchStr&&(a=`${a}?${t.searchStr}`),n.capture("$pageview",{$current_url:a})},[t.pathname,n]),null}async function Tn(t){const{isControlPlaneEnabled:n}=await _t(),{isCloudEnabled:a,...s}=n?{isCloudEnabled:!1}:await le.fetchQuery(Ot);return await le.fetchQuery(Vt(a,n)),{isCloudEnabled:a,isControlPlaneEnabled:n,inactivityLogoutMs:"inactivityLogoutMs"in s?s.inactivityLogoutMs??-1:-1}}function rn(){var Ie,Re,Te,Me,_e;const{tenant:t,organizationId:n}=wt(),{meta:a}=Je(),{capture:s}=et(),{currentUser:i,error:g,isLoading:r}=yt(),[u,d]=Et(Pt),[p,m]=o.useState(!1),[w,b]=o.useState(),[x,S]=o.useState([]),[j,N]=o.useState(),[I,M]=o.useState(),[R,l]=o.useState(),[_,Q]=o.useState(!1),[at,de]=o.useState(!1),B=Ct({from:"/"}),y=Ye(),D=Ze().pathname,E=St(),be=!!E({to:h.authLoginRoute.to})||!!E({to:h.authRegisterRoute.to}),st=!!E({to:h.tenantRoute.to,fuzzy:!0}),je=!!E({to:h.organizationsRoute.to,fuzzy:!0}),we=!!E({to:h.tenantsRoute.to}),ue=!!E({to:h.onboardingVerifyRoute.to}),U=!!E({to:h.onboardingInvitesRoute.to}),ye=!!E({to:h.onboardingCreateTenantRoute.to}),Ee=!!E({to:h.onboardingCreateOrganizationRoute.to}),ot=!!E({to:h.onboardingNoTenantsRoute.to}),Ce=ue||U||ye||Ee||ot,{userUpdateLogoutMutation:it}=Nt(),rt=ee({...it(),onSettled:()=>{le.clear(),y({to:h.authLoginRoute.to})}}),{pendingInvitesQuery:O}=Ht({isCloudEnabled:B.isCloudEnabled,isControlPlaneEnabled:B.isControlPlaneEnabled}),{isCloudEnabled:H,isLoaded:V,isFetching:Se,organizations:A,tenantMemberships:v}=It(),{controlPlaneMeta:T,isControlPlaneEnabled:q}=$e(),lt=pe(),Ne=(Re=(Ie=A==null?void 0:A.find(c=>{var f;return(f=c.tenants)==null?void 0:f.some(L=>{var C;return L.id===((C=t==null?void 0:t.metadata)==null?void 0:C.id)})}))==null?void 0:Ie.metadata)==null?void 0:Re.id,ct=Z({...lt.organizationGetQuery(Ne),enabled:!!Ne&&q}),dt=q?((Te=ct.data)==null?void 0:Te.inactivity_timeout)??-1:B.inactivityLogoutMs,P=Z({...fe.controlPlane.billing(n||""),enabled:H&&q&&!!(T!=null&&T.canBill)&&!!n,retry:!1});nn({timeoutMs:dt,onInactive:()=>{rt.mutate()}});const ut=qt({user:i,memberships:v});return o.useEffect(()=>{var K;const c=g,f=()=>{D!=="/"&&!D.startsWith("/onboarding/")&&!D.startsWith("/auth/")&&sessionStorage.setItem(ge,D)};if(je||we)return;if(!r&&!i&&!be){f(),y({to:h.authLoginRoute.to,replace:!0});return}if((c==null?void 0:c.status)===401||(c==null?void 0:c.status)===403){f(),y({to:h.authLoginRoute.to,replace:!0});return}if(i&&!i.emailVerified&&!ue){y({to:h.onboardingVerifyRoute.to,replace:!0});return}const L=O.isSuccess?O.data:null,C=O.isSuccess&&!Ce&&V&&!Se,Oe=H&&V&&A.length===0,se=C&&((v==null?void 0:v.length)??0)===0&&L&&L.inviteCount>0;if(!U&&se){y({to:h.onboardingInvitesRoute.to,replace:!0});return}else if(C&&Oe){f(),y({to:h.onboardingCreateOrganizationRoute.to,replace:!0});return}else if(C&&q&&A&&A.length>0&&v.length===0){f(),y({to:h.onboardingNoTenantsRoute.to,replace:!0});return}else if(C&&v.length===0){f(),y({to:h.onboardingCreateTenantRoute.to,replace:!0});return}if(D==="/"&&v&&v.length>0){const Pe=sessionStorage.getItem(ge);if(Pe){sessionStorage.removeItem(ge),y({to:Pe,replace:!0});return}const me=u==null?void 0:u.metadata.id,ze=me?(K=v.find(oe=>{var ie;return((ie=oe.tenant)==null?void 0:ie.metadata.id)===me}))==null?void 0:K.tenant:void 0;me&&!ze&&(d(void 0),B.isControlPlaneEnabled&&localStorage.removeItem(Le));const G=ze??v[0].tenant;G&&(B.isControlPlaneEnabled&&localStorage.setItem(Le,JSON.stringify(G)),Rt.workflowList(G.metadata.id,{limit:1}).then(oe=>{const ie=oe.data.rows&&oe.data.rows.length>0;y({to:ie?h.tenantRunsRoute.to:h.tenantOverviewRoute.to,params:{tenant:G.metadata.id},replace:!0})}).catch(()=>{y({to:h.tenantRunsRoute.to,params:{tenant:G.metadata.id},replace:!0})}))}},[t==null?void 0:t.metadata.id,i,O,v,t==null?void 0:t.version,g,r,y,u,D,je,we,ue,U,Ce,be,d,H,V,Se,A,Ee,ye,q,B.isControlPlaneEnabled]),o.useEffect(()=>k.on("create-new-tenant",({defaultOrganizationId:c,allTenantTags:f})=>{b(c),S(f??[]),m(!0)}),[]),o.useEffect(()=>k.on("create-tenant-invite",({tenantId:c})=>{N(c)}),[]),o.useEffect(()=>k.on("create-organization-invite",({organizationId:c,organizationName:f})=>{M({organizationId:c,organizationName:f})}),[]),o.useEffect(()=>k.on("open-invite-modal",()=>{de(!0)}),[]),o.useEffect(()=>k.on("add-org-member-to-tenant",({tenantId:c,organizationId:f})=>{l({tenantId:c,organizationId:f})}),[]),o.useEffect(()=>{var se,K;const c=kt(localStorage.getItem(F));if(!c||!(t!=null&&t.metadata.id)||!V)return;if(!H){localStorage.removeItem(F);return}if(!n||!(T!=null&&T.canBill))return;if(c===Ft.OrganizationCreated){localStorage.removeItem(F),Q(!0),s("welcome_modal_shown",{tenant_id:t==null?void 0:t.metadata.id,source:c});return}if(P.isPending)return;const f=P.error,L=(f==null?void 0:f.status)===404||((se=f==null?void 0:f.response)==null?void 0:se.status)===404;if(P.isError&&!L)return;const C=L||(K=P.data)==null?void 0:K.currentSubscription;if(!(!C||C.plan===tt.Free)){localStorage.removeItem(F);return}localStorage.removeItem(F),Q(!0),s("welcome_modal_shown",{tenant_id:t==null?void 0:t.metadata.id,source:c})},[t==null?void 0:t.metadata.id,n,s,H,V,T==null?void 0:T.canBill,(Me=P.data)==null?void 0:Me.currentSubscription,P.error,P.isError,P.isPending]),o.useEffect(()=>{var c;!U&&O.isSuccess&&(((c=O.data)==null?void 0:c.inviteCount)??0)>0&&((v==null?void 0:v.length)??0)>0&&de(!0)},[O.isSuccess,(_e=O.data)==null?void 0:_e.inviteCount,U,v==null?void 0:v.length]),i?e.jsx(sn,{user:i,children:e.jsxs(Qt,{user:i,children:[e.jsx(Gt,{banner:a&&"authDisabled"in a&&a.authDisabled?e.jsx($t,{}):void 0,header:e.jsx(Ut,{user:i,tenantMemberships:v||[]}),footer:void 0,contentScroll:!st,children:e.jsx(Mt,{context:ut})}),e.jsx(te,{open:p,onOpenChange:m,children:e.jsxs(ne,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(ce,{children:e.jsx(ae,{children:"Create New Tenant"})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(zt,{defaultOrganizationId:w,allTenantTags:x,afterSave:c=>{b(void 0),S([]),m(!1);const f=c.type==="cloud"?c.tenant.id:c.tenant.metadata.id;c.type==="cloud"&&le.prefetchQuery(fe.controlPlane.subscriptionPlans()),y({to:h.tenantOverviewRoute.to,params:{tenant:f}})}})})]})}),j&&e.jsx(Zt,{tenantId:j,onClose:()=>N(void 0),onCreated:c=>{k.emit("tenant-invite-created",{tenantId:j,invite:c})}}),I&&e.jsx(en,{organizationId:I.organizationId,organizationName:I.organizationName,onClose:()=>M(void 0),onCreated:c=>{k.emit("organization-invite-created",{organizationId:I.organizationId,invite:c})}}),R&&e.jsx(Yt,{organizationId:R.organizationId,tenantId:R.tenantId,onClose:()=>l(void 0)}),e.jsx(tn,{tenantId:t==null?void 0:t.metadata.id,organizationId:n,open:_,onClose:()=>Q(!1)}),e.jsx(Lt,{isOpen:at,onClose:()=>de(!1)})]})}):e.jsx(Tt,{})}function Mn(){return e.jsx(rn,{})}export{Mn as default,Tn as loader}; diff --git a/hatchetembed/dashboard/assets/billing-Cllt8jqB.js b/hatchetembed/dashboard/assets/billing-Cllt8jqB.js new file mode 100644 index 0000000000..3b4ade203e --- /dev/null +++ b/hatchetembed/dashboard/assets/billing-Cllt8jqB.js @@ -0,0 +1 @@ +import{y as ae,N as X,O as B,k as d,j as e,S as R,W as I,X as z,a3 as $,Z as O,a2 as F,aG as pe,aC as Ue,B as E,ar as Ae,l as Ee,p as Me,q as ne,c as je,A as V,T as G,d as J,aa as Le,aH as De,aI as Be,aJ as Ie,aK as ze,aL as Re,L as Fe,aM as $e,aN as qe,aO as ye,aP as K,aQ as Oe,aR as Q,aF as He,b as Ye,ae as Ke,w as Qe,aS as be}from"./index-wypz6hY5.js";import{u as re}from"./support-chat-CGvrRU-a.js";import{C as We}from"./confirm-dialog-CMXood8J.js";import{S as Ve}from"./switch-C23Bp5tT.js";import{S as Ce,a as M}from"./data-contracts-BsCw40yT.js";import{S as Ge}from"./settings-page-header-Dal4BvfD.js";import{T as Je}from"./tenant-resource-limits-table-xMx7u5rD.js";import"./resource-limit-columns-7zhUq4Ly.js";import"./resource-limit-status-ynncxZIe.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="20882593-7376-4404-9e05-b03b8b25075c",n._sentryDebugIdIdentifier="sentry-dbid-20882593-7376-4404-9e05-b03b8b25075c")}catch{}})();function se(n,t){const a=t==="yearly"?n/100/12:n/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a)}function Xe(n,t){return t.percent?Math.round(n*(1-t.percent/100)):t.amount_cents?Math.max(0,n-t.amount_cents):n}function Ze(n){return n.percent?`${n.percent}% off`:n.amount_cents?`${se(n.amount_cents)} off`:n.name}function en({activePlanCode:n,activePlanAmountCents:t,upcomingPlanCode:a,showAnnual:r,onSelectPlan:c,enterpriseContactUrl:u,loading:m,selectLabel:w,coupons:j}){var g;const{controlPlaneMeta:o,isControlPlaneEnabled:v}=ae(),N=j==null?void 0:j[0],y=X({...B.controlPlane.subscriptionPlans(),enabled:v&&!!(o!=null&&o.canBill)}),b=(g=y.data)==null?void 0:g.plans,P=d.useMemo(()=>{const i=b==null?void 0:b.filter(h=>!h.legacy&&h.planCode!=="free"),k=h=>i==null?void 0:i.some(p=>{var f;return p.planCode.startsWith(h.split("_")[0])&&((f=p.period)==null?void 0:f.includes("yearly"))});return i==null?void 0:i.filter(h=>{var p,f;return r?((p=h.period)==null?void 0:p.includes("yearly"))||!k(h.planCode):((f=h.period)==null?void 0:f.includes("monthly"))||!h.period}).sort((h,p)=>h.amountCents-p.amountCents)},[b,r]),C=d.useCallback(i=>{const k=t??0;return i.amountCents>k||i.amountCents===0&&k===0},[t]),x=P;return y.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(R,{})}):e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[x==null?void 0:x.map(i=>{const k=i.planCode===n,h=i.planCode===a,p=N&&i.amountCents>0,f=p?Xe(i.amountCents,N):i.amountCents;return e.jsx(Ne,{name:i.name,price:se(f,i.period),originalPrice:p&&f!==i.amountCents?se(i.amountCents,i.period):void 0,couponBadge:p&&f!==i.amountCents?Ze(N):void 0,showAnnual:r,featureGroups:i.featureGroups,isUpgrade:C(i),isActive:k,isUpcoming:h,isLoading:m===i.planCode,onSelect:()=>c(i),selectLabel:w},i.planCode)}),e.jsx(Ne,{name:"Enterprise",description:"Have technical or compliance requirements?",enterpriseHighlights:["100M+ runs per month","Custom SLAs & uptime guarantees","Dedicated support & onboarding","SSO / SAML & audit logging","Bring your own cloud"],onSelect:()=>window.open(u,"_blank"),buttonLabel:"Contact Us"})]})}function Ne({name:n,price:t,originalPrice:a,couponBadge:r,showAnnual:c,description:u,featureGroups:m,enterpriseHighlights:w,isUpgrade:j,isActive:o,isUpcoming:v,isLoading:N,onSelect:y,buttonLabel:b,selectLabel:P}){return e.jsxs(I,{variant:"light",className:`bg-transparent ring-1 border-none flex flex-col ${o?"ring-primary":"ring-border/50"}`,children:[e.jsx(z,{className:"p-4 border-b border-border/50",children:e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:n})}),e.jsxs(O,{className:"p-4 flex flex-col flex-1 gap-4",children:[e.jsx("div",{children:t?e.jsxs(e.Fragment,{children:[a&&e.jsx("span",{className:"text-sm text-muted-foreground line-through mr-2",children:a}),e.jsx("span",{className:"text-xl font-semibold text-foreground",children:t}),e.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["/ mo ",c?"":" + usage"]}),r&&e.jsx(F,{variant:"successful",className:"ml-2 text-[10px] align-middle",children:r}),c&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"billed yearly + usage billed monthly"})]}):e.jsx("span",{className:"text-sm text-muted-foreground",children:u})}),w&&w.length>0&&e.jsx("ul",{className:"space-y-1.5 flex-1",children:w.map(C=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(pe,{className:"size-3.5 mt-0.5 shrink-0 text-primary"}),e.jsx("span",{className:"text-foreground",children:C})]},C))}),m&&m.length>0&&e.jsx("div",{className:"space-y-3 flex-1",children:m.map(C=>e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1.5",children:C.name}),e.jsx("ul",{className:"space-y-1.5",children:C.features.map(x=>{var g,i;return e.jsxs("li",{className:`flex items-start gap-2 text-sm ${x.included?"":"opacity-40"}`,children:[x.included?e.jsx(pe,{className:"size-3.5 mt-0.5 shrink-0 text-primary"}):e.jsx(Ue,{className:"size-3.5 mt-0.5 shrink-0 text-muted-foreground"}),e.jsxs("span",{children:[e.jsx("span",{className:x.included?"text-foreground":"text-muted-foreground",children:((g=x.display)==null?void 0:g.primaryText)??x.name}),x.included&&((i=x.display)==null?void 0:i.secondaryText)&&e.jsx("span",{className:"text-foreground block",children:x.display.secondaryText})]})]},x.featureId)})})]},C.name))}),e.jsx(E,{variant:o||v?"outline":j?"default":"outline",size:"sm",disabled:o||v||N,onClick:y,className:"w-full mt-auto",children:N?e.jsx(R,{}):o?"Current Plan":v?"Upcoming Plan":b||P||(j?"Upgrade":"Downgrade")})]})]})}function Z(n,t){return(n==null?void 0:n.planCode)??t}function nn(n,t){const a=t==="yearly"?n/100/12:n/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a)}function tn(n,t){const a=n||t;return a?a.split("_").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Unknown plan"}function sn(n){return n?`${n.charAt(0).toUpperCase()+n.slice(1)} billing`:"Active subscription"}function an(n){return n===Ce.Starter||n===Ce.Growth}function te(n){return!!n&&typeof n=="object"}function rn(n){const t="We could not change your plan. Please try again or contact us if this keeps happening.";if(te(n)){const a=n.response;if(te(a)){const r=a.data;if(te(r)){if(r.code==="plan_already_attached")return"This plan is already attached to your organization. Refreshing billing details should show the current plan.";if(typeof r.message=="string")return r.message;if(typeof r.description=="string")return r.description}}}return n instanceof Error&&n.message?n.message:t}const on="https://hatchet.run/office-hours",ln=({active:n,upcoming:t,plans:a,coupons:r})=>{var oe,le,ce,de,ue;const[c,u]=d.useState(),[m,w]=d.useState(!1),[j,o]=d.useState(void 0),[v,N]=d.useState(),[y,b]=d.useState(),{tenantId:P,tenant:C,billing:x,organizationId:g}=Ae(),{controlPlaneMeta:i,isControlPlaneEnabled:k}=ae(),{handleApiError:h}=Ee({}),p=re(),[f,q]=d.useState(!1),_=X({...B.controlPlane.creditBalance(g||""),enabled:k&&!!(i!=null&&i.canBill)&&!!g}),l=d.useMemo(()=>{var me,xe,he,ge,fe;const s=((me=_.data)==null?void 0:me.balanceCents)??0;if(s>=0)return null;const S=(((xe=_.data)==null?void 0:xe.currency)||"USD").toUpperCase().slice(0,3);let U;try{U=new Intl.NumberFormat("en-US",{style:"currency",currency:S}).format(Math.abs(s)/100)}catch{U=`$${(Math.abs(s)/100).toFixed(2)}`}const H=(ge=(he=_.data)==null?void 0:he.description)==null?void 0:ge.trim(),Y=(fe=_.data)==null?void 0:fe.expiresAt;return{amount:U,description:H,expires:Y}},[(oe=_.data)==null?void 0:oe.balanceCents,(le=_.data)==null?void 0:le.currency,(ce=_.data)==null?void 0:ce.description,(de=_.data)==null?void 0:de.expiresAt]),A=async()=>{try{if(f||(q(!0),!g))return;const s=await je.billingPortalLinkGet(g);window.open(s.data.url,"_blank")}catch(s){h(s)}finally{q(!1)}},L=Me({mutationKey:["organization-subscription:update"],onMutate:({plan_code:s})=>{u(s),N(void 0),b(void 0)},mutationFn:async({plan_code:s})=>{const[S,U]=s.split("_");if(!g)throw new Error("Organization not found for billing");return(await je.organizationSubscriptionUpdate(g,{plan:S,period:U})).data},onSuccess:async(s,S)=>{if(s.checkoutUrl){window.location.href=s.checkoutUrl;return}b(S.plan_code);const U=[ne.invalidateQueries({queryKey:B.controlPlane.billing(g).queryKey})];P&&U.push(ne.invalidateQueries({queryKey:B.tenantResourcePolicy.get(P).queryKey})),await Promise.all(U)},onError:s=>{N(rn(s)),b(void 0),u(void 0),j||h(s),g&&ne.invalidateQueries({queryKey:B.controlPlane.billing(g).queryKey})}}),T=d.useMemo(()=>Z(n,"free")??"free",[n]);d.useEffect(()=>{var s;return w(((s=n==null?void 0:n.period)==null?void 0:s.includes("yearly"))||!1)},[n]);const ee=d.useMemo(()=>Z(t,null),[t]);d.useEffect(()=>{y&&(T!==y&&ee!==y||(u(void 0),b(void 0),N(void 0),o(void 0)))},[T,y,ee]);const ve=d.useMemo(()=>{var s;return(s=a==null?void 0:a.find(S=>S.planCode===T))==null?void 0:s.amountCents},[a,T]),ie=d.useMemo(()=>n!=null&&n.endsAt?new Date(n.endsAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null,[n==null?void 0:n.endsAt]),D=d.useMemo(()=>{if(!(n!=null&&n.plan))return null;const s=a==null?void 0:a.find(S=>S.planCode===T);return s?{name:s.name,amountCents:s.amountCents,period:s.period,legacy:!!s.legacy}:{name:tn(T,n.plan),period:n.period,legacy:an(n.plan)}},[n,T,a]),Pe=d.useMemo(()=>{var Y;const s="https://cal.com/team/hatchet/website-demo";if(!C)return s;const S=C.name||"Unknown",U=((Y=C.metadata)==null?void 0:Y.id)||P,H=`Custom pricing request for tenant '${S}' (${U})`;return`${s}?notes=${encodeURIComponent(H)}`},[C,P]),ke=(n==null?void 0:n.plan)==="dedicated",_e=s=>{N(void 0),b(void 0),o(s)},Te=()=>{c||y||(N(void 0),o(void 0))};return e.jsxs(e.Fragment,{children:[e.jsx(We,{isOpen:!!j,title:"Confirm Plan Change",submitVariant:"default",description:e.jsxs(e.Fragment,{children:["Are you sure you'd like to change to the"," ",e.jsx("span",{className:"font-semibold",children:j==null?void 0:j.name})," ","plan?",e.jsx("br",{}),e.jsx("br",{}),"Upgrades will be prorated and downgrades will take effect at the end of the billing period.",v&&e.jsxs(V,{variant:"destructive",className:"mt-4",children:[e.jsx(G,{children:"Plan change failed"}),e.jsx(J,{children:v})]})]}),submitLabel:"Change Plan",onSubmit:()=>{j&&L.mutate({plan_code:j.planCode})},onCancel:Te,cancelDisabled:!!c||!!y,isLoading:!!c}),e.jsx("div",{children:ke?e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xl font-semibold leading-tight text-foreground",children:"You are on a Dedicated plan"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Contact us to make changes to your plan."})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[p.enabled&&e.jsx(E,{onClick:p.show,variant:"outline",children:"Contact us"}),e.jsx(E,{asChild:!0,variant:"outline",children:e.jsx("a",{href:on,target:"_blank",rel:"noreferrer",children:"Office hours"})}),e.jsx(E,{onClick:A,variant:"outline",disabled:f,children:f?e.jsx(R,{}):"Manage Billing"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("h3",{className:"flex flex-row items-center gap-2 text-xl font-semibold leading-tight text-foreground",children:["Subscription",r==null?void 0:r.map((s,S)=>e.jsxs(F,{variant:"successful",children:[s.name," coupon applied"]},`c${S}`))]}),e.jsx(Le,{className:"my-4"}),l&&e.jsx(I,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-emerald-500/30 border-none",children:e.jsx(z,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Available Credit"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l.description||"Applied to upcoming invoices."})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-xl font-semibold text-foreground whitespace-nowrap",children:l.amount}),l.expires&&e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground whitespace-nowrap",children:["Expires"," ",e.jsx(De,{date:l.expires,future:!0})]})]})]})})}),D&&e.jsxs(I,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-border/50 border-none",children:[e.jsxs(z,{className:"p-4 border-b border-border/50 flex flex-row items-center justify-between",children:[e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Current Plan"}),e.jsx(E,{onClick:A,variant:"outline",size:"sm",disabled:f,children:f?e.jsx(R,{}):"Manage Billing"})]}),e.jsx(O,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-lg font-semibold text-foreground",children:D.name}),D.legacy&&e.jsx(Be,{children:e.jsxs(Ie,{children:[e.jsx(ze,{children:e.jsx(F,{variant:"queued",children:"Legacy"})}),e.jsx(Re,{side:"right",children:"You're on a legacy plan which is no longer offered. Contact us if you have any questions."})]})})]}),ie&&e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Service ends on ",ie]})]}),e.jsx("div",{className:"text-right",children:typeof D.amountCents=="number"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xl font-bold text-foreground",children:nn(D.amountCents,D.period)}),e.jsx("span",{className:"text-sm text-muted-foreground ml-1",children:"/ month"})]}):e.jsx("span",{className:"text-sm text-muted-foreground",children:sn(D.period)})})]})})]}),t&&t.plan&&e.jsx(I,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-yellow-500/30 border-none",children:e.jsx(z,{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx(F,{variant:"inProgress",children:"Scheduled Change"})}),e.jsxs("p",{className:"text-sm text-foreground",children:["Switching to"," ",e.jsx("span",{className:"font-semibold",children:((ue=a==null?void 0:a.find(s=>s.planCode===[t.plan,t.period].filter(S=>!!S).join("_")))==null?void 0:ue.name)||t.plan})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Takes effect on"," ",new Date(t.startedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})})})}),e.jsxs("div",{className:"flex flex-row items-center justify-between mb-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["For plan details, visit"," ",e.jsx("a",{href:"https://hatchet.run/pricing",className:"text-primary/70 hover:text-primary hover:underline",target:"_blank",rel:"noreferrer",children:"our pricing page"})," ","or"," ",e.jsx("a",{href:"https://hatchet.run/office-hours",className:"text-primary/70 hover:text-primary hover:underline",children:"contact us"})," ","for custom requirements."]}),e.jsxs("div",{className:"flex gap-2 items-center shrink-0 ml-4",children:[e.jsx(Ve,{id:"sa",checked:m,onClick:()=>{w(s=>!s)}}),e.jsxs(Fe,{htmlFor:"sa",className:"text-sm whitespace-nowrap",children:["Annual Billing",e.jsx(F,{variant:"inProgress",className:"ml-2",children:"Save up to 20%"})]})]})]}),e.jsx(en,{activePlanCode:T,activePlanAmountCents:ve,upcomingPlanCode:ee,showAnnual:m,onSelectPlan:s=>{x!=null&&x.hasPaymentMethods?_e(s):L.mutate({plan_code:s.planCode})},enterpriseContactUrl:Pe,loading:c,coupons:r})]})})]})},cn={[M.Current]:"Current",[M.Upcoming]:"Upcoming",[M.Past]:"Past"},dn={[M.Current]:"successful",[M.Upcoming]:"inProgress",[M.Past]:"queued"},W={[M.Upcoming]:0,[M.Current]:1,[M.Past]:2};function un(n){return[...n].sort((t,a)=>{const r=t.status?W[t.status]:W.past,c=a.status?W[a.status]:W.past;if(r!==c)return r-c;const u=t.startedAt?new Date(t.startedAt).getTime():0;return(a.startedAt?new Date(a.startedAt).getTime():0)-u})}function Se(n){if(!n)return"—";const t=new Date(n);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function mn({history:n,plans:t}){const a=c=>{var u;return((u=t==null?void 0:t.find(m=>m.planCode===c.planCode))==null?void 0:u.name)??c.planCode},r=n?un(n):[];return e.jsxs(I,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(z,{className:"p-4 border-b border-border/50",children:e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Plan History"})}),e.jsx(O,{className:"p-0",children:r.length>0?e.jsxs($e,{children:[e.jsx(qe,{children:e.jsxs(ye,{children:[e.jsx(K,{className:"px-4",children:"Plan"}),e.jsx(K,{children:"Status"}),e.jsx(K,{children:"Started"}),e.jsx(K,{children:"Ended"})]})}),e.jsx(Oe,{children:r.map((c,u)=>e.jsxs(ye,{children:[e.jsx(Q,{className:"px-4 font-medium text-foreground",children:a(c)}),e.jsx(Q,{children:c.status?e.jsx(F,{variant:dn[c.status],children:cn[c.status]}):"—"}),e.jsx(Q,{className:"text-muted-foreground",children:Se(c.startedAt)}),e.jsx(Q,{className:"text-muted-foreground",children:Se(c.endsAt)})]},`${c.planCode}-${c.startedAt}-${u}`))})]}):e.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:"No plan history yet. Plan changes will appear here."})})]})}const xn=2e3,hn=9e4,gn=6e3;function we({children:n}){return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(Ge,{title:"Billing",description:"Manage your organization subscription, payment methods, and plan changes."}),n]})})}function fn(){const n=re();return e.jsxs(I,{variant:"light",className:"mt-6",children:[e.jsx(z,{children:e.jsx($,{children:"Billing maintenance"})}),e.jsxs(O,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"We're making some upgrades to billing. Check back soon, or contact us if you need help."}),n.enabled&&e.jsx(E,{onClick:n.show,variant:"outline",children:"Contact us"})]})]})}function pn({isRetrying:n,isUnauthorized:t,onRetry:a}){const r=re();return e.jsxs(I,{variant:"light",className:"mt-6",children:[e.jsx(z,{children:e.jsx($,{children:t?"Unauthorized":"Billing unavailable"})}),e.jsxs(O,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t?"You must be an organization owner to view billing and usage details.":"We couldn't load this organization's billing and usage details. Please try again, or contact us if this keeps happening."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(E,{onClick:a,variant:"outline",disabled:n,children:n?e.jsx(R,{}):"Try again"}),r.enabled&&e.jsx(E,{onClick:r.show,variant:"outline",children:"Contact us"})]})]})]})}function jn(n){return{...n,resource:n.resource}}function Tn(){const{controlPlaneMeta:n}=ae();return n!=null&&n.billingMaintenanceMode?e.jsx(we,{children:e.jsx(fn,{})}):e.jsx(we,{children:e.jsx(yn,{})})}function yn(){var C,x,g,i,k,h,p,f,q,_;const{organization:n}=He({from:Ye.organizationsRoute.to}),{cloud:t,isCloudEnabled:a}=Ke(),[r,c]=Qe(),[u]=d.useState(()=>r.get("billing_sync")==="plan_change"?r.get("plan_code"):null),[m,w]=d.useState(()=>r.get("billing_sync")==="plan_change"&&r.get("plan_code")?"syncing":"idle");d.useEffect(()=>{r.get("billing_sync")===null&&r.get("plan_code")===null||c(l=>(l.delete("billing_sync"),l.delete("plan_code"),l),{replace:!0})},[]);const j=m==="syncing",o=X({...B.controlPlane.billing(n),enabled:a&&!!(t!=null&&t.canBill),retry:(l,A)=>{const L=be(A);return L!==401&&L!==403&&l<3},refetchInterval:j?xn:!1}),v=Z((C=o.data)==null?void 0:C.currentSubscription,null),N=Z((x=o.data)==null?void 0:x.upcomingSubscription,null);d.useEffect(()=>{m!=="syncing"||!u||(v===u||N===u)&&w("done")},[m,u,v,N]),d.useEffect(()=>{if(m!=="syncing")return;const l=setTimeout(()=>w("timeout"),hn);return()=>clearTimeout(l)},[m]),d.useEffect(()=>{if(m!=="done")return;const l=setTimeout(()=>w("idle"),gn);return()=>clearTimeout(l)},[m]);const y=d.useMemo(()=>{var l,A,L;return u?((L=(A=(l=o.data)==null?void 0:l.plans)==null?void 0:A.find(T=>T.planCode===u))==null?void 0:L.name)??null:null},[(g=o.data)==null?void 0:g.plans,u]),b=X({...B.controlPlane.tenantResourceLimits(n),enabled:a}),P=((i=b.data)==null?void 0:i.tenants)??[];if(o.isError){const l=be(o.error),A=l===401||l===403;return e.jsx(pn,{isRetrying:o.isFetching,isUnauthorized:A,onRetry:()=>{o.refetch()}})}return e.jsxs(e.Fragment,{children:[m==="syncing"&&e.jsxs(V,{variant:"info",className:"mb-6",children:[e.jsxs(G,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"h-4 w-4"}),"Finalizing your plan change"]}),e.jsx(J,{children:y?`We're activating the ${y} plan...`:"We're activating your new plan..."})]}),m==="done"&&e.jsxs(V,{variant:"info",className:"mb-6",children:[e.jsx(G,{children:"Plan change complete"}),e.jsx(J,{children:y?`Your ${y} plan is now active.`:"Your new plan is now active."})]}),m==="timeout"&&e.jsxs(V,{variant:"warn",className:"mb-6",children:[e.jsx(G,{children:"Your plan change is still processing"}),e.jsxs(J,{className:"flex flex-col gap-3",children:[e.jsx("span",{children:"This is taking longer than expected. Your change may still be finalizing in the background."}),e.jsx("div",{children:e.jsx(E,{size:"sm",variant:"outline",onClick:()=>{w("syncing"),o.refetch()},children:"Check again"})})]})]}),e.jsx(ln,{active:(k=o.data)==null?void 0:k.currentSubscription,upcoming:(h=o.data)==null?void 0:h.upcomingSubscription,plans:(p=o.data)==null?void 0:p.plans,coupons:(f=o.data)==null?void 0:f.coupons}),b.isLoading||P.length>0?e.jsxs("div",{className:"mt-12 space-y-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Resource limits"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Usage limits applied to each tenant in this organization."})]}),b.isLoading?e.jsx("div",{className:"py-6",children:e.jsx(R,{})}):P.map(l=>e.jsx(Je,{tenantId:l.tenantId,tenantName:l.tenantName||l.tenantSlug||l.tenantId,limits:l.limits.map(jn)},l.tenantId))]}):null,e.jsxs("div",{className:"mt-12 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Plan history"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A record of subscription changes for this organization."})]}),e.jsx(mn,{history:(q=o.data)==null?void 0:q.subscriptionHistory,plans:(_=o.data)==null?void 0:_.plans})]})]})}export{Tn as default}; diff --git a/hatchetembed/dashboard/assets/billing-required-TKoe60qy.js b/hatchetembed/dashboard/assets/billing-required-TKoe60qy.js new file mode 100644 index 0000000000..be9e53e609 --- /dev/null +++ b/hatchetembed/dashboard/assets/billing-required-TKoe60qy.js @@ -0,0 +1 @@ +import{k as r,ch as x,N as u,O as f,j as e,B as i,g as h,b as p}from"./index-wypz6hY5.js";import{F as j}from"./managed-compute-cM-46wXY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="2976f537-62f9-4d2d-9cf1-da1f44fe71b1",s._sentryDebugIdIdentifier="sentry-dbid-2976f537-62f9-4d2d-9cf1-da1f44fe71b1")}catch{}})();function g({title:s,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const N=r.forwardRef(g);function y({title:s,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const b=r.forwardRef(y);function k({tenant:s,manageClicked:a,portalLoading:t}){var d,c,m;const{tenantId:l}=x(),n=u({...f.cloud.getComputeCost((s==null?void 0:s.metadata.id)||""),enabled:!!(s!=null&&s.metadata.id)}),o=((d=n.data)==null?void 0:d.hasCreditsRemaining)&&((c=n.data)==null?void 0:c.creditsRemaining)!==void 0;return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("div",{className:"rounded-lg border bg-card p-12 shadow-sm",children:e.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center text-center",children:[e.jsx("div",{className:"mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10",children:e.jsx(j,{className:"h-8 w-8 text-primary"})}),e.jsx("h3",{className:"mb-2 text-2xl font-semibold",children:"Ready to supercharge your task runs?"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Unlock Managed Compute by setting up billing. No commitment required - you only pay for what you use!"}),e.jsx("div",{className:"mb-6 w-full rounded-lg border bg-muted/10 p-4",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"mr-3 flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:e.jsx(b,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("h4",{className:"font-medium",children:"Transparent Pay as You Go Pricing"}),e.jsxs("div",{className:"mt-2 grid gap-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"CPU:"}),e.jsx("span",{className:"font-medium",children:"$0.01/hour/CPU"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Memory:"}),e.jsx("span",{className:"font-medium",children:"$0.01/hour/GB RAM"})]}),o&&((m=n.data)==null?void 0:m.creditsRemaining)!==void 0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Monthly Free Credits:"}),e.jsx("span",{className:"font-medium text-green-500",children:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n.data.creditsRemaining)})]})]})]})]})}),e.jsx("div",{className:"mb-8 flex justify-center rounded-lg bg-muted/30 p-6",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-3 text-left text-sm",children:[e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Auto-scaling workers based on slots"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Zero infrastructure headaches"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Multiple regions and machine types"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"No cold starts"})]})]})}),e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx(i,{onClick:a,disabled:t,className:"min-w-40 px-8 py-6 text-base",size:"lg",children:t?"Loading...":"Set Up Billing →"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Not ready yet?"})})]}),e.jsx(h,{to:p.tenantManagedWorkersTemplateRoute.to,params:{tenant:l},className:"w-full",children:e.jsx(i,{variant:"outline",className:"w-full min-w-40 px-8 py-6 text-base",size:"lg",children:"Deploy a Demo Template for Free"})}),e.jsxs("div",{className:"relative mt-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Have questions or requirements?"})})]}),e.jsx("a",{href:"https://hatchet.run/office-hours",target:"_blank",rel:"noopener noreferrer",className:"w-full",children:e.jsxs(i,{variant:"ghost",className:"flex w-full min-w-40 items-center justify-center gap-2 px-8 py-6 text-base",size:"lg",children:[e.jsx(N,{className:"h-5 w-5"}),"Book a Call with Our Team"]})})]})]})})})})}export{k as B,b as F}; diff --git a/hatchetembed/dashboard/assets/confirm-dialog-CMXood8J.js b/hatchetembed/dashboard/assets/confirm-dialog-CMXood8J.js new file mode 100644 index 0000000000..3d39dfd8df --- /dev/null +++ b/hatchetembed/dashboard/assets/confirm-dialog-CMXood8J.js @@ -0,0 +1 @@ +import{j as e,_ as x,$ as g,a0 as u,a1 as b,B as d,S as h}from"./index-wypz6hY5.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="423ed45c-6094-418f-8a0a-5cf0ce7b7a52",s._sentryDebugIdIdentifier="sentry-dbid-423ed45c-6094-418f-8a0a-5cf0ce7b7a52")}catch{}})();function m({className:s,title:a,description:i,submitLabel:l,submitVariant:t="destructive",submitDisabled:o=!1,cancelDisabled:r=!1,cancelLabel:c="Cancel",isOpen:f,...n}){return e.jsx(x,{open:f,children:e.jsxs(g,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(u,{children:e.jsx(b,{children:a})}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 text-sm text-foreground",children:i}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(d,{variant:"ghost",disabled:r,onClick:()=>{n.onCancel()},children:c}),e.jsxs(d,{variant:t,onClick:n.onSubmit,disabled:n.isLoading||o,children:[n.isLoading&&e.jsx(h,{}),l]})]})]})]})})}export{m as C}; diff --git a/hatchetembed/dashboard/assets/create-worker-form-CwO9Ppzx.js b/hatchetembed/dashboard/assets/create-worker-form-CwO9Ppzx.js new file mode 100644 index 0000000000..a8d8f3a855 --- /dev/null +++ b/hatchetembed/dashboard/assets/create-worker-form-CwO9Ppzx.js @@ -0,0 +1,2 @@ +import{k as f,j as e,I as v,e as _,ab as Qt,B as T,fb as Yt,ar as qt,ch as Ht,u as Xt,fc as p,t as Et,N as $,O as J,L as x,b2 as j,a5 as D,a6 as I,a7 as P,a8 as z,a9 as F,bs as ea,bt as ta,bu as aa,bv as Bt,by as na,o as R,fd as y,s as w,bb as ia,cY as Q,b3 as sa}from"./index-wypz6hY5.js";import{A as oa,a as la,b as ra,c as ca}from"./accordion-CBy735bO.js";import{S as da,a as V}from"./steps-2xcvKVXE.js";import{m as B}from"./managed-compute-cM-46wXY.js";import{F as ua}from"./PlusIcon-Cn-pCVk3.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new c.Error().stack;o&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[o]="84d3ecc8-531f-47d8-9eb7-326a0d83bbb9",c._sentryDebugIdIdentifier="sentry-dbid-84d3ecc8-531f-47d8-9eb7-326a0d83bbb9")}catch{}})();function ma({title:c,titleId:o,...a},h){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:h,"aria-labelledby":o},a),c?f.createElement("title",{id:o},c):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))}const _t=f.forwardRef(ma),ha=({label:c,values:o,setValues:a=()=>{},disabled:h,secretOption:N,onDeleteIds:C,onAdd:k,onUpdate:b})=>{f.useEffect(()=>{o||a([])},[a,o]);const d=(n,l,r)=>{const m=[...o],g=m[n];l==="value"&&g.hint?r!==g.hint&&r!==""&&(m[n]={...g,[l]:r,isEditing:!0}):m[n]={...g,[l]:r},a(m),g.id&&b&&r!==g.hint&&b([m[n]])},u=n=>{const l=[...o],r=l[n],m=!r.deleted;if(l[n]={...r,deleted:m},a(l),r.id&&C){const g=o.filter(S=>S.id&&S.deleted).map(S=>S.id);C(g)}},M=n=>{const l=o[n];if(l.id){const r=[...o];if(r[n]={...l,deleted:!0},a(r),C){const m=o.filter(g=>g.id&&g.deleted).map(g=>g.id);C(m)}}else{const r=o.filter((m,g)=>g!==n);a(r),k&&k(r.filter(m=>!m.id))}};return e.jsxs(e.Fragment,{children:[c&&e.jsx("div",{className:"mb-2 text-white",children:c}),o==null?void 0:o.map((n,l)=>{var r;return e.jsxs("div",{className:_("mb-2 flex items-center gap-2",n.deleted&&"opacity-50 [&>*]:line-through"),children:[e.jsx(v,{placeholder:"ex: key",value:n.key,onChange:m=>d(l,"key",m.target.value),disabled:h||n.locked||n.deleted,className:_("w-64",n.locked&&"cursor-not-allowed bg-gray-200")}),n.hidden?e.jsx(v,{placeholder:n.hint,value:n.isEditing?n.value:void 0,onChange:m=>d(l,"value",m.target.value),type:"password",disabled:h||n.locked||n.deleted,className:_("flex-1",n.locked&&"cursor-not-allowed bg-gray-200",!n.isEditing&&n.hint&&"text-gray-400")}):e.jsx(Qt,{placeholder:n.hint,value:n.isEditing?n.value:void 0,onChange:m=>d(l,"value",m.target.value),rows:((r=n.value)==null?void 0:r.split(` +`).length)||0,disabled:h||n.locked||n.deleted,className:_("flex-1",n.locked&&"cursor-not-allowed bg-gray-200",!n.isEditing&&n.hint&&"text-gray-400")}),N&&e.jsx(T,{variant:"ghost",onClick:()=>!n.locked&&d(l,"hidden",!n.hidden),disabled:n.locked||n.deleted,children:n.hidden?"Unlock":"Lock"}),!h&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{n.id?u(l):M(l)},children:e.jsx(Yt,{className:"h-4 w-4"})})})]},l)}),!h&&e.jsx("div",{className:"flex items-center",children:e.jsx(T,{variant:"secondary",onClick:()=>{const n={key:"",value:"",hidden:!1,locked:!1,deleted:!1},l=[...o,n];a(l),k&&k([...o.filter(r=>!r.id),n])},children:"Add row"})})]})},Y=[{title:"1 CPU, 1 GB RAM (shared CPU)",cpuKind:"shared",cpus:1,memoryMb:1024},{title:"1 CPU, 2 GB RAM (shared CPU)",cpuKind:"shared",cpus:1,memoryMb:2048},{title:"2 CPU, 2 GB RAM (shared CPU)",cpuKind:"shared",cpus:2,memoryMb:2048},{title:"2 CPU, 4 GB RAM (shared CPU)",cpuKind:"shared",cpus:2,memoryMb:4096},{title:"4 CPU, 8 GB RAM (shared CPU)",cpuKind:"shared",cpus:4,memoryMb:8192},{title:"8 CPU, 16 GB RAM (shared CPU)",cpuKind:"shared",cpus:8,memoryMb:16384},{title:"1 CPU, 2 GB RAM (performance CPU)",cpuKind:"performance",cpus:1,memoryMb:2048},{title:"2 CPU, 2 GB RAM (performance CPU)",cpuKind:"performance",cpus:2,memoryMb:2048},{title:"2 CPU, 4 GB RAM (performance CPU)",cpuKind:"performance",cpus:2,memoryMb:4096},{title:"4 CPU, 8 GB RAM (performance CPU)",cpuKind:"performance",cpus:4,memoryMb:8192},{title:"8 CPU, 16 GB RAM (performance CPU)",cpuKind:"performance",cpus:8,memoryMb:16384}],Kt=[{name:"Amsterdam, Netherlands",value:p.Ams},{name:"Stockholm, Sweden",value:p.Arn},{name:"Mumbai, India",value:p.Bom},{name:"Paris, France",value:p.Cdg},{name:"Dallas, Texas (US)",value:p.Dfw},{name:"Secaucus, NJ (US)",value:p.Ewr},{name:"Frankfurt, Germany",value:p.Fra},{name:"Sao Paulo, Brazil",value:p.Gru},{name:"Ashburn, Virginia (US)",value:p.Iad},{name:"Johannesburg, South Africa",value:p.Jnb},{name:"Los Angeles, California (US)",value:p.Lax},{name:"London, United Kingdom",value:p.Lhr},{name:"Tokyo, Japan",value:p.Nrt},{name:"Chicago, Illinois (US)",value:p.Ord},{name:"Singapore, Singapore",value:p.Sin},{name:"San Jose, California (US)",value:p.Sjc},{name:"Sydney, Australia",value:p.Syd},{name:"Toronto, Canada",value:p.Yyz}],ga=["Static","Autoscaling"],xa=R({name:w(),buildConfig:R({githubInstallationId:w().uuid().length(36),githubRepositoryOwner:w(),githubRepositoryName:w(),githubRepositoryBranch:w(),steps:Q(R({buildDir:w(),dockerfilePath:w()}))}),secrets:R({add:Q(R({key:w(),value:w()}))}),runtimeConfig:R({numReplicas:y().min(0).max(16).optional(),cpuKind:w(),cpus:y(),memoryMb:y(),regions:Q(sa(p)).optional(),autoscaling:R({waitDuration:w(),rollingWindowDuration:w(),utilizationScaleUpThreshold:y(),utilizationScaleDownThreshold:y(),increment:y(),minAwakeReplicas:y(),maxReplicas:y(),scaleToZero:ia(),fly:R({autoscalingKey:w(),currentReplicas:y()})}).optional()})});function ya({onSubmit:c,isLoading:o,fieldErrors:a}){var we,ve,fe,ye,Re,Se,Ne,ke,Me,Te,Ue,Ae,De,Ie,Pe,ze,Fe,Be,Ke,Ge,_e,Ve,We,Le,Oe,Ze,$e,Je,Qe,Ye,qe,He,Xe,Ee,et,tt,at,nt,it,st,ot,lt,rt,ct,dt,ut,mt,ht,gt,xt,pt,bt,jt,Ct,wt,vt,ft,yt,Rt,St,Nt,kt,Mt,Tt,Ut,At,Dt,It,Pt,zt,Ft;const{can:h}=qt(),{tenantId:N}=Ht(),{watch:C,handleSubmit:k,control:b,setValue:d,formState:{errors:u}}=Xt({resolver:Et(xa),defaultValues:{buildConfig:{steps:[{buildDir:".",dockerfilePath:"./Dockerfile"}]},secrets:{add:[]},runtimeConfig:{numReplicas:1,cpuKind:"shared",cpus:1,memoryMb:1024,regions:[p.Sjc]}}}),[M,n]=f.useState("1 CPU, 1 GB RAM (shared CPU)"),l=f.useMemo(()=>{if(!h)return 1/0;for(let t=1;t<=20;t++){const[s]=h(B.maxReplicas(t));if(!s)return t-1}return 20},[h]),[r]=f.useMemo(()=>{const t=Y.find(i=>i.title===M);if(!t||!h)return[!0,void 0];const s={cpuKind:t.cpuKind,cpus:t.cpus,memoryMb:t.memoryMb};return h(B.selectCompute(s))},[h,M]),m=C("runtimeConfig.regions"),g=C("buildConfig.githubInstallationId"),S=C("buildConfig.githubRepositoryOwner"),H=C("buildConfig.githubRepositoryName"),X=Gt(S,H),W=C("buildConfig.githubRepositoryBranch"),L=C("runtimeConfig.numReplicas"),O=C("runtimeConfig.autoscaling.maxReplicas"),U=$({...J.github.listInstallations(N)}),Wt=$({...J.github.listRepos(N,g)}),Lt=$({...J.github.listBranches(N,g,S,H)}),K=f.useMemo(()=>{if(!L||!h)return!0;const[t]=h(B.maxReplicas(L));return t},[h,L]),G=f.useMemo(()=>{if(!O||!h)return!0;const[t]=h(B.maxReplicas(O));return t},[h,O]),[Ot,Zt]=f.useState([]),[$t,E]=f.useState("Static"),ee=((ve=(we=u.name)==null?void 0:we.message)==null?void 0:ve.toString())||(a==null?void 0:a.name),te=((Ne=(Se=(Re=(ye=(fe=u.buildConfig)==null?void 0:fe.steps)==null?void 0:ye[0])==null?void 0:Re.buildDir)==null?void 0:Se.message)==null?void 0:Ne.toString())||(a==null?void 0:a.buildDir),ae=((Ae=(Ue=(Te=(Me=(ke=u.buildConfig)==null?void 0:ke.steps)==null?void 0:Me[0])==null?void 0:Te.dockerfilePath)==null?void 0:Ue.message)==null?void 0:Ae.toString())||(a==null?void 0:a.dockerfilePath),ne=((Pe=(Ie=(De=u.runtimeConfig)==null?void 0:De.numReplicas)==null?void 0:Ie.message)==null?void 0:Pe.toString())||(a==null?void 0:a.numReplicas),ie=((Be=(Fe=(ze=u.secrets)==null?void 0:ze.add)==null?void 0:Fe.message)==null?void 0:Be.toString())||(a==null?void 0:a.secrets),se=((_e=(Ge=(Ke=u.runtimeConfig)==null?void 0:Ke.cpuKind)==null?void 0:Ge.message)==null?void 0:_e.toString())||(a==null?void 0:a.cpuKind),oe=((Le=(We=(Ve=u.runtimeConfig)==null?void 0:Ve.cpus)==null?void 0:We.message)==null?void 0:Le.toString())||(a==null?void 0:a.cpus),le=(($e=(Ze=(Oe=u.runtimeConfig)==null?void 0:Oe.memoryMb)==null?void 0:Ze.message)==null?void 0:$e.toString())||(a==null?void 0:a.memoryMb),re=((Ye=(Qe=(Je=u.buildConfig)==null?void 0:Je.githubInstallationId)==null?void 0:Qe.message)==null?void 0:Ye.toString())||(a==null?void 0:a.githubInstallationId),ce=((Xe=(He=(qe=u.buildConfig)==null?void 0:qe.githubRepositoryOwner)==null?void 0:He.message)==null?void 0:Xe.toString())||(a==null?void 0:a.githubRepositoryOwner),de=((tt=(et=(Ee=u.buildConfig)==null?void 0:Ee.githubRepositoryName)==null?void 0:et.message)==null?void 0:tt.toString())||(a==null?void 0:a.githubRepositoryName),ue=((it=(nt=(at=u.buildConfig)==null?void 0:at.githubRepositoryBranch)==null?void 0:nt.message)==null?void 0:it.toString())||(a==null?void 0:a.githubRepositoryBranch),me=((rt=(lt=(ot=(st=u.runtimeConfig)==null?void 0:st.autoscaling)==null?void 0:ot.waitDuration)==null?void 0:lt.message)==null?void 0:rt.toString())||(a==null?void 0:a.waitDuration),he=((mt=(ut=(dt=(ct=u.runtimeConfig)==null?void 0:ct.autoscaling)==null?void 0:dt.rollingWindowDuration)==null?void 0:ut.message)==null?void 0:mt.toString())||(a==null?void 0:a.rollingWindowDuration),ge=((pt=(xt=(gt=(ht=u.runtimeConfig)==null?void 0:ht.autoscaling)==null?void 0:gt.utilizationScaleUpThreshold)==null?void 0:xt.message)==null?void 0:pt.toString())||(a==null?void 0:a.utilizationScaleUpThreshold),xe=((wt=(Ct=(jt=(bt=u.runtimeConfig)==null?void 0:bt.autoscaling)==null?void 0:jt.utilizationScaleDownThreshold)==null?void 0:Ct.message)==null?void 0:wt.toString())||(a==null?void 0:a.utilizationScaleDownThreshold),pe=((Rt=(yt=(ft=(vt=u.runtimeConfig)==null?void 0:vt.autoscaling)==null?void 0:ft.increment)==null?void 0:yt.message)==null?void 0:Rt.toString())||(a==null?void 0:a.increment),be=((Mt=(kt=(Nt=(St=u.runtimeConfig)==null?void 0:St.autoscaling)==null?void 0:Nt.minAwakeReplicas)==null?void 0:kt.message)==null?void 0:Mt.toString())||(a==null?void 0:a.minAwakeReplicas),je=((Dt=(At=(Ut=(Tt=u.runtimeConfig)==null?void 0:Tt.autoscaling)==null?void 0:Ut.maxReplicas)==null?void 0:At.message)==null?void 0:Dt.toString())||(a==null?void 0:a.maxReplicas),Ce=((Ft=(zt=(Pt=(It=u.runtimeConfig)==null?void 0:It.autoscaling)==null?void 0:Pt.scaleToZero)==null?void 0:zt.message)==null?void 0:Ft.toString())||(a==null?void 0:a.scaleToZero);f.useEffect(()=>{U.isSuccess&&U.data.rows.length>0&&!g&&d("buildConfig.githubInstallationId",U.data.rows[0].metadata.id)},[U,d,g]);const Jt=t=>{const s={cpuKind:t.cpuKind,cpus:t.cpus,memoryMb:t.memoryMb},[i]=h(B.selectCompute(s));return e.jsxs(F,{value:t.title,children:[t.title," ",!i&&"🔒"]},t.title)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Define the compute resources for your services."}),e.jsxs(da,{className:"mt-6",children:[e.jsx(V,{title:"Build configuration",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the Github repository the service should deploy from."}),e.jsxs("div",{className:"grid max-w-3xl gap-4",children:[e.jsx(x,{htmlFor:"role",children:"Github account"}),e.jsx(j,{control:b,name:"buildConfig.githubInstallationId",render:({field:t})=>{var s;return e.jsxs(D,{onValueChange:i=>{t.onChange(i),d("buildConfig.githubRepositoryOwner",""),d("buildConfig.githubRepositoryName",""),d("buildConfig.githubRepositoryBranch","")},children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Not seeing your repository?"," ",e.jsx("a",{href:`/api/v1/cloud/users/github-app/start?redirect_to=/tenants/${N}/managed-workers/create&with_repo_installation=true`,className:"text-indigo-400",children:"Link a new repository"})]}),e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose account"})}),e.jsx(z,{children:(s=U.data)==null?void 0:s.rows.map(i=>e.jsx(F,{value:i.metadata.id,children:i.account_name},i.metadata.id))})]})}}),re&&e.jsx("div",{className:"text-sm text-red-500",children:re}),e.jsx(x,{htmlFor:"role",children:"Github repo"}),e.jsx(j,{control:b,name:"buildConfig.githubRepositoryName",render:({field:t})=>{var s;return e.jsxs(D,{...t,value:X,onValueChange:i=>{d("buildConfig.githubRepositoryOwner",pa(i)||""),d("buildConfig.githubRepositoryName",ba(i)||""),d("buildConfig.githubRepositoryBranch","")},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose repository"})}),e.jsx(z,{children:(s=Wt.data)==null?void 0:s.map(i=>e.jsxs(F,{value:Gt(i.repo_owner,i.repo_name)||"",children:[i.repo_owner,"/",i.repo_name]},i.repo_owner+i.repo_name))})]})}}),ce&&e.jsx("div",{className:"text-sm text-red-500",children:ce}),de&&e.jsx("div",{className:"text-sm text-red-500",children:de}),e.jsx(x,{htmlFor:"role",children:"Github branch"}),e.jsx(j,{control:b,name:"buildConfig.githubRepositoryBranch",render:({field:t})=>{var s;return e.jsxs(D,{onValueChange:t.onChange,...t,children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose branch"})}),e.jsx(z,{children:(s=Lt.data)==null?void 0:s.map(i=>e.jsx(F,{value:i.branch_name,children:i.branch_name},i.branch_name))})]})}}),ue&&e.jsx("div",{className:"text-sm text-red-500",children:ue}),e.jsx(x,{htmlFor:"buildDir",children:"Build directory"}),e.jsx(j,{control:b,name:"buildConfig.steps.0.buildDir",render:({field:t})=>e.jsx(v,{...t,placeholder:"build",id:"buildDir",defaultValue:".",disabled:!W})}),te&&e.jsx("div",{className:"text-sm text-red-500",children:te}),e.jsx(x,{htmlFor:"dockerfile",children:"Path to Dockerfile"}),e.jsx(j,{control:b,name:"buildConfig.steps.0.dockerfilePath",render:({field:t})=>e.jsx(v,{...t,placeholder:".",id:"dockerfile",defaultValue:"./Dockerfile",disabled:!W})}),ae&&e.jsx("div",{className:"text-sm text-red-500",children:ae})]})]})}),e.jsx(V,{title:"Runtime configuration",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the runtime settings for this service."}),e.jsx(x,{children:"Environment Variables"}),e.jsx(ha,{values:Ot,setValues:t=>{Zt(t),d("secrets.add",t.map(s=>({key:s.key,value:s.value})))}}),ie&&e.jsx("div",{className:"text-sm text-red-500",children:ie}),e.jsx(x,{children:"Machine Configuration"}),e.jsxs("div",{className:"grid gap-4 pt-4",children:[e.jsx(x,{htmlFor:"region",children:"Region"}),e.jsxs(D,{value:m==null?void 0:m.toString(),onValueChange:t=>{const s=Kt.find(i=>i.value===t);s&&d("runtimeConfig.regions",[s.value])},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"region",placeholder:"Choose region"})}),e.jsx(z,{children:Kt.map(t=>e.jsx(F,{value:t.value,children:t.name},t.value))})]}),e.jsx(x,{htmlFor:"machineType",children:"Machine type"}),e.jsx(j,{control:b,name:"runtimeConfig.cpuKind",render:({field:t})=>e.jsxs(D,{...t,value:M,onValueChange:s=>{const i=Y.find(A=>A.title===s);n(s),d("runtimeConfig.cpus",(i==null?void 0:i.cpus)||1),d("runtimeConfig.memoryMb",(i==null?void 0:i.memoryMb)||1024),d("runtimeConfig.cpuKind",(i==null?void 0:i.cpuKind)||"shared")},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"machineType",placeholder:"Choose type"})}),e.jsx(z,{children:Y.map(Jt)})]})}),!r&&e.jsx(q,{feature:`The selected machine type (${M})`}),se&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:se}),oe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:oe}),le&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:le}),e.jsx(x,{children:"Scaling Method"}),e.jsxs(ea,{defaultValue:"Static",value:$t,onValueChange:t=>{if(t==="Static"){E("Static"),d("runtimeConfig.numReplicas",1),d("runtimeConfig.autoscaling",void 0);return}else E("Autoscaling"),d("runtimeConfig.numReplicas",void 0),d("runtimeConfig.autoscaling",{waitDuration:"1m",rollingWindowDuration:"2m",utilizationScaleUpThreshold:.75,utilizationScaleDownThreshold:.25,increment:1,scaleToZero:!0,minAwakeReplicas:1,maxReplicas:Math.min(10,l),fly:{autoscalingKey:"dashboard",currentReplicas:1}})},children:[e.jsx(ta,{layout:"underlined",children:ga.map(t=>e.jsx(aa,{variant:"underlined",value:t,children:t},t))}),e.jsxs(Bt,{value:"Static",className:"grid gap-4 pt-4",children:[e.jsxs(x,{htmlFor:"numReplicas",children:["Number of replicas (max: ",l,")"]}),e.jsx(j,{control:b,name:"runtimeConfig.numReplicas",render:({field:t})=>e.jsx(v,{...t,type:"number",onChange:s=>{if(s.target.value===""){t.onChange(s.target.value);return}t.onChange(parseInt(s.target.value))},min:0,id:"numReplicas",placeholder:"1"})}),!K&&e.jsx(q,{feature:`More than ${l} replicas`}),ne&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:ne})]}),e.jsxs(Bt,{value:"Autoscaling",className:"grid gap-4 pt-4",children:[e.jsx(x,{htmlFor:"minAwakeReplicas",children:"Min Replicas"}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.minAwakeReplicas",render:({field:t})=>e.jsx(v,{...t,id:"minAwakeReplicas",type:"number",onChange:s=>{const i=parseInt(s.target.value);t.onChange(i),d("runtimeConfig.autoscaling.fly.currentReplicas",i),(C("runtimeConfig.autoscaling.maxReplicas")??0){const s=C("runtimeConfig.autoscaling.minAwakeReplicas")||1;return e.jsx(v,{...t,id:"maxReplicas",min:s,type:"number",onChange:i=>{const A=parseInt(i.target.value),Z=Math.max(A,s);t.onChange(Z),Z!==A&&(i.target.value=Z.toString())}})}}),!G&&e.jsx(q,{feature:`More than ${l} max replicas`}),je&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:je}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.scaleToZero",render:({field:t})=>e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(x,{htmlFor:"scaleToZero",children:"Scale to zero during periods of inactivity?"}),e.jsx(na,{checked:t.value,onCheckedChange:t.onChange})]})}),Ce&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:Ce}),e.jsx(oa,{type:"single",collapsible:!0,children:e.jsxs(la,{value:"advanced",children:[e.jsx(ra,{children:"Advanced autoscaling settings"}),e.jsxs(ca,{className:"flex flex-col gap-4",children:[e.jsx(x,{htmlFor:"waitDuration",children:"Wait Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"How long to wait between autoscaling events. For example: 10s (10 seconds), 5m (5 minutes), 1h (1 hour)."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.waitDuration",render:({field:t})=>e.jsx(v,{...t,id:"waitDuration",placeholder:"1m"})}),me&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:me}),e.jsx(x,{htmlFor:"rollingWindowDuration",children:"Rolling Window Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The amount of time to look at utilization metrics for autoscaling. Lower values will lead to faster scale-up and scale-down. Example: 2m (2 minutes), 5m (5 minutes), 1h (1 hour)."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.rollingWindowDuration",render:({field:t})=>e.jsx(v,{...t,id:"rollingWindowDuration",placeholder:"2m"})}),he&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:he}),e.jsx(x,{htmlFor:"utilizationScaleUpThreshold",children:"Utilization Scale Up Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale up. For example, 0.75 means that if the utilization is above 75%, scale up."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.utilizationScaleUpThreshold",render:({field:t})=>e.jsx(v,{...t,id:"utilizationScaleUpThreshold",type:"number",min:0,max:1,step:.01,onChange:s=>{t.onChange(parseFloat(s.target.value))}})}),ge&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:ge}),e.jsx(x,{htmlFor:"utilizationScaleDownThreshold",children:"Utilization Scale Down Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale down. For example, 0.25 means that if the utilization is below 25%, scale down."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.utilizationScaleDownThreshold",render:({field:t})=>e.jsx(v,{...t,id:"utilizationScaleDownThreshold",type:"number",min:0,max:1,step:.01,onChange:s=>{t.onChange(parseFloat(s.target.value))}})}),xe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:xe}),e.jsx(x,{htmlFor:"increment",children:"Scaling Increment"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The number of replicas to scale by when scaling up or down."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.increment",render:({field:t})=>e.jsx(v,{...t,id:"increment",type:"number",onChange:s=>{t.onChange(parseInt(s.target.value))}})}),pe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:pe})]})]})})]})]})]})]})}),e.jsx(V,{title:"Name",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Give your service a name."}),e.jsx(x,{htmlFor:"name",children:"Name"}),e.jsx(j,{control:b,name:"name",render:({field:t})=>e.jsx(v,{...t,id:"name",placeholder:"my-awesome-service"})}),ee&&e.jsx("div",{className:"text-sm text-red-500",children:ee})]})}),e.jsx(V,{title:"Review",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Review the settings for this service."}),(!r||!K||!G)&&e.jsxs("div",{className:"rounded-md border border-red-300 bg-red-50 p-4 dark:border-red-500 dark:bg-red-900/30",children:[e.jsx("h3",{className:"mb-2 font-medium text-red-800 dark:text-red-200",children:"Your configuration requires a plan upgrade"}),e.jsxs("ul",{className:"list-inside list-disc space-y-1 text-sm text-red-700 dark:text-red-300",children:[!r&&e.jsx("li",{children:"The selected machine type is not available on your current plan"}),!K&&e.jsx("li",{children:"The number of replicas exceeds your plan's limit"}),!G&&e.jsx("li",{children:"The maximum autoscaling replicas exceeds your plan's limit"})]}),e.jsx("div",{className:"mt-3",children:e.jsx("a",{href:Vt(),target:"_blank",rel:"noopener noreferrer",children:e.jsxs(T,{variant:"outline",size:"sm",children:[e.jsx(_t,{className:"mr-1 size-4"}),"Upgrade Plan"]})})})]}),e.jsxs(T,{onClick:k(c),disabled:!g||!X||!W||!r||!K||!G,className:"w-fit px-8",children:[o&&e.jsx(ua,{className:"size-4 animate-spin"}),"Create service"]})]})})]})]})}function Gt(c,o){if(!(!c||!o))return`${c}::${o}`}function pa(c){if(!c)return;const o=c.split("::");if(o.length>1)return o[0]}function ba(c){if(!c)return;const o=c.split("::");if(o.length>1)return o[1]}const Vt=()=>"/settings/billing-and-limits",q=({feature:c})=>e.jsxs("div",{className:"my-3 flex flex-col gap-2 rounded-md border border-yellow-400 bg-yellow-50 p-4 dark:border-yellow-500 dark:bg-yellow-900/30",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-yellow-500 dark:text-yellow-400",children:"⚠️"}),e.jsxs("p",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200",children:[c," is available on higher tier plans. Upgrade to access this feature."]})]}),e.jsx("a",{href:Vt(),target:"_blank",rel:"noopener noreferrer",children:e.jsxs(T,{variant:"outline",size:"sm",className:"border-yellow-400 text-xs text-yellow-700 hover:bg-yellow-100 dark:border-yellow-500 dark:text-yellow-300 dark:hover:bg-yellow-900/50",children:[e.jsx(_t,{className:"mr-1 size-3"}),"Upgrade Plan"]})})]});export{ya as C,ha as E,q as U,pa as a,ba as b,Gt as g,Y as m,Kt as r,ga as s}; diff --git a/hatchetembed/dashboard/assets/data-contracts-BsCw40yT.js b/hatchetembed/dashboard/assets/data-contracts-BsCw40yT.js new file mode 100644 index 0000000000..affd65fe37 --- /dev/null +++ b/hatchetembed/dashboard/assets/data-contracts-BsCw40yT.js @@ -0,0 +1 @@ +import"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="2f9aa45c-1c8e-4d45-b4a5-68577ef06a62",e._sentryDebugIdIdentifier="sentry-dbid-2f9aa45c-1c8e-4d45-b4a5-68577ef06a62")}catch{}})();var a=(e=>(e.OWNER="OWNER",e.ADMIN="ADMIN",e.MEMBER="MEMBER",e))(a||{}),t=(e=>(e.Current="current",e.Upcoming="upcoming",e.Past="past",e))(t||{}),f=(e=>(e.Monthly="monthly",e.Yearly="yearly",e))(f||{}),d=(e=>(e.Free="free",e.Starter="starter",e.Growth="growth",e.Migration="migration",e.Developer="developer",e.Team="team",e.Scale="scale",e.Dedicated="dedicated",e))(d||{}),D=(e=>(e.SHARED="SHARED",e.DEDICATED="DEDICATED",e))(D||{});export{D as O,d as S,a as T,t as a,f as b}; diff --git a/hatchetembed/dashboard/assets/github-button-Bg3zFNFs.js b/hatchetembed/dashboard/assets/github-button-Bg3zFNFs.js new file mode 100644 index 0000000000..0cdf11895f --- /dev/null +++ b/hatchetembed/dashboard/assets/github-button-Bg3zFNFs.js @@ -0,0 +1 @@ +import{j as s,B as n,cG as o}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="be3a9683-beff-4817-8314-1bf92d5e2d2d",e._sentryDebugIdIdentifier="sentry-dbid-be3a9683-beff-4817-8314-1bf92d5e2d2d")}catch{}})();function f({buildConfig:e,commitSha:t,prefix:r}){return e!=null&&e.githubRepository?s.jsxs("div",{className:"flex w-fit flex-row items-center gap-2 text-sm text-gray-700 dark:text-gray-300",children:[r,s.jsx("a",{href:a(e,t),target:"_blank",rel:"noreferrer",children:s.jsx(n,{variant:"link",size:"xs",leftIcon:s.jsx(o,{className:"size-4"}),children:t?t.substring(0,7):`${e.githubRepository.repo_owner}/${e.githubRepository.repo_name}`})})]}):null}function a(e,t){const r=`https://github.com/${e.githubRepository.repo_owner}/${e.githubRepository.repo_name}`;return t?r+"/commit/"+t:r}export{f as G}; diff --git a/hatchetembed/dashboard/assets/global-emitter-Y_aFw8Zc.js b/hatchetembed/dashboard/assets/global-emitter-Y_aFw8Zc.js new file mode 100644 index 0000000000..457030340e --- /dev/null +++ b/hatchetembed/dashboard/assets/global-emitter-Y_aFw8Zc.js @@ -0,0 +1 @@ +import{j as d,a2 as g,e as p,c7 as y}from"./index-wypz6hY5.js";import{f as b}from"./shard-deployment-key-CJfQX3l3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dfc58ca3-ac3f-469f-8469-00a09388d150",e._sentryDebugIdIdentifier="sentry-dbid-dfc58ca3-ac3f-469f-8469-00a09388d150")}catch{}})();function E({region:e,className:t}){const n=b(e);return n?d.jsx(g,{variant:"outline",className:p("max-w-[9rem] shrink-0 truncate px-1.5 py-0 text-[10px] font-normal",t),title:e,children:n}):null}var i,l;function h(){return l||(l=1,i=(e,t=new Map)=>({has:n=>t.has(n),get:n=>(!t.has(n)&&typeof e=="function"&&t.set(n,e(n)),t.get(n)),delete:n=>t.delete(n),set:(n,s)=>t.set(n,s),getUnderlyingDataStructure:()=>t})),i}var x=h();const w=y(x),f=()=>w(()=>new Map);function M(e=Object.create(null)){let t=f(),n=0;return e.on=(s,a)=>{const o=(n++).toString(),r=t.get(s);return r.set(o,a),()=>{r.delete(o),r.size===0&&t.delete(s)}},e.once=(s,a)=>{const o=e.on(s,(...r)=>{a(...r),o()});return o},e.emit=(s,a)=>{const o=t.get(s);let r=!1;const u=()=>r=!0;for(const c of o.values())r||c(a,{stopPropagation:u})},e.removeAllListeners=()=>{t=f()},e}const I=M();export{E as T,I as g}; diff --git a/hatchetembed/dashboard/assets/index--gDRExcs.js b/hatchetembed/dashboard/assets/index--gDRExcs.js new file mode 100644 index 0000000000..8774783af2 --- /dev/null +++ b/hatchetembed/dashboard/assets/index--gDRExcs.js @@ -0,0 +1 @@ +import{k as r,h as Y,G as P,J as G,K as Z,M as J,N as X,O as ee,p as se,P as ae,U as y,Q as re,j as e,B as O,b as M,A as L,T,d as _,V as $,W as E,X as W,Y as h,Z as k,_ as te,$ as ne,a0 as ie,a1 as de,a2 as F,e as B,a3 as oe,a4 as le,a5 as ce,a6 as me,a7 as ue,a8 as xe,a9 as V,aa as he,ab as fe,S as ge,ac as w}from"./index-wypz6hY5.js";import{N as pe}from"./new-organization-saver-form-Uz97g08A.js";import{u as je}from"./support-chat-CGvrRU-a.js";import{F as ve}from"./ExclamationTriangleIcon-CruVDzqB.js";import{F as we}from"./PlusIcon-Cn-pCVk3.js";import"./welcome-modal-state-B1mOgpQO.js";import"./shard-deployment-key-CJfQX3l3.js";import"./use-analytics-BZxgE2Kk.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="05329147-1a01-489e-b32f-539f0f1fa23e",s._sentryDebugIdIdentifier="sentry-dbid-05329147-1a01-489e-b32f-539f0f1fa23e")}catch{}})();function ye({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const be=r.forwardRef(ye);function Ne({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"}))}const Ce=r.forwardRef(Ne);function Oe({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 11.25v8.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 1 0 9.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1 1 14.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const ke=r.forwardRef(Oe);function Re({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const Ae=r.forwardRef(Re);function K(s){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(s/100)}function Ie(s){switch(s){case w.YCAlumni:case w.YCCurrentBatch:return"default";case w.Startup:return"secondary";default:return"outline"}}function Se(s){switch(s){case y.Approved:return"successful";case y.Redeemed:return"inProgress";default:return"queued"}}function Ee(s){return s===w.YCAlumni||s===w.YCCurrentBatch}const Q="__create_new_org__";function ze({offer:s,organizations:a,defaultOrgId:n,onRedeem:i,onCreateOrg:b,isRedeeming:o,redeemingOfferId:R}){const c=je(),[N,f]=r.useState(null),[m,g]=r.useState(""),u=N??n,C=d=>{if(d===Q){b();return}f(d)},A=s.stage===y.Approved,I=s.stage===y.Redeemed,p=o&&R===s.recordId,j=Ee(s.type);return e.jsxs(E,{className:B(j&&"border-orange-400/60 bg-gradient-to-br from-orange-50/60 to-background dark:border-orange-500/40 dark:from-orange-950/20"),children:[e.jsxs(W,{className:"space-y-2 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[j&&e.jsx("span",{className:"mr-1 flex h-5 w-5 items-center justify-center rounded-sm bg-orange-500",children:e.jsx("span",{className:"text-xs font-bold leading-none text-white",children:"Y"})}),s.type?e.jsx(F,{variant:Ie(s.type),className:B(j&&"border-orange-300 bg-orange-500 text-white dark:border-orange-600 dark:bg-orange-600"),children:s.type}):e.jsx(oe,{className:"text-base",children:"Offer"})]}),s.stage&&e.jsx(F,{variant:Se(s.stage),children:s.stage})]}),e.jsxs("div",{className:"mt-1 space-y-0.5",children:[e.jsx("p",{className:"text-base font-semibold",children:s.creditAmountCents?`${K(s.creditAmountCents)} credit`:"Credit offer"}),e.jsxs(le,{children:[s.expiresAt&&`Expires ${new Date(s.expiresAt).toLocaleDateString()}`,s.expiresAt&&s.expiresInMonths&&" · ",s.expiresInMonths&&`Expires in ${s.expiresInMonths} month${s.expiresInMonths===1?"":"s"}`]})]})]}),A&&e.jsxs(k,{className:"space-y-3 px-5 pb-5 pt-1",children:[e.jsx("div",{className:"flex items-end gap-3",children:e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium",children:"Apply to organization"}),e.jsxs(ce,{value:u,onValueChange:C,children:[e.jsx(me,{children:e.jsx(ue,{placeholder:"Select an organization"})}),e.jsxs(xe,{children:[a.map(d=>e.jsx(V,{value:d.metadata.id,children:d.name},d.metadata.id)),e.jsx(he,{className:"my-1"}),e.jsx(V,{value:Q,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(we,{className:"size-4"}),"Create new organization"]})})]})]})]})}),s.includesWelcomeKit&&e.jsxs("div",{className:"rounded-lg border border-dashed border-primary/30 bg-primary/5 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(Ae,{className:"size-5 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"This offer includes a welcome kit!"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"We'll ship some swag to your door. Enter your shipping address below."})]})]}),e.jsx(fe,{placeholder:"Street address, city, state, zip code, country",value:m,onChange:d=>g(d.target.value),rows:3,className:"bg-background"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[c.enabled?e.jsxs(O,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground",onClick:c.show,children:[e.jsx(Ce,{className:"size-4"}),"Questions?"]}):e.jsx("div",{}),e.jsx(O,{onClick:()=>i(s.recordId,u,s.includesWelcomeKit?m:void 0),disabled:!u||o||s.includesWelcomeKit&&!m.trim(),children:p?e.jsxs(e.Fragment,{children:[e.jsx(ge,{}),"Redeeming..."]}):"Redeem Offer"})]})]}),I&&e.jsx(k,{className:"px-5 pb-5 pt-1",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx($,{className:"size-4 text-green-500"}),"This offer has been redeemed."]})})]})}function Qe(){const s=Y(),a=P(),{organizations:n,isUserUniverseLoaded:i,getOrganizationIdForTenant:b}=G(),o=Z(J),[R,c]=r.useState(null),[N,f]=r.useState(null),[m,g]=r.useState(null),u=X({...ee.cloud.offers()}),C=se({mutationKey:["offer:redeem"],mutationFn:async t=>(await re.userOfferRedeem({offerRecordId:t.offerRecordId,organizationId:t.organizationId,address:t.address})).data,onMutate:async t=>{await a.cancelQueries({queryKey:["offers:list"]});const v=a.getQueryData(["offers:list"]);return a.setQueryData(["offers:list"],l=>l&&l.map(x=>x.recordId===t.offerRecordId?{...x,stage:y.Redeemed}:x)),{previous:v}},onSuccess:t=>{f(null),g(`${K(t.appliedCents)} in credit has been applied to your organization.`),a.refetchQueries({queryKey:["offers:list"]}),c(null)},onError:(t,v,l)=>{var z,D;l!=null&&l.previous&&a.setQueryData(["offers:list"],l.previous),g(null);let x="An unexpected error occurred.";if(t instanceof ae){const S=(D=(z=t.response)==null?void 0:z.data)==null?void 0:D.errors;Array.isArray(S)&&S.length>0&&(x=S.map(H=>H.description||"Unknown error").join(", "))}f(x),a.refetchQueries({queryKey:["offers:list"]}),c(null)}}),A=(t,v,l)=>{f(null),g(null),c(t),C.mutate({offerRecordId:t,organizationId:v,address:l})},[I,p]=r.useState(!1),j=u.isLoading||!i,d=u.data??[],U=r.useMemo(()=>{if(o!=null&&o.metadata.id){const t=b(o.metadata.id);if(t)return t}return n.length>0?n[0].metadata.id:""},[o==null?void 0:o.metadata.id,b,n]),q=()=>{p(!0)};return e.jsxs("div",{className:"max-h-full overflow-y-auto",children:[e.jsxs("div",{className:"mx-auto max-w-2xl space-y-6 p-6",children:[e.jsx("div",{className:"flex items-center gap-4",children:e.jsxs(O,{variant:"ghost",size:"sm",onClick:()=>s({to:M.authenticatedRoute.to}),className:"gap-2 text-muted-foreground",children:[e.jsx(be,{className:"size-4"}),"Back to Dashboard"]})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Redeem Offers"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"View and redeem available offers for your account."})]}),N&&e.jsxs(L,{variant:"destructive",children:[e.jsx(ve,{className:"size-4"}),e.jsx(T,{children:"Redemption failed"}),e.jsx(_,{children:N})]}),m&&e.jsxs(L,{variant:"default",className:"border-green-500/50",children:[e.jsx($,{className:"size-4 text-green-500"}),e.jsx(T,{children:"Offer redeemed"}),e.jsx(_,{children:m})]}),j?e.jsx("div",{className:"space-y-4",children:e.jsxs(E,{children:[e.jsxs(W,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{className:"h-5 w-28 rounded-md"}),e.jsx(h,{className:"h-5 w-20 rounded-md"})]}),e.jsx(h,{className:"mt-2 h-4 w-44"})]}),e.jsx(k,{children:e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(h,{className:"h-4 w-36"}),e.jsx(h,{className:"h-9 w-full rounded-md"})]}),e.jsx(h,{className:"h-9 w-24 rounded-md"})]})})]})}):d.length===0?e.jsx(E,{children:e.jsxs(k,{className:"py-16 text-center",children:[e.jsx(ke,{className:"mx-auto mb-4 h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mb-2 text-lg font-medium",children:"No Offers Available"}),e.jsx("p",{className:"mb-4 text-muted-foreground",children:"There are no offers associated with your account at this time."}),e.jsx(O,{variant:"outline",onClick:()=>s({to:M.authenticatedRoute.to}),children:"Go to Dashboard"})]})}):e.jsx("div",{className:"space-y-4",children:d.map(t=>e.jsx(ze,{offer:t,organizations:n,defaultOrgId:U,onRedeem:A,onCreateOrg:q,isRedeeming:C.isPending,redeemingOfferId:R},t.recordId))})]}),e.jsx(te,{open:I,onOpenChange:p,children:e.jsxs(ne,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(ie,{children:e.jsx(de,{children:"Create New Organization"})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(pe,{afterSave:()=>{p(!1),a.invalidateQueries({queryKey:["organization:list"]})}})})]})})]})}export{Qe as default}; diff --git a/hatchetembed/dashboard/assets/index-6bdxZZIJ.js b/hatchetembed/dashboard/assets/index-6bdxZZIJ.js new file mode 100644 index 0000000000..8eed689f48 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-6bdxZZIJ.js @@ -0,0 +1 @@ +import{aF as r,b as i,j as e}from"./index-wypz6hY5.js";import{C as n}from"./index-CKuymrZy.js";import"./settings-page-header-Dal4BvfD.js";import"./support-chat-CGvrRU-a.js";import"./global-emitter-Y_aFw8Zc.js";import"./shard-deployment-key-CJfQX3l3.js";import"./accordion-CBy735bO.js";import"./index-zTXL414p.js";import"./switch-C23Bp5tT.js";import"./data-contracts-BsCw40yT.js";import"./tenant-wrapper-DXQKBTdd.js";import"./confirm-dialog-CMXood8J.js";import"./upgrade-required-BNScyCLS.js";import"./shield-check-lCThuR8D.js";import"./XMarkIcon-BazlLPpF.js";import"./KeyIcon-DY8qn5rN.js";import"./ExclamationTriangleIcon-CruVDzqB.js";import"./PlusIcon-Cn-pCVk3.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="074c3249-0716-4672-b34b-5911b6c45b95",o._sentryDebugIdIdentifier="sentry-dbid-074c3249-0716-4672-b34b-5911b6c45b95")}catch{}})();function j(){const{organization:o}=r({from:i.organizationsRoute.to});return e.jsx(n,{orgId:o})}export{j as default}; diff --git a/hatchetembed/dashboard/assets/index-B8ZIkEyz.js b/hatchetembed/dashboard/assets/index-B8ZIkEyz.js new file mode 100644 index 0000000000..693a7e0fb5 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-B8ZIkEyz.js @@ -0,0 +1 @@ +import{u as C,t as F,j as e,L as u,I as g,A as P,d as I,g as A,b as x,B as R,S as U,e as D,o as B,s as h,h as M,k as N,m as T,l as _,n as k,p as z}from"./index-wypz6hY5.js";import{A as V}from"./auth-page-CDHDcFHW.js";import"./auth-layout-iBwbZOUC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="09584cc3-d8d9-4e9e-b48c-be4273ae025d",a._sentryDebugIdIdentifier="sentry-dbid-09584cc3-d8d9-4e9e-b48c-be4273ae025d")}catch{}})();const Z=B({name:h().min(3,"Name must be at least 3 characters long"),email:h().email("Invalid email address"),password:h().min(8,"Password must be at least 8 characters long").max(64,"Password must be at most 64 characters long").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[0-9]/,"Password must contain at least one number")});function q({className:a,...s}){var b,j,p,w,v,y,E,L,S;const{register:t,handleSubmit:l,formState:{errors:r,isValid:c,touchedFields:i,submitCount:n}}=C({resolver:F(Z),mode:"onChange",reValidateMode:"onChange"}),o=(i.name||n>0?(j=(b=r.name)==null?void 0:b.message)==null?void 0:j.toString():void 0)||((p=s.fieldErrors)==null?void 0:p.name),d=(i.email||n>0?(v=(w=r.email)==null?void 0:w.message)==null?void 0:v.toString():void 0)||((y=s.fieldErrors)==null?void 0:y.email),f=(i.password||n>0?(L=(E=r.password)==null?void 0:E.message)==null?void 0:L.toString():void 0)||((S=s.fieldErrors)==null?void 0:S.password);return e.jsx("div",{className:D("grid gap-6",a),children:e.jsx("form",{onSubmit:l(m=>{s.onSubmit(m)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"name",children:"Name"}),e.jsx(g,{...t("name"),id:"name",placeholder:"Boba Fett",type:"name",autoCapitalize:"none",autoCorrect:"off",disabled:s.isLoading}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"email",children:"Email"}),e.jsx(g,{...t("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:s.isLoading}),d&&e.jsx("div",{className:"text-sm text-red-500",children:d})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"password",children:"Password"}),e.jsx(g,{...t("password"),id:"password",placeholder:"Password",type:"password",disabled:s.isLoading}),f&&e.jsx("div",{className:"text-sm text-red-500",children:f})]}),s.errors&&s.errors.length>0&&e.jsx(P,{variant:"destructive",children:e.jsxs(I,{children:[s.errors.join(" "),s.errors.some(m=>m.toLowerCase().includes("already exists"))&&e.jsxs(e.Fragment,{children:[" ",e.jsx(A,{to:x.authLoginRoute.to,className:"font-semibold underline underline-offset-2",children:"Log in instead"})]})]})}),e.jsxs(R,{disabled:s.isLoading||!c,children:[s.isLoading&&e.jsx(U,{}),"Create Account"]})]})})})}function O(){return e.jsx(V,{title:"Create an account",basicSection:e.jsx(G,{}),altAction:e.jsxs(e.Fragment,{children:["Already have an account?"," ",e.jsx(A,{to:x.authLoginRoute.to,className:"font-semibold text-primary underline underline-offset-4 hover:text-primary/90",children:"Log in"})]})})}function G(){const a=M(),[s,t]=N.useState([]),[l,r]=N.useState({}),{get:c}=T(),{handleApiError:i}=_({setFieldErrors:r,setErrors:t}),{userCreateMutation:n}=k(),o=z({...n(),onSuccess:()=>{c(),a({to:x.authenticatedRoute.to})},onError:i});return e.jsx(q,{isLoading:o.isPending,onSubmit:d=>{t([]),r({}),o.mutate(d)},errors:s,fieldErrors:l})}export{O as default}; diff --git a/hatchetembed/dashboard/assets/index-BfCF55uu.js b/hatchetembed/dashboard/assets/index-BfCF55uu.js new file mode 100644 index 0000000000..774ef5c83b --- /dev/null +++ b/hatchetembed/dashboard/assets/index-BfCF55uu.js @@ -0,0 +1 @@ +import{ch as q,l as te,p as W,a as H,j as t,_ as ae,$ as ne,a0 as se,a1 as ie,B as _,S as G,cN as d,c$ as oe,d0 as re,a2 as le,g as ce,b as ee,cV as Q,aH as de,be as ue,bi as ge,b1 as me,ci as fe,h as xe,x as pe,cP as he,cR as be,N as X,O as B,cX as we,d1 as ye,q as je,k as b,o as Ce,cY as J,s as Y,aB as ve,cz as Z,c_ as ke,cx as De,b6 as Ke,b7 as Ie}from"./index-wypz6hY5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="6437619a-11b1-4fbc-8519-5fb1170aa16c",a._sentryDebugIdIdentifier="sentry-dbid-6437619a-11b1-4fbc-8519-5fb1170aa16c")}catch{}})();function Ne({cron:a,setShowCronRevoke:n,onSuccess:l}){const{tenantId:u}=q(),{handleApiError:f}=te({}),r=W({mutationKey:["cron-job:delete",u,a],mutationFn:async()=>{a&&await H.workflowCronDelete(u,a.metadata.id)},onSuccess:l,onError:f});return t.jsx(ae,{open:!!a,onOpenChange:c=>n(c?a:void 0),children:t.jsx(Se,{isLoading:r.isPending,onSubmit:()=>r.mutate(),onCancel:()=>n(void 0)})})}function Se({className:a,...n}){return t.jsxs(ne,{className:"w-fit min-w-[500px] max-w-[80%]",children:[t.jsx(se,{children:t.jsx(ie,{children:"Delete cron job"})}),t.jsxs("div",{children:[t.jsx("div",{className:"mb-4 text-sm text-foreground",children:"Are you sure you want to delete the cron job? This action will prevent the run from running in the future and cannot be undone."}),t.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[t.jsx(_,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),t.jsxs(_,{variant:"destructive",onClick:()=>{n.onSubmit()},children:[n.isLoading&&t.jsx(G,{}),"Delete cron job"]})]})]})]})}const i={expression:"Expression",description:"Description",timezone:"Timezone",name:"Name",workflow:"Workflow",metadata:"Metadata",input:"Input",createdAt:"Created At",actions:"Actions",enabled:"Enabled"},Te="enabled",Fe="expression",Re="description",Pe="timezone",Ae="name",$="workflow",V="metadata",ze="input",Ee="createdAt",Me="actions",Le=({tenantId:a,onDeleteClick:n,onEnableClick:l,onTriggerClick:u,selectedJobId:f,setSelectedJobId:r,isUpdatePending:c,updatingCronId:g})=>[{accessorKey:Fe,header:({column:e})=>t.jsx(d,{column:e,title:i.expression}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4 whitespace-nowrap",children:e.original.cron}),enableSorting:!1},{accessorKey:Re,header:({column:e})=>t.jsx(d,{column:e,title:i.description}),cell:({row:e})=>t.jsxs("div",{className:"flex flex-row items-center gap-4",children:["Runs ",oe(e.original.cron)]}),enableSorting:!1},{accessorKey:Pe,header:({column:e})=>t.jsx(d,{column:e,title:i.timezone}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:re(e.original.cron)}),enableSorting:!1},{accessorKey:Ae,header:({column:e})=>t.jsx(d,{column:e,title:i.name}),cell:({row:e})=>t.jsx("div",{children:e.original.method==="API"?e.original.name:t.jsx(le,{variant:"outline",children:"Defined in code"})})},{accessorKey:$,header:({column:e})=>t.jsx(d,{column:e,title:i.workflow}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:t.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:t.jsx(ce,{to:ee.tenantWorkflowRoute.to,params:{tenant:a,workflow:e.original.workflowId},children:e.original.workflowName})})}),enableSorting:!1,enableHiding:!0},{accessorKey:V,header:({column:e})=>t.jsx(d,{column:e,title:i.metadata}),cell:({row:e})=>e.original.additionalMetadata?t.jsx(Q,{metadata:e.original.additionalMetadata,isOpen:f===e.original.metadata.id,onOpenChange:p=>{r(p?e.original.metadata.id:null)}}):t.jsx("div",{}),enableSorting:!1},{accessorKey:ze,header:({column:e})=>t.jsx(d,{column:e,title:i.input}),cell:({row:e})=>e.original.input?t.jsx(Q,{metadata:e.original.input,isOpen:f===`${e.original.metadata.id}:input`,onOpenChange:p=>{r(p?`${e.original.metadata.id}:input`:null)},title:"Input"}):t.jsx("div",{}),enableSorting:!1},{accessorKey:Ee,header:({column:e})=>t.jsx(d,{column:e,title:i.createdAt}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:t.jsx(de,{date:e.original.metadata.createdAt})}),enableSorting:!0,enableHiding:!0},{accessorKey:Te,header:({column:e})=>t.jsx(d,{column:e,title:i.enabled}),cell:({row:e})=>t.jsx("div",{children:c&&g===e.original.metadata.id?t.jsx(G,{}):e.original.enabled?t.jsx(ue,{className:"size-4 text-emerald-500"}):t.jsx(ge,{className:"size-4 text-red-500"})})},{accessorKey:Me,header:({column:e})=>t.jsx(d,{column:e,title:i.actions}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row justify-center",children:t.jsx(me,{row:e.original,actions:[{label:"Trigger Now",onClick:()=>u(e.original)},{label:e.original.enabled?"Disable":"Enable",onClick:()=>l(e.original),disabled:c&&g===e.original.metadata.id?"Update in progress":void 0},{label:"Delete",onClick:()=>n(e.original),disabled:e.original.method!=="API"?"This cron was created via a code definition. Delete it from the code definition instead.":void 0}]})}),enableHiding:!0,enableSorting:!1}],Oe=Ce({w:J(Y()).default([]),m:J(Y()).default([])}).default({}),Be=({key:a})=>{var o,U;const{tenantId:n}=q(),{refetchInterval:l}=fe(),u=xe(),{toast:f}=pe(),r=`crons-${a}`,{state:{w:c,m:g},columnFilters:e,setColumnFilters:p,resetFilters:k}=he(Oe,r,{w:$,m:V}),{limit:K,offset:I,pagination:N,setPagination:S,setPageSize:T}=be({key:a,resetPageOnChange:[c,g]}),{data:x,isLoading:F,refetch:R,error:P,isRefetching:A}=X({...B.cronJobs.list(n,{orderByField:ye.CreatedAt,orderByDirection:we.DESC,offset:I,limit:K,workflowId:c[0],additionalMetadata:g.length>0?g:void 0}),refetchInterval:l}),h=W({mutationKey:["cron:update"],mutationFn:async({tenantId:s,cronId:m,data:y})=>{await H.workflowCronUpdate(s,m,y)},onSuccess:async()=>{await je.invalidateQueries({queryKey:B.cronJobs.list(n,{}).queryKey})}}),j=W({mutationFn:async s=>H.workflowCronTrigger(n,s),onSuccess:s=>{var y;const m=(y=s==null?void 0:s.data)==null?void 0:y.externalId;m?u({to:ee.tenantRunRoute.to,params:{tenant:n,run:m}}):f({title:"Run triggered successfully"})}}),D=b.useCallback(s=>j.mutate(s),[j]),C=(o=h.variables)==null?void 0:o.cronId,v=b.useCallback((s,m,y)=>h.mutate({tenantId:s,cronId:m,data:y}),[h]),z=(x==null?void 0:x.rows)??[],E=((U=x==null?void 0:x.pagination)==null?void 0:U.num_pages)??1,{data:w,isLoading:M,error:L}=X({...B.workflows.list(n,{limit:200}),refetchInterval:l}),O=b.useMemo(()=>{var s;return((s=w==null?void 0:w.rows)==null?void 0:s.map(m=>({value:m.metadata.id,label:m.name})))||[]},[w]);return{crons:z,numPages:E,isLoading:F||M,refetch:R,error:P||L,pagination:N,setPagination:S,setPageSize:T,columnFilters:e,setColumnFilters:p,selectedWorkflowIds:c,selectedMetadata:g,workflowKeyFilters:O,isRefetching:A,resetFilters:k,updateCron:v,isUpdatePending:h.isPending,updatingCronId:C,triggerNow:D}};function He(){const{tenantId:a}=q(),[n,l]=b.useState(!1),[u,f]=b.useState(null),[r,c]=ve("hatchet:columns:recurring",{}),{crons:g,numPages:e,isLoading:p,refetch:k,error:K,pagination:I,setPagination:N,setPageSize:S,columnFilters:T,setColumnFilters:x,workflowKeyFilters:F,isRefetching:R,resetFilters:P,updateCron:A,isUpdatePending:h,updatingCronId:j,triggerNow:D}=Be({key:"table"}),[C,v]=b.useState(),z=o=>{v(o)},E=o=>{A(o.tenantId,o.metadata.id,{enabled:!o.enabled})},w=()=>{C&&(v(void 0),k())},M=b.useMemo(()=>Le({tenantId:a,onDeleteClick:z,onEnableClick:E,onTriggerClick:o=>D(o.metadata.id),selectedJobId:u,setSelectedJobId:f,isUpdatePending:h,updatingCronId:j}),[a,u,h,j,D]),L=[{columnId:$,title:i.workflow,options:F,type:Z.Radio},{columnId:V,title:i.metadata,type:Z.KeyValue}],O=[t.jsx(_,{onClick:()=>l(!0),variant:"cta",children:"Create Cron Job"},"create-cron")];return t.jsxs(t.Fragment,{children:[C&&t.jsx(Ne,{cron:C,setShowCronRevoke:v,onSuccess:w}),t.jsx(ke,{defaultTimingOption:"cron",defaultWorkflow:void 0,show:n,onClose:()=>l(!1)}),t.jsx(De,{error:K,isLoading:p,columns:M,data:g,filters:L,showColumnToggle:!0,columnVisibility:r,setColumnVisibility:c,columnFilters:T,setColumnFilters:x,pagination:I,setPagination:N,onSetPageSize:S,pageCount:e,rightActions:O,getRowId:o=>o.metadata.id,columnKeyToName:i,refetchProps:{isRefetching:R,onRefetch:k},onResetFilters:P,showSelectedRows:!1,emptyState:t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[t.jsx("p",{className:"text-lg font-semibold",children:"No crons found"}),t.jsx("div",{className:"w-fit",children:t.jsx(Ke,{doc:Ie.v1["cron-runs"],label:"Learn about cron jobs in Hatchet"})})]})})]})}export{He as default}; diff --git a/hatchetembed/dashboard/assets/index-BhNMQvJK.js b/hatchetembed/dashboard/assets/index-BhNMQvJK.js new file mode 100644 index 0000000000..f29c3b8b17 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-BhNMQvJK.js @@ -0,0 +1 @@ +import{ci as _,N as D,O as I,k as p,j as e,ct as de,S as le,aH as re,B,az as ja,aa as T,W as ba,X as va,a3 as wa,a4 as Ta,Z as Aa,e as ka,eG as La,c3 as la,F as W,bj as Fa,I as M,cq as E,bF as za,fe as Ba,ff as Oa,a5 as K,a6 as P,a7 as V,a8 as Q,a9 as A,fg as te,ch as ya,u as Ua,t as _a,fc as ce,ar as Ka,A as ra,T as ca,d as da,L as b,b2 as C,bs as Ca,bt as Sa,bu as G,bv as U,by as Pa,o as F,fd as z,s as w,bb as Va,cY as Y,b3 as Qa,h as Ga,aF as Za,b as ae,d5 as $a,l as Ya,p as ua,Q as ma,i as Ha,d6 as qa}from"./index-wypz6hY5.js";import{M as Xa}from"./managed-workers-gate-DSQbhr0o.js";import{G as Na}from"./github-button-Bg3zFNFs.js";import{F as Ra}from"./ArrowPathIcon-7-QIcdZ1.js";import{m as X,g as ha,a as Ja,b as Wa,E as Ea,r as ga,U as es,s as ts}from"./create-worker-form-CwO9Ppzx.js";import{A as xa,a as se,b as ne,c as ie}from"./accordion-CBy735bO.js";import{m as pa,F as as}from"./managed-compute-cM-46wXY.js";import{F as fa}from"./ExclamationTriangleIcon-CruVDzqB.js";import{F as ss}from"./PlusIcon-Cn-pCVk3.js";import{C as ns}from"./confirm-dialog-CMXood8J.js";import{R as is}from"./resource-not-found-C1NYDT14.js";import"./steps-2xcvKVXE.js";import"./index-zTXL414p.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="c14f53d3-1a87-492a-8ad6-c85a41a1edc4",n._sentryDebugIdIdentifier="sentry-dbid-c14f53d3-1a87-492a-8ad6-c85a41a1edc4")}catch{}})();function os({buildId:n}){var o;const{refetchInterval:i}=_(),t=D({...I.cloud.getBuildLogs(n),refetchInterval:i}),a=p.useMemo(()=>{var g;const l=((g=t.data)==null?void 0:g.rows)||[];return l.length===0?[{line:"Loading...",timestamp:new Date().toISOString(),instance:"Hatchet"}]:l.map(c=>({timestamp:c.timestamp,line:c.line,instance:c.instance,level:c.level,metadata:c.metadata}))},[(o=t.data)==null?void 0:o.rows]);return e.jsx("div",{className:"w-full flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:a})})}function ls({buildId:n}){var a,o,l;const i=D({...I.cloud.getBuild(n)});if(i.isLoading)return e.jsx(le,{});const t=i.data;return e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"Build Overview"}),e.jsx("div",{className:"flex flex-row gap-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Build ID: ",(a=t==null?void 0:t.metadata)==null?void 0:a.id]}),e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Created: ",e.jsx(re,{date:(o=t==null?void 0:t.metadata)==null?void 0:o.createdAt})]}),(t==null?void 0:t.finishTime)&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Finished: ",e.jsx(re,{date:t==null?void 0:t.finishTime})]}),e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Status: ",(l=i.data)==null?void 0:l.status]})]})}),e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"Build Logs"}),e.jsx(os,{buildId:n})]})}function rs({managedWorkerId:n,deployKey:i}){var l;const{refetchInterval:t}=_(),a=D({...I.cloud.getIacLogs(n,i),refetchInterval:t}),o=p.useMemo(()=>{var c;const g=((c=a.data)==null?void 0:c.rows)||[];return g.length===0?[{line:"Loading...",timestamp:new Date().toISOString(),instance:"Hatchet"}]:g.map(r=>({timestamp:r.timestamp,line:r.line,instance:r.instance,level:r.level,metadata:r.metadata}))},[(l=a.data)==null?void 0:l.rows]);return e.jsx("div",{className:"w-full flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:o})})}function cs({managedWorkerId:n,deployKey:i}){return e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"IaC Logs"}),e.jsx(rs,{managedWorkerId:n,deployKey:i})]})}function ds({managedWorker:n}){const[i,t]=p.useState(),[a,o]=p.useState();return i?e.jsx(ms,{buildId:i,back:()=>t(void 0)}):a?e.jsx(hs,{managedWorkerId:n.metadata.id,deployKey:a,back:()=>o(void 0)}):e.jsx(us,{managedWorker:n,setBuildId:t,setDeployKey:o})}function us({managedWorker:n,setBuildId:i,setDeployKey:t}){var g;const{refetchInterval:a}=_(),o=D({...I.cloud.listManagedWorkerEvents(n.metadata.id||""),enabled:!!n,refetchInterval:a});if(!n||o.isLoading)return e.jsx(le,{});const l=((g=o.data)==null?void 0:g.rows)||[];return e.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[o.isLoading&&e.jsx(le,{}),l.length===0&&e.jsx(ba,{className:"h-[400px] bg-muted/30",children:e.jsx(va,{children:e.jsx(wa,{className:"text-sm tracking-wide",children:"No events found"})})}),l.map((c,r)=>e.jsx(gs,{managedWorker:n,event:c,setBuildId:i,setDeployKey:t},r))]})}function ms({buildId:n,back:i}){return e.jsxs("div",{className:"mt-8 flex flex-col items-start justify-start gap-4",children:[e.jsx("div",{className:"flex flex-row items-center justify-start gap-4",children:e.jsx(B,{onClick:i,variant:"link",leftIcon:e.jsx(ja,{className:"size-4"}),children:"Back"})}),e.jsx(T,{}),e.jsx(ls,{buildId:n})]})}function hs({managedWorkerId:n,deployKey:i,back:t}){return e.jsxs("div",{className:"mt-8 flex flex-col items-start justify-start gap-4",children:[e.jsx("div",{className:"flex flex-row items-center justify-start gap-4",children:e.jsx(B,{onClick:t,variant:"link",leftIcon:e.jsx(ja,{className:"size-4"}),children:"Back"})}),e.jsx(T,{}),e.jsx(cs,{managedWorkerId:n,deployKey:i})]})}function gs({managedWorker:n,event:i,setBuildId:t,setDeployKey:a}){return e.jsxs(ba,{className:"bg-muted/30",children:[e.jsxs(va,{children:[e.jsxs("div",{className:"flex flex-row items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[e.jsx(fs,{severity:i.status}),e.jsx(wa,{className:"text-sm tracking-wide",children:i.message})]}),e.jsx(re,{date:i.timeLastSeen})]}),e.jsx(Ta,{className:"mt-2",children:i.message})]}),e.jsx(Aa,{className:"z-10 bg-background p-0"}),xs(n,i,t,a)]})}function xs(n,i,t,a){if(i.data){const o=i.data,l=[];if(o.build_id&&l.push(e.jsx(B,{variant:"link",size:"xs",onClick:()=>{t(o.build_id)},leftIcon:e.jsx(la,{className:"size-4"}),children:"View build info"})),o.deploy_key&&l.push(e.jsx(B,{variant:"link",size:"xs",onClick:()=>{a(o.deploy_key)},leftIcon:e.jsx(la,{className:"size-4"}),children:"View IaC debug info"})),o.commit_sha&&n.buildConfig&&l.push(e.jsx(Na,{buildConfig:n.buildConfig,commitSha:o.commit_sha})),l.length)return e.jsx(La,{className:"gap-4",children:l})}return null}const ps={SUCCEEDED:"border-transparent rounded-full bg-green-500",FAILED:"border-transparent rounded-full bg-red-500",CANCELLED:"border-transparent rounded-full bg-gray-500",IN_PROGRESS:"border-transparent rounded-full bg-yellow-500",SCALE_UP:"border-transparent rounded-full bg-blue-500",SCALE_DOWN:"border-transparent rounded-full bg-purple-500"};function fs({severity:n}){return e.jsx("div",{className:ka(ps[n],"h-[6px] w-[6px] rounded-full")})}function js({managedWorkerId:n}){var r;const{refetchInterval:i}=_(),[t,a]=p.useState(!1),o=D({...I.cloud.listManagedWorkerInstances(n),refetchInterval:i}),g=p.useMemo(()=>{var m;return((m=o.data)==null?void 0:m.rows)||[]},[(r=o.data)==null?void 0:r.rows]).map(x=>({...x,metadata:{id:x.instanceId}})),c=p.useMemo(()=>[{columnLabel:"Name",cellRenderer:x=>e.jsx("div",{className:"text-md min-w-fit whitespace-nowrap p-2",children:x.name})},{columnLabel:"State",cellRenderer:x=>e.jsx("div",{className:"whitespace-nowrap",children:x.state})},{columnLabel:"Commit",cellRenderer:x=>e.jsx("div",{className:"whitespace-nowrap",children:x.commitSha.substring(0,7)})}],[]);return o.isLoading?e.jsx(W,{}):e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(B,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:()=>{o.refetch(),a(!t)},variant:"outline","aria-label":"Refresh instances list",children:e.jsx(Ra,{className:`size-4 transition-transform ${t?"rotate-180":""}`})})}),g.length>0?e.jsx(Fa,{columns:c,data:g,rowKey:x=>x.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"There are no instances currently active for this managed worker pool."})]})}function bs({managedWorker:n}){const[i,t]=p.useState({}),[a,o]=p.useState(),[l,g]=p.useState(),[c,r]=p.useState(""),[x,m]=p.useState(),[v,f]=p.useState([]),[N,h]=p.useState(!1),{refetchInterval:R}=_(),S=D({...I.cloud.getManagedWorkerLogs((n==null?void 0:n.metadata.id)||"",i),enabled:!!n,refetchInterval:R});p.useEffect(()=>{var $;const O=((($=S.data)==null?void 0:$.rows)||[]).map(L=>({timestamp:L.timestamp,line:L.line,instance:L.instance,level:L.level,metadata:L.metadata}));!x&&S.isSuccess?(m(S.dataUpdatedAt),f(O)):S.isSuccess&&S.dataUpdatedAt!==x&&(m(S.dataUpdatedAt),f(L=>vs(L,O)))},[x,S.isSuccess,S.data,S.dataUpdatedAt]);const H=async()=>{const y=v[v.length-1];S.isSuccess&&x&&(y!=null&&y.timestamp)&&(!a||(a==null?void 0:a.toISOString())>y.timestamp)&&t({...i,before:a==null?void 0:a.toISOString(),after:y.timestamp,direction:"forward"})},Z=async()=>{const y=v[0];S.isSuccess&&x&&(y!=null&&y.timestamp)&&(!l||(l==null?void 0:l.toISOString()){f([]),t({...i,before:a&&a.toISOString(),after:l&&l.toISOString()}),h(!N)},ee=(a==null?void 0:a.toISOString())===(i==null?void 0:i.before)&&(l==null?void 0:l.toISOString())===(i==null?void 0:i.after);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("form",{onSubmit:()=>t({...i,search:c}),children:[e.jsx(M,{id:"search-input",placeholder:"Search...",value:c,onChange:y=>r(y.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsx("button",{type:"submit",className:"hidden",formTarget:"search-input"})]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(E,{date:l,setDate:g,label:"After"}),e.jsx(E,{date:a,setDate:o,label:"Before"}),e.jsx(B,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:k,variant:ee?"outline":"default","aria-label":"Refresh logs",children:e.jsx(Ra,{className:`size-4 transition-transform ${N?"rotate-180":""}`})},"refresh")]})]}),e.jsx("div",{className:"flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:v,onScrollToBottom:H,onScrollToTop:Z})})]})}const vs=(n,i)=>{const t=[...n,...i],a=Array.from(new Map(t.map(o=>[(o.timestamp||"")+(o.instance||"")+(o.line||""),o])).values());return a.sort((o,l)=>o.timestamp===l.timestamp?(o.line||"")<(l.line||"")?-1:1:(o.timestamp||"")<(l.timestamp||"")?-1:1),a},J=n=>{switch(n){case"1h":return new Date(Date.now()-3600*1e3).toISOString();case"6h":return new Date(Date.now()-360*60*1e3).toISOString();case"1d":return new Date(Date.now()-1440*60*1e3).toISOString();case"7d":return new Date(Date.now()-10080*60*1e3).toISOString()}};function ws({managedWorker:n}){const{refetchInterval:i}=_(),[t,a]=za(Ba),[o,l]=p.useState(),[g,c]=p.useState(J(t)||new Date(Date.now()-1440*60*1e3).toISOString()),[r,x]=p.useState();p.useEffect(()=>{const h=setInterval(()=>{o||c(J(t)||new Date(Date.now()-864e5).toISOString())},6e4);return()=>clearInterval(h)},[t,o]),p.useEffect(()=>{o&&o.length===2?(c(o[0]),x(o[1])):t&&(c(J(t)),x(void 0))},[t,o,c]);const m=p.useMemo(()=>({after:g,before:r}),[g,r]),v=D({...I.cloud.getManagedWorkerCpuMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i}),f=D({...I.cloud.getManagedWorkerMemoryMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i}),N=D({...I.cloud.getManagedWorkerDiskMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i});return v.isLoading||f.isLoading||N.isLoading||!v.data||!f.data||!N.data?e.jsx(W,{}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"mt-4 flex flex-row items-center justify-between",children:[e.jsx("h3",{className:"text-xl font-bold leading-tight text-foreground",children:"Metrics"}),e.jsxs("div",{className:"my-4 flex flex-row items-center justify-end gap-2",children:[o&&[e.jsxs(B,{onClick:()=>{l(void 0)},variant:"outline",size:"sm",className:"h-9 py-2 text-xs",children:[e.jsx(Oa,{className:"mr-2 h-[18px] w-[18px]"}),"Clear"]},"clear"),e.jsx(E,{label:"After",date:g?new Date(g):void 0,setDate:h=>{c(h==null?void 0:h.toISOString())}},"after"),e.jsx(E,{label:"Before",date:r?new Date(r):void 0,setDate:h=>{x(h==null?void 0:h.toISOString())}},"before")],e.jsxs(K,{value:o?"custom":t,onValueChange:h=>{h!=="custom"?(a(h),l(void 0)):l([J(h)||new Date(Date.now()-1440*60*1e3).toISOString(),new Date().toISOString()])},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"timerange",placeholder:"Choose time range"})}),e.jsxs(Q,{children:[e.jsx(A,{value:"1h",children:"1 hour"}),e.jsx(A,{value:"6h",children:"6 hours"}),e.jsx(A,{value:"1d",children:"1 day"}),e.jsx(A,{value:"7d",children:"7 days"}),e.jsx(A,{value:"custom",children:"Custom"})]})]})]})]}),e.jsx(T,{}),e.jsx("h4",{className:"ml-4 mt-2 text-lg font-bold leading-tight text-foreground",children:"CPU"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(v.data),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0}),e.jsx("h4",{className:"ml-4 mt-16 text-lg font-bold leading-tight text-foreground",children:"Memory"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(f.data,h=>h/(1e3*1e3)),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0}),e.jsx("h4",{className:"ml-4 mt-16 text-lg font-bold leading-tight text-foreground",children:"Disk"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(N.data,h=>h/(1e3*1e3)),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0})]})}function oe(n,i){const t={};return n.forEach(a=>{var l,g;let o=Object.values(a.metric||{}).join("-");(l=a.metric)!=null&&l.instance&&((g=a.metric)!=null&&g.region)&&(o=`[${a.metric.region}] ${a.metric.instance}`),(a.values||[]).forEach(([c,r])=>{const x=new Date(c*1e3).toISOString();if(!t[x]){const v={date:x};t[x]=v}let m=parseFloat(r);m=i?i(m):m,t[x][o]=m})}),Object.values(t)}const ys=F({name:w().optional(),buildConfig:F({githubInstallationId:w().uuid().length(36),githubRepositoryOwner:w(),githubRepositoryName:w(),githubRepositoryBranch:w(),steps:Y(F({buildDir:w(),dockerfilePath:w()}))}).optional(),secrets:F({add:Y(F({key:w(),value:w()})),update:Y(F({id:w(),key:w(),value:w()})),delete:Y(w())}),runtimeConfig:F({numReplicas:z().min(0).max(16).optional(),cpuKind:w(),cpus:z(),memoryMb:z(),regions:Y(Qa(ce)).optional(),autoscaling:F({waitDuration:w(),rollingWindowDuration:w(),utilizationScaleUpThreshold:z(),utilizationScaleDownThreshold:z(),increment:z(),minAwakeReplicas:z(),maxReplicas:z(),scaleToZero:Va(),fly:F({autoscalingKey:w(),currentReplicas:z()})}).optional()}).optional()});function Cs({onSubmit:n,isLoading:i,fieldErrors:t,managedWorker:a}){var ke,Le,Fe,ze,Be,Oe,Ue,_e,Ke,Pe,Ve,Qe,Ge,Ze,$e,Ye,He,qe,Xe,Je,We,Ee,et,tt,at,st,nt,it,ot,lt,rt,ct,dt,ut,mt,ht,gt,xt,pt,ft,jt,bt,vt,wt,yt,Ct,St,Nt,Rt,Dt,It,Mt,Tt,At,kt,Lt,Ft,zt,Bt,Ot,Ut,_t,Kt,Pt,Vt,Qt,Gt,Zt,$t,Yt,Ht,qt,Xt,Jt,Wt,Et,ea,ta,aa,sa,na,ia;const{tenantId:o}=ya(),{watch:l,handleSubmit:g,control:c,setValue:r,getValues:x,formState:{errors:m}}=Ua({resolver:_a(ys),defaultValues:{name:a.name,buildConfig:{githubInstallationId:(ke=a.buildConfig)==null?void 0:ke.githubInstallationId,githubRepositoryBranch:(Le=a.buildConfig)==null?void 0:Le.githubRepositoryBranch,githubRepositoryName:(ze=(Fe=a.buildConfig)==null?void 0:Fe.githubRepository)==null?void 0:ze.repo_name,githubRepositoryOwner:(Oe=(Be=a.buildConfig)==null?void 0:Be.githubRepository)==null?void 0:Oe.repo_owner,steps:((_e=(Ue=a.buildConfig)==null?void 0:Ue.steps)==null?void 0:_e.map(s=>({buildDir:s.buildDir,dockerfilePath:s.dockerfilePath})))||[{buildDir:".",dockerfilePath:"./Dockerfile"}]},secrets:{add:[],update:[],delete:[]},runtimeConfig:((Ke=a.runtimeConfigs)==null?void 0:Ke.length)==1?{numReplicas:a.runtimeConfigs[0].autoscaling!=null?void 0:a.runtimeConfigs[0].numReplicas,cpuKind:a.runtimeConfigs[0].cpuKind,cpus:a.runtimeConfigs[0].cpus,memoryMb:a.runtimeConfigs[0].memoryMb,regions:[a.runtimeConfigs[0].region],autoscaling:a.runtimeConfigs[0].autoscaling!=null?{waitDuration:a.runtimeConfigs[0].autoscaling.waitDuration,rollingWindowDuration:a.runtimeConfigs[0].autoscaling.rollingWindowDuration,utilizationScaleUpThreshold:a.runtimeConfigs[0].autoscaling.utilizationScaleUpThreshold,utilizationScaleDownThreshold:a.runtimeConfigs[0].autoscaling.utilizationScaleDownThreshold,increment:a.runtimeConfigs[0].autoscaling.increment,minAwakeReplicas:a.runtimeConfigs[0].autoscaling.minAwakeReplicas,maxReplicas:a.runtimeConfigs[0].autoscaling.maxReplicas,scaleToZero:a.runtimeConfigs[0].autoscaling.scaleToZero,fly:{autoscalingKey:"dashboard",currentReplicas:a.runtimeConfigs[0].autoscaling.minAwakeReplicas}}:void 0}:void 0}}),[v,f]=p.useState("1 CPU, 1 GB RAM (shared CPU)");p.useEffect(()=>{if(a!=null&&a.runtimeConfigs&&a.runtimeConfigs.length>0){const s=a.runtimeConfigs[0],u=X.find(d=>d.cpuKind===s.cpuKind&&d.cpus===s.cpus&&d.memoryMb===s.memoryMb);u&&f(u.title)}},[a]);const N=l("runtimeConfig.regions"),h=l("buildConfig.githubInstallationId"),R=l("buildConfig.githubRepositoryOwner"),S=l("buildConfig.githubRepositoryName"),H=ha(R,S),Z=l("buildConfig.githubRepositoryBranch"),k=D({...I.github.listInstallations(o)}),ee=D({...I.github.listRepos(o,h)}),y=D({...I.github.listBranches(o,h,R,S)}),[O,$]=p.useState(((Pe=a.directSecrets)==null?void 0:Pe.map(s=>({key:s.key,value:s.hint||"",hidden:!1,locked:!1,deleted:!1,id:s.id,hint:s.hint})))||[]),[L,ue]=p.useState(((Ve=a.runtimeConfigs)==null?void 0:Ve.length)==1&&a.runtimeConfigs[0].autoscaling!=null?"Autoscaling":"Static"),me=((Ge=(Qe=m.name)==null?void 0:Qe.message)==null?void 0:Ge.toString())||(t==null?void 0:t.name),he=((qe=(He=(Ye=($e=(Ze=m.buildConfig)==null?void 0:Ze.steps)==null?void 0:$e[0])==null?void 0:Ye.buildDir)==null?void 0:He.message)==null?void 0:qe.toString())||(t==null?void 0:t.buildDir),ge=((et=(Ee=(We=(Je=(Xe=m.buildConfig)==null?void 0:Xe.steps)==null?void 0:Je[0])==null?void 0:We.dockerfilePath)==null?void 0:Ee.message)==null?void 0:et.toString())||(t==null?void 0:t.dockerfilePath),xe=((st=(at=(tt=m.runtimeConfig)==null?void 0:tt.numReplicas)==null?void 0:at.message)==null?void 0:st.toString())||(t==null?void 0:t.numReplicas),pe=((ot=(it=(nt=m.secrets)==null?void 0:nt.add)==null?void 0:it.message)==null?void 0:ot.toString())||(t==null?void 0:t.secrets),fe=((ct=(rt=(lt=m.runtimeConfig)==null?void 0:lt.cpuKind)==null?void 0:rt.message)==null?void 0:ct.toString())||(t==null?void 0:t.cpuKind),je=((mt=(ut=(dt=m.runtimeConfig)==null?void 0:dt.cpus)==null?void 0:ut.message)==null?void 0:mt.toString())||(t==null?void 0:t.cpus),be=((xt=(gt=(ht=m.runtimeConfig)==null?void 0:ht.memoryMb)==null?void 0:gt.message)==null?void 0:xt.toString())||(t==null?void 0:t.memoryMb),ve=((jt=(ft=(pt=m.buildConfig)==null?void 0:pt.githubInstallationId)==null?void 0:ft.message)==null?void 0:jt.toString())||(t==null?void 0:t.githubInstallationId),we=((wt=(vt=(bt=m.buildConfig)==null?void 0:bt.githubRepositoryOwner)==null?void 0:vt.message)==null?void 0:wt.toString())||(t==null?void 0:t.githubRepositoryOwner),ye=((St=(Ct=(yt=m.buildConfig)==null?void 0:yt.githubRepositoryName)==null?void 0:Ct.message)==null?void 0:St.toString())||(t==null?void 0:t.githubRepositoryName),Ce=((Dt=(Rt=(Nt=m.buildConfig)==null?void 0:Nt.githubRepositoryBranch)==null?void 0:Rt.message)==null?void 0:Dt.toString())||(t==null?void 0:t.githubRepositoryBranch),Se=((At=(Tt=(Mt=(It=m.runtimeConfig)==null?void 0:It.autoscaling)==null?void 0:Mt.waitDuration)==null?void 0:Tt.message)==null?void 0:At.toString())||(t==null?void 0:t.waitDuration),Ne=((zt=(Ft=(Lt=(kt=m.runtimeConfig)==null?void 0:kt.autoscaling)==null?void 0:Lt.rollingWindowDuration)==null?void 0:Ft.message)==null?void 0:zt.toString())||(t==null?void 0:t.rollingWindowDuration),Re=((_t=(Ut=(Ot=(Bt=m.runtimeConfig)==null?void 0:Bt.autoscaling)==null?void 0:Ot.utilizationScaleUpThreshold)==null?void 0:Ut.message)==null?void 0:_t.toString())||(t==null?void 0:t.utilizationScaleUpThreshold),De=((Qt=(Vt=(Pt=(Kt=m.runtimeConfig)==null?void 0:Kt.autoscaling)==null?void 0:Pt.utilizationScaleDownThreshold)==null?void 0:Vt.message)==null?void 0:Qt.toString())||(t==null?void 0:t.utilizationScaleDownThreshold),Ie=((Yt=($t=(Zt=(Gt=m.runtimeConfig)==null?void 0:Gt.autoscaling)==null?void 0:Zt.increment)==null?void 0:$t.message)==null?void 0:Yt.toString())||(t==null?void 0:t.increment),Me=((Jt=(Xt=(qt=(Ht=m.runtimeConfig)==null?void 0:Ht.autoscaling)==null?void 0:qt.minAwakeReplicas)==null?void 0:Xt.message)==null?void 0:Jt.toString())||(t==null?void 0:t.minAwakeReplicas),Te=((ta=(ea=(Et=(Wt=m.runtimeConfig)==null?void 0:Wt.autoscaling)==null?void 0:Et.maxReplicas)==null?void 0:ea.message)==null?void 0:ta.toString())||(t==null?void 0:t.maxReplicas),Ae=((ia=(na=(sa=(aa=m.runtimeConfig)==null?void 0:aa.autoscaling)==null?void 0:sa.scaleToZero)==null?void 0:na.message)==null?void 0:ia.toString())||(t==null?void 0:t.scaleToZero);p.useEffect(()=>{var s;k.isSuccess&&k.data.rows.length>0&&!h&&r("buildConfig.githubInstallationId",((s=a.buildConfig)==null?void 0:s.githubInstallationId)||k.data.rows[0].metadata.id)},[a,k,r,h]),p.useEffect(()=>{x("runtimeConfig")||(r("runtimeConfig",{numReplicas:1,cpuKind:"shared",cpus:1,memoryMb:1024,regions:[ce.Sjc]}),f("1 CPU, 1 GB RAM (shared CPU)"),r("runtimeConfig.regions",[ce.Sjc]))},[x,r]);const{can:q}=Ka(),[Da]=p.useMemo(()=>{const s=X.find(d=>d.title===v);if(!s||!q)return[!0,void 0];const u={cpuKind:s.cpuKind,cpus:s.cpus,memoryMb:s.memoryMb};return q(pa.selectCompute(u))},[q,v]);if(p.useEffect(()=>{const s=O.filter(j=>!j.id&&!j.deleted),u=O.filter(j=>j.id&&!j.deleted&&j.isEditing),d=O.filter(j=>j.id&&j.deleted).map(j=>j.id);r("secrets.add",s.map(j=>({key:j.key,value:j.value}))),r("secrets.update",u.map(j=>({id:j.id,key:j.key,value:j.value}))),r("secrets.delete",d)},[O,r]),k.isSuccess&&k.data.rows.length===0)return e.jsxs(ra,{children:[e.jsx(fa,{className:"size-4"}),e.jsx(ca,{className:"font-semibold",children:"Link a Github account"}),e.jsxs(da,{children:["You don't have any Github accounts linked. Please"," ",e.jsx("a",{href:"/api/v1/cloud/users/github-app/start",className:"text-indigo-400",children:"link a Github account"})," ","first."]})]});const Ia=s=>{const u={cpuKind:s.cpuKind,cpus:s.cpus,memoryMb:s.memoryMb},[d]=q(pa.selectCompute(u));return e.jsxs(A,{value:s.title,children:[s.title," ",!d&&"🔒"]},s.title)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Change the configuration of your service. This will trigger a redeployment of all workers."}),!a.canUpdate&&e.jsxs(ra,{className:"mt-4",variant:"warn",children:[e.jsx(fa,{className:"size-4"}),e.jsx(ca,{className:"font-semibold",children:"You do not have permission to update this service."}),e.jsxs(da,{children:["Please make sure your linked"," ",e.jsx("a",{href:`/tenants/${o}/settings/github`,className:"text-indigo-400",children:"Github account"})," ","has write access to the repository."]})]}),e.jsxs("div",{className:"mt-6 flex flex-col gap-4",children:[e.jsx("div",{children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx(b,{htmlFor:"name",children:"Name"}),e.jsx(C,{control:c,name:"name",render:({field:s})=>e.jsx(M,{...s,id:"name",placeholder:"my-awesome-service"})}),me&&e.jsx("div",{className:"text-sm text-red-500",children:me})]})}),e.jsxs(xa,{type:"multiple",className:"w-full",children:[e.jsxs(se,{value:"build",children:[e.jsx(ne,{className:"text-lg font-semibold text-foreground",children:"Build configuration"}),e.jsxs(ie,{className:"grid max-w-3xl gap-4",children:[e.jsx(b,{htmlFor:"role",children:"Github account"}),e.jsx(C,{control:c,name:"buildConfig.githubInstallationId",render:({field:s})=>{var u;return e.jsxs(K,{value:h,onValueChange:d=>{s.onChange(d),r("buildConfig.githubRepositoryOwner",""),r("buildConfig.githubRepositoryName",""),r("buildConfig.githubRepositoryBranch","")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose account"})}),e.jsx(Q,{children:(u=k.data)==null?void 0:u.rows.map(d=>e.jsx(A,{value:d.metadata.id,children:d.account_name},d.metadata.id))})]})}}),ve&&e.jsx("div",{className:"text-sm text-red-500",children:ve}),e.jsx(b,{htmlFor:"role",children:"Github repo"}),e.jsx(C,{control:c,name:"buildConfig.githubRepositoryName",render:({field:s})=>{var u;return e.jsxs(K,{...s,value:H,onValueChange:d=>{r("buildConfig.githubRepositoryOwner",Ja(d)||""),r("buildConfig.githubRepositoryName",Wa(d)||""),r("buildConfig.githubRepositoryBranch","")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose repository"})}),e.jsx(Q,{children:(u=ee.data)==null?void 0:u.map(d=>e.jsxs(A,{value:ha(d.repo_owner,d.repo_name)||"",children:[d.repo_owner,"/",d.repo_name]},d.repo_owner+d.repo_name))})]})}}),we&&e.jsx("div",{className:"text-sm text-red-500",children:we}),ye&&e.jsx("div",{className:"text-sm text-red-500",children:ye}),e.jsx(b,{htmlFor:"role",children:"Github branch"}),e.jsx(C,{control:c,name:"buildConfig.githubRepositoryBranch",render:({field:s})=>{var u;return e.jsxs(K,{onValueChange:s.onChange,...s,children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose branch"})}),e.jsx(Q,{children:(u=y.data)==null?void 0:u.map(d=>e.jsx(A,{value:d.branch_name,children:d.branch_name},d.branch_name))})]})}}),Ce&&e.jsx("div",{className:"text-sm text-red-500",children:Ce}),e.jsx(b,{htmlFor:"buildDir",children:"Build directory"}),e.jsx(C,{control:c,name:"buildConfig.steps.0.buildDir",render:({field:s})=>e.jsx(M,{...s,placeholder:"build",id:"buildDir",defaultValue:".",disabled:!Z})}),he&&e.jsx("div",{className:"text-sm text-red-500",children:he}),e.jsx(b,{htmlFor:"dockerfile",children:"Path to Dockerfile"}),e.jsx(C,{control:c,name:"buildConfig.steps.0.dockerfilePath",render:({field:s})=>e.jsx(M,{...s,placeholder:".",id:"dockerfile",defaultValue:"./Dockerfile",disabled:!Z})}),ge&&e.jsx("div",{className:"text-sm text-red-500",children:ge})]})]}),e.jsxs(se,{value:"runtime",children:[e.jsx(ne,{className:"text-lg font-semibold text-foreground",children:"Runtime configuration"}),e.jsxs(ie,{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the runtime settings for this service."}),e.jsx(b,{children:"Environment Variables"}),e.jsx(Ea,{values:O,setValues:$,onUpdate:s=>{$(u=>u.map(j=>{const oa=s.find(Ma=>Ma.id===j.id);return oa?{...j,...oa}:j}))}}),pe&&e.jsx("div",{className:"text-sm text-red-500",children:pe}),e.jsx(b,{children:"Machine Configuration"}),e.jsxs("div",{className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"region",children:"Region"}),e.jsxs(K,{value:N==null?void 0:N.toString(),onValueChange:s=>{const u=ga.find(d=>d.value===s);u&&r("runtimeConfig.regions",[u.value])},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"region",placeholder:"Choose region"})}),e.jsx(Q,{children:ga.map(s=>e.jsx(A,{value:s.value,children:s.name},s.value))})]}),e.jsx(b,{htmlFor:"machineType",children:"Machine type"}),e.jsx(C,{control:c,name:"runtimeConfig.cpuKind",render:({field:s})=>e.jsxs(K,{...s,value:v,onValueChange:u=>{const d=X.find(j=>j.title===u);f(u),r("runtimeConfig.cpus",(d==null?void 0:d.cpus)||1),r("runtimeConfig.memoryMb",(d==null?void 0:d.memoryMb)||1024),r("runtimeConfig.cpuKind",(d==null?void 0:d.cpuKind)||"shared")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"machineType",placeholder:"Choose type"})}),e.jsx(Q,{children:X.map(Ia)})]})}),!Da&&e.jsx(es,{feature:`The selected machine type (${v})`}),fe&&e.jsx("div",{className:"text-sm text-red-500",children:fe}),je&&e.jsx("div",{className:"text-sm text-red-500",children:je}),be&&e.jsx("div",{className:"text-sm text-red-500",children:be}),e.jsx(b,{children:"Scaling Method"}),e.jsxs(Ca,{defaultValue:"Static",value:L,onValueChange:s=>{if(s==="Static"){ue("Static"),r("runtimeConfig.numReplicas",1),r("runtimeConfig.autoscaling",void 0);return}else ue("Autoscaling"),r("runtimeConfig.numReplicas",void 0),r("runtimeConfig.autoscaling",{waitDuration:"1m",rollingWindowDuration:"2m",utilizationScaleUpThreshold:.75,utilizationScaleDownThreshold:.25,increment:1,scaleToZero:!0,minAwakeReplicas:1,maxReplicas:10,fly:{autoscalingKey:"dashboard",currentReplicas:1}})},children:[e.jsx(Sa,{layout:"underlined",children:ts.map(s=>e.jsx(G,{variant:"underlined",value:s,children:s},s))}),e.jsxs(U,{value:"Static",className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"numReplicas",children:"Number of replicas"}),e.jsx(C,{control:c,name:"runtimeConfig.numReplicas",render:({field:s})=>e.jsx(M,{...s,type:"number",onChange:u=>{if(u.target.value===""){s.onChange(u.target.value);return}s.onChange(parseInt(u.target.value))},min:0,max:16,id:"numReplicas",placeholder:"1"})}),xe&&e.jsx("div",{className:"text-sm text-red-500",children:xe})]}),e.jsxs(U,{value:"Autoscaling",className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"minAwakeReplicas",children:"Min Replicas"}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.minAwakeReplicas",render:({field:s})=>e.jsx(M,{...s,id:"minAwakeReplicas",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value)),r("runtimeConfig.autoscaling.fly.currentReplicas",parseInt(u.target.value))}})}),Me&&e.jsx("div",{className:"text-sm text-red-500",children:Me}),e.jsx(b,{htmlFor:"maxReplicas",children:"Max Replicas"}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.maxReplicas",render:({field:s})=>e.jsx(M,{...s,id:"maxReplicas",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value))}})}),Te&&e.jsx("div",{className:"text-sm text-red-500",children:Te}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.scaleToZero",render:({field:s})=>e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(b,{htmlFor:"scaleToZero",children:"Scale to zero during periods of inactivity?"}),e.jsx(Pa,{checked:s.value,onCheckedChange:s.onChange})]})}),Ae&&e.jsx("div",{className:"text-sm text-red-500",children:Ae}),e.jsx(xa,{type:"single",collapsible:!0,children:e.jsxs(se,{value:"advanced",children:[e.jsx(ne,{children:"Advanced autoscaling settings"}),e.jsxs(ie,{className:"flex flex-col gap-4",children:[e.jsx(b,{htmlFor:"waitDuration",children:"Wait Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"How long to wait between autoscaling events. For example: 10s (10 seconds), 5m (5 minutes), 1h (1 hour)."}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.waitDuration",render:({field:s})=>e.jsx(M,{...s,id:"waitDuration",placeholder:"1m"})}),Se&&e.jsx("div",{className:"text-sm text-red-500",children:Se}),e.jsx(b,{htmlFor:"rollingWindowDuration",children:"Rolling Window Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The amount of time to look at utilization metrics for autoscaling. Lower values will lead to faster scale-up and scale-down. Example: 2m (2 minutes), 5m (5 minutes), 1h (1 hour)."}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.rollingWindowDuration",render:({field:s})=>e.jsx(M,{...s,id:"rollingWindowDuration",placeholder:"2m"})}),Ne&&e.jsx("div",{className:"text-sm text-red-500",children:Ne}),e.jsx(b,{htmlFor:"utilizationScaleUpThreshold",children:"Utilization Scale Up Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale up. For example, 0.75 means that if the utilization is above 75%, scale up."}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.utilizationScaleUpThreshold",render:({field:s})=>e.jsx(M,{...s,id:"utilizationScaleUpThreshold",type:"number",min:0,max:1,step:.01,onChange:u=>{s.onChange(parseFloat(u.target.value))}})}),Re&&e.jsx("div",{className:"text-sm text-red-500",children:Re}),e.jsx(b,{htmlFor:"utilizationScaleDownThreshold",children:"Utilization Scale Down Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale down. For example, 0.25 means that if the utilization is below 25%, scale down."}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.utilizationScaleDownThreshold",render:({field:s})=>e.jsx(M,{...s,id:"utilizationScaleDownThreshold",type:"number",min:0,max:1,step:.01,onChange:u=>{s.onChange(parseFloat(u.target.value))}})}),De&&e.jsx("div",{className:"text-sm text-red-500",children:De}),e.jsx(b,{htmlFor:"increment",children:"Scaling Increment"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The number of replicas to scale by when scaling up or down."}),e.jsx(C,{control:c,name:"runtimeConfig.autoscaling.increment",render:({field:s})=>e.jsx(M,{...s,id:"increment",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value))}})}),Ie&&e.jsx("div",{className:"text-sm text-red-500",children:Ie})]})]})})]})]})]})]})]})]}),e.jsxs(B,{onClick:g(n),disabled:!a.canUpdate||!h||!H||!Z,className:"w-fit px-8",children:[i&&e.jsx(ss,{className:"size-4 animate-spin"}),"Save changes"]})]})]})}function Ss(){var N;const n=Ga(),[i,t]=p.useState(!1),{tenantId:a}=ya(),{refetchInterval:o}=_(),l=Za({from:ae.tenantManagedWorkerRoute.to}),g=D({...I.cloud.getManagedWorker(l.managedWorker),refetchInterval:o,retry:(h,R)=>$a(R)}),[c,r]=p.useState({}),{handleApiError:x}=Ya({setFieldErrors:r}),m=ua({mutationKey:["managed-worker:update",l.managedWorker],mutationFn:async h=>(await ma.managedWorkerUpdate(f.metadata.id,h)).data,onSuccess:()=>{g.refetch()},onError:x}),v=ua({mutationKey:["managed-worker:delete",l.managedWorker],mutationFn:async()=>(await ma.managedWorkerDelete(f.metadata.id)).data,onSuccess:()=>{t(!1),n({to:ae.tenantManagedWorkersRoute.to,params:{tenant:a}})},onError:x});if(g.isLoading)return e.jsx(W,{});if(g.isError){if(Ha(g.error)&&((N=g.error.response)==null?void 0:N.status)===404)return e.jsx(is,{resource:"Managed worker",primaryAction:{label:"Back to Managed Workers",navigate:{to:ae.tenantManagedWorkersRoute.to,params:{tenant:a}}}});throw g.error}if(!g.data)return e.jsx(W,{});const f=g.data;return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex flex-row items-center justify-between",children:e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(as,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:f.name})]})}),e.jsxs("div",{className:"mt-4 flex flex-row items-center justify-start gap-6",children:[e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Created ",qa(f.metadata.createdAt)]}),f.buildConfig&&e.jsx(Na,{buildConfig:f.buildConfig,prefix:"Deploys from"})]}),e.jsx("div",{className:"mt-4 flex flex-row items-center justify-start"}),e.jsxs(Ca,{defaultValue:"activity",children:[e.jsxs(Sa,{layout:"underlined",children:[e.jsx(G,{variant:"underlined",value:"activity",children:"Activity"}),e.jsx(G,{variant:"underlined",value:"instances",children:"Instances"}),e.jsx(G,{variant:"underlined",value:"logs",children:"Logs"}),e.jsx(G,{variant:"underlined",value:"metrics",children:"Metrics"}),e.jsx(G,{variant:"underlined",value:"configuration",children:"Configuration"})]}),e.jsx(U,{value:"activity",children:e.jsx(ds,{managedWorker:f})}),e.jsxs(U,{value:"instances",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Instances"}),e.jsx(T,{className:"my-4"}),e.jsx(js,{managedWorkerId:f.metadata.id})]}),e.jsxs(U,{value:"logs",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Logs"}),e.jsx(T,{className:"my-4"}),e.jsx(bs,{managedWorker:f})]}),e.jsx(U,{value:"metrics",children:e.jsx(ws,{managedWorker:f})}),e.jsxs(U,{value:"configuration",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Configuration"}),e.jsx(T,{className:"my-4"}),e.jsx(Cs,{managedWorker:f,onSubmit:m.mutate,isLoading:m.isPending,fieldErrors:c}),e.jsx(T,{className:"my-4"}),e.jsx("h4",{className:"mt-8 text-lg font-bold leading-tight text-foreground",children:"Danger Zone"}),e.jsx(T,{className:"my-4"}),e.jsx(B,{variant:"destructive",onClick:()=>{t(!0)},children:"Delete Managed Worker"}),e.jsx(ns,{title:"Delete managed worker",description:`Are you sure you want to delete the managed worker ${f.name}? This action cannot be undone, and will immediately tear these workers down.`,submitLabel:"Delete",onSubmit:v.mutate,onCancel:function(){t(!1)},isLoading:v.isPending,isOpen:i})]})]})]})})}function Us(){return e.jsx(Xa,{children:e.jsx(Ss,{})})}export{Us as default}; diff --git a/hatchetembed/dashboard/assets/index-BjeCcGOX.js b/hatchetembed/dashboard/assets/index-BjeCcGOX.js new file mode 100644 index 0000000000..4aad1d67c0 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-BjeCcGOX.js @@ -0,0 +1 @@ +import{j as t,cN as o,aH as T,cO as k,b1 as C,ch as K,ci as I,cP as P,cQ as F,cR as N,N as V,O as B,cS as E,cT as _,k as w,o as z,s as A,aB as M,l as O,p as H,a as Q,cx as q,cz as W,b6 as Z,b7 as $}from"./index-wypz6hY5.js";import{L as G}from"./resource-limit-columns-7zhUq4Ly.js";import"./resource-limit-status-ynncxZIe.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="68fde136-fa5a-4c72-b6d9-e3352e0a3aaf",a._sentryDebugIdIdentifier="sentry-dbid-68fde136-fa5a-4c72-b6d9-e3352e0a3aaf")}catch{}})();const s={key:"Key",value:"Value",limit:"Limit",lastRefill:"Last Refill",window:"Window",actions:"Actions"},S="key",J="value",U="limit",X="lastRefill",Y="window",ee="actions",te=({onDeleteClick:a})=>[{accessorKey:S,header:({column:e})=>t.jsx(o,{column:e,title:s.key}),cell:({row:e})=>t.jsxs("div",{className:"flex flex-row items-center gap-4 pl-4",children:[t.jsx(G,{value:e.original.limitValue-e.original.value,alarmValue:e.original.limitValue/2,limitValue:e.original.limitValue}),e.original.key]}),enableSorting:!1,enableHiding:!0},{accessorKey:J,header:({column:e})=>t.jsx(o,{column:e,title:s.value}),cell:({row:e})=>t.jsx("div",{children:e.original.value}),enableSorting:!1},{accessorKey:U,header:({column:e})=>t.jsx(o,{column:e,title:s.limit}),cell:({row:e})=>t.jsx("div",{children:e.original.limitValue}),enableSorting:!1},{accessorKey:X,header:({column:e})=>t.jsx(o,{column:e,title:s.lastRefill}),cell:({row:e})=>t.jsx("div",{children:t.jsx(T,{date:e.original.lastRefill})}),enableSorting:!1},{accessorKey:Y,header:({column:e})=>t.jsx(o,{column:e,title:s.window}),cell:({row:e})=>t.jsx("div",{children:k(e.original.window)}),enableSorting:!1},{accessorKey:ee,header:({column:e})=>t.jsx(o,{column:e,title:s.actions}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row justify-center",children:t.jsx(C,{row:e.original,actions:[{label:"Delete",onClick:()=>a(e.original)}]})}),enableSorting:!1,enableHiding:!1}],ae=z({s:A().optional()}).default({s:void 0}),ie=({key:a})=>{const{tenantId:e}=K(),{refetchInterval:r}=I(),d=`rate-limits-${a}`,{state:{s:m},columnFilters:f,setColumnFilters:g,resetFilters:y}=P(ae,d,{s:S}),[c]=F(m,300),{limit:h,offset:b,pagination:p,setPagination:x,setPageSize:j}=N({key:a,resetPageOnChange:[c]}),{data:i,isLoading:R,error:u,isRefetching:v,refetch:l}=V({...B.rate_limits.list(e,{search:c,orderByField:_.Key,orderByDirection:E.Asc,offset:b,limit:h}),refetchInterval:r,placeholderData:n=>n}),L=w.useMemo(()=>((i==null?void 0:i.rows)??[]).map(n=>({...n,metadata:{id:n.key}})),[i]),D=w.useMemo(()=>{var n;return((n=i==null?void 0:i.pagination)==null?void 0:n.num_pages)??0},[i]);return{data:L,numPages:D,isLoading:R,error:u,pagination:p,setPagination:x,setPageSize:j,columnFilters:f,setColumnFilters:g,isRefetching:v,refetch:l,resetFilters:y}};function re(){return t.jsx(se,{})}function se(){const[a,e]=M("hatchet:columns:rate-limits",{}),{tenantId:r}=K(),{handleApiError:d}=O({}),{data:m,error:f,isLoading:g,columnFilters:y,setColumnFilters:c,pagination:h,setPageSize:b,setPagination:p,numPages:x,isRefetching:j,refetch:i,resetFilters:R}=ie({key:"rate-limits-table"}),u=H({mutationKey:["rate-limit:delete",r],mutationFn:async l=>{await Q.rateLimitDelete(r,{key:l.key})},onSuccess:()=>i(),onError:d}),v=w.useMemo(()=>te({onDeleteClick:l=>u.mutate(l)}),[u]);return t.jsx(q,{error:f,isLoading:g,columns:v,data:m,filters:[{columnId:S,title:s.key,type:W.Search}],showColumnToggle:!0,columnVisibility:a,setColumnVisibility:e,columnFilters:y,setColumnFilters:c,pagination:h,setPagination:p,onSetPageSize:b,pageCount:x,getRowId:l=>l.metadata.id,columnKeyToName:s,refetchProps:{isRefetching:j,onRefetch:i},onResetFilters:R,emptyState:t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[t.jsx("p",{className:"text-lg font-semibold",children:"No rate limits found"}),t.jsx("div",{className:"w-fit",children:t.jsx(Z,{doc:$.v1["rate-limits"],label:"Learn about rate limits"})})]})})}export{re as default}; diff --git a/hatchetembed/dashboard/assets/index-Bk1maSCV.js b/hatchetembed/dashboard/assets/index-Bk1maSCV.js new file mode 100644 index 0000000000..84ab8f91c5 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Bk1maSCV.js @@ -0,0 +1 @@ +import{h as s,n as u,bB as d,p as h,q as l,b as t,j as m,B as p,H as b,O as g}from"./index-wypz6hY5.js";import{N as f}from"./new-organization-saver-form-Uz97g08A.js";import{u as y}from"./redirect-DImNvkP_.js";import{A as k}from"./auth-layout-iBwbZOUC.js";import"./welcome-modal-state-B1mOgpQO.js";import"./support-chat-CGvrRU-a.js";import"./shard-deployment-key-CJfQX3l3.js";import"./use-analytics-BZxgE2Kk.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new o.Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="cb937255-4c68-4493-9e44-b7a684daf1f2",o._sentryDebugIdIdentifier="sentry-dbid-cb937255-4c68-4493-9e44-b7a684daf1f2")}catch{}})();const w=JSON.parse('["0-mail.com","027168.com","0815.su","0sg.net","10mail.org","10minutemail.co.za","10minutemail.com","11mail.com","123.com","123box.net","123india.com","123mail.cl","123mail.org","123qwe.co.uk","126.com","139.com","150mail.com","150ml.com","15meg4free.com","163.com","16mail.com","188.com","189.cn","1ce.us","1chuan.com","1coolplace.com","1freeemail.com","1funplace.com","1internetdrive.com","1mail.ml","1mail.net","1me.net","1mum.com","1musicrow.com","1netdrive.com","1nsyncfan.com","1pad.de","1under.com","1webave.com","1webhighway.com","1zhuan.com","2-mail.com","20email.eu","20mail.in","20mail.it","212.com","21cn.com","24horas.com","2911.net","2980.com","2bmail.co.uk","2d2i.com","2die4.com","2trom.com","3000.it","30minutesmail.com","3126.com","321media.com","33mail.com","37.com","3ammagazine.com","3dmail.com","3email.com","3g.ua","3mail.ga","3xl.net","444.net","4email.com","4email.net","4mg.com","4newyork.com","4warding.net","4warding.org","4x4man.com","50mail.com","60minutemail.com","6ip.us","6mail.cf","6paq.com","74.ru","74gmail.com","7mail.ga","7mail.ml","88.am","8848.net","8mail.ga","8mail.ml","97rock.com","99experts.com","a45.in","aaamail.zzn.com","aamail.net","aapt.net.au","aaronkwok.net","abbeyroadlondon.co.uk","abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com","abcflash.net","abdulnour.com","aberystwyth.com","about.com","abusemail.de","abv.bg","abwesend.de","abyssmail.com","ac20mail.in","academycougars.com","acceso.or.cr","access4less.net","accessgcc.com","accountant.com","acdcfan.com","ace-of-base.com","acmemail.net","acninc.net","activist.com","adam.com.au","add3000.pp.ua","addcom.de","address.com","adelphia.net","adexec.com","adfarrow.com","adios.net","adoption.com","ados.fr","adrenalinefreak.com","advalvas.be","advantimo.com","aeiou.pt","aemail4u.com","aeneasmail.com","afreeinternet.com","africamail.com","africamel.net","ag.us.to","agoodmail.com","ahaa.dk","ahk.jp","aichi.com","aim.com","aircraftmail.com","airforce.net","airforceemail.com","airpost.net","ajacied.com","ajaxapp.net","ak47.hu","aknet.kg","albawaba.com","alex4all.com","alexandria.cc","algeria.com","alhilal.net","alibaba.com","alice.it","alive.cz","aliyun.com","allergist.com","allmail.net","alloymail.com","allracing.com","allsaintsfan.com","alpenjodel.de","alphafrau.de","alskens.dk","altavista.com","altavista.net","altavista.se","alternativagratis.com","alumni.com","alumnidirector.com","alvilag.hu","amail.com","amazonses.com","amele.com","america.hm","ameritech.net","amnetsal.com","amorki.pl","amrer.net","amuro.net","amuromail.com","ananzi.co.za","andylau.net","anfmail.com","angelfire.com","angelic.com","animail.net","animalhouse.com","animalwoman.net","anjungcafe.com","annsmail.com","ano-mail.net","anonmails.de","anonymous.to","anote.com","another.com","anotherdomaincyka.tk","anotherwin95.com","anti-social.com","antisocial.com","antispam24.de","antongijsen.com","antwerpen.com","anymoment.com","anytimenow.com","aol.com","aon.at","apexmail.com","apmail.com","apollo.lv","aport.ru","aport2000.ru","appraiser.net","approvers.net","arabia.com","arabtop.net","archaeologist.com","arcor.de","arcotronics.bg","arcticmail.com","argentina.com","aristotle.org","army.net","armyspy.com","arnet.com.ar","art-en-ligne.pro","artlover.com","artlover.com.au","as-if.com","asdasd.nl","asean-mail.com","asheville.com","asia-links.com","asia-mail.com","asiafind.com","asianavenue.com","asiancityweb.com","asiansonly.net","asianwired.net","asiapoint.net","ass.pp.ua","assala.com","assamesemail.com","astroboymail.com","astrolover.com","astrosfan.com","astrosfan.net","asurfer.com","atheist.com","athenachu.net","atina.cl","atl.lv","atlaswebmail.com","atmc.net","atozasia.com","atrus.ru","att.net","attglobal.net","attymail.com","au.ru","auctioneer.net","ausi.com","aussiemail.com.au","austin.rr.com","australia.edu","australiamail.com","austrosearch.net","autoescuelanerja.com","autograf.pl","autorambler.ru","avh.hu","avia-tonic.fr","awsom.net","axoskate.com","ayna.com","azazazatashkent.tk","azimiweb.com","azmeil.tk","bachelorboy.com","bachelorgal.com","backpackers.com","backstreet-boys.com","backstreetboysclub.com","bagherpour.com","baldmama.de","baldpapa.de","ballyfinance.com","bangkok.com","bangkok2000.com","bannertown.net","baptistmail.com","baptized.com","barcelona.com","bareed.ws","bartender.net","baseballmail.com","basketballmail.com","batuta.net","baudoinconsulting.com","bboy.zzn.com","bcvibes.com","beddly.com","beeebank.com","beenhad.com","beep.ru","beer.com","beethoven.com","belice.com","belizehome.com","bell.net","bellair.net","bellsouth.net","berlin.com","berlin.de","berlinexpo.de","bestmail.us","betriebsdirektor.de","bettergolf.net","bharatmail.com","big1.us","bigassweb.com","bigblue.net.au","bigboab.com","bigfoot.com","bigfoot.de","bigger.com","biggerbadder.com","bigmailbox.com","bigmir.net","bigpond.au","bigpond.com","bigpond.com.au","bigpond.net","bigpond.net.au","bigramp.com","bigstring.com","bikemechanics.com","bikeracer.com","bikeracers.net","bikerider.com","billsfan.com","billsfan.net","bimla.net","bin-wieder-da.de","bio-muesli.info","birdlover.com","birdowner.net","bisons.com","bitmail.com","bitpage.net","bizhosting.com","bk.ru","blackburnmail.com","blackplanet.com","blader.com","bladesmail.net","blazemail.com","bleib-bei-mir.de","blockfilter.com","blogmyway.org","bluebottle.com","bluehyppo.com","bluemail.ch","bluemail.dk","bluesfan.com","bluewin.ch","blueyonder.co.uk","blushmail.com","blutig.me","bmlsports.net","boardermail.com","boatracers.com","bodhi.lawlita.com","bol.com.br","bolando.com","bollywoodz.com","boltonfans.com","bombdiggity.com","bonbon.net","boom.com","bootmail.com","bootybay.de","bornnaked.com","bostonoffice.com","boun.cr","bounce.net","bounces.amazon.com","bouncr.com","box.az","box.ua","boxbg.com","boxemail.com","boxformail.in","boxfrog.com","boximail.com","boyzoneclub.com","bradfordfans.com","brasilia.net","brazilmail.com","brazilmail.com.br","breadtimes.press","breathe.com","brennendesreich.de","bresnan.net","brew-master.com","brew-meister.com","brfree.com.br","briefemail.com","bright.net","britneyclub.com","brittonsign.com","broadcast.net","brokenvalve.com","brusseler.com","bsdmail.com","btcmail.pw","btconnect.co.uk","btconnect.com","btinternet.com","btopenworld.co.uk","buerotiger.de","buffymail.com","bullsfan.com","bullsgame.com","bumerang.ro","bumpymail.com","bund.us","burnthespam.info","burstmail.info","buryfans.com","business-man.com","businessman.net","busta-rhymes.com","buyersusa.com","bvimailbox.com","byom.de","c2.hu","c2i.net","c3.hu","c4.com","c51vsgq.com","cabacabana.com","cable.comcast.com","cableone.net","caere.it","cairomail.com","calendar-server.bounces.google.com","calidifontain.be","californiamail.com","callnetuk.com","callsign.net","caltanet.it","camidge.com","canada-11.com","canada.com","canadianmail.com","canoemail.com","canwetalk.com","caramail.com","care2.com","careerbuildermail.com","carioca.net","cartelera.org","cartestraina.ro","casablancaresort.com","casema.nl","cash4u.com","cashette.com","casino.com","catcha.com","catchamail.com","catholic.org","catlover.com","cd2.com","celineclub.com","celtic.com","center-mail.de","centermail.at","centermail.de","centermail.info","centoper.it","centralpets.com","centrum.cz","centrum.sk","centurytel.net","certifiedmail.com","cfl.rr.com","cgac.es","cghost.s-a-d.de","chacuo.net","chaiyomail.com","chammy.info","chance2mail.com","chandrasekar.net","charmedmail.com","charter.net","chat.ru","chattown.com","chauhanweb.com","cheatmail.de","chechnya.conf.work","check.com","check1check.com","cheerful.com","chef.net","chek.com","chello.nl","chemist.com","chequemail.com","cheyenneweb.com","chez.com","chickmail.com","china.com","china.net.vg","chinamail.com","chirk.com","chocaholic.com.au","chong-mail.com","chong-mail.net","churchusa.com","cia-agent.com","cia.hu","ciaoweb.it","cicciociccio.com","cinci.rr.com","cincinow.net","citiz.net","citlink.net","citromail.hu","city-of-bath.org","city-of-birmingham.com","city-of-brighton.org","city-of-cambridge.com","city-of-coventry.com","city-of-edinburgh.com","city-of-lichfield.com","city-of-lincoln.com","city-of-liverpool.com","city-of-manchester.com","city-of-nottingham.com","city-of-oxford.com","city-of-swansea.com","city-of-westminster.com","city-of-westminster.net","city-of-york.net","cityofcardiff.net","cityoflondon.org","ckaazaza.tk","claramail.com","classicalfan.com","classicmail.co.za","clear.net.nz","clearwire.net","clerk.com","cliffhanger.com","clixser.com","close2you.net","clrmail.com","club4x4.net","clubalfa.com","clubbers.net","clubducati.com","clubhonda.net","clubmember.org","clubnetnoir.com","clubvdo.net","cluemail.com","cmail.net","cmpmail.com","cnnsimail.com","cntv.cn","codec.ro","coder.hu","coid.biz","coldmail.com","collectiblesuperstore.com","collector.org","collegeclub.com","collegemail.com","colleges.com","columbus.rr.com","columbusrr.com","columnist.com","comcast.net","comic.com","communityconnect.com","comporium.net","comprendemail.com","compuserve.com","computer-freak.com","computer4u.com","computermail.net","conexcol.com","conk.com","connect4free.net","connectbox.com","consultant.com","consumerriot.com","contractor.net","contrasto.cu.cc","cookiemonster.com","cool.br","coole-files.de","coolgoose.ca","coolgoose.com","coolkiwi.com","coollist.com","coolmail.com","coolmail.net","coolsend.com","coolsite.net","cooooool.com","cooperation.net","cooperationtogo.net","copacabana.com","copper.net","cornells.com","cornerpub.com","corporatedirtbag.com","correo.terra.com.gt","cortinet.com","cotas.net","counsellor.com","countrylover.com","cox.com","cox.net","coxinet.net","cracker.hu","crapmail.org","crazedanddazed.com","crazymailing.com","crazysexycool.com","cristianemail.com","critterpost.com","croeso.com","crosshairs.com","crosswinds.net","crwmail.com","cry4helponline.com","cs.com","csinibaba.hu","cuemail.com","curio-city.com","curryworld.de","cute-girl.com","cuteandcuddly.com","cutey.com","cww.de","cyber-africa.net","cyber-innovation.club","cyber-matrix.com","cyber-phone.eu","cyber-wizard.com","cyber4all.com","cyberbabies.com","cybercafemaui.com","cyberdude.com","cyberforeplay.net","cybergal.com","cybergrrl.com","cyberinbox.com","cyberleports.com","cybermail.net","cybernet.it","cyberservices.com","cyberspace-asia.com","cybertrains.org","cyclefanz.com","cynetcity.com","dabsol.net","dadacasa.com","daha.com","dailypioneer.com","dallasmail.com","dangerous-minds.com","dansegulvet.com","dasdasdascyka.tk","data54.com","davegracey.com","dawnsonmail.com","dawsonmail.com","dazedandconfused.com","dbzmail.com","dcemail.com","deadlymob.org","deagot.com","deal-maker.com","dearriba.com","death-star.com","deliveryman.com","deneg.net","depechemode.com","deseretmail.com","desertmail.com","desilota.com","deskpilot.com","destin.com","detik.com","deutschland-net.com","devotedcouples.com","dezigner.ru","dfwatson.com","di-ve.com","die-besten-bilder.de","die-genossen.de","die-optimisten.de","die-optimisten.net","diemailbox.de","digibel.be","digital-filestore.de","diplomats.com","directbox.com","dirtracer.com","discard.email","discard.ga","discard.gq","disciples.com","discofan.com","discoverymail.com","disign-concept.eu","disign-revelation.com","disinfo.net","dispomail.eu","disposable.com","dispose.it","dm.w3internet.co.uk","dmailman.com","dnainternet.net","dnsmadeeasy.com","doclist.bounces.google.com","docmail.cz","docs.google.com","doctor.com","dodgit.org","dodo.com.au","dodsi.com","dog.com","dogit.com","doglover.com","dogmail.co.uk","dogsnob.net","doityourself.com","domforfb1.tk","domforfb2.tk","domforfb3.tk","domforfb4.tk","domforfb5.tk","domforfb6.tk","domforfb7.tk","domforfb8.tk","domozmail.com","doneasy.com","donjuan.com","dontgotmail.com","dontmesswithtexas.com","doramail.com","dostmail.com","dotcom.fr","dotmsg.com","dott.it","download-privat.de","dplanet.ch","dr.com","dragoncon.net","dropmail.me","dropzone.com","drotposta.hu","dubaimail.com","dublin.com","dublin.ie","duck.com","dumpmail.com","dumpmail.de","dumpyemail.com","dunlopdriver.com","dunloprider.com","duno.com","duskmail.com","dutchmail.com","dwp.net","dygo.com","dynamitemail.com","dyndns.org","e-apollo.lv","e-mail.com.tr","e-mail.dk","e-mail.ru","e-mail.ua","e-mailanywhere.com","e-mails.ru","e-tapaal.com","earthalliance.com","earthcam.net","earthdome.com","earthling.net","earthlink.net","earthonline.net","eastcoast.co.za","eastmail.com","easy.to","easypost.com","easytrashmail.com","ec.rr.com","ecardmail.com","ecbsolutions.net","echina.com","ecolo-online.fr","ecompare.com","edmail.com","ednatx.com","edtnmail.com","educacao.te.pt","eelmail.com","ehmail.com","einrot.com","einrot.de","eintagsmail.de","eircom.net","elisanet.fi","elitemail.org","elsitio.com","elvis.com","elvisfan.com","email-fake.gq","email-london.co.uk","email.biz","email.cbes.net","email.com","email.cz","email.ee","email.it","email.nu","email.org","email.ro","email.ru","email.si","email.su","email.ua","email2me.net","email4u.info","emailacc.com","emailaccount.com","emailage.ga","emailage.gq","emailasso.net","emailchoice.com","emailcorner.net","emailem.com","emailengine.net","emailengine.org","emailer.hubspot.com","emailforyou.net","emailgo.de","emailgroups.net","emailinfive.com","emailit.com","emailondeck.com","emailpinoy.com","emailplanet.com","emailplus.org","emailproxsy.com","emails.ga","emails.incisivemedia.com","emails.ru","emailthe.net","emailto.de","emailuser.net","emailx.net","emailz.ga","emailz.gq","ematic.com","embarqmail.com","emeil.in","emeil.ir","emil.com","eml.cc","eml.pp.ua","end-war.com","enel.net","engineer.com","england.com","england.edu","englandmail.com","epage.ru","epatra.com","ephemail.net","epix.net","epost.de","eposta.hu","eqqu.com","eramail.co.za","eresmas.com","eriga.lv","estranet.it","ethos.st","etoast.com","etrademail.com","etranquil.com","etranquil.net","eudoramail.com","europamel.net","europe.com","europemail.com","euroseek.com","eurosport.com","every1.net","everyday.com.kh","everymail.net","everyone.net","everytg.ml","examnotes.net","excite.co.jp","excite.com","excite.it","execs.com","exemail.com.au","exg6.exghost.com","existiert.net","expressasia.com","extenda.net","extended.com","eyepaste.com","eyou.com","ezcybersearch.com","ezmail.egine.com","ezmail.ru","ezrs.com","f-m.fm","f1fans.net","facebook-email.ga","facebook.com","facebookmail.com","facebookmail.gq","fahr-zur-hoelle.org","fake-email.pp.ua","fake-mail.cf","fake-mail.ga","fake-mail.ml","fakemailz.com","falseaddress.com","fan.com","fansonlymail.com","fansworldwide.de","fantasticmail.com","farang.net","farifluset.mailexpire.com","faroweb.com","fast-email.com","fast-mail.fr","fast-mail.org","fastacura.com","fastchevy.com","fastchrysler.com","fastem.com","fastemail.us","fastemailer.com","fastermail.com","fastest.cc","fastimap.com","fastkawasaki.com","fastmail.ca","fastmail.cn","fastmail.co.uk","fastmail.com","fastmail.com.au","fastmail.es","fastmail.fm","fastmail.im","fastmail.in","fastmail.jp","fastmail.mx","fastmail.net","fastmail.nl","fastmail.se","fastmail.to","fastmail.tw","fastmail.us","fastmailbox.net","fastmazda.com","fastmessaging.com","fastmitsubishi.com","fastnissan.com","fastservice.com","fastsubaru.com","fastsuzuki.com","fasttoyota.com","fastyamaha.com","fatcock.net","fatflap.com","fathersrightsne.org","fax.ru","fbi-agent.com","fbi.hu","fdfdsfds.com","fea.st","federalcontractors.com","feinripptraeger.de","felicitymail.com","femenino.com","fetchmail.co.uk","fettabernett.de","feyenoorder.com","ffanet.com","fiberia.com","ficken.de","fightallspam.com","filipinolinks.com","financemail.net","financier.com","findmail.com","finebody.com","fire-brigade.com","fireman.net","fishburne.org","fishfuse.com","fixmail.tk","fizmail.com","flashbox.5july.org","flashmail.com","flashmail.net","fleckens.hu","flipcode.com","fmail.co.uk","fmailbox.com","fmgirl.com","fmguy.com","fnbmail.co.za","fnmail.com","folkfan.com","foodmail.com","footard.com","footballmail.com","foothills.net","for-president.com","force9.co.uk","forfree.at","forgetmail.com","fornow.eu","forpresident.com","fortuncity.com","fortunecity.com","forum.dk","foxmail.com","fr33mail.info","francemel.fr","free-email.ga","free-online.net","free-org.com","free.com.pe","free.fr","freeaccess.nl","freeaccount.com","freeandsingle.com","freedom.usa.com","freedomlover.com","freegates.be","freeghana.com","freelance-france.eu","freeler.nl","freemail.c3.hu","freemail.com.au","freemail.com.pk","freemail.de","freemail.et","freemail.gr","freemail.hu","freemail.it","freemail.lt","freemail.ms","freemail.nl","freemail.org.mk","freemails.ga","freemeil.gq","freenet.de","freenet.kg","freeola.com","freeola.net","freeserve.co.uk","freestart.hu","freesurf.fr","freesurf.nl","freeuk.com","freeuk.net","freeukisp.co.uk","freeweb.org","freewebemail.com","freeyellow.com","freezone.co.uk","fresnomail.com","freudenkinder.de","freundin.ru","friendlymail.co.uk","friends-cafe.com","friendsfan.com","from-africa.com","from-america.com","from-argentina.com","from-asia.com","from-australia.com","from-belgium.com","from-brazil.com","from-canada.com","from-china.net","from-england.com","from-europe.com","from-france.net","from-germany.net","from-holland.com","from-israel.com","from-italy.net","from-japan.net","from-korea.com","from-mexico.com","from-outerspace.com","from-russia.com","from-spain.net","fromalabama.com","fromalaska.com","fromarizona.com","fromarkansas.com","fromcalifornia.com","fromcolorado.com","fromconnecticut.com","fromdelaware.com","fromflorida.net","fromgeorgia.com","fromhawaii.net","fromidaho.com","fromillinois.com","fromindiana.com","fromiowa.com","fromjupiter.com","fromkansas.com","fromkentucky.com","fromlouisiana.com","frommaine.net","frommaryland.com","frommassachusetts.com","frommiami.com","frommichigan.com","fromminnesota.com","frommississippi.com","frommissouri.com","frommontana.com","fromnebraska.com","fromnevada.com","fromnewhampshire.com","fromnewjersey.com","fromnewmexico.com","fromnewyork.net","fromnorthcarolina.com","fromnorthdakota.com","fromohio.com","fromoklahoma.com","fromoregon.net","frompennsylvania.com","fromrhodeisland.com","fromru.com","fromsouthcarolina.com","fromsouthdakota.com","fromtennessee.com","fromtexas.com","fromthestates.com","fromutah.com","fromvermont.com","fromvirginia.com","fromwashington.com","fromwashingtondc.com","fromwestvirginia.com","fromwisconsin.com","fromwyoming.com","front.ru","frontier.com","frontiernet.net","frostbyte.uk.net","fsmail.net","ftc-i.net","ftml.net","fullmail.com","funkfan.com","fuorissimo.com","furnitureprovider.com","fuse.net","fut.es","fux0ringduh.com","fwnb.com","fxsmails.com","galaxy5.com","galaxyhit.com","gamebox.net","gamegeek.com","gamespotmail.com","gamno.config.work","garbage.com","gardener.com","gawab.com","gaybrighton.co.uk","gaza.net","gazeta.pl","gazibooks.com","gci.net","geecities.com","geek.com","geek.hu","geeklife.com","gelitik.in","gencmail.com","general-hospital.com","gentlemansclub.de","geocities.com","geography.net","geologist.com","geopia.com","germanymail.com","get.pp.ua","get1mail.com","getairmail.cf","getairmail.com","getairmail.ga","getairmail.gq","getonemail.net","ghanamail.com","ghostmail.com","ghosttexter.de","giga4u.de","gigileung.org","girl4god.com","givepeaceachance.com","glay.org","glendale.net","globalfree.it","globalpagan.com","globalsite.com.br","gmail.com","gmail.com.br","gmail.ru","gmx.at","gmx.ch","gmx.com","gmx.de","gmx.li","gmx.net","go.com","go.ro","go.ru","go2net.com","gocollege.com","gocubs.com","goemailgo.com","gofree.co.uk","gol.com","goldenmail.ru","goldmail.ru","goldtoolbox.com","golfemail.com","golfilla.info","golfmail.be","gonavy.net","goodnewsmail.com","goodstick.com","googlegroups.com","googlemail.com","goplay.com","gorillaswithdirtyarmpits.com","gorontalo.net","gospelfan.com","gothere.uk.com","gotmail.com","gotmail.org","gotomy.com","gotti.otherinbox.com","gportal.hu","graduate.org","graffiti.net","gramszu.net","grandmamail.com","grandmasmail.com","graphic-designer.com","grapplers.com","gratisweb.com","greenmail.net","groupmail.com","grr.la","grungecafe.com","gtmc.net","gua.net","guerrillamail.com","guessmail.com","guju.net","gustr.com","guy.com","guy2.com","guyanafriends.com","gyorsposta.com","gyorsposta.hu","h-mail.us","hab-verschlafen.de","habmalnefrage.de","hacccc.com","hackermail.com","hackermail.net","hailmail.net","hairdresser.net","hamptonroads.com","handbag.com","handleit.com","hang-ten.com","hanmail.net","happemail.com","happycounsel.com","happypuppy.com","harakirimail.com","hardcorefreak.com","hartbot.de","hawaii.rr.com","hawaiiantel.net","heartthrob.com","heerschap.com","heesun.net","hehe.com","hello.hu","hello.net.au","hello.to","helter-skelter.com","herediano.com","herono1.com","herp.in","herr-der-mails.de","hetnet.nl","hey.to","hhdevel.com","hidzz.com","highmilton.com","highquality.com","highveldmail.co.za","hilarious.com","hiphopfan.com","hispavista.com","hitmail.com","hitthe.net","hkg.net","hkstarphoto.com","hockeymail.com","hollywoodkids.com","home-email.com","home.de","home.nl","home.no.net","home.ro","home.se","homelocator.com","homemail.com","homestead.com","honduras.com","hongkong.com","hookup.net","hoopsmail.com","hopemail.biz","horrormail.com","hot-mail.gq","hot-shot.com","hot.ee","hotbot.com","hotbrev.com","hotfire.net","hotletter.com","hotmail.ca","hotmail.ch","hotmail.co","hotmail.co.il","hotmail.co.jp","hotmail.co.nz","hotmail.co.uk","hotmail.co.za","hotmail.com","hotmail.com.au","hotmail.com.br","hotmail.com.tr","hotmail.de","hotmail.es","hotmail.fi","hotmail.fr","hotmail.it","hotmail.kg","hotmail.kz","hotmail.nl","hotmail.ru","hotmail.se","hotpop.com","hotpop3.com","hotvoice.com","housemail.com","hsuchi.net","hu2.ru","hughes.net","humanoid.net","humn.ws.gy","hunsa.com","hurting.com","hush.com","hushmail.com","hypernautica.com","i-connect.com","i-france.com","i-mail.com.au","i-p.com","i.am","i.ua","i12.com","i2pmail.org","iamawoman.com","iamwaiting.com","iamwasted.com","iamyours.com","icestorm.com","ich-bin-verrueckt-nach-dir.de","ich-will-net.de","icloud.com","icmsconsultants.com","icq.com","icqmail.com","icrazy.com","id-base.com","ididitmyway.com","idigjesus.com","idirect.com","ieatspam.eu","ieatspam.info","ieh-mail.de","iespana.es","ifoward.com","ig.com.br","ignazio.it","ignmail.com","ihateclowns.com","ihateyoualot.info","iheartspam.org","iinet.net.au","ijustdontcare.com","ikbenspamvrij.nl","ilkposta.com","ilovechocolate.com","ilovejesus.com","ilovetocollect.net","ilse.nl","imaginemail.com","imail.ru","imailbox.com","imap-mail.com","imap.cc","imapmail.org","imel.org","imgof.com","imgv.de","immo-gerance.info","imneverwrong.com","imposter.co.uk","imstations.com","imstressed.com","imtoosexy.com","in-box.net","in2jesus.com","iname.com","inbax.tk","inbound.plus","inbox.com","inbox.net","inbox.ru","inbox.si","inboxalias.com","incamail.com","incredimail.com","indeedemail.com","index.ua","indexa.fr","india.com","indiatimes.com","indo-mail.com","indocities.com","indomail.com","indyracers.com","inerted.com","inet.com","inet.net.au","info-media.de","info-radio.ml","info66.com","infohq.com","infomail.es","infomart.or.jp","infospacemail.com","infovia.com.ar","inicia.es","inmail.sk","inmail24.com","inmano.com","inmynetwork.tk","innocent.com","inorbit.com","inoutbox.com","insidebaltimore.net","insight.rr.com","instant-mail.de","instantemailaddress.com","instantmail.fr","instruction.com","instructor.net","insurer.com","interburp.com","interfree.it","interia.pl","interlap.com.ar","intermail.co.il","internet-e-mail.com","internet-mail.org","internet-police.com","internetbiz.com","internetdrive.com","internetegypt.com","internetemails.net","internetmailing.net","internode.on.net","invalid.com","inwind.it","iobox.com","iobox.fi","iol.it","iol.pt","iowaemail.com","ip3.com","ip4.pp.ua","ip6.pp.ua","ipoo.org","iprimus.com.au","iqemail.com","irangate.net","iraqmail.com","ireland.com","irelandmail.com","iremail.de","irj.hu","iroid.com","isellcars.com","iservejesus.com","islamonline.net","isleuthmail.com","ismart.net","isonfire.com","isp9.net","israelmail.com","ist-allein.info","ist-einmalig.de","ist-ganz-allein.de","ist-willig.de","italymail.com","itloox.com","itmom.com","ivebeenframed.com","ivillage.com","iwan-fals.com","iwmail.com","iwon.com","izadpanah.com","jahoopa.com","jakuza.hu","japan.com","jaydemail.com","jazzandjava.com","jazzfan.com","jazzgame.com","je-recycle.info","jerusalemmail.com","jet-renovation.fr","jetable.de","jetable.pp.ua","jetemail.net","jippii.fi","jmail.co.za","job4u.com","jobbikszimpatizans.hu","joelonsoftware.com","joinme.com","jokes.com","jordanmail.com","journalist.com","jourrapide.com","jovem.te.pt","joymail.com","jpopmail.com","jsrsolutions.com","jubiimail.dk","jump.com","jumpy.it","juniormail.com","junk1e.com","junkmail.com","junkmail.gq","juno.com","justemail.net","justicemail.com","kaazoo.com","kaffeeschluerfer.com","kaffeeschluerfer.de","kaixo.com","kalpoint.com","kansascity.com","kapoorweb.com","karachian.com","karachioye.com","karbasi.com","katamail.com","kayafmmail.co.za","kbjrmail.com","kcks.com","keg-party.com","keinpardon.de","keko.com.ar","kellychen.com","keromail.com","keyemail.com","kgb.hu","khosropour.com","kickassmail.com","killermail.com","kimo.com","kimsdisk.com","kinglibrary.net","kinki-kids.com","kissfans.com","kittymail.com","kitznet.at","kiwibox.com","kiwitown.com","klassmaster.net","km.ru","knol-power.nl","kolumbus.fi","kommespaeter.de","konx.com","korea.com","koreamail.com","kpnmail.nl","krim.ws","krongthip.com","krunis.com","ksanmail.com","ksee24mail.com","kube93mail.com","kukamail.com","kulturbetrieb.info","kumarweb.com","kuwait-mail.com","l33r.eu","la.com","labetteraverouge.at","ladymail.cz","lagerlouts.com","lags.us","lahoreoye.com","lakmail.com","lamer.hu","land.ru","lankamail.com","laoeq.com","laposte.net","lass-es-geschehen.de","last-chance.pro","lastmail.co","latemodels.com","latinmail.com","lavache.com","law.com","lawyer.com","lazyinbox.com","leehom.net","legalactions.com","legalrc.loan","legislator.com","lenta.ru","leonlai.net","letsgomets.net","letterboxes.org","letthemeatspam.com","levele.com","levele.hu","lex.bg","lexis-nexis-mail.com","libero.it","liberomail.com","lick101.com","liebt-dich.info","linkmaster.com","linktrader.com","linuxfreemail.com","linuxmail.org","lionsfan.com.au","liontrucks.com","liquidinformation.net","list.ru","listomail.com","littleapple.com","littleblueroom.com","live.at","live.be","live.ca","live.cl","live.cn","live.co.uk","live.co.za","live.com","live.com.ar","live.com.au","live.com.mx","live.com.pt","live.com.sg","live.de","live.dk","live.fr","live.ie","live.in","live.it","live.jp","live.nl","live.no","live.ru","live.se","liveradio.tk","liverpoolfans.com","llandudno.com","llangollen.com","lmxmail.sk","lobbyist.com","localbar.com","locos.com","login-email.ga","loh.pp.ua","lolfreak.net","lolito.tk","london.com","looksmart.co.uk","looksmart.com","looksmart.com.au","lopezclub.com","louiskoo.com","love.cz","loveable.com","lovecat.com","lovefall.ml","lovefootball.com","lovelygirl.net","lovemail.com","lover-boy.com","lovergirl.com","lovesea.gq","lovethebroncos.com","lovethecowboys.com","loveyouforever.de","lovingjesus.com","lowandslow.com","lr7.us","lroid.com","luso.pt","luukku.com","luv2.us","lvie.com.sg","lycos.co.uk","lycos.com","lycos.es","lycos.it","lycos.ne.jp","lycosmail.com","m-a-i-l.com","m-hmail.com","m4.org","m4ilweb.info","mac.com","macbox.com","macfreak.com","machinecandy.com","macmail.com","madcreations.com","madonnafan.com","madrid.com","maennerversteherin.com","maennerversteherin.de","maffia.hu","magicmail.co.za","magspam.net","mahmoodweb.com","mail-awu.de","mail-box.cz","mail-center.com","mail-central.com","mail-easy.fr","mail-filter.com","mail-me.com","mail-page.com","mail-tester.com","mail.austria.com","mail.az","mail.be","mail.bg","mail.bulgaria.com","mail.by","mail.co.za","mail.com","mail.com.tr","mail.de","mail.ee","mail.entrepeneurmag.com","mail.freetown.com","mail.gr","mail.hitthebeach.com","mail.htl22.at","mail.md","mail.misterpinball.de","mail.nu","mail.org.uk","mail.pf","mail.pt","mail.r-o-o-t.com","mail.ru","mail.sisna.com","mail.svenz.eu","mail.tm","mail.usa.com","mail.vasarhely.hu","mail.wtf","mail114.net","mail15.com","mail2007.com","mail2aaron.com","mail2abby.com","mail2abc.com","mail2actor.com","mail2admiral.com","mail2adorable.com","mail2adoration.com","mail2adore.com","mail2adventure.com","mail2aeolus.com","mail2aether.com","mail2affection.com","mail2afghanistan.com","mail2africa.com","mail2agent.com","mail2aha.com","mail2ahoy.com","mail2aim.com","mail2air.com","mail2airbag.com","mail2airforce.com","mail2airport.com","mail2alabama.com","mail2alan.com","mail2alaska.com","mail2albania.com","mail2alcoholic.com","mail2alec.com","mail2alexa.com","mail2algeria.com","mail2alicia.com","mail2alien.com","mail2allan.com","mail2allen.com","mail2allison.com","mail2alpha.com","mail2alyssa.com","mail2amanda.com","mail2amazing.com","mail2amber.com","mail2america.com","mail2american.com","mail2andorra.com","mail2andrea.com","mail2andy.com","mail2anesthesiologist.com","mail2angela.com","mail2angola.com","mail2ann.com","mail2anna.com","mail2anne.com","mail2anthony.com","mail2anything.com","mail2aphrodite.com","mail2apollo.com","mail2april.com","mail2aquarius.com","mail2arabia.com","mail2arabic.com","mail2architect.com","mail2ares.com","mail2argentina.com","mail2aries.com","mail2arizona.com","mail2arkansas.com","mail2armenia.com","mail2army.com","mail2arnold.com","mail2art.com","mail2artemus.com","mail2arthur.com","mail2artist.com","mail2ashley.com","mail2ask.com","mail2astronomer.com","mail2athena.com","mail2athlete.com","mail2atlas.com","mail2atom.com","mail2attitude.com","mail2auction.com","mail2aunt.com","mail2australia.com","mail2austria.com","mail2azerbaijan.com","mail2baby.com","mail2bahamas.com","mail2bahrain.com","mail2ballerina.com","mail2ballplayer.com","mail2band.com","mail2bangladesh.com","mail2bank.com","mail2banker.com","mail2bankrupt.com","mail2baptist.com","mail2bar.com","mail2barbados.com","mail2barbara.com","mail2barter.com","mail2basketball.com","mail2batter.com","mail2beach.com","mail2beast.com","mail2beatles.com","mail2beauty.com","mail2becky.com","mail2beijing.com","mail2belgium.com","mail2belize.com","mail2ben.com","mail2bernard.com","mail2beth.com","mail2betty.com","mail2beverly.com","mail2beyond.com","mail2biker.com","mail2bill.com","mail2billionaire.com","mail2billy.com","mail2bio.com","mail2biologist.com","mail2black.com","mail2blackbelt.com","mail2blake.com","mail2blind.com","mail2blonde.com","mail2blues.com","mail2bob.com","mail2bobby.com","mail2bolivia.com","mail2bombay.com","mail2bonn.com","mail2bookmark.com","mail2boreas.com","mail2bosnia.com","mail2boston.com","mail2botswana.com","mail2bradley.com","mail2brazil.com","mail2breakfast.com","mail2brian.com","mail2bride.com","mail2brittany.com","mail2broker.com","mail2brook.com","mail2bruce.com","mail2brunei.com","mail2brunette.com","mail2brussels.com","mail2bryan.com","mail2bug.com","mail2bulgaria.com","mail2business.com","mail2buy.com","mail2ca.com","mail2california.com","mail2calvin.com","mail2cambodia.com","mail2cameroon.com","mail2canada.com","mail2cancer.com","mail2capeverde.com","mail2capricorn.com","mail2cardinal.com","mail2cardiologist.com","mail2care.com","mail2caroline.com","mail2carolyn.com","mail2casey.com","mail2cat.com","mail2caterer.com","mail2cathy.com","mail2catlover.com","mail2catwalk.com","mail2cell.com","mail2chad.com","mail2champaign.com","mail2charles.com","mail2chef.com","mail2chemist.com","mail2cherry.com","mail2chicago.com","mail2chile.com","mail2china.com","mail2chinese.com","mail2chocolate.com","mail2christian.com","mail2christie.com","mail2christmas.com","mail2christy.com","mail2chuck.com","mail2cindy.com","mail2clark.com","mail2classifieds.com","mail2claude.com","mail2cliff.com","mail2clinic.com","mail2clint.com","mail2close.com","mail2club.com","mail2coach.com","mail2coastguard.com","mail2colin.com","mail2college.com","mail2colombia.com","mail2color.com","mail2colorado.com","mail2columbia.com","mail2comedian.com","mail2composer.com","mail2computer.com","mail2computers.com","mail2concert.com","mail2congo.com","mail2connect.com","mail2connecticut.com","mail2consultant.com","mail2convict.com","mail2cook.com","mail2cool.com","mail2cory.com","mail2costarica.com","mail2country.com","mail2courtney.com","mail2cowboy.com","mail2cowgirl.com","mail2craig.com","mail2crave.com","mail2crazy.com","mail2create.com","mail2croatia.com","mail2cry.com","mail2crystal.com","mail2cuba.com","mail2culture.com","mail2curt.com","mail2customs.com","mail2cute.com","mail2cutey.com","mail2cynthia.com","mail2cyprus.com","mail2czechrepublic.com","mail2dad.com","mail2dale.com","mail2dallas.com","mail2dan.com","mail2dana.com","mail2dance.com","mail2dancer.com","mail2danielle.com","mail2danny.com","mail2darlene.com","mail2darling.com","mail2darren.com","mail2daughter.com","mail2dave.com","mail2dawn.com","mail2dc.com","mail2dealer.com","mail2deanna.com","mail2dearest.com","mail2debbie.com","mail2debby.com","mail2deer.com","mail2delaware.com","mail2delicious.com","mail2demeter.com","mail2democrat.com","mail2denise.com","mail2denmark.com","mail2dennis.com","mail2dentist.com","mail2derek.com","mail2desert.com","mail2devoted.com","mail2devotion.com","mail2diamond.com","mail2diana.com","mail2diane.com","mail2diehard.com","mail2dilemma.com","mail2dillon.com","mail2dinner.com","mail2dinosaur.com","mail2dionysos.com","mail2diplomat.com","mail2director.com","mail2dirk.com","mail2disco.com","mail2dive.com","mail2diver.com","mail2divorced.com","mail2djibouti.com","mail2doctor.com","mail2doglover.com","mail2dominic.com","mail2dominica.com","mail2dominicanrepublic.com","mail2don.com","mail2donald.com","mail2donna.com","mail2doris.com","mail2dorothy.com","mail2doug.com","mail2dough.com","mail2douglas.com","mail2dow.com","mail2downtown.com","mail2dream.com","mail2dreamer.com","mail2dude.com","mail2dustin.com","mail2dyke.com","mail2dylan.com","mail2earl.com","mail2earth.com","mail2eastend.com","mail2eat.com","mail2economist.com","mail2ecuador.com","mail2eddie.com","mail2edgar.com","mail2edwin.com","mail2egypt.com","mail2electron.com","mail2eli.com","mail2elizabeth.com","mail2ellen.com","mail2elliot.com","mail2elsalvador.com","mail2elvis.com","mail2emergency.com","mail2emily.com","mail2engineer.com","mail2english.com","mail2environmentalist.com","mail2eos.com","mail2eric.com","mail2erica.com","mail2erin.com","mail2erinyes.com","mail2eris.com","mail2eritrea.com","mail2ernie.com","mail2eros.com","mail2estonia.com","mail2ethan.com","mail2ethiopia.com","mail2eu.com","mail2europe.com","mail2eurus.com","mail2eva.com","mail2evan.com","mail2evelyn.com","mail2everything.com","mail2exciting.com","mail2expert.com","mail2fairy.com","mail2faith.com","mail2fanatic.com","mail2fancy.com","mail2fantasy.com","mail2farm.com","mail2farmer.com","mail2fashion.com","mail2fat.com","mail2feeling.com","mail2female.com","mail2fever.com","mail2fighter.com","mail2fiji.com","mail2filmfestival.com","mail2films.com","mail2finance.com","mail2finland.com","mail2fireman.com","mail2firm.com","mail2fisherman.com","mail2flexible.com","mail2florence.com","mail2florida.com","mail2floyd.com","mail2fly.com","mail2fond.com","mail2fondness.com","mail2football.com","mail2footballfan.com","mail2found.com","mail2france.com","mail2frank.com","mail2frankfurt.com","mail2franklin.com","mail2fred.com","mail2freddie.com","mail2free.com","mail2freedom.com","mail2french.com","mail2freudian.com","mail2friendship.com","mail2from.com","mail2fun.com","mail2gabon.com","mail2gabriel.com","mail2gail.com","mail2galaxy.com","mail2gambia.com","mail2games.com","mail2gary.com","mail2gavin.com","mail2gemini.com","mail2gene.com","mail2genes.com","mail2geneva.com","mail2george.com","mail2georgia.com","mail2gerald.com","mail2german.com","mail2germany.com","mail2ghana.com","mail2gilbert.com","mail2gina.com","mail2girl.com","mail2glen.com","mail2gloria.com","mail2goddess.com","mail2gold.com","mail2golfclub.com","mail2golfer.com","mail2gordon.com","mail2government.com","mail2grab.com","mail2grace.com","mail2graham.com","mail2grandma.com","mail2grandpa.com","mail2grant.com","mail2greece.com","mail2green.com","mail2greg.com","mail2grenada.com","mail2gsm.com","mail2guard.com","mail2guatemala.com","mail2guy.com","mail2hades.com","mail2haiti.com","mail2hal.com","mail2handhelds.com","mail2hank.com","mail2hannah.com","mail2harold.com","mail2harry.com","mail2hawaii.com","mail2headhunter.com","mail2heal.com","mail2heather.com","mail2heaven.com","mail2hebe.com","mail2hecate.com","mail2heidi.com","mail2helen.com","mail2hell.com","mail2help.com","mail2helpdesk.com","mail2henry.com","mail2hephaestus.com","mail2hera.com","mail2hercules.com","mail2herman.com","mail2hermes.com","mail2hespera.com","mail2hestia.com","mail2highschool.com","mail2hindu.com","mail2hip.com","mail2hiphop.com","mail2holland.com","mail2holly.com","mail2hollywood.com","mail2homer.com","mail2honduras.com","mail2honey.com","mail2hongkong.com","mail2hope.com","mail2horse.com","mail2hot.com","mail2hotel.com","mail2houston.com","mail2howard.com","mail2hugh.com","mail2human.com","mail2hungary.com","mail2hungry.com","mail2hygeia.com","mail2hyperspace.com","mail2hypnos.com","mail2ian.com","mail2ice-cream.com","mail2iceland.com","mail2idaho.com","mail2idontknow.com","mail2illinois.com","mail2imam.com","mail2in.com","mail2india.com","mail2indian.com","mail2indiana.com","mail2indonesia.com","mail2infinity.com","mail2intense.com","mail2iowa.com","mail2iran.com","mail2iraq.com","mail2ireland.com","mail2irene.com","mail2iris.com","mail2irresistible.com","mail2irving.com","mail2irwin.com","mail2isaac.com","mail2israel.com","mail2italian.com","mail2italy.com","mail2jackie.com","mail2jacob.com","mail2jail.com","mail2jaime.com","mail2jake.com","mail2jamaica.com","mail2james.com","mail2jamie.com","mail2jan.com","mail2jane.com","mail2janet.com","mail2janice.com","mail2japan.com","mail2japanese.com","mail2jasmine.com","mail2jason.com","mail2java.com","mail2jay.com","mail2jazz.com","mail2jed.com","mail2jeffrey.com","mail2jennifer.com","mail2jenny.com","mail2jeremy.com","mail2jerry.com","mail2jessica.com","mail2jessie.com","mail2jesus.com","mail2jew.com","mail2jeweler.com","mail2jim.com","mail2jimmy.com","mail2joan.com","mail2joann.com","mail2joanna.com","mail2jody.com","mail2joe.com","mail2joel.com","mail2joey.com","mail2john.com","mail2join.com","mail2jon.com","mail2jonathan.com","mail2jones.com","mail2jordan.com","mail2joseph.com","mail2josh.com","mail2joy.com","mail2juan.com","mail2judge.com","mail2judy.com","mail2juggler.com","mail2julian.com","mail2julie.com","mail2jumbo.com","mail2junk.com","mail2justin.com","mail2justme.com","mail2k.ru","mail2kansas.com","mail2karate.com","mail2karen.com","mail2karl.com","mail2karma.com","mail2kathleen.com","mail2kathy.com","mail2katie.com","mail2kay.com","mail2kazakhstan.com","mail2keen.com","mail2keith.com","mail2kelly.com","mail2kelsey.com","mail2ken.com","mail2kendall.com","mail2kennedy.com","mail2kenneth.com","mail2kenny.com","mail2kentucky.com","mail2kenya.com","mail2kerry.com","mail2kevin.com","mail2kim.com","mail2kimberly.com","mail2king.com","mail2kirk.com","mail2kiss.com","mail2kosher.com","mail2kristin.com","mail2kurt.com","mail2kuwait.com","mail2kyle.com","mail2kyrgyzstan.com","mail2la.com","mail2lacrosse.com","mail2lance.com","mail2lao.com","mail2larry.com","mail2latvia.com","mail2laugh.com","mail2laura.com","mail2lauren.com","mail2laurie.com","mail2lawrence.com","mail2lawyer.com","mail2lebanon.com","mail2lee.com","mail2leo.com","mail2leon.com","mail2leonard.com","mail2leone.com","mail2leslie.com","mail2letter.com","mail2liberia.com","mail2libertarian.com","mail2libra.com","mail2libya.com","mail2liechtenstein.com","mail2life.com","mail2linda.com","mail2linux.com","mail2lionel.com","mail2lipstick.com","mail2liquid.com","mail2lisa.com","mail2lithuania.com","mail2litigator.com","mail2liz.com","mail2lloyd.com","mail2lois.com","mail2lola.com","mail2london.com","mail2looking.com","mail2lori.com","mail2lost.com","mail2lou.com","mail2louis.com","mail2louisiana.com","mail2lovable.com","mail2love.com","mail2lucky.com","mail2lucy.com","mail2lunch.com","mail2lust.com","mail2luxembourg.com","mail2luxury.com","mail2lyle.com","mail2lynn.com","mail2madagascar.com","mail2madison.com","mail2madrid.com","mail2maggie.com","mail2mail4.com","mail2maine.com","mail2malawi.com","mail2malaysia.com","mail2maldives.com","mail2mali.com","mail2malta.com","mail2mambo.com","mail2man.com","mail2mandy.com","mail2manhunter.com","mail2mankind.com","mail2many.com","mail2marc.com","mail2marcia.com","mail2margaret.com","mail2margie.com","mail2marhaba.com","mail2maria.com","mail2marilyn.com","mail2marines.com","mail2mark.com","mail2marriage.com","mail2married.com","mail2marries.com","mail2mars.com","mail2marsha.com","mail2marshallislands.com","mail2martha.com","mail2martin.com","mail2marty.com","mail2marvin.com","mail2mary.com","mail2maryland.com","mail2mason.com","mail2massachusetts.com","mail2matt.com","mail2matthew.com","mail2maurice.com","mail2mauritania.com","mail2mauritius.com","mail2max.com","mail2maxwell.com","mail2maybe.com","mail2mba.com","mail2me4u.com","mail2mechanic.com","mail2medieval.com","mail2megan.com","mail2mel.com","mail2melanie.com","mail2melissa.com","mail2melody.com","mail2member.com","mail2memphis.com","mail2methodist.com","mail2mexican.com","mail2mexico.com","mail2mgz.com","mail2miami.com","mail2michael.com","mail2michelle.com","mail2michigan.com","mail2mike.com","mail2milan.com","mail2milano.com","mail2mildred.com","mail2milkyway.com","mail2millennium.com","mail2millionaire.com","mail2milton.com","mail2mime.com","mail2mindreader.com","mail2mini.com","mail2minister.com","mail2minneapolis.com","mail2minnesota.com","mail2miracle.com","mail2missionary.com","mail2mississippi.com","mail2missouri.com","mail2mitch.com","mail2model.com","mail2moldova.commail2molly.com","mail2mom.com","mail2monaco.com","mail2money.com","mail2mongolia.com","mail2monica.com","mail2montana.com","mail2monty.com","mail2moon.com","mail2morocco.com","mail2morpheus.com","mail2mors.com","mail2moscow.com","mail2moslem.com","mail2mouseketeer.com","mail2movies.com","mail2mozambique.com","mail2mp3.com","mail2mrright.com","mail2msright.com","mail2museum.com","mail2music.com","mail2musician.com","mail2muslim.com","mail2my.com","mail2myboat.com","mail2mycar.com","mail2mycell.com","mail2mygsm.com","mail2mylaptop.com","mail2mymac.com","mail2mypager.com","mail2mypalm.com","mail2mypc.com","mail2myphone.com","mail2myplane.com","mail2namibia.com","mail2nancy.com","mail2nasdaq.com","mail2nathan.com","mail2nauru.com","mail2navy.com","mail2neal.com","mail2nebraska.com","mail2ned.com","mail2neil.com","mail2nelson.com","mail2nemesis.com","mail2nepal.com","mail2netherlands.com","mail2network.com","mail2nevada.com","mail2newhampshire.com","mail2newjersey.com","mail2newmexico.com","mail2newyork.com","mail2newzealand.com","mail2nicaragua.com","mail2nick.com","mail2nicole.com","mail2niger.com","mail2nigeria.com","mail2nike.com","mail2no.com","mail2noah.com","mail2noel.com","mail2noelle.com","mail2normal.com","mail2norman.com","mail2northamerica.com","mail2northcarolina.com","mail2northdakota.com","mail2northpole.com","mail2norway.com","mail2notus.com","mail2noway.com","mail2nowhere.com","mail2nuclear.com","mail2nun.com","mail2ny.com","mail2oasis.com","mail2oceanographer.com","mail2ohio.com","mail2ok.com","mail2oklahoma.com","mail2oliver.com","mail2oman.com","mail2one.com","mail2onfire.com","mail2online.com","mail2oops.com","mail2open.com","mail2ophthalmologist.com","mail2optometrist.com","mail2oregon.com","mail2oscars.com","mail2oslo.com","mail2painter.com","mail2pakistan.com","mail2palau.com","mail2pan.com","mail2panama.com","mail2paraguay.com","mail2paralegal.com","mail2paris.com","mail2park.com","mail2parker.com","mail2party.com","mail2passion.com","mail2pat.com","mail2patricia.com","mail2patrick.com","mail2patty.com","mail2paul.com","mail2paula.com","mail2pay.com","mail2peace.com","mail2pediatrician.com","mail2peggy.com","mail2pennsylvania.com","mail2perry.com","mail2persephone.com","mail2persian.com","mail2peru.com","mail2pete.com","mail2peter.com","mail2pharmacist.com","mail2phil.com","mail2philippines.com","mail2phoenix.com","mail2phonecall.com","mail2phyllis.com","mail2pickup.com","mail2pilot.com","mail2pisces.com","mail2planet.com","mail2platinum.com","mail2plato.com","mail2pluto.com","mail2pm.com","mail2podiatrist.com","mail2poet.com","mail2poland.com","mail2policeman.com","mail2policewoman.com","mail2politician.com","mail2pop.com","mail2pope.com","mail2popular.com","mail2portugal.com","mail2poseidon.com","mail2potatohead.com","mail2power.com","mail2presbyterian.com","mail2president.com","mail2priest.com","mail2prince.com","mail2princess.com","mail2producer.com","mail2professor.com","mail2protect.com","mail2psychiatrist.com","mail2psycho.com","mail2psychologist.com","mail2qatar.com","mail2queen.com","mail2rabbi.com","mail2race.com","mail2racer.com","mail2rachel.com","mail2rage.com","mail2rainmaker.com","mail2ralph.com","mail2randy.com","mail2rap.com","mail2rare.com","mail2rave.com","mail2ray.com","mail2raymond.com","mail2realtor.com","mail2rebecca.com","mail2recruiter.com","mail2recycle.com","mail2redhead.com","mail2reed.com","mail2reggie.com","mail2register.com","mail2rent.com","mail2republican.com","mail2resort.com","mail2rex.com","mail2rhodeisland.com","mail2rich.com","mail2richard.com","mail2ricky.com","mail2ride.com","mail2riley.com","mail2rita.com","mail2rob.com","mail2robert.com","mail2roberta.com","mail2robin.com","mail2rock.com","mail2rocker.com","mail2rod.com","mail2rodney.com","mail2romania.com","mail2rome.com","mail2ron.com","mail2ronald.com","mail2ronnie.com","mail2rose.com","mail2rosie.com","mail2roy.com","mail2rss.org","mail2rudy.com","mail2rugby.com","mail2runner.com","mail2russell.com","mail2russia.com","mail2russian.com","mail2rusty.com","mail2ruth.com","mail2rwanda.com","mail2ryan.com","mail2sa.com","mail2sabrina.com","mail2safe.com","mail2sagittarius.com","mail2sail.com","mail2sailor.com","mail2sal.com","mail2salaam.com","mail2sam.com","mail2samantha.com","mail2samoa.com","mail2samurai.com","mail2sandra.com","mail2sandy.com","mail2sanfrancisco.com","mail2sanmarino.com","mail2santa.com","mail2sara.com","mail2sarah.com","mail2sat.com","mail2saturn.com","mail2saudi.com","mail2saudiarabia.com","mail2save.com","mail2savings.com","mail2school.com","mail2scientist.com","mail2scorpio.com","mail2scott.com","mail2sean.com","mail2search.com","mail2seattle.com","mail2secretagent.com","mail2senate.com","mail2senegal.com","mail2sensual.com","mail2seth.com","mail2sevenseas.com","mail2sexy.com","mail2seychelles.com","mail2shane.com","mail2sharon.com","mail2shawn.com","mail2ship.com","mail2shirley.com","mail2shoot.com","mail2shuttle.com","mail2sierraleone.com","mail2simon.com","mail2singapore.com","mail2single.com","mail2site.com","mail2skater.com","mail2skier.com","mail2sky.com","mail2sleek.com","mail2slim.com","mail2slovakia.com","mail2slovenia.com","mail2smile.com","mail2smith.com","mail2smooth.com","mail2soccer.com","mail2soccerfan.com","mail2socialist.com","mail2soldier.com","mail2somalia.com","mail2son.com","mail2song.com","mail2sos.com","mail2sound.com","mail2southafrica.com","mail2southamerica.com","mail2southcarolina.com","mail2southdakota.com","mail2southkorea.com","mail2southpole.com","mail2spain.com","mail2spanish.com","mail2spare.com","mail2spectrum.com","mail2splash.com","mail2sponsor.com","mail2sports.com","mail2srilanka.com","mail2stacy.com","mail2stan.com","mail2stanley.com","mail2star.com","mail2state.com","mail2stephanie.com","mail2steve.com","mail2steven.com","mail2stewart.com","mail2stlouis.com","mail2stock.com","mail2stockholm.com","mail2stockmarket.com","mail2storage.com","mail2store.com","mail2strong.com","mail2student.com","mail2studio.com","mail2studio54.com","mail2stuntman.com","mail2subscribe.com","mail2sudan.com","mail2superstar.com","mail2surfer.com","mail2suriname.com","mail2susan.com","mail2suzie.com","mail2swaziland.com","mail2sweden.com","mail2sweetheart.com","mail2swim.com","mail2swimmer.com","mail2swiss.com","mail2switzerland.com","mail2sydney.com","mail2sylvia.com","mail2syria.com","mail2taboo.com","mail2taiwan.com","mail2tajikistan.com","mail2tammy.com","mail2tango.com","mail2tanya.com","mail2tanzania.com","mail2tara.com","mail2taurus.com","mail2taxi.com","mail2taxidermist.com","mail2taylor.com","mail2taz.com","mail2teacher.com","mail2technician.com","mail2ted.com","mail2telephone.com","mail2teletubbie.com","mail2tenderness.com","mail2tennessee.com","mail2tennis.com","mail2tennisfan.com","mail2terri.com","mail2terry.com","mail2test.com","mail2texas.com","mail2thailand.com","mail2therapy.com","mail2think.com","mail2tickets.com","mail2tiffany.com","mail2tim.com","mail2time.com","mail2timothy.com","mail2tina.com","mail2titanic.com","mail2toby.com","mail2todd.com","mail2togo.com","mail2tom.com","mail2tommy.com","mail2tonga.com","mail2tony.com","mail2touch.com","mail2tourist.com","mail2tracey.com","mail2tracy.com","mail2tramp.com","mail2travel.com","mail2traveler.com","mail2travis.com","mail2trekkie.com","mail2trex.com","mail2triallawyer.com","mail2trick.com","mail2trillionaire.com","mail2troy.com","mail2truck.com","mail2trump.com","mail2try.com","mail2tunisia.com","mail2turbo.com","mail2turkey.com","mail2turkmenistan.com","mail2tv.com","mail2tycoon.com","mail2tyler.com","mail2u4me.com","mail2uae.com","mail2uganda.com","mail2uk.com","mail2ukraine.com","mail2uncle.com","mail2unsubscribe.com","mail2uptown.com","mail2uruguay.com","mail2usa.com","mail2utah.com","mail2uzbekistan.com","mail2v.com","mail2vacation.com","mail2valentines.com","mail2valerie.com","mail2valley.com","mail2vamoose.com","mail2vanessa.com","mail2vanuatu.com","mail2venezuela.com","mail2venous.com","mail2venus.com","mail2vermont.com","mail2vickie.com","mail2victor.com","mail2victoria.com","mail2vienna.com","mail2vietnam.com","mail2vince.com","mail2virginia.com","mail2virgo.com","mail2visionary.com","mail2vodka.com","mail2volleyball.com","mail2waiter.com","mail2wallstreet.com","mail2wally.com","mail2walter.com","mail2warren.com","mail2washington.com","mail2wave.com","mail2way.com","mail2waycool.com","mail2wayne.com","mail2webmaster.com","mail2webtop.com","mail2webtv.com","mail2weird.com","mail2wendell.com","mail2wendy.com","mail2westend.com","mail2westvirginia.com","mail2whether.com","mail2whip.com","mail2white.com","mail2whitehouse.com","mail2whitney.com","mail2why.com","mail2wilbur.com","mail2wild.com","mail2willard.com","mail2willie.com","mail2wine.com","mail2winner.com","mail2wired.com","mail2wisconsin.com","mail2woman.com","mail2wonder.com","mail2world.com","mail2worship.com","mail2wow.com","mail2www.com","mail2wyoming.com","mail2xfiles.com","mail2xox.com","mail2yachtclub.com","mail2yahalla.com","mail2yemen.com","mail2yes.com","mail2yugoslavia.com","mail2zack.com","mail2zambia.com","mail2zenith.com","mail2zephir.com","mail2zeus.com","mail2zipper.com","mail2zoo.com","mail2zoologist.com","mail2zurich.com","mail3000.com","mail333.com","mail4trash.com","mail4u.info","mailandftp.com","mailandnews.com","mailas.com","mailasia.com","mailbolt.com","mailbomb.net","mailboom.com","mailbox.as","mailbox.co.za","mailbox.gr","mailbox.hu","mailbox72.biz","mailbox80.biz","mailbr.com.br","mailc.net","mailcan.com","mailcat.biz","mailcc.com","mailchoose.co","mailcity.com","mailclub.fr","mailclub.net","maildrop.cc","maildrop.gq","maildx.com","mailed.ro","mailexcite.com","mailfa.tk","mailfence.com","mailforce.net","mailforspam.com","mailfree.gq","mailfs.com","mailftp.com","mailgenie.net","mailguard.me","mailhaven.com","mailhood.com","mailimate.com","mailinator.com","mailinator.org","mailinator.us","mailinblack.com","mailingaddress.org","mailingweb.com","mailisent.com","mailismagic.com","mailite.com","mailmate.com","mailme.dk","mailme.gq","mailme24.com","mailmight.com","mailmij.nl","mailnator.com","mailnew.com","mailops.com","mailoye.com","mailpanda.com","mailpick.biz","mailpokemon.com","mailpost.zzn.com","mailpride.com","mailproxsy.com","mailpuppy.com","mailquack.com","mailrock.biz","mailroom.com","mailru.com","mailsac.com","mailseal.de","mailsent.net","mailservice.ms","mailshuttle.com","mailslapping.com","mailstart.com","mailstartplus.com","mailsurf.com","mailtag.com","mailtemp.info","mailto.de","mailtothis.com","mailueberfall.de","mailup.net","mailwire.com","mailworks.org","mailzi.ru","mailzilla.org","maktoob.com","malayalamtelevision.net","maltesemail.com","mamber.net","manager.de","mancity.net","mantrafreenet.com","mantramail.com","mantraonline.com","manybrain.com","marchmail.com","mariahc.com","marijuana.com","marijuana.nl","married-not.com","marsattack.com","martindalemail.com","mash4077.com","masrawy.com","matmail.com","mauimail.com","mauritius.com","maxleft.com","maxmail.co.uk","mbox.com.au","mchsi.com","me-mail.hu","me.com","medical.net.au","medscape.com","meetingmall.com","megago.com","megamail.pt","megapoint.com","mehrani.com","mehtaweb.com","meine-dateien.info","meine-diashow.de","meine-fotos.info","meine-urlaubsfotos.de","mekhong.com","melodymail.com","meloo.com","merda.flu.cc","merda.igg.biz","merda.nut.cc","merda.usa.cc","message.hu","message.myspace.com","messages.to","metacrawler.com","metalfan.com","metaping.com","metta.lk","mexicomail.com","mezimages.net","mfsa.ru","mierdamail.com","miesto.sk","mighty.co.za","migmail.net","migmail.pl","migumail.com","miho-nakayama.com","mikrotamanet.com","millionaireintraining.com","millionairemail.com","milmail.com","mindless.com","mindspring.com","minister.com","misery.net","mittalweb.com","mixmail.com","mjfrogmail.com","ml1.net","mlb.bounce.ed10.net","mm.st","mns.ru","moakt.com","mobilbatam.com","mobileninja.co.uk","mochamail.com","mohammed.com","mohmal.com","moldova.cc","moldova.com","moldovacc.com","momslife.com","monemail.com","money.net","montevideo.com.uy","monumentmail.com","moonman.com","moose-mail.com","mor19.uu.gl","mortaza.com","mosaicfx.com","moscowmail.com","most-wanted.com","mostlysunny.com","motormania.com","movemail.com","movieluver.com","mox.pp.ua","mp4.it","mr-potatohead.com","mscold.com","msgbox.com","msn.cn","msn.com","msn.nl","mt2015.com","mt2016.com","mttestdriver.com","muehlacker.tk","muell.icu","muellemail.com","muellmail.com","mundomail.net","munich.com","music.com","musician.org","musicscene.org","muskelshirt.de","muslim.com","muslimsonline.com","mutantweb.com","mvrht.com","my.com","my10minutemail.com","mybox.it","mycabin.com","mycity.com","mycool.com","mydomain.com","mydotcomaddress.com","myfamily.com","myfastmail.com","mygo.com","myiris.com","mymacmail.com","mynamedot.com","mynet.com","mynetaddress.com","mynetstore.de","myownemail.com","myownfriends.com","mypacks.net","mypad.com","mypersonalemail.com","myplace.com","myrambler.ru","myrealbox.com","myremarq.com","myself.com","myspaceinc.net","myspamless.com","mystupidjob.com","mytemp.email","mythirdage.com","myway.com","myworldmail.com","n2.com","n2baseball.com","n2business.com","n2mail.com","n2soccer.com","n2software.com","nabc.biz","nafe.com","nagpal.net","nakedgreens.com","name.com","nameplanet.com","nandomail.com","naplesnews.net","naseej.com","nativestar.net","nativeweb.net","naui.net","naver.com","navigator.lv","navy.org","naz.com","nc.rr.com","nchoicemail.com","neeva.net","nemra1.com","nenter.com","neo.rr.com","nervhq.org","net-c.be","net-c.ca","net-c.cat","net-c.com","net-c.es","net-c.fr","net-c.it","net-c.lu","net-c.nl","net-c.pl","net-pager.net","net-shopping.com","net4b.pt","net4you.at","netbounce.com","netbroadcaster.com","netby.dk","netc.eu","netc.fr","netc.it","netc.lu","netc.pl","netcenter-vn.net","netcmail.com","netcourrier.com","netexecutive.com","netexpressway.com","netgenie.com","netian.com","netizen.com.ar","netlane.com","netlimit.com","netmongol.com","netnet.com.sg","netnoir.net","netpiper.com","netposta.net","netralink.com","netscape.net","netscapeonline.co.uk","netspace.net.au","netspeedway.com","netsquare.com","netster.com","nettaxi.com","nettemail.com","netterchef.de","netti.fi","netzero.com","netzero.net","netzidiot.de","neue-dateien.de","neuro.md","newmail.com","newmail.net","newmail.ru","newsboysmail.com","newyork.com","nextmail.ru","nexxmail.com","nfmail.com","nicebush.com","nicegal.com","nicholastse.net","nicolastse.com","nightmail.com","nikopage.com","nimail.com","ninfan.com","nirvanafan.com","nmail.cf","noavar.com","nonpartisan.com","nonspam.eu","nonspammer.de","norika-fujiwara.com","norikomail.com","northgates.net","nospammail.net","nospamthanks.info","nowhere.org","ntelos.net","ntlhelp.net","ntlworld.com","ntscan.com","null.net","nullbox.info","nur-fuer-spam.de","nus.edu.sg","nwldx.com","nwytg.net","nxt.ru","ny.com","nybella.com","nyc.com","nycmail.com","nzoomail.com","o-tay.com","o2.co.uk","oaklandas-fan.com","oath.com","oceanfree.net","odaymail.com","oddpost.com","odmail.com","office-dateien.de","office-email.com","offroadwarrior.com","oicexchange.com","oida.icu","oikrach.com","okbank.com","okhuman.com","okmad.com","okmagic.com","okname.net","okuk.com","oldies104mail.com","ole.com","olemail.com","olympist.net","olypmall.ru","omaninfo.com","omen.ru","onebox.com","onenet.com.ar","oneoffmail.com","onet.com.pl","onet.eu","onet.pl","oninet.pt","online.ie","online.ms","online.nl","onlinewiz.com","onmilwaukee.com","onobox.com","op.pl","opayq.com","openmailbox.org","operafan.com","operamail.com","opoczta.pl","optician.com","optonline.net","optusnet.com.au","orange.fr","orbitel.bg","orgmail.net","orthodontist.net","osite.com.br","oso.com","otakumail.com","our-computer.com","our-office.com","our.st","ourbrisbane.com","ourklips.com","ournet.md","outgun.com","outlawspam.com","outlook.at","outlook.be","outlook.cl","outlook.co.id","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.nl","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","over-the-rainbow.com","ownmail.net","ozbytes.net.au","ozemail.com.au","pacbell.net","pacific-ocean.com","pacific-re.com","pacificwest.com","packersfan.com","pagina.de","pagons.org","pakistanmail.com","pakistanoye.com","palestinemail.com","pandora.be","papierkorb.me","parkjiyoon.com","parsmail.com","partlycloudy.com","partybombe.de","partyheld.de","partynight.at","parvazi.com","passwordmail.com","pathfindermail.com","pconnections.net","pcpostal.com","pcsrock.com","pcusers.otherinbox.com","pediatrician.com","penpen.com","peoplepc.com","peopleweb.com","pepbot.com","perfectmail.com","perso.be","personal.ro","personales.com","petlover.com","petml.com","pettypool.com","pezeshkpour.com","pfui.ru","phayze.com","phone.net","photo-impact.eu","photographer.net","phpbb.uu.gl","phreaker.net","phus8kajuspa.cu.cc","physicist.net","pianomail.com","pickupman.com","picusnet.com","pigpig.net","pinoymail.com","piracha.net","pisem.net","pjjkp.com","planet.nl","planetaccess.com","planetarymotion.net","planetearthinter.net","planetmail.com","planetmail.net","planetout.com","plasa.com","playersodds.com","playful.com","playstation.sony.com","plus.com","plus.google.com","plusmail.com.br","pm.me","pmail.net","pobox.hu","pobox.sk","pochta.ru","poczta.fm","poczta.onet.pl","poetic.com","pokemail.net","pokemonpost.com","pokepost.com","polandmail.com","polbox.com","policeoffice.com","politician.com","polizisten-duzer.de","polyfaust.com","pool-sharks.com","poond.com","popaccount.com","popmail.com","popsmail.com","popstar.com","portugalmail.com","portugalmail.pt","portugalnet.com","positive-thinking.com","post.com","post.cz","post.sk","posta.ro","postaccesslite.com","postafree.com","postaweb.com","posteo.at","posteo.be","posteo.ch","posteo.cl","posteo.co","posteo.de","posteo.dk","posteo.es","posteo.gl","posteo.net","posteo.no","posteo.us","postfach.cc","postinbox.com","postino.ch","postmark.net","postmaster.co.uk","postmaster.twitter.com","postpro.net","pousa.com","powerfan.com","pp.inet.fi","praize.com","premium-mail.fr","premiumservice.com","presidency.com","press.co.jp","priest.com","primposta.com","primposta.hu","privy-mail.com","privymail.de","pro.hu","probemail.com","prodigy.net","progetplus.it","programist.ru","programmer.net","programozo.hu","proinbox.com","project2k.com","promessage.com","prontomail.com","protestant.com","proton.me","protonmail.ch","protonmail.com","prydirect.info","psv-supporter.com","ptd.net","public-files.de","public.usa.com","publicist.com","pulp-fiction.com","punkass.com","purpleturtle.com","put2.net","pwrby.com","q.com","qatarmail.com","qmail.com","qprfans.com","qq.com","qrio.com","quackquack.com","quakemail.com","qualityservice.com","quantentunnel.de","qudsmail.com","quepasa.com","quickhosts.com","quickmail.nl","quicknet.nl","quickwebmail.com","quiklinks.com","quikmail.com","qv7.info","qwest.net","qwestoffice.net","r-o-o-t.com","raakim.com","racedriver.com","racefanz.com","racingfan.com.au","racingmail.com","radicalz.com","radiku.ye.vc","radiologist.net","ragingbull.com","ralib.com","rambler.ru","ranmamail.com","rastogi.net","ratt-n-roll.com","rattle-snake.com","raubtierbaendiger.de","ravearena.com","ravemail.com","razormail.com","rccgmail.org","rcn.com","realemail.net","reality-concept.club","reallyfast.biz","reallyfast.info","reallymymail.com","realradiomail.com","realtyagent.com","reborn.com","reconmail.com","recycler.com","recyclermail.com","rediff.com","rediffmail.com","rediffmailpro.com","rednecks.com","redseven.de","redsfans.com","regbypass.com","reggaefan.com","registerednurses.com","regspaces.tk","reincarnate.com","religious.com","remail.ga","renren.com","repairman.com","reply.hu","reply.ticketmaster.com","representative.com","rescueteam.com","resgedvgfed.tk","resource.calendar.google.com","resumemail.com","rezai.com","rhyta.com","richmondhill.com","rickymail.com","rin.ru","riopreto.com.br","rklips.com","rn.com","ro.ru","roadrunner.com","roanokemail.com","rock.com","rocketmail.com","rocketship.com","rockfan.com","rodrun.com","rogers.com","rome.com","roosh.com","rootprompt.org","roughnet.com","royal.net","rr.com","rrohio.com","rsub.com","rubyridge.com","runbox.com","rushpost.com","ruttolibero.com","rvshop.com","s-mail.com","sabreshockey.com","sacbeemail.com","saeuferleber.de","safe-mail.net","safrica.com","sagra.lu","sags-per-mail.de","sailormoon.com","saintly.com","saintmail.net","sale-sale-sale.com","salehi.net","salesperson.net","samerica.com","samilan.net","sammimail.com","sandelf.de","sanfranmail.com","sanook.com","sapo.pt","saudia.com","savelife.ml","sayhi.net","saynotospams.com","sbcglbal.net","sbcglobal.com","sbcglobal.net","scandalmail.com","scarlet.nl","schafmail.de","schizo.com","schmusemail.de","schoolemail.com","schoolmail.com","schoolsucks.com","schreib-doch-mal-wieder.de","schweiz.org","sci.fi","scientist.com","scifianime.com","scotland.com","scotlandmail.com","scottishmail.co.uk","scottsboro.org","scubadiving.com","seanet.com","search.ua","searchwales.com","sebil.com","seckinmail.com","secret-police.com","secretary.net","secretservices.net","secure-mail.biz","secure-mail.cc","seductive.com","seekstoyboy.com","seguros.com.br","selfdestructingmail.com","send.hu","sendme.cz","sendspamhere.com","sent.as","sent.at","sent.com","sentrismail.com","serga.com.ar","servemymail.com","servermaps.net","sesmail.com","sexmagnet.com","seznam.cz","shahweb.net","shaniastuff.com","shared-files.de","sharedmailbox.org","sharklasers.com","sharmaweb.com","shaw.ca","she.com","shieldedmail.com","shinedyoureyes.com","shitaway.cf","shitaway.cu.cc","shitaway.ga","shitaway.gq","shitaway.ml","shitaway.tk","shitaway.usa.cc","shitmail.de","shitmail.org","shitware.nl","shockinmytown.cu.cc","shootmail.com","shortmail.com","shotgun.hu","showslow.de","shuf.com","sialkotcity.com","sialkotian.com","sialkotoye.com","sify.com","silkroad.net","sina.cn","sina.com","sinamail.com","singapore.com","singles4jesus.com","singmail.com","singnet.com.sg","sinnlos-mail.de","siteposter.net","skafan.com","skeefmail.com","skim.com","skizo.hu","skrx.tk","sky.com","skynet.be","slamdunkfan.com","slave-auctions.net","slingshot.com","slippery.email","slipry.net","slo.net","slotter.com","smap.4nmv.ru","smapxsmap.net","smashmail.de","smellrear.com","smileyface.comsmithemail.net","smoothmail.com","sms.at","snail-mail.net","snakebite.com","snakemail.com","sndt.net","sneakemail.com","snet.net","sniper.hu","snkmail.com","snoopymail.com","snowboarding.com","snowdonia.net","socamail.com","socceramerica.net","soccermail.com","soccermomz.com","social-mailer.tk","socialworker.net","sociologist.com","sofort-mail.de","sofortmail.de","softhome.net","sogou.com","sohu.com","sol.dk","solar-impact.pro","solcon.nl","soldier.hu","solution4u.com","solvemail.info","songwriter.net","sonnenkinder.org","soodomail.com","soon.com","soulfoodcookbook.com","sp.nl","space-bank.com","space-man.com","space-ship.com","space-travel.com","space.com","spacemart.com","spacetowns.com","spacewar.com","spainmail.com","spam.2012-2016.ru","spam.care","spamavert.com","spambob.com","spambob.org","spambog.net","spambooger.com","spambox.xyz","spamcero.com","spamdecoy.net","spameater.com","spameater.org","spamex.com","spamfree24.info","spamfree24.net","spamgoes.in","spaminator.de","spamkill.info","spaml.com","spamoff.de","spamstack.net","spartapiet.com","spazmail.com","speedemail.net","speedpost.net","speedrules.com","speedrulz.com","speedymail.org","sperke.net","spils.com","spinfinder.com","spl.at","spoko.pl","spoofmail.de","sportemail.com","sportsmail.com","sporttruckdriver.com","spray.no","spray.se","spybox.de","spymac.com","sraka.xyz","srilankan.net","ssl-mail.com","st-davids.net","stade.fr","stalag13.com","stargateradio.com","starmail.com","starmail.org","starmedia.com","starplace.com","starspath.com","start.com.au","startkeys.com","stinkefinger.net","stipte.nl","stoned.com","stones.com","stop-my-spam.pp.ua","stopdropandroll.com","storksite.com","streber24.de","streetwisemail.com","stribmail.com","strompost.com","strongguy.com","student.su","studentcenter.org","stuffmail.de","subram.com","sudanmail.net","sudolife.me","sudolife.net","sudomail.biz","sudomail.com","sudomail.net","sudoverse.com","sudoverse.net","sudoweb.net","sudoworld.com","sudoworld.net","suhabi.com","suisse.org","sukhumvit.net","sunpoint.net","sunrise-sunset.com","sunsgame.com","sunumail.sn","suomi24.fi","superdada.com","supereva.it","supermail.ru","superrito.com","superstachel.de","surat.com","surf3.net","surfree.com","surfy.net","surgical.net","surimail.com","survivormail.com","susi.ml","svk.jp","swbell.net","sweb.cz","swedenmail.com","sweetville.net","sweetxxx.de","swift-mail.com","swiftdesk.com","swingeasyhithard.com","swingfan.com","swipermail.zzn.com","swirve.com","swissinfo.org","swissmail.com","swissmail.net","switchboardmail.com","switzerland.org","sx172.com","syom.com","syriamail.com","t-online.de","t.psh.me","t2mail.com","tafmail.com","takuyakimura.com","talk21.com","talkcity.com","talkinator.com","tamil.com","tampabay.rr.com","tankpolice.com","tatanova.com","tbwt.com","tcc.on.ca","tds.net","teachermail.net","teachers.org","teamdiscovery.com","teamtulsa.net","tech-center.com","tech4peace.org","techemail.com","techie.com","technisamail.co.za","technologist.com","techscout.com","techspot.com","teenagedirtbag.com","tele2.nl","telebot.com","telefonica.net","teleline.es","telenet.be","telepac.pt","telerymd.com","teleworm.us","telfort.nl","telfortglasvezel.nl","telinco.net","telkom.net","telpage.net","telstra.com","telstra.com.au","temp-mail.com","temp-mail.de","temp-mail.org","temp.headstrong.de","tempail.com","tempemail.biz","tempmail.net","tempmail.us","tempmail2.com","tempmaildemo.com","tempmailer.com","temporarioemail.com.br","temporaryemail.us","tempthe.net","tempymail.com","temtulsa.net","tenchiclub.com","tenderkiss.com","tennismail.com","terminverpennt.de","terra.cl","terra.com","terra.com.ar","terra.com.br","terra.es","test.com","test.de","tfanus.com.er","tfz.net","thai.com","thaimail.com","thaimail.net","thanksnospam.info","the-african.com","the-airforce.com","the-aliens.com","the-american.com","the-animal.com","the-army.com","the-astronaut.com","the-beauty.com","the-big-apple.com","the-biker.com","the-boss.com","the-brazilian.com","the-canadian.com","the-canuck.com","the-captain.com","the-chinese.com","the-country.com","the-cowboy.com","the-davis-home.com","the-dutchman.com","the-eagles.com","the-englishman.com","the-fastest.net","the-fool.com","the-frenchman.com","the-galaxy.net","the-genius.com","the-gentleman.com","the-german.com","the-gremlin.com","the-hooligan.com","the-italian.com","the-japanese.com","the-lair.com","the-madman.com","the-mailinglist.com","the-marine.com","the-master.com","the-mexican.com","the-ministry.com","the-monkey.com","the-newsletter.net","the-pentagon.com","the-police.com","the-prayer.com","the-professional.com","the-quickest.com","the-russian.com","the-snake.com","the-spaceman.com","the-stock-market.com","the-student.net","the-whitehouse.net","the-wild-west.com","the18th.com","thecoolguy.com","thecriminals.com","thedoghousemail.com","thedorm.com","theend.hu","theglobe.com","thegolfcourse.com","thegooner.com","theheadoffice.com","theinternetemail.com","thelanddownunder.com","themail.com","themillionare.net","theoffice.net","theplate.com","thepokerface.com","thepostmaster.net","theraces.com","theracetrack.com","therapist.net","thestreetfighter.com","theteebox.com","thewatercooler.com","thewebpros.co.uk","thewizzard.com","thewizzkid.com","thezhangs.net","thirdage.com","thisgirl.com","thraml.com","throwam.com","thundermail.com","tidni.com","timein.net","tiscali.at","tiscali.be","tiscali.co.uk","tiscali.it","tiscali.lu","tiscali.se","tkcity.com","tmail.ws","toast.com","toke.com","tom.com","toolsource.com","toomail.biz","toothfairy.com","topchat.com","topgamers.co.uk","topletter.com","topmail-files.de","topmail.com.ar","topsurf.com","torchmail.com","torontomail.com","tortenboxer.de","totalmail.de","totalmusic.net","townisp.com","tpg.com.au","trash-amil.com","trash-mail.ga","trash-mail.ml","trash2010.com","trash2011.com","trashdevil.de","trashymail.net","travel.li","trayna.com","trialbytrivia.com","trickmail.net","trimix.cn","tritium.net","trmailbox.com","tropicalstorm.com","truckerz.com","truckracer.com","truckracers.com","trust-me.com","truthmail.com","tsamail.co.za","ttml.co.in","tunisiamail.com","turboprinz.de","turboprinzessin.de","turkey.com","turual.com","tut.by","tvstar.com","twc.com","twcny.com","twinstarsmail.com","tx.rr.com","tycoonmail.com","typemail.com","u14269.ml","u2club.com","ua.fm","uae.ac","uaemail.com","ubbi.com","ubbi.com.br","uboot.com","uk2.net","uk2k.com","uk2net.com","uk7.net","uk8.net","ukbuilder.com","ukcool.com","ukdreamcast.com","ukmail.org","ukmax.com","ukr.net","uku.co.uk","ultapulta.com","ultra.fyi","ultrapostman.com","ummah.org","umpire.com","unbounded.com","unforgettable.com","uni.de","unican.es","unihome.com","unitybox.de","universal.pt","uno.ee","uno.it","unofree.it","unterderbruecke.de","uol.com.ar","uol.com.br","uol.com.co","uol.com.mx","uol.com.ve","uole.com","uole.com.ve","uolmail.com","uomail.com","upc.nl","upcmail.nl","upf.org","uplipht.com","ureach.com","urgentmail.biz","urhen.com","uroid.com","usa.com","usa.net","usaaccess.net","usanetmail.com","used-product.fr","usermail.com","username.e4ward.com","usma.net","usmc.net","uswestmail.net","uymail.com","uyuyuy.com","v-sexi.com","vaasfc4.tk","vahoo.com","valemail.net","vampirehunter.com","varbizmail.com","vcmail.com","velnet.co.uk","velocall.com","verizon.net","verizonmail.com","verlass-mich-nicht.de","versatel.nl","veryfast.biz","veryrealemail.com","veryspeedy.net","vfemail.net","vickaentb.tk","videotron.ca","viditag.com","viewcastmedia.com","viewcastmedia.net","vinbazar.com","violinmakers.co.uk","vip.126.com","vip.21cn.com","vip.citiz.net","vip.gr","vip.onet.pl","vip.qq.com","vip.sina.com","vipmail.ru","virgilio.it","virgin.net","virginbroadband.com.au","virginmedia.com","virtualmail.com","visitmail.com","visitweb.com","visto.com","visualcities.com","vivavelocity.com","vivianhsu.net","vjtimail.com","vkcode.ru","vnet.citiz.net","vnn.vn","vodafone.nl","vodafonethuis.nl","volcanomail.com","vollbio.de","volloeko.de","vomoto.com","vorsicht-bissig.de","vorsicht-scharf.de","vote-democrats.com","vote-hillary.com","vote-republicans.com","vote4gop.org","votenet.com","vp.pl","vr9.com","vubby.com","w3.to","wahoye.com","walala.org","wales2000.net","walkmail.net","walkmail.ru","wam.co.za","wanadoo.es","wanadoo.fr","war-im-urlaub.de","warmmail.com","warpmail.net","warrior.hu","waumail.com","wazabi.club","wbdet.com","wearab.net","web-contact.info","web-emailbox.eu","web-ideal.fr","web-mail.com.ar","web-mail.pp.ua","web-police.com","web.de","webave.com","webcammail.com","webcity.ca","webcontact-france.eu","webdream.com","webindia123.com","webjump.com","webm4il.info","webmail.co.yu","webmail.co.za","webmail.hu","webmails.com","webname.com","webprogramming.com","webstation.com","websurfer.co.za","webtopmail.com","webuser.in","wee.my","weedmail.com","weekmail.com","weekonline.com","wefjo.grn.cc","weg-werf-email.de","wegas.ru","wegwerf-emails.de","wegwerfmail.info","wegwerpmailadres.nl","wehshee.com","weibsvolk.de","weibsvolk.org","weinenvorglueck.de","welsh-lady.com","westnet.com","westnet.com.au","wetrainbayarea.com","wfgdfhj.tk","whale-mail.com","whartontx.com","whatiaas.com","whatpaas.com","wheelweb.com","whipmail.com","whoever.com","whoopymail.com","whtjddn.33mail.com","wi.rr.com","wi.twcbc.com","wickmail.net","wideopenwest.com","wildmail.com","wilemail.com","will-hier-weg.de","windowslive.com","windrivers.net","windstream.net","wingnutz.com","winmail.com.au","winning.com","wir-haben-nachwuchs.de","wir-sind-cool.org","wirsindcool.de","witty.com","wiz.cc","wkbwmail.com","wmail.cf","wo.com.cn","woh.rr.com","wolf-web.com","wolke7.net","wollan.info","wombles.com","women-at-work.org","wongfaye.com","wooow.it","worker.com","workmail.com","worldemail.com","worldnet.att.net","wormseo.cn","wosaddict.com","wouldilie.com","wovz.cu.cc","wowgirl.com","wowmail.com","wowway.com","wp.pl","wptamail.com","wrexham.net","writeme.com","writemeback.com","wrongmail.com","wtvhmail.com","wwdg.com","www.com","www.e4ward.com","www2000.net","wx88.net","wxs.net","x-mail.net","x-networks.net","x5g.com","xagloo.com","xaker.ru","xing886.uu.gl","xmastime.com","xms.nl","xmsg.com","xoom.com","xoxox.cc","xpressmail.zzn.com","xs4all.nl","xsecurity.org","xsmail.com","xtra.co.nz","xuno.com","xww.ro","xy9ce.tk","xyzfree.net","xzapmail.com","y7mail.com","ya.ru","yada-yada.com","yaho.com","yahoo.ae","yahoo.at","yahoo.be","yahoo.ca","yahoo.ch","yahoo.cn","yahoo.co","yahoo.co.id","yahoo.co.il","yahoo.co.in","yahoo.co.jp","yahoo.co.kr","yahoo.co.nz","yahoo.co.th","yahoo.co.uk","yahoo.co.za","yahoo.com","yahoo.com.ar","yahoo.com.au","yahoo.com.br","yahoo.com.cn","yahoo.com.co","yahoo.com.hk","yahoo.com.is","yahoo.com.mx","yahoo.com.my","yahoo.com.ph","yahoo.com.ru","yahoo.com.sg","yahoo.com.tr","yahoo.com.tw","yahoo.com.vn","yahoo.cz","yahoo.de","yahoo.dk","yahoo.es","yahoo.fi","yahoo.fr","yahoo.gr","yahoo.hu","yahoo.ie","yahoo.in","yahoo.it","yahoo.jp","yahoo.nl","yahoo.no","yahoo.pl","yahoo.pt","yahoo.ro","yahoo.ru","yahoo.se","yahoofs.com","yalla.com","yalla.com.lb","yalook.com","yam.com","yandex.com","yandex.pl","yandex.ru","yandex.ua","yapost.com","yapped.net","yawmail.com","yeah.net","yebox.com","yehey.com","yemenmail.com","yepmail.net","yert.ye.vc","yesey.net","yifan.net","ymail.com","yogotemail.com","yomail.info","yopmail.com","yopmail.pp.ua","yopolis.com","yopweb.com","youareadork.com","youmailr.com","your-house.com","your-mail.com","yourinbox.com","yourlifesucks.cu.cc","yourlover.net","yourname.freeservers.com","yournightmare.com","yours.com","yourssincerely.com","yoursubdomain.zzn.com","yourteacher.net","yourwap.com","yuuhuu.net","yyhmail.com","z1p.biz","za.com","zahadum.com","zaktouni.fr","zeepost.nl","zetmail.com","zhaowei.net","zhouemail.510520.org","ziggo.nl","zionweb.org","zip.net","zipido.com","ziplip.com","zipmail.com","zipmail.com.br","zipmax.com","zmail.ru","zoemail.com","zoemail.org","zoho.com","zohomail.com","zomg.info","zonnet.nl","zoominternet.net","zubee.com","zuvio.com","zuzzurello.com","zwallet.com","zweb.in","zxcv.com","zxcvbnm.com","zybermail.com","zydecofan.com","zzn.com","zzom.co.uk","zzz.com","zzz.pl"]'),v=new Set(w);function z(o){var c;const a=(c=o.email.split("@")[1])==null?void 0:c.toLowerCase();return a&&!v.has(a)?a.toLowerCase():o.name||""}function D(){const o=y(),a=s(),{userUpdateLogoutMutation:c}=u(),{user:i,isUserLoaded:n}=d(),e=h({...c(),onSettled:()=>{l.clear(),a({to:t.authLoginRoute.to})}});return n?m.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[m.jsx("div",{className:"absolute top-4 right-4 z-10",children:m.jsx(p,{variant:"ghost",size:"sm",onClick:()=>e.mutate(),disabled:e.isPending,children:"Sign out"})}),m.jsxs(k,{children:[m.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[m.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:m.jsx(b,{className:"h-8 w-auto"})}),m.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Set up your workspace"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Create your organization and first workspace to get started with Hatchet."})]}),m.jsx(f,{defaultOrganizationName:i?z(i):"",defaultTenantName:"development",afterSave:({tenant:r})=>{l.prefetchQuery(g.controlPlane.subscriptionPlans()),o({to:t.tenantOverviewRoute.to,params:{tenant:r.id},replace:!0})}})]})]}):m.jsx(m.Fragment,{})}export{D as default}; diff --git a/hatchetembed/dashboard/assets/index-BnRg_ecZ.js b/hatchetembed/dashboard/assets/index-BnRg_ecZ.js new file mode 100644 index 0000000000..efdc46e131 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-BnRg_ecZ.js @@ -0,0 +1 @@ +import{j as e,aa as Y,L as B,I as oe,aj as ce,ah as de,B as g,ai as me,ak as ue,al as he,S as P,k as i,bs as V,bt as K,bu as Q,bv as M,b8 as b,ay as T,aG as X,c_ as ge,W as O,X as E,a3 as z,Z as q,am as xe,da as pe,c3 as fe,_ as be,$ as je,a0 as ke,a1 as Ne,ar as ve,bn as we,h as ye,l as Ce,p as Z,a as J,N as _e,O as Te}from"./index-wypz6hY5.js";import{q as Se,r as Ie,s as De,t as Fe}from"./index-C8__5p50.js";import{S as Le}from"./secret-copier-BNLi8BbD.js";import{u as Me}from"./use-analytics-BZxgE2Kk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="6d4bdb7e-d77a-4213-ab43-03f772b0c34b",t._sentryDebugIdIdentifier="sentry-dbid-6d4bdb7e-d77a-4213-ab43-03f772b0c34b")}catch{}})();const Oe=e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"bottom-[1px] relative",children:e.jsx("path",{d:"M10.499 1.5V2.5C10.499 7.3137 7.81275 9.5 4.49902 9.5L3.5482 9.49995C3.65395 7.9938 4.1227 7.0824 5.34695 5.99945C5.94895 5.4669 5.89825 5.15945 5.60145 5.33605C3.55965 6.5508 2.54557 8.1931 2.50059 10.8151L2.49902 11H1.49902C1.49902 10.3187 1.55688 9.69985 1.6719 9.1341C1.55665 8.48705 1.49902 7.6088 1.49902 6.5C1.49902 3.73857 3.7376 1.5 6.499 1.5C7.499 1.5 8.499 2 10.499 1.5Z",fill:"hsl(var(--brand))"})});function Ee({completed:t}){return t?e.jsxs("span",{className:"text-[10px] font-mono tracking-widest uppercase inline-flex items-center gap-1.5 text-foreground/50",children:[e.jsx(Se,{}),"Onboarding step"]}):e.jsxs("span",{className:"text-[10px] font-mono tracking-widest uppercase inline-flex items-center gap-1.5 text-brand",children:[Oe,"Onboarding step"]})}function U({title:t,showOnboardingBadge:s=!1,completed:a=!1}){return e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inline-flex items-baseline gap-5",children:[e.jsx("h2",{className:"text-md",children:t}),s&&e.jsx(Ee,{completed:a})]}),e.jsx(Y,{className:"my-4 bg-border/50",flush:!0})]})}function ze({tokenName:t,onTokenNameChange:s,expiresIn:a,expiresInOptions:d,onExpiresInChange:l,onExpiresInSelected:o,fieldErrors:x,isGenerating:u,onGenerateToken:p}){var v;const j=((v=Object.entries(d).find(([,m])=>m===a))==null?void 0:v[0])||"Select an option";return e.jsxs("div",{children:[e.jsx(U,{title:"Create API token",showOnboardingBadge:!0}),e.jsxs("div",{className:"grid gap-4 items-end grid-flow-row lg:[grid-template-columns:1fr_1fr_auto_1fr] lg:grid-flow-col",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"name",children:"Name"}),e.jsx(oe,{id:"name",type:"text",required:!0,autoCapitalize:"none",autoCorrect:"off",placeholder:"My Token",value:t,onChange:m=>s(m.target.value),disabled:u}),x.name&&e.jsx("div",{className:"text-sm text-red-500",children:x.name})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"expiresIn",children:"Expires In"}),e.jsxs(ce,{children:[e.jsx(de,{asChild:!0,children:e.jsxs(g,{variant:"outline",size:"default",className:"flex justify-between data-[state=open]:bg-muted",disabled:u,children:[j,e.jsx(me,{className:"size-4"})]})}),e.jsx(ue,{align:"end",className:"w-[160px]",children:Object.entries(d).map(([m,k])=>e.jsx(he,{onClick:()=>{l(k),o==null||o(m,k)},children:m},k))})]})]}),e.jsx("div",{className:"grid gap-2 justify-self-start",children:e.jsxs(g,{variant:"default",size:"default",onClick:p,disabled:u,children:[u&&e.jsx(P,{}),"Generate Token"]})})]})]})}const c={install:{value:"install",label:"Install the CLI"},profile:{value:"profile",label:"Set your profile"},quickstart:{value:"quickstart",label:"Project quickstart"},runTask:{value:"runTask",label:"Run a task"},aiDocs:{value:"aiDocs",label:"Install Docs MCP (optional)"}},qe={python:{value:"python"}},I={native:{value:"native",label:"Native (Recommended)"},homebrew:{value:"homebrew",label:"Homebrew"}};function Pe({tenantName:t,selectedTab:s,onSelectedTabChange:a,profileToken:d,isGeneratingProfileToken:l,profileTokenError:o,onGenerateProfileToken:x,hasActiveWorker:u,onTabChangeEvent:p,onFinish:j,installMethod:v,onInstallMethodChange:m}){const k=(t==null?void 0:t.trim())||"local",C=n=>n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`"),[_,D]=i.useState(!1),[F,N]=i.useState(!1);i.useEffect(()=>{N(!1)},[d]);const w=[{...c.install,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:" Install the Hatchet CLI. "}),e.jsxs(V,{value:v,onValueChange:n=>{m(n)},className:"w-full",children:[e.jsx(K,{className:"mt-2 bg-muted ring-1 ring-border/50 rounded-lg p-0 gap-0.5 dark:bg-muted/20 dark:ring-inset",children:Object.entries(I).map(([n,h])=>e.jsx(Q,{value:h.value,className:"rounded-lg h-full text-muted-foreground data-[state=active]:ring-1 data-[state=active]:ring-border data-[state=active]:bg-background dark:data-[state=active]:bg-muted/70 dark:data-[state=active]:shadow-lg dark:ring-inset",children:h.label},n))}),e.jsxs(M,{value:I.native.value,className:"mt-4 space-y-3",children:[e.jsx("p",{className:"text-sm",children:e.jsx("b",{children:"MacOS, Linux, WSL"})}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"curl -fsSL https://install.hatchet.run/install.sh | bash",language:"shell",copy:!0})]}),e.jsxs(M,{value:I.homebrew.value,className:"mt-4 space-y-3",children:[e.jsx("p",{className:"text-sm",children:e.jsx("b",{children:"MacOS"})}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"brew install hatchet-dev/hatchet/hatchet --cask",language:"shell",copy:!0})]})]}),e.jsx("p",{className:"text-sm",children:"Verify the installation by running:"}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet --version",language:"shell",copy:!0}),e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(c.profile.value),children:["Continue",e.jsx(T,{className:"size-3 text-foreground/50"})]})]})},{...c.profile,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Add a Hatchet CLI profile using an API token."}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>{N(!1),x()},disabled:l,children:[l&&e.jsx(P,{}),"Generate token for this command"]}),d&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"This token is only shown once — copy it now."})]}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o}),d&&e.jsx("div",{onMouseDown:()=>N(!0),onClick:()=>N(!0),children:e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:`hatchet profile add --name "${C(k)}" --token "${C(d)}"`,language:"shell",copy:!0,onCopy:()=>N(!0)})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 justify-between",children:[e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",disabled:!d||!F,onClick:()=>a(c.quickstart.value),children:["Continue",e.jsx(T,{className:"size-3 text-foreground/50"})]}),e.jsx(g,{variant:"ghost",size:"default",className:"w-fit",onClick:()=>a(c.quickstart.value),children:"Skip"})]})]})},{...c.quickstart,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Run the quickstart command to clone an example project repository and follow the instructions to cd into the project directory.."}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet quickstart",language:"shell",copy:!0}),e.jsx("p",{className:"text-sm",children:"Then, start your worker in development mode. This will start a worker that will listen for tasks and run them locally."}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet worker dev",language:"shell",copy:!0}),e.jsx("div",{className:"flex items-center gap-3 rounded-lg border border-border/50 bg-muted/20 p-4",children:u?e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"size-5 text-green-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Worker is connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"size-5"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Waiting for worker..."})]})}),e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(c.runTask.value),children:["Continue",e.jsx(T,{className:"size-3 text-foreground/50"})]})]})},{...c.runTask,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"With the worker running, you can now open a new terminal and run the following command to trigger a task run:"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet trigger simple",language:"shell",copy:!0}),e.jsx("p",{className:"text-sm",children:"You can view the script to understand how to trigger a task run from your own codebase."})]}),e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(c.aiDocs.value),children:["Continue",e.jsx(T,{className:"size-3 text-foreground/50"})]})]})},{...c.aiDocs,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Get Hatchet documentation directly in your AI coding assistant (Cursor, Claude Code, Claude Desktop, and more)."}),e.jsx(b,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet docs install",language:"shell",copy:!0}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx("a",{href:"https://docs.hatchet.run/home/install-docs-mcp",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"full setup guide"})," ","for manual configuration options."]}),e.jsxs(g,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:j,children:["Finish",e.jsx(X,{className:"size-3 text-brand"})]})]})}];return e.jsxs("div",{children:[e.jsx(ge,{defaultWorkflow:void 0,show:_,onClose:()=>D(!1)}),e.jsx(U,{title:"Setup your local environment",showOnboardingBadge:!0}),e.jsxs(V,{value:s,onValueChange:n=>{a(n),p==null||p(n,c[n].label)},className:"w-full rounded-md px-6 pb-6 bg-muted/20 ring-1 ring-border/50 ring-inset",children:[e.jsx(K,{className:"grid w-full grid-flow-col rounded-none bg-transparent p-0 pb-6 justify-start gap-6 h-auto ",children:w.map((n,h)=>e.jsx(Q,{value:n.value,className:"text-xs text-muted-foreground rounded-none pt-2.5 px-1 font-medium border-t border-transparent hover:border-border bg-transparent data-[state=active]:border-primary/50 data-[state=active]:bg-transparent data-[state=active]:shadow-none",children:e.jsxs("div",{className:"flex items-center gap-2",children:[h+1," ",n.label]})},n.value))}),w.map(n=>e.jsx(M,{value:n.value,className:"mt-0 space-y-5",children:n.content},n.value))]})]})}function Re(){return e.jsxs("div",{className:"pb-6",children:[e.jsx("h2",{className:"text-md",children:"Support"}),e.jsx(Y,{className:"my-4 bg-border/50",flush:!0}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.jsxs(O,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(E,{className:"p-4 border-b border-border/50 ",children:e.jsx(z,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:"Community"})}),e.jsx(q,{className:"p-4",children:e.jsxs("ul",{className:"space-y-2",children:[e.jsx("li",{children:e.jsxs("a",{href:"https://hatchet.run/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(Ie,{className:"mr-2"})," Join Discord"]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://github.com/hatchet-dev/hatchet/issues",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(De,{className:"mr-2"})," Github Issues"]})})]})})]}),e.jsxs(O,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(E,{className:"p-4 border-b border-border/50 ",children:e.jsx(z,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:"Resources"})}),e.jsx(q,{className:"p-4",children:e.jsxs("ul",{className:"space-y-2",children:[e.jsx("li",{children:e.jsxs("a",{href:"https://docs.hatchet.run",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(xe,{className:"mr-2"})," Documentation"]})}),e.jsx("li",{children:e.jsxs("a",{href:"mailto:support@hatchet.run?subject=Slack%20Channel%20Request",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(Fe,{className:"mr-2"}),"Request Slack Channel"]})}),e.jsx("li",{children:e.jsxs("a",{href:"mailto:support@hatchet.run",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(pe,{className:"mr-2"}),"Email Support"]})})]})})]}),e.jsxs(O,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(E,{className:"p-4 border-b border-border/50 ",children:e.jsx(z,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:e.jsxs("a",{href:"https://hatchet.run/office-hours",target:"_blank",rel:"noreferrer",className:"group inline-flex items-center gap-1 hover:text-primary",children:["Book Office Hours",e.jsx(fe,{className:"size-3 transition-transform group-hover:translate-x-0.5"})]})})}),e.jsxs(q,{className:"p-4 space-y-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"GMT-5 Eastern Standard Time"}),e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["Weekdays ",e.jsx("span",{className:"text-primary",children:"09:00 - 17:00"})]})]})]})]})]})}function He({open:t,onOpenChange:s,token:a}){return!t||!a?null:e.jsx(be,{open:t,onOpenChange:s,children:e.jsxs(je,{className:"w-fit max-w-[700px]",children:[e.jsx(ke,{children:e.jsx(Ne,{children:"Keep it secret, keep it safe"})}),e.jsx("p",{className:"text-sm",children:"This is the only time we will show you this token. Make sure to copy it somewhere safe."}),e.jsx(Le,{secrets:{HATCHET_CLIENT_TOKEN:a},className:"text-sm",maxWidth:"calc(700px - 4rem)",copy:!0})]})})}const S={"3 months":`${2160*60*60}s`,"1 year":`${365*24*60*60}s`,"100 years":`${100*365*24*60*60}s`};function Ve(){var A,G;const{tenant:t,tenantId:s}=ve(),{currentUser:a}=we(),d=ye(),{capture:l}=Me(),[o,x]=i.useState(""),[u,p]=i.useState(!1),[j,v]=i.useState(S["100 years"]),[m,k]=i.useState(),[C,_]=i.useState(!1),[D,F]=i.useState(),[N,w]=i.useState(),[n,h]=i.useState({}),[R,ee]=i.useState(c.install.value),[ae,se]=i.useState(qe.python.value),[te,ne]=i.useState(I.native.value),H=i.useRef(!1),y=i.useMemo(()=>{var f;const r=(f=a==null?void 0:a.name)==null?void 0:f.trim();return r?`${r}'s token`:""},[a==null?void 0:a.name]),{handleApiError:re}=Ce({setFieldErrors:h});i.useEffect(()=>{u||o.trim()||y&&(x(y),h(r=>r.name?{}:r))},[y,u,o]),i.useEffect(()=>{l("onboarding_overview_viewed",{tenant_id:s,user_email:a==null?void 0:a.email})},[l,s,a==null?void 0:a.email]);const W=Z({mutationKey:["api-token:create",s],mutationFn:async r=>(await J.apiTokenCreate(s,r)).data,onSuccess:r=>{k(r.token),_(!0),l("onboarding_token_generated",{tenant_id:s,user_email:a==null?void 0:a.email,token_name:o,expires_in:j}),p(!1),x("")},onError:re}),$=Z({mutationKey:["api-token:create:profile",s],mutationFn:async r=>(await J.apiTokenCreate(s,r)).data,onSuccess:r=>{F(r.token),w(void 0),l("onboarding_token_generated",{tenant_id:s,user_email:a==null?void 0:a.email,token_name:`${y||"Local"} (CLI profile)`,expires_in:S["100 years"],source:"learn_workflow_profile_step"})},onError:()=>{w("Failed to generate token. Please try again.")}}),ie=()=>{if(!o.trim()){h({name:"Name is required"});return}W.mutate({name:o,expiresIn:j})},le=()=>{w(void 0),$.mutate({name:y?`${y} (CLI)`:"CLI token",expiresIn:S["100 years"]})},L=(((G=(A=_e({...Te.workers.list(s),enabled:R===c.quickstart.value,refetchInterval:2e3}).data)==null?void 0:A.rows)==null?void 0:G.length)??0)>0;return i.useEffect(()=>{L&&!H.current&&(l("onboarding_worker_connected",{tenant_id:s,user_email:a==null?void 0:a.email}),H.current=!0)},[L,l,s,a==null?void 0:a.email]),e.jsxs("div",{className:"flex h-full w-full flex-col gap-y-8 lg:p-6",children:[e.jsx("div",{className:"grid gap-2 grid-cols-1 items-start lg:grid-cols-[1fr_auto]",children:e.jsx("div",{className:"flex items-center gap-6 flex-wrap",children:e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Overview"})})}),e.jsx(Pe,{tenantName:t==null?void 0:t.name,selectedTab:R,onSelectedTabChange:ee,language:ae,onLanguageChange:se,installMethod:te,onInstallMethodChange:ne,profileToken:D,isGeneratingProfileToken:$.isPending,profileTokenError:N,onGenerateProfileToken:le,hasActiveWorker:L,onTabChangeEvent:(r,f)=>{l("onboarding_tab_changed",{tenant_id:s,user_email:a==null?void 0:a.email,tab:f})},onLanguageSelectedEvent:(r,f)=>{l("onboarding_language_selected",{tenant_id:s,user_email:a==null?void 0:a.email,language:f})},onFinish:()=>{l("onboarding_completed",{tenant_id:s,user_email:a==null?void 0:a.email}),d({to:"/tenants/$tenant/runs",params:{tenant:s}})}}),e.jsx(ze,{tokenName:o,onTokenNameChange:r=>{p(!0),x(r),h({})},expiresIn:j,expiresInOptions:S,onExpiresInChange:v,onExpiresInSelected:r=>{l("onboarding_token_expiration_selected",{tenant_id:s,user_email:a==null?void 0:a.email,expiration:r})},fieldErrors:n,isGenerating:W.isPending,onGenerateToken:ie}),e.jsx(Re,{}),e.jsx(He,{open:C,onOpenChange:_,token:m})]})}export{Ve as default}; diff --git a/hatchetembed/dashboard/assets/index-BsmMkLz7.js b/hatchetembed/dashboard/assets/index-BsmMkLz7.js new file mode 100644 index 0000000000..ae0df5255e --- /dev/null +++ b/hatchetembed/dashboard/assets/index-BsmMkLz7.js @@ -0,0 +1,26 @@ +import{v as K,cD as l,j as e,cE as n,L as d,I as v,a5 as R,a6 as L,a7 as M,a8 as W,a9 as N,cF as B,cG as xe,G as he,ch as me,ar as ue,N as pe,O as H,p as U,a as D,o as V,bb as $,s as f,b3 as I,cH as k,cI as C,k as b,aj as ge,ah as ye,B as S,cJ as je,ak as fe,al as q,cK as Ne,be as G,bf as O,cL as ve,bj as be,b6 as Ee,b7 as we,u as X,t as J,_ as Y,$ as Z,a0 as Q,a1 as ee,bh as se,S as ae,bg as Se,cM as ke}from"./index-wypz6hY5.js";import{S as Ce}from"./shield-check-lCThuR8D.js";import{S as te}from"./switch-C23Bp5tT.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="7bbdc285-2d67-465b-b937-331205aba08d",s._sentryDebugIdIdentifier="sentry-dbid-7bbdc285-2d67-465b-b937-331205aba08d")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ae=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Pe=K("key",Ae);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ke=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],He=K("lightbulb",Ke);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ie=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Te=K("loader",Ie);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Re=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Le=K("user-check",Re);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Me=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],ne=K("webhook",Me),T=({authMethod:s})=>{switch(s){case l.BASIC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Le,{className:"size-4"}),"Basic"]});case l.API_KEY:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Pe,{className:"size-4"}),"API Key"]});case l.HMAC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Ce,{className:"size-4"}),"HMAC"]});default:const a=s;throw new Error(`Unhandled auth method: ${a}`)}},We=({register:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"username",className:"text-sm font-medium",children:["Username ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"username",placeholder:"username",...s("username"),className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"password",className:"text-sm font-medium",children:["Password ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"password",type:"text",placeholder:"password",...s("password"),className:"h-10 pr-10"})})]})]}),ze=({register:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"headerName",className:"text-sm font-medium",children:["Header Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"headerName",placeholder:"X-API-Key",...s("headerName"),className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"apiKey",className:"text-sm font-medium",children:["API Key ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"apiKey",type:"text",placeholder:"API key...",...s("apiKey"),className:"h-10 pr-10"})})]})]}),Fe=({register:s,watch:a,setValue:r})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"signingSecret",className:"text-sm font-medium",children:["Webhook Signing Secret ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"signingSecret",type:"text",placeholder:"Secret key...",...s("signingSecret"),className:"h-10 pr-10"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"algorithm",className:"text-sm font-medium",children:"Algorithm"}),e.jsxs(R,{value:a("algorithm"),onValueChange:t=>r("algorithm",t),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:"SHA256",children:"SHA256"}),e.jsx(N,{value:"SHA1",children:"SHA1"}),e.jsx(N,{value:"SHA512",children:"SHA512"}),e.jsx(N,{value:"MD5",children:"MD5"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"encoding",className:"text-sm font-medium",children:"Encoding"}),e.jsxs(R,{value:a("encoding"),onValueChange:t=>r("encoding",t),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:"HEX",children:"HEX"}),e.jsx(N,{value:"BASE64",children:"BASE64"}),e.jsx(N,{value:"BASE64URL",children:"BASE64URL"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"signatureHeaderName",className:"text-sm font-medium",children:"Signature Header Name"}),e.jsx(v,{"data-1p-ignore":!0,id:"signatureHeaderName",placeholder:"X-Signature",...s("signatureHeaderName"),className:"h-10"})]})]}),P=({register:s,secretLabel:a="Signing Secret",secretPlaceholder:r="super-secret",helpText:t,helpLink:o})=>e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"signingSecret",className:"text-sm font-medium",children:[a," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"signingSecret",type:"text",placeholder:r,...s("signingSecret"),className:"h-10 pr-10"})}),t&&e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsxs("p",{children:[t,o&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"Learn more"}),"."]})]})})]})}),Ue=({authMethod:s,sourceName:a,register:r,watch:t,setValue:o})=>{switch(a){case n.GENERIC:switch(s){case l.BASIC:return e.jsx(We,{register:r});case l.API_KEY:return e.jsx(ze,{register:r});case l.HMAC:return e.jsx(Fe,{register:r,watch:t,setValue:o});default:const u=s;throw new Error(`Unhandled auth method: ${u}`)}case n.GITHUB:return e.jsx(P,{register:r});case n.LINEAR:return e.jsx(P,{register:r,secretPlaceholder:"lin_wh_..."});case n.STRIPE:return e.jsx(P,{register:r,secretPlaceholder:"whsec_..."});case n.SLACK:return e.jsx(P,{register:r,helpText:"You can find your signing secret in the Basic Information panel of your Slack app settings.",helpLink:"https://docs.slack.dev/authentication/verifying-requests-from-slack/#validating-a-request"});case n.SVIX:return e.jsx(P,{register:r,secretLabel:"Svix Signing Secret",secretPlaceholder:"whsec_...",helpText:"You can find your signing secret in the Svix dashboard under the endpoint's settings."});default:const h=a;throw new Error(`Unhandled source name: ${h}`)}};function De(s){return B({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M3.03509 12.9431C3.24245 14.9227 4.10472 16.8468 5.62188 18.364C7.13904 19.8811 9.0631 20.7434 11.0428 20.9508L3.03509 12.9431Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3 11.4938L12.4921 20.9858C13.2976 20.9407 14.0981 20.7879 14.8704 20.5273L3.4585 9.11548C3.19793 9.88771 3.0451 10.6883 3 11.4938Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3.86722 8.10999L15.8758 20.1186C16.4988 19.8201 17.0946 19.4458 17.6493 18.9956L4.99021 6.33659C4.54006 6.89125 4.16573 7.487 3.86722 8.10999Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M5.66301 5.59517C9.18091 2.12137 14.8488 2.135 18.3498 5.63604C21.8508 9.13708 21.8645 14.8049 18.3907 18.3228L5.66301 5.59517Z",fill:"currentColor"},child:[]}]})(s)}function qe(s){return B({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M155.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C298.3 7.2 251.1 0 203.8 0 88.1 0 11 60.4 11 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5a396.09 396.09 0 0 0 156 32.4c118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9z"},child:[]}]})(s)}function _e(s){return B({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"},child:[]}]})(s)}const Be=({className:s})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 230 230",fill:"currentColor",className:s,"aria-hidden":"true",focusable:"false",children:[e.jsx("g",{transform:"translate(10.7,10.6)",children:e.jsx("path",{d:"M208.8 104.4c0 57.6-46.8 104.4-104.4 104.4c-57.6 0-104.4-46.8-104.4-104.4c0-57.6 46.8-104.4 104.4-104.4c57.6 0 104.4 46.8 104.4 104.4Zm-125 42.4c-7.2-16.1-23.3-26.8-41-27.2c-11.7-0.3-22.8 3-31.8 9.1c-2.1-8.3-3.2-17-3.1-26c1-53.2 44.9-95.7 98.2-94.8c35 .7 65.3 19.8 81.7 48c-4.9 5.4-12.8 8.6-21.2 8.3c-8.1-0.2-15.5-5.1-18.8-12.5c-7.3-16.1-23.4-26.8-41-27.2c-8.2-0.2-16.2 1.9-23.3 5.9c-24.5 13.7-32 47-14.3 69.3c8 10.1 20.2 16.2 34.2 17.2c7.3 .5 12.8 3.1 16.5 7.7c6.6 8.4 5.6 21.6-2.1 28.9c-4.1 3.9-9.5 6-15.1 5.8c-8.1-0.2-15.5-5.1-18.9-12.5Zm82.2-57.7c-17.3-0.8-33.5-10.4-41-27.1c-3.4-7.4-10.8-12.3-18.9-12.5c-17.1-0.5-28 21.1-17.2 34.7c3.7 4.6 9.2 7.2 16.5 7.7c14 1 26.1 7.1 34.1 17.2c14.7 18.4 12.6 46.3-4.4 62.5c-20.6 19.5-54.8 15.6-70.4-7.9c-1.4-2.1-2.6-4.3-3.7-6.6c-3.3-7.4-10.7-12.3-18.8-12.5c-8.4-0.2-16.2 3-21.2 8.3c16.4 28.2 46.7 47.4 81.7 48c53.3 .9 97.2-41.5 98.2-94.8c.1-9-1-17.7-3.1-26c.4 1.8-13.4 6.6-15 7c-5.5 1.6-11.2 2.3-16.8 2Z",fillRule:"evenodd"})}),e.jsx("ellipse",{cx:"115",cy:"115",rx:"104.5",ry:"104.5",fill:"none",stroke:"currentColor",strokeWidth:"20"})]}),_=({sourceName:s})=>{switch(s){case n.GENERIC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(ne,{className:"size-4"}),"Generic"]});case n.GITHUB:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(xe,{className:"size-4"}),"GitHub"]});case n.STRIPE:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(qe,{className:"size-4"}),"Stripe"]});case n.SLACK:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(_e,{className:"size-4"}),"Slack"]});case n.LINEAR:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(De,{className:"size-4"}),"Linear"]});case n.SVIX:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Be,{className:"size-4"}),"Svix"]});default:const a=s;throw new Error(`Unhandled source: ${a}`)}},z=s=>{const a=he(),{tenantId:r}=me(),{tenant:t}=ue(),{data:o,isLoading:h,error:u}=pe({...H.v1Webhooks.list(r)}),{mutate:E,isPending:m}=U({mutationFn:async({webhookName:i})=>D.v1WebhookDelete(r,i),onSuccess:async()=>{s&&s();const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),{mutate:p,isPending:g}=U({mutationFn:async i=>D.v1WebhookCreate(r,i),onSuccess:async()=>{const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),{mutate:c,isPending:y}=U({mutationFn:async({webhookName:i,webhookData:w})=>D.v1WebhookUpdate(r,i,w),onSuccess:async()=>{const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),j=i=>{const w=`/api/v1/stable/tenants/${r}/webhooks/${i}`;return t!=null&&t.serverUrl?`${t.serverUrl}${w}`:`${window.location.protocol}//${window.location.hostname}${w}`};return{data:(o==null?void 0:o.rows)||[],isLoading:h,error:u,createWebhookURL:j,mutations:{deleteWebhook:E,isDeletePending:m,createWebhook:p,isCreatePending:g,updateWebhook:c,isUpdatePending:y}}},re=f().optional().refine(s=>{if(!s||s.trim()==="")return!0;try{return JSON.parse(s),!0}catch{return!1}},{message:"Must be valid JSON"}),Ve=V({sourceName:I(n),name:f().min(1,"Name expression is required"),eventKeyExpression:f().min(1,"Event key expression is required"),scopeExpression:f().optional(),staticPayload:re,returnEventAsResponsePayload:$().optional(),authType:I(l),username:f().optional(),password:f().optional(),headerName:f().optional(),apiKey:f().optional(),signingSecret:f().optional(),algorithm:I(C).optional(),encoding:I(k).optional(),signatureHeaderName:f().optional()}),$e=V({eventKeyExpression:f().min(1,"Event key expression is required"),scopeExpression:f().optional(),staticPayload:re,returnEventAsResponsePayload:$().optional()}),Ge=({webhook:s})=>{const{mutations:a,createWebhookURL:r}=z(()=>u(!1)),[t,o]=b.useState(!1),[h,u]=b.useState(!1),[E,m]=b.useState(!1),p=r(s.name),g=c=>{navigator.clipboard.writeText(c),o(!0),setTimeout(()=>o(!1),1e3),setTimeout(()=>u(!1),400)};return e.jsxs(e.Fragment,{children:[e.jsxs(ge,{open:h,onOpenChange:u,children:[e.jsx(ye,{asChild:!0,children:e.jsx(S,{variant:"icon",size:"sm",children:e.jsx(je,{className:"size-4 cursor-pointer text-muted-foreground"})})}),e.jsxs(fe,{align:"end",children:[e.jsxs(q,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),u(!1),m(!0)},children:[e.jsx(Ne,{className:"size-4"}),"Edit"]}),e.jsxs(q,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),g(p)},children:[t?e.jsx(G,{className:"size-4 text-green-600"}):e.jsx(O,{className:"size-4"}),"Copy Webhook URL"]}),e.jsxs(q,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),a.deleteWebhook({webhookName:s.name})},disabled:a.isDeletePending,children:[a.isDeletePending?e.jsx(Te,{className:"size-4 animate-spin"}):e.jsx(ve,{className:"size-4"}),"Delete"]})]})]}),e.jsx(Ze,{webhook:s,open:E,onOpenChange:m})]})};function as(){const{data:s,isLoading:a}=z(),r=b.useMemo(()=>[{columnLabel:"Name",cellRenderer:t=>e.jsx("div",{className:"w-full",children:t.name})},{columnLabel:"Source",cellRenderer:t=>e.jsx("div",{className:"w-full",children:e.jsx(_,{sourceName:t.sourceName})})},{columnLabel:"Event Key",cellRenderer:t=>{const o=t.eventKeyExpression||"",h=o.length>25?`${o.slice(0,25)}...`:o;return e.jsx("code",{className:"rounded bg-muted px-2 py-1 text-xs",title:o,children:h})}},{columnLabel:"Scope",cellRenderer:t=>{if(!t.scopeExpression)return e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"});const o=t.scopeExpression,h=o.length>25?`${o.slice(0,25)}...`:o;return e.jsx("code",{className:"rounded bg-muted px-2 py-1 text-xs",title:o,children:h})}},{columnLabel:"Auth Method",cellRenderer:t=>e.jsx("div",{className:"w-full",children:e.jsx(T,{authMethod:t.authType})})},{columnLabel:"Actions",cellRenderer:t=>e.jsx(Ge,{webhook:t})}],[]);return a?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 flex w-full flex-row justify-end",children:e.jsx(Ye,{})}),s&&s.length>0?e.jsx(be,{columns:r,data:s,rowKey:t=>t.metadata.id}):e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[e.jsx("p",{className:"text-lg font-semibold",children:"No webhooks found"}),e.jsx("div",{className:"w-fit",children:e.jsx(Ee,{doc:we.v1.webhooks,label:"Learn about triggering runs from webhooks"})})]})]})}const oe=s=>{if(!(!s||s.trim()===""))try{return JSON.parse(s)}catch{throw new Error("Static payload must be valid JSON")}},Oe=s=>{const a={scopeExpression:s.scopeExpression||void 0,staticPayload:oe(s.staticPayload),returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0};switch(s.sourceName){case n.GENERIC:switch(s.authType){case l.BASIC:if(!s.username||!s.password)throw new Error("Username and password are required for basic auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{username:s.username,password:s.password}};case l.API_KEY:if(!s.headerName||!s.apiKey)throw new Error("Header name and API key are required for API key auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{headerName:s.headerName,apiKey:s.apiKey}};case l.HMAC:if(!s.algorithm||!s.encoding||!s.signatureHeaderName||!s.signingSecret)throw new Error("Algorithm, encoding, signature header name, and signing secret are required for HMAC auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{algorithm:s.algorithm,encoding:s.encoding,signatureHeaderName:s.signatureHeaderName,signingSecret:s.signingSecret}};default:const t=s.authType;throw new Error(`Unhandled auth type: ${t}`)}case n.GITHUB:if(!s.signingSecret)throw new Error("Signing secret is required for GitHub webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"X-Hub-Signature-256",signingSecret:s.signingSecret}};case n.LINEAR:if(!s.signingSecret)throw new Error("Signing secret is required for Linear webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"linear-signature",signingSecret:s.signingSecret}};case n.STRIPE:if(!s.signingSecret)throw new Error("Signing secret is required for Stripe webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"Stripe-Signature",signingSecret:s.signingSecret}};case n.SLACK:if(!s.signingSecret)throw new Error("signing secret is required for Slack webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"X-Slack-Signature",signingSecret:s.signingSecret}};case n.SVIX:if(!s.signingSecret)throw new Error("signing secret is required for Svix webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.BASE64,signatureHeaderName:"svix-signature",signingSecret:s.signingSecret}};default:const r=s.sourceName;throw new Error(`Unhandled source name: ${r}`)}},Xe=s=>{switch(s){case n.GENERIC:return"(receive incoming webhook requests from any service)";case n.GITHUB:case n.LINEAR:case n.STRIPE:case n.SLACK:case n.SVIX:return"";default:const a=s;throw new Error(`Unhandled source name: ${a}`)}},Je=({sourceName:s})=>{switch(s){case n.GITHUB:return e.jsxs("div",{className:"ml-1 flex flex-row items-center gap-x-2",children:[e.jsx(ke,{className:"size-4 text-yellow-500"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Select ",e.jsx("span",{className:"font-semibold",children:"application/json"})," as the content type in your GitHub webhook settings."]})]});case n.GENERIC:case n.LINEAR:case n.STRIPE:case n.SLACK:case n.SVIX:return"";default:const a=s;throw new Error(`Unhandled source name: ${a}`)}},Ye=()=>{const{mutations:s,createWebhookURL:a}=z(),{createWebhook:r,isCreatePending:t}=s,[o,h]=b.useState(!1),[u,E]=b.useState(!1),{register:m,handleSubmit:p,watch:g,setValue:c,reset:y,formState:{errors:j}}=X({resolver:J(Ve),defaultValues:{sourceName:n.GENERIC,authType:l.BASIC,name:"",eventKeyExpression:"input.id",username:"",password:"",returnEventAsResponsePayload:!0}}),i=g("sourceName"),w=g("authType"),A=g("name"),F=g("eventKeyExpression"),ie=g("returnEventAsResponsePayload");b.useEffect(()=>{i===n.SLACK&&!F?c("eventKeyExpression","input.type"):i===n.GENERIC&&!F&&c("eventKeyExpression","input.id")},[i,F,c]);const ce=b.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(a(A)),E(!0),setTimeout(()=>E(!1),2e3)}catch(x){console.error("Failed to copy URL:",x)}},[A,a]),le=b.useCallback(x=>{const de=Oe(x);r(de,{onSuccess:()=>{h(!1),y()}})},[r,y]);return e.jsxs(Y,{open:o,onOpenChange:x=>{h(x),x||(y(),E(!1))},children:[e.jsx(Se,{asChild:!0,children:e.jsx(S,{variant:"cta",children:"Create Webhook"})}),e.jsxs(Z,{className:"max-h-[90dvh] max-w-[90%] overflow-y-auto md:max-w-[80%] lg:max-w-[60%] xl:max-w-[50%]",children:[e.jsx(Q,{children:e.jsxs(ee,{className:"flex flex-col items-start gap-y-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-x-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-blue-100",children:e.jsx(ne,{className:"size-4 text-indigo-700"})}),"Create a webhook"]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Webhooks are a beta feature"})]})}),e.jsxs("form",{onSubmit:p(le),className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"name",className:"text-sm font-medium",children:["Webhook Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"name",placeholder:"test-webhook",...m("name"),className:"h-10"}),j.name&&e.jsx("p",{className:"text-xs text-red-500",children:j.name.message}),e.jsxs("div",{className:"flex flex-col items-start gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"",children:"Send incoming webhook requests to:"}),e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx("code",{className:"max-w-full rounded bg-muted px-2 py-1 font-mono text-xs",children:a(A)}),e.jsx(S,{type:"button",variant:"icon",size:"xs",onClick:ce,className:"flex-shrink-0",disabled:!A,children:u?e.jsx(G,{className:"size-4 text-green-600"}):e.jsx(O,{className:"size-4"})})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"sourceName",className:"text-sm font-medium",children:["Source ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(R,{value:i,onValueChange:x=>c("sourceName",x),children:[e.jsx(L,{children:e.jsx(M,{children:e.jsx(_,{sourceName:i})})}),e.jsxs(W,{children:[Object.values(n).map(x=>e.jsx(N,{value:x,className:"h-10",children:e.jsxs("div",{className:"flex h-10 flex-row items-center gap-x-2",children:[e.jsx(_,{sourceName:x}),e.jsx("span",{className:"max-w-full truncate text-sm",children:Xe(x)})]})},x)),e.jsx(N,{disabled:!0,value:"reach-out",className:"text-sm data-[disabled]:text-white data-[disabled]:opacity-100",children:e.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(He,{className:"size-4 text-yellow-500"}),e.jsx("span",{children:"Want a new source added? Reach out to support"})]})},"empty")]})]}),e.jsx(Je,{sourceName:i})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"eventKeyExpression",className:"text-sm font-medium",children:["Event Key Expression ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{id:"eventKeyExpression",placeholder:"input.id",...m("eventKeyExpression"),className:"h-10"}),j.eventKeyExpression&&e.jsx("p",{className:"text-xs text-red-500",children:j.eventKeyExpression.message}),e.jsxs("div",{className:"pl-1 text-xs text-muted-foreground",children:[e.jsxs("p",{children:["CEL expression to extract the event key from the webhook payload. See"," ",e.jsx("a",{href:"https://cel.dev/",className:"text-blue-600",target:"_blank",rel:"noopener noreferrer",children:"the docs"})," ","for details."]}),e.jsxs("ul",{className:"list-disc pl-4",children:[e.jsx("li",{children:"`input` refers to the payload"}),e.jsx("li",{children:"`headers` refers to the headers"})]}),i===n.SLACK&&e.jsx("div",{className:"mt-2 rounded-md border border-border bg-muted p-3",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["For Slack webhooks, the event key expression"," ",e.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-foreground",children:"input.type"})," ","works well since Slack interactive payloads don't have a top-level `id` field."]})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"scopeExpression",className:"text-sm font-medium",children:["Scope Expression"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx(v,{id:"scopeExpression",placeholder:"input.organization_id",...m("scopeExpression"),className:"h-10"}),j.scopeExpression&&e.jsx("p",{className:"text-xs text-red-500",children:j.scopeExpression.message}),e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsx("p",{children:"CEL expression to extract the scope from the webhook payload. Used to filter which workflows to trigger based on event filters."})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"staticPayload",className:"text-sm font-medium",children:["Static Payload"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx("textarea",{id:"staticPayload",placeholder:'{"source": "webhook", "version": "v1"}',...m("staticPayload"),className:"h-24 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),j.staticPayload&&e.jsx("p",{className:"text-xs text-red-500",children:j.staticPayload.message}),e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsx("p",{children:"JSON object to merge into the webhook payload. Static payload fields take precedence over incoming payload fields."})})]}),e.jsxs("div",{className:"flex flex-row items-center justify-between rounded-lg border border-border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(d,{htmlFor:"returnEventAsResponsePayload",className:"text-sm font-medium",children:"Return event as response payload"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, the triggered event will be returned as the HTTP response body. Otherwise, the response will be an empty 204 OK."})]}),e.jsx(te,{id:"returnEventAsResponsePayload",checked:ie??!0,onCheckedChange:x=>c("returnEventAsResponsePayload",x)})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-4 border-l-2 border-gray-200 pl-4",children:[i===n.GENERIC&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"authType",className:"text-sm font-medium",children:"Authentication Type"}),e.jsxs(R,{value:w,onValueChange:x=>c("authType",x),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:l.BASIC,children:e.jsx(T,{authMethod:l.BASIC})}),e.jsx(N,{value:l.API_KEY,children:e.jsx(T,{authMethod:l.API_KEY})}),e.jsx(N,{value:l.HMAC,children:e.jsx(T,{authMethod:l.HMAC})})]})]})]}),e.jsx(Ue,{authMethod:w,sourceName:i,register:m,watch:g,setValue:c})]})}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(se,{asChild:!0,children:e.jsx(S,{type:"button",variant:"outline",children:"Cancel"})}),e.jsxs(S,{type:"submit",disabled:t,children:[t&&e.jsx(ae,{}),"Create Webhook"]})]})]})]})]})},Ze=({webhook:s,open:a,onOpenChange:r})=>{const{mutations:t}=z(),{register:o,handleSubmit:h,watch:u,setValue:E,reset:m,formState:{errors:p}}=X({resolver:J($e),defaultValues:{eventKeyExpression:s.eventKeyExpression||"",scopeExpression:s.scopeExpression||"",staticPayload:s.staticPayload?JSON.stringify(s.staticPayload,null,2):"",returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0}}),g=u("returnEventAsResponsePayload");b.useEffect(()=>{a&&m({eventKeyExpression:s.eventKeyExpression||"",scopeExpression:s.scopeExpression||"",staticPayload:s.staticPayload?JSON.stringify(s.staticPayload,null,2):"",returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0})},[s,a,m]);const c=b.useCallback(y=>{const j=oe(y.staticPayload);t.updateWebhook({webhookName:s.name,webhookData:{eventKeyExpression:y.eventKeyExpression,scopeExpression:y.scopeExpression??"",staticPayload:j??{},returnEventAsResponsePayload:y.returnEventAsResponsePayload??!0}},{onSuccess:()=>{r(!1)}})},[t,s.name,r]);return e.jsx(Y,{open:a,onOpenChange:r,children:e.jsxs(Z,{className:"max-w-lg",children:[e.jsx(Q,{children:e.jsxs(ee,{children:["Edit Webhook: ",s.name]})}),e.jsxs("form",{onSubmit:h(c),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-eventKeyExpression",className:"text-sm font-medium",children:["Event Key Expression ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{id:"edit-eventKeyExpression",placeholder:"input.id",...o("eventKeyExpression"),className:"h-10"}),p.eventKeyExpression&&e.jsx("p",{className:"text-xs text-red-500",children:p.eventKeyExpression.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CEL expression to extract the event key from the webhook payload."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-scopeExpression",className:"text-sm font-medium",children:["Scope Expression"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx(v,{id:"edit-scopeExpression",placeholder:"input.organization_id",...o("scopeExpression"),className:"h-10"}),p.scopeExpression&&e.jsx("p",{className:"text-xs text-red-500",children:p.scopeExpression.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CEL expression to extract the scope for event filtering."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-staticPayload",className:"text-sm font-medium",children:["Static Payload"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx("textarea",{id:"edit-staticPayload",placeholder:'{"source": "webhook", "version": "v1"}',...o("staticPayload"),className:"h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),p.staticPayload&&e.jsx("p",{className:"text-xs text-red-500",children:p.staticPayload.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"JSON object to merge into the webhook payload."})]}),e.jsxs("div",{className:"flex flex-row items-center justify-between rounded-lg border border-border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(d,{htmlFor:"edit-returnEventAsResponsePayload",className:"text-sm font-medium",children:"Return event as response payload"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, the triggered event will be returned as the HTTP response body. Otherwise, the response will be an empty 204 OK."})]}),e.jsx(te,{id:"edit-returnEventAsResponsePayload",checked:g??!0,onCheckedChange:y=>E("returnEventAsResponsePayload",y)})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(se,{asChild:!0,children:e.jsx(S,{type:"button",variant:"outline",children:"Cancel"})}),e.jsxs(S,{type:"submit",disabled:t.isUpdatePending,children:[t.isUpdatePending&&e.jsx(ae,{}),"Save Changes"]})]})]})]})})};export{Ze as EditWebhookModal,as as default}; diff --git a/hatchetembed/dashboard/assets/index-C8__5p50.js b/hatchetembed/dashboard/assets/index-C8__5p50.js new file mode 100644 index 0000000000..da0c5d6ed9 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-C8__5p50.js @@ -0,0 +1 @@ +import{cF as t}from"./index-wypz6hY5.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new C.Error().stack;i&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[i]="1c348f9d-2b9a-40c7-9ef9-ce5429e229f9",C._sentryDebugIdIdentifier="sentry-dbid-1c348f9d-2b9a-40c7-9ef9-ce5429e229f9")}catch{}})();function H(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 18V20H19V22H13C11.8954 22 11 21.1046 11 20V18H8C5.79086 18 4 16.2091 4 14V7C4 6.44772 4.44772 6 5 6H8V2H10V6H14V2H16V6H19C19.5523 6 20 6.44772 20 7V14C20 16.2091 18.2091 18 16 18H13ZM8 16H16C17.1046 16 18 15.1046 18 14V11H6V14C6 15.1046 6.89543 16 8 16ZM18 8H6V9H18V8ZM12 14.5C11.4477 14.5 11 14.0523 11 13.5C11 12.9477 11.4477 12.5 12 12.5C12.5523 12.5 13 12.9477 13 13.5C13 14.0523 12.5523 14.5 12 14.5Z"},child:[]}]})(C)}function l(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z"},child:[]}]})(C)}function n(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM13 12H17V14H11V7H13V12Z"},child:[]}]})(C)}function a(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3.33946 17.0002C2.90721 16.2515 2.58277 15.4702 2.36133 14.6741C3.3338 14.1779 3.99972 13.1668 3.99972 12.0002C3.99972 10.8345 3.3348 9.824 2.36353 9.32741C2.81025 7.71651 3.65857 6.21627 4.86474 4.99001C5.7807 5.58416 6.98935 5.65534 7.99972 5.072C9.01009 4.48866 9.55277 3.40635 9.4962 2.31604C11.1613 1.8846 12.8847 1.90004 14.5031 2.31862C14.4475 3.40806 14.9901 4.48912 15.9997 5.072C17.0101 5.65532 18.2187 5.58416 19.1346 4.99007C19.7133 5.57986 20.2277 6.25151 20.66 7.00021C21.0922 7.7489 21.4167 8.53025 21.6381 9.32628C20.6656 9.82247 19.9997 10.8336 19.9997 12.0002C19.9997 13.166 20.6646 14.1764 21.6359 14.673C21.1892 16.2839 20.3409 17.7841 19.1347 19.0104C18.2187 18.4163 17.0101 18.3451 15.9997 18.9284C14.9893 19.5117 14.4467 20.5941 14.5032 21.6844C12.8382 22.1158 11.1148 22.1004 9.49633 21.6818C9.55191 20.5923 9.00929 19.5113 7.99972 18.9284C6.98938 18.3451 5.78079 18.4162 4.86484 19.0103C4.28617 18.4205 3.77172 17.7489 3.33946 17.0002ZM8.99972 17.1964C10.0911 17.8265 10.8749 18.8227 11.2503 19.9659C11.7486 20.0133 12.2502 20.014 12.7486 19.9675C13.1238 18.8237 13.9078 17.8268 14.9997 17.1964C16.0916 16.5659 17.347 16.3855 18.5252 16.6324C18.8146 16.224 19.0648 15.7892 19.2729 15.334C18.4706 14.4373 17.9997 13.2604 17.9997 12.0002C17.9997 10.74 18.4706 9.5632 19.2729 8.6665C19.1688 8.4405 19.0538 8.21822 18.9279 8.00021C18.802 7.78219 18.667 7.57148 18.5233 7.36842C17.3457 7.61476 16.0911 7.43414 14.9997 6.80405C13.9083 6.17395 13.1246 5.17768 12.7491 4.03455C12.2509 3.98714 11.7492 3.98646 11.2509 4.03292C10.8756 5.17671 10.0916 6.17364 8.99972 6.80405C7.9078 7.43447 6.65245 7.61494 5.47428 7.36803C5.18485 7.77641 4.93463 8.21117 4.72656 8.66637C5.52881 9.56311 5.99972 10.74 5.99972 12.0002C5.99972 13.2604 5.52883 14.4372 4.72656 15.3339C4.83067 15.5599 4.94564 15.7822 5.07152 16.0002C5.19739 16.2182 5.3324 16.4289 5.47612 16.632C6.65377 16.3857 7.90838 16.5663 8.99972 17.1964ZM11.9997 15.0002C10.3429 15.0002 8.99972 13.6571 8.99972 12.0002C8.99972 10.3434 10.3429 9.00021 11.9997 9.00021C13.6566 9.00021 14.9997 10.3434 14.9997 12.0002C14.9997 13.6571 13.6566 15.0002 11.9997 15.0002ZM11.9997 13.0002C12.552 13.0002 12.9997 12.5525 12.9997 12.0002C12.9997 11.4479 12.552 11.0002 11.9997 11.0002C11.4474 11.0002 10.9997 11.4479 10.9997 12.0002C10.9997 12.5525 11.4474 13.0002 11.9997 13.0002Z"},child:[]}]})(C)}function e(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4C3 3.44772 3.44772 3 4 3H10C10.5523 3 11 3.44772 11 4V10C11 10.5523 10.5523 11 10 11H4C3.44772 11 3 10.5523 3 10V4ZM3 14C3 13.4477 3.44772 13 4 13H10C10.5523 13 11 13.4477 11 14V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V14ZM13 4C13 3.44772 13.4477 3 14 3H20C20.5523 3 21 3.44772 21 4V10C21 10.5523 20.5523 11 20 11H14C13.4477 11 13 10.5523 13 10V4ZM13 14C13 13.4477 13.4477 13 14 13H20C20.5523 13 21 13.4477 21 14V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V14ZM15 5V9H19V5H15ZM15 15V19H19V15H15ZM5 5V9H9V5H5ZM5 15V19H9V15H5Z"},child:[]}]})(C)}function o(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 4V6H20L15 13.5V22H9V13.5L4 6H3V4H21ZM6.4037 6L11 12.8944V20H13V12.8944L17.5963 6H6.4037Z"},child:[]}]})(C)}function c(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z"},child:[]}]})(C)}function d(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 18.3915V5.60846L18.2264 12L8 18.3915ZM6 3.80421V20.1957C6 20.9812 6.86395 21.46 7.53 21.0437L20.6432 12.848C21.2699 12.4563 21.2699 11.5436 20.6432 11.152L7.53 2.95621C6.86395 2.53993 6 3.01878 6 3.80421Z"},child:[]}]})(C)}function L(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM18 17V10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10V17H18ZM9 21H15V23H9V21Z"},child:[]}]})(C)}function u(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M7 3V6H3V8H7V11H9V3H7ZM11 8H21V6H11V8ZM17 13V16H21V18H17V21H15V13H17ZM13 18H3V16H13V18Z"},child:[]}]})(C)}function M(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19.7134 8.12811L19.4668 8.69379C19.2864 9.10792 18.7136 9.10792 18.5331 8.69379L18.2866 8.12811C17.8471 7.11947 17.0555 6.31641 16.0677 5.87708L15.308 5.53922C14.8973 5.35653 14.8973 4.75881 15.308 4.57612L16.0252 4.25714C17.0384 3.80651 17.8442 2.97373 18.2761 1.93083L18.5293 1.31953C18.7058 0.893489 19.2942 0.893489 19.4706 1.31953L19.7238 1.93083C20.1558 2.97373 20.9616 3.80651 21.9748 4.25714L22.6919 4.57612C23.1027 4.75881 23.1027 5.35653 22.6919 5.53922L21.9323 5.87708C20.9445 6.31641 20.1529 7.11947 19.7134 8.12811ZM15 21.5386L9 7.53861L6.6594 13H1V11H5.3406L9 2.46143L15 16.4614L17.3406 11H23V13H18.6594L15 21.5386Z"},child:[]}]})(C)}function Z(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 3C15.5523 3 16 3.44772 16 4V8C16 8.55228 15.5523 9 15 9H13V11H17C17.5523 11 18 11.4477 18 12V15H20C20.5523 15 21 15.4477 21 16V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V16C13 15.4477 13.4477 15 14 15H16V13H8V15H10C10.5523 15 11 15.4477 11 16V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V16C3 15.4477 3.44772 15 4 15H6V12C6 11.4477 6.44772 11 7 11H11V9H9C8.44772 9 8 8.55228 8 8V4C8 3.44772 8.44772 3 9 3H15ZM9 17H5V19H9V17ZM19 17H15V19H19V17ZM14 5H10V7H14V5Z"},child:[]}]})(C)}function h(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8.86874 14.1392C8.6556 14.4912 8.55014 14.7778 8.72043 15.2253C9.1905 16.4613 8.52737 17.664 7.28097 17.9905C6.10556 18.2985 4.96035 17.526 4.72713 16.2676C4.52048 15.1537 5.38488 14.0617 6.61294 13.8877C6.67963 13.8781 6.74717 13.874 6.83351 13.8688C6.88044 13.866 6.93293 13.8628 6.99384 13.8582L8.86194 10.7257C7.687 9.55742 6.98767 8.19164 7.14246 6.49936C7.25188 5.30308 7.72226 4.26933 8.58208 3.42201C10.2288 1.79945 12.7411 1.53667 14.68 2.78212C16.5423 3.97841 17.3951 6.30867 16.6681 8.30311L14.9611 7.84C15.1895 6.73115 15.0206 5.73536 14.2727 4.88234C13.7786 4.31914 13.1446 4.02394 12.4236 3.91516C10.9783 3.69681 9.55922 4.6254 9.13816 6.04399C8.66019 7.65406 9.38355 8.96924 11.3603 9.96029C10.5311 11.3541 9.70859 12.7518 8.86874 14.1392ZM13.7838 8.27337C14.3816 9.32798 14.9886 10.3986 15.5902 11.4593C18.631 10.5186 20.9237 12.2018 21.7462 14.004C22.7396 16.1809 22.0605 18.7593 20.1094 20.1023C18.1067 21.481 15.5741 21.2454 13.7997 19.4744L15.1919 18.3094C16.9444 19.4445 18.4772 19.3911 19.6151 18.047C20.5855 16.9003 20.5644 15.1906 19.5659 14.068C18.4136 12.7726 16.8701 12.7331 15.0044 13.9767C14.2305 12.6037 13.443 11.2413 12.6936 9.85845C12.4409 9.39233 12.1618 9.12196 11.5923 9.0233C10.6411 8.85839 10.027 8.04157 9.99016 7.12642C9.95395 6.22138 10.4871 5.4033 11.3205 5.08455C12.146 4.7688 13.1148 5.02367 13.6701 5.72554C14.1239 6.29901 14.2681 6.94443 14.0293 7.65167C13.9843 7.7852 13.9304 7.91584 13.8713 8.05885C13.8431 8.12694 13.8138 8.19801 13.7838 8.27337ZM11.552 16.895H15.2126C15.2636 16.963 15.3113 17.0303 15.3579 17.0959C15.4551 17.233 15.5474 17.3632 15.6551 17.4788C16.4304 18.3077 17.7395 18.3489 18.5682 17.5795C19.4271 16.7821 19.466 15.4426 18.6544 14.6101C17.8602 13.7955 16.5029 13.7177 15.7655 14.5802C15.3176 15.1044 14.8586 15.166 14.2641 15.1567C12.7414 15.1332 11.2177 15.149 9.69524 15.149C9.79406 17.2909 8.98436 18.6255 7.37841 18.9424C5.80582 19.2528 4.3575 18.4504 3.84759 16.9864C3.26842 15.3229 3.98467 13.9925 6.05421 12.9366C5.89847 12.3725 5.74115 11.8016 5.58541 11.236C3.32977 11.7276 1.63749 13.916 1.8122 16.378C1.96652 18.5514 3.71968 20.4815 5.86369 20.8273C7.02819 21.0153 8.12233 20.82 9.13741 20.2442C10.4433 19.5032 11.2011 18.3381 11.552 16.895Z"},child:[]}]})(C)}function f(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6.52739 14.5136C6.52739 15.5966 5.64264 16.4814 4.55959 16.4814C3.47654 16.4814 2.5918 15.5966 2.5918 14.5136C2.5918 13.4305 3.47654 12.5458 4.55959 12.5458H6.52739V14.5136ZM7.51892 14.5136C7.51892 13.4305 8.40366 12.5458 9.48671 12.5458C10.5698 12.5458 11.4545 13.4305 11.4545 14.5136V19.4407C11.4545 20.5238 10.5698 21.4085 9.48671 21.4085C8.40366 21.4085 7.51892 20.5238 7.51892 19.4407V14.5136ZM9.48671 6.52715C8.40366 6.52715 7.51892 5.6424 7.51892 4.55935C7.51892 3.4763 8.40366 2.59155 9.48671 2.59155C10.5698 2.59155 11.4545 3.4763 11.4545 4.55935V6.52715H9.48671ZM9.48671 7.51867C10.5698 7.51867 11.4545 8.40342 11.4545 9.48647C11.4545 10.5695 10.5698 11.4543 9.48671 11.4543H4.55959C3.47654 11.4543 2.5918 10.5695 2.5918 9.48647C2.5918 8.40342 3.47654 7.51867 4.55959 7.51867H9.48671ZM17.4732 9.48647C17.4732 8.40342 18.3579 7.51867 19.4409 7.51867C20.524 7.51867 21.4087 8.40342 21.4087 9.48647C21.4087 10.5695 20.524 11.4543 19.4409 11.4543H17.4732V9.48647ZM16.4816 9.48647C16.4816 10.5695 15.5969 11.4543 14.5138 11.4543C13.4308 11.4543 12.546 10.5695 12.546 9.48647V4.55935C12.546 3.4763 13.4308 2.59155 14.5138 2.59155C15.5969 2.59155 16.4816 3.4763 16.4816 4.55935V9.48647ZM14.5138 17.4729C15.5969 17.4729 16.4816 18.3577 16.4816 19.4407C16.4816 20.5238 15.5969 21.4085 14.5138 21.4085C13.4308 21.4085 12.546 20.5238 12.546 19.4407V17.4729H14.5138ZM14.5138 16.4814C13.4308 16.4814 12.546 15.5966 12.546 14.5136C12.546 13.4305 13.4308 12.5458 14.5138 12.5458H19.4409C20.524 12.5458 21.4087 13.4305 21.4087 14.5136C21.4087 15.5966 20.524 16.4814 19.4409 16.4814H14.5138Z"},child:[]}]})(C)}function s(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z"},child:[]}]})(C)}function g(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19.3034 5.33716C17.9344 4.71103 16.4805 4.2547 14.9629 4C14.7719 4.32899 14.5596 4.77471 14.411 5.12492C12.7969 4.89144 11.1944 4.89144 9.60255 5.12492C9.45397 4.77471 9.2311 4.32899 9.05068 4C7.52251 4.2547 6.06861 4.71103 4.70915 5.33716C1.96053 9.39111 1.21766 13.3495 1.5891 17.2549C3.41443 18.5815 5.17612 19.388 6.90701 19.9187C7.33151 19.3456 7.71356 18.73 8.04255 18.0827C7.41641 17.8492 6.82211 17.5627 6.24904 17.2231C6.39762 17.117 6.5462 17.0003 6.68416 16.8835C10.1438 18.4648 13.8911 18.4648 17.3082 16.8835C17.4568 17.0003 17.5948 17.117 17.7434 17.2231C17.1703 17.5627 16.576 17.8492 15.9499 18.0827C16.2789 18.73 16.6609 19.3456 17.0854 19.9187C18.8152 19.388 20.5875 18.5815 22.4033 17.2549C22.8596 12.7341 21.6806 8.80747 19.3034 5.33716ZM8.5201 14.8459C7.48007 14.8459 6.63107 13.9014 6.63107 12.7447C6.63107 11.5879 7.45884 10.6434 8.5201 10.6434C9.57071 10.6434 10.4303 11.5879 10.4091 12.7447C10.4091 13.9014 9.57071 14.8459 8.5201 14.8459ZM15.4936 14.8459C14.4535 14.8459 13.6034 13.9014 13.6034 12.7447C13.6034 11.5879 14.4323 10.6434 15.4936 10.6434C16.5442 10.6434 17.4038 11.5879 17.3825 12.7447C17.3825 13.9014 16.5548 14.8459 15.4936 14.8459Z"},child:[]}]})(C)}function p(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 8V20.9932C21 21.5501 20.5552 22 20.0066 22H3.9934C3.44495 22 3 21.556 3 21.0082V2.9918C3 2.45531 3.4487 2 4.00221 2H14.9968L21 8ZM19 9H14V4H5V20H19V9ZM8 7H11V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z"},child:[]}]})(C)}function w(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(C)}function x(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 18H18V6H6V18ZM14 20H10V22H8V20H5C4.44772 20 4 19.5523 4 19V16H2V14H4V10H2V8H4V5C4 4.44772 4.44772 4 5 4H8V2H10V4H14V2H16V4H19C19.5523 4 20 4.44772 20 5V8H22V10H20V14H22V16H20V19C20 19.5523 19.5523 20 19 20H16V22H14V20ZM8 8H16V16H8V8Z"},child:[]}]})(C)}function v(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20.0833 15.1999L21.2854 15.9212C21.5221 16.0633 21.5989 16.3704 21.4569 16.6072C21.4146 16.6776 21.3557 16.7365 21.2854 16.7787L12.5144 22.0412C12.1977 22.2313 11.8021 22.2313 11.4854 22.0412L2.71451 16.7787C2.47772 16.6366 2.40093 16.3295 2.54301 16.0927C2.58523 16.0223 2.64413 15.9634 2.71451 15.9212L3.9166 15.1999L11.9999 20.0499L20.0833 15.1999ZM20.0833 10.4999L21.2854 11.2212C21.5221 11.3633 21.5989 11.6704 21.4569 11.9072C21.4146 11.9776 21.3557 12.0365 21.2854 12.0787L11.9999 17.6499L2.71451 12.0787C2.47772 11.9366 2.40093 11.6295 2.54301 11.3927C2.58523 11.3223 2.64413 11.2634 2.71451 11.2212L3.9166 10.4999L11.9999 15.3499L20.0833 10.4999ZM12.5144 1.30864L21.2854 6.5712C21.5221 6.71327 21.5989 7.0204 21.4569 7.25719C21.4146 7.32757 21.3557 7.38647 21.2854 7.42869L11.9999 12.9999L2.71451 7.42869C2.47772 7.28662 2.40093 6.97949 2.54301 6.7427C2.58523 6.67232 2.64413 6.61343 2.71451 6.5712L11.4854 1.30864C11.8021 1.11864 12.1977 1.11864 12.5144 1.30864ZM11.9999 3.33233L5.88723 6.99995L11.9999 10.6676L18.1126 6.99995L11.9999 3.33233Z"},child:[]}]})(C)}function B(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM11 13V17H6V13H11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"},child:[]}]})(C)}export{d as R,M as a,p as b,B as c,n as d,h as e,v as f,e as g,x as h,u as i,o as j,a as k,Z as l,l as m,w as n,H as o,L as p,c as q,g as r,s,f as t}; diff --git a/hatchetembed/dashboard/assets/index-CFQLfotn.js b/hatchetembed/dashboard/assets/index-CFQLfotn.js new file mode 100644 index 0000000000..170a29a706 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CFQLfotn.js @@ -0,0 +1 @@ +import{j as o}from"./index-wypz6hY5.js";import{O as r}from"./index-CKuymrZy.js";import"./settings-page-header-Dal4BvfD.js";import"./support-chat-CGvrRU-a.js";import"./global-emitter-Y_aFw8Zc.js";import"./shard-deployment-key-CJfQX3l3.js";import"./accordion-CBy735bO.js";import"./index-zTXL414p.js";import"./switch-C23Bp5tT.js";import"./data-contracts-BsCw40yT.js";import"./tenant-wrapper-DXQKBTdd.js";import"./confirm-dialog-CMXood8J.js";import"./upgrade-required-BNScyCLS.js";import"./shield-check-lCThuR8D.js";import"./XMarkIcon-BazlLPpF.js";import"./KeyIcon-DY8qn5rN.js";import"./ExclamationTriangleIcon-CruVDzqB.js";import"./PlusIcon-Cn-pCVk3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d6ca350e-70e4-4012-b4d8-9262e5340c9d",t._sentryDebugIdIdentifier="sentry-dbid-d6ca350e-70e4-4012-b4d8-9262e5340c9d")}catch{}})();function h(){return o.jsx(r,{})}export{h as default}; diff --git a/hatchetembed/dashboard/assets/index-CKuymrZy.js b/hatchetembed/dashboard/assets/index-CKuymrZy.js new file mode 100644 index 0000000000..5b594a05b2 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CKuymrZy.js @@ -0,0 +1,8 @@ +import{v as kt,k as i,aT as wt,aU as Tt,aV as He,aW as Et,aX as qs,aY as Mt,aZ as Qs,a_ as Ye,a$ as Dt,b0 as Rt,aD as Lt,l as ze,C as Js,ae as At,y as _e,p as _,q as Ot,j as e,b1 as Ut,u as Zs,t as et,$ as xe,a0 as he,a1 as fe,L as I,I as $,b2 as st,a5 as le,a6 as ce,a7 as de,a8 as ue,a9 as q,B as v,S as Ke,e as Pt,o as ts,b3 as tt,b4 as Je,b5 as we,N as G,g as Ft,b as nt,aa as gs,b6 as It,b7 as zt,b8 as $s,b9 as at,s as z,ba as V,bb as rt,G as Te,_ as pe,bc as Fe,bd as Gt,A as qt,d as Qt,be as $t,bf as Vt,bg as Kt,bh as _t,bi as Bt,c as hs,P as ke,a2 as F,bj as Ce,aj as Ae,ah as Oe,ak as Ue,al as Z,J as Ge,bk as Ve,bl as vs,bm as Wt,ar as it,bn as Ht,bo as ot,bp as Yt,bq as Xe,br as Vs,bs as Xt,bt as Jt,bu as ye,bv as Ne,F as fs,m as Zt,bw as en,bx as sn,aI as tn,aJ as nn,aK as an,aL as rn,h as on,aH as js,x as ln}from"./index-wypz6hY5.js";import{S as lt}from"./settings-page-header-Dal4BvfD.js";import{u as cn}from"./support-chat-CGvrRU-a.js";import{g as Ze,T as dn}from"./global-emitter-Y_aFw8Zc.js";import{A as un,a as mn,b as xn,c as hn}from"./accordion-CBy735bO.js";import{S as ct}from"./switch-C23Bp5tT.js";import{T as oe,O as fn}from"./data-contracts-BsCw40yT.js";import{u as bs}from"./tenant-wrapper-DXQKBTdd.js";import{f as pn,s as gn}from"./shard-deployment-key-CJfQX3l3.js";import{C as ns}from"./confirm-dialog-CMXood8J.js";import{U as jn}from"./upgrade-required-BNScyCLS.js";import{S as vn}from"./shield-check-lCThuR8D.js";import{F as Ie}from"./XMarkIcon-BazlLPpF.js";import{F as bn}from"./KeyIcon-DY8qn5rN.js";import{F as dt}from"./ExclamationTriangleIcon-CruVDzqB.js";import{F as yn}from"./PlusIcon-Cn-pCVk3.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="ec3141b3-b119-4095-972b-d1b6b3a92d2c",s._sentryDebugIdIdentifier="sentry-dbid-ec3141b3-b119-4095-972b-d1b6b3a92d2c")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nn=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],as=kt("loader-circle",Nn);function Sn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const Cn=i.forwardRef(Sn);function kn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"}))}const Pe=i.forwardRef(kn);function wn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const es=i.forwardRef(wn);function Tn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}const En=i.forwardRef(Tn);function Mn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const me=i.forwardRef(Mn);function Dn(s){return wt(s,Date.now())}function Rn(s,t,n){const r=Rt(),l=(n==null?void 0:n.locale)??r.locale??Mt,o=2520,x=Tt(s,t);if(isNaN(x))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:x});let f,d;x>0?(f=He(t),d=He(s)):(f=He(s),d=He(t));const u=Et(d,f),p=(qs(d)-qs(f))/1e3,m=Math.round((u-p)/60);let h;if(m<2)return m===0?l.formatDistance("lessThanXMinutes",1,c):l.formatDistance("xMinutes",m,c);if(m<45)return l.formatDistance("xMinutes",m,c);if(m<90)return l.formatDistance("aboutXHours",1,c);if(m{await m(r,k.memberId).mutationFn()},onSuccess:()=>{Ot.invalidateQueries({queryKey:["tenant-member:list",r]}),l==null||l(),c(!1)},onError:k=>{f(k),c(!1)}}),j=s.role==="OWNER",b=!p||s.manually_added,S=b&&s.user.email!==(o==null?void 0:o.email)&&(d==null?void 0:d.allowInvites)&&!(u&&j),w=s.user.email===(o==null?void 0:o.email)&&(d==null?void 0:d.allowChangePassword),D=b&&s.user.email!==(o==null?void 0:o.email);return e.jsxs(e.Fragment,{children:[e.jsx(Ut,{row:s,actions:[...D?[{label:"Edit role",onClick:()=>n(s)}]:[],...w?[{label:"Change password",onClick:()=>t(s)}]:[],...S?[{label:"Remove from tenant",onClick:()=>c(!0)}]:[]]}),e.jsx(ns,{isOpen:x,title:"Remove member",description:`Are you sure you want to remove ${s.user.name} from this tenant?`,submitLabel:"Remove",onSubmit:()=>{h.mutate({memberId:s.metadata.id})},onCancel:()=>c(!1),isLoading:h.isPending})]})}const On=ts({role:tt(Je)});function Un({className:s,...t}){var x,c;const{handleSubmit:n,control:r,formState:{errors:l}}=Zs({resolver:et(On),defaultValues:{role:t.member.role}}),o=(c=(x=l.role)==null?void 0:x.message)==null?void 0:c.toString();return e.jsxs(xe,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(he,{children:e.jsx(fe,{children:"Update member role"})}),e.jsx("div",{className:Pt("grid gap-6",s),children:e.jsx("form",{onSubmit:n(f=>{t.onSubmit(f)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(I,{htmlFor:"name",children:"Name"}),e.jsx($,{readOnly:!0,id:"name",value:t.member.user.name||"",disabled:!0})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(I,{htmlFor:"email",children:"Email"}),e.jsx($,{readOnly:!0,id:"email",placeholder:"name@example.com",type:"email",value:t.member.user.email,autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:!0})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(I,{htmlFor:"role",children:"Role"}),e.jsx(st,{control:r,name:"role",render:({field:f})=>e.jsxs(le,{onValueChange:f.onChange,...f,children:[e.jsx(ce,{className:"w-[180px]",children:e.jsx(de,{id:"role",placeholder:"Role..."})}),e.jsxs(ue,{children:[(!t.isCloudEnabled||t.canSetOwnerRole)&&e.jsx(q,{value:"OWNER",children:"Owner"}),e.jsx(q,{value:"ADMIN",children:"Admin"}),e.jsx(q,{value:"MEMBER",children:"Member"})]})]})}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs(v,{disabled:t.isLoading,children:[t.isLoading&&e.jsx(Ke,{}),"Update member"]})]})})})]})}function Pn({title:s,description:t}){return e.jsxs("div",{className:"mb-4 space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:s}),e.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:t})]})}function Fn({orgId:s}){var o;const{isControlPlaneEnabled:t,isControlPlaneLoading:n}=_e(),r=we(),l=G({...r.organizationEntitlementsGetQuery(s),enabled:!!s&&t});return n||l.isLoading?e.jsx(Ke,{}):((o=l.data)==null?void 0:o.auditLogs)!==!0?e.jsx(Gn,{orgId:s}):e.jsx(zn,{orgId:s})}function In({orgId:s}){const t=`${window.location.origin}/api/v1/control-plane/organizations/${s}/audit-logs`,n=`curl \\ + -H "Authorization: Bearer " \\ + "${t}?limit=100"`;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Endpoint"}),e.jsx($s,{language:"text",code:t,wrapLines:!1}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Requests must be authenticated with a Management Token (sent as a Bearer token). Create one in the"," ",e.jsx("span",{className:"font-medium text-foreground",children:"Management Tokens"})," ","tab, then call this endpoint to retrieve your organization's audit logs."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Example request"}),e.jsx($s,{language:"text",code:n})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Query parameters"}),e.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"tenant"})," — optional tenant ID to scope results to a single tenant"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"limit"})," — max rows to return (default 1000, max 1000)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"offset"})," — number of rows to skip for pagination (default 0)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"since"})," — RFC3339 timestamp for the start of the range (default 24 hours ago)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"until"})," — RFC3339 timestamp for the end of the range (default now)"]})]})]})]})}function zn({orgId:s}){return e.jsxs("div",{children:[e.jsx(Pn,{title:"Audit Log",description:"Retrieve an immutable record of actions taken across your organization's tenants for compliance and security review."}),e.jsx(gs,{className:"my-4"}),e.jsx(In,{orgId:s}),e.jsx(gs,{className:"my-6"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx(It,{doc:zt.v1.security["audit-logs"],label:"audit logs documentation",variant:"text"})," ","for the full response schema and details."]})]})}function Gn({orgId:s}){return e.jsx(jn,{icon:e.jsx(En,{className:"h-8 w-8 text-primary"}),title:"Unlock Audit Logs",description:"Audit logs give you an immutable record of actions taken across your organization's tenants for compliance and security review. Upgrade your plan to enable this feature.",action:e.jsx(Ft,{to:nt.organizationBillingRoute.to,params:{organization:s},className:"w-full",children:e.jsx(v,{className:"min-w-40 px-8 py-6 text-base",size:"lg",children:"View plans"})})})}const ae={Okta:{displayName:"Okta",defaultForm:{provider:"Okta",clientId:"",clientSecret:"",ssoDomain:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/okta"},MicrosoftEntra:{displayName:"Microsoft Entra",defaultForm:{provider:"MicrosoftEntra",clientId:"",clientSecret:"",tenantId:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/entra"},Google:{displayName:"Google",defaultForm:{provider:"Google",clientId:"",clientSecret:"",authUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userinfoUrl:"https://openidconnect.googleapis.com/v1/userinfo",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/google"},OneLogin:{displayName:"OneLogin",defaultForm:{provider:"OneLogin",clientId:"",clientSecret:"",authUrl:"",tokenUrl:"",userinfoUrl:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/onelogin"},JumpCloud:{displayName:"JumpCloud",defaultForm:{provider:"JumpCloud",clientId:"",clientSecret:"",authUrl:"https://oauth.id.jumpcloud.com/oauth2/auth",tokenUrl:"https://oauth.id.jumpcloud.com/oauth2/token",userinfoUrl:"https://oauth.id.jumpcloud.com/userinfo",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/jumpcloud"},Generic:{displayName:"Generic",defaultForm:{provider:"Generic",clientId:"",clientSecret:"",authUrl:"",tokenUrl:"",userinfoUrl:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/overview"}},qe=ts({clientId:z().min(1,"Client ID is required"),clientSecret:z().min(1,"Client Secret is required"),usesPkce:rt()}),Qe=ts({clientId:z().min(1,"Client ID is required"),clientSecret:z().optional(),usesPkce:rt()}),qn=qe.extend({provider:V("Okta"),ssoDomain:z().min(1,"SSO Domain is required")}),Qn=qe.extend({provider:V("MicrosoftEntra"),tenantId:z().min(1,"Tenant ID is required")}),rs={authUrl:z().url("Must be a valid URL"),tokenUrl:z().url("Must be a valid URL"),userinfoUrl:z().url("Must be a valid URL")},$n=qe.extend({provider:V("Generic"),...rs}),Vn=qe.extend({provider:V("Google"),...rs}),Kn=qe.extend({provider:V("OneLogin"),...rs}),_n=qe.extend({provider:V("JumpCloud"),...rs}),Bn=Qe.extend({provider:V("Okta"),ssoDomain:z().min(1,"SSO Domain is required")}),Wn=Qe.extend({provider:V("MicrosoftEntra"),tenantId:z().min(1,"Tenant ID is required")}),is={authUrl:z().url("Must be a valid URL"),tokenUrl:z().url("Must be a valid URL"),userinfoUrl:z().url("Must be a valid URL")},Hn=Qe.extend({provider:V("Generic"),...is}),Yn=Qe.extend({provider:V("Google"),...is}),Xn=Qe.extend({provider:V("OneLogin"),...is}),Jn=Qe.extend({provider:V("JumpCloud"),...is}),Ks=at("provider",[qn,Qn,$n,Vn,Kn,_n]),_s=at("provider",[Bn,Wn,Hn,Yn,Xn,Jn]);var Q=(s=>(s[s.ProviderSelection=1]="ProviderSelection",s[s.Configuration=2]="Configuration",s))(Q||{});function Zn(s,t){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(s).then(()=>t==null?void 0:t())}function ea(s){return{async get(){return s!=null&&s.get?s.get():(console.error("SsoSetup: api.get not implemented. Pass an `api` prop to implement."),{ok:!0,data:{}})},async upsert(t){if(s!=null&&s.upsert)return s.upsert(t);const n="SsoSetup: api.upsert not implemented. Pass an `api` prop to implement.";return console.error(n),{ok:!1,error:{message:n}}},async remove(){if(s!=null&&s.remove)return s.remove();const t="SsoSetup: api.remove not implemented. Pass an `api` prop to implement.";return console.warn(t),{ok:!1,error:{message:t}}}}}function Bs(s){return s.idpType==="Okta"?"Okta":s.idpType==="MicrosoftEntra"?"MicrosoftEntra":"Generic"}function Ws(s,t){return t.idpType==="Okta"?{provider:"Okta",clientId:t.clientId||"",clientSecret:t.clientSecret||"",ssoDomain:t.ssoDomain||"",usesPkce:t.usesPkce??!0}:t.idpType==="MicrosoftEntra"?{provider:"MicrosoftEntra",clientId:t.clientId||"",clientSecret:t.clientSecret||"",tenantId:t.tenantId||"",usesPkce:t.usesPkce??!0}:{provider:s==="Generic"||s==="Google"||s==="OneLogin"||s==="JumpCloud"?s:"Generic",clientId:t.clientId||"",clientSecret:t.clientSecret||"",authUrl:t.authUrl||"",tokenUrl:t.tokenUrl||"",userinfoUrl:t.userinfoUrl||"",usesPkce:t.usesPkce??!0}}function sa(s){if(s.provider==="Okta")return{idpType:"Okta",clientId:s.clientId,clientSecret:s.clientSecret||void 0,ssoDomain:s.ssoDomain,usesPkce:s.usesPkce};if(s.provider==="MicrosoftEntra")return{idpType:"MicrosoftEntra",clientId:s.clientId,clientSecret:s.clientSecret||void 0,tenantId:s.tenantId,usesPkce:s.usesPkce};{const t=s;return{idpType:"Generic",clientId:t.clientId,clientSecret:t.clientSecret||void 0,authUrl:t.authUrl,tokenUrl:t.tokenUrl,userinfoUrl:t.userinfoUrl,usesPkce:t.usesPkce}}}const ut=i.createContext(null);function ta({children:s,api:t,redirectUrl:n,onSave:r,onDelete:l,onConfigLoaded:o}){const[x,c]=i.useState("Generic"),[f,d]=i.useState(()=>ae.Generic.defaultForm),[u,p]=i.useState(Q.ProviderSelection),[m,h]=i.useState(null),[j,b]=i.useState(!1),[S,w]=i.useState(null),[D,k]=i.useState(!1),[E,U]=i.useState(!1),[N,A]=i.useState(!1),L=i.useMemo(()=>ea(t),[t]),B=Te(),{isLoading:ee,data:P}=G({queryKey:["sso-config"],queryFn:()=>L.get(),staleTime:1/0}),[O,Y]=i.useState(!1);if(!O&&P){if(P.ok&&P.data.idpInfoFromCustomer){const C=P.data.idpInfoFromCustomer;w(C);const M=Bs(C);c(M),d(Ws(M,C)),p(Q.Configuration)}Y(!0)}i.useEffect(()=>{if(O&&P){const C=!!(P.ok&&P.data.idpInfoFromCustomer);o==null||o(C)}},[O,P]);const W=_({mutationFn:C=>L.upsert({idpInfoFromCustomer:C}),onSuccess:(C,M)=>{var se;C.ok?(B.invalidateQueries({queryKey:["sso-config"]}),w(M),b(!1),r==null||r(M),A(!1)):h(((se=C.error)==null?void 0:se.message)||"Failed to save")}}),X=_({mutationFn:()=>L.remove(),onSuccess:C=>{var M;C.ok?(B.invalidateQueries({queryKey:["sso-config"]}),w(null),l==null||l(),Re(),A(!1)):h(((M=C.error)==null?void 0:M.message)||"Failed to delete")}}),y=W.isPending,R=X.isPending;function K(C,M){d(se=>({...se,[C]:M})),b(!0)}function Ee(){h(null),k(!0);const M=(S?_s:Ks).safeParse(f);M.success&&W.mutate(sa(M.data))}function g(){h(null),X.mutate()}const H={};if(D){const M=(S?_s:Ks).safeParse(f);if(!M.success)for(const se of M.error.issues)H[se.path.join(".")]=se.message}const Me=C=>{S||(c(C),d(ae[C].defaultForm),p(Q.Configuration))},os=()=>{p(Q.ProviderSelection),k(!1),h(null)},De=()=>{if(p(S?Q.Configuration:Q.ProviderSelection),b(!1),k(!1),h(null),U(!1),S){const C=Bs(S);c(C),d(Ws(C,S))}else c("Generic"),d(ae.Generic.defaultForm)},Re=()=>{p(Q.ProviderSelection),b(!1),k(!1),h(null),U(!1),c("Generic"),d(ae.Generic.defaultForm)},Be={provider:x,form:f,step:u,loading:ee,saving:y,deleting:R,apiError:m,hasUnsavedChanges:j,idpConfiguration:S,redirectUrl:n,errors:H,showDeleteConfirm:E,setShowDeleteConfirm:U,isOpen:N,setIsOpen:A,onChange:K,onSave:Ee,onDelete:g,handleProviderSelect:Me,handleBack:os,reset:De};return e.jsx(ut.Provider,{value:Be,children:s})}function ge(){const s=i.useContext(ut);if(!s)throw new Error("useSsoSetupContext must be used within a SsoSetupProvider");return s}function mt(){const{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:l,idpConfiguration:o}=ge();return{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:l,hasExistingConfig:!!o}}function na(){const{step:s,provider:t}=ge();return{step:s,provider:t}}function aa(){const{step:s,form:t,errors:n,onChange:r,redirectUrl:l}=ge();return{step:s,form:t,errors:n,onChange:r,redirectUrl:l}}function ra(){const{step:s,idpConfiguration:t,saving:n,handleBack:r,onSave:l,setShowDeleteConfirm:o}=ge();return{step:s,existing:t,saving:n,onBack:r,onSave:l,onDeleteClick:()=>o(!0)}}function ia(){const{handleProviderSelect:s}=ge();return{onProviderSelect:s}}function oa(){const{form:s,errors:t,onChange:n,idpConfiguration:r}=ge();return{form:s,errors:t,onChange:n,isEditMode:!!r}}function la(){const{showDeleteConfirm:s,setShowDeleteConfirm:t,onDelete:n,deleting:r,provider:l}=ge();return{open:s,onOpenChange:t,onConfirm:n,deleting:r,providerName:ae[l].displayName}}function ca(){const{apiError:s}=ge();return{message:s}}function da(){const{open:s,onOpenChange:t,onConfirm:n,deleting:r,providerName:l}=la();return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(fe,{children:"Delete SSO Configuration?"}),e.jsxs(Fe,{children:["This will permanently delete the SSO configuration for"," ",e.jsx("strong",{children:l}),". This action cannot be undone."]})]}),e.jsxs(Gt,{children:[e.jsx(v,{variant:"outline",onClick:()=>t(!1),disabled:r,children:"Cancel"}),e.jsx(v,{variant:"destructive",onClick:n,disabled:r,children:r?e.jsxs(e.Fragment,{children:[e.jsx(as,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):"Delete Configuration"})]})]})})}function ua(){const{message:s}=ca();return s?e.jsx(qt,{variant:"destructive",children:e.jsx(Qt,{children:s})}):null}function ma(){const{onProviderSelect:s}=ia(),t=Object.keys(ae);return e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(n=>e.jsx(v,{type:"button",onClick:()=>s(n),className:"cursor-pointer",children:e.jsx("span",{className:"font-medium",children:ae[n].displayName})},n))})}function xa(){return e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsxs("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:[e.jsx(as,{className:"mr-2 h-4 w-4 animate-spin"})," Loading…"]})})}function ie({label:s,htmlFor:t,children:n,required:r}){return e.jsxs("div",{className:"grid gap-1.5",children:[e.jsxs(I,{htmlFor:t,children:[s," ",r&&e.jsx("span",{className:"text-destructive",children:"*"})]}),n]})}function ha({children:s}){return s?e.jsx("p",{className:"text-xs text-destructive",children:s}):null}function Se({id:s,type:t="text",placeholder:n,value:r,onChange:l,error:o,readOnly:x,autoComplete:c,...f}){return e.jsxs(e.Fragment,{children:[e.jsx($,{id:s,type:t,placeholder:n,value:r,onChange:d=>l(d.target.value),readOnly:x,autoComplete:c,...f}),o&&e.jsx(ha,{children:o})]})}function ps({checked:s,onChange:t}){return e.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-xl border p-3",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-sm font-medium",children:"Use PKCE"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Recommended."})]}),e.jsx(ct,{checked:s,onCheckedChange:t})]})}function fa(){const{form:s,errors:t,onChange:n,isEditMode:r}=oa(),l=e.jsxs(e.Fragment,{children:[e.jsx(ie,{label:"Client ID",htmlFor:"clientId",required:!0,children:e.jsx(Se,{id:"clientId",placeholder:"client_id",value:s.clientId,onChange:o=>n("clientId",o),error:t.clientId,readOnly:r,autoComplete:"off","data-1p-ignore":!0,"data-bwignore":!0,"data-lpignore":"true","data-protonpass-ignore":"true","data-form-type":"other"})}),e.jsx(ie,{label:"Client Secret",htmlFor:"clientSecret",required:!r,children:e.jsx(Se,{id:"clientSecret",type:"password",placeholder:r?"Leave empty to keep existing":"••••••••",value:s.clientSecret,onChange:o=>n("clientSecret",o),error:t.clientSecret,autoComplete:"off","data-1p-ignore":!0,"data-bwignore":!0,"data-lpignore":"true","data-protonpass-ignore":"true","data-form-type":"other"})})]});return s.provider==="Okta"?e.jsxs(e.Fragment,{children:[e.jsx(ie,{label:"SSO Domain",htmlFor:"ssoDomain",required:!0,children:e.jsx(Se,{id:"ssoDomain",placeholder:"example.okta.com",value:s.ssoDomain||"",onChange:o=>n("ssoDomain",o),error:t.ssoDomain})}),l,e.jsx(ps,{checked:s.usesPkce,onChange:o=>n("usesPkce",o)})]}):s.provider==="MicrosoftEntra"?e.jsxs(e.Fragment,{children:[e.jsx(ie,{label:"Tenant ID",htmlFor:"tenantId",required:!0,children:e.jsx(Se,{id:"tenantId",placeholder:"00000000-0000-0000-0000-000000000000",value:s.tenantId||"",onChange:o=>n("tenantId",o),error:t.tenantId})}),l,e.jsx(ps,{checked:s.usesPkce,onChange:o=>n("usesPkce",o)})]}):e.jsxs(e.Fragment,{children:[l,e.jsx(ie,{label:"Authorize URL",htmlFor:"authUrl",required:!0,children:e.jsx(Se,{id:"authUrl",placeholder:"https://.../authorize",value:s.authUrl||"",onChange:o=>n("authUrl",o),error:t.authUrl})}),e.jsx(ie,{label:"Token URL",htmlFor:"tokenUrl",required:!0,children:e.jsx(Se,{id:"tokenUrl",placeholder:"https://.../token",value:s.tokenUrl||"",onChange:o=>n("tokenUrl",o),error:t.tokenUrl})}),e.jsx(ie,{label:"Userinfo URL",htmlFor:"userinfoUrl",required:!0,children:e.jsx(Se,{id:"userinfoUrl",placeholder:"https://.../userinfo",value:s.userinfoUrl||"",onChange:o=>n("userinfoUrl",o),error:t.userinfoUrl})}),e.jsx(ps,{checked:s.usesPkce,onChange:o=>n("usesPkce",o)})]})}function pa({redirectUrl:s}){const[t,n]=i.useState(!1);return e.jsx(ie,{label:"Redirect / Callback URL",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{readOnly:!0,value:s,tabIndex:-1}),e.jsx(v,{type:"button",size:"sm",onClick:()=>{Zn(s,()=>{n(!0),setTimeout(()=>n(!1),500)})},className:"shrink-0 cursor-pointer",children:t?e.jsx($t,{className:"h-4 w-4"}):e.jsx(Vt,{className:"h-4 w-4"})})]})})}function ga({redirectUrl:s,api:t,onConfigLoaded:n}){return e.jsx(ta,{redirectUrl:s,api:t,onConfigLoaded:n,children:e.jsx(ja,{})})}function ja(){const{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:l,hasExistingConfig:o}=mt(),x=c=>{!c&&t?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(l(!1),n()):l(c)};return e.jsxs(pe,{open:r,onOpenChange:x,modal:!0,children:[e.jsx(Kt,{asChild:!0,children:e.jsxs(v,{variant:"outline",disabled:s,className:"cursor-pointer",children:[s?e.jsx(as,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(vn,{className:"mr-2 h-4 w-4"}),s?"Loading...":o?"Edit SSO Config":"Set up SSO"]})}),e.jsxs(xe,{className:"!max-w-[80vw] max-h-[90vh] overflow-y-auto sm:!max-w-[600px]",children:[e.jsxs(_t,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(Bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),e.jsx(va,{})]})]})}function va(){const{loading:s}=mt();return s?e.jsx(xa,{}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(ba,{}),e.jsx(ya,{}),e.jsx(Na,{}),e.jsx(da,{})]})}function ba(){const{step:s,provider:t}=na();return e.jsxs(he,{children:[e.jsxs(fe,{children:["Set up Enterprise SSO",s===Q.Configuration&&` - ${ae[t].displayName}`]}),s===Q.ProviderSelection&&e.jsx(Fe,{children:"Choose your Identity Provider to get started."}),s===Q.Configuration&&e.jsxs(Fe,{children:["Follow"," ",e.jsx("a",{href:ae[t].docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"these instructions"})," ","to set up your Identity Provider and create an OAuth/OIDC application."]})]})}function ya(){const{step:s,redirectUrl:t}=aa();return e.jsx("div",{className:"space-y-6",children:s===Q.ProviderSelection?e.jsx("div",{className:"grid gap-4",children:e.jsx(ma,{})}):e.jsxs("div",{className:"grid gap-4",children:[e.jsx(pa,{redirectUrl:t}),e.jsx(fa,{}),e.jsx(ua,{})]})})}function Na(){const{step:s,existing:t,saving:n,onBack:r,onSave:l,onDeleteClick:o}=ra();return s!==Q.Configuration?null:e.jsxs("div",{className:"flex w-full items-center justify-between mt-6",children:[!t&&e.jsx(v,{onClick:r,className:"cursor-pointer",children:"Back"}),e.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[t&&e.jsx(v,{variant:"destructive",onClick:o,className:"cursor-pointer",children:"Delete"}),e.jsxs(v,{onClick:l,disabled:n,className:"cursor-pointer",children:[n&&e.jsx(as,{className:"mr-2 h-4 w-4 animate-spin"}),t?"Save changes":"Create OIDC client"]})]})]})}function Sa(s){return{async get(){try{return{ok:!0,data:(await hs.ssoList(s)).data}}catch(t){return t instanceof ke?{ok:!1,error:{status:t.status,message:t.message}}:{ok:!1,error:{message:"unspecified error"}}}},async upsert(t){try{return await hs.ssoUpdate(s,t),{ok:!0,data:void 0}}catch(n){return n instanceof ke?{ok:!1,error:{status:n.status,message:n.message}}:{ok:!1,error:{message:"unspecified error"}}}},async remove(){try{return await hs.ssoDelete(s),{ok:!0,data:void 0}}catch(t){return t instanceof ke?{ok:!1,error:{status:t.status,message:t.message}}:{ok:!1,error:{message:"unspecified error"}}}}}}function Ca({orgId:s,onConfigLoaded:t}){const n=i.useMemo(()=>Sa(s),[s]);return e.jsx(ga,{redirectUrl:`${window.location.origin}/api/v1/control-plane/users/sso/callback`,api:n,onConfigLoaded:t})}function ss({tag:s}){return e.jsx(F,{variant:"secondary",className:"flex-shrink-0 text-xs",children:s})}function ka({tags:s}){const t=i.useRef(null),n=i.useRef(null),[r,l]=i.useState(s.length);i.useLayoutEffect(()=>{const c=t.current,f=n.current;if(!c||!f)return;const d=()=>{const p=c.clientWidth;if(p===0)return;const m=Array.from(f.children),h=4,j=20;let b=0,S=0;for(let w=0;w0?h:0),k=w===m.length-1;if(b+D+(k?0:j)>p)break;b+=D,S++}l(S)};d();const u=new ResizeObserver(d);return u.observe(c),()=>u.disconnect()},[s]);const o=Math.min(r,s.length),x=oe.jsx(ss,{tag:c},`m-${f}`))}),e.jsxs("div",{className:"flex flex-nowrap items-center gap-1",children:[s.slice(0,o).map((c,f)=>e.jsx(ss,{tag:c},f)),x&&e.jsx("span",{className:"flex-shrink-0 text-xs text-muted-foreground",children:"…"})]})]})}function wa({open:s,onOpenChange:t,organizationId:n}){const r=we(),l=Te(),{handleApiError:o}=ze({}),[x,c]=i.useState(""),[f,d]=i.useState(oe.MEMBER),u=_({...r.userGroupCreateMutation(n),onSuccess:()=>{l.invalidateQueries({queryKey:["organization:user-groups:list",n]}),c(""),d(oe.MEMBER),t(!1)},onError:o}),p=i.useCallback(h=>u.mutate(h),[u]),m=u.isPending;return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{className:"max-w-md",children:[e.jsxs(he,{children:[e.jsx(fe,{children:"Create User Group"}),e.jsx(Fe,{children:"User groups associate tags and a tenant role with a set of org members."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"group-name",children:"Name"}),e.jsx($,{id:"group-name",value:x,onChange:h=>c(h.target.value),placeholder:"e.g. Engineers",disabled:m})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"group-role",children:"Tenant role"}),e.jsxs(le,{value:f,onValueChange:h=>d(h),disabled:m,children:[e.jsx(ce,{id:"group-role",children:e.jsx(de,{})}),e.jsxs(ue,{children:[e.jsx(q,{value:oe.MEMBER,children:"MEMBER"}),e.jsx(q,{value:oe.ADMIN,children:"ADMIN"}),e.jsx(q,{value:oe.OWNER,children:"OWNER"})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(v,{variant:"outline",onClick:()=>t(!1),disabled:m,children:"Cancel"}),e.jsx(v,{onClick:()=>p({name:x,role:f}),disabled:m||!x.trim(),children:m?"Creating...":"Create Group"})]})]})]})})}function Ta({open:s,onOpenChange:t,organizationId:n,group:r,allOrgMembers:l,allTenantTags:o}){var Ee;const x=we(),c=Te(),{handleApiError:f}=ze({}),d=r.metadata.id,[u,p]=i.useState(r.name),[m,h]=i.useState(r.role),[j,b]=i.useState(r.tags);i.useEffect(()=>{s&&(p(r.name),h(r.role),b(r.tags))},[s,r]);const S=G({...x.userGroupMembersListQuery(n,d),enabled:s}),w=i.useCallback(()=>{c.invalidateQueries({queryKey:["organization:user-groups:list",n]}),c.invalidateQueries({queryKey:["organization:user-group:members:list",n,d]})},[c,n,d]),D=_({...x.userGroupUpdateMutation(n,d),onSuccess:w,onError:f}),k=_({...x.userGroupTagsSetMutation(n,d),onSuccess:w,onError:f}),E=_({...x.userGroupMemberAddMutation(n,d),onSuccess:()=>{c.invalidateQueries({queryKey:["organization:user-group:members:list",n,d]})},onError:f}),U=_({...x.userGroupMemberRemoveMutation(n,d),onSuccess:()=>{c.invalidateQueries({queryKey:["organization:user-group:members:list",n,d]})},onError:f}),N=((Ee=S.data)==null?void 0:Ee.rows)??[],A=new Set(N.map(g=>g.metadata.id)),L=l.filter(g=>!A.has(g.metadata.id)),B=o.filter(g=>!j.includes(g)),ee=g=>b(H=>[...H,g]),P=g=>b(H=>H.filter(Me=>Me!==g)),O=i.useCallback(g=>D.mutateAsync(g),[D]),Y=i.useCallback(g=>k.mutateAsync(g),[k]),W=i.useCallback(g=>E.mutate(g),[E]),X=i.useCallback(g=>U.mutate(g),[U]),y=D.isPending||k.isPending,R=E.isPending||U.isPending,K=i.useCallback(async()=>{try{await Promise.all([O({name:u.trim()||void 0,role:m}),Y(j)]),t(!1)}catch{}},[O,Y,u,m,j,t]);return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{className:"max-w-lg",children:[e.jsx(he,{children:e.jsx(fe,{children:"Edit User Group"})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"edit-group-name",children:"Name"}),e.jsx($,{id:"edit-group-name",value:u,onChange:g=>p(g.target.value),disabled:y})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"edit-group-role",children:"Tenant role"}),e.jsxs(le,{value:m,onValueChange:g=>h(g),disabled:y,children:[e.jsx(ce,{id:"edit-group-role",children:e.jsx(de,{})}),e.jsxs(ue,{children:[e.jsx(q,{value:oe.MEMBER,children:"MEMBER"}),e.jsx(q,{value:oe.ADMIN,children:"ADMIN"}),e.jsx(q,{value:oe.OWNER,children:"OWNER"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:"Tags"}),j.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(g=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[g,e.jsx("button",{type:"button",onClick:()=>P(g),disabled:y,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${g}`,children:e.jsx(Ie,{className:"size-3.5"})})]},g))}),B.length>0?e.jsxs(le,{onValueChange:ee,disabled:y,value:"",children:[e.jsx(ce,{children:e.jsx(de,{placeholder:"Add a tag…"})}),e.jsx(ue,{children:B.map(g=>e.jsx(q,{value:g,children:g},g))})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:o.length===0?"No tags exist on any tenant yet.":"All available tags have been added."}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Members in this group get access to tenants whose tags are a subset of these tags."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:"Members"}),S.isLoading?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs("div",{className:"space-y-1 rounded-md border p-2",children:[N.length===0&&e.jsx("p",{className:"py-2 text-center text-sm text-muted-foreground",children:"No members yet."}),N.map(g=>e.jsxs("div",{className:"flex items-center justify-between rounded px-2 py-1 hover:bg-muted/30",children:[e.jsx("span",{className:"font-mono text-sm",children:g.email}),e.jsx(v,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>X(g.metadata.id),disabled:R,children:e.jsx(me,{className:"size-3.5 text-destructive"})})]},g.metadata.id))]}),L.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add member:"}),e.jsxs(le,{onValueChange:W,disabled:R,value:"",children:[e.jsx(ce,{children:e.jsx(de,{placeholder:"Select a member to add..."})}),e.jsx(ue,{children:L.map(g=>e.jsxs(q,{value:g.metadata.id,children:[g.email," ",e.jsx(F,{variant:"outline",className:"ml-1 text-xs",children:g.role})]},g.metadata.id))})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(v,{onClick:K,disabled:y,children:y?"Saving...":"Save"})})]})]})})}function Ea({organizationId:s,allOrgMembers:t,allTenantTags:n}){const r=we(),l=Te(),{handleApiError:o}=ze({}),[x,c]=i.useState(!1),[f,d]=i.useState(null),u=G({...r.userGroupsListQuery(s)}),p=u.data??[],m=[{columnLabel:"Name",cellRenderer:h=>e.jsx("span",{className:"font-medium",children:h.name})},{columnLabel:"Tenant Role",cellRenderer:h=>e.jsx(F,{variant:"outline",children:h.role})},{columnLabel:"Tags",cellRenderer:h=>h.tags.length>0?e.jsx("div",{className:"flex flex-wrap gap-1",children:h.tags.map(j=>e.jsx(ss,{tag:j},j))}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})},{columnLabel:"Members",cellRenderer:h=>e.jsx("span",{className:"text-sm",children:h.memberCount})},{columnLabel:"Actions",cellRenderer:h=>e.jsx(Ma,{group:h,organizationId:s,onEdit:d,onDeleted:()=>l.invalidateQueries({queryKey:["organization:user-groups:list",s]}),onError:o})}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(v,{onClick:()=>c(!0),children:"New Group"})}),u.isLoading?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Loading..."}):p.length>0?e.jsx(Ce,{data:p,columns:m,rowKey:h=>h.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No user groups yet."}),e.jsx(wa,{open:x,onOpenChange:c,organizationId:s}),f&&e.jsx(Ta,{open:!!f,onOpenChange:h=>!h&&d(null),organizationId:s,group:f,allOrgMembers:t,allTenantTags:n})]})}function Ma({group:s,organizationId:t,onEdit:n,onDeleted:r,onError:l}){const o=we(),x=_({...o.userGroupDeleteMutation(t,s.metadata.id),onSuccess:r,onError:l}),c=i.useCallback(()=>x.mutate(),[x]),f=x.isPending;return e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsxs(Ue,{align:"end",children:[e.jsxs(Z,{onClick:()=>n(s),children:[e.jsx(es,{className:"mr-2 size-4"}),"Edit"]}),e.jsxs(Z,{className:"text-destructive",onClick:c,disabled:f,children:[e.jsx(me,{className:"mr-2 size-4"}),"Delete"]})]})]})}function Da({open:s,onOpenChange:t,invite:n,organizationName:r,onSuccess:l}){const{handleCancelInvite:o,cancelInviteLoading:x}=Ge();return n?e.jsx(ns,{isOpen:s,title:"Cancel Invitation",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to cancel the invitation for"," ",e.jsx("strong",{children:n.inviteeEmail})," to join ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. The invitation will be permanently deleted and the invited user will no longer be able to accept it."})]}),submitLabel:"Cancel Invitation",submitVariant:"destructive",cancelLabel:"Keep Invitation",onSubmit:()=>o(n.metadata.id,l,t),onCancel:()=>t(!1),isLoading:x}):null}const Ra=ts({name:z().min(1,"Token name is required"),duration:Wt([tt(Ve),V("never")])});function La({open:s,onOpenChange:t,organizationId:n,organizationName:r,onSuccess:l,allTenantTags:o}){var O,Y,W,X;const x="never",[c,f]=i.useState(null),[d,u]=i.useState([]),{handleCreateToken:p,createTokenLoading:m}=Ge(),{register:h,handleSubmit:j,reset:b,control:S,watch:w,formState:{errors:D}}=Zs({resolver:et(Ra),defaultValues:{name:"",duration:Ve.Value30D}}),k=i.useCallback(()=>{f(null),u([]),b(),t(!1)},[b,t]),E=y=>u(R=>[...R,y]),U=y=>u(R=>R.filter(K=>K!==y)),N=o.filter(y=>!d.includes(y)),A=i.useCallback(y=>{const R=y.duration===x?void 0:y.duration;p(n,y.name,R,K=>{f(K.token),l()},d.length>0?d:void 0)},[n,p,l,d]);i.useEffect(()=>{s||k()},[s,k]);const L=(Y=(O=D.name)==null?void 0:O.message)==null?void 0:Y.toString(),B=(X=(W=D.duration)==null?void 0:W.message)==null?void 0:X.toString(),ee=w("duration"),P=[{value:Ve.Value30D,label:"30 days"},{value:Ve.Value60D,label:"60 days"},{value:Ve.Value90D,label:"90 days"},{value:x,label:"Do not expire"}];return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{className:"max-w-md",children:[e.jsxs(he,{children:[e.jsxs(fe,{className:"flex items-center gap-2",children:[e.jsx(bn,{className:"h-5 w-5"}),"Create Management Token"]}),e.jsxs(Fe,{children:["Create a new API token for managing ",r]})]}),c?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-green-200 bg-green-50 p-4",children:[e.jsx("div",{className:"mb-2 text-sm text-green-800",children:e.jsx("strong",{children:"Token created successfully!"})}),e.jsx("p",{className:"text-xs text-green-700",children:"Make sure to copy your token now. You won't be able to see it again!"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:"Your Management Token"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{value:c,readOnly:!0,className:"font-mono text-sm"}),e.jsx(vs,{text:c,className:"px-3"})]})]}),e.jsx("div",{className:"flex items-center justify-end pt-4",children:e.jsx(v,{onClick:k,children:"Done"})})]}):e.jsxs("form",{onSubmit:j(A),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"name",children:"Token Name"}),e.jsx($,{...h("name"),id:"name",placeholder:"e.g., CI/CD Pipeline Token",disabled:m}),L&&e.jsx("div",{className:"text-sm text-red-500",children:L}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a descriptive name for your token."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"duration",children:"Duration"}),e.jsx(st,{control:S,name:"duration",render:({field:y})=>e.jsxs(le,{onValueChange:y.onChange,value:y.value,children:[e.jsx(ce,{children:e.jsx(de,{placeholder:"Select duration..."})}),e.jsx(ue,{children:P.map(R=>e.jsx(q,{value:R.value,children:R.label},R.value))})]})}),B&&e.jsx("div",{className:"text-sm text-red-500",children:B}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"How long the token should remain valid."}),ee===x&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-yellow-200 bg-yellow-50 p-3 text-sm text-yellow-800",children:[e.jsx(dt,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:"Tokens that never expire pose a security risk. Consider using a shorter duration and rotating tokens regularly."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:"Tag Scope (optional)"}),d.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(y=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[y,e.jsx("button",{type:"button",onClick:()=>U(y),disabled:m,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${y}`,children:e.jsx(Ie,{className:"size-3.5"})})]},y))}),N.length>0?e.jsxs(le,{onValueChange:E,disabled:m,value:"",children:[e.jsx(ce,{children:e.jsx(de,{placeholder:"Add a tag…"})}),e.jsx(ue,{children:N.map(y=>e.jsx(q,{value:y,children:y},y))})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:o.length===0?"No tags exist on any tenant yet.":"All available tags have been added."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"When set, the token can only access or create tenants whose tags are a subset of these tags."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4",children:[e.jsx(v,{type:"button",variant:"outline",onClick:k,children:"Cancel"}),e.jsx(v,{type:"submit",disabled:m,children:m?"Creating...":"Create Token"})]})]})]})})}function Aa({open:s,onOpenChange:t,member:n,organizationName:r,onSuccess:l}){const{handleDeleteMember:o,deleteMemberLoading:x}=Ge();return n?e.jsx(ns,{isOpen:s,title:"Remove Member",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to remove ",e.jsx("strong",{children:n.email})," from"," ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. The member will lose access to this organization and all its tenants immediately."})]}),submitLabel:"Remove Member",submitVariant:"destructive",cancelLabel:"Cancel",onSubmit:()=>o(n,l,t),onCancel:()=>t(!1),isLoading:x}):null}function xt({open:s,onOpenChange:t,tenant:n,tenantName:r,organizationName:l,onSuccess:o}){const{handleDeleteTenant:x,deleteTenantLoading:c}=Ge(),[f,d]=i.useState("");if(i.useEffect(()=>{s||d("")},[s]),!n)return null;const u=f===r,p=()=>{u&&x(n.id,o,t)};return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(he,{children:e.jsx(fe,{children:"Archive Tenant"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 space-y-3 text-sm text-foreground",children:[e.jsxs("p",{children:["Are you sure you want to archive ",e.jsx("strong",{children:r})," ","from ",l,"?"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["The tenant will be archived and kept for 30 days before being permanently deleted. During this period, you can contact"," ",e.jsx("a",{href:"mailto:support@hatchet.run",className:"text-primary underline",children:"support@hatchet.run"})," ","to unarchive the tenant if needed. After 30 days, the tenant and all associated data will be permanently removed."]}),e.jsxs("div",{className:"space-y-2 pt-2",children:[e.jsxs("label",{className:"text-sm font-medium",children:["To confirm, type ",e.jsx("strong",{children:r}),":"]}),e.jsx($,{value:f,onChange:m=>d(m.target.value),placeholder:r,className:"w-full",autoFocus:!0})]})]}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(v,{variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),e.jsxs(v,{variant:"destructive",onClick:p,disabled:!u||c,children:[c&&e.jsx(Ke,{}),"Archive Tenant"]})]})]})]})})}function Oa({open:s,onOpenChange:t,token:n,organizationName:r,onSuccess:l}){const{handleDeleteToken:o,deleteTokenLoading:x}=Ge();return n?e.jsx(ns,{isOpen:s,title:"Delete Management Token",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to delete the management token"," ",e.jsxs("strong",{children:['"',n.name,'"']})," from ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. Any applications or services using this token will immediately lose access and may break functionality."}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Potential consequences:"}),e.jsxs("ul",{className:"list-inside list-disc space-y-1 text-xs",children:[e.jsx("li",{children:"API integrations may fail"}),e.jsx("li",{children:"Automated deployments could break"}),e.jsx("li",{children:"CI/CD pipelines might stop working"}),e.jsx("li",{children:"Third-party tools will lose access"})]})]})]}),submitLabel:"Delete Token",submitVariant:"destructive",cancelLabel:"Cancel",onSubmit:()=>o(n.id,l,t),onCancel:()=>t(!1),isLoading:x}):null}function Ua({open:s,onOpenChange:t,organizationId:n,tenantId:r,tenantName:l,onSuccess:o,allTenantTags:x=[]}){const c=we(),f=Te(),{handleApiError:d}=ze({}),[u,p]=i.useState([]),[m,h]=i.useState(""),j=G({...c.tenantTagsGetQuery(n,r),enabled:s});i.useEffect(()=>{j.data&&p(j.data)},[j.data]),i.useEffect(()=>{s||h("")},[s]);const b=_({...c.tenantTagsSetMutation(n,r),onSuccess:()=>{f.invalidateQueries({queryKey:["organization-tenant:list:tags",n,r]}),o(),t(!1)},onError:d}),S=i.useCallback(N=>{const A=N.trim();A&&!u.includes(A)&&p(L=>[...L,A]),h("")},[u]),w=N=>p(A=>A.filter(L=>L!==N)),D=N=>{N.key==="Enter"&&(N.preventDefault(),S(m))},k=i.useCallback(N=>b.mutate(N),[b]),E=b.isPending,U=x.filter(N=>!u.includes(N));return e.jsx(pe,{open:s,onOpenChange:t,children:e.jsxs(xe,{className:"max-w-md",children:[e.jsxs(he,{children:[e.jsx(fe,{children:"Edit Tenant Tags"}),e.jsxs(Fe,{children:["Tags for ",e.jsx("strong",{children:l}),". User groups with these tags will have access to this tenant."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:"Tags"}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(N=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[N,e.jsx("button",{type:"button",onClick:()=>w(N),disabled:E,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${N}`,children:e.jsx(Ie,{className:"size-3.5"})})]},N))}),U.length>0&&e.jsxs(le,{onValueChange:S,disabled:E,value:"",children:[e.jsx(ce,{children:e.jsx(de,{placeholder:"Add an existing tag…"})}),e.jsx(ue,{children:U.map(N=>e.jsx(q,{value:N,children:N},N))})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx($,{id:"tag-input",value:m,onChange:N=>h(N.target.value),onKeyDown:D,placeholder:"New tag...",disabled:E,autoComplete:"off"}),e.jsx(v,{type:"button",variant:"outline",onClick:()=>S(m),disabled:E||!m.trim(),children:"Add"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(v,{variant:"outline",onClick:()=>t(!1),disabled:E,children:"Cancel"}),e.jsx(v,{onClick:()=>k(u),disabled:E,children:E?"Saving...":"Save Tags"})]})]})]})})}const Hs="https://hatchet.run/office-hours";function Ys(s){if(s<=0)return"Disabled";const t=Math.floor(s/6e4);if(t<60)return`${t} minute${t!==1?"s":""}`;const n=Math.floor(t/60),r=t%60;if(n<24)return r===0?`${n} hour${n!==1?"s":""}`:`${n} hour${n!==1?"s":""} ${r} minute${r!==1?"s":""}`;const l=Math.floor(n/24),o=n%24;return o===0?`${l} day${l!==1?"s":""}`:`${l} day${l!==1?"s":""} ${o} hour${o!==1?"s":""}`}function ar({orgId:s}){var Ds,Rs,Ls,As,Os,Us,Ps,Fs,Is,zs,Gs;const{isControlPlaneEnabled:t}=_e(),n=cn(),{organizations:r,handleUpdateOrganization:l,handleUpdateOrganizationTimeout:o,updateOrganizationLoading:x,handleCreateOrganizationSsoDomain:c,handleDeleteOrganizationSsoDomain:f}=Ge(),{lastTenantId:d}=it(),u=r.find(a=>a.metadata.id===s),p=(u==null?void 0:u.isOwner)??!1,m=we(),h=Te(),{currentUser:j}=Ht(),{meta:b}=Js(),S=((Ds=b==null?void 0:b.auth)==null?void 0:Ds.schemes)||[],w=p&&S.includes("sso"),[D,k]=i.useState(null),[E,U]=i.useState(null),[N,A]=i.useState(!1),[L,B]=i.useState(null),[ee,P]=i.useState(null),[O,Y]=i.useState(null),[W,X]=i.useState([]),y=i.useRef(null),[R,K]=i.useState(""),[Ee,g]=i.useState(!1),[H,Me]=i.useState(""),[os,De]=i.useState(!1),[Re,Be]=i.useState(""),[C,M]=i.useState(!1),[se,ft]=i.useState(!1),ys=G({...m.organizationEntitlementsGetQuery(s),enabled:!!s&&w}),ls=((Rs=ys.data)==null?void 0:Rs.canSSO)===!0,te=G({...m.organizationSsoDomainGetQuery(s),enabled:!!s&&ls}),Ns=G({...m.organizationSsoConfigGetQuery(s),enabled:!!s&&ls}),Ss=_({...m.organizationSsoConfigUpdateMutation(s),onSuccess:()=>{h.invalidateQueries({queryKey:["organization:sso_config:get",s]})}}),Cs=async()=>{!s||!Re.trim()||(M(!0),c(s,Re.trim(),()=>{M(!1),Be(""),h.invalidateQueries({queryKey:["organization:sso_domain:get",s]})},()=>{M(!1)}))},pt=async a=>{s&&f(s,a,()=>{h.invalidateQueries({queryKey:["organization:sso_domain:get",s]})})},$e=G({...m.organizationGetQuery(s),enabled:!!s}),je=G({...m.managementTokenListQuery(s),enabled:!!s}),ks=G({...m.organizationInviteListQuery(s),enabled:!!s}),ve=G({...m.organizationAvailableShardsQuery(s),enabled:!!s&&t&&p}),T=$e.data,re=(T==null?void 0:T.name)??(u==null?void 0:u.name)??"",cs=(T==null?void 0:T.name)??"",be=i.useMemo(()=>{var a;return((a=(T==null?void 0:T.tenants)??(u==null?void 0:u.tenants))==null?void 0:a.filter(J=>J.status!==ot.ARCHIVED))||[]},[u==null?void 0:u.tenants,T==null?void 0:T.tenants]),ds=i.useMemo(()=>{const a=new Set;for(const J of be){const Le=J.tags;Le==null||Le.forEach(Ct=>a.add(Ct))}return Array.from(a).sort()},[be]);i.useEffect(()=>{var J;const a=d??((J=be[0])==null?void 0:J.id);if(!a){y.current=null;return}y.current!==a&&(y.current=a,W.length||X([a]))},[be,W.length,d]);const ws=()=>{const a=R.trim();if(!(!s||!a)){if(a===cs){g(!1);return}l(s,a,()=>{K(a),g(!1),h.invalidateQueries({queryKey:["organization:get",s]})})}},gt=()=>{K(cs),g(!0)},Ts=()=>{K(cs),g(!1)},us=t?T:void 0,ms=(us==null?void 0:us.inactivity_timeout)??-1,ne=i.useMemo(()=>Yt(H),[H]),We=ne!==null&&ne>en,Es=()=>{if(!(!s||ne===null||We)){if(ne===ms){De(!1);return}o(s,ne,()=>{De(!1),h.invalidateQueries({queryKey:["organization:get",s]})})}},jt=()=>{Me(sn(ms)),De(!0)},Ms=()=>{De(!1)},xs=(As=(Ls=ks.data)==null?void 0:Ls.rows)==null?void 0:As.filter(a=>a.status===Xe.PENDING||a.status===Xe.EXPIRED),vt=[{columnLabel:"Email",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:a.email})},{columnLabel:"Role",cellRenderer:a=>e.jsx(F,{variant:"outline",children:a.role})},...p?[{columnLabel:"Actions",cellRenderer:a=>e.jsx(qa,{row:a,currentUserEmail:j==null?void 0:j.email,onDelete:k})}]:[]],bt=[{columnLabel:"Email",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:a.inviteeEmail})},{columnLabel:"Role",cellRenderer:a=>e.jsx(F,{variant:"outline",children:a.role})},{columnLabel:"Status",cellRenderer:a=>e.jsx(F,{variant:a.status===Xe.PENDING?"secondary":"destructive",children:a.status})},{columnLabel:"Expiry",cellRenderer:a=>e.jsx("span",{children:Xs(a.expires)})},...p?[{columnLabel:"Actions",cellRenderer:a=>a.status===Xe.PENDING?e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsx(Ue,{align:"end",children:e.jsxs(Z,{onClick:()=>P(a),children:[e.jsx(me,{className:"mr-2 size-4"}),"Cancel Invitation"]})})]}):null}]:[]],yt=[{columnLabel:"Domain",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:a.domain})},{columnLabel:"Verified",cellRenderer:a=>e.jsx(F,{variant:a.verified?"successful":"secondary",children:a.verified?"Verified":"Unverified"})},{columnLabel:"Verification Token",cellRenderer:a=>a.verification_token?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:a.verification_token}),e.jsx(vs,{text:a.verification_token})]}):e.jsx("span",{className:"text-muted-foreground",children:"-"})},{columnLabel:"Actions",cellRenderer:a=>e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsx(Ue,{align:"end",children:e.jsxs(Z,{onClick:()=>pt(a.domain),children:[e.jsx(me,{className:"mr-2 size-4"}),"Remove Domain"]})})]})}],Nt=[{columnLabel:"Cloud Provider",cellRenderer:a=>a.provider?e.jsx(F,{variant:"outline",children:a.provider}):e.jsx("span",{className:"text-muted-foreground",children:"—"})},{columnLabel:"Region",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:pn(gn(a))??a.region})},{columnLabel:"Class",cellRenderer:a=>a.shardClass===fn.DEDICATED?e.jsx(F,{variant:"secondary",children:"Dedicated"}):e.jsx(F,{variant:"outline",children:"Shared"})}],St=[{columnLabel:"Name",cellRenderer:a=>e.jsx("span",{className:"font-medium",children:a.name})},{columnLabel:"Tags",cellRenderer:a=>{const J=a.tags;return J&&J.length>0?e.jsx("div",{className:"flex flex-wrap gap-1",children:J.map(Le=>e.jsx(ss,{tag:Le},Le))}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}},{columnLabel:"Expiry",cellRenderer:a=>e.jsx("span",{children:Xs(a.expiresAt)})},...p?[{columnLabel:"Actions",cellRenderer:a=>e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsx(Ue,{align:"end",children:e.jsxs(Z,{onClick:()=>B({id:a.id,name:a.name,expiresAt:a.expiresAt}),children:[e.jsx(me,{className:"mr-2 size-4"}),"Delete"]})})]})}]:[]];return s?$e.isLoading&&!T?e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})})}):e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(lt,{title:"Organization settings",description:p?"Update the organization name and manage tenants, members, and management tokens.":"Review the tenants associated with this organization."}),p&&e.jsxs("div",{className:"mb-6 flex flex-col gap-3 md:flex-row md:flex-wrap",children:[e.jsxs("div",{className:"w-full rounded-lg border border-border/50 bg-muted/10 p-4 md:max-w-sm",children:[e.jsx("div",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Organization name"}),Ee?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{value:R,onChange:a=>K(a.target.value),onKeyDown:a=>{a.key==="Enter"&&ws(),a.key==="Escape"&&Ts()},className:"h-10 flex-1 bg-background/60",disabled:x,"aria-label":"Organization name",autoFocus:!0}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"ghost",size:"icon",onClick:Ts,disabled:x,hoverText:"Cancel editing",className:"shrink-0 hover:bg-muted/50",children:e.jsx(Ie,{className:"size-4"})}),e.jsx(v,{variant:"outline",size:"icon",onClick:ws,disabled:x||!R.trim()||R.trim()===re,hoverText:"Save organization name",className:"shrink-0 bg-background/60 hover:bg-muted/50",children:x?e.jsx(Ke,{}):e.jsx(Vs,{className:"size-4"})})]})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-10 min-w-0 flex-1 items-center rounded-md border border-input bg-background/60 px-3",children:e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:re})}),e.jsx(v,{variant:"outline",size:"icon",onClick:gt,hoverText:"Edit organization name",className:"shrink-0 bg-background/60 hover:bg-muted/50",children:e.jsx(es,{className:"size-4"})})]})]}),t&&e.jsxs("div",{className:"w-full rounded-lg border border-border/50 bg-muted/10 p-4 md:max-w-sm",children:[e.jsx("div",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Inactivity timeout"}),os?e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{type:"text",value:H,onChange:a=>Me(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Es(),a.key==="Escape"&&Ms()},className:"h-10 flex-1 bg-background/60",placeholder:"e.g. 30m, 1h, 1h30m, -1 to disable",disabled:x,autoFocus:!0}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"ghost",size:"icon",onClick:Ms,disabled:x,hoverText:"Cancel editing",className:"shrink-0 hover:bg-muted/50",children:e.jsx(Ie,{className:"size-4"})}),e.jsx(v,{variant:"outline",size:"icon",onClick:Es,disabled:x||ne===null||We,hoverText:"Save inactivity timeout",className:"shrink-0 bg-background/60 hover:bg-muted/50",children:x?e.jsx(Ke,{}):e.jsx(Vs,{className:"size-4"})})]})]}),H.trim()!==""&&e.jsx("p",{className:`text-xs ${ne===null||We?"text-destructive":"text-muted-foreground"}`,children:ne===null?"Invalid format — try 30m, 1h, 1h30m, 100ms":We?"Inactivity timeout cannot exceed 14 days":`→ ${Ys(ne)}`})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-10 min-w-0 flex-1 items-center rounded-md border border-input bg-background/60 px-3",children:e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:Ys(ms)})}),e.jsx(v,{variant:"outline",size:"icon",onClick:jt,hoverText:"Edit inactivity timeout",className:"shrink-0 bg-background/60 hover:bg-muted/50",children:e.jsx(es,{className:"size-4"})})]})]})]}),e.jsxs(Xt,{defaultValue:"tenants",className:"mt-2",children:[e.jsxs(Jt,{layout:"underlined",className:"mb-6",children:[e.jsx(ye,{value:"tenants",variant:"underlined",children:"Tenants"}),e.jsx(ye,{value:"members",variant:"underlined",children:"Organization Members"}),e.jsx(ye,{value:"tokens",variant:"underlined",children:"Management Tokens"}),p&&t&&e.jsx(ye,{value:"regions",variant:"underlined",children:"Available Regions"}),w&&e.jsx(ye,{value:"sso",variant:"underlined",children:"SSO"}),t&&e.jsx(ye,{value:"audit-log",variant:"underlined",children:"Audit Log"}),p&&t&&e.jsx(ye,{value:"user-groups",variant:"underlined",children:"User Groups"})]}),e.jsx(Ne,{value:"tenants",children:e.jsx(ht,{tenants:be,expandedTenantIds:W,setExpandedTenantIds:X,onArchive:Y,onEditTags:t&&p?U:void 0,defaultOrganizationId:s,canManageOrganization:p})}),e.jsx(Ne,{value:"members",children:$e.error instanceof ke&&((Os=$e.error.response)==null?void 0:Os.status)===403?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"You must be an organization owner to view members."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[p&&e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(v,{onClick:()=>Ze.emit("create-organization-invite",{organizationId:s,organizationName:re}),children:"Invite Member"})}),T!=null&&T.members&&T.members.length>0?e.jsx(Ce,{data:T.members,columns:vt,rowKey:a=>a.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No members found."})]}),xs&&xs.length>0&&e.jsx("div",{children:e.jsx(Ce,{data:xs,columns:bt,rowKey:a=>a.metadata.id})})]})}),p&&t&&e.jsx(Ne,{value:"regions",children:ve.isLoading?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(fs,{})}):ve.error instanceof ke&&((Us=ve.error.response)==null?void 0:Us.status)===403?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"You must be an organization owner to view available regions."}):ve.error?e.jsx("div",{className:"py-8 text-center text-sm text-destructive",children:"Failed to load available regions."}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"Regions where new tenants can be deployed for this organization."}),e.jsxs("p",{children:["Need to configure which regions are available for a tenant, or looking for a new region?"," ",n.enabled?e.jsxs(e.Fragment,{children:[e.jsx(v,{type:"button",variant:"link",className:"h-auto p-0 text-sm font-normal",onClick:()=>n.show(),children:"Open support chat"}),", or"," "]}):null,e.jsx("a",{href:Hs,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"Schedule office hours"}),"."]})]}),(Ps=ve.data)!=null&&Ps.rows&&ve.data.rows.length>0?e.jsx(Ce,{data:ve.data.rows,columns:Nt,rowKey:a=>`${a.shardClass}:${a.provider}:${a.region}:${a.shardName??""}`}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No deployment regions are configured."})]})}),e.jsx(Ne,{value:"tokens",children:je.error instanceof ke&&((Fs=je.error.response)==null?void 0:Fs.status)===403?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"You must be an organization owner to view management tokens."}):e.jsxs(e.Fragment,{children:[p&&e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(v,{onClick:()=>A(!0),children:"Create Token"})}),(Is=je.data)!=null&&Is.rows&&je.data.rows.length>0?e.jsx(Ce,{data:je.data.rows,columns:St,rowKey:a=>a.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No management tokens found."})]})}),w&&e.jsx(Ne,{value:"sso",children:ys.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(fs,{})}):ls?e.jsxs("div",{className:"space-y-6",children:[e.jsx(Ca,{orgId:s,onConfigLoaded:ft}),p&&e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border/50 bg-muted/10 p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:"Force SSO"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Require all organization members to sign in with SSO. All other login methods will be disabled."})]}),e.jsx(ct,{checked:((zs=Ns.data)==null?void 0:zs.forceSSO)??!1,onCheckedChange:a=>Ss.mutate(a),disabled:Ns.isLoading||Ss.isPending})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold",children:"SSO Domains"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Domains associated with your organization for SSO login. Members signing in with a verified domain will be automatically directed to your identity provider."})]}),se&&!te.isLoading&&(!te.data||te.data.length===0)&&e.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-yellow-500/50 bg-yellow-500/10 px-4 py-3 text-sm",children:[e.jsx(dt,{className:"mt-0.5 h-4 w-4 shrink-0 text-yellow-500"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"SSO is configured but no domains are set up."}),e.jsx("p",{className:"mt-0.5 text-muted-foreground",children:"Without a verified domain, members will not be automatically redirected to your identity provider. Add a domain below to complete your SSO setup."})]})]}),e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx($,{placeholder:"example.com",value:Re,onChange:a=>Be(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Cs()},className:"max-w-sm",disabled:C}),e.jsx(v,{variant:"outline",size:"sm",onClick:Cs,disabled:C||!Re.trim(),leftIcon:e.jsx(yn,{className:"size-4"}),children:"Add Domain"})]})}),te.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(fs,{})}):te.data&&te.data.length>0?e.jsx(Ce,{data:te.data.map(a=>({domain:a.ssoDomain,verified:a.verified,verification_token:a.verificationToken})),columns:yt,rowKey:a=>a.domain}):e.jsx("div",{className:"py-8 text-center"}),te.data&&te.data.length>0&&e.jsxs("div",{className:"rounded-md border border-muted bg-muted/30 px-4 py-3 text-sm text-muted-foreground",children:[e.jsx("p",{children:"To verify your domain, add a DNS TXT record with the value:"}),e.jsx("p",{className:"mt-1 font-mono",children:"hatchet-sso-verify={verification_token}"}),e.jsx("p",{className:"mt-2",children:"It may take a few minutes for DNS changes to propagate and for the verified status to update."})]})]})]}):e.jsxs("div",{className:"py-16 text-center text-sm text-muted-foreground",children:["SSO is not enabled for this organization. Please"," ",e.jsx("a",{href:Hs,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"contact us"})," ","to get access."]})}),t&&e.jsx(Ne,{value:"audit-log",children:e.jsx(Fn,{orgId:s})}),p&&t&&e.jsx(Ne,{value:"user-groups",children:e.jsx(Ea,{organizationId:s,allOrgMembers:(T==null?void 0:T.members)??[],allTenantTags:ds})})]})]}),p&&D&&e.jsx(Aa,{open:!!D,onOpenChange:a=>!a&&k(null),member:D,organizationName:re,onSuccess:()=>$e.refetch()}),p&&e.jsx(La,{open:N,onOpenChange:A,organizationId:s,organizationName:re,onSuccess:()=>je.refetch(),allTenantTags:ds}),p&&L&&e.jsx(Oa,{open:!!L,onOpenChange:a=>!a&&B(null),token:L,organizationName:re,onSuccess:()=>je.refetch()}),p&&ee&&e.jsx(Da,{open:!!ee,onOpenChange:a=>!a&&P(null),invite:ee,organizationName:re,onSuccess:()=>ks.refetch()}),O&&be.find(a=>(a==null?void 0:a.id)===O.id)&&e.jsx(xt,{open:!!O,onOpenChange:a=>!a&&Y(null),tenant:O,tenantName:((Gs=be.find(a=>(a==null?void 0:a.id)===O.id))==null?void 0:Gs.name)||O.id,organizationName:re,onSuccess:()=>{h.invalidateQueries({queryKey:["organization:get",s]}),h.invalidateQueries({queryKey:["tenant:get"]})}}),p&&t&&E&&e.jsx(Ua,{open:!!E,onOpenChange:a=>!a&&U(null),organizationId:s,tenantId:E.id,tenantName:E.name||E.id,allTenantTags:ds,onSuccess:()=>h.invalidateQueries({queryKey:["organization:get",s]})})]}):e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No organization found for this tenant."})})})}function rr(){var d;const{tenantMemberships:s}=Zt(),t=Te(),[n,r]=i.useState(null),[l,o]=i.useState([]),x=i.useRef(null),{lastTenantId:c}=it(),f=i.useMemo(()=>(s==null?void 0:s.map(u=>u.tenant?{id:u.tenant.metadata.id,name:u.tenant.name,status:ot.ACTIVE,slug:u.tenant.slug,canManage:u.role===Je.OWNER||u.role===Je.ADMIN}:null).filter(u=>u!==null))||[],[s]);return i.useEffect(()=>{var p;const u=c??((p=f[0])==null?void 0:p.id);if(!u){x.current=null;return}x.current!==u&&(x.current=u,l.length||o([u]))},[f,l.length,c]),e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(lt,{title:"Tenants",description:"Review the tenants associated with your account."}),e.jsx(ht,{tenants:f,expandedTenantIds:l,setExpandedTenantIds:o,onArchive:r,canManageOrganization:!1})]}),n&&f.find(u=>(u==null?void 0:u.id)===n.id)&&e.jsx(xt,{open:!!n,onOpenChange:u=>!u&&r(null),tenant:n,tenantName:((d=f.find(u=>(u==null?void 0:u.id)===n.id))==null?void 0:d.name)||n.id,organizationName:"",onSuccess:()=>{t.invalidateQueries({queryKey:["tenant:get"]})}})]})}function Xs(s){if(!s)return"never";try{const t=new Date(s);return t{const m=new Set;for(const h of s){const j=h.tags;j==null||j.forEach(b=>m.add(b))}return Array.from(m).sort()},[s]),u=i.useMemo(()=>c.length===0?s:s.filter(m=>{const h=m.tags??[];return c.every(j=>h.includes(j))}),[s,c]),p=m=>f(h=>h.includes(m)?h.filter(j=>j!==m):[...h,m]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[d.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Filter by tag:"}),d.map(m=>e.jsx("button",{type:"button",onClick:()=>p(m),className:"focus:outline-none",children:e.jsx(F,{variant:c.includes(m)?"default":"outline",className:"cursor-pointer text-xs",children:m})},m)),c.length>0&&e.jsxs("button",{type:"button",onClick:()=>f([]),className:"text-xs text-muted-foreground hover:text-foreground focus:outline-none",children:[e.jsx(Ie,{className:"inline size-3"})," Clear"]})]}),x&&e.jsx("div",{className:"ml-auto shrink-0",children:e.jsx(v,{onClick:()=>Ze.emit("create-new-tenant",{defaultOrganizationId:o,allTenantTags:d}),children:"Add Tenant"})})]}),u.length?e.jsx(un,{type:"multiple",value:t,onValueChange:n,className:"space-y-3 rounded-md border bg-background p-3",children:u.map((m,h)=>e.jsxs("div",{children:[e.jsx(Pa,{tenant:m,isExpanded:t.includes(m.id),onArchive:r,onEditTags:l,canManageOrganization:x,organizationId:o},m.id),h0?"No tenants match the selected tags.":"No tenants found."})]})}function Pa({tenant:s,isExpanded:t,onArchive:n,onEditTags:r,canManageOrganization:l,organizationId:o}){var j,b,S;const{tenantMemberListQuery:x,tenantInviteListQuery:c}=bs(),f=G({...x(s.id),enabled:t}),d=G({...c(s.id),enabled:t}),{isControlPlaneEnabled:u}=_e(),p=((j=f.data)==null?void 0:j.rows)||[],m=((b=d.data)==null?void 0:b.rows)||[],h=l||!u&&!!s.canManage;return e.jsxs(mn,{value:s.id,className:"overflow-hidden bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2",children:[e.jsx(xn,{headerClassName:"min-w-0 flex-1",className:"py-1 hover:no-underline [&>svg]:text-muted-foreground",children:e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left",children:[e.jsx("p",{className:"min-w-0 truncate font-medium leading-5",children:s.name||s.id}),e.jsx(dn,{region:s.region}),e.jsx(ka,{tags:s.tags??[]})]})}),e.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[e.jsxs("div",{className:"hidden items-center gap-2 lg:flex",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:s.id}),e.jsx(vs,{text:s.id})]}),e.jsx(Ga,{row:{...s,metadata:{id:s.id}},onArchive:n,onEditTags:r,canManageOrganization:l})]})]}),e.jsx(hn,{className:"border-border/70 px-4 pb-4 pt-4",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Members"}),l&&o&&u?e.jsx(v,{onClick:()=>Ze.emit("add-org-member-to-tenant",{tenantId:s.id,organizationId:o}),children:"Add Member"}):h?e.jsx(v,{onClick:()=>Ze.emit("create-tenant-invite",{tenantId:s.id}),children:"Invite Member"}):null]}),f.isLoading?e.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"Loading members..."}):f.isError&&f.error instanceof ke&&[401,403].includes(((S=f.error.response)==null?void 0:S.status)??0)?e.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"You must be a tenant admin or owner to view members."}):p.length>0?e.jsx(Fa,{tenantId:s.id,members:p,canManage:h,canManageOrganization:l,onMembersChanged:()=>f.refetch()}):e.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"No members found."}),m.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"text-sm font-medium",children:"Pending Invites"}),e.jsx(za,{invites:m})]})]})})]})}function Fa({tenantId:s,members:t,canManage:n,canManageOrganization:r,onMembersChanged:l}){const[o,x]=i.useState(null),{isControlPlaneEnabled:c}=_e(),f=i.useMemo(()=>[{columnLabel:"Name",cellRenderer:d=>e.jsx("span",{className:"font-medium",children:d.user.name})},{columnLabel:"Email",cellRenderer:d=>e.jsx("span",{className:"font-mono text-sm",children:d.user.email})},{columnLabel:"Role",cellRenderer:d=>e.jsx(F,{variant:"outline",children:d.role})},{columnLabel:"Joined",cellRenderer:d=>e.jsx(js,{date:d.metadata.createdAt})},...c?[{columnLabel:"Source",cellRenderer:d=>d.manually_added?e.jsx(F,{variant:"outline",children:"Direct"}):e.jsx(F,{variant:"outline",children:"Tags"})}]:[],...n?[{columnLabel:"Actions",cellRenderer:d=>e.jsx(An,{member:d,tenantId:s,onEditRoleClick:!c||d.manually_added?x:()=>{},onChangePasswordClick:()=>{},onDeleteSuccess:l})}]:[]],[n,c,l,s]);return e.jsxs(e.Fragment,{children:[e.jsx(Ce,{columns:f,data:t,rowKey:d=>d.metadata.id}),o&&e.jsx(Ia,{tenantId:s,member:o,canManageOrganization:r,onClose:()=>x(null),onSuccess:()=>{x(null),l()}})]})}function Ia({tenantId:s,member:t,canManageOrganization:n,onClose:r,onSuccess:l}){const{toast:o}=ln(),{handleApiError:x}=ze(),{tenantMemberUpdateMutation:c}=bs(),f=c(s,t.metadata.id),d=_({...f,mutationFn:f.mutationFn,onSuccess:l,onError:p=>{x(p),r()}}),u=p=>{if(t.role===Je.OWNER&&!n){o({title:"Error",description:"Owner role management must be done through organization membership",duration:5e3}),r();return}d.mutate(p)};return e.jsx(pe,{open:!0,onOpenChange:r,children:e.jsx(Un,{isLoading:d.isPending,onSubmit:u,member:t,isCloudEnabled:!0,canSetOwnerRole:n})})}function za({invites:s}){return e.jsxs("div",{className:"rounded-md border border-border/70",children:[e.jsxs("div",{className:"hidden grid-cols-[minmax(0,1.6fr)_120px_140px_140px] gap-3 border-b border-border/70 bg-muted/20 px-4 py-2 text-xs font-medium uppercase tracking-wide text-muted-foreground md:grid",children:[e.jsx("span",{children:"Email"}),e.jsx("span",{children:"Role"}),e.jsx("span",{children:"Created"}),e.jsx("span",{children:"Expires"})]}),e.jsx("div",{children:s.map(t=>e.jsxs("div",{className:"grid gap-3 border-b border-border/50 px-4 py-3 last:border-b-0 md:grid-cols-[minmax(0,1.6fr)_120px_140px_140px] md:items-center",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:"Email"}),e.jsx("p",{className:"font-mono text-sm",children:t.email})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:"Role"}),e.jsx(F,{variant:"outline",children:t.role})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:"Created"}),e.jsx(js,{date:t.metadata.createdAt})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:"Expires"}),e.jsx(js,{date:t.expires})]})]},t.metadata.id))})]})}function Ga({row:s,onArchive:t,onEditTags:n,canManageOrganization:r}){const l=on();return e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsxs(Ue,{align:"end",children:[e.jsxs(Z,{onClick:()=>l({to:nt.tenantRoute.to,params:{tenant:s.id}}),children:[e.jsx(Cn,{className:"mr-2 size-4"}),"View Tenant"]}),r&&n&&e.jsxs(Z,{onClick:()=>n(s),children:[e.jsx(es,{className:"mr-2 size-4"}),"Edit Tags"]}),r&&e.jsxs(Z,{onClick:()=>t({id:s.id,status:s.status}),children:[e.jsx(me,{className:"mr-2 size-4"}),"Archive Tenant"]})]})]})}function qa({row:s,currentUserEmail:t,onDelete:n}){const r=t===s.email;return e.jsxs(Ae,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(v,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Pe,{className:"size-4"})})}),e.jsx(Ue,{align:"end",children:r?e.jsx(tn,{children:e.jsxs(nn,{children:[e.jsx(an,{asChild:!0,children:e.jsxs(Z,{disabled:!0,className:"cursor-not-allowed text-gray-400",children:[e.jsx(me,{className:"mr-2 size-4"}),"Remove Member"]})}),e.jsx(rn,{children:e.jsx("p",{children:"Cannot remove yourself"})})]})}):e.jsxs(Z,{onClick:()=>n(s),children:[e.jsx(me,{className:"mr-2 size-4"}),"Remove Member"]})})]})}export{ar as C,rr as O}; diff --git a/hatchetembed/dashboard/assets/index-CQOYucXO.js b/hatchetembed/dashboard/assets/index-CQOYucXO.js new file mode 100644 index 0000000000..d6fabff32e --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CQOYucXO.js @@ -0,0 +1 @@ +import{h as r,j as n,b as s,q as o,bH as f,f as d,r as u}from"./index-wypz6hY5.js";import{I as l}from"./invite-modal-DH7a-93Y.js";import{p as c}from"./use-pending-invites-DaP3hNjC.js";import"./use-analytics-BZxgE2Kk.js";import"./tenant-wrapper-DXQKBTdd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9f8505da-2052-4af4-8387-6407f57f29a4",e._sentryDebugIdIdentifier="sentry-dbid-9f8505da-2052-4af4-8387-6407f57f29a4")}catch{}})();async function h(e){const[{isCloudEnabled:t},{isControlPlaneEnabled:a}]=await Promise.all([o.fetchQuery(f),d()]),{inviteCount:i}=await o.fetchQuery(c(t,a));if(i===0)throw u({to:s.authenticatedRoute.to})}function I(){const e=r();return n.jsx("div",{className:"flex min-h-full flex-1 items-center justify-center",children:n.jsx(l,{isOpen:!0,onClose:()=>e({to:s.authenticatedRoute.to})})})}export{I as default,h as loader}; diff --git a/hatchetembed/dashboard/assets/index-CZayBdOE.js b/hatchetembed/dashboard/assets/index-CZayBdOE.js new file mode 100644 index 0000000000..9f02e7a872 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CZayBdOE.js @@ -0,0 +1 @@ +import{j as e,b1 as E,u as A,t as D,$ as k,a0 as j,a1 as g,L as w,I as R,b2 as L,a5 as P,a6 as _,a7 as F,a8 as H,a9 as M,B as h,S as T,e as O,o as K,s as b,ch as f,k as x,N as $,O as V,aH as B,bj as G,l as v,p as S,a as C,_ as I}from"./index-wypz6hY5.js";import{S as Q}from"./settings-page-header-Dal4BvfD.js";import{S as q}from"./secret-copier-BNLi8BbD.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="e10c7bbf-333a-4661-a013-83190913af84",t._sentryDebugIdIdentifier="sentry-dbid-e10c7bbf-333a-4661-a013-83190913af84")}catch{}})();function z({token:t,onRevokeClick:n}){return e.jsx(E,{row:t,actions:[{label:"Revoke",onClick:()=>n(t)}]})}const y={"3 months":`${2160*60*60}s`,"1 year":`${365*24*60*60}s`,"100 years":`${100*365*24*60*60}s`},U=K({name:b().min(1).max(255),expiresIn:b().optional()});function W({className:t,token:n,...a}){var d,s,l;const{register:r,handleSubmit:i,control:o,formState:{errors:m}}=A({resolver:D(U)}),c=((s=(d=m.name)==null?void 0:d.message)==null?void 0:s.toString())||((l=a.fieldErrors)==null?void 0:l.name);return n?e.jsxs(k,{className:"w-fit max-w-[700px]",children:[e.jsx(j,{children:e.jsx(g,{children:"Keep it secret, keep it safe"})}),e.jsx("p",{className:"text-sm",children:"This is the only time we will show you this token. Make sure to copy it somewhere safe."}),e.jsx(q,{secrets:{HATCHET_CLIENT_TOKEN:n},className:"text-sm",maxWidth:"calc(700px - 4rem)",copy:!0})]}):e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(j,{children:e.jsx(g,{children:"Create a new API token"})}),e.jsx("div",{className:O("grid gap-6",t),children:e.jsx("form",{onSubmit:i(u=>{a.onSubmit(u)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"email",children:"Name"}),e.jsx(R,{...r("name"),id:"api-token-name",placeholder:"My Token",autoCapitalize:"none",autoCorrect:"off",disabled:a.isLoading}),c&&e.jsx("div",{className:"text-sm text-red-500",children:c})]}),e.jsx(w,{htmlFor:"expiresIn",children:"Expires In"}),e.jsx(L,{control:o,defaultValue:y["100 years"],name:"expiresIn",render:({field:u})=>e.jsxs(P,{onValueChange:u.onChange,...u,children:[e.jsx(_,{id:"expiresIn",children:e.jsx(F,{id:"expiresInSelected",placeholder:"Select a duration"})}),e.jsx(H,{children:Object.entries(y).map(([N,p])=>e.jsx(M,{value:p,children:N},p))})]})}),e.jsxs(h,{disabled:a.isLoading,children:[a.isLoading&&e.jsx(T,{}),"Generate token"]})]})})})]})}function X({className:t,...n}){return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(j,{children:e.jsx(g,{children:"Delete token"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to revoke the API token ",n.apiToken.name,"? This action will immediately prevent any services running with this token from dispatching events or executing steps."]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(h,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(h,{variant:"destructive",onClick:()=>{n.onSubmit(n.apiToken)},children:[n.isLoading&&e.jsx(T,{}),"Revoke API token"]})]})]})]})}function te(){var c,d;const{tenantId:t}=f(),[n,a]=x.useState(!1),[r,i]=x.useState(null),o=$({...V.tokens.list(t)}),m=x.useMemo(()=>[{columnLabel:"Name",cellRenderer:s=>e.jsx("div",{children:s.name})},{columnLabel:"Created",cellRenderer:s=>e.jsx(B,{date:s.metadata.createdAt})},{columnLabel:"Expires",cellRenderer:s=>e.jsx("div",{children:new Date(s.expiresAt).toLocaleDateString()})},{columnLabel:"Actions",cellRenderer:s=>e.jsx(z,{token:s,onRevokeClick:l=>{i(l)}})}],[]);return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(Q,{title:"API token settings",description:"Create and revoke API tokens used by workers and external systems to authenticate with this tenant."}),e.jsx("div",{className:"mb-4 flex flex-row items-baseline justify-end",children:e.jsx(h,{onClick:()=>a(!0),children:"Create API Token"},"create-api-token")}),(((c=o.data)==null?void 0:c.rows)||[]).length>0?e.jsx(G,{columns:m,data:((d=o.data)==null?void 0:d.rows)||[],rowKey:s=>s.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No API tokens found. Create a token to allow workers to connect to and communicate with the Hatchet Engine."}),n&&e.jsx(J,{showTokenDialog:n,setShowTokenDialog:a,onSuccess:()=>{o.refetch()}}),r&&e.jsx(Y,{apiToken:r,setShowTokenRevoke:()=>i(null),onSuccess:()=>{i(null),o.refetch()}})]})})}function J({showTokenDialog:t,setShowTokenDialog:n,onSuccess:a}){const{tenantId:r}=f(),[i,o]=x.useState(),[m,c]=x.useState({}),{handleApiError:d}=v({setFieldErrors:c}),s=S({mutationKey:["api-token:create",r],mutationFn:async l=>(await C.apiTokenCreate(r,l)).data,onSuccess:l=>{o(l.token),a()},onError:d});return e.jsx(I,{open:t,onOpenChange:n,children:e.jsx(W,{isLoading:s.isPending,onSubmit:s.mutate,token:i,fieldErrors:m})})}function Y({apiToken:t,setShowTokenRevoke:n,onSuccess:a}){const{tenantId:r}=f(),{handleApiError:i}=v({}),o=S({mutationKey:["api-token:revoke",r,t],mutationFn:async()=>{await C.apiTokenUpdateRevoke(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(I,{open:!!t,onOpenChange:n,children:e.jsx(X,{apiToken:t,isLoading:o.isPending,onSubmit:()=>o.mutate(),onCancel:()=>n(!1)})})}export{te as default}; diff --git a/hatchetembed/dashboard/assets/index-Cav1D8tQ.js b/hatchetembed/dashboard/assets/index-Cav1D8tQ.js new file mode 100644 index 0000000000..7dce7c201e --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Cav1D8tQ.js @@ -0,0 +1 @@ +import{h as r,n as d,m as l,p as c,q as u,b as m,j as e,B as f,H as g}from"./index-wypz6hY5.js";import{O as x}from"./organization-selector-BF1UJlxh.js";import"./global-emitter-Y_aFw8Zc.js";import"./shard-deployment-key-CJfQX3l3.js";import"./PlusIcon-Cn-pCVk3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="a573d813-bbf2-480a-aaf8-721cc2ab4d03",t._sentryDebugIdIdentifier="sentry-dbid-a573d813-bbf2-480a-aaf8-721cc2ab4d03")}catch{}})();function v(){const t=r(),{userUpdateLogoutMutation:a}=d(),{organizations:s,tenantMemberships:i}=l(),n=c({...a(),onSettled:()=>{u.clear(),t({to:m.authLoginRoute.to})}}),o=((s==null?void 0:s.length)??0)===1?s[0].name:void 0;return e.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[e.jsxs("div",{className:"absolute top-4 right-4 z-10 flex items-center gap-2",children:[e.jsx(x,{memberships:i??[]}),e.jsx(f,{variant:"ghost",size:"sm",onClick:()=>n.mutate(),disabled:n.isPending,children:"Sign out"})]}),e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center gap-6 px-4 text-center",children:[e.jsx(g,{className:"h-10 w-auto"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:o?`You've joined ${o}`:"You've joined the organization"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You're not a member of any tenants yet. Contact your organization admin to be added to a tenant."})]})]})})]})}export{v as default}; diff --git a/hatchetembed/dashboard/assets/index-Cbzx2tRp.js b/hatchetembed/dashboard/assets/index-Cbzx2tRp.js new file mode 100644 index 0000000000..894548dbc5 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Cbzx2tRp.js @@ -0,0 +1 @@ +import{j as t,D as n,E as o,b as i,k as l,F as c,f as d,q as u,c as f,a as m,r as s}from"./index-wypz6hY5.js";import{T as y}from"./top-nav-CUkIIMqx.js";import{u as x}from"./use-analytics-BZxgE2Kk.js";import"./organization-selector-BF1UJlxh.js";import"./global-emitter-Y_aFw8Zc.js";import"./shard-deployment-key-CJfQX3l3.js";import"./PlusIcon-Cn-pCVk3.js";import"./use-pending-invites-DaP3hNjC.js";import"./resource-limit-status-ynncxZIe.js";import"./index-C8__5p50.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="cc2b14c0-26f3-4b8a-ad0a-877a66fa2578",e._sentryDebugIdIdentifier="sentry-dbid-cc2b14c0-26f3-4b8a-ad0a-877a66fa2578")}catch{}})();async function C({request:e}){try{const{isControlPlaneEnabled:r}=await d(),a=await u.fetchQuery({queryKey:["user:get"],queryFn:async()=>(await(r?f.cloudUserGetCurrent():m.userGetCurrent())).data});if(a.emailVerified&&e.url.includes("/onboarding/verify-email"))throw s({to:i.authenticatedRoute.to});return{user:a}}catch(r){if(r instanceof Response)throw r;if(!e.url.includes("/auth/login")&&!e.url.includes("/auth/register"))throw s({to:i.authLoginRoute.to})}}function p(){const e=o({from:i.onboardingVerifyRoute.to}),{capture:r}=x();return l.useEffect(()=>{r("onboarding_verify_email_viewed")},[r]),e!=null&&e.user?t.jsxs("div",{className:"flex h-full w-full flex-1 flex-col",children:[t.jsx(y,{user:e.user,tenantMemberships:[]}),t.jsx("div",{className:"container relative hidden flex-1 flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0 -mt-48",children:t.jsx("div",{className:"mx-auto w-screen lg:p-8",children:t.jsxs("div",{className:"mx-auto flex w-40 flex-col justify-center space-y-6 sm:w-[350px]",children:[t.jsx("div",{className:"flex flex-col space-y-2 text-center",children:t.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Verify your email"})}),t.jsx("div",{className:"my-4 text-sm",children:"Please contact your Hatchet instance administrator to verify your email. Refresh this page once your email has been verified."})]})})})]}):t.jsx(c,{})}function D(){return t.jsx(n,{children:t.jsx(p,{})})}export{D as default,C as loader}; diff --git a/hatchetembed/dashboard/assets/index-CgbK7Qzb.js b/hatchetembed/dashboard/assets/index-CgbK7Qzb.js new file mode 100644 index 0000000000..393eaa479a --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CgbK7Qzb.js @@ -0,0 +1,6 @@ +var Ts=Object.defineProperty;var Ss=(e,s,a)=>s in e?Ts(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a;var pt=(e,s,a)=>Ss(e,typeof s!="symbol"?s+"":s,a);import{v as As,k as U,db as Cs,dc as Re,dd as js,de as Qn,df as Jn,dg as Ie,dh as oe,di as Xn,dj as Ls,dk as Ne,dl as Os,dm as Fi,dn as Ps,dp as Zn,dq as Ms,dr as Fs,ds as Ds,dt as Bs,du as me,dv as et,dw as Di,dx as Bi,dy as Gi,dz as Gs,dA as re,dB as Te,dC as Vi,dD as Vs,dE as Us,ch as Ui,dF as ye,j as R,dG as zs,d2 as Ws,dH as Ks,dI as gt,dJ as Kn,N as Hn,O as mt,g as Hs,b as Yn,aH as pe,dK as X,dL as Ys,bF as zi,dM as Wi,B as $s,dN as Qs,dO as Js,b8 as $n,aA as Ki,cj as Xs,ck as Zs,a as rt,cl as eo,cm as ro,dP as nt,cn as no,co as to,cp as ao,dQ as io,b6 as so,b7 as oo,ct as uo,dR as fo,dS as tt,dT as co,dU as lo,dV as Hi,dW as Yi,dX as at,dY as ho,dZ as vo,d_ as po,d$ as go,e0 as it,e1 as st,e2 as mo,e3 as yo,e4 as $i,e5 as Qi,e6 as Ji,e7 as Xi,e8 as bo,e9 as Zi,ea as _o,eb as wo,ec as Eo,ed as xo,ee as qo,ef as ko,eg as Ro,eh as Io,ei as No,ej as To,ek as So,el as Ao,em as Co,c7 as jo,bY as Lo,en as Oo,eo as Po,ep as Mo,eq as Fo,er as Do,es as qe,aF as Bo,d5 as Go,et as Vo,S as Uo,eu as zo,d7 as yt,ev as bt,i as es,ew as Wo,ex as Ko,aa as Ho,a2 as Yo,bs as _t,bt as wt,bu as ie,bv as se,ey as $o,ez as Qo,eA as Jo}from"./index-wypz6hY5.js";import{R as Xo}from"./resource-not-found-C1NYDT14.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a07ff9e6-fa30-42d9-80d9-ddeac49e6bef",e._sentryDebugIdIdentifier="sentry-dbid-a07ff9e6-fa30-42d9-80d9-ddeac49e6bef")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zo=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],eu=As("scroll-text",Zo);function ru({title:e,titleId:s,...a},n){return U.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),e?U.createElement("title",{id:s},e):null,U.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const nu=U.forwardRef(ru);var Le,Et;function tu(){if(Et)return Le;Et=1;var e=Cs(),s=Re(),a=js();function n(r,o){return r&&r.length?e(r,s(o,2),a):void 0}return Le=n,Le}var Oe,xt;function ot(){if(xt)return Oe;xt=1;function e(s,a){for(var n=-1,r=s==null?0:s.length;++n{const{tenantId:e}=Ui(),{workflowRun:s,workflowConfig:a,isLoading:n}=ye();return n||!s?R.jsx("div",{children:"Loading..."}):R.jsxs("div",{className:"flex flex-col gap-4",children:[R.jsx(zs,{}),R.jsx("div",{className:"flex flex-row items-center justify-between",children:R.jsxs("div",{className:"flex w-full flex-row items-center justify-between",children:[R.jsx("div",{children:R.jsxs("h2",{className:"flex flex-row items-center gap-4 text-2xl font-bold leading-tight text-foreground",children:[R.jsx(nu,{className:"mt-1 h-5 w-5"}),s.displayName]})}),R.jsxs("div",{className:"flex flex-row items-center gap-2",children:[R.jsx(Ws,{workflowConfig:a}),R.jsx(Ks,{workflowId:s.workflowId}),R.jsx(gt,{actionType:"replay",paramOverrides:{externalIds:[s.metadata.id]},disabled:!Kn.includes(s.status),showModal:!1,showLabel:!0}),R.jsx(gt,{actionType:"cancel",paramOverrides:{externalIds:[s.metadata.id]},disabled:Kn.includes(s.status),showModal:!1,showLabel:!0})]})]})}),s.parentTaskExternalId&&R.jsx(xu,{tenantId:e,parentTaskExternalId:s.parentTaskExternalId}),R.jsx("div",{className:"flex flex-row items-center gap-2",children:R.jsx(Eu,{})})]})},Eu=()=>{const{workflowRun:e}=ye(),s=[];if(!e)return null;s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Created ",R.jsx(pe,{date:e.createdAt})]},"created")),e.startedAt?s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Started ",R.jsx(pe,{date:e.startedAt})]},"started")):s.push(R.jsx("div",{className:"text-sm text-muted-foreground",children:"Running"},"running")),e.status===X.CANCELLED&&e.finishedAt&&s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Cancelled ",R.jsx(pe,{date:e.finishedAt})]},"finished")),e.status===X.FAILED&&e.finishedAt&&s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Failed ",R.jsx(pe,{date:e.finishedAt})]},"finished")),e.status===X.COMPLETED&&e.finishedAt&&s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Succeeded ",R.jsx(pe,{date:e.finishedAt})]},"finished")),e.duration&&s.push(R.jsxs("div",{className:"text-sm text-muted-foreground",children:["Run took ",Ys(e.duration)]},"duration"));const a=[];return s.forEach((n,r)=>{a.push(n),r{switch(e){case"graph":return R.jsx(Js,{});case"minimap":return R.jsx(Qs,{});case void 0:return null;default:const s=e;throw new Error(`Unhandled case: ${s}`)}},ku=()=>{const[e,s]=zi(Wi),a=e==="graph"?"minimap":"graph",{shape:n,isLoading:r,isError:o}=ye();return r||o||!n.some(d=>d.childrenStepIds.length>0)?null:R.jsx("div",{className:"sticky bottom-2 right-2 z-20 ml-auto mt-auto",children:R.jsx($s,{variant:"outline",size:"icon",onClick:()=>s(a),children:R.jsx(qu,{view:e})})})};function Ru({input:e}){return R.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:JSON.stringify(e,null,2)})}const Zt=100,Iu={};function Nu(e){return`${e.timestamp??""}-${e.line??""}`}function Tu(e){return e.map(s=>({timestamp:s.createdAt,line:s.message,level:s.level,metadata:s.metadata,attempt:s.attempt,taskExternalId:s.taskExternalId,taskDisplayName:s.taskDisplayName}))}function Su({taskExternalIds:e}){const{tenantId:s}=Ui(),a=Ki(),[n,r]=U.useState(""),o=U.useMemo(()=>Xs(n),[n]),d=e.join(","),t=Zs({queryKey:["workflow-run-logs",d,o.level,o.search,o.attempt],queryFn:async({pageParam:l})=>(await rt.v1TenantLogLineList(s,{limit:Zt,taskExternalIds:e,...l&&{until:l},...o.level&&{levels:[ro[o.level]]},...o.search&&{search:o.search},...o.attempt&&{attempt:o.attempt},order_by_direction:eo.DESC})).data,initialPageParam:void 0,getNextPageParam:l=>{const h=l.rows??[];if(!(h.length0}),u=U.useMemo(()=>{var b;const l=new Set,h=[];for(const m of((b=t.data)==null?void 0:b.pages)??[])for(const v of Tu(m.rows??[])){const y=Nu(v);l.has(y)||(l.add(y),h.push(v))}return h},[t.data]),f=U.useCallback(()=>{t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[t]),i=U.useCallback(l=>{a.open({type:"task-run-details",content:{taskRunId:l,defaultOpenTab:nt.Activity,showViewTaskRunButton:!0}})},[a]),c=!t.isLoading&&u.length===0;return R.jsxs("div",{className:"my-4 flex flex-col gap-y-2 max-h-[40rem] min-h-[25rem]",children:[R.jsx(no,{value:n,onChange:r,onSubmit:r,getAutocomplete:(l,h)=>ao(l,h),applySuggestion:to,autocompleteContext:Iu,placeholder:"Search logs...",filterChips:[{key:"level:",label:"Level",description:"Filter by log level"},{key:"attempt:",label:"Attempt",description:"Filter by attempt number"}]}),c&&R.jsx(io,{variant:"info",icon:R.jsx(eu,{className:"size-4"}),title:"Send logs to Hatchet",dismissible:!0,dismissKey:"hatchet:dismiss-logs-onboarding-hint",description:"Configure Hatchet as a log sink to view your task logs for this run.",actions:R.jsx(so,{doc:oo.v1.logging,label:"View logging docs",variant:"text"})}),R.jsx(uo,{logs:u,onScrollToBottom:f,isLoading:t.isLoading,onViewRun:i,showTaskName:!0,emptyMessage:"No logs found for this run."},n+d)]})}function dt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fr,ea;function Au(){if(ea)return fr;ea=1;var e=os(),s=4;function a(n){return e(n,s)}return fr=a,fr}var cr,ra;function ds(){if(ra)return cr;ra=1;var e=fo();function s(a){return typeof a=="function"?a:e}return cr=s,cr}var lr,na;function fs(){if(na)return lr;na=1;var e=ot(),s=tt(),a=ds(),n=re();function r(o,d){var t=n(o)?e:s;return t(o,a(d))}return lr=r,lr}var hr,ta;function cs(){return ta||(ta=1,hr=fs()),hr}var vr,aa;function Cu(){if(aa)return vr;aa=1;var e=tt();function s(a,n){var r=[];return e(a,function(o,d,t){n(o,d,t)&&r.push(o)}),r}return vr=s,vr}var pr,ia;function ls(){if(ia)return pr;ia=1;var e=co(),s=Cu(),a=Re(),n=re();function r(o,d){var t=n(o)?e:s;return t(o,a(d,3))}return pr=r,pr}var gr,sa;function ju(){if(sa)return gr;sa=1;var e=Object.prototype,s=e.hasOwnProperty;function a(n,r){return n!=null&&s.call(n,r)}return gr=a,gr}var mr,oa;function hs(){if(oa)return mr;oa=1;var e=ju(),s=lo();function a(n,r){return n!=null&&s(n,r,e)}return mr=a,mr}var yr,ua;function Lu(){if(ua)return yr;ua=1;var e=Hi(),s=me(),a=Yi(),n=re(),r=Ne(),o=Te(),d=Xn(),t=at(),u="[object Map]",f="[object Set]",i=Object.prototype,c=i.hasOwnProperty;function l(h){if(h==null)return!0;if(r(h)&&(n(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||t(h)||a(h)))return!h.length;var b=s(h);if(b==u||b==f)return!h.size;if(d(h))return!e(h).length;for(var m in h)if(c.call(h,m))return!1;return!0}return yr=l,yr}var br,da;function vs(){if(da)return br;da=1;function e(s){return s===void 0}return br=e,br}var _r,fa;function Ou(){if(fa)return _r;fa=1;function e(s,a,n,r){var o=-1,d=s==null?0:s.length;for(r&&d&&(n=s[++o]);++o1?h.setNode(b,c):h.setNode(b)}),this},r.prototype.setNode=function(i,c){return e.has(this._nodes,i)?(arguments.length>1&&(this._nodes[i]=c),this):(this._nodes[i]=arguments.length>1?c:this._defaultNodeLabelFn(i),this._isCompound&&(this._parent[i]=a,this._children[i]={},this._children[a][i]=!0),this._in[i]={},this._preds[i]={},this._out[i]={},this._sucs[i]={},++this._nodeCount,this)},r.prototype.node=function(i){return this._nodes[i]},r.prototype.hasNode=function(i){return e.has(this._nodes,i)},r.prototype.removeNode=function(i){var c=this;if(e.has(this._nodes,i)){var l=function(h){c.removeEdge(c._edgeObjs[h])};delete this._nodes[i],this._isCompound&&(this._removeFromParentsChildList(i),delete this._parent[i],e.each(this.children(i),function(h){c.setParent(h)}),delete this._children[i]),e.each(e.keys(this._in[i]),l),delete this._in[i],delete this._preds[i],e.each(e.keys(this._out[i]),l),delete this._out[i],delete this._sucs[i],--this._nodeCount}return this},r.prototype.setParent=function(i,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=a;else{c+="";for(var l=c;!e.isUndefined(l);l=this.parent(l))if(l===i)throw new Error("Setting "+c+" as parent of "+i+" would create a cycle");this.setNode(c)}return this.setNode(i),this._removeFromParentsChildList(i),this._parent[i]=c,this._children[c][i]=!0,this},r.prototype._removeFromParentsChildList=function(i){delete this._children[this._parent[i]][i]},r.prototype.parent=function(i){if(this._isCompound){var c=this._parent[i];if(c!==a)return c}},r.prototype.children=function(i){if(e.isUndefined(i)&&(i=a),this._isCompound){var c=this._children[i];if(c)return e.keys(c)}else{if(i===a)return this.nodes();if(this.hasNode(i))return[]}},r.prototype.predecessors=function(i){var c=this._preds[i];if(c)return e.keys(c)},r.prototype.successors=function(i){var c=this._sucs[i];if(c)return e.keys(c)},r.prototype.neighbors=function(i){var c=this.predecessors(i);if(c)return e.union(c,this.successors(i))},r.prototype.isLeaf=function(i){var c;return this.isDirected()?c=this.successors(i):c=this.neighbors(i),c.length===0},r.prototype.filterNodes=function(i){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var l=this;e.each(this._nodes,function(m,v){i(v)&&c.setNode(v,m)}),e.each(this._edgeObjs,function(m){c.hasNode(m.v)&&c.hasNode(m.w)&&c.setEdge(m,l.edge(m))});var h={};function b(m){var v=l.parent(m);return v===void 0||c.hasNode(v)?(h[m]=v,v):v in h?h[v]:b(v)}return this._isCompound&&e.each(c.nodes(),function(m){c.setParent(m,b(m))}),c},r.prototype.setDefaultEdgeLabel=function(i){return e.isFunction(i)||(i=e.constant(i)),this._defaultEdgeLabelFn=i,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(i,c){var l=this,h=arguments;return e.reduce(i,function(b,m){return h.length>1?l.setEdge(b,m,c):l.setEdge(b,m),m}),this},r.prototype.setEdge=function(){var i,c,l,h,b=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(i=m.v,c=m.w,l=m.name,arguments.length===2&&(h=arguments[1],b=!0)):(i=m,c=arguments[1],l=arguments[3],arguments.length>2&&(h=arguments[2],b=!0)),i=""+i,c=""+c,e.isUndefined(l)||(l=""+l);var v=t(this._isDirected,i,c,l);if(e.has(this._edgeLabels,v))return b&&(this._edgeLabels[v]=h),this;if(!e.isUndefined(l)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(c),this._edgeLabels[v]=b?h:this._defaultEdgeLabelFn(i,c,l);var y=u(this._isDirected,i,c,l);return i=y.v,c=y.w,Object.freeze(y),this._edgeObjs[v]=y,o(this._preds[c],i),o(this._sucs[i],c),this._in[c][v]=y,this._out[i][v]=y,this._edgeCount++,this},r.prototype.edge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l);return this._edgeLabels[h]},r.prototype.hasEdge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l);return e.has(this._edgeLabels,h)},r.prototype.removeEdge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l),b=this._edgeObjs[h];return b&&(i=b.v,c=b.w,delete this._edgeLabels[h],delete this._edgeObjs[h],d(this._preds[c],i),d(this._sucs[i],c),delete this._in[c][h],delete this._out[i][h],this._edgeCount--),this},r.prototype.inEdges=function(i,c){var l=this._in[i];if(l){var h=e.values(l);return c?e.filter(h,function(b){return b.v===c}):h}},r.prototype.outEdges=function(i,c){var l=this._out[i];if(l){var h=e.values(l);return c?e.filter(h,function(b){return b.w===c}):h}},r.prototype.nodeEdges=function(i,c){var l=this.inEdges(i,c);if(l)return l.concat(this.outEdges(i,c))};function o(i,c){i[c]?i[c]++:i[c]=1}function d(i,c){--i[c]||delete i[c]}function t(i,c,l,h){var b=""+c,m=""+l;if(!i&&b>m){var v=b;b=m,m=v}return b+n+m+n+(e.isUndefined(h)?s:h)}function u(i,c,l,h){var b=""+c,m=""+l;if(!i&&b>m){var v=b;b=m,m=v}var y={v:b,w:m};return h&&(y.name=h),y}function f(i,c){return t(i,c.v,c.w,c.name)}return jr}var Lr,qa;function zu(){return qa||(qa=1,Lr="2.1.8"),Lr}var Or,ka;function Wu(){return ka||(ka=1,Or={Graph:ft(),version:zu()}),Or}var Pr,Ra;function Ku(){if(Ra)return Pr;Ra=1;var e=Q(),s=ft();Pr={write:a,read:o};function a(d){var t={options:{directed:d.isDirected(),multigraph:d.isMultigraph(),compound:d.isCompound()},nodes:n(d),edges:r(d)};return e.isUndefined(d.graph())||(t.value=e.clone(d.graph())),t}function n(d){return e.map(d.nodes(),function(t){var u=d.node(t),f=d.parent(t),i={v:t};return e.isUndefined(u)||(i.value=u),e.isUndefined(f)||(i.parent=f),i})}function r(d){return e.map(d.edges(),function(t){var u=d.edge(t),f={v:t.v,w:t.w};return e.isUndefined(t.name)||(f.name=t.name),e.isUndefined(u)||(f.value=u),f})}function o(d){var t=new s(d.options).setGraph(d.value);return e.each(d.nodes,function(u){t.setNode(u.v,u.value),u.parent&&t.setParent(u.v,u.parent)}),e.each(d.edges,function(u){t.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),t}return Pr}var Mr,Ia;function Hu(){if(Ia)return Mr;Ia=1;var e=Q();Mr=s;function s(a){var n={},r=[],o;function d(t){e.has(n,t)||(n[t]=!0,o.push(t),e.each(a.successors(t),d),e.each(a.predecessors(t),d))}return e.each(a.nodes(),function(t){o=[],d(t),o.length&&r.push(o)}),r}return Mr}var Fr,Na;function ys(){if(Na)return Fr;Na=1;var e=Q();Fr=s;function s(){this._arr=[],this._keyIndices={}}return s.prototype.size=function(){return this._arr.length},s.prototype.keys=function(){return this._arr.map(function(a){return a.key})},s.prototype.has=function(a){return e.has(this._keyIndices,a)},s.prototype.priority=function(a){var n=this._keyIndices[a];if(n!==void 0)return this._arr[n].priority},s.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},s.prototype.add=function(a,n){var r=this._keyIndices;if(a=String(a),!e.has(r,a)){var o=this._arr,d=o.length;return r[a]=d,o.push({key:a,priority:n}),this._decrease(d),!0}return!1},s.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},s.prototype.decrease=function(a,n){var r=this._keyIndices[a];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},s.prototype._heapify=function(a){var n=this._arr,r=2*a,o=r+1,d=a;r>1,!(n[o].priority0&&(c=i.removeMin(),l=f[c],l.distance!==Number.POSITIVE_INFINITY);)u(c).forEach(h);return f}return Dr}var Br,Sa;function Yu(){if(Sa)return Br;Sa=1;var e=bs(),s=Q();Br=a;function a(n,r,o){return s.transform(n.nodes(),function(d,t){d[t]=e(n,t,r,o)},{})}return Br}var Gr,Aa;function _s(){if(Aa)return Gr;Aa=1;var e=Q();Gr=s;function s(a){var n=0,r=[],o={},d=[];function t(u){var f=o[u]={onStack:!0,lowlink:n,index:n++};if(r.push(u),a.successors(u).forEach(function(l){e.has(o,l)?o[l].onStack&&(f.lowlink=Math.min(f.lowlink,o[l].index)):(t(l),f.lowlink=Math.min(f.lowlink,o[l].lowlink))}),f.lowlink===f.index){var i=[],c;do c=r.pop(),o[c].onStack=!1,i.push(c);while(u!==c);d.push(i)}}return a.nodes().forEach(function(u){e.has(o,u)||t(u)}),d}return Gr}var Vr,Ca;function $u(){if(Ca)return Vr;Ca=1;var e=Q(),s=_s();Vr=a;function a(n){return e.filter(s(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return Vr}var Ur,ja;function Qu(){if(ja)return Ur;ja=1;var e=Q();Ur=a;var s=e.constant(1);function a(r,o,d){return n(r,o||s,d||function(t){return r.outEdges(t)})}function n(r,o,d){var t={},u=r.nodes();return u.forEach(function(f){t[f]={},t[f][f]={distance:0},u.forEach(function(i){f!==i&&(t[f][i]={distance:Number.POSITIVE_INFINITY})}),d(f).forEach(function(i){var c=i.v===f?i.w:i.v,l=o(i);t[f][c]={distance:l,predecessor:f}})}),u.forEach(function(f){var i=t[f];u.forEach(function(c){var l=t[c];u.forEach(function(h){var b=l[f],m=i[h],v=l[h],y=b.distance+m.distance;y0;){if(f=u.removeMin(),e.has(t,f))d.setEdge(f,t[f]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(f).forEach(i)}return d}return $r}var Qr,Ba;function rd(){return Ba||(Ba=1,Qr={components:Hu(),dijkstra:bs(),dijkstraAll:Yu(),findCycles:$u(),floydWarshall:Qu(),isAcyclic:Ju(),postorder:Xu(),preorder:Zu(),prim:ed(),tarjan:_s(),topsort:ws()}),Qr}var Jr,Ga;function nd(){if(Ga)return Jr;Ga=1;var e=Wu();return Jr={Graph:e.Graph,json:Ku(),alg:rd(),version:e.version},Jr}var Xr,Va;function J(){if(Va)return Xr;Va=1;var e;if(typeof dt=="function")try{e=nd()}catch{}return e||(e=window.graphlib),Xr=e,Xr}var Zr,Ua;function td(){if(Ua)return Zr;Ua=1;var e=os(),s=1,a=4;function n(r){return e(r,s|a)}return Zr=n,Zr}var en,za;function ad(){if(za)return en;za=1;var e=st(),s=Jn(),a=Ji(),n=ue(),r=Object.prototype,o=r.hasOwnProperty,d=e(function(t,u){t=Object(t);var f=-1,i=u.length,c=i>2?u[2]:void 0;for(c&&a(u[0],u[1],c)&&(i=1);++f1?o[t-1]:void 0,f=t>2?o[2]:void 0;for(u=n.length>3&&typeof u=="function"?(t--,u):void 0,f&&s(o[0],o[1],f)&&(u=t<3?void 0:u,t=1),r=Object(r);++d0;--v)if(m=i[v].dequeue(),m){l=l.concat(d(f,i,c,m,!0));break}}}return l}function d(f,i,c,l,h){var b=h?[]:void 0;return e.forEach(f.inEdges(l.v),function(m){var v=f.edge(m),y=f.node(m.v);h&&b.push({v:m.v,w:m.w}),y.out-=v,u(i,c,y)}),e.forEach(f.outEdges(l.v),function(m){var v=f.edge(m),y=m.w,p=f.node(y);p.in-=v,u(i,c,p)}),f.removeNode(l.v),b}function t(f,i){var c=new s,l=0,h=0;e.forEach(f.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(f.edges(),function(v){var y=c.edge(v.v,v.w)||0,p=i(v),g=y+p;c.setEdge(v.v,v.w,g),h=Math.max(h,c.node(v.v).out+=p),l=Math.max(l,c.node(v.w).in+=p)});var b=e.range(h+l+3).map(function(){return new a}),m=l+1;return e.forEach(c.nodes(),function(v){u(b,m,c.node(v))}),{graph:c,buckets:b,zeroIdx:m}}function u(f,i,c){c.out?c.in?f[c.out-c.in+i].enqueue(c):f[f.length-1].enqueue(c):f[0].enqueue(c)}return bn}var _n,di;function _d(){if(di)return _n;di=1;var e=G(),s=bd();_n={run:a,undo:r};function a(o){var d=o.graph().acyclicer==="greedy"?s(o,t(o)):n(o);e.forEach(d,function(u){var f=o.edge(u);o.removeEdge(u),f.forwardName=u.name,f.reversed=!0,o.setEdge(u.w,u.v,f,e.uniqueId("rev"))});function t(u){return function(f){return u.edge(f).weight}}}function n(o){var d=[],t={},u={};function f(i){e.has(u,i)||(u[i]=!0,t[i]=!0,e.forEach(o.outEdges(i),function(c){e.has(t,c.w)?d.push(c):f(c.w)}),delete t[i])}return e.forEach(o.nodes(),f),d}function r(o){e.forEach(o.edges(),function(d){var t=o.edge(d);if(t.reversed){o.removeEdge(d);var u=t.forwardName;delete t.reversed,delete t.forwardName,o.setEdge(d.w,d.v,t,u)}})}return _n}var wn,fi;function $(){if(fi)return wn;fi=1;var e=G(),s=J().Graph;wn={addDummyNode:a,simplify:n,asNonCompoundGraph:r,successorWeights:o,predecessorWeights:d,intersectRect:t,buildLayerMatrix:u,normalizeRanks:f,removeEmptyRanks:i,addBorderNode:c,maxRank:l,partition:h,time:b,notime:m};function a(v,y,p,g){var _;do _=e.uniqueId(g);while(v.hasNode(_));return p.dummy=y,v.setNode(_,p),_}function n(v){var y=new s().setGraph(v.graph());return e.forEach(v.nodes(),function(p){y.setNode(p,v.node(p))}),e.forEach(v.edges(),function(p){var g=y.edge(p.v,p.w)||{weight:0,minlen:1},_=v.edge(p);y.setEdge(p.v,p.w,{weight:g.weight+_.weight,minlen:Math.max(g.minlen,_.minlen)})}),y}function r(v){var y=new s({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(p){v.children(p).length||y.setNode(p,v.node(p))}),e.forEach(v.edges(),function(p){y.setEdge(p,v.edge(p))}),y}function o(v){var y=e.map(v.nodes(),function(p){var g={};return e.forEach(v.outEdges(p),function(_){g[_.w]=(g[_.w]||0)+v.edge(_).weight}),g});return e.zipObject(v.nodes(),y)}function d(v){var y=e.map(v.nodes(),function(p){var g={};return e.forEach(v.inEdges(p),function(_){g[_.v]=(g[_.v]||0)+v.edge(_).weight}),g});return e.zipObject(v.nodes(),y)}function t(v,y){var p=v.x,g=v.y,_=y.x-p,w=y.y-g,q=v.width/2,k=v.height/2;if(!_&&!w)throw new Error("Not possible to find intersection inside of the rectangle");var S,T;return Math.abs(w)*q>Math.abs(_)*k?(w<0&&(k=-k),S=k*_/w,T=k):(_<0&&(q=-q),S=q,T=q*w/_),{x:p+S,y:g+T}}function u(v){var y=e.map(e.range(l(v)+1),function(){return[]});return e.forEach(v.nodes(),function(p){var g=v.node(p),_=g.rank;e.isUndefined(_)||(y[_][g.order]=p)}),y}function f(v){var y=e.min(e.map(v.nodes(),function(p){return v.node(p).rank}));e.forEach(v.nodes(),function(p){var g=v.node(p);e.has(g,"rank")&&(g.rank-=y)})}function i(v){var y=e.min(e.map(v.nodes(),function(w){return v.node(w).rank})),p=[];e.forEach(v.nodes(),function(w){var q=v.node(w).rank-y;p[q]||(p[q]=[]),p[q].push(w)});var g=0,_=v.graph().nodeRankFactor;e.forEach(p,function(w,q){e.isUndefined(w)&&q%_!==0?--g:g&&e.forEach(w,function(k){v.node(k).rank+=g})})}function c(v,y,p,g){var _={width:0,height:0};return arguments.length>=4&&(_.rank=p,_.order=g),a(v,"border",_,y)}function l(v){return e.max(e.map(v.nodes(),function(y){var p=v.node(y).rank;if(!e.isUndefined(p))return p}))}function h(v,y){var p={lhs:[],rhs:[]};return e.forEach(v,function(g){y(g)?p.lhs.push(g):p.rhs.push(g)}),p}function b(v,y){var p=e.now();try{return y()}finally{console.log(v+" time: "+(e.now()-p)+"ms")}}function m(v,y){return y()}return wn}var En,ci;function wd(){if(ci)return En;ci=1;var e=G(),s=$();En={run:a,undo:r};function a(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(d){n(o,d)})}function n(o,d){var t=d.v,u=o.node(t).rank,f=d.w,i=o.node(f).rank,c=d.name,l=o.edge(d),h=l.labelRank;if(i!==u+1){o.removeEdge(d);var b,m,v;for(v=0,++u;uT.lim&&(N=T,C=!0);var j=e.filter(_.edges(),function(L){return C===p(g,g.node(L.v),N)&&C!==p(g,g.node(L.w),N)});return e.minBy(j,function(L){return a(_,L)})}function m(g,_,w,q){var k=w.v,S=w.w;g.removeEdge(k,S),g.setEdge(q.v,q.w,{}),c(g),u(g,_),v(g,_)}function v(g,_){var w=e.find(g.nodes(),function(k){return!_.node(k).parent}),q=r(g,w);q=q.slice(1),e.forEach(q,function(k){var S=g.node(k).parent,T=_.edge(k,S),N=!1;T||(T=_.edge(S,k),N=!0),_.node(k).rank=_.node(S).rank+(N?T.minlen:-T.minlen)})}function y(g,_,w){return g.hasEdge(_,w)}function p(g,_,w){return w.low<=_.lim&&_.lim<=w.lim}return kn}var Rn,pi;function xd(){if(pi)return Rn;pi=1;var e=ke(),s=e.longestPath,a=ks(),n=Ed();Rn=r;function r(u){switch(u.graph().ranker){case"network-simplex":t(u);break;case"tight-tree":d(u);break;case"longest-path":o(u);break;default:t(u)}}var o=s;function d(u){s(u),a(u)}function t(u){n(u)}return Rn}var In,gi;function qd(){if(gi)return In;gi=1;var e=G();In=s;function s(r){var o=n(r);e.forEach(r.graph().dummyChains,function(d){for(var t=r.node(d),u=t.edgeObj,f=a(r,o,u.v,u.w),i=f.path,c=f.lca,l=0,h=i[l],b=!0;d!==u.w;){if(t=r.node(d),b){for(;(h=i[l])!==c&&r.node(h).maxRanki||c>o[l].lim));for(h=l,l=t;(l=r.parent(l))!==h;)f.push(l);return{path:u.concat(f.reverse()),lca:h}}function n(r){var o={},d=0;function t(u){var f=d;e.forEach(r.children(u),t),o[u]={low:f,lim:d++}}return e.forEach(r.children(),t),o}return In}var Nn,mi;function kd(){if(mi)return Nn;mi=1;var e=G(),s=$();Nn={run:a,cleanup:d};function a(t){var u=s.addDummyNode(t,"root",{},"_root"),f=r(t),i=e.max(e.values(f))-1,c=2*i+1;t.graph().nestingRoot=u,e.forEach(t.edges(),function(h){t.edge(h).minlen*=c});var l=o(t)+1;e.forEach(t.children(),function(h){n(t,u,c,l,i,f,h)}),t.graph().nodeRankFactor=c}function n(t,u,f,i,c,l,h){var b=t.children(h);if(!b.length){h!==u&&t.setEdge(u,h,{weight:0,minlen:f});return}var m=s.addBorderNode(t,"_bt"),v=s.addBorderNode(t,"_bb"),y=t.node(h);t.setParent(m,h),y.borderTop=m,t.setParent(v,h),y.borderBottom=v,e.forEach(b,function(p){n(t,u,f,i,c,l,p);var g=t.node(p),_=g.borderTop?g.borderTop:p,w=g.borderBottom?g.borderBottom:p,q=g.borderTop?i:2*i,k=_!==w?1:c-l[h]+1;t.setEdge(m,_,{weight:q,minlen:k,nestingEdge:!0}),t.setEdge(w,v,{weight:q,minlen:k,nestingEdge:!0})}),t.parent(h)||t.setEdge(u,m,{weight:0,minlen:c+l[h]})}function r(t){var u={};function f(i,c){var l=t.children(i);l&&l.length&&e.forEach(l,function(h){f(h,c+1)}),u[i]=c}return e.forEach(t.children(),function(i){f(i,1)}),u}function o(t){return e.reduce(t.edges(),function(u,f){return u+t.edge(f).weight},0)}function d(t){var u=t.graph();t.removeNode(u.nestingRoot),delete u.nestingRoot,e.forEach(t.edges(),function(f){var i=t.edge(f);i.nestingEdge&&t.removeEdge(f)})}return Nn}var Tn,yi;function Rd(){if(yi)return Tn;yi=1;var e=G(),s=$();Tn=a;function a(r){function o(d){var t=r.children(d),u=r.node(d);if(t.length&&e.forEach(t,o),e.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var f=u.minRank,i=u.maxRank+1;f0;)h%2&&(b+=i[h+1]),h=h-1>>1,i[h]+=l.weight;c+=l.weight*b})),c}return Cn}var jn,Ei;function Sd(){if(Ei)return jn;Ei=1;var e=G();jn=s;function s(a,n){return e.map(n,function(r){var o=a.inEdges(r);if(o.length){var d=e.reduce(o,function(t,u){var f=a.edge(u),i=a.node(u.v);return{sum:t.sum+f.weight*i.order,weight:t.weight+f.weight}},{sum:0,weight:0});return{v:r,barycenter:d.sum/d.weight,weight:d.weight}}else return{v:r}})}return jn}var Ln,xi;function Ad(){if(xi)return Ln;xi=1;var e=G();Ln=s;function s(r,o){var d={};e.forEach(r,function(u,f){var i=d[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:f};e.isUndefined(u.barycenter)||(i.barycenter=u.barycenter,i.weight=u.weight)}),e.forEach(o.edges(),function(u){var f=d[u.v],i=d[u.w];!e.isUndefined(f)&&!e.isUndefined(i)&&(i.indegree++,f.out.push(d[u.w]))});var t=e.filter(d,function(u){return!u.indegree});return a(t)}function a(r){var o=[];function d(f){return function(i){i.merged||(e.isUndefined(i.barycenter)||e.isUndefined(f.barycenter)||i.barycenter>=f.barycenter)&&n(f,i)}}function t(f){return function(i){i.in.push(f),--i.indegree===0&&r.push(i)}}for(;r.length;){var u=r.pop();o.push(u),e.forEach(u.in.reverse(),d(u)),e.forEach(u.out,t(u))}return e.map(e.filter(o,function(f){return!f.merged}),function(f){return e.pick(f,["vs","i","barycenter","weight"])})}function n(r,o){var d=0,t=0;r.weight&&(d+=r.barycenter*r.weight,t+=r.weight),o.weight&&(d+=o.barycenter*o.weight,t+=o.weight),r.vs=o.vs.concat(r.vs),r.barycenter=d/t,r.weight=t,r.i=Math.min(o.i,r.i),o.merged=!0}return Ln}var On,qi;function Cd(){if(qi)return On;qi=1;var e=G(),s=$();On=a;function a(o,d){var t=s.partition(o,function(m){return e.has(m,"barycenter")}),u=t.lhs,f=e.sortBy(t.rhs,function(m){return-m.i}),i=[],c=0,l=0,h=0;u.sort(r(!!d)),h=n(i,f,h),e.forEach(u,function(m){h+=m.vs.length,i.push(m.vs),c+=m.barycenter*m.weight,l+=m.weight,h=n(i,f,h)});var b={vs:e.flatten(i,!0)};return l&&(b.barycenter=c/l,b.weight=l),b}function n(o,d,t){for(var u;d.length&&(u=e.last(d)).i<=t;)d.pop(),o.push(u.vs),t++;return t}function r(o){return function(d,t){return d.barycentert.barycenter?1:o?t.i-d.i:d.i-t.i}}return On}var Pn,ki;function jd(){if(ki)return Pn;ki=1;var e=G(),s=Sd(),a=Ad(),n=Cd();Pn=r;function r(t,u,f,i){var c=t.children(u),l=t.node(u),h=l?l.borderLeft:void 0,b=l?l.borderRight:void 0,m={};h&&(c=e.filter(c,function(w){return w!==h&&w!==b}));var v=s(t,c);e.forEach(v,function(w){if(t.children(w.v).length){var q=r(t,w.v,f,i);m[w.v]=q,e.has(q,"barycenter")&&d(w,q)}});var y=a(v,f);o(y,m);var p=n(y,i);if(h&&(p.vs=e.flatten([h,p.vs,b],!0),t.predecessors(h).length)){var g=t.node(t.predecessors(h)[0]),_=t.node(t.predecessors(b)[0]);e.has(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+g.order+_.order)/(p.weight+2),p.weight+=2}return p}function o(t,u){e.forEach(t,function(f){f.vs=e.flatten(f.vs.map(function(i){return u[i]?u[i].vs:i}),!0)})}function d(t,u){e.isUndefined(t.barycenter)?(t.barycenter=u.barycenter,t.weight=u.weight):(t.barycenter=(t.barycenter*t.weight+u.barycenter*u.weight)/(t.weight+u.weight),t.weight+=u.weight)}return Pn}var Mn,Ri;function Ld(){if(Ri)return Mn;Ri=1;var e=G(),s=J().Graph;Mn=a;function a(r,o,d){var t=n(r),u=new s({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(f){return r.node(f)});return e.forEach(r.nodes(),function(f){var i=r.node(f),c=r.parent(f);(i.rank===o||i.minRank<=o&&o<=i.maxRank)&&(u.setNode(f),u.setParent(f,c||t),e.forEach(r[d](f),function(l){var h=l.v===f?l.w:l.v,b=u.edge(h,f),m=e.isUndefined(b)?0:b.weight;u.setEdge(h,f,{weight:r.edge(l).weight+m})}),e.has(i,"minRank")&&u.setNode(f,{borderLeft:i.borderLeft[o],borderRight:i.borderRight[o]}))}),u}function n(r){for(var o;r.hasNode(o=e.uniqueId("_root")););return o}return Mn}var Fn,Ii;function Od(){if(Ii)return Fn;Ii=1;var e=G();Fn=s;function s(a,n,r){var o={},d;e.forEach(r,function(t){for(var u=a.parent(t),f,i;u;){if(f=a.parent(u),f?(i=o[f],o[f]=u):(i=d,d=u),i&&i!==u){n.setEdge(i,u);return}u=f}})}return Fn}var Dn,Ni;function Pd(){if(Ni)return Dn;Ni=1;var e=G(),s=Nd(),a=Td(),n=jd(),r=Ld(),o=Od(),d=J().Graph,t=$();Dn=u;function u(l){var h=t.maxRank(l),b=f(l,e.range(1,h+1),"inEdges"),m=f(l,e.range(h-1,-1,-1),"outEdges"),v=s(l);c(l,v);for(var y=Number.POSITIVE_INFINITY,p,g=0,_=0;_<4;++g,++_){i(g%2?b:m,g%4>=2),v=t.buildLayerMatrix(l);var w=a(l,v);wN)&&d(g,L,C)})})}function w(q,k){var S=-1,T,N=0;return e.forEach(k,function(C,j){if(y.node(C).dummy==="border"){var L=y.predecessors(C);L.length&&(T=y.node(L[0]).order,_(k,N,j,S,T),N=j,S=T)}_(k,N,k.length,T,q.length)}),k}return e.reduce(p,w),g}function o(y,p){if(y.node(p).dummy)return e.find(y.predecessors(p),function(g){return y.node(g).dummy})}function d(y,p,g){if(p>g){var _=p;p=g,g=_}var w=y[p];w||(y[p]=w={}),w[g]=!0}function t(y,p,g){if(p>g){var _=p;p=g,g=_}return e.has(y[p],g)}function u(y,p,g,_){var w={},q={},k={};return e.forEach(p,function(S){e.forEach(S,function(T,N){w[T]=T,q[T]=T,k[T]=N})}),e.forEach(p,function(S){var T=-1;e.forEach(S,function(N){var C=_(N);if(C.length){C=e.sortBy(C,function(z){return k[z]});for(var j=(C.length-1)/2,L=Math.floor(j),F=Math.ceil(j);L<=F;++L){var D=C[L];q[N]===N&&T{const{theme:s}=Lo(),{shape:a,taskRuns:n,taskEvents:r,isLoading:o,isError:d}=ye(),t=U.useMemo(()=>{const m=new Set;for(const v of r)v.eventType===Oo.SKIPPED&&m.add(v.taskId);return m},[r]),u=U.useMemo(()=>(a.flatMap(m=>m.childrenStepIds.map(v=>{const y=a.find(g=>g.stepId===v),p=n.find(g=>g.stepId===v);return y?{id:`${m.stepId}-${v}`,source:m.stepId,target:v,animated:(p==null?void 0:p.status)===X.RUNNING,style:s==="dark"?Pi:Mi,markerEnd:{type:Po.ArrowClosed},type:"smoothstep"}:null}))||[]).filter(m=>!!m),[a,s,n]),f=U.useMemo(()=>a.map(m=>{const v=a.some(_=>_.childrenStepIds.includes(m.stepId)),y=a.some(_=>_.stepId===m.stepId),p=n.find(_=>_.stepId===m.stepId),g={taskRun:p,graphVariant:v&&y?"default":y?"output_only":"input_only",onClick:()=>p&&e(p.metadata.id),childWorkflowsCount:(p==null?void 0:p.numSpawnedChildren)||0,taskName:m.taskName,isSkipped:p?t.has(p.metadata.id):!1};return{id:m.stepId,type:"stepNode",position:{x:0,y:0},data:g,selectable:!0}})||[],[a,n,e,t]),i=230,c=70,l=(m,v,y="LR")=>{const p=new Oi.graphlib.Graph;p.setDefaultEdgeLabel(()=>({}));const g=y==="LR";return p.setGraph({rankdir:y}),m.forEach(w=>{p.setNode(w.id,{width:i,height:c})}),v.forEach(w=>{p.setEdge(w.source,w.target)}),Oi.layout(p),{nodes:m.map(w=>{const q=p.node(w.id);return w.targetPosition=g?qe.Left:qe.Top,w.sourcePosition=g?qe.Right:qe.Bottom,w.position={x:q.x-i/2,y:q.y-c/2},{...w}}),edges:v}},{nodes:h,edges:b}=U.useMemo(()=>l(f,u),[f,u]);return o||d?null:R.jsx("div",{className:"h-[300px] w-full",children:R.jsx(Mo,{nodes:h,edges:b,nodeTypes:zd,edgeTypes:Wd,fitView:!0,proOptions:{hideAttribution:!0},onNodeClick:(m,v)=>{const y=n.find(p=>p.stepId===v.id);y&&e(y.metadata.id)},maxZoom:1,connectionLineStyle:s==="dark"?Pi:Mi,snapToGrid:!0})})};class Hd extends Error{constructor(a,n){super(a);pt(this,"status");this.status=n}}function Yd(e){switch(e){case X.COMPLETED:return"successful";case X.FAILED:return"failed";case X.CANCELLED:return"cancelled";case X.QUEUED:return"queued";case X.RUNNING:return"inProgress";default:{const s=e;throw new Error(`Unknown status: ${s}`)}}}const $d=({shape:e,handleTaskRunExpand:s})=>{const[a]=zi(Wi);return a=="graph"&&e.some(r=>r.childrenStepIds.length>0)?R.jsx(Kd,{setSelectedTaskRunId:s}):R.jsx(Jo,{onClick:r=>{r&&s(r)}})};async function Qd(e){var s;try{return await rt.v1TaskGet(e)}catch(a){if(es(a)&&((s=a.response)==null?void 0:s.status)===404)return;throw a}}async function Jd(e){var s;try{return await rt.v1WorkflowRunGet(e)}catch(a){if(es(a)&&((s=a.response)==null?void 0:s.status)===404)return;throw a}}function tf(){const e=Bo({from:Yn.tenantRunRoute.to}),{run:s}=e,a=Hn({queryKey:["workflow-run",s],queryFn:async()=>{var d;const[r,o]=await Promise.all([Qd(s),Jd(s)]);if(!r&&!o)throw new Hd(`Task or Workflow Run with ID ${s} not found`,404);if(r!=null&&r.data){const t=r.data;return{status:t.status,type:"task",task:t}}if((d=o==null?void 0:o.data)!=null&&d.run){const t=o.data;return{status:t.run.status,type:"dag",dag:t}}throw new Error(`Task or Workflow Run with ID ${s} not found`)},refetchInterval:r=>{var d;const o=(d=r.state.data)==null?void 0:d.status;return Vo(o)?5e3:1e3},retry:(r,o)=>Go(o)});if(a.isLoading)return R.jsx(Uo,{});if(a.isError){const r=zo(a.error);if(r===400||r===404)return R.jsx(Xo,{resource:"Run",primaryAction:{label:"Back to Runs",navigate:{to:Yn.tenantRunsRoute.to,params:{tenant:e.tenant}}}});throw a.error}const n=a.data;if(!n)return null;if(n.type==="task")return R.jsx(yt,{tableKey:`task-runs-${s}`,children:R.jsx(bt,{children:R.jsx(Xd,{id:s})})});if(n.type==="dag")return R.jsx(yt,{tableKey:`workflow-runs-${s}`,children:R.jsx(bt,{children:R.jsx(Zd,{id:s})})})}function Xd({id:e}){return R.jsx(Wo,{taskRunId:e,defaultOpenTab:nt.Activity})}function Zd({id:e}){const{open:s}=Ki(),a=U.useRef(!1),n=Ko(),r=n.tab??"overview",o=U.useCallback(v=>{a.current||(a.current=!0,s({type:"task-run-details",content:{taskRunId:v,defaultOpenTab:nt.Activity,showViewTaskRunButton:!0}}),setTimeout(()=>{a.current=!1},100))},[s]),{workflowRun:d,shape:t,taskRuns:u,isLoading:f,isError:i}=ye(),c=U.useMemo(()=>{const v=[],y=p=>{for(const g of p)v.push({externalId:g.metadata.id,displayName:g.displayName,status:g.status,createdAt:g.createdAt,startedAt:g.startedAt}),g.children&&y(g.children)};return y(u),v},[u]),l=U.useMemo(()=>u.map(v=>v.taskExternalId),[u]),h=U.useMemo(()=>u.filter(v=>v.isDurable).map(v=>v.taskExternalId),[u]);if(f||i||!d)return null;const b=JSON.stringify(d.input||{}),m=d.additionalMetadata;return R.jsx("div",{className:"flex h-full w-full flex-1 flex-col min-h-0",children:R.jsxs("div",{className:"mx-auto flex h-full w-full flex-1 min-h-0 flex-col px-4 pt-2 sm:px-6 lg:px-8",children:[R.jsx(wu,{}),R.jsx(Ho,{className:"my-4"}),R.jsxs("div",{className:"mb-4 flex flex-row gap-x-4",children:[R.jsx("p",{className:"font-semibold",children:"Status"}),R.jsx(Yo,{variant:Yd(d.status),children:d.status})]}),R.jsx("div",{className:"h-4"}),R.jsxs(_t,{value:r,onValueChange:n.setTab,className:"flex min-h-0 flex-1 flex-col",children:[R.jsxs(wt,{layout:"underlined",className:"mb-4",children:[R.jsx(ie,{variant:"underlined",value:"overview",children:"Overview"}),R.jsx(ie,{variant:"underlined",value:"traces",children:"Traces"}),R.jsx(ie,{variant:"underlined",value:"logs",children:"Logs"})]}),R.jsxs(se,{value:"overview",className:"flex min-h-0 flex-1 flex-col",children:[R.jsxs("div",{className:"relative flex w-full shrink-0 overflow-auto bg-slate-100 dark:bg-slate-900",children:[R.jsx($d,{shape:t,handleTaskRunExpand:o}),R.jsx(ku,{})]}),R.jsx("div",{className:"h-4"}),R.jsxs(_t,{defaultValue:"activity",className:"flex h-full flex-col min-h-0",children:[R.jsxs(wt,{layout:"underlined",children:[R.jsx(ie,{variant:"underlined",value:"activity",children:"Activity"}),R.jsx(ie,{variant:"underlined",value:"output",children:"Output"}),R.jsx(ie,{variant:"underlined",value:"input",children:"Input"}),R.jsx(ie,{variant:"underlined",value:"additional-metadata",children:"Additional Metadata"})]}),R.jsx(se,{value:"activity",className:"flex min-h-0 flex-1 flex-col py-4",children:R.jsx($o,{workflowRunId:e,fallbackTaskDisplayName:d.displayName,onClick:o,durableTaskIds:h})}),R.jsx(se,{value:"output",className:"flex min-h-0 flex-1 flex-col py-4",children:R.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:d.status===X.FAILED?d.errorMessage||"":JSON.stringify(d.output,null,2)})}),R.jsx(se,{value:"input",className:"flex min-h-0 flex-1 flex-col py-4",children:R.jsx(Ru,{input:JSON.parse(b)})}),R.jsx(se,{value:"additional-metadata",className:"flex min-h-0 flex-1 flex-col py-4",children:R.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:JSON.stringify(m,null,2)})})]})]}),R.jsx(se,{value:"traces",className:"min-h-0 flex-1",children:R.jsx(Qo,{workflowRunExternalId:e,isRunning:!Kn.includes(d.status),tasks:c,workflowRunCreatedAt:d.metadata.createdAt,workflowRunStartedAt:d.startedAt})}),R.jsx(se,{value:"logs",children:R.jsx(Su,{taskExternalIds:l})})]})]})})}export{tf as default}; diff --git a/hatchetembed/dashboard/assets/index-CqFaS3ri.js b/hatchetembed/dashboard/assets/index-CqFaS3ri.js new file mode 100644 index 0000000000..051fc66372 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CqFaS3ri.js @@ -0,0 +1 @@ +import{ar as x,u as T,t as v,k as d,j as e,I as N,B as p,S as h,e as I,o as E,s as U,ch as g,l as j,p as y,a as b,bl as C}from"./index-wypz6hY5.js";import{S as L}from"./settings-page-header-Dal4BvfD.js";import{S as O}from"./switch-C23Bp5tT.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="86167123-d92c-4e7a-82a7-b5000ffa9727",t._sentryDebugIdIdentifier="sentry-dbid-86167123-d92c-4e7a-82a7-b5000ffa9727")}catch{}})();const A=E({name:U().max(255).min(1)});function R({className:t,...n}){var c,u,o;const{tenant:s}=x(),{handleSubmit:r,register:i,reset:a,formState:{errors:f}}=T({resolver:v(A),defaultValues:{name:s==null?void 0:s.name}});d.useEffect(()=>{s!=null&&s.name&&a({name:s.name})},[s==null?void 0:s.name,a]);const l=((u=(c=f.name)==null?void 0:c.message)==null?void 0:u.toString())||((o=n.fieldErrors)==null?void 0:o.name);return e.jsxs("form",{className:I("flex flex-col items-end gap-1",t),onSubmit:r(w=>n.onSubmit(w)),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{...i("name"),id:"name",placeholder:"My Tenant",type:"text",autoCapitalize:"none",autoCorrect:"off",className:"w-[220px]",disabled:n.isLoading}),e.jsxs(p,{disabled:n.isLoading,className:"w-fit",children:[n.isLoading&&e.jsx(h,{}),"Save"]})]}),l&&e.jsx("div",{className:"text-sm text-red-500",children:l})]})}function B(){return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(L,{title:"General settings",description:"Update the tenant name and analytics preferences for this tenant."}),e.jsxs("div",{className:"divide-y divide-border",children:[e.jsx(m,{label:"Tenant Name",children:e.jsx(M,{})}),e.jsx(k,{}),e.jsx(D,{}),e.jsx(m,{label:"Analytics Opt-Out",description:"Disable usage analytics collection for this tenant.",children:e.jsx(F,{})})]})]})})}function m({label:t,description:n,children:s}){return e.jsxs("div",{className:"flex items-center justify-between py-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:t}),n&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n})]}),s]})}function S({value:t}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"max-w-[280px] truncate font-mono text-sm text-muted-foreground",children:t}),e.jsx(C,{text:t})]})}const k=()=>{const{tenant:t}=x(),n=(t==null?void 0:t.serverUrl)||window.location.origin;return e.jsx(m,{label:"API URL",description:"The base URL for this tenant's REST API.",children:e.jsx(S,{value:n})})},D=()=>{const{tenant:t}=x();return t!=null&&t.region?e.jsx(m,{label:"Region",description:"The control-plane region this tenant is deployed to.",children:e.jsx(S,{value:t.region})}):null},M=()=>{const[t,n]=d.useState(!1),{tenantId:s}=g(),{handleApiError:r}=j({}),i=y({mutationKey:["tenant:update"],mutationFn:async a=>{await b.tenantUpdate(s,a)},onMutate:()=>n(!0),onSuccess:()=>window.location.reload(),onError:r});return e.jsx(R,{isLoading:t,onSubmit:a=>i.mutate(a)})},F=()=>{const{tenant:t}=x(),{tenantId:n}=g(),[s,r]=d.useState(!1),[i,a]=d.useState(!!(t!=null&&t.analyticsOptOut)),[f,l]=d.useState(!1),{handleApiError:c}=j({}),u=y({mutationKey:["tenant:update"],mutationFn:async o=>{await b.tenantUpdate(n,o)},onMutate:()=>l(!0),onSuccess:()=>window.location.reload(),onSettled:()=>setTimeout(()=>l(!1),1e3),onError:c});return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(O,{id:"aoo",checked:i,onClick:()=>{a(o=>!o),r(!0)}}),s&&(f?e.jsx(h,{}):e.jsx(p,{size:"sm",onClick:()=>u.mutate({analyticsOptOut:i}),children:"Save"}))]})};export{B as default}; diff --git a/hatchetembed/dashboard/assets/index-CsdMB0IO.js b/hatchetembed/dashboard/assets/index-CsdMB0IO.js new file mode 100644 index 0000000000..2001ee3956 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CsdMB0IO.js @@ -0,0 +1 @@ +import{j as e,a2 as F,cN as j,g as P,b as T,aH as I,ay as K,ch as A,ci as W,cP as L,cQ as H,cR as B,k as u,N as _,O as Q,o as z,s as E,aB as M,F as q,cx as O,b6 as V,b7 as Z,cn as $}from"./index-wypz6hY5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="96240747-5559-4bb7-ab77-dfeed9e52160",a._sentryDebugIdIdentifier="sentry-dbid-96240747-5559-4bb7-ab77-dfeed9e52160")}catch{}})();const f={status:"Status",name:"Name",createdAt:"Created at"},G="status",S="name",J="createdAt",U=a=>[{accessorKey:G,header:({column:t})=>e.jsx(j,{column:t,title:f.status}),cell:({row:t})=>e.jsx(e.Fragment,{children:t.original.isPaused?e.jsx(F,{variant:"inProgress",children:"Paused"}):e.jsx(F,{variant:"successful",children:"Active"})}),enableSorting:!1,enableHiding:!1},{accessorKey:S,header:({column:t})=>e.jsx(j,{column:t,title:f.name}),cell:({row:t})=>e.jsx(P,{to:T.tenantWorkflowRoute.to,params:{tenant:a,workflow:t.original.metadata.id},children:e.jsx("div",{className:"text-md min-w-fit cursor-pointer whitespace-nowrap p-2 hover:underline",children:t.original.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:J,header:({column:t})=>e.jsx(j,{column:t,title:f.createdAt,className:"whitespace-nowrap"}),sortingFn:(t,o)=>new Date(t.original.metadata.createdAt).getTime()-new Date(o.original.metadata.createdAt).getTime(),cell:({row:t})=>e.jsx("div",{className:"whitespace-nowrap",children:e.jsx(I,{date:t.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{header:()=>e.jsx(e.Fragment,{}),accessorKey:"chevron",cell:({row:t})=>e.jsx("div",{className:"flex justify-end gap-2",children:e.jsx(P,{to:T.tenantWorkflowRoute.to,params:{tenant:a,workflow:t.original.metadata.id},children:e.jsx("div",{className:"text-md min-w-fit cursor-pointer whitespace-nowrap p-2 hover:underline",children:e.jsx(K,{className:"h-5 w-5 flex-none text-gray-700 dark:text-gray-300","aria-hidden":"true"})})})}),enableSorting:!1,enableHiding:!1}],X=z({s:E().optional()}).default({s:void 0}),Y=({key:a})=>{var v,C,N;const{tenantId:t}=A(),{refetchInterval:o}=W(),g=`workflows-${a}`,{state:{s:l},columnFilters:c,setColumnFilters:r,resetFilters:m}=L(X,g,{s:S}),[d]=H(l,300),{pagination:h,setPagination:w,setPageSize:p,offset:b,limit:x}=B({key:a,resetPageOnChange:[d]}),y=u.useCallback(n=>{r(()=>n?[{id:S,value:n}]:[])},[r]),s=_({...Q.workflows.list(t,{limit:x,offset:b,name:d}),refetchInterval:o,placeholderData:n=>n}),i=u.useMemo(()=>{var n;return((n=s.data)==null?void 0:n.rows)||[]},[(v=s.data)==null?void 0:v.rows]),k=((N=(C=s.data)==null?void 0:C.pagination)==null?void 0:N.num_pages)||0,D=u.useMemo(()=>i.reduce((n,R)=>(n[R.name]=R.metadata.id,n),{}),[i]);return{workflows:i,numWorkflows:k,isLoading:s.isLoading,isRefetching:s.isRefetching,error:s.error,refetch:s.refetch,pagination:h,setPagination:w,setPageSize:p,columnFilters:c,setColumnFilters:r,resetFilters:m,workflowNameToId:D,search:l??"",setSearch:y}},ee=()=>({suggestions:[]}),te=a=>a;function se(){const{tenantId:a}=A(),[t,o]=M("hatchet:columns:workflows",{}),{workflows:g,numWorkflows:l,isLoading:c,isRefetching:r,pagination:m,setPagination:d,setPageSize:h,refetch:w,columnFilters:p,setColumnFilters:b,resetFilters:x,search:y,setSearch:s}=Y({key:"workflows-table"}),i=u.useMemo(()=>({}),[]);if(c)return e.jsx(q,{});const k=e.jsx($,{value:y,onChange:s,onSubmit:s,getAutocomplete:ee,applySuggestion:te,autocompleteContext:i,placeholder:"Search workflows by name..."});return e.jsx(O,{columns:U(a),data:g,emptyState:e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[e.jsx("p",{className:"text-lg font-semibold",children:"No workflows found"}),e.jsx("div",{className:"w-fit",children:e.jsx(V,{doc:Z.v1.quickstart,label:"Learn about creating workflows and tasks"})})]}),searchBar:k,columnVisibility:t,setColumnVisibility:o,pagination:m,setPagination:d,onSetPageSize:h,showSelectedRows:!1,pageCount:l,isLoading:c,showColumnToggle:!0,columnKeyToName:f,refetchProps:{isRefetching:r,onRefetch:w},columnFilters:p,setColumnFilters:b,onResetFilters:x})}export{se as default}; diff --git a/hatchetembed/dashboard/assets/index-Cv9GYExf.js b/hatchetembed/dashboard/assets/index-Cv9GYExf.js new file mode 100644 index 0000000000..fe559f01a4 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Cv9GYExf.js @@ -0,0 +1 @@ +import{k as l,j as a,c8 as K,c9 as Q,ca as V,cb as z,cc as J,cd as $,ce as X,cf as I,cg as H,ch as Y,ci as Z,w as ee,N as M,O as te,cj as se,ck as ne,a as F,cl as ae,cm as _,o as ie,s as O,bz as oe,aA as re,cn as le,co as ce,cp as ue,cq as q,B as de,cr as me,a5 as fe,a6 as ge,a7 as he,a8 as we,a9 as C,cs as xe,ct as Se}from"./index-wypz6hY5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="bf2432ce-eda9-4306-8292-0a84a2995d9d",t._sentryDebugIdIdentifier="sentry-dbid-bf2432ce-eda9-4306-8292-0a84a2995d9d")}catch{}})();const D={DEBUG:{label:"Debug",color:"rgba(107, 114, 128, 0.55)"},INFO:{label:"Info",color:"rgba(34, 197, 94, 0.65)"},WARN:{label:"Warn",color:"rgba(234, 179, 8, 0.8)"},ERROR:{label:"Error",color:"rgba(239, 68, 68, 0.9)"}};function ye(t,s){const c=s.findIndex(o=>o.time===t);if(c===-1)return t;if(c===s.length-1){const o=new Date(s[c].time).getTime(),m=new Date(s[c-1].time).getTime();return new Date(o+(o-m)).toISOString()}return s[c+1].time}function pe(t,s){const c=s.findIndex(o=>o.time===t);if(c===-1)return t;if(c===0){const o=new Date(s[0].time).getTime(),m=new Date(s[1].time).getTime();return new Date(o-(m-o)).toISOString()}return s[c-1].time}function ve(t,s,c){const o=new Date(t),m=c.getTime()-s.getTime(),h=1440*60*1e3,e=7*h;return m>e?o.toLocaleDateString([],{month:"short",day:"numeric"}):m>h?`${o.toLocaleDateString([],{month:"short",day:"numeric"})} ${o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function be({metrics:t,since:s,until:c,onZoom:o}){const[m,h]=l.useState(null),[e,f]=l.useState(null),[r,w]=l.useState(null),[x,p]=l.useState(null),[g,S]=l.useState(!1),v=new Date(s),k=new Date(c??new Date().toISOString()),L=i=>{i!=null&&i.activeLabel&&(h(i.activeLabel),w(pe(i.activeLabel,t)),S(!0))},T=i=>{g&&(i!=null&&i.activeLabel)&&(f(i.activeLabel),p(ye(i.activeLabel,t)))},j=()=>{if(r&&x){const[i,b]=[r,x].sort();o(i,b)}h(null),f(null),w(null),p(null),S(!1)};return a.jsx(K,{config:D,className:"h-24 min-h-24 w-full",children:a.jsx("div",{className:"h-full",style:{touchAction:"none"},children:a.jsx(Q,{width:"100%",height:"100%",children:a.jsxs(V,{data:t,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:L,onMouseMove:T,onMouseUp:j,children:[a.jsx(z,{vertical:!1}),a.jsx(J,{dataKey:"time",tickFormatter:i=>ve(i,v,k),tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),a.jsx($,{content:a.jsx(X,{className:"w-[150px] font-mono text-xs",labelFormatter:i=>new Date(i).toLocaleString()})}),a.jsx(I,{dataKey:"INFO",stackId:"normal",fill:D.INFO.color,isAnimationActive:!1}),a.jsx(I,{dataKey:"WARN",stackId:"normal",fill:D.WARN.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),a.jsx(I,{dataKey:"DEBUG",stackId:"normal",fill:D.DEBUG.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),a.jsx(I,{dataKey:"ERROR",stackId:"error",fill:D.ERROR.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),m&&e&&a.jsx(H,{x1:m,x2:e,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})})})}const B=100,N="tenant-logs-filters",U=ie({q:O().optional(),tw:oe(["1h","6h","1d","7d"]).default("1d"),since:O().optional(),until:O().optional()});function W(t){const s={"1h":1,"6h":6,"1d":24,"7d":168}[t];return new Date(Date.now()-s*60*60*1e3).toISOString()}function ke(t){return`${t.timestamp??""}-${t.line??""}`}function Le(t){return t.map(s=>({timestamp:s.createdAt,line:s.message,level:s.level,metadata:s.metadata,attempt:s.attempt,taskExternalId:s.taskExternalId,taskDisplayName:s.taskDisplayName}))}function Te(){var R,d;const{tenantId:t}=Y(),{refetchInterval:s}=Z(),[c,o]=ee(),m=M({...te.workflows.list(t,{limit:1e3}),refetchInterval:s}),h=l.useMemo(()=>{var n;return(((n=m.data)==null?void 0:n.rows)??[]).reduce((u,y)=>(u[y.name]=y.metadata.id,u),{})},[(R=m.data)==null?void 0:R.rows]),e=l.useMemo(()=>{const n=c.get(N);try{return U.parse(n?JSON.parse(n):{})}catch{return U.parse({})}},[c]),f=l.useCallback(n=>{o(u=>({...Object.fromEntries(u.entries()),[N]:JSON.stringify({...e,...n})}))},[e,o]),r=l.useMemo(()=>se(e.q??""),[e.q]),w=l.useMemo(()=>{if(!r.workflow)return;const n=h[r.workflow];return n?[n]:void 0},[r.workflow,h]),[x,p]=l.useState(()=>e.since??W(e.tw));l.useEffect(()=>{p(e.since??W(e.tw))},[e.tw,e.since,e.until,r.level,r.search]);const g=ne({queryKey:["tenant-logs",t,x,e.until,r.level,r.search,w],queryFn:async({pageParam:n})=>(await F.v1TenantLogLineList(t,{limit:B,since:x,...n?{until:n}:e.until?{until:e.until}:{},...r.level&&{levels:[_[r.level]]},...r.search&&{search:r.search},...w&&{workflow_ids:w},order_by_direction:ae.DESC})).data,initialPageParam:void 0,getNextPageParam:n=>{const u=n.rows??[];if(!(u.length{var y;const n=new Set,u=[];for(const G of((y=g.data)==null?void 0:y.pages)??[])for(const P of Le(G.rows??[])){const E=ke(P);n.has(E)||(n.add(E),u.push(P))}return u},[g.data]),v=l.useCallback(()=>{g.hasNextPage&&!g.isFetchingNextPage&&g.fetchNextPage()},[g]),k=M({queryKey:["tenant-log-metrics",t,x,e.until,r.level,r.search,w],queryFn:async()=>(await F.v1TenantLogLineGetPointMetrics(t,{since:x,...e.until&&{until:e.until},...r.level&&{levels:[_[r.level]]},...r.search&&{search:r.search},...w&&{workflow_ids:w}})).data,refetchInterval:s,enabled:!!t}),L=l.useCallback((n,u)=>{f({since:n,until:u})},[f]),T=l.useCallback(n=>{o(u=>({...Object.fromEntries(u.entries()),[N]:JSON.stringify({...e,tw:n,since:void 0,until:void 0})}))},[e,o]),j=l.useCallback(()=>{o(n=>({...Object.fromEntries(n.entries()),[N]:JSON.stringify({...e,since:void 0,until:void 0})}))},[e,o]),i=l.useCallback(n=>f({since:n}),[f]),b=l.useCallback(n=>f({until:n}),[f]),A=!!e.since;return{logs:S,isLoading:g.isLoading,isRefetching:g.isRefetching,isFetchingMore:g.isFetchingNextPage,refetch:g.refetch,fetchOlderLogs:v,queryString:e.q??"",setQueryString:n=>f({q:n}),parsedQuery:r,chartSince:x,chartUntil:e.until,chartMetrics:((d=k.data)==null?void 0:d.results)??[],setCustomTimeRange:L,timeWindow:e.tw,isCustomTimeRange:A,customSince:e.since,customUntil:e.until,setTimeWindow:T,clearTimeRange:j,setCustomSince:i,setCustomUntil:b,workflowNames:Object.keys(h)}}function Ce(){const{logs:t,isLoading:s,isRefetching:c,refetch:o,fetchOlderLogs:m,queryString:h,setQueryString:e,chartSince:f,chartUntil:r,chartMetrics:w,setCustomTimeRange:x,timeWindow:p,isCustomTimeRange:g,customSince:S,customUntil:v,setTimeWindow:k,clearTimeRange:L,setCustomSince:T,setCustomUntil:j,workflowNames:i}=Te(),b=re(),A=l.useMemo(()=>({workflowNames:i}),[i]),R=l.useCallback(d=>{b.open({type:"task-run-details",content:{taskRunId:d,showViewTaskRunButton:!0}})},[b]);return a.jsxs("div",{className:"flex flex-col h-full gap-4",children:[a.jsx(be,{metrics:w,since:f,until:r,onZoom:x}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx(le,{value:h,onChange:e,onSubmit:e,getAutocomplete:(d,n)=>{const u=ue(d,n);return{...u,suggestions:u.suggestions.filter(y=>y.value!=="attempt:")}},applySuggestion:ce,autocompleteContext:A,placeholder:"Search logs...",filterChips:[{key:"level:",label:"Level",description:"Filter by log level"},{key:"workflow:",label:"Workflow",description:"Filter by workflow name"}],className:"flex-1"}),g?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(q,{label:"After",date:S?new Date(S):void 0,setDate:d=>T(d==null?void 0:d.toISOString()),triggerClassName:"h-8 text-xs"}),a.jsx(q,{label:"Before",date:v?new Date(v):void 0,setDate:d=>j(d==null?void 0:d.toISOString()),triggerClassName:"h-8 text-xs"}),a.jsx(de,{onClick:L,variant:"ghost",size:"sm",leftIcon:a.jsx(me,{className:"size-4"}),children:"Clear"})]}):a.jsxs(fe,{value:p,onValueChange:d=>{d==="custom"?x(f,new Date().toISOString()):k(d)},children:[a.jsx(ge,{className:"h-8 text-xs w-28",children:a.jsx(he,{placeholder:"Choose time range"})}),a.jsxs(we,{children:[a.jsx(C,{value:"1h",children:"1 hour"}),a.jsx(C,{value:"6h",children:"6 hours"}),a.jsx(C,{value:"1d",children:"1 day"}),a.jsx(C,{value:"7d",children:"7 days"}),a.jsx(C,{value:"custom",children:"Custom"})]})]}),a.jsx(xe,{isRefetching:c,onRefetch:o})]}),a.jsx(Se,{logs:t,onScrollToBottom:m,isLoading:s,onViewRun:R,showAttempt:!1,showTaskName:!0,emptyMessage:"No logs found for this time window."},h+f+(r??""))]})}export{Ce as default}; diff --git a/hatchetembed/dashboard/assets/index-CxZ5d6ga.js b/hatchetembed/dashboard/assets/index-CxZ5d6ga.js new file mode 100644 index 0000000000..2b04fbf61c --- /dev/null +++ b/hatchetembed/dashboard/assets/index-CxZ5d6ga.js @@ -0,0 +1 @@ +import{l as Q,ch as G,ci as J,k as v,aF as X,b,N as Z,d5 as Y,O as P,p as ee,q as se,a as ae,j as e,F,i as re,aj as te,ah as ne,B as p,eE as ie,ak as le,al as de,W as o,X as h,a3 as m,Z as c,aH as k,b6 as M,b7 as B,cO as oe,a4 as H,a2 as K,e as ce,g as xe,d7 as ue,eF as he,d9 as me,aI as ge,aJ as fe,aK as je,aL as ye}from"./index-wypz6hY5.js";import{R as ve}from"./resource-not-found-C1NYDT14.js";import{F as be}from"./ServerStackIcon-nXfmiORr.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="596ce002-8256-4f5b-ab86-c3729161e6b4",r._sentryDebugIdIdentifier="sentry-dbid-596ce002-8256-4f5b-ab86-c3729161e6b4")}catch{}})();const pe=r=>{const t=[];return r?(r.status!=="ACTIVE"&&t.push("Worker has stopped heartbeating"),r.dispatcherId||t.push("Worker has no assigned dispatcher"),r.lastHeartbeatAt||t.push("Worker has no heartbeat"),t):(t.push("Worker is undefined"),t)},ke=({status:r="INACTIVE",health:t})=>{const g={ACTIVE:"Active",INACTIVE:"Inactive",PAUSED:"Paused"},x={ACTIVE:"successful",INACTIVE:"failed",PAUSED:"inProgress"};return e.jsx("div",{className:"item-center flex flex-row gap-2",children:e.jsx(ge,{children:e.jsxs(fe,{children:[e.jsx(je,{children:e.jsx(K,{variant:x[r],children:g[r]})}),e.jsx(ye,{children:t.map((j,y)=>e.jsx("div",{children:j},y))})]})})})},N=10;function Ce(){var I,C,A,E,R,T,W,D,L,S;const{handleApiError:r}=Q({}),{tenantId:t}=G(),{refetchInterval:g}=J(),[x,j]=v.useState(!1),y=X({from:b.tenantWorkerRoute.to}),i=Z({...P.workers.get(y.worker),refetchInterval:g,retry:(a,n)=>Y(n)}),s=i.data,_=pe(s),O=ee({mutationKey:["worker:update",s==null?void 0:s.metadata.id],mutationFn:async a=>(await ae.workerUpdate(s.metadata.id,a)).data,onSuccess:async()=>{await se.invalidateQueries({queryKey:P.workers.get(s.metadata.id).queryKey})},onError:r}),u=v.useMemo(()=>{var a;return((a=s==null?void 0:s.registeredWorkflows)==null?void 0:a.sort((n,l)=>n.name.toLowerCase().localeCompare(l.name.toLowerCase())))??[]},[s]),$=v.useMemo(()=>x?u:u.slice(0,N),[x,u]);if(i.isLoading)return e.jsx(F,{});if(i.isError){if(re(i.error)&&((I=i.error.response)==null?void 0:I.status)===404)return e.jsx(ve,{resource:"Worker",primaryAction:{label:"Back to Workers",navigate:{to:b.tenantWorkersRoute.to,params:{tenant:t}}}});throw i.error}if(!s)return e.jsx(F,{});const w=Object.entries(s.slotConfig||{}).sort(([a],[n])=>a.localeCompare(n)),q=2+ +!!s.runtimeInfo+ +((((C=s==null?void 0:s.labels)==null?void 0:C.length)??0)>0);return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto p-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(be,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:s.name})]}),e.jsxs("div",{className:"flex flex-row gap-2",children:[e.jsx(ke,{status:s.status,health:_}),e.jsxs(te,{children:[e.jsx(ne,{children:e.jsx(p,{"aria-label":"Worker Actions",size:"icon",variant:"ghost",children:e.jsx(ie,{})})}),e.jsx(le,{children:e.jsxs(de,{disabled:s.status==="INACTIVE",onClick:()=>{O.mutate({isPaused:s.status!=="PAUSED"})},children:[s.status==="PAUSED"?"Resume":"Pause"," Step Run Assignment"]})})]})]})]}),e.jsxs("div",{className:ce("mt-6 grid gap-4 md:grid-cols-2",`lg:grid-cols-${q}`),children:[e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(h,{children:e.jsx(m,{children:"Connection Info"})}),e.jsxs(c,{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"First Connected"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.jsx(k,{date:(A=s.metadata)==null?void 0:A.createdAt})})]}),s.lastListenerEstablished&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Last Listener Established"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.jsx(k,{date:s.lastListenerEstablished})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Last Heartbeat"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.lastHeartbeatAt?e.jsx(k,{date:s.lastHeartbeatAt}):"Never"})]})]})]}),e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(h,{children:e.jsx(m,{children:"Slots"})}),e.jsxs(c,{className:"space-y-3",children:[w.length===0?e.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"No slots"}):e.jsx("div",{className:"space-y-3",children:w.map(([a,n])=>{const l=n==null?void 0:n.available,d=(n==null?void 0:n.limit)??0,f=l!==void 0,V=f?d-l:0,z=f&&d>0?Math.round(V/d*100):0,U=f?`${l} / ${d}`:`${d}`;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:a}),e.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:U})]}),f&&d>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-gray-600/40 dark:bg-gray-500/50",children:e.jsx("div",{className:"h-full bg-emerald-300 dark:bg-emerald-500 transition-all",style:{width:`${z}%`}})}),e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:[V," used, ",l," available"]})]})]},a)})}),e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Slots represent concurrent task runs."," ",e.jsx(M,{variant:"text",doc:B.v1.workers,label:"Learn more",scrollTo:"understanding-slots"})]})]})]}),s.runtimeInfo&&(((E=s.runtimeInfo)==null?void 0:E.sdkVersion)||((R=s.runtimeInfo)==null?void 0:R.languageVersion)||((T=s.runtimeInfo)==null?void 0:T.os))&&e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(h,{children:e.jsx(m,{children:"Runtime Info"})}),e.jsxs(c,{className:"space-y-2 text-sm",children:[((W=s.runtimeInfo)==null?void 0:W.os)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"OS"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.os})]}),((D=s.runtimeInfo)==null?void 0:D.languageVersion)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Runtime"}),e.jsxs("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:[oe(s.runtimeInfo.language??"")," ",s.runtimeInfo.languageVersion]})]}),((L=s.runtimeInfo)==null?void 0:L.sdkVersion)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Hatchet SDK"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.sdkVersion})]}),((S=s.runtimeInfo)==null?void 0:S.runtimeExtra)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Runtime Extra"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.runtimeExtra})]})]})]}),s.labels&&s.labels.length>0&&e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsxs(h,{children:[e.jsx(m,{children:"Worker Labels"}),e.jsxs(H,{children:["Key-value pairs used to prioritize step assignment to specific workers."," ",e.jsx(M,{variant:"text",doc:B.v1["advanced-assignment"]["worker-affinity"],label:"Learn more",scrollTo:"specifying-worker-labels"})]})]}),e.jsx(c,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.labels.map(({key:a,value:n})=>e.jsxs(K,{variant:"secondary",children:[a,": ",n]},a))})})]})]}),e.jsxs(o,{variant:"light",className:"mt-4 overflow-y-auto bg-background border-none",children:[e.jsxs(h,{children:[e.jsx(m,{children:"Registered Workflows"}),e.jsx(H,{children:"Workflows that this worker can execute"})]}),e.jsxs(c,{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:$.map(a=>e.jsx(xe,{to:b.tenantWorkflowRoute.to,params:{tenant:t,workflow:a.id},children:e.jsx(p,{variant:"outline",size:"sm",children:a.name})},a.id))}),!x&&u.length>N&&e.jsx("div",{className:"mt-3 flex justify-start",children:e.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>j(!0),children:["Show ",u.length-N," ","more"]})})]})]}),e.jsx(o,{variant:"light",className:"mt-4 bg-primary border-none",children:e.jsx(c,{className:"flex-1 h-96 overflow-y-auto bg-background",children:e.jsx(ue,{tableKey:`worker-${s.metadata.id}`,display:{hideMetrics:!0,hideCounts:!0,hideTriggerRunButton:!0,hiddenFilters:[he],hideCancelAndReplayButtons:!0},runFilters:{workerId:s.metadata.id},children:e.jsx(me,{leftLabel:"Recent runs"})})})})]})})}export{Ce as default}; diff --git a/hatchetembed/dashboard/assets/index-D3mkQrYj.js b/hatchetembed/dashboard/assets/index-D3mkQrYj.js new file mode 100644 index 0000000000..1bd13e25f4 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-D3mkQrYj.js @@ -0,0 +1 @@ +import{k as o,j as e,e as P,d2 as O,a2 as l,c$ as F,bj as $,b8 as A,L as f,d3 as k,d4 as c,ch as B,ci as V,aF as T,b as d,N as w,d5 as K,O as R,h as G,p as M,a as U,F as x,i as q,B as C,c_ as H,d6 as z,bs as Z,bt as J,bu as S,bv as W,d7 as Q,d8 as X,d9 as Y}from"./index-wypz6hY5.js";import{C as ee}from"./confirm-dialog-CMXood8J.js";import{R as se}from"./resource-not-found-C1NYDT14.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="ace056a8-ecba-4e06-8111-06a20a66e45e",s._sentryDebugIdIdentifier="sentry-dbid-ace056a8-ecba-4e06-8111-06a20a66e45e")}catch{}})();function te({title:s,titleId:t,...r},i){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),s?o.createElement("title",{id:t},s):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"}))}const re=o.forwardRef(te);function ae({tags:s}){return s==null?void 0:s.map(t=>e.jsx("div",{className:P(`text-[${t.color}] bg-[${t.color}]/10 ring-[${t.color}]/30`,"flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset"),children:t.name},t.name))}function ne(s){switch(s){case c.CANCEL_IN_PROGRESS:return"Cancel In Progress";case c.DROP_NEWEST:return"Drop Newest";case c.QUEUE_NEWEST:return"Queue Newest";case c.GROUP_ROUND_ROBIN:return"Group Round Robin";default:return s}}function ie(s){switch(s){case k.WORKFLOW:return"Workflow";case k.TASK:return"Task";default:return s}}function oe({workflow:s}){var r,i;const t=((r=s.triggers)==null?void 0:r.events)&&s.triggers.events.length>0||((i=s.triggers)==null?void 0:i.crons)&&s.triggers.crons.length>0;return e.jsxs("div",{className:"space-y-5",children:[t&&e.jsx(m,{title:"Triggers",children:e.jsx(le,{workflow:s})}),e.jsx(m,{title:"Concurrency",children:e.jsx(ce,{workflow:s})}),e.jsx(m,{title:"Other",children:e.jsx(de,{workflow:s})}),e.jsx(O,{workflowConfig:s.workflowConfig})]})}function m({title:s,children:t}){return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"border-b border-gray-200 pb-2 text-base font-semibold text-gray-900 dark:border-gray-700 dark:text-gray-100",children:s}),e.jsx("div",{className:"pl-1",children:t})]})}function g({message:s}){return e.jsx("p",{className:"text-sm italic text-gray-500 dark:text-gray-400",children:s})}function L({label:s,children:t,description:r}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:s}),t,r&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r})]})}function le({workflow:s}){return s.triggers?e.jsxs("div",{className:"space-y-2",children:[s.triggers.events&&s.triggers.events.length>0&&e.jsx(L,{label:"Events",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.triggers.events.map(t=>e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:t.event_key},t.event_key))})}),s.triggers.crons&&s.triggers.crons.length>0&&e.jsx(L,{label:"Cron Schedules",children:e.jsx("div",{className:"max-h-72 space-y-2 overflow-y-auto pr-2",children:s.triggers.crons.map(t=>e.jsxs("div",{children:[e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:t.cron},t.cron),t.cron&&e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:["Runs ",F(t.cron)]})]},t.cron))})})]}):e.jsx(g,{message:"There are no trigger settings for this workflow."})}function ce({workflow:s}){return!s.v1Concurrency||s.v1Concurrency.length===0?e.jsx(g,{message:"There are no concurrency settings for this workflow."}):e.jsx($,{data:s.v1Concurrency.map(t=>({stepReadableId:t.stepReadableId||"N/A",...t})).sort((t,r)=>r.scope.localeCompare(t.scope)||t.stepReadableId.localeCompare(r.stepReadableId)),rowKey:(t,r)=>`${t.scope}-${t.stepReadableId}-${r}`,columns:[{columnLabel:"Scope",cellRenderer:t=>ie(t.scope)},{columnLabel:"Task",cellRenderer:t=>t.stepReadableId},{columnLabel:"Max",cellRenderer:t=>t.maxRuns},{columnLabel:"Strategy",cellRenderer:t=>e.jsx(l,{variant:"secondary",children:ne(t.limitStrategy)})},{columnLabel:"Expression",cellRenderer:t=>e.jsx(A,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:t.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"})}]})}function de({workflow:s}){return s.sticky||s.defaultPriority?e.jsxs("div",{className:"space-y-2",children:[s.sticky&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Sticky Strategy:"}),e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:s.sticky})]}),s.defaultPriority&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Default Priority:"}),e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:s.defaultPriority})]})]}):e.jsx(g,{message:"No additional configuration set for this workflow."})}function ge(){var b,N;const[s]=o.useState(),{tenantId:t}=B(),[r,i]=o.useState(!1),[E,h]=o.useState(!1),{refetchInterval:y}=V(),p=T({from:d.tenantWorkflowRoute.to}),a=w({...R.workflows.get(p.workflow),refetchInterval:y,retry:(D,_)=>K(_)}),u=w({...R.workflows.getVersion(p.workflow,s),refetchInterval:y}),I=G(),j=M({mutationKey:["workflow:delete",(b=a==null?void 0:a.data)==null?void 0:b.metadata.id],mutationFn:async()=>a!=null&&a.data?(await U.workflowDelete(a==null?void 0:a.data.metadata.id)).data:void 0,onSuccess:()=>{I({to:d.tenantWorkflowsRoute.to,params:{tenant:t}})}}),n=a.data;if(a.isLoading)return e.jsx(x,{});if(a.isError){if(q(a.error)&&((N=a.error.response)==null?void 0:N.status)===404)return e.jsx(se,{resource:"Workflow",primaryAction:{label:"Back to Workflows",navigate:{to:d.tenantWorkflowsRoute.to,params:{tenant:t}}}});throw a.error}if(!n)return e.jsx(x,{});const v=n.versions&&n.versions[0].version;return e.jsxs("div",{className:"flex h-full w-full flex-grow flex-col gap-y-4 overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 p-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(re,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:n.name}),v&&e.jsx(l,{className:"mt-1 text-sm",variant:"outline",children:v}),e.jsx(l,{variant:"successful",className:"px-2",children:"Active"})]}),e.jsx(ae,{tags:n.tags||[]}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx(C,{className:"text-sm",onClick:()=>i(!0),children:"Trigger Workflow"})}),e.jsx(H,{show:r,defaultWorkflow:n,onClose:()=>i(!1)})]}),e.jsx("div",{className:"mt-4 flex flex-row items-center justify-start",children:e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Updated"," ",z(n.versions&&n.versions[0].metadata.updatedAt)]})}),n.description&&e.jsx("div",{className:"mt-4 text-sm text-gray-700 dark:text-gray-300",children:n.description})]}),e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-6 lg:px-8",children:e.jsxs(Z,{defaultValue:"runs",className:"flex h-full flex-col",children:[e.jsxs(J,{layout:"underlined",className:"mb-4",children:[e.jsx(S,{variant:"underlined",value:"runs",children:"Runs"}),e.jsx(S,{variant:"underlined",value:"settings",children:"Settings"})]}),e.jsx(W,{value:"runs",className:"min-h-0 flex-1",children:e.jsx(ue,{})}),e.jsxs(W,{value:"settings",className:"min-h-0 flex-1 overflow-y-auto pt-4 pb-8",children:[u.isLoading||!u.data?e.jsx(x,{}):e.jsx(oe,{workflow:u.data}),e.jsx("div",{className:"mt-8",children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"border-b border-gray-200 pb-2 text-base font-semibold text-gray-900 dark:border-gray-700 dark:text-gray-100",children:"Danger Zone"}),e.jsx("div",{className:"pl-1",children:e.jsx("div",{className:"max-w-xl rounded-md border border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-800/50",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:"Delete Workflow"}),e.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:"Permanently delete this workflow and all its data. This action cannot be undone."})]}),e.jsx(C,{variant:"destructive",size:"sm",onClick:()=>{h(!0)},children:"Delete Workflow"})]})})})]})}),e.jsx(ee,{title:"Delete workflow",description:`Are you sure you want to delete the workflow ${n.name}? This action cannot be undone, and will immediately prevent any services running with this workflow from executing steps.`,submitLabel:"Delete",onSubmit:function(){j.mutate()},onCancel:function(){h(!1)},isLoading:j.isPending,isOpen:E})]})]})})]})}function ue(){const s=T({from:d.tenantWorkflowRoute.to});return e.jsx(Q,{tableKey:`workflow-${s.workflow}`,initColumnVisibility:{Workflow:!1},filterVisibility:{Workflow:!1},display:{hideMetrics:!0,hiddenFilters:[X]},runFilters:{workflowId:s.workflow},children:e.jsx(Y,{})})}export{ge as default}; diff --git a/hatchetembed/dashboard/assets/index-D5hDqXBK.js b/hatchetembed/dashboard/assets/index-D5hDqXBK.js new file mode 100644 index 0000000000..3350ea9e3f --- /dev/null +++ b/hatchetembed/dashboard/assets/index-D5hDqXBK.js @@ -0,0 +1,6 @@ +import{v as I,k as S,j as e,B as w,u as T,t as D,cu as P,_ as E,$ as A,a0 as L,a1 as O,L as f,b2 as R,a5 as _,a6 as B,a7 as z,a8 as V,a9 as K,I as J,ab as v,bd as H,aA as q,cv as M,aB as W,cw as $,cx as G,cy as b,cz as N,cA as Q,cB as U,b6 as X,b7 as Y,cC as Z}from"./index-wypz6hY5.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="c95939f7-b575-4e27-a0b4-91cf0f6623eb",s._sentryDebugIdIdentifier="sentry-dbid-c95939f7-b575-4e27-a0b4-91cf0f6623eb")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ee=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],se=I("funnel",ee);function ae({isOpen:s,onClose:t,workflowNameFilters:n,onCreate:d,isCreating:r}){const[m,c]=S.useState(null),h=T({resolver:D(P),defaultValues:{workflowId:"",scope:"",expression:"",payload:""}}),{register:i,handleSubmit:y,control:g,reset:u,formState:{errors:o}}=h,x=async l=>{try{const a=l.payload.trim()||"{}",C=JSON.parse(a);c(null),await d({...l,payload:C}),u(),t()}catch(a){if(a instanceof SyntaxError){c("The filter payload must be valid JSON");return}console.error("Failed to create filter:",a)}},p=()=>{u(),c(null),t()};return e.jsx(E,{open:s,onOpenChange:p,children:e.jsxs(A,{className:"max-w-md",children:[e.jsx(L,{children:e.jsxs(O,{className:"flex items-center gap-2",children:[e.jsx(se,{className:"size-5"}),"Create New Filter"]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{htmlFor:"create-workflow",children:"Workflow *"}),e.jsx(R,{name:"workflowId",control:g,render:({field:l})=>e.jsxs(_,{value:l.value,onValueChange:l.onChange,children:[e.jsx(B,{children:e.jsx(z,{placeholder:"Select a workflow"})}),e.jsx(V,{children:n.map(a=>e.jsx(K,{value:a.value,children:a.label},a.value))})]})}),o.workflowId&&e.jsx("p",{className:"text-sm text-red-600",children:o.workflowId.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{htmlFor:"create-scope",children:"Scope *"}),e.jsx(J,{id:"create-scope",...i("scope"),placeholder:"e.g., event, step, workflow"}),o.scope&&e.jsx("p",{className:"text-sm text-red-600",children:o.scope.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{htmlFor:"create-expression",children:"Expression *"}),e.jsx(v,{id:"create-expression",...i("expression"),placeholder:"Enter your filter expression...",className:"min-h-[100px] font-mono"}),o.expression&&e.jsx("p",{className:"text-sm text-red-600",children:o.expression.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{htmlFor:"create-payload",children:"Payload (JSON)"}),e.jsx(v,{id:"create-payload",...i("payload"),placeholder:'{"key": "value"} or leave empty for {}',className:"min-h-[80px] font-mono text-sm",onChange:l=>{i("payload").onChange(l),c(null)}}),m&&e.jsx("p",{className:"text-sm text-red-600",children:m})]})]}),e.jsxs(H,{children:[e.jsx(w,{variant:"outline",onClick:p,children:"Cancel"}),e.jsx(w,{onClick:y(x),disabled:r,children:r?"Creating...":"Create Filter"})]})]})})}function te({workflowNameFilters:s,onCreate:t,isCreating:n}){const[d,r]=S.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(w,{onClick:()=>r(!0),variant:"cta",children:"Create Filter"}),e.jsx(ae,{isOpen:d,onClose:()=>r(!1),workflowNameFilters:s,onCreate:t,isCreating:n})]})}function oe(){const s=q(),{pagination:t,setPagination:n,setPageSize:d,refetch:r,filters:m,numFilters:c,error:h,isLoading:i,isRefetching:y,columnFilters:g,setColumnFilters:u,workflowIdToName:o,workflowNameFilters:x,mutations:p}=M({key:"table"}),[l,a]=W("hatchet:columns:filters",{[$]:!1}),F=Z(o,j=>{s.open({type:"filter-detail",content:{filter:j}})}),k=[e.jsx(te,{workflowNameFilters:x,onCreate:p.create.perform,isCreating:p.create.isPending},"create")];return e.jsx(G,{error:h,isLoading:i,columns:F,data:m,filters:[{columnId:Q,title:b.workflowId,options:x,type:N.Checkbox},{columnId:U,title:b.scope,type:N.Array}],showColumnToggle:!0,columnVisibility:l,setColumnVisibility:a,rightActions:k,columnFilters:g,setColumnFilters:u,pagination:t,setPagination:n,onSetPageSize:d,pageCount:c,getRowId:j=>j.metadata.id,emptyState:e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[e.jsx("p",{className:"text-lg font-semibold",children:"No filters found"}),e.jsx("div",{className:"w-fit",children:e.jsx(X,{doc:Y.v1.events,scrollTo:"event-filters",label:"Learn about event filters"})})]}),columnKeyToName:b,showSelectedRows:!1,refetchProps:{isRefetching:y,onRefetch:r}})}export{oe as default}; diff --git a/hatchetembed/dashboard/assets/index-DK4vQ8G3.js b/hatchetembed/dashboard/assets/index-DK4vQ8G3.js new file mode 100644 index 0000000000..b8e7004725 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-DK4vQ8G3.js @@ -0,0 +1 @@ +import{ch as k,ci as T,k as h,N as j,O as p,j as e,F as z,B as f,W as y,X as N,a3 as w,a4 as U,eG as G,aH as Q,g as C,b as v,Z as D,ar as $,l as H,S as q,eH as P,aa as O,_ as V,$ as X,a0 as Y,a1 as Z,bc as J,bd as K,eI as ee,c as se}from"./index-wypz6hY5.js";import{F as L,B as ae}from"./billing-required-TKoe60qy.js";import{M as te}from"./managed-workers-gate-DSQbhr0o.js";import{G as re}from"./github-button-Bg3zFNFs.js";import{F as ne}from"./ArrowPathIcon-7-QIcdZ1.js";import{F as oe,m as S,R as ie}from"./managed-compute-cM-46wXY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="5f159e54-4bfd-455b-a278-f9907030490c",a._sentryDebugIdIdentifier="sentry-dbid-5f159e54-4bfd-455b-a278-f9907030490c")}catch{}})();const de=({data:a})=>{var r,d,l,c,u,x;const{tenantId:s}=k(),n=(r=a.runtimeConfigs)==null?void 0:r.reduce((o,i)=>o+i.numReplicas,0),m=(d=a.runtimeConfigs)==null?void 0:d.reduce((o,i)=>o+i.cpus,0),t=(l=a.runtimeConfigs)==null?void 0:l.reduce((o,i)=>o+i.memoryMb,0);return e.jsxs("div",{className:"overflow-hidden rounded-lg border shadow",children:[e.jsxs("div",{className:"flex flex-col gap-1 px-4 py-5 sm:p-6",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(oe,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h3",{className:"text-lg font-semibold leading-tight text-foreground",children:a.name})]}),e.jsxs("p",{className:"mt-1 max-w-2xl text-sm text-gray-700 dark:text-gray-300",children:["Created ",e.jsx(Q,{date:(c=a.metadata)==null?void 0:c.createdAt})]}),a.buildConfig&&e.jsx(re,{buildConfig:a.buildConfig,prefix:"Deploys from"}),e.jsxs("p",{className:"mt-1 max-w-2xl text-sm text-gray-700 dark:text-gray-300",children:[n," ",n==1?"instance":"instances"," with"," ",m," CPUs and ",t," MB memory"]})]}),e.jsx("div",{className:"px-4 py-4 sm:px-6",children:e.jsx("div",{className:"text-background-secondary text-sm",children:e.jsx(C,{to:v.tenantManagedWorkerRoute.to,params:{tenant:s,managedWorker:(u=a.metadata)==null?void 0:u.id},children:e.jsx(f,{children:"View Compute Instance"})})})})]},(x=a.metadata)==null?void 0:x.id)};function le(){var d;const{tenantId:a}=k(),{refetchInterval:s}=T(),[n,m]=h.useState(!1),t=j({...p.cloud.listManagedWorkers(a),refetchInterval:s}),r=h.useMemo(()=>{var c;return(((c=t.data)==null?void 0:c.rows)||[]).sort((u,x)=>{var o,i;return((o=u.metadata)==null?void 0:o.created_at)<((i=x.metadata)==null?void 0:i.created_at)?1:-1})},[(d=t.data)==null?void 0:d.rows]);return t.isLoading?e.jsx(z,{}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"flex flex-row justify-end mb-4",children:e.jsx(f,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:()=>{t.refetch(),m(!n)},variant:"outline","aria-label":"Refresh events list",children:e.jsx(ne,{className:`size-4 transition-transform ${n?"rotate-180":""}`})},"refresh")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[r.map(l=>e.jsx(de,{data:l},l.metadata.id)),r.length===0&&e.jsxs(y,{className:"w-full text-justify",children:[e.jsxs(N,{children:[e.jsx(w,{children:"No Managed Services"}),e.jsx(U,{children:e.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:"There are no managed services created in this tenant."})})]}),e.jsx(G,{})]})]})]})}function ce({computeCost:a,isLoading:s}){if(s)return e.jsxs(y,{className:"w-full",children:[e.jsx(N,{className:"pb-2",children:e.jsxs(w,{className:"text-md flex items-center font-medium",children:[e.jsx(L,{className:"mr-2 h-5 w-5 text-primary"}),"Monthly Usage"]})}),e.jsx(D,{children:e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."})})]});if(!a)return null;const{cost:n,hasCreditsRemaining:m,creditsRemaining:t}=a,r=n<0||m,d=Math.abs(r&&t!==void 0?t:n),l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(d);return e.jsxs(y,{className:"w-full",children:[e.jsxs(N,{className:"pb-2",children:[e.jsxs(w,{className:"text-md flex items-center font-medium",children:[e.jsx(L,{className:"mr-2 h-5 w-5 text-primary"}),"Monthly Usage"]}),e.jsx(U,{children:"Current billing period"})]}),e.jsx(D,{children:e.jsxs("div",{className:"flex items-center",children:[e.jsxs("div",{className:`text-xl font-bold ${r?"text-green-500":"text-foreground"}`,children:[r?"+ ":"- ",l]}),e.jsx("div",{className:"ml-2 text-sm text-muted-foreground",children:r?"credits remaining":"used this month"})]})})]})}function me(){var M,I,R,W;const{tenant:a,billing:s,can:n,organizationId:m}=$(),{tenantId:t}=k(),[r,d]=h.useState(!1),[l,c]=h.useState(!1),u=j({...p.cloud.getComputeCost(t)}),x=j({...p.cloud.listManagedWorkers(t)}),o=((I=(M=x.data)==null?void 0:M.rows)==null?void 0:I.length)||0,[i]=n(S.canCreateWorkerPool(o));h.useEffect(()=>{s!=null&&s.hasPaymentMethods&&(s==null||s.setPollBilling(!1))},[s,s==null?void 0:s.hasPaymentMethods]);const[,B]=n(S.create()),{handleApiError:F}=H({}),A=async()=>{try{if(r||(d(!0),s==null||s.setPollBilling(!0),!t)||!m)return;const g=await se.billingPortalLinkGet(m);window.open(g.data.url,"_blank")}catch(g){F(g)}finally{d(!1)}},E=(((W=(R=x.data)==null?void 0:R.rows)==null?void 0:W.length)||0)>0;if(s!=null&&s.isLoading)return e.jsx("div",{className:"flex items-center justify-center h-screen",children:e.jsx(q,{})});if(B==ie.BILLING_REQUIRED&&!E)return e.jsx(ae,{tenant:a,billing:s,manageClicked:A,portalLoading:r});const b=()=>{if(!(s!=null&&s.plan))return 0;switch(s.plan){case"free":return 1;case"starter":return 2;case"growth":return 5;default:return 5}},_=()=>{i||c(!0)};return e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"Managed Compute"}),i?e.jsx(C,{to:v.tenantManagedWorkersCreateRoute.to,params:{tenant:t},children:e.jsx(f,{leftIcon:e.jsx(P,{className:"size-4"}),children:"Add Service"})}):e.jsxs(f,{onClick:_,leftIcon:e.jsx(P,{className:"size-4"}),children:["Add Service (",o,"/",b(),")"]})]}),e.jsx(O,{className:"my-4"}),x.isLoading?e.jsx("div",{children:"Loading..."}):e.jsx(le,{}),e.jsx("div",{className:"mb-6 mt-6",children:e.jsx(ce,{computeCost:u.data,isLoading:u.isLoading})})]}),e.jsx(V,{open:l,onOpenChange:c,children:e.jsxs(X,{className:"max-w-md",children:[e.jsxs(Y,{children:[e.jsx(Z,{children:"Plan Upgrade Required"}),e.jsxs(J,{children:["You've reached the maximum number of services (",o,"/",b(),") allowed on your current plan. Upgrade to create more services."]})]}),e.jsxs(K,{children:[e.jsx(f,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(C,{to:v.tenantSettingsBillingRoute.to,params:{tenant:t},children:e.jsx(f,{leftIcon:e.jsx(ee,{className:"size-4"}),children:"Upgrade Plan"})})]})]})})]})}function pe(){return e.jsx(te,{children:e.jsx(me,{})})}export{pe as default}; diff --git a/hatchetembed/dashboard/assets/index-DM7I-Hm9.js b/hatchetembed/dashboard/assets/index-DM7I-Hm9.js new file mode 100644 index 0000000000..2205357c27 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-DM7I-Hm9.js @@ -0,0 +1 @@ +import{j as s,d7 as d,d9 as i}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2e262b5e-6987-483e-ac4c-d2d4586854dc",e._sentryDebugIdIdentifier="sentry-dbid-2e262b5e-6987-483e-ac4c-d2d4586854dc")}catch{}})();function t(){return s.jsx("div",{className:"size-full flex-grow",children:s.jsx(d,{tableKey:"workflow-runs-main",persistColumnVisibilityKey:"workflow-runs-main",children:s.jsx(i,{})})})}export{t as default}; diff --git a/hatchetembed/dashboard/assets/index-DXK1Y_MW.js b/hatchetembed/dashboard/assets/index-DXK1Y_MW.js new file mode 100644 index 0000000000..09bd670a3f --- /dev/null +++ b/hatchetembed/dashboard/assets/index-DXK1Y_MW.js @@ -0,0 +1 @@ +import{h as i,j as e,B as n,b as o}from"./index-wypz6hY5.js";import{N as r}from"./new-organization-saver-form-Uz97g08A.js";import{F as d}from"./XMarkIcon-BazlLPpF.js";import"./welcome-modal-state-B1mOgpQO.js";import"./support-chat-CGvrRU-a.js";import"./shard-deployment-key-CJfQX3l3.js";import"./use-analytics-BZxgE2Kk.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="74f18ae9-dcbd-4781-8340-feea6bbbcc3a",a._sentryDebugIdIdentifier="sentry-dbid-74f18ae9-dcbd-4781-8340-feea6bbbcc3a")}catch{}})();function p(){const a=i();return e.jsx("div",{className:"max-h-full overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-6xl space-y-6 p-6",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(n,{variant:"ghost",size:"sm",onClick:()=>window.history.back(),className:"h-8 w-8 p-0",children:e.jsx(d,{className:"size-4"})})}),e.jsx("h1",{className:"text-2xl font-bold text-center",children:"Create a new organization"}),e.jsx("div",{className:"flex justify-center",children:e.jsx(r,{afterSave:({organization:t,tenant:s})=>{a({to:o.tenantOverviewRoute.to,params:{tenant:s.id}})}})})]})})}export{p as default}; diff --git a/hatchetembed/dashboard/assets/index-DoDygpS4.js b/hatchetembed/dashboard/assets/index-DoDygpS4.js new file mode 100644 index 0000000000..f072796a14 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-DoDygpS4.js @@ -0,0 +1,38 @@ +import{R as te,j as e,B as k,e as g,ad as V,g as q,y as be,N as ve,O as ae,ae as ne,S as ye,k as r,af as U,ag as re,ah as Z,ai as ke,aj as oe,ak as ie,al as L,am as je,an as Ce,ao as we,ap as Ne,aq as ze,ar as le,h as Re,as as Y,at as Q,au as Le,av as G,aw as H,ax as _,ay as ce,az as de,b as p,aA as Se,aB as Ee,aC as Me,aD as _e,J as De,G as Ie,F as We,aE as Te}from"./index-wypz6hY5.js";import{u as ue}from"./support-chat-CGvrRU-a.js";import{R as Be,C as Pe}from"./index-zTXL414p.js";import{R as Ae,a as He,b as Oe,c as Fe,d as Xe,e as Ue,f as Ge,g as Ze,h as Ve,i as K,j as qe,k as Je,l as Ye,m as Qe,n as Ke,o as $e}from"./index-C8__5p50.js";import{u as es}from"./outlet-C0gyZt4v.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="76f4c90e-8cc7-4704-808a-1b02d775c7f4",t._sentryDebugIdIdentifier="sentry-dbid-76f4c90e-8cc7-4704-808a-1b02d775c7f4")}catch{}})();const ss=Be,ts=Pe,S=te.forwardRef(({name:t,icon:s,muted:l=!1,className:m,...a},n)=>e.jsxs(k,{...a,ref:n,type:"button",variant:"ghost",className:g("w-full justify-start pl-2 min-w-0 overflow-hidden",l&&"[&_svg]:text-muted-foreground/50",m),children:[s,e.jsx("span",{className:"truncate",children:t})]}));S.displayName="SidebarButtonPrimaryAction";function as(t){const s=V();if(!("to"in t)){const{name:x,icon:y,...v}=t;return e.jsx(S,{...v,name:x,icon:y})}const{onNavLinkClick:l,to:m,params:a,name:n,icon:o,prefix:u,collapsibleChildren:h=[]}=t,f=h.length>0?u?!!s({to:u,params:a,fuzzy:!0}):!!s({to:m,params:a,fuzzy:!0}):!1,j=h.length>0?f:!!s({to:m,params:a}),b=e.jsx(q,{to:m,params:a,preload:!1,onClick:l,children:e.jsxs(k,{variant:"ghost",className:g("w-full justify-start pl-2 min-w-0 overflow-hidden [&_svg]:text-muted-foreground/50",j&&"bg-slate-200 dark:bg-slate-800 [&_svg]:text-primary"),children:[o,e.jsx("span",{className:"truncate",children:n})]})});return h.length===0?b:e.jsxs(ss,{open:f,className:"w-full",children:[b,e.jsx(ts,{className:"ml-4 space-y-2 border-l border-muted",children:h})]})}function ns({onNavLinkClick:t,to:s,params:l,name:m,prefix:a}){const n=V(),o=a?!!n({to:a,params:l,fuzzy:!0}):!1,u=!!n({to:s,params:l})||o;return e.jsx(q,{to:s,params:l,preload:!1,onClick:t,children:e.jsx(k,{variant:"ghost",size:"sm",className:g("my-[1px] ml-1 mr-3 w-[calc(100%-3px)] justify-start pl-3 pr-0 min-w-0 overflow-hidden",u&&"bg-slate-200 dark:bg-slate-800"),children:e.jsx("span",{className:"truncate",children:m})})})}const rs=()=>{const{isControlPlaneEnabled:t}=be(),{data:s,isLoading:l,isError:m,error:a}=ve({...ae.info.getVersion,enabled:!t}),{isCloudEnabled:n}=ne();if(t)return null;if(l)return e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(ye,{})});if(m||!(s!=null&&s.version)){const o=a instanceof Error?a.message:"Failed to fetch version info";return e.jsx("div",{className:"text-xs text-red-500",children:o})}return e.jsxs("div",{className:"text-xs",children:[n?"Cloud":"Self-Hosted"," ",s.version]})};function os({includeChat:t=!0}){const s=ue();return e.jsxs(e.Fragment,{children:[t&&s.enabled&&e.jsxs(L,{variant:"interactive",onClick:s.show,children:[e.jsx(re,{className:"mr-2"}),"Chat with Support"]}),e.jsx(L,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:"https://docs.hatchet.run",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(je,{className:"mr-2"}),"Documentation"]})}),e.jsx(L,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:"https://discord.com/invite/ZMeUafwH89",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Ce,{className:"mr-2"}),"Join Discord"]})}),e.jsx(L,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:"https://hatchet.run/office-hours",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(we,{className:"mr-2"}),"Schedule Office Hours"]})}),e.jsx(Ne,{}),e.jsx(L,{variant:"static",children:e.jsx(rs,{})})]})}function $({variant:t="default",triggerVariant:s="icon",align:l="end",side:m,className:a}){const n=ue(),[o,u]=r.useState(!1),h=s==="split"&&n.enabled,f=!h,j=n.enabled?"Support Chat":"Help",b=s==="split"&&!n.enabled?e.jsx(S,{name:"Help",icon:e.jsx(U,{className:"size-4 mr-2"}),className:g(a)}):h?e.jsxs("div",{className:g("flex w-full",a),children:[e.jsx(S,{name:j,icon:e.jsx(re,{className:"size-4 mr-2"}),className:"w-auto flex-1 rounded-r-none",onClick:()=>{if(n.enabled){n.show();return}u(!0)},"aria-label":"Open Support Chat"}),e.jsx(Z,{asChild:!0,children:e.jsx(k,{type:"button",variant:"ghost",size:"icon","aria-label":"Open Support Menu",className:"rounded-l-none border-l border-slate-200 dark:border-slate-800",children:e.jsx(ke,{className:"size-4 opacity-70"})})})]}):s==="button"?e.jsx(S,{name:"Help & Support",icon:e.jsx(U,{className:"size-4 mr-2"}),className:g(a)}):e.jsx(k,{variant:"icon",size:"icon","aria-label":"Help Menu",hoverText:"Help & Support",hoverTextSide:"right",className:a,children:e.jsx(U,{className:"h-6 w-6 cursor-pointer text-foreground"})});return e.jsxs(oe,{open:o,onOpenChange:u,children:[h?b:e.jsx(Z,{asChild:!0,children:b}),e.jsx(ie,{className:"w-56",variant:t==="sidebar"?"sidebar":"default",align:l,side:m,forceMount:!0,children:e.jsx(os,{includeChat:f})})]})}const ee={current:0};function is({className:t,navItems:s}){const{sidebarOpen:l,setSidebarOpen:m,isWide:a,collapsed:n,setCollapsed:o,expandedWidth:u,setExpandedWidth:h}=ze(),{tenantId:f}=le(),j=Re(),b=V(),[x,y]=r.useState(!1),[v,C]=r.useState(null),[D,O]=r.useState(0),[N,E]=r.useState(0),w=r.useRef(!1),z=r.useRef(!1),[I,J]=r.useState(!1),me=r.useRef(null),W=r.useRef(null),T=r.useCallback(()=>{a||m("closed")},[a,m]),he=a?x&&v!==null?w.current?v{if(a)return x&&v!==null?v:n?_:u})(),F=r.useCallback(i=>{if(!x)return;const d=i.clientX-D;!z.current&&Math.abs(d)>=Le&&(z.current=!0);const c=Math.max(_,Math.min(H,N+d));C(c)},[x,D,N]),B=r.useCallback(()=>{if(!z.current){w.current?o(!1):o(!0),C(null),y(!1);return}const i=v??(n?_:u);w.current?i>=Y?(o(!1),h(Math.max(G,Math.min(H,i)))):o(!0):i<=Q?o(!0):(o(!1),h(Math.max(G,Math.min(H,i)))),C(null),y(!1)},[v,n,u,o,h]),pe=r.useCallback(i=>{if(!a)return;i.preventDefault(),w.current=n,z.current=!1,y(!0),O(i.clientX);const d=n?_:u;E(d),C(d)},[a,n,u]);r.useEffect(()=>{if(x)return document.addEventListener("mousemove",F),document.addEventListener("mouseup",B),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",B),document.body.style.cursor=""}},[x,F,B]);const P=r.useMemo(()=>f?{tenant:f}:void 0,[f]);r.useLayoutEffect(()=>{W.current&&(W.current.scrollTop=ee.current)},[]);const xe=r.useCallback(()=>{o(!n),C(null),y(!1)},[o,n]);return l==="closed"?null:e.jsxs("div",{ref:me,"data-cy":"v1-sidebar",className:g("absolute inset-x-0 top-0 bottom-0 z-[100] w-full overflow-hidden bg-slate-100 dark:bg-slate-900 md:relative md:inset-auto md:top-0 md:bottom-auto md:h-full md:bg-[unset] md:dark:bg-[unset]",!x&&"md:transition-[width] md:duration-200 md:ease-in-out",t),style:a?{width:fe,minWidth:x||n?_:G,maxWidth:H}:void 0,children:[e.jsx("div",{className:g("absolute right-0 top-0 bottom-0 z-20 hidden w-1 cursor-col-resize transition-colors hover:bg-blue-500/20 md:block",x&&"bg-blue-500/30"),"data-cy":"v1-sidebar-resize-handle",onMouseDown:pe,onMouseUp:i=>{i.stopPropagation(),B()},onMouseEnter:()=>J(!0),onMouseLeave:()=>J(!1),children:a&&I&&e.jsx(k,{variant:"ghost",size:"icon",hoverText:n?"Expand sidebar":"Collapse sidebar",hoverTextSide:"right","aria-label":n?"Expand sidebar":"Collapse sidebar",className:g("absolute right-0 top-1/2 z-30 hidden h-8 w-5 -translate-y-1/2 rounded-l-md border border-r-0 bg-secondary/90 text-secondary-foreground shadow-sm opacity-0 backdrop-blur transition-opacity md:flex","opacity-100",x&&"pointer-events-none opacity-0"),"data-cy":"v1-sidebar-resize-toggle",onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),xe()},children:n?e.jsx(ce,{className:"size-4"}):e.jsx(de,{className:"size-4"})})}),e.jsx("div",{className:"flex h-full flex-col overflow-hidden",children:he?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-cy":"v1-sidebar-scroll-collapsed",className:"min-h-0 flex-1 overflow-auto py-4 pl-2 overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"flex w-full flex-col items-center gap-y-2 px-2",children:s.map((i,d)=>e.jsxs(te.Fragment,{children:[d>0&&e.jsx("div",{className:"my-2 h-px w-8 bg-slate-200 dark:bg-slate-800"}),i.items.map(c=>{const M=c.params??P,R=c.displayAsActiveWhenThisRouteIsMatched??("to"in c?c.to:null),ge=c.activeFuzzy??!1,A=R?!!b({to:R,params:M,fuzzy:ge}):!1;return c.children&&c.children.length>0?e.jsxs(oe,{children:[e.jsx(Z,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",hoverText:c.name,hoverTextSide:"right","aria-label":c.name,className:g("w-10",A&&"bg-slate-200 dark:bg-slate-800"),children:c.icon({collapsed:!0,active:A})})}),e.jsx(ie,{side:"right",align:"start",className:"z-[100]",children:c.children.map(X=>e.jsx(L,{asChild:!0,className:"w-full cursor-pointer",children:e.jsx(q,{to:X.to,params:P,preload:!1,onClick:T,children:X.name})},X.key))})]},c.key):e.jsx(k,{variant:"ghost",size:"icon",hoverText:c.name,hoverTextSide:"right","aria-label":c.name,className:g("w-10",A&&"bg-slate-200 dark:bg-slate-800"),onClick:()=>{"onClick"in c?c.onClick():j({to:c.to,params:M}),T()},children:c.icon({collapsed:!0,active:A})},c.key)})]},i.key))})}),e.jsx("div",{className:"w-full shrink-0 py-2",children:e.jsx("div",{className:"flex w-full flex-col items-center gap-1",children:e.jsx($,{variant:"sidebar",triggerVariant:"icon",align:"start",side:"right",className:"w-10"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:W,"data-cy":"v1-sidebar-scroll",onScroll:()=>{var i;ee.current=((i=W.current)==null?void 0:i.scrollTop)??0},className:"min-h-0 flex-1 overflow-auto overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"px-4 py-4",children:s.map(i=>e.jsxs("div",{className:"py-2",children:[e.jsx("h2",{className:"mb-2 text-xs font-mono tracking-widest uppercase text-muted-foreground",children:i.title}),e.jsx("div",{className:i.itemsClassName,children:i.items.map(d=>{var M;const c=d.params??P;return"onClick"in d?e.jsx(S,{name:d.name,icon:d.icon({collapsed:!1}),onClick:d.onClick,muted:!0},d.key):e.jsx(as,{onNavLinkClick:T,to:d.to,params:c,prefix:d.prefix,name:d.name,icon:d.icon({collapsed:!1,active:!!b({to:d.to,params:c,fuzzy:d.activeFuzzy})}),collapsibleChildren:((M=d.children)==null?void 0:M.map(R=>e.jsx(ns,{onNavLinkClick:T,to:R.to,params:P,name:R.name},R.key)))??[]},d.key)})})]},i.key))})}),e.jsx("div",{"data-cy":"v1-sidebar-footer",className:"flex w-full shrink-0 flex-col gap-1 border-t border-slate-200 px-4 py-2 dark:border-slate-800",children:e.jsx($,{variant:"sidebar",triggerVariant:"split",align:"start",side:"top",className:"w-full"})})]})})]})}function ls(t){return[{key:"overview",title:"",itemsClassName:"flex flex-col gap-y-1",items:[{key:"overview",name:"Overview",to:p.tenantOverviewRoute.to,icon:({collapsed:s,active:l})=>e.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s?"size-5":"mr-2 size-4 shrink-0",children:[e.jsx("style",{children:` + @keyframes hatchet-fall { + 0% { + transform: translateX(12px) translateY(-10px) rotate(179deg) scale(0.2); + opacity: 0; + } + 50% { + opacity: 1; + transform: translateX(0) translateY(-1px) rotate(20deg) scale(1); + } + 55% { + transform: translateY(0) rotate(-12deg); + } + 60% { + transform: translateY(0) rotate(0deg); + opacity: 1; + } + } + @keyframes stump-gap-animation { + 0% { + fill-opacity: 0.64; + } + 70% { + fill-opacity: 0.64; + } + 100% { + fill-opacity: 0; + } + } + .hatchet-animated { + transform-origin: 8px 7px; + animation: hatchet-fall 1s cubic-bezier(0.8, 0.1, 0.8, 0.2) forwards; + } + .stump-gap-animated { + animation: stump-gap-animation 0.5s cubic-bezier(0.8, 0.1, 0.8, 0.2); + animation-fill-mode: both; + } + `}),e.jsx("path",{d:"M10.7088 5.33333L8.90785 9.33333L5.39489 5.79376C5.00305 5.39895 4.80713 5.20155 4.73366 4.97425C4.66902 4.77429 4.66902 4.55905 4.73366 4.35909C4.80713 4.13178 5.00305 3.93438 5.39489 3.53957L8.90785 7.38316e-07L11.6096 1.21071e-06L7.07243 4.88519C6.94095 5.02675 6.87522 5.09753 6.87203 5.15789C6.86927 5.2103 6.89135 5.26095 6.93164 5.29459C6.97803 5.33333 7.07463 5.33333 7.26782 5.33333L10.7088 5.33333Z",className:l?"hatchet-animated":"",fill:"currentColor"},l?"hatchet-active":"hatchet-inactive"),e.jsx("path",{d:"M11.9336 13.3389L5.93359 16.6729L5.28516 15.5068L11.2852 12.1738L11.9336 13.3389ZM12.9424 8C13.6788 8 14.2764 8.59761 14.2764 9.33398V12.5049C14.2765 12.8584 14.417 13.1983 14.667 13.4482L16.5518 15.334H13.1152L11.0166 16.5L10.6924 15.917L10.3691 15.334L12.4678 14.168C12.6657 14.058 12.8888 14.0001 13.1152 14H13.4023C13.1056 13.5618 12.9424 13.0417 12.9424 12.5049V9.33398H10.6846L11.2852 8H12.9424ZM6.86035 9.33398H3.60938V12.5049C3.60931 13.0252 3.4554 13.5294 3.17578 13.959L5.95215 12.418L6.27637 13L6.59961 13.583L3.75098 15.166C3.55304 15.2759 3.32991 15.3339 3.10352 15.334H0L1.1377 14.1953L1.88574 13.4482C2.1357 13.1983 2.27628 12.8584 2.27637 12.5049V9.33398C2.27637 8.59769 2.87311 8.00013 3.60938 8H5.53711L6.86035 9.33398Z",fill:"currentColor",fillOpacity:"0.64"}),e.jsx("path",{d:"M10.6846 9.33398L11.2852 8H5.53711L6.86035 9.33398H10.6846Z",fill:"currentColor",fillOpacity:"0",id:"stump-gap",className:l?"stump-gap-animated":""})]})}]},{key:"activity",title:"Activity",itemsClassName:"space-y-1",items:[{key:"runs",name:"Runs",to:p.tenantRunsRoute.to,icon:({collapsed:s})=>e.jsx(Ae,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"events",name:"Events",to:p.tenantEventsRoute.to,icon:({collapsed:s})=>e.jsx(He,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"logs",name:"Logs",to:p.tenantLogsRoute.to,icon:({collapsed:s})=>e.jsx(Oe,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"triggers",title:"Triggers",itemsClassName:"space-y-1",items:[{key:"scheduled",name:"Scheduled Runs",to:p.tenantScheduledRoute.to,icon:({collapsed:s})=>e.jsx(Fe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"crons",name:"Cron Jobs",to:p.tenantCronJobsRoute.to,icon:({collapsed:s})=>e.jsx(Xe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"webhooks",name:"Webhooks",to:p.tenantWebhooksRoute.to,icon:({collapsed:s})=>e.jsx(Ue,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"resources",title:"Resources",itemsClassName:"space-y-1",items:[{key:"workers",name:"Workers",to:p.tenantWorkersRoute.to,icon:({collapsed:s})=>e.jsx(Ge,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"workflows",name:"Workflows",to:p.tenantWorkflowsRoute.to,icon:({collapsed:s})=>e.jsx(Ze,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...t.managedWorkerEnabled?[{key:"managed-compute",name:"Managed Compute",to:p.tenantManagedWorkersRoute.to,icon:({collapsed:s})=>e.jsx(Ve,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]:[],{key:"rate-limits",name:"Rate Limits",to:p.tenantRateLimitsRoute.to,icon:({collapsed:s})=>e.jsx(K,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"filters",name:"Filters",to:p.tenantFiltersRoute.to,icon:({collapsed:s})=>e.jsx(qe,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"settings",title:"Settings",itemsClassName:"space-y-1",items:[{key:"settings-overview",name:"General",to:p.tenantSettingsOverviewRoute.to,icon:({collapsed:s})=>e.jsx(Je,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"organization",name:t.isCloudEnabled?"Organization":"Tenants",to:t.isCloudEnabled&&t.orgId?p.organizationsRoute.to:p.tenantsRoute.to,...t.isCloudEnabled&&t.orgId?{params:{organization:t.orgId}}:{params:{}},icon:({collapsed:s})=>e.jsx(Ye,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"settings-api-tokens",name:"API Tokens",to:p.tenantSettingsApiTokensRoute.to,icon:({collapsed:s})=>e.jsx(Qe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...t.canBill&&t.orgId?[{key:"settings-billing",name:"Billing & Usage",to:p.organizationBillingRoute.to,params:{organization:t.orgId},icon:({collapsed:s})=>e.jsx(Ke,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]:[{key:"settings-resource-limits",name:"Resource Limits",to:p.tenantSettingsResourceLimitsRoute.to,icon:({collapsed:s})=>e.jsx(K,{className:s?"size-5":"mr-2 size-4 shrink-0"})}],{key:"settings-integrations",name:"Integrations",to:p.tenantSettingsIntegrationsRoute.to,icon:({collapsed:s})=>e.jsx($e,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]}]}function cs({sidebar:t,children:s,sidePanel:l,className:m,mainClassName:a,mainContainerType:n="normal"}){return e.jsxs("div",{className:g("relative grid h-full w-full min-h-0 min-w-0 grid-rows-1 grid-cols-[0px_1fr_auto] overflow-hidden md:grid-cols-[auto_1fr_auto]",m),children:[e.jsx("div",{className:"col-start-1 row-start-1 min-h-0",children:t}),e.jsx("div",{className:g("col-start-2 row-start-1 min-h-0 min-w-0",a),style:n==="inline-size"?{containerType:"inline-size"}:void 0,children:s}),e.jsx("div",{className:"col-start-3 row-start-1 min-h-0",children:l})]})}const ds=650,se=350;function us(){const{content:t,isOpen:s,close:l,canGoBack:m,canGoForward:a,goBack:n,goForward:o}=Se(),[u,h]=Ee("sidePanelWidth",ds),[f,j]=r.useState(!1),[b,x]=r.useState(0),[y,v]=r.useState(0),C=r.useRef(null),D=s?u:0,O=r.useCallback(w=>{w.preventDefault(),j(!0),x(w.clientX),v(u)},[u]),N=r.useCallback(w=>{if(!f)return;const z=b-w.clientX,I=Math.max(se,y+z);I{j(!1)},[]);return r.useEffect(()=>{if(f)return document.addEventListener("mousemove",N),document.addEventListener("mouseup",E),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",E),document.body.style.cursor=""}},[f,N,E]),e.jsx("div",{ref:C,"data-cy":"side-panel",className:g("relative flex flex-shrink-0 flex-col overflow-hidden border-l border-border bg-background h-full",!f&&"transition-all duration-300 ease-in-out"),style:{width:D},children:t&&s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:g("absolute bottom-0 left-0 top-0 z-10 w-1 cursor-col-resize transition-colors hover:bg-blue-500/20",f&&"bg-blue-500/30"),onMouseDown:O}),e.jsxs("div",{className:"sticky top-0 z-20 flex w-full flex-row items-center justify-between bg-background px-4 pb-2 pt-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:n,disabled:!m,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(de,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Back"})]}),e.jsxs(k,{variant:"ghost",size:"sm",onClick:o,disabled:!a,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(ce,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Forward"})]})]}),e.jsx("div",{children:e.jsxs(k,{variant:"ghost",onClick:l,className:"flex-shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(Me,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})]}),e.jsx("div",{"data-cy":"side-panel-content",className:g("side-panel-content flex-1 overflow-hidden flex flex-col p-4",f&&"pointer-events-none"),children:t.component})]})})}function ms({children:t}){const s=_e(),{user:l,memberships:m}=s,{tenantId:a,isUserUniverseLoaded:n}=le(),{cloud:o,featureFlags:u,isCloudEnabled:h}=ne(a),f=(u==null?void 0:u["managed-worker"])==="true",{getOrganizationIdForTenant:j}=De(),b=Ie(),x=h&&a?j(a)??void 0:void 0;r.useEffect(()=>{a&&b.prefetchQuery(ae.workflows.list(a,{limit:200}))},[b,a]);const y=r.useMemo(()=>ls({canBill:o==null?void 0:o.canBill,managedWorkerEnabled:f,isCloudEnabled:h,orgId:x}),[o==null?void 0:o.canBill,f,h,x]),v=es({user:l,memberships:m}),C=n?t??e.jsx(Te,{context:v}):e.jsx(We,{className:"items-center justify-center"});return e.jsx(cs,{sidebar:e.jsx(is,{navItems:y}),sidePanel:e.jsx(us,{}),mainContainerType:"inline-size",children:e.jsx("div",{className:"shadow-[inset_1px_0_0_0_hsl(var(--border)/0.5),inset_0_1px_0_0_hsl(var(--border)/0.5)] md:rounded-tl-xl p-4 h-full dark:bg-[#050A23] bg-background overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:C})})}function bs(){return e.jsx(ms,{})}export{ms as MainShell,bs as default}; diff --git a/hatchetembed/dashboard/assets/index-DzA9wyrg.js b/hatchetembed/dashboard/assets/index-DzA9wyrg.js new file mode 100644 index 0000000000..fef144326e --- /dev/null +++ b/hatchetembed/dashboard/assets/index-DzA9wyrg.js @@ -0,0 +1 @@ +import{cF as L,eB as z,eC as D,eD as E,j as t,R as M,g as w,b as v,cN as d,aH as C,cV as R,a2 as V,e as O,ch as B,ci as F,k as f,cP as U,cR as W,aB as _,N as G,O as Y,F as $,cx as Q,cz as q,b6 as Z,b7 as J,o as X,cY as ee,bz as te}from"./index-wypz6hY5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="8019ea20-f4f5-4cc0-9acd-32c01294e58d",a._sentryDebugIdIdentifier="sentry-dbid-8019ea20-f4f5-4cc0-9acd-32c01294e58d")}catch{}})();function ae(a){return L({attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M9.456 27.25c6.215 0.848 12.319 1.682 18.544 2.532-2.121-3.531-4.187-6.972-6.27-10.441-4.081 2.63-8.124 5.235-12.273 7.909zM29.755 7.705c-0.548 0.823-1.097 1.645-1.644 2.468-1.879 2.827-3.758 5.654-5.635 8.482-0.105 0.158-0.24 0.283-0.093 0.525 1.814 2.995 3.613 5.999 5.417 9 0.285 0.474 0.572 0.946 0.941 1.401 0.364-7.284 0.729-14.568 1.094-21.852-0.027-0.008-0.054-0.016-0.080-0.023zM4.995 17.043c0.085 0.081 0.296 0.127 0.395 0.079 1.74-0.855 3.491-1.691 5.192-2.617 0.555-0.302 0.982-0.842 1.46-1.281 1.583-1.452 3.164-2.907 4.744-4.362 0.097-0.089 0.211-0.176 0.269-0.288 0.568-1.109 1.125-2.224 1.703-3.371-0.689-0.259-1.341-0.512-2.002-0.742-0.089-0.031-0.231 0.031-0.328 0.085-1.53 0.854-3.088 1.663-4.569 2.595-0.741 0.466-1.345 1.154-2.001 1.752-1.058 0.965-2.114 1.933-3.156 2.915-0.277 0.261-0.529 0.558-0.744 0.872-0.713 1.038-1.404 2.091-2.127 3.173 0.404 0.419 0.772 0.819 1.165 1.191zM11.353 15.625c-0.865 3.656-1.726 7.292-2.615 11.047 4.168-2.686 8.241-5.31 12.286-7.916-3.219-1.042-6.428-2.081-9.671-3.13zM28.692 7.74c-3.522 0.588-6.96 1.163-10.442 1.744 1.186 2.885 2.348 5.712 3.544 8.62 2.313-3.475 4.58-6.88 6.899-10.364zM11.498 14.877c3.172 1.030 6.28 2.039 9.479 3.077-1.188-2.894-2.335-5.687-3.506-8.538-1.995 1.824-3.959 3.62-5.973 5.461zM5.126 19.175c-1.125 2.689-2.211 5.286-3.317 7.93 2.126-0.063 4.187-0.124 6.318-0.187-1.001-2.582-1.982-5.114-3.001-7.744zM8.201 25.080c0.026-0.005 0.052-0.012 0.079-0.017 0.758-3.154 1.528-6.287 2.303-9.565-1.728 0.898-3.376 1.754-5.069 2.635 0.864 2.246 1.785 4.615 2.688 6.947zM27.417 7.229c-1.009-0.267-2.018-0.535-3.027-0.801-1.451-0.381-2.903-0.758-4.353-1.143-0.181-0.048-0.312-0.080-0.419 0.139-0.512 1.050-1.041 2.092-1.561 3.138-0.016 0.032-0.013 0.074-0.025 0.155 3.142-0.476 6.263-0.949 9.383-1.422 0.001-0.022 0.001-0.044 0.002-0.066zM21.564 4.841c2.709 0.75 5.419 1.499 8.223 2.275-0.472-1.344-0.909-2.59-1.359-3.872-2.303 0.511-4.577 1.015-6.852 1.519-0.004 0.026-0.008 0.051-0.012 0.077zM8.899 27.856c-1.019-0.117-2.064-0.009-3.097 0.008-0.849 0.015-1.697 0.047-2.545 0.073-0.088 0.003-0.175 0.020-0.262 0.114 7.015 0.649 14.030 1.297 21.044 1.946 0.005-0.031 0.009-0.063 0.014-0.094-2.249-0.307-4.497-0.614-6.746-0.921-2.802-0.383-5.599-0.803-8.408-1.127zM1.947 24.685c0.904-2.097 1.804-4.197 2.712-6.292 0.091-0.21 0.084-0.353-0.094-0.522-0.38-0.361-0.732-0.751-1.147-1.182-0.561 2.77-1.108 5.47-1.655 8.171 0.020 0.009 0.041 0.019 0.061 0.029 0.042-0.067 0.093-0.131 0.124-0.203zM19.763 4.287c1.524-0.393 3.071-0.701 4.608-1.044 0.099-0.022 0.197-0.055 0.295-0.083-0.005-0.025-0.010-0.050-0.015-0.075-2.165 0.291-4.331 0.583-6.606 0.889 0.62 0.271 1.098 0.473 1.718 0.314z"},child:[]}]})(a)}const se=({runtimeInfo:a,iconOnly:r=!1})=>{const o={GOLANG:E,PYTHON:D,TYPESCRIPT:z,RUBY:ae};if(!a)return null;const e=a.language?o[a.language]:void 0;return t.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e&&M.createElement(e),!r&&a.sdkVersion]})},i={status:"Status",name:"Name",type:"Type",startedAt:"Started at",slots:"Slots",lastHeartbeatAt:"Last seen",runtime:"SDK Version",labels:"Labels"},S="status",ne="name",re="startedAt",le="slots",oe="lastHeartbeatAt",ie="runtime",ce="labels",de={ACTIVE:{colors:"text-green-800 dark:text-green-300 bg-green-500/20 ring-green-500/30",primary:"text-green-500 bg-green-500",primaryOKLCH:"oklch(0.723 0.219 149.579)",label:"Active"},INACTIVE:{colors:"text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500",primary:"text-red-500 bg-red-500",primaryOKLCH:"oklch(0.637 0.237 25.331)",label:"Inactive"},PAUSED:{colors:"text-yellow-800 dark:text-yellow-300 bg-yellow-500/20 ring-yellow-500/30",primary:"text-yellow-500 bg-yellow-500",primaryOKLCH:"oklch(0.795 0.184 86.047)",label:"Paused"}};function ge({status:a,count:r,variant:o,animated:e,isLoading:c,className:l,...s}){const n=a?de[a]||{colors:"text-gray-800 dark:text-gray-300 bg-gray-500/20 ring-gray-500/30",label:a}:{colors:"text-gray-800 dark:text-gray-300 bg-gray-500/20 ring-gray-500/30",label:"Unknown"},g=r===0?{colors:"text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500"}:n,m=t.jsxs(t.Fragment,{children:[r!==void 0&&`${r} `,n.label]});return t.jsx(V,{className:O("px-3 py-1",g.colors,"rounded-md border-transparent text-xs font-medium",l),variant:o,...s,children:m})}const ue=(a,r,o)=>[{accessorKey:ne,header:({column:e})=>t.jsx(d,{column:e,title:i.name}),cell:({row:e})=>t.jsx(w,{to:v.tenantWorkerRoute.to,params:{tenant:a,worker:e.original.metadata.id},children:t.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:e.original.webhookUrl||e.original.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:S,header:({column:e})=>t.jsx(d,{column:e,title:i.status}),cell:({row:e})=>t.jsx(w,{to:v.tenantWorkerRoute.to,params:{tenant:a,worker:e.original.metadata.id},children:t.jsx(ge,{status:e.original.status})}),enableSorting:!1,enableHiding:!1},{accessorKey:re,header:({column:e})=>t.jsx(d,{column:e,title:i.startedAt,className:"whitespace-nowrap"}),cell:({row:e})=>t.jsx("div",{className:"whitespace-nowrap",children:t.jsx(C,{date:e.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:le,header:({column:e})=>t.jsx(d,{column:e,title:i.slots}),cell:({row:e})=>{const c=e.original.slotConfig||{},l=Object.entries(c).sort(([s],[n])=>s.localeCompare(n));return l.length===0?t.jsx("div",{className:"text-xs text-muted-foreground",children:"No slots"}):t.jsx("div",{className:"space-y-1",children:l.map(([s,n])=>{const u=n==null?void 0:n.available,g=n==null?void 0:n.limit,m=u!==void 0?`${u} / ${g}`:`${g}`;return t.jsxs("div",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"font-medium text-foreground",children:s}),":"," ",m]},s)})})},enableSorting:!1,enableHiding:!0},{accessorKey:oe,header:({column:e})=>t.jsx(d,{column:e,title:i.lastHeartbeatAt,className:"whitespace-nowrap"}),cell:({row:e})=>t.jsx("div",{className:"whitespace-nowrap",children:e.original.lastHeartbeatAt&&t.jsx(C,{date:e.original.lastHeartbeatAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:ie,header:({column:e})=>t.jsx(d,{column:e,title:i.runtime}),cell:({row:e})=>t.jsx(se,{runtimeInfo:e.original.runtimeInfo}),enableSorting:!1,enableHiding:!0},{accessorKey:ce,header:({column:e})=>t.jsx(d,{column:e,title:i.labels}),cell:({row:e})=>{var c;return t.jsx(R,{metadata:(((c=e.original)==null?void 0:c.labels)||[]).reduce((l,s)=>(s.key&&s.value&&(l[s.key]=s.value),l),{}),isOpen:r===e.original.metadata.id,onOpenChange:l=>{o(l?e.original.metadata.id:null)},title:"Labels",align:"end"})},enableSorting:!1,enableHiding:!0}],me=X({s:ee(te(["ACTIVE","INACTIVE","PAUSED"])).optional()}).default({}).transform(a=>({s:a.s??["ACTIVE","PAUSED"]}));function fe(){var p,k,j;const{tenantId:a}=B(),{refetchInterval:r}=F(),o="workers-table",[e,c]=f.useState(null),{state:{s:l},columnFilters:s,setColumnFilters:n,resetFilters:u}=U(me,o,{s:S}),{pagination:g,setPagination:m,limit:x,offset:A,setPageSize:I}=W({key:o,resetPageOnChange:[l]}),[N,T]=_("hatchet:columns:workers",{}),y=f.useCallback(H=>c(H),[]),K=f.useMemo(()=>ue(a,e,y),[a,e,y]),b=G({...Y.workers.list(a,{offset:A,limit:x,statuses:l}),refetchInterval:r}),h=((p=b.data)==null?void 0:p.rows)??[],P=((j=(k=b.data)==null?void 0:k.pagination)==null?void 0:j.num_pages)??Math.ceil(h.length/x);return b.isLoading?t.jsx($,{}):t.jsx(Q,{columns:K,data:h,filters:[{columnId:"status",title:"Status",type:q.Checkbox,options:[{value:"ACTIVE",label:"Active"},{value:"PAUSED",label:"Paused"},{value:"INACTIVE",label:"Inactive"}]}],emptyState:t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[t.jsx("p",{className:"text-lg font-semibold",children:"No workers found"}),t.jsx("div",{className:"w-fit",children:t.jsx(Z,{doc:J.v1.workers,label:"Learn about running workers"})})]}),columnFilters:s,setColumnFilters:n,columnVisibility:N,setColumnVisibility:T,showColumnToggle:!0,columnKeyToName:i,refetchProps:{isRefetching:b.isRefetching,onRefetch:b.refetch},onResetFilters:u,pagination:g,setPagination:m,onSetPageSize:I,pageCount:P})}export{fe as default}; diff --git a/hatchetembed/dashboard/assets/index-Fd0xVSp_.css b/hatchetembed/dashboard/assets/index-Fd0xVSp_.css new file mode 100644 index 0000000000..e003326a09 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Fd0xVSp_.css @@ -0,0 +1 @@ +.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%} diff --git a/hatchetembed/dashboard/assets/index-O5nwRdcL.js b/hatchetembed/dashboard/assets/index-O5nwRdcL.js new file mode 100644 index 0000000000..bf0f81a983 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-O5nwRdcL.js @@ -0,0 +1,57 @@ +import{k as s,eJ as We,eK as Le,j as e,eL as Ue,eM as A,eN as B,eO as Ke,eP as $,eQ as ce,eR as He,eS as de,eT as Qe,eU as Ve,e as me,eV as ze,ch as Ye,eW as g,p as $e,Q as Be,N as qe,O as Je,eX as ie,g as k,b as S,B as y,eY as Xe,aa as Ze,W as K,L as H,cG as Q,V as es,b8 as D,bs as ss,bt as ts,bu as V,bv as z,a as as}from"./index-wypz6hY5.js";import{M as rs}from"./managed-workers-gate-DSQbhr0o.js";import{S as ns,a as Y}from"./steps-2xcvKVXE.js";import{F as le}from"./ArrowPathIcon-7-QIcdZ1.js";import{F as os}from"./KeyIcon-DY8qn5rN.js";import"./accordion-CBy735bO.js";import"./index-zTXL414p.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="7b6f0309-8af1-493f-8528-cc430a630809",t._sentryDebugIdIdentifier="sentry-dbid-7b6f0309-8af1-493f-8528-cc430a630809")}catch{}})();function is({title:t,titleId:n,...a},d){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:d,"aria-labelledby":n},a),t?s.createElement("title",{id:n},t):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const ls=s.forwardRef(is);var q="Radio",[cs,ue]=de(q),[ds,ms]=cs(q),pe=s.forwardRef((t,n)=>{const{__scopeRadio:a,name:d,checked:l=!1,required:o,disabled:u,value:j="on",onCheck:p,form:v,...m}=t,[i,x]=s.useState(null),c=B(n,N=>x(N)),h=s.useRef(!1),w=i?v||!!i.closest("form"):!0;return e.jsxs(ds,{scope:a,checked:l,disabled:u,children:[e.jsx(A.button,{type:"button",role:"radio","aria-checked":l,"data-state":ge(l),"data-disabled":u?"":void 0,disabled:u,value:j,...m,ref:c,onClick:$(t.onClick,N=>{l||p==null||p(),w&&(h.current=N.isPropagationStopped(),h.current||N.stopPropagation())})}),w&&e.jsx(fe,{control:i,bubbles:!h.current,name:d,value:j,checked:l,required:o,disabled:u,form:v,style:{transform:"translateX(-100%)"}})]})});pe.displayName=q;var he="RadioIndicator",xe=s.forwardRef((t,n)=>{const{__scopeRadio:a,forceMount:d,...l}=t,o=ms(he,a);return e.jsx(He,{present:d||o.checked,children:e.jsx(A.span,{"data-state":ge(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:n})})});xe.displayName=he;var us="RadioBubbleInput",fe=s.forwardRef(({__scopeRadio:t,control:n,checked:a,bubbles:d=!0,...l},o)=>{const u=s.useRef(null),j=B(u,o),p=Qe(a),v=Ve(n);return s.useEffect(()=>{const m=u.current;if(!m)return;const i=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(i,"checked").set;if(p!==a&&c){const h=new Event("click",{bubbles:d});c.call(m,a),m.dispatchEvent(h)}},[p,a,d]),e.jsx(A.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...l,tabIndex:-1,ref:j,style:{...l.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fe.displayName=us;function ge(t){return t?"checked":"unchecked"}var ps=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G="RadioGroup",[hs]=de(G,[ce,ue]),je=ce(),ye=ue(),[xs,fs]=hs(G),ve=s.forwardRef((t,n)=>{const{__scopeRadioGroup:a,name:d,defaultValue:l,value:o,required:u=!1,disabled:j=!1,orientation:p,dir:v,loop:m=!0,onValueChange:i,...x}=t,c=je(a),h=We(v),[w,N]=Le({prop:o,defaultProp:l??null,onChange:i,caller:G});return e.jsx(xs,{scope:a,name:d,required:u,disabled:j,value:w,onValueChange:N,children:e.jsx(Ue,{asChild:!0,...c,orientation:p,dir:h,loop:m,children:e.jsx(A.div,{role:"radiogroup","aria-required":u,"aria-orientation":p,"data-disabled":j?"":void 0,dir:h,...x,ref:n})})})});ve.displayName=G;var Ne="RadioGroupItem",be=s.forwardRef((t,n)=>{const{__scopeRadioGroup:a,disabled:d,...l}=t,o=fs(Ne,a),u=o.disabled||d,j=je(a),p=ye(a),v=s.useRef(null),m=B(n,v),i=o.value===l.value,x=s.useRef(!1);return s.useEffect(()=>{const c=w=>{ps.includes(w.key)&&(x.current=!0)},h=()=>x.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",h)}},[]),e.jsx(Ke,{asChild:!0,...j,focusable:!u,active:i,children:e.jsx(pe,{disabled:u,required:o.required,checked:i,...p,...l,name:o.name,ref:m,onCheck:()=>o.onValueChange(l.value),onKeyDown:$(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:$(l.onFocus,()=>{var c;x.current&&((c=v.current)==null||c.click())})})})});be.displayName=Ne;var gs="RadioGroupIndicator",we=s.forwardRef((t,n)=>{const{__scopeRadioGroup:a,...d}=t,l=ye(a);return e.jsx(xe,{...l,...d,ref:n})});we.displayName=gs;var Te=ve,Re=be,js=we;const ke=s.forwardRef(({className:t,...n},a)=>e.jsx(Te,{className:me("grid gap-2",t),...n,ref:a}));ke.displayName=Te.displayName;const P=s.forwardRef(({className:t,...n},a)=>e.jsx(Re,{ref:a,className:me("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e.jsx(js,{className:"flex items-center justify-center",children:e.jsx(ze,{className:"h-3.5 w-3.5 fill-primary"})})}));P.displayName=Re.displayName;function ys(){const{tenantId:t}=Ye(),[n,a]=s.useState(!1),[d,l]=s.useState(!1),[o,u]=s.useState(null),[j,p]=s.useState(null),[v,m]=s.useState(""),[i]=s.useState(!1),[x,c]=s.useState(null),[,h]=s.useState(!1),[,w]=s.useState(!1),[N,J]=s.useState(0),[X,Z]=s.useState(!1),[Se,ee]=s.useState(!0),[Ce,Ie]=s.useState(!1),[Ee,C]=s.useState(!1),[O,M]=s.useState(!1),[b,_e]=s.useState(g.QUICKSTART_TYPESCRIPT),{mutate:De,isPending:se}=$e({mutationFn:r=>Be.managedWorkerTemplateCreate(t,{name:r}),onSuccess:r=>{var T;const f=(T=r.data.metadata)==null?void 0:T.id;f&&(u(f),i&&c(`sim-wf-${Math.random().toString(36).substring(2,7)}`))},onError:r=>{var f,T,R,_;console.error("Failed to create template:",r),p(((_=(R=(T=(f=r==null?void 0:r.response)==null?void 0:f.data)==null?void 0:T.errors)==null?void 0:R[0])==null?void 0:_.description)||"Failed to create template"),a(!1)}}),F=qe({...Je.cloud.listManagedWorkerEvents(o||""),enabled:!!o&&!i,refetchInterval:o&&!d&&!i?2e3:!1}),Pe=()=>{a(!0),p(null),m("Initializing deployment...");const r=`sim-${Math.random().toString(36).substring(2,9)}`;u(r),c(`sim-wf-${Math.random().toString(36).substring(2,7)}`),setTimeout(()=>{m("Creating worker resources..."),setTimeout(()=>{m("Building container image..."),setTimeout(()=>{m("Deploying managed worker..."),setTimeout(()=>{m("Deployment complete"),a(!1),l(!0),C(!1),M(!0)},2e3)},1500)},1500)},1e3)},te=s.useCallback(async()=>{if(x){if(h(!0),i){setTimeout(()=>{h(!1),w(!0),J(r=>r+1),N+1>=3&&Z(!0)},1e3);return}try{setTimeout(()=>{h(!1),w(!0),J(r=>r+1),N+1>=3&&Z(!0)},1e3)}catch(r){console.error("Failed to trigger run:",r),h(!1)}}},[x,i,N]);s.useEffect(()=>{O&&x&&!X&&(async()=>{for(let f=0;f<3;f++)f>0&&await new Promise(T=>setTimeout(T,1500)),await te()})()},[X,O,te,x]),s.useEffect(()=>{var r;if(o&&((r=F.data)!=null&&r.rows)&&!i){const f=F.data.rows;if(f.length>0){const R=[...f].sort((_,Fe)=>new Date(Fe.timeLastSeen).getTime()-new Date(_.timeLastSeen).getTime())[0];m(R.message),R.status===ie.SUCCEEDED?(a(!1),l(!0),C(!1),M(!0),x||c(`demo-wf-${Math.random().toString(36).substring(2,7)}`)):R.status===ie.FAILED&&(p(R.message),a(!1))}}},[o,F.data,i,x]);const Ae=async()=>{if(i){Pe();return}a(!0),p(null),m("Initializing deployment..."),De(b)},I=()=>{Ie(!0),ee(!1),C(!0)},E=r=>{_e(r)},[W,L]=s.useState(!1),[ae,re]=s.useState(null),[ne,Ge]=s.useState(!0),[Oe,Me]=s.useState("typescript"),oe=()=>{L(!0),i?setTimeout(()=>{const r="hx_sim_",f=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);re(`${r}${f}`),L(!1)},1500):as.apiTokenCreate(t,{name:"demo-template-token"}).then(r=>{r.data&&r.data.token?re(r.data.token):console.error("Failed to get token from response")}).catch(r=>{console.error("Failed to generate token:",r)}).finally(()=>{L(!1)})},U={typescript:`import HatchetClient from '@hatchet-dev/typescript-sdk'; + +async function main() { + const hatchet = HatchetClient.init(); + const result = await hatchet.run('first-workflow', {}); + console.log(result); +} + +if (require.main === module) { + main().catch(console.error).finally(() => process.exit(0)); +} +`,python:`from hatchet_sdk import Hatchet + +hatchet = Hatchet() +result = hatchet.run_workflow(name="first-workflow") +print(result) +`,go:`package main + +import ( + "fmt" + + v1_workflows "github.com/hatchet-dev/hatchet/examples/go/tasks" + v1 "github.com/hatchet-dev/hatchet/pkg/v1" + "github.com/hatchet-dev/hatchet/pkg/v1/workflow" + "github.com/joho/godotenv" +) + +func main() { + err := godotenv.Load() + if err != nil { + panic(err) + } + + hatchet, err := v1.NewHatchetClient() + + if err != nil { + panic(err) + } + + simple := v1.WorkflowFactory[any, any]( + workflow.CreateOpts[any]{ + Name: "first-workflow", + }, + &hatchet, + ) + + result, err := simple.Run(v1_workflows.SimpleInput{ + Message: "Hello, World!", + }) + + if err != nil { + panic(err) + } + + fmt.Println(result) +} +`};return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"mb-4 flex flex-row items-center",children:[e.jsx(k,{to:S.tenantManagedWorkersRoute.to,params:{tenant:t},className:"mr-4",children:e.jsx(y,{variant:"ghost",size:"icon",children:e.jsx(Xe,{className:"size-4"})})}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"Deploy Demo Template"})]}),e.jsx(Ze,{className:"my-4"}),e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsxs(ns,{className:"mt-6",children:[e.jsx(Y,{title:"Select your template language",open:Se,setOpen:ee,children:e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"mb-2 rounded-lg bg-muted/30 p-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"Demo Includes:"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Sample workflow with 3 steps"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"1 managed service (limited resources)"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Active for 1 hour"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"No payment method required"})]})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"mb-4 text-lg font-medium",children:"Choose your programming language:"}),e.jsxs(ke,{value:b,onValueChange:E,className:"flex flex-col space-y-3",children:[e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_TYPESCRIPT),children:e.jsxs(K,{className:`border-2 p-4 ${b===g.QUICKSTART_TYPESCRIPT?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_TYPESCRIPT,id:"typescript",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(H,{htmlFor:"typescript",className:"cursor-pointer text-lg font-medium",children:"TypeScript"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Modern JavaScript with type safety."})]})]}),b===g.QUICKSTART_TYPESCRIPT&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/typescript",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View TypeScript source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with TypeScript"})]})})]})}),e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_PYTHON),children:e.jsxs(K,{className:`border-2 p-4 ${b===g.QUICKSTART_PYTHON?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_PYTHON,id:"python",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(H,{htmlFor:"python",className:"cursor-pointer text-lg font-medium",children:"Python"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Simple, readable syntax for rapid development."})]})]}),b===g.QUICKSTART_PYTHON&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/python",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View Python source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with Python"})]})})]})}),e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_GO),children:e.jsxs(K,{className:`border-2 p-4 ${b===g.QUICKSTART_GO?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_GO,id:"go",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(H,{htmlFor:"go",className:"cursor-pointer text-lg font-medium",children:"Go"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Efficient, concurrent programming language."})]})]}),b===g.QUICKSTART_GO&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/go",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View Go source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with Go"})]})})]})})]})]}),e.jsx(y,{onClick:I,className:"mt-2 w-fit",children:"Continue"})]})}),e.jsx(Y,{title:"Deploy the demo template",open:Ee,setOpen:C,disabled:!Ce,children:e.jsx("div",{className:"grid gap-4",children:e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:e.jsx(ls,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"mb-2 text-xl font-medium",children:"Ready to Deploy"}),e.jsxs("p",{className:"mb-4 text-muted-foreground",children:["Click the button below to deploy your"," ",b.replace("QUICKSTART_","").toLowerCase()," ","demo template. This will create a managed service and workflow that you can use to explore the features."]}),e.jsxs("div",{className:"mb-6 rounded-lg bg-muted/30 p-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"What happens next:"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"A service will be provisioned with the necessary resources"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"A sample workflow will be created and registered"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"You'll be able to monitor the activity in your dashboard"})]})]})]}),n&&e.jsxs("div",{className:"mb-4 rounded-lg border bg-muted/20 p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(le,{className:"mr-2 size-4 animate-spin"}),e.jsx("h4",{className:"font-medium",children:"Deployment in progress..."})]}),e.jsxs("p",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[e.jsx("span",{children:v}),o&&e.jsx(k,{to:S.tenantManagedWorkerRoute.to,params:{tenant:t,managedWorker:o},target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-primary hover:underline",children:"View Logs"})]})]}),j&&e.jsxs("div",{className:"mb-4 rounded-lg border border-destructive bg-destructive/10 p-4",children:[e.jsx("h4",{className:"mb-1 font-medium text-destructive",children:"Deployment failed"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:j})]}),e.jsx("div",{className:"border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:n?"Deploying demo template...":i?"Ready to simulate deployment":"Ready to deploy"}),e.jsx(y,{onClick:Ae,disabled:n||!i&&se,className:"min-w-32",children:n||!i&&se?"Deploying...":i?"Simulate Deploy":"Deploy Demo"})]})})]})]})})})}),e.jsx(Y,{title:"Deployment successful",open:O,setOpen:M,disabled:!d,children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-4 text-center",children:[e.jsx("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-green-500/10",children:e.jsx(es,{className:"h-8 w-8 text-green-500"})}),e.jsx("h3",{className:"mb-2 text-xl font-medium",children:"Demo Template Deployed!"}),e.jsxs("p",{className:"mb-4 max-w-md text-muted-foreground",children:["Your"," ",b.replace("QUICKSTART_","").toLowerCase()," ","demo template has been successfully deployed. You can now explore the managed service features.",i&&e.jsx("span",{className:"mt-2 block font-medium text-amber-500",children:"Note: This was a simulated deployment. No actual resources were created."})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"mb-4 flex items-start",children:[e.jsx("div",{className:"mr-3 flex h-8 w-8 items-center justify-center rounded-full bg-primary/10",children:e.jsx(os,{className:"size-4 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"mb-1 font-medium",children:"Trigger a Remote Run Programmatically"}),e.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:"Run the following code locally to execute a task on the deployed service."}),ae?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-4 rounded bg-green-500/10 p-3 text-sm text-green-600",children:"API token successfully generated!"}),e.jsx("p",{className:"mb-2 text-sm text-muted-foreground",children:"This is the only time we will show you this auth token. Make sure to copy it now."}),e.jsx(D,{language:"plaintext",code:`export HATCHET_CLIENT_TOKEN="${ae}"`,copy:!0,className:"mb-3"}),e.jsxs("div",{className:"mb-4 flex space-x-2",children:[e.jsx(y,{type:"button",variant:"outline",size:"sm",onClick:()=>Ge(!ne),children:ne?"Hide Token":"Reveal Token"}),e.jsx(y,{variant:"outline",size:"sm",onClick:oe,disabled:W,children:"Generate New Token"})]})]}):e.jsx(y,{onClick:oe,disabled:W,fullWidth:!0,children:W?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"mr-2 size-4 animate-spin"}),"Generating Token..."]}):"Generate API Token"}),e.jsxs("div",{className:"mt-2 border-t pt-4",children:[e.jsx("h5",{className:"mb-2 font-medium",children:"Example Code"}),e.jsxs(ss,{value:Oe,onValueChange:Me,className:"w-full",children:[e.jsxs(ts,{className:"mb-2",children:[e.jsx(V,{value:"typescript",children:"TypeScript"}),e.jsx(V,{value:"python",children:"Python"}),e.jsx(V,{value:"go",children:"Go"})]}),e.jsx(z,{value:"typescript",className:"mt-0",children:e.jsx(D,{code:U.typescript,language:"typescript",copy:!0})}),e.jsx(z,{value:"python",className:"mt-0",children:e.jsx(D,{code:U.python,language:"python",copy:!0})}),e.jsx(z,{value:"go",className:"mt-0",children:e.jsx(D,{code:U.go,language:"go",copy:!0})})]})]})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:[e.jsx("h4",{className:"mb-3 font-medium",children:"What's next?"}),e.jsxs("ul",{className:"mb-4 space-y-3",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"View your deployed service to see logs and metrics"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Three demo task runs have been triggered for you"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Use the API to trigger additional task runs"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Monitor task runs in the dashboard"})]})]}),o&&e.jsx(k,{to:S.tenantManagedWorkerRoute.to,params:{tenant:t,managedWorker:o},children:e.jsx(y,{variant:"default",fullWidth:!0,children:"View Your Service"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(k,{to:S.tenantRunsRoute.to,params:{tenant:t},children:e.jsx(y,{variant:"outline",fullWidth:!0,children:"View Runs"})}),e.jsx(k,{to:S.tenantWorkflowsRoute.to,params:{tenant:t},children:e.jsx(y,{variant:"outline",fullWidth:!0,children:"View RegisteredTasks"})})]})]})]})})]})})]})})}function Ss(){return e.jsx(rs,{children:e.jsx(ys,{})})}export{Ss as default}; diff --git a/hatchetembed/dashboard/assets/index-Szwct97L.js b/hatchetembed/dashboard/assets/index-Szwct97L.js new file mode 100644 index 0000000000..18e23b067e --- /dev/null +++ b/hatchetembed/dashboard/assets/index-Szwct97L.js @@ -0,0 +1 @@ +import{j as e,h as w,ar as y,ch as h,k as u,l as j,p as k,b as I,Q as R,aa as E,c as N}from"./index-wypz6hY5.js";import{B as v}from"./billing-required-TKoe60qy.js";import{M as C}from"./managed-workers-gate-DSQbhr0o.js";import{C as W}from"./create-worker-form-CwO9Ppzx.js";import{m as D,R as L}from"./managed-compute-cM-46wXY.js";import{F as M}from"./ServerStackIcon-nXfmiORr.js";import"./accordion-CBy735bO.js";import"./index-zTXL414p.js";import"./steps-2xcvKVXE.js";import"./PlusIcon-Cn-pCVk3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="92e5ad97-22bc-4dc9-bf01-1d30faab6681",t._sentryDebugIdIdentifier="sentry-dbid-92e5ad97-22bc-4dc9-bf01-1d30faab6681")}catch{}})();function S(){const t=w(),{tenant:n,billing:r,can:f,organizationId:o}=y(),{tenantId:s}=h(),[i,d]=u.useState(!1),[m,p]=u.useState({}),{handleApiError:l}=j({setFieldErrors:p}),[,g]=f(D.create()),x=g===L.BILLING_REQUIRED,b=async()=>{try{if(i||(d(!0),r==null||r.setPollBilling(!0),!o))return;const a=await N.billingPortalLinkGet(o);window.open(a.data.url,"_blank")}catch(a){l(a)}finally{d(!1)}},c=k({mutationKey:["managed-worker:create",s],mutationFn:async a=>(await R.managedWorkerCreate(s,a)).data,onSuccess:a=>{t({to:I.tenantManagedWorkerRoute.to,params:{tenant:s,managedWorker:a.metadata.id}})},onError:l});return x?e.jsx(v,{tenant:n,billing:r,manageClicked:b,portalLoading:i}):e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex flex-row items-center justify-between",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsx(M,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"New Service"})]})}),e.jsx(E,{className:"my-4"}),e.jsx(W,{onSubmit:c.mutate,isLoading:c.isPending,fieldErrors:m})]})})}function U(){return e.jsx(C,{children:e.jsx(S,{})})}export{U as default}; diff --git a/hatchetembed/dashboard/assets/index-dwVl8GdI.css b/hatchetembed/dashboard/assets/index-dwVl8GdI.css new file mode 100644 index 0000000000..97fc94354c --- /dev/null +++ b/hatchetembed/dashboard/assets/index-dwVl8GdI.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--brand: 212 100% 60%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--success: 193 100% 27%;--danger: 287 69% 57%;--chart-1: 221.2 83.2% 53.3%;--chart-2: 212 95% 68%;--chart-3: 216 92% 60%;--chart-4: 210 98% 78%;--chart-5: 212 97% 87%;--terminal-bg: #f8fafc;--terminal-fg: #1e293b;--terminal-red: #dc2626;--terminal-green: #16a34a;--terminal-yellow: #ca8a04;--terminal-blue: #2563eb;--terminal-magenta: #c026d3;--terminal-cyan: #0891b2}.dark{--background: 226 82% 6%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 221.2 83.2% 53.3%;--chart-2: 212 95% 68%;--chart-3: 216 92% 60%;--chart-4: 210 98% 78%;--chart-5: 212 97% 87%;--terminal-bg: #1e293b;--terminal-fg: #e2e8f0;--terminal-red: #f87171;--terminal-green: #4ade80;--terminal-yellow: #facc15;--terminal-blue: #60a5fa;--terminal-magenta: #e879f9;--terminal-cyan: #22d3ee}*{border-color:hsl(var(--border))}*{border-color:hsl(var(--border));outline-color:hsl(var(--ring) / .5)}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media(min-width:1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\[1px\]{top:1px;right:1px;bottom:1px;left:1px}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.inset-y-\[3px\]{top:3px;bottom:3px}.inset-y-\[6px\]{top:6px;bottom:6px}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.bottom-1\/2{bottom:50%}.bottom-2{bottom:.5rem}.bottom-\[10px\]{bottom:10px}.bottom-\[1px\]{bottom:1px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-\[10px\]{top:10px}.top-\[50\%\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[200\]{z-index:200}.z-\[2\]{z-index:2}.z-\[300\]{z-index:300}.z-\[3\]{z-index:3}.z-\[4\]{z-index:4}.z-\[5\]{z-index:5}.z-\[7\]{z-index:7}.z-\[8\]{z-index:8}.col-span-full{grid-column:1 / -1}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.row-start-1{grid-row-start:1}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-\[1px\]{margin-top:1px;margin-bottom:1px}.-mb-\[50cqh\]{margin-bottom:-50cqh}.-ml-1{margin-left:-.25rem}.-ml-3{margin-left:-.75rem}.-ml-\[50cqw\]{margin-left:-50cqw}.-mr-1{margin-right:-.25rem}.-mr-\[50cqw\]{margin-right:-50cqw}.-mt-48{margin-top:-12rem}.-mt-\[50cqh\]{margin-top:-50cqh}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-\[-41px\]{margin-left:-41px}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[3px\]{margin-top:3px}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-1\.5{width:.375rem;height:.375rem}.size-2{width:.5rem;height:.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[100\%\]{height:100%}.h-\[100cqh\]{height:100cqh}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[30px\]{height:30px}.h-\[33px\]{height:33px}.h-\[400px\]{height:400px}.h-\[43px\]{height:43px}.h-\[6px\]{height:6px}.h-\[90px\]{height:90px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-56{max-height:14rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[100cqh\]{max-height:100cqh}.max-h-\[25rem\]{max-height:25rem}.max-h-\[300px\]{max-height:300px}.max-h-\[32rem\]{max-height:32rem}.max-h-\[400px\]{max-height:400px}.max-h-\[40rem\]{max-height:40rem}.max-h-\[420px\]{max-height:420px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90\%\]{max-height:90%}.max-h-\[90dvh\]{max-height:90dvh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-24{min-height:6rem}.min-h-9{min-height:2.25rem}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[25rem\]{min-height:25rem}.min-h-\[500px\]{min-height:500px}.min-h-\[80px\]{min-height:80px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[100\%\]{width:100%}.w-\[100cqw\]{width:100cqw}.w-\[100px\]{width:100px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[180px\]{width:180px}.w-\[18px\]{width:18px}.w-\[1px\]{width:1px}.w-\[20px\]{width:20px}.w-\[220px\]{width:220px}.w-\[287px\]{width:287px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[33px\]{width:33px}.w-\[40vw\]{width:40vw}.w-\[48px\]{width:48px}.w-\[6px\]{width:6px}.w-\[70px\]{width:70px}.w-\[calc\(100\%-3px\)\]{width:calc(100% - 3px)}.w-\[min\(18rem\,100vw\)\]{width:min(18rem,100vw)}.w-\[min\(820px\,calc\(100vw-16px\)\)\]{width:min(820px,calc(100vw - 16px))}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-1{min-width:.25rem}.min-w-32{min-width:8rem}.min-w-40{min-width:10rem}.min-w-\[320px\]{min-width:320px}.min-w-\[4ch\]{min-width:4ch}.min-w-\[500px\]{min-width:500px}.min-w-\[600px\]{min-width:600px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.\!max-w-\[80vw\]{max-width:80vw!important}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-96{max-width:24rem}.max-w-\[100cqw\]{max-width:100cqw}.max-w-\[160px\]{max-width:160px}.max-w-\[176px\]{max-width:176px}.max-w-\[280px\]{max-width:280px}.max-w-\[700px\]{max-width:700px}.max-w-\[80\%\]{max-width:80%}.max-w-\[800px\]{max-width:800px}.max-w-\[90\%\]{max-width:90%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[9rem\]{max-width:9rem}.max-w-\[calc\(100\%-1rem\)\]{max-width:calc(100% - 1rem)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-\[min\(24rem\,calc\(100vw-2rem\)\)\]{max-width:min(24rem,calc(100vw - 2rem))}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-prose{max-width:65ch}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[2px\]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-150{--tw-scale-x: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes flip{to{transform:rotate(360deg)}}.animate-flip{animation:flip 6s infinite steps(2,end)}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[0px_1fr_auto\]{grid-template-columns:0px 1fr auto}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,1\.6fr\)_120px_140px_140px\]{grid-template-columns:minmax(0,1.6fr) 120px 140px 140px}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.grid-rows-\[64px_minmax\(0\,1fr\)\]{grid-template-rows:64px minmax(0,1fr)}.grid-rows-\[64px_minmax\(0\,1fr\)_auto\]{grid-template-rows:64px minmax(0,1fr) auto}.grid-rows-\[auto_64px_minmax\(0\,1fr\)\]{grid-template-rows:auto 64px minmax(0,1fr)}.grid-rows-\[auto_64px_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto 64px minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-8{row-gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.justify-self-start{justify-self:start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1\.5px\]{border-width:1.5px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[--color-border\]{border-color:var(--color-border)}.border-background{border-color:hsl(var(--background))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/20{border-color:hsl(var(--border) / .2)}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground{border-color:hsl(var(--foreground))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/50{border-color:#22c55e80}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/20{border-color:hsl(var(--muted-foreground) / .2)}.border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-orange-400\/60{border-color:#fb923c99}.border-primary{border-color:hsl(var(--primary))}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-b-transparent{border-bottom-color:transparent}.border-t-muted-foreground\/70{border-top-color:hsl(var(--muted-foreground) / .7)}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#ffffff\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-background\/70{background-color:hsl(var(--background) / .7)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/30{background-color:#3b82f64d}.bg-border{background-color:hsl(var(--border))}.bg-border\/40{background-color:hsl(var(--border) / .4)}.bg-border\/50{background-color:hsl(var(--border) / .5)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/5{background-color:hsl(var(--destructive) / .05)}.bg-emerald-300{--tw-bg-opacity: 1;background-color:rgb(110 231 183 / var(--tw-bg-opacity, 1))}.bg-foreground\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\/70{background-color:hsl(var(--foreground) / .7)}.bg-foreground\/90{background-color:hsl(var(--foreground) / .9)}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/10{background-color:#6b72801a}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-600\/40{background-color:#4b556366}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/20{background-color:#6366f133}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/70{background-color:hsl(var(--muted) / .7)}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/20{background-color:#f9731633}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-purple-500{--tw-bg-opacity: 1;background-color:hsl(252 82% 49% / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-50\/50{background-color:#fef2f280}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/90{background-color:hsl(var(--secondary) / .9)}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/20{background-color:#64748b33}.bg-transparent{background-color:transparent}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-50\/60{--tw-gradient-from: rgb(255 247 237 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 247 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-75\%{--tw-gradient-from-position: 75%}.to-background{--tw-gradient-to: hsl(var(--background)) var(--tw-gradient-to-position)}.to-background\/0{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.stroke-border{stroke:hsl(var(--border))}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-0{padding-right:0}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-2\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[-0\.02em\]{letter-spacing:-.02em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#000000\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\[\#050c1c\]{--tw-text-opacity: 1;color:rgb(5 12 28 / var(--tw-text-opacity, 1))}.text-\[rgb\(0\,26\,56\)\]{--tw-text-opacity: 1;color:rgb(0 26 56 / var(--tw-text-opacity, 1))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-background{color:hsl(var(--background))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-brand{color:hsl(var(--brand))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/60{color:hsl(var(--primary) / .6)}.text-primary\/70{color:hsl(var(--primary) / .7)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.caret-transparent{caret-color:transparent}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-\[0\.01\]{opacity:.01}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[inset_0px_7px_10px_0px_rgba\(0\,0\,0\,0\.01\)\,inset_0px_1px_3px_0px_rgba\(0\,0\,0\,0\.01\)\]{--tw-shadow: inset 0px 7px 10px 0px rgba(0,0,0,.01),inset 0px 1px 3px 0px rgba(0,0,0,.01);--tw-shadow-colored: inset 0px 7px 10px 0px var(--tw-shadow-color), inset 0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[inset_1px_0_0_0_hsl\(var\(--border\)\/0\.5\)\,inset_0_1px_0_0_hsl\(var\(--border\)\/0\.5\)\]{--tw-shadow: inset 1px 0 0 0 hsl(var(--border)/.5),inset 0 1px 0 0 hsl(var(--border)/.5);--tw-shadow-colored: inset 1px 0 0 0 var(--tw-shadow-color), inset 0 1px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-800\/30{--tw-shadow-color: rgb(30 41 59 / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-border\/50{--tw-ring-color: hsl(var(--border) / .5)}.ring-emerald-500\/30{--tw-ring-color: rgb(16 185 129 / .3)}.ring-foreground\/20{--tw-ring-color: hsl(var(--foreground) / .2)}.ring-gray-500\/30{--tw-ring-color: rgb(107 114 128 / .3)}.ring-green-500\/30{--tw-ring-color: rgb(34 197 94 / .3)}.ring-indigo-500\/30{--tw-ring-color: rgb(99 102 241 / .3)}.ring-orange-500\/30{--tw-ring-color: rgb(249 115 22 / .3)}.ring-primary{--tw-ring-color: hsl(var(--primary))}.ring-red-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.ring-red-500\/30{--tw-ring-color: rgb(239 68 68 / .3)}.ring-slate-500\/30{--tw-ring-color: rgb(100 116 139 / .3)}.ring-yellow-500\/30{--tw-ring-color: rgb(234 179 8 / .3)}.ring-offset-1{--tw-ring-offset-width: 1px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[transform\,opacity\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-none{transition-property:none}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.\[--c\:\#fff7_25\%\,\#0000_0\]{--c: #fff7 25%,#0000 0}.\[--color1\:color-mix\(in_srgb\,_hsl\(287_69\%_57\%\)_calc\(100\%_\*_1\)\,_transparent\)\]{--color1: color-mix(in srgb, hsl(287 69% 57%) 100% , transparent)}.\[--color2\:color-mix\(in_srgb\,_hsl\(212_100\%_60\%\)_calc\(100\%_\*_\.56\)\,_transparent\)\]{--color2: color-mix(in srgb, hsl(212 100% 60%) calc(100% * .56), transparent)}.\[--direction\:bottom\]{--direction: bottom}.\[--g\:2px\]{--g: 2px}.\[--gridSize\:24px\]{--gridSize: 24px}.\[--n\:6\]{--n: 6}.\[--scale\:5\]{--scale: 5}.\[--t\:1px\]{--t: 1px}.\[-webkit-overflow-scrolling\:touch\]{-webkit-overflow-scrolling:touch}.\[background-color\:\#b8d9ff14\]{background-color:#b8d9ff14}.\[counter-reset\:step\]{counter-reset:step}.\[height\:clamp\(50rlh\,30vh\,50rlh\)\]{height:clamp(50rlh,30vh,50rlh)}.\[mask-composite\:intersect\,add\,add\,subtract\]{-webkit-mask-composite:source-in,source-over,source-over,source-out,xor;mask-composite:intersect,add,add,subtract}.\[mask-image\:linear-gradient\(to_var\(--direction\)\,transparent_50\%\,white_100\%\)\,var\(--noise-url\)\,conic-gradient\(at_var\(--g\)_var\(--t\)\,var\(--c\)\)\,conic-gradient\(from_180deg_at_var\(--t\)_var\(--g\)\,var\(--c\)\)\]{-webkit-mask-image:linear-gradient(to var(--direction),transparent 50%,white 100%),var(--noise-url),conic-gradient(at var(--g) var(--t),var(--c)),conic-gradient(from 180deg at var(--t) var(--g),var(--c));mask-image:linear-gradient(to var(--direction),transparent 50%,white 100%),var(--noise-url),conic-gradient(at var(--g) var(--t),var(--c)),conic-gradient(from 180deg at var(--t) var(--g),var(--c))}.\[mask-position\:0_0\,0\%_0\%\,calc\(\(var\(--gridSize\)_\/_var\(--n\)_-_var\(--g\)_\+_var\(--t\)\)_\/_2\)_0\,round\(up\,100\%\,calc\(var\(--g\)\*2\)\)_calc\(\(var\(--gridSize\)_\/_var\(--n\)_-_var\(--g\)_\+_var\(--t\)\)_\/_2\)\]{-webkit-mask-position:0 0,0% 0%,calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2) 0,round(up,100%,calc(var(--g) * 2)) calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2);mask-position:0 0,0% 0%,calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2) 0,round(up,100%,calc(var(--g) * 2)) calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2)}.\[mask-size\:100\%\,calc\(300\%\*var\(--scale\)\)_calc\(300\%\*var\(--scale\)\)\,calc\(var\(--gridSize\)_\/_var\(--n\)\)_var\(--gridSize\)\,var\(--gridSize\)_calc\(var\(--gridSize\)_\/_var\(--n\)\)\]{-webkit-mask-size:100%,calc(300% * var(--scale)) calc(300% * var(--scale)),calc(var(--gridSize) / var(--n)) var(--gridSize),var(--gridSize) calc(var(--gridSize) / var(--n));mask-size:100%,calc(300% * var(--scale)) calc(300% * var(--scale)),calc(var(--gridSize) / var(--n)) var(--gridSize),var(--gridSize) calc(var(--gridSize) / var(--n))}.\[mask\:linear-gradient\(\#ccc\,_transparent_50\%\)\]{-webkit-mask:linear-gradient(#ccc,transparent 50%);mask:linear-gradient(#ccc,transparent 50%)}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.\[text-wrap\:balance\]{text-wrap:balance}body{min-height:100dvh}html,body,#root{height:100%}.step-run-card{--transition: .25s;--spark: 3s;position:relative;overflow:hidden}.step-run-card.active .step-run-backdrop{background:222.2 84% 4.9%}.step-run-card.active{transform:scale(1.05)}.spark{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:2px;rotate:0deg;overflow:hidden;-webkit-mask:linear-gradient(white,transparent 50%);mask:linear-gradient(white,transparent 50%);animation:flip calc(var(--spark) * 2) infinite steps(2,end)}@keyframes flip{to{rotate:360deg}}.spark:before{content:"";position:absolute;width:200%;aspect-ratio:1;inset:0 auto auto 50%;z-index:-1;translate:-50% -15%;rotate:0;transform:rotate(-90deg);opacity:1;background:conic-gradient(from 0deg,transparent 0 340deg,white 360deg);transition:opacity var(--transition);animation:rotate var(--spark) linear infinite both}.step-run-backdrop{position:absolute;top:1px;right:1px;bottom:1px;left:1px;background:222.2 84% 4.9%;border-radius:2px;transition:background var(--transition) opacity var(--transition)}@keyframes rotate{to{transform:rotate(90deg)}}@property --sNav{syntax: ""; inherits: false; initial-value: 1;}@keyframes heroPulse{80%{opacity:1}to{transform:scale(calc(var(--sNav) * 2));opacity:0}}.text{z-index:1;color:#cbd5e1}.rjsf{margin-right:.5rem}.rjsf fieldset>legend{margin-bottom:.75rem;width:100%;border-bottom-width:1px;padding-bottom:.25rem;padding-top:1rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.rjsf fieldset>div{margin-left:.75rem}.rjsf .form-group{margin-bottom:.5rem}.rjsf label.control-label{margin-bottom:.25rem;display:block;font-weight:700}.rjsf p.field-description{margin-bottom:.25rem}.rjsf .form-control{display:block;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));padding:.5rem}.rjsf input{display:flex;height:2.5rem;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));background-color:transparent;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-ring-offset-color: hsl(var(--background))}.rjsf input::file-selector-button{border-width:0px;background-color:transparent;font-size:.875rem;line-height:1.25rem;font-weight:500}.rjsf input::-moz-placeholder{color:hsl(var(--muted-foreground))}.rjsf input::placeholder{color:hsl(var(--muted-foreground))}.rjsf input:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--ring));--tw-ring-offset-width: 2px}.rjsf input:disabled{cursor:not-allowed;opacity:.5}.rjsf .array-item{display:flex;flex-direction:row;align-items:flex-end;gap:1rem}.rjsf .array-item .col-xs-9{flex-grow:1}.rjsf .array-item .col-xs-3{flex-shrink:0}.rjsf .array-item .array-item-toolbox{margin-bottom:1rem;display:flex;align-items:center;justify-content:flex-end}.rjsf .glyphicon{font-weight:400;font-style:normal}.rjsf .glyphicon-remove:before{content:"Remove"}.rjsf .glyphicon-arrow-up:before{content:"Up"}.rjsf .glyphicon-arrow-down:before{content:"Down"}.rjsf .glyphicon-plus:before{content:"Add"}.rjsf .btn{margin-left:.25rem;margin-right:.25rem;border-radius:calc(var(--radius) - 2px);border-width:1px;padding:.5rem}.rjsf .btn-danger{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.rjsf .btn-add{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.rjsf button[type=submit]{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.rjsf button[type=submit]:hover{background-color:hsl(var(--primary) / .9)}.rjsf textarea{display:flex;height:5rem;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));background-color:transparent;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-ring-offset-color: hsl(var(--background))}.rjsf textarea::file-selector-button{border-width:0px;background-color:transparent;font-size:.875rem;line-height:1.25rem;font-weight:500}.rjsf textarea::-moz-placeholder{color:hsl(var(--muted-foreground))}.rjsf textarea::placeholder{color:hsl(var(--muted-foreground))}.rjsf textarea:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--ring));--tw-ring-offset-width: 2px}.rjsf textarea:disabled{cursor:not-allowed;opacity:.5}.shiki{padding:15px!important;border-radius:10px!important;background-color:#ccc;font-size:.8rem}html.dark .nextra-code-block pre,.dark .shiki{background-color:transparent!important}pre.shiki{margin:0;counter-reset:line}pre.shiki>code{display:block}pre.shiki>code>span{counter-increment:line;padding-left:1rem;position:relative;min-height:1.25em;line-height:1.25}pre.shiki>code>span:before{content:counter(line);position:absolute;left:-2rem;width:2rem;text-align:right;color:var(--muted-foreground);opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-line-numbers pre.shiki>code>span:before{display:none}.hide-line-numbers pre.shiki>code>span{padding-left:0!important}.contrast-more .shiki{filter:contrast(1.5)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:4px}.dark ::-webkit-scrollbar-thumb{background:hsl(var(--muted))}::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted))}.dark ::-webkit-scrollbar-thumb:hover{background:hsl(var(--border))}.counter-reset-line{counter-reset:line}.counter-reset-line code{display:block}.counter-reset-line code span{display:block;position:relative;padding-left:2.5rem}.counter-reset-line code span:before{counter-increment:line;content:counter(line);position:absolute;left:0;width:2rem;text-align:right;color:var(--muted-foreground);-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-right:.5rem}.highlighted-line{background-color:#ffff001a;display:block;margin:0 -1rem;padding:0 1rem;border-left:3px solid #fbbf24}.dark .highlighted-line{background-color:#ffff000d;border-left-color:#fbbf24}.highlighted-string{background-color:#fbbf24;color:#000;padding:.1em .2em;border-radius:.2em;font-weight:700}.dark .highlighted-string{background-color:#fbbf24;color:#000}@container (min-width: 768px){.cq-lg\:block{display:block}.cq-lg\:flex{display:flex}.cq-lg\:inline{display:inline}.cq-lg\:hidden{display:none}}@container (min-width: 1024px){.cq-lg\:block{display:block}.cq-lg\:flex{display:flex}.cq-lg\:inline{display:inline}.cq-lg\:hidden{display:none}.cq-xl\:block{display:block}.cq-xl\:inline{display:inline}.cq-xl\:hidden{display:none}}.side-panel-content{container-type:inline-size}@container (min-width: 600px){.side-responsive-layout{flex-direction:row;align-items:center}.side-responsive-inner{flex-direction:row;align-items:center;width:auto}.side-sm\:hidden{display:none}.side-sm\:block{display:block}}@keyframes pulse-border{0%,to{border-color:#ef444480}50%{border-color:#ef4444b3}}.animate-pulse-border{animation:pulse-border 2s cubic-bezier(.4,0,.6,1) infinite}.terminal-root,.terminal-root .react-lazylog{background-color:var(--terminal-bg)!important;color:var(--terminal-fg)!important}.terminal-root .log-line{background-color:var(--terminal-bg)!important;color:var(--terminal-fg)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:background-color .15s ease}.terminal-root .log-line:hover{background-color:hsl(var(--muted) / .3)!important}.terminal-root .log-line.expanded{white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;overflow:visible;text-overflow:unset;background-color:hsl(var(--muted) / .4)!important;padding:8px 12px;border-radius:4px;margin:4px 0;display:block;line-height:1.6}.terminal-root div[style*="position: absolute"]{background-color:var(--terminal-bg)!important}.terminal-root ::-webkit-scrollbar-track{background-color:var(--terminal-bg)}.terminal-root ::-webkit-scrollbar-thumb{background-color:hsl(var(--muted));border-radius:4px}.terminal-root ::-webkit-scrollbar-corner{background-color:var(--terminal-bg)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/50::-moz-placeholder{color:hsl(var(--muted-foreground) / .5)}.placeholder\:text-muted-foreground\/50::placeholder{color:hsl(var(--muted-foreground) / .5)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-0:before{content:var(--tw-content);left:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:aspect-square:before{content:var(--tw-content);aspect-ratio:1 / 1}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-\[200\%\]:before{content:var(--tw-content);width:200%}.before\:w-full:before{content:var(--tw-content);width:100%}.before\:rotate-\[-90deg\]:before{content:var(--tw-content);--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:animate-\[heroPulse_7s_linear_infinite\]:before{content:var(--tw-content);animation:heroPulse 7s linear infinite}@keyframes rotate{to{content:var(--tw-content);transform:rotate(90deg)}}.before\:animate-rotate:before{content:var(--tw-content);animation:rotate 3s linear infinite both}.before\:bg-\[conic-gradient\(from_0deg\,transparent_0_340deg\,\#ccc_360deg\)\]:before{content:var(--tw-content);background-image:conic-gradient(from 0deg,transparent 0 340deg,#ccc 360deg)}.before\:bg-\[repeating-radial-gradient\(circle_at_50\%_50\%\,transparent_0\%\,var\(--color1\)_20\%\,var\(--color2\)_25\%\,transparent_32\%\)\]:before{content:var(--tw-content);background-image:repeating-radial-gradient(circle at 50% 50%,transparent 0%,var(--color1) 20%,var(--color2) 25%,transparent 32%)}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.before\:\[animation-delay\:3\.5s\]:before{content:var(--tw-content);animation-delay:3.5s}.before\:\[inset\:0_auto_auto_50\%\]:before{content:var(--tw-content);inset:0 auto auto 50%}.before\:\[translate\:-50\%_-15\%\]:before{content:var(--tw-content);translate:-50% -15%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-0:after{content:var(--tw-content);left:0}.after\:top-0:after{content:var(--tw-content);top:0}.after\:h-full:after{content:var(--tw-content);height:100%}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:animate-\[heroPulse_6s_linear_infinite\]:after{content:var(--tw-content);animation:heroPulse 6s linear infinite}.after\:bg-\[repeating-radial-gradient\(circle_at_50\%_50\%\,transparent_0\%\,var\(--color2\)_9\%\,var\(--color1\)_14\%\,transparent_21\%\)\]:after{content:var(--tw-content);background-image:repeating-radial-gradient(circle at 50% 50%,transparent 0%,var(--color2) 9%,var(--color1) 14%,transparent 21%)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:border-b-0:last-child{border-bottom-width:0px}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:cursor-help:hover{cursor:help}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:border-foreground\/40:hover{border-color:hsl(var(--foreground) / .4)}.hover\:border-red-500\/60:hover{border-color:#ef444499}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent-foreground\/10:hover{background-color:hsl(var(--accent-foreground) / .1)}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/5:hover{background-color:#ef44440d}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/90:hover{color:hsl(var(--primary) / .9)}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:bg-primary\/10:focus{background-color:hsl(var(--primary) / .1)}.focus\:bg-transparent:focus{background-color:transparent}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-text:disabled{cursor:text}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:translate-x-0\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:bg-primary\/5[aria-selected=true]{background-color:hsl(var(--primary) / .05)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=inactive\]\:\!hidden[data-state=inactive]{display:none!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.data-\[is-refetching\=true\]\:animate-spin[data-is-refetching=true]{animation:spin 1s linear infinite}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[is-selected\=false\]\:border[data-is-selected=false]{border-width:1px}.data-\[is-selected\=false\]\:border-green-500\/20[data-is-selected=false]{border-color:#22c55e33}.data-\[is-selected\=false\]\:border-orange-500\/20[data-is-selected=false]{border-color:#f9731633}.data-\[is-selected\=false\]\:border-red-500\/20[data-is-selected=false]{border-color:#ef444433}.data-\[is-selected\=false\]\:border-slate-500\/20[data-is-selected=false]{border-color:#64748b33}.data-\[is-selected\=false\]\:border-yellow-500\/20[data-is-selected=false]{border-color:#eab30833}.data-\[state\=active\]\:border-primary\/50[data-state=active]{border-color:hsl(var(--primary) / .5)}.data-\[state\=active\]\:border-b-primary[data-state=active]{border-bottom-color:hsl(var(--primary))}.data-\[is-selected\=true\]\:bg-green-500\/20[data-is-selected=true]{background-color:#22c55e33}.data-\[is-selected\=true\]\:bg-orange-500\/20[data-is-selected=true]{background-color:#f9731633}.data-\[is-selected\=true\]\:bg-red-500\/20[data-is-selected=true]{background-color:#ef444433}.data-\[is-selected\=true\]\:bg-slate-500\/20[data-is-selected=true]{background-color:#64748b33}.data-\[is-selected\=true\]\:bg-yellow-500\/20[data-is-selected=true]{background-color:#eab30833}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:bg-transparent[data-state=active]{background-color:transparent}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-muted[data-state=open],.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[is-selected\=false\]\:font-light[data-is-selected=false]{font-weight:300}.data-\[disabled\]\:text-white[data-disabled]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-100[data-disabled]{opacity:1}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=active\]\:shadow-none[data-state=active]{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=active\]\:ring-1[data-state=active]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.data-\[state\=active\]\:ring-border[data-state=active]{--tw-ring-color: hsl(var(--border))}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.hover\:data-\[is-selected\=false\]\:border-transparent[data-is-selected=false]:hover{border-color:transparent}.hover\:data-\[is-selected\=false\]\:bg-green-500\/20[data-is-selected=false]:hover{background-color:#22c55e33}.hover\:data-\[is-selected\=false\]\:bg-orange-500\/20[data-is-selected=false]:hover{background-color:#f9731633}.hover\:data-\[is-selected\=false\]\:bg-red-500\/20[data-is-selected=false]:hover{background-color:#ef444433}.hover\:data-\[is-selected\=false\]\:bg-slate-500\/20[data-is-selected=false]:hover{background-color:#64748b33}.hover\:data-\[is-selected\=false\]\:bg-yellow-500\/20[data-is-selected=false]:hover{background-color:#eab30833}.hover\:data-\[is-selected\=true\]\:bg-green-500\/20[data-is-selected=true]:hover{background-color:#22c55e33}.hover\:data-\[is-selected\=true\]\:bg-orange-500\/20[data-is-selected=true]:hover{background-color:#f9731633}.hover\:data-\[is-selected\=true\]\:bg-red-500\/20[data-is-selected=true]:hover{background-color:#ef444433}.hover\:data-\[is-selected\=true\]\:bg-slate-500\/20[data-is-selected=true]:hover{background-color:#64748b33}.hover\:data-\[is-selected\=true\]\:bg-yellow-500\/20[data-is-selected=true]:hover{background-color:#eab30833}.dark\:border-\[1px\]:is(.dark *){border-width:1px}.dark\:border-blue-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-border:is(.dark *){border-color:hsl(var(--border))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-orange-500\/40:is(.dark *){border-color:#f9731666}.dark\:border-orange-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:border-slate-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.dark\:border-yellow-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.dark\:bg-\[\#050A23\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 10 35 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#050c1c\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 12 28 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/30:is(.dark *){background-color:#1725544d}.dark\:bg-emerald-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-500\/50:is(.dark *){background-color:#6b728080}.dark\:bg-gray-800\/20:is(.dark *){background-color:#1f293733}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-muted\/20:is(.dark *){background-color:hsl(var(--muted) / .2)}.dark\:bg-orange-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}.dark\:bg-red-950\/40:is(.dark *){background-color:#450a0a66}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#713f124d}.dark\:from-orange-950\/20:is(.dark *){--tw-gradient-from: rgb(67 20 7 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(67 20 7 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:text-\[\#b8d9ff77\]:is(.dark *){color:#b8d9ff77}.dark\:text-\[\#b8d9ff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(184 217 255 / var(--tw-text-opacity, 1))}.dark\:text-\[\#ffffff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:text-\[rgb\(184\,217\,255\)\]:is(.dark *){--tw-text-opacity: 1;color:rgb(184 217 255 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-400\/70:is(.dark *){color:#9ca3afb3}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.dark\:text-orange-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:mix-blend-plus-lighter:is(.dark *){mix-blend-mode:plus-lighter}.dark\:ring-inset:is(.dark *){--tw-ring-inset: inset}.dark\:hover\:bg-red-950\/60:hover:is(.dark *){background-color:#450a0a99}.dark\:hover\:bg-yellow-900\/50:hover:is(.dark *){background-color:#713f1280}.dark\:hover\:text-gray-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:data-\[state\=active\]\:bg-muted\/70[data-state=active]:is(.dark *){background-color:hsl(var(--muted) / .7)}.dark\:data-\[state\=active\]\:shadow-lg[data-state=active]:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:w-\[200px\]{width:200px}.sm\:w-\[350px\]{width:350px}.sm\:w-\[400px\]{width:400px}.sm\:w-\[460px\]{width:460px}.sm\:\!max-w-\[600px\]{max-width:600px!important}.sm\:max-w-\[625px\]{max-width:625px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:grid-flow-col{grid-auto-flow:column}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media(min-width:768px){.md\:relative{position:relative}.md\:inset-auto{inset:auto}.md\:bottom-auto{bottom:auto}.md\:top-0{top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-full{height:100%}.md\:w-\[500px\]{width:500px}.md\:w-\[560px\]{width:560px}.md\:max-w-\[420px\]{max-width:420px}.md\:max-w-\[80\%\]{max-width:80%}.md\:max-w-sm{max-width:24rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.md\:grid-cols-\[minmax\(0\,1\.6fr\)_120px_140px_140px\]{grid-template-columns:minmax(0,1.6fr) 120px 140px 140px}.md\:grid-cols-\[var\(--v1-sidebar-width\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:var(--v1-sidebar-width) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:flex-wrap{flex-wrap:wrap}.md\:items-start{align-items:flex-start}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:rounded-tl-xl{border-top-left-radius:.75rem}.md\:bg-\[unset\]{background-color:unset}.md\:transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.md\:duration-200{transition-duration:.2s}.md\:ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.md\:duration-200{animation-duration:.2s}.md\:ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.md\:dark\:bg-\[unset\]:is(.dark *){background-color:unset}}@media(min-width:1024px){.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:w-\[250px\]{width:250px}.lg\:w-\[600px\]{width:600px}.lg\:w-\[680px\]{width:680px}.lg\:max-w-\[500px\]{max-width:500px}.lg\:max-w-\[560px\]{max-width:560px}.lg\:max-w-\[60\%\]{max-width:60%}.lg\:max-w-none{max-width:none}.lg\:grid-flow-col{grid-auto-flow:column}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[1fr_round\(nearest\,50\%\,24px\)\]{grid-template-columns:1fr round(nearest,50%,24px)}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-start{justify-content:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-12{padding-left:3rem;padding-right:3rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-12{padding-top:3rem;padding-bottom:3rem}.lg\:pb-12{padding-bottom:3rem}.lg\:text-left{text-align:left}.lg\:text-right{text-align:right}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:\[grid-template-columns\:1fr_1fr_auto_1fr\]{grid-template-columns:1fr 1fr auto 1fr}}@media(min-width:1280px){.xl\:max-w-\[50\%\]{max-width:50%}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\*\]\:line-through>*{text-decoration-line:line-through}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:hidden>svg{display:none}.\[\&\>svg\]\:size-3\.5>svg{width:.875rem;height:.875rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\]\:text-red-700>svg{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.dark\:\[\&\>svg\]\:text-red-300>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:text-muted-foreground\/50 svg{color:hsl(var(--muted-foreground) / .5)}.\[\&_svg\]\:text-primary svg{color:hsl(var(--primary))}.\[\&_td\:last-child\]\:w-\[60px\] td:last-child{width:60px}.\[\&_td\:last-child\]\:min-w-\[60px\] td:last-child{min-width:60px}.\[\&_td\:last-child\]\:max-w-\[60px\] td:last-child{max-width:60px}.\[\&_th\:last-child\]\:w-\[60px\] th:last-child{width:60px}.\[\&_th\:last-child\]\:min-w-\[60px\] th:last-child{min-width:60px}.\[\&_th\:last-child\]\:max-w-\[60px\] th:last-child{max-width:60px} diff --git a/hatchetembed/dashboard/assets/index-jG0QnzWT.js b/hatchetembed/dashboard/assets/index-jG0QnzWT.js new file mode 100644 index 0000000000..1f1abfbf36 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-jG0QnzWT.js @@ -0,0 +1,6 @@ +import{v as Ae,ch as ae,x as ce,l as ue,k as c,p as oe,a as W,j as e,S as he,I as ye,cq as Te,_ as Le,$ as Fe,a0 as Ee,a1 as Me,B as ie,by as xe,cN as te,cU as Pe,aH as pe,g as Re,b as Ce,cV as Ke,b1 as $e,ci as Oe,h as Be,cP as He,cR as ze,N as we,O as be,cW as _e,cX as We,o as Ue,cY as de,s as ve,b3 as Ve,cZ as qe,aA as Ye,aB as Je,cz as je,c_ as Ze,cx as Ge,b6 as Qe,b7 as Xe,aj as et,ah as tt,ai as st,ak as nt,al as Se}from"./index-wypz6hY5.js";import{C as Ne}from"./confirm-dialog-CMXood8J.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="a6bfbb75-c80a-44b5-a958-efb8e38a1b58",l._sentryDebugIdIdentifier="sentry-dbid-a6bfbb75-c80a-44b5-a958-efb8e38a1b58")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const at=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],lt=Ae("command",at);function rt({open:l,scheduledRunIds:i,filter:o,onOpenChange:N,onSuccess:k}){var y,_;const{tenantId:v}=ae(),{toast:h}=ce(),{handleApiError:t}=ue({}),j=n=>new Intl.NumberFormat().format(n),A=i.length===0&&!!o,[O,w]=c.useState(void 0),[U,L]=c.useState(!1),[M,P]=c.useState(void 0),[F,V]=c.useState(void 0),[B,R]=c.useState(""),Z="DELETE",H=B.trim().toLowerCase()===Z.toLowerCase(),[D,K]=c.useState({phase:"idle",processed:0});c.useEffect(()=>{if(l||(R(""),K({phase:"idle",processed:0})),!l||!A||!o){w(void 0),L(!1),P(void 0),V(void 0);return}let n=!1;L(!0),P(void 0),w(void 0),V(void 0);const b=200;return(async()=>{var r,f,g,C,E,p;const S=await W.workflowScheduledList(v,{...o,limit:b,offset:0}),T=((f=(r=S.data)==null?void 0:r.pagination)==null?void 0:f.num_pages)??0,s=((C=(g=S.data)==null?void 0:g.rows)==null?void 0:C.length)??0;if(T<=1){n||w(s);return}const a=(T-1)*b,d=((p=(E=(await W.workflowScheduledList(v,{...o,limit:b,offset:a})).data)==null?void 0:E.rows)==null?void 0:p.length)??0;n||w((T-1)*b+d)})().catch(S=>{n||P(S.message)}).finally(()=>{n||L(!1)}),()=>{n=!0}},[l,A,o,v]);const q=oe({mutationKey:["scheduled-run:bulk-delete",v,i,o],mutationFn:async()=>{var s,a,u;const n=[],b=[],Y=async d=>{var f,g;if(d.length===0)return;const r=await W.workflowScheduledBulkDelete(v,{scheduledWorkflowRunIds:d});n.push(...((f=r.data)==null?void 0:f.deletedIds)??[]),b.push(...((g=r.data)==null?void 0:g.errors)??[])};let S=[];if(i.length>0)S=i;else{let r=0;const f=o??{};K({phase:"collecting",processed:0,total:O});let g=!0;for(;g;){const C=await W.workflowScheduledList(v,{...f,limit:1e3,offset:r}),E=((s=C.data)==null?void 0:s.rows)??[],p=E.map(m=>{var $;return($=m==null?void 0:m.metadata)==null?void 0:$.id}).filter(m=>!!m);if(p.length===0){g=!1;continue}S.push(...p),K(m=>({...m,processed:m.processed+p.length}));const I=(u=(a=C.data)==null?void 0:a.pagination)==null?void 0:u.num_pages,J=Math.floor(r/1e3)+1;g=!1,I!=null?J({...f,processed:f.processed+r.length}))}return K(d=>({...d,phase:"done"})),{deletedIds:n,errors:b}},onSuccess:n=>{var T,s;const b=((T=n==null?void 0:n.deletedIds)==null?void 0:T.length)||0,Y=((s=n==null?void 0:n.errors)==null?void 0:s.length)||0,S=`Deleted ${j(b)}. ${Y?`${j(Y)} failed.`:""}`.trim();h({title:"Delete scheduled runs",description:S}),V({deletedIds:(n==null?void 0:n.deletedIds)??[],errors:(n==null?void 0:n.errors)??[]}),k(),Y||N(!1)},onError:t}),z=c.useRef(!1),G=()=>{z.current||q.isPending||(z.current=!0,q.mutate(void 0,{onSettled:()=>{z.current=!1}}))};return e.jsx(Ne,{isOpen:l,title:"Delete scheduled runs",submitLabel:"Delete",submitVariant:"destructive",submitDisabled:i.length===0&&!o||!H,isLoading:q.isPending,onCancel:()=>N(!1),onSubmit:G,description:e.jsxs("div",{className:"space-y-4",children:[q.isError&&e.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:((y=q.error)==null?void 0:y.message)||"Failed to delete."}),(_=F==null?void 0:F.errors)!=null&&_.length?e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:[e.jsxs("div",{className:"font-medium",children:[F.errors.length," failed to delete."]}),e.jsxs("div",{className:"mt-2 space-y-1 text-xs",children:[F.errors.slice(0,10).map((n,b)=>e.jsxs("div",{className:"break-all",children:[n.id?`${n.id}: `:"",n.error]},`${n.id??"unknown"}-${b}`)),F.errors.length>10&&e.jsxs("div",{children:["…and ",F.errors.length-10," more."]})]})]}):null,i.length>0?e.jsxs("p",{children:["You are about to delete ",e.jsx("b",{children:i.length})," scheduled run",i.length===1?"":"s",". This cannot be undone."]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:"You are about to delete all scheduled runs matching the current filters. This cannot be undone."}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[U&&e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(he,{})," Counting matching runs…"]}),!U&&M&&e.jsx("span",{className:"text-destructive",children:M}),!U&&!M&&O!=null&&e.jsxs("span",{children:["Affected scheduled runs: ",e.jsx("b",{children:j(O)})]})]})]}),D.phase==="collecting"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Collecting ",j(D.processed),D.total!=null?` / ${j(D.total)}`:""," ","ids…"]}),D.phase==="deleting"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Deleting ",j(D.processed),D.total!=null?` / ${j(D.total)}`:"","…"]}),!q.isPending&&D.phase!=="collecting"&&D.phase!=="deleting"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type ",e.jsx("span",{className:"font-mono",children:Z})," ","to confirm."]}),e.jsx(ye,{type:"text",value:B,onChange:n=>R(n.target.value),placeholder:`Type ${Z} to confirm`})]})]})})}function it({open:l,scheduledRunIds:i,filter:o,initialRuns:N,onOpenChange:k,onSuccess:v}){var S,T;const{tenantId:h}=ae(),{toast:t}=ce(),{handleApiError:j}=ue({}),A=s=>new Intl.NumberFormat().format(s),O=c.useMemo(()=>{const s=new Map;for(const a of N)s.set(a.metadata.id,a);return s},[N]),[w,U]=c.useState(void 0),[L,M]=c.useState(void 0),[P,F]=c.useState(!1),[V,B]=c.useState(void 0),[R,Z]=c.useState(void 0),[H,D]=c.useState(""),K="RESCHEDULE",q=H.trim().toLowerCase()===K.toLowerCase(),[z,G]=c.useState({phase:"idle",processed:0}),y=i.length===0&&!!o;c.useEffect(()=>{l||(D(""),G({phase:"idle",processed:0}))},[l]),c.useEffect(()=>{if(!l||!y||!o){M(void 0),F(!1),B(void 0),Z(void 0);return}let s=!1;F(!0),B(void 0),M(void 0),Z(void 0);const a=200;return(async()=>{var p,I,J,m,$,ee;const d=await W.workflowScheduledList(h,{...o,limit:a,offset:0}),r=((I=(p=d.data)==null?void 0:p.pagination)==null?void 0:I.num_pages)??0,f=((m=(J=d.data)==null?void 0:J.rows)==null?void 0:m.length)??0;if(r<=1){s||M(f);return}const g=(r-1)*a,E=((ee=($=(await W.workflowScheduledList(h,{...o,limit:a,offset:g})).data)==null?void 0:$.rows)==null?void 0:ee.length)??0;s||M((r-1)*a+E)})().catch(d=>{s||B(d.message)}).finally(()=>{s||F(!1)}),()=>{s=!0}},[l,y,o,h]),c.useEffect(()=>{var u;if(!l||w)return;for(const d of i){const r=(u=O.get(d))==null?void 0:u.triggerAt;if(r){U(new Date(r));return}}let s=!1;return(async()=>{var d,r,f;try{if(y&&o){const p=(r=(d=(await W.workflowScheduledList(h,{...o,limit:1,offset:0})).data)==null?void 0:d.rows)==null?void 0:r[0];!s&&(p!=null&&p.triggerAt)&&U(new Date(p.triggerAt));return}const g=i[0];if(!g)return;const C=await W.workflowScheduledGet(h,g);!s&&((f=C.data)!=null&&f.triggerAt)&&U(new Date(C.data.triggerAt))}catch{}})(),()=>{s=!0}},[l,w,i,O,y,o,h]);const _=c.useMemo(()=>{if(!w)return[];const s=w.toISOString();return i.map(a=>({id:a,triggerAt:s}))},[i,w]),n=oe({mutationKey:["scheduled-run:bulk-update",h,i,o],mutationFn:async()=>{var u,d,r,f,g,C,E;if(!w)return{updatedIds:[],errors:[]};G({phase:"running",processed:0,total:i.length>0?i.length:L});const s=[],a=[];if(y&&o){let I=0;const J=w.toISOString();let m=!0;for(;m;){const $=await W.workflowScheduledList(h,{...o,limit:1e3,offset:I}),ee=((u=$.data)==null?void 0:u.rows)??[],se=ee.map(Q=>{var ne;return(ne=Q==null?void 0:Q.metadata)==null?void 0:ne.id}).filter(Q=>!!Q);if(se.length===0){m=!1;continue}const le=500;for(let Q=0;Q({id:re,triggerAt:J})),me=await W.workflowScheduledBulkUpdate(h,{updates:Ie});s.push(...((d=me.data)==null?void 0:d.updatedIds)??[]),a.push(...((r=me.data)==null?void 0:r.errors)??[]),G(re=>({...re,processed:re.processed+ne.length}))}const x=(g=(f=$.data)==null?void 0:f.pagination)==null?void 0:g.num_pages,De=Math.floor(I/1e3)+1;m=!1,x!=null?De({...$,processed:$.processed+J.length}))}return G(p=>({...p,phase:"done"})),{updatedIds:s,errors:a}},onSuccess:s=>{var r,f;const a=((r=s==null?void 0:s.updatedIds)==null?void 0:r.length)||0,u=((f=s==null?void 0:s.errors)==null?void 0:f.length)||0,d=`Updated ${A(a)}. ${u?`${A(u)} failed.`:""}`.trim();t({title:"Reschedule scheduled runs",description:d}),Z({updatedIds:(s==null?void 0:s.updatedIds)??[],errors:(s==null?void 0:s.errors)??[]}),v(),u||k(!1)},onError:j}),b=c.useRef(!1),Y=()=>{b.current||n.isPending||(b.current=!0,n.mutate(void 0,{onSettled:()=>{b.current=!1}}))};return e.jsx(Ne,{isOpen:l,title:"Reschedule scheduled runs",submitLabel:"Reschedule",submitVariant:"destructive",isLoading:n.isPending,submitDisabled:!w||!q||y&&(P||!!V||!L||L<=0)||!y&&i.length===0||!y&&_.length!==i.length,onCancel:()=>k(!1),onSubmit:Y,description:e.jsxs("div",{className:"space-y-3",children:[n.isError&&e.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:((S=n.error)==null?void 0:S.message)||"Failed to reschedule."}),(T=R==null?void 0:R.errors)!=null&&T.length?e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:[e.jsxs("div",{className:"font-medium",children:[R.errors.length," failed to reschedule."]}),e.jsxs("div",{className:"mt-2 space-y-1 text-xs",children:[R.errors.slice(0,10).map((s,a)=>e.jsxs("div",{className:"break-all",children:[s.id?`${s.id}: `:"",s.error]},`${s.id??"unknown"}-${a}`)),R.errors.length>10&&e.jsxs("div",{children:["…and ",R.errors.length-10," more."]})]})]}):null,e.jsx("div",{className:"rounded-md border p-3",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium",children:"New trigger time"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y?"This will apply to all scheduled runs matching the current filters.":"This will apply to all selected scheduled runs."})]}),e.jsx(Te,{date:w,setDate:U,label:"Trigger at"})]})}),e.jsx("div",{className:"rounded-md border p-3",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-medium",children:["Affected scheduled runs:"," ",y?L!=null?A(L):"—":A(i.length)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y?e.jsxs(e.Fragment,{children:[P&&e.jsx("span",{children:"Counting matching runs… "}),!P&&V&&e.jsx("span",{className:"text-destructive",children:V}),!P&&!V&&L!=null&&e.jsx("span",{children:"Ready to reschedule."})]}):e.jsx("span",{children:"Ready to reschedule."})})]}),P&&e.jsx(he,{})]})}),z.phase==="running"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Rescheduling ",A(z.processed),z.total!=null?` / ${A(z.total)}`:"","…"]}),!n.isPending&&z.phase!=="running"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type ",e.jsx("span",{className:"font-mono",children:K})," ","to confirm."]}),e.jsx(ye,{type:"text",value:H,onChange:s=>D(s.target.value),placeholder:`Type ${K} to confirm`})]})]})})}function ot({scheduledRun:l,setShowScheduledRunRevoke:i,onSuccess:o}){const{tenantId:N}=ae(),{handleApiError:k}=ue({}),v=oe({mutationKey:["scheduled-run:delete",N,l],mutationFn:async()=>{l&&await W.workflowScheduledDelete(N,l.metadata.id)},onSuccess:o,onError:k});return e.jsx(Le,{open:!!l,onOpenChange:h=>i(h?l:void 0),children:e.jsx(dt,{isLoading:v.isPending,onSubmit:()=>v.mutate(),onCancel:()=>i(void 0),isFutureRun:l!=null&&l.triggerAt?new Date(l.triggerAt)>new Date:!1})})}function dt({className:l,isFutureRun:i,...o}){return e.jsxs(Fe,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(Ee,{children:e.jsx(Me,{children:"Delete scheduled run"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to delete the scheduled run?",i?e.jsx(e.Fragment,{children:"This action will prevent the run from running in the future and cannot be undone."}):e.jsx(e.Fragment,{children:"This action will delete the scheduled run trigger, but will not affect the run itself and cannot be undone."})]}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(ie,{variant:"ghost",onClick:()=>{o.onCancel()},children:"Cancel"}),e.jsxs(ie,{variant:"destructive",onClick:()=>{o.onSubmit()},children:[o.isLoading&&e.jsx(he,{}),"Delete scheduled run"]})]})]})]})}const X={id:"ID",status:"Status",triggerAt:"Trigger At",workflow:"Workflow",metadata:"Metadata",createdAt:"Created At",actions:"Actions"},ct="id",ke="status",ut="triggerAt",ge="workflow",fe="metadata",ht="createdAt",gt="actions",ft=({tenantId:l,onDeleteClick:i,onRescheduleClick:o,onTriggerClick:N,selectedAdditionalMetaJobId:k,handleSetSelectedAdditionalMetaJobId:v,onRowClick:h})=>[{id:"select",header:({table:t})=>e.jsx(xe,{checked:t.getIsAllPageRowsSelected()||t.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:j=>t.toggleAllPageRowsSelected(!!j),"aria-label":"Select all",className:"translate-y-[2px]"}),cell:({row:t})=>e.jsx(xe,{checked:t.getIsSelected(),onCheckedChange:j=>t.toggleSelected(!!j),"aria-label":"Select row",disabled:t.original.method!=="API"?!0:void 0}),enableSorting:!1,enableHiding:!1},{accessorKey:ct,header:({column:t})=>e.jsx(te,{column:t,title:X.id}),cell:({row:t})=>e.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",onClick:()=>h==null?void 0:h(t.original),children:t.original.metadata.id}),enableSorting:!1,enableHiding:!0},{accessorKey:ke,header:({column:t})=>e.jsx(te,{column:t,title:X.status}),cell:({row:t})=>e.jsx("div",{className:"cursor-pointer",onClick:()=>h==null?void 0:h(t.original),children:e.jsx(Pe,{status:t.original.workflowRunStatus||"SCHEDULED"})}),enableSorting:!1,enableHiding:!0},{accessorKey:ut,header:({column:t})=>e.jsx(te,{column:t,title:X.triggerAt}),cell:({row:t})=>e.jsx("div",{className:"flex cursor-pointer flex-row items-center gap-4",onClick:()=>h==null?void 0:h(t.original),children:e.jsx(pe,{date:t.original.triggerAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:ge,header:({column:t})=>e.jsx(te,{column:t,title:X.workflow}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row items-center gap-4",children:e.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:e.jsx(Re,{to:Ce.tenantWorkflowRoute.to,params:{tenant:l,workflow:t.original.workflowId},children:t.original.workflowName})})}),enableSorting:!1,enableHiding:!0},{accessorKey:fe,header:({column:t})=>e.jsx(te,{column:t,title:X.metadata}),cell:({row:t})=>t.original.additionalMetadata?e.jsx(Ke,{metadata:t.original.additionalMetadata,isOpen:k===t.original.metadata.id,onOpenChange:j=>{v(j?t.original.metadata.id:null)}}):e.jsx("div",{}),enableSorting:!1,enableHiding:!0},{accessorKey:ht,header:({column:t})=>e.jsx(te,{column:t,title:X.createdAt}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row items-center gap-4",children:e.jsx(pe,{date:t.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:gt,header:({column:t})=>e.jsx(te,{column:t,title:X.actions}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row justify-center",children:e.jsx($e,{row:t.original,actions:[{label:"Reschedule",onClick:()=>o(t.original),disabled:t.original.method!=="API"?"Cannot reschedule scheduled run created via code definition":t.original.workflowRunId?"Cannot reschedule a scheduled run that has already been triggered":void 0},{label:"Trigger Now",onClick:()=>N(t.original),disabled:t.original.workflowRunId?"Cannot trigger a scheduled run that has already been triggered":void 0},{label:"Delete",onClick:()=>i(t.original),disabled:t.original.method!=="API"?"Cannot delete scheduled run created via code definition":void 0}]})}),enableSorting:!1,enableHiding:!0}],mt=Ue({w:de(ve()).default([]),s:de(Ve(qe)).default([]),m:de(ve()).default([])}).default({}),xt=({key:l,workflowId:i,parentWorkflowRunId:o,parentStepRunId:N})=>{var s;const{tenantId:k}=ae(),{refetchInterval:v}=Oe(),h=Be(),{toast:t}=ce(),j=`scheduled-runs-${l}`,{state:{w:A,s:O,m:w},columnFilters:U,setColumnFilters:L,resetFilters:M}=He(mt,j,{w:ge,s:ke,m:fe}),P=i||A[0],{limit:F,offset:V,pagination:B,setPagination:R,setPageSize:Z}=ze({key:l,resetPageOnChange:[A,O,w,i,o,N]}),{data:H,isLoading:D,refetch:K,error:q,isRefetching:z}=we({...be.scheduledRuns.list(k,{offset:V,limit:F,statuses:O.length>0?O:void 0,workflowId:P,parentWorkflowRunId:o,parentStepRunId:N,orderByDirection:We.DESC,orderByField:_e.TriggerAt,additionalMetadata:w.length>0?w:void 0}),placeholderData:a=>a,refetchInterval:v}),G=(H==null?void 0:H.rows)??[],y=((s=H==null?void 0:H.pagination)==null?void 0:s.num_pages)??1,{data:_,isLoading:n,error:b}=we({...be.workflows.list(k,{limit:200}),refetchInterval:v}),Y=c.useMemo(()=>{var a;return((a=_==null?void 0:_.rows)==null?void 0:a.map(u=>({value:u.metadata.id,label:u.name})))||[]},[_]),S=oe({mutationFn:async a=>W.workflowScheduledTrigger(k,a),onSuccess:a=>{var d;const u=(d=a==null?void 0:a.data)==null?void 0:d.externalId;u?h({to:Ce.tenantRunRoute.to,params:{tenant:k,run:u}}):t({title:"Run triggered successfully"})}}),T=c.useCallback(a=>S.mutate(a),[S]);return{scheduledRuns:G,numPages:y,isLoading:D||n,refetch:K,error:q||b,pagination:B,setPagination:R,setPageSize:Z,columnFilters:U,setColumnFilters:L,selectedWorkflowIds:A,selectedStatuses:O,selectedMetadata:w,workflowKeyFilters:Y,isRefetching:z,resetFilters:M,triggerNow:T}};function bt({workflowId:l,initColumnVisibility:i={createdAt:!1},filterVisibility:o={},parentWorkflowRunId:N,parentStepRunId:k}){const{tenantId:v}=ae(),{open:h}=Ye(),[t,j]=c.useState(!1),[A,O]=c.useState(null),[w,U]=Je("hatchet:columns:scheduled-runs",i),[L,M]=c.useState({}),{scheduledRuns:P,numPages:F,isLoading:V,refetch:B,error:R,pagination:Z,setPagination:H,setPageSize:D,columnFilters:K,setColumnFilters:q,workflowKeyFilters:z,isRefetching:G,resetFilters:y,selectedWorkflowIds:_,selectedStatuses:n,selectedMetadata:b,triggerNow:Y}=xt({key:"table",workflowId:l,parentWorkflowRunId:N,parentStepRunId:k}),S=[{columnId:ge,title:X.workflow,options:z,type:je.Radio},{columnId:fe,title:X.metadata,type:je.KeyValue}].filter(x=>o[x.columnId]!=!1),T=[e.jsx(ie,{onClick:()=>j(!0),variant:"cta",children:"Schedule Run"},"schedule-run")],[s,a]=c.useState(void 0),u=Object.entries(L).filter(([,x])=>!!x).map(([x])=>x),d=x=>new Intl.NumberFormat().format(x),[r,f]=c.useState(null),[g,C]=c.useState(null),[E,p]=c.useState(!1),I=c.useMemo(()=>ft({tenantId:v,onDeleteClick:x=>{a(x)},onRescheduleClick:x=>{C({scheduledRunIds:[x.metadata.id]})},onTriggerClick:x=>Y(x.metadata.id),selectedAdditionalMetaJobId:A,handleSetSelectedAdditionalMetaJobId:O,onRowClick:x=>{h({type:"scheduled-run-details",content:{scheduledRun:x}})}}),[v,A]),J=l||_[0],m=!!J||n.length>0||b.length>0||!!N||!!k,$=m?{workflowId:J,additionalMetadata:b.length>0?b:void 0,parentWorkflowRunId:N,parentStepRunId:k}:{},ee=u.length>0?`Delete selected (${d(u.length)})`:m?"Delete filtered":"Delete all",se=u.length>0?`Reschedule selected (${d(u.length)})`:m?"Reschedule filtered":"Reschedule all",le=[e.jsxs(et,{open:E,onOpenChange:p,children:[e.jsx(tt,{asChild:!0,children:e.jsxs(ie,{variant:"outline",size:"sm",type:"button",children:[e.jsx(lt,{className:"cq-xl:hidden size-4"}),e.jsx("span",{className:"cq-xl:inline hidden text-sm",children:"Actions"}),e.jsx(st,{className:"cq-xl:inline ml-2 hidden size-4"})]})}),e.jsxs(nt,{align:"end",className:"z-40",children:[e.jsx(Se,{className:"h-8 w-full cursor-pointer justify-start rounded-sm px-2 py-1.5 font-normal",onSelect:()=>{p(!1),u.length>0?f({scheduledRunIds:u}):f({scheduledRunIds:[],filter:$})},children:ee}),e.jsx(Se,{className:"h-8 w-full cursor-pointer justify-start rounded-sm px-2 py-1.5 font-normal",onSelect:()=>{p(!1),u.length>0?C({scheduledRunIds:u}):C({scheduledRunIds:[],filter:$})},children:se})]})]},"scheduled-run-actions")];return e.jsxs(e.Fragment,{children:[e.jsx(ot,{scheduledRun:s,setShowScheduledRunRevoke:a,onSuccess:()=>{B(),a(void 0)}}),e.jsx(rt,{open:!!r,scheduledRunIds:(r==null?void 0:r.scheduledRunIds)??[],filter:r==null?void 0:r.filter,onOpenChange:x=>{x||f(null)},onSuccess:()=>{B(),M({}),f(null)}}),e.jsx(it,{open:!!g,scheduledRunIds:(g==null?void 0:g.scheduledRunIds)??[],filter:g==null?void 0:g.filter,initialRuns:P,onOpenChange:x=>{x||C(null)},onSuccess:()=>{B(),M({}),C(null)}}),e.jsx(Ze,{defaultTimingOption:"schedule",defaultWorkflow:void 0,show:t,onClose:()=>j(!1)}),e.jsx(Ge,{emptyState:e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[e.jsx("p",{className:"text-lg font-semibold",children:"No runs found"}),e.jsx("div",{className:"w-fit",children:e.jsx(Qe,{doc:Xe.v1["scheduled-runs"],label:"Learn about scheduled runs"})})]}),error:R,isLoading:V,columns:I,columnVisibility:w,setColumnVisibility:U,data:P,getRowId:x=>x.metadata.id,filters:S,leftActions:le,rightActions:T,columnFilters:K,setColumnFilters:q,pagination:Z,setPagination:H,onSetPageSize:D,pageCount:F,showColumnToggle:!0,columnKeyToName:X,refetchProps:{isRefetching:G,onRefetch:B},onResetFilters:y,rowSelection:L,setRowSelection:M,showSelectedRows:!0})]})}export{bt as default}; diff --git a/hatchetembed/dashboard/assets/index-liT-riRX.js b/hatchetembed/dashboard/assets/index-liT-riRX.js new file mode 100644 index 0000000000..2096abf717 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-liT-riRX.js @@ -0,0 +1 @@ +import{aF as i,b as n,j as t}from"./index-wypz6hY5.js";import{S as o}from"./settings-page-header-Dal4BvfD.js";import{T as r}from"./tenant-resource-limits-table-xMx7u5rD.js";import"./resource-limit-columns-7zhUq4Ly.js";import"./resource-limit-status-ynncxZIe.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="305b0e32-c87f-48a2-ac1f-00591b44a957",e._sentryDebugIdIdentifier="sentry-dbid-305b0e32-c87f-48a2-ac1f-00591b44a957")}catch{}})();function m(){const{tenant:e}=i({from:n.tenantSettingsResourceLimitsRoute.to});return t.jsx("div",{className:"h-full w-full flex-grow",children:t.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[t.jsx(o,{title:"Resource limit settings",description:"Review the resource limits currently applied to this tenant."}),t.jsx(r,{tenantId:e,showDocsOnEmpty:!0})]})})}export{m as default}; diff --git a/hatchetembed/dashboard/assets/index-maO15O3V.js b/hatchetembed/dashboard/assets/index-maO15O3V.js new file mode 100644 index 0000000000..4d8b2dfb8a --- /dev/null +++ b/hatchetembed/dashboard/assets/index-maO15O3V.js @@ -0,0 +1 @@ +import{u as S,t as E,j as e,L as p,I as j,A as L,d as A,B as I,S as N,e as F,o as U,s as b,g as C,b as w,h as D,k as v,l as P,m as R,n as T,p as M}from"./index-wypz6hY5.js";import{A as _}from"./auth-page-CDHDcFHW.js";import"./auth-layout-iBwbZOUC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="7a3e307c-23d1-446a-a062-0549c9a4a56d",a._sentryDebugIdIdentifier="sentry-dbid-7a3e307c-23d1-446a-a062-0549c9a4a56d")}catch{}})();const k=U({email:b().email("Invalid email address"),password:b().min(8,"Password must be at least 8 characters long")});function B({className:a,...s}){var u,m,g,h,x,f;const{register:i,handleSubmit:l,formState:{errors:r,isValid:c,touchedFields:o,submitCount:d}}=S({resolver:E(k),mode:"onChange",reValidateMode:"onChange"}),n=(o.email||d>0?(m=(u=r.email)==null?void 0:u.message)==null?void 0:m.toString():void 0)||((g=s.fieldErrors)==null?void 0:g.email),t=(o.password||d>0?(x=(h=r.password)==null?void 0:h.message)==null?void 0:x.toString():void 0)||((f=s.fieldErrors)==null?void 0:f.password);return e.jsx("div",{className:F("grid gap-6",a),children:e.jsx("form",{onSubmit:l(y=>{s.onSubmit(y)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email"}),e.jsx(j,{...i("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:s.isLoading}),n&&e.jsx("div",{className:"text-sm text-red-500",children:n})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password",children:"Password"}),e.jsx(j,{...i("password"),id:"password",placeholder:"Password",type:"password",disabled:s.isLoading}),t&&e.jsx("div",{className:"text-sm text-red-500",children:t})]}),s.errors&&s.errors.length>0&&e.jsx(L,{variant:"destructive",children:e.jsx(A,{children:s.errors.join(" ")})}),e.jsxs(I,{disabled:s.isLoading||!c,children:[s.isLoading&&e.jsx(N,{}),"Sign In"]})]})})})}function H(){return e.jsx(_,{title:"Log in to continue",basicSection:e.jsx(V,{}),altAction:e.jsxs(e.Fragment,{children:["Don't have an account?"," ",e.jsx(C,{to:w.authRegisterRoute.to,className:"font-semibold text-primary underline underline-offset-4 hover:text-primary/90",children:"Sign up"})]})})}function V(){const a=D(),[s,i]=v.useState([]),[l,r]=v.useState({}),{handleApiError:c}=P({setFieldErrors:r,setErrors:i}),{invalidate:o}=R(),{userUpdateLoginMutation:d}=T(),n=M({...d(),onSuccess:async()=>{await o(),await new Promise(t=>setTimeout(t,0)),a({to:w.authenticatedRoute.to})},onError:c});return e.jsx(B,{isLoading:n.isPending,onSubmit:t=>{i([]),r({}),n.mutate(t)},errors:s,fieldErrors:l})}export{H as default}; diff --git a/hatchetembed/dashboard/assets/index-oGawEXJa.js b/hatchetembed/dashboard/assets/index-oGawEXJa.js new file mode 100644 index 0000000000..a8457ba6e0 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-oGawEXJa.js @@ -0,0 +1,14 @@ +import{k as c,u as V,t as q,j as e,$ as E,a0 as k,a1 as A,bc as Se,b2 as te,ab as ve,B as g,S,e as L,o as K,cY as we,s as z,a2 as P,b1 as B,a5 as ye,a6 as Ne,a7 as Ce,a8 as Ee,a9 as H,bb as $,fh as ke,fi as Q,fj as Ae,e_ as O,V as Le,fk as Re,b8 as R,L as Ie,I as Te,br as _e,fl as Me,aF as De,b as Z,y as ne,ar as F,b5 as Pe,N as C,g as ae,aa as b,C as Fe,a as w,ae as Ge,fm as Ue,bs as He,bt as $e,bu as _,bv as M,ch as v,O as I,l as y,p as N,aH as Y,bj as G,bS as We,Q as Oe,fn as T}from"./index-wypz6hY5.js";import{S as W}from"./switch-C23Bp5tT.js";import{S as Ve}from"./settings-page-header-Dal4BvfD.js";import{U as qe}from"./upgrade-required-BNScyCLS.js";import{C as Ke}from"./confirm-dialog-CMXood8J.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6821dd6f-336d-4d85-86a9-12d73bafcdd0",t._sentryDebugIdIdentifier="sentry-dbid-6821dd6f-336d-4d85-86a9-12d73bafcdd0")}catch{}})();function ze({title:t,titleId:n,...a},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},a),t?c.createElement("title",{id:n},t):null,c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const Be=c.forwardRef(ze);function Qe({title:t,titleId:n,...a},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},a),t?c.createElement("title",{id:n},t):null,c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Ze=c.forwardRef(Qe),Ye=K({emails:we(z().email()).min(1).max(100)});function Je({className:t,...n}){var o,l,d;const{handleSubmit:a,control:r,formState:{errors:i}}=V({resolver:q(Ye)}),s=((l=(o=i.emails)==null?void 0:o.message)==null?void 0:l.toString())||((d=n.fieldErrors)==null?void 0:d.name);return e.jsxs(E,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsxs(k,{children:[e.jsx(A,{children:"Create an email group"}),e.jsx(Se,{className:"py-2",children:"Enter emails as a comma-separated list."})]}),e.jsx("div",{className:L("grid gap-6",t),children:e.jsx("form",{onSubmit:a(u=>{n.onSubmit(u)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(te,{control:r,name:"emails",render:({field:u})=>e.jsx(ve,{id:"api-token-name",placeholder:"email1@example.com,email2@example.com",onChange:m=>{u.onChange(m.target.value.split(","))},autoCapitalize:"none",autoCorrect:"off",disabled:n.isLoading})}),s&&e.jsx("div",{className:"text-sm text-red-500",children:s})]}),e.jsxs(g,{disabled:n.isLoading,children:[n.isLoading&&e.jsx(S,{}),"Create email group"]})]})})})]})}function Xe({className:t,...n}){return e.jsxs(E,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(k,{children:e.jsx(A,{children:"Delete email group"})}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 text-sm text-foreground",children:"Are you sure you want to delete this email group?"}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.emailGroup)},children:[n.isLoading&&e.jsx(S,{}),"Delete group"]})]})]})]})}function et({className:t,...n}){return e.jsxs(E,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(k,{children:e.jsx(A,{children:"Delete webhook"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to delete the Slack webhook for channel"," ",n.slackWebhook.channelName," in team ",n.slackWebhook.teamName,"?"]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.slackWebhook)},children:[n.isLoading&&e.jsx(S,{}),"Delete webhook"]})]})]})]})}function tt({group:t}){return e.jsxs("div",{children:[t.metadata.id=="default"&&e.jsx(P,{className:"mr-2",variant:"secondary",children:"All Tenant Members"}),t.emails.map((n,a)=>e.jsx(P,{className:"mr-2",variant:"outline",children:n},a))]})}function nt({group:t,alertTenantEmailsSet:n}){return e.jsx("div",{className:"flex items-center justify-end space-x-2",children:t.metadata.id!="default"||n?e.jsx(P,{variant:"successful",children:"Enabled"}):e.jsx(P,{variant:"destructive",children:"Disabled"})})}function at({group:t,alertTenantEmailsSet:n,onDeleteClick:a,onToggleMembersClick:r}){return e.jsx("div",{className:"mr-4 flex items-center justify-end space-x-2",children:e.jsx(B,{row:t,actions:[t.metadata.id!="default"?{label:"Delete",onClick:()=>a(t)}:{label:n?"Disable":"Enable",onClick:()=>r(!n)}]})})}function st({webhook:t,onDeleteClick:n}){return e.jsx(B,{row:t,actions:[{label:"Delete",onClick:()=>n(t)}]})}const rt=K({maxAlertingFrequency:z(),enableWorkflowRunFailureAlerts:$().optional(),enableExpiringTokenAlerts:$().optional(),enableTenantResourceLimitAlerts:$().optional()});function it({className:t,...n}){var j,h,f;const[a,r]=c.useState(n.alertingSettings.enableWorkflowRunFailureAlerts),[i,s]=c.useState(n.alertingSettings.enableExpiringTokenAlerts),[o,l]=c.useState(n.alertingSettings.enableTenantResourceLimitAlerts),{handleSubmit:d,control:u,formState:{errors:m}}=V({resolver:q(rt),defaultValues:{maxAlertingFrequency:n.alertingSettings.maxAlertingFrequency}}),x=((h=(j=m.maxAlertingFrequency)==null?void 0:j.message)==null?void 0:h.toString())||((f=n.fieldErrors)==null?void 0:f.maxAlertingFrequency);return e.jsxs("form",{onSubmit:d(p=>{n.onSubmit({...p,enableWorkflowRunFailureAlerts:a,enableExpiringTokenAlerts:i,enableTenantResourceLimitAlerts:o})}),className:L("divide-y divide-border",t),children:[e.jsx(D,{label:"Expiring Token Alerts",description:"Send alerts when API tokens are approaching their expiration date",children:e.jsx(W,{id:"eta",checked:i,onClick:()=>s(p=>!p)})}),e.jsx(D,{label:"Resource Limit Alerts",description:"Send alerts when this tenant is approaching (or exceeds) resource limits",children:e.jsx(W,{id:"atrl",checked:o,onClick:()=>l(p=>!p)})}),e.jsx(D,{label:"Run Failure Alerts",description:"Send alerts when workflow runs fail",children:e.jsx(W,{id:"awrf",checked:a,onClick:()=>r(p=>!p)})}),a&&e.jsx(D,{label:"Max Failure Alert Frequency",description:"Limit how often repeated run-failure alerts are sent for the same ongoing issue.",children:e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx(te,{control:u,name:"maxAlertingFrequency",render:({field:p})=>e.jsxs(ye,{onValueChange:p.onChange,...p,children:[e.jsx(Ne,{className:"w-[140px]",children:e.jsx(Ce,{placeholder:"Frequency..."})}),e.jsxs(Ee,{children:[e.jsx(H,{value:"5m",children:"5 minutes"}),e.jsx(H,{value:"1h",children:"1 hour"}),e.jsx(H,{value:"24h",children:"24 hours"})]})]})}),x&&e.jsx("div",{className:"text-sm text-red-500",children:x})]})}),e.jsx("div",{className:"flex justify-end pt-4",children:e.jsxs(g,{disabled:n.isLoading,className:"w-fit",children:[n.isLoading&&e.jsx(S,{}),"Save"]})})]})}function D({label:t,description:n,children:a}){return e.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("p",{className:"text-sm font-medium",children:t}),e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:n})]}),a]})}function ot(t,n=[]){let a=[];function r(s,o){const l=c.createContext(o);l.displayName=s+"Context";const d=a.length;a=[...a,o];const u=x=>{var X;const{scope:j,children:h,...f}=x,p=((X=j==null?void 0:j[t])==null?void 0:X[d])||l,be=c.useMemo(()=>f,Object.values(f));return e.jsx(p.Provider,{value:be,children:h})};u.displayName=s+"Provider";function m(x,j){var p;const h=((p=j==null?void 0:j[t])==null?void 0:p[d])||l,f=c.useContext(h);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${x}\` must be used within \`${s}\``)}return[u,m]}const i=()=>{const s=a.map(o=>c.createContext(o));return function(l){const d=(l==null?void 0:l[t])||s;return c.useMemo(()=>({[`__scope${t}`]:{...l,[t]:d}}),[l,d])}};return i.scopeName=t,[r,lt(i,...n)]}function lt(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:d,scopeName:u})=>{const x=d(s)[`__scope${u}`];return{...l,...x}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return a.scopeName=n.scopeName,a}var ct=ke();function dt(){return ct.useSyncExternalStore(ut,()=>!0,()=>!1)}function ut(){return()=>{}}var J="Avatar",[mt]=ot(J),[xt,se]=mt(J),re=c.forwardRef((t,n)=>{const{__scopeAvatar:a,...r}=t,[i,s]=c.useState("idle");return e.jsx(xt,{scope:a,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:e.jsx(Q.span,{...r,ref:n})})});re.displayName=J;var ie="AvatarImage",oe=c.forwardRef((t,n)=>{const{__scopeAvatar:a,src:r,onLoadingStatusChange:i=()=>{},...s}=t,o=se(ie,a),l=ht(r,s),d=Ae(u=>{i(u),o.onImageLoadingStatusChange(u)});return O(()=>{l!=="idle"&&d(l)},[l,d]),l==="loaded"?e.jsx(Q.img,{...s,ref:n,src:r}):null});oe.displayName=ie;var le="AvatarFallback",ce=c.forwardRef((t,n)=>{const{__scopeAvatar:a,delayMs:r,...i}=t,s=se(le,a),[o,l]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(d)}},[r]),o&&s.imageLoadingStatus!=="loaded"?e.jsx(Q.span,{...i,ref:n}):null});ce.displayName=le;function ee(t,n){return t?n?(t.src!==n&&(t.src=n),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ht(t,{referrerPolicy:n,crossOrigin:a}){const r=dt(),i=c.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,l]=c.useState(()=>ee(s,t));return O(()=>{l(ee(s,t))},[s,t]),O(()=>{const d=x=>()=>{l(x)};if(!s)return;const u=d("loaded"),m=d("error");return s.addEventListener("load",u),s.addEventListener("error",m),n&&(s.referrerPolicy=n),typeof a=="string"&&(s.crossOrigin=a),()=>{s.removeEventListener("load",u),s.removeEventListener("error",m)}},[s,a,n]),o}var de=re,ue=oe,me=ce;const xe=c.forwardRef(({className:t,...n},a)=>e.jsx(de,{ref:a,className:L("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...n}));xe.displayName=de.displayName;const he=c.forwardRef(({className:t,...n},a)=>e.jsx(ue,{ref:a,className:L("aspect-square h-full w-full",t),...n}));he.displayName=ue.displayName;const ge=c.forwardRef(({className:t,...n},a)=>e.jsx(me,{ref:a,className:L("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...n}));ge.displayName=me.displayName;function gt({installation:t}){return e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsxs(xe,{className:"h-6 w-6",children:[e.jsx(he,{src:t.account_avatar_url}),e.jsx(ge,{})]}),e.jsx("div",{children:t.account_name})]})}function ft({installation:t,onLinkToTenant:n}){return t.is_linked_to_tenant?e.jsx(g,{variant:"ghost",disabled:!0,leftIcon:e.jsx(Le,{className:"size-4"}),children:"Linked"}):t.type=="installation"?e.jsx(g,{variant:"outline",onClick:()=>n(t.metadata.id),leftIcon:e.jsx(Ze,{className:"size-4"}),children:"Link to tenant"}):e.jsx("a",{href:t.installation_settings_url+`&redirect_to=${encodeURIComponent(window.location.pathname)}`,target:"_blank",rel:"noreferrer",children:e.jsx(g,{variant:"outline",children:"Finish Setup"})})}function pt({installation:t}){return e.jsx("a",{href:t.installation_settings_url+`&redirect_to=${encodeURIComponent(window.location.pathname)}`,target:"_blank",rel:"noreferrer",children:e.jsx(g,{variant:"ghost",leftIcon:e.jsx(Re,{className:"size-4"}),children:"Configure"})})}const jt=K({topicArn:z().min(1).max(255)});function bt({className:t,snsIngestionUrl:n,...a}){var l,d,u;const{register:r,handleSubmit:i,formState:{errors:s}}=V({resolver:q(jt)});if(n)return e.jsxs(E,{className:"w-fit max-w-[700px]",children:[e.jsx(k,{children:e.jsx(A,{children:"Use this ingestion URL"})}),e.jsx("p",{className:"text-sm",children:"Use this ingestion URL with an HTTPS subscriber for SNS."}),e.jsx(R,{language:"typescript",className:"text-sm",wrapLines:!1,maxWidth:"calc(700px - 4rem)",code:n,copy:!0})]});const o=((d=(l=s.topicArn)==null?void 0:l.message)==null?void 0:d.toString())||((u=a.fieldErrors)==null?void 0:u.name);return e.jsxs(E,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(k,{children:e.jsx(A,{children:"Create a new SNS integration"})}),e.jsx("div",{className:L("grid gap-6",t),children:e.jsx("form",{onSubmit:i(m=>{a.onSubmit(m)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(Ie,{htmlFor:"email",children:"Topic ARN"}),e.jsx(Te,{...r("topicArn"),id:"sns-topic-arn",placeholder:"arn:aws:sns:us-west-1:123456789:topic",autoCapitalize:"none",autoCorrect:"off",disabled:a.isLoading}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs(g,{disabled:a.isLoading,children:[a.isLoading&&e.jsx(S,{}),"Create integration"]})]})})})]})}function St({className:t,...n}){return e.jsxs(E,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(k,{children:e.jsx(A,{children:"Delete integration"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to revoke the SNS integration on Topic ARN"," ",n.snsIntegration.topicArn,"? This action will immediately prevent any SNS events from being sent to the Hatchet subscriber."]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.snsIntegration)},children:[n.isLoading&&e.jsx(S,{}),"Delete integration"]})]})]})]})}function vt({ingestUrl:t}){const[n,a]=c.useState(!1);return e.jsxs(g,{variant:"icon",onClick:()=>{navigator.clipboard.writeText(t),a(!0),setTimeout(()=>{a(!1)},2e3)},children:[n?e.jsx(_e,{className:"size-4"}):e.jsx(Me,{className:"size-4"}),n?"Copied":"Copy ingest URL"]})}function wt({integration:t,onDeleteClick:n}){return e.jsx(B,{row:t,actions:[{label:"Delete",onClick:()=>n(t)}]})}const yt="https://docs.hatchet.run/self-hosting/configuration-options";function fe({title:t,description:n}){return e.jsxs("div",{className:"mb-4 space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:t}),e.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:n})]})}function Nt(){var o;const{tenant:t}=De({from:Z.tenantRoute.to}),{isControlPlaneEnabled:n,isControlPlaneLoading:a}=ne(),{organizationId:r}=F(),i=Pe(),s=C({...i.organizationEntitlementsGetQuery(r||""),enabled:!!r&&n});return a?e.jsx(S,{}):n?!r||s.isLoading?e.jsx(S,{}):((o=s.data)==null?void 0:o.prometheusMetrics)!==!0?e.jsx(At,{organizationId:r}):e.jsx(Et,{tenantId:t}):e.jsx(kt,{tenantId:t})}function Ct(t){if(t)try{const n=new URL(t);return{origin:n.origin,host:n.host,scheme:n.protocol.replace(":","")}}catch{}return{origin:window.location.origin,host:window.location.host,scheme:window.location.protocol.replace(":","")}}function pe({tenantId:t}){const{tenant:n}=F(),{origin:a,host:r,scheme:i}=Ct(n==null?void 0:n.serverUrl),s=`${a}/api/v1/tenants/${t}/prometheus-metrics`,o=`scrape_configs: + - job_name: hatchet + scheme: ${i} + metrics_path: /api/v1/tenants/${t}/prometheus-metrics + authorization: + type: Bearer + credentials: + static_configs: + - targets: + - ${r}`;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Scrape URL"}),e.jsx(R,{language:"text",code:s,wrapLines:!1}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Requests must be authenticated with a"," ",e.jsx(ae,{to:Z.tenantSettingsApiTokensRoute.to,params:{tenant:t},className:"underline",children:"tenant API token"})," ","(sent as a Bearer token). Point your Prometheus instance or Grafana Agent at this URL to federate this tenant's metrics."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Example Prometheus scrape config"}),e.jsx(R,{language:"yaml",code:o})]})]})}function je({tenantId:t}){const n=C({queryKey:["tenant:prometheus-metrics",t],queryFn:async()=>(await w.tenantGetPrometheusMetrics(t)).data,retry:!1});return e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Live preview"}),n.isLoading?e.jsx(S,{}):n.isError||!n.data?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No metrics available yet. Once your workers report metrics, they will appear here."}):e.jsx(R,{language:"text",code:n.data,maxHeight:"24rem",copy:!1,wrapLines:!1})]})}function Et({tenantId:t}){return e.jsxs("div",{children:[e.jsx(fe,{title:"Prometheus Metrics",description:"Scrape this tenant's metrics in Prometheus exposition format to power external dashboards and alerting."}),e.jsx(b,{className:"my-4"}),e.jsx(pe,{tenantId:t}),e.jsx(b,{className:"my-6"}),e.jsx(je,{tenantId:t})]})}function kt({tenantId:t}){const{meta:n}=Fe(),a=!!n&&"prometheusServerEnabled"in n&&!!n.prometheusServerEnabled;return e.jsxs("div",{children:[e.jsx(fe,{title:"Prometheus Metrics",description:"Expose this tenant's metrics in Prometheus exposition format for external dashboards and alerting."}),e.jsx(b,{className:"my-4"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"To enable tenant-scoped Prometheus metrics on a self-hosted Hatchet server, configure the following environment variables on the API server:"}),e.jsx(R,{language:"text",code:`SERVER_PROMETHEUS_SERVER_URL= +SERVER_PROMETHEUS_SERVER_USERNAME= +SERVER_PROMETHEUS_SERVER_PASSWORD= +# Gate the endpoint per tenant on the prometheus_metrics entitlement +SERVER_PROMETHEUS_SERVER_TENANT_SCOPED=true`}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx("a",{href:yt,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"configuration options documentation"})," ","for details."]})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(b,{className:"my-6"}),e.jsx(pe,{tenantId:t}),e.jsx(b,{className:"my-6"}),e.jsx(je,{tenantId:t})]})]})}function At({organizationId:t}){return e.jsx(qe,{icon:e.jsx(Be,{className:"h-8 w-8 text-primary"}),title:"Unlock Prometheus metrics",description:"Prometheus metrics let you federate this tenant's metrics into your own dashboards and alerting. Upgrade your plan to enable this feature.",action:e.jsx(ae,{to:Z.organizationBillingRoute.to,params:{organization:t},className:"w-full",children:e.jsx(g,{className:"min-w-40 px-8 py-6 text-base",size:"lg",children:"View plans"})})})}function Vt(){const{cloud:t,featureFlags:n}=Ge(),a=Ue(),r=a==null?void 0:a.find(l=>l.name==="email"),i=a==null?void 0:a.find(l=>l.name==="slack"),s=t==null?void 0:t.canLinkGithub,o=(n==null?void 0:n["managed-worker"])==="true";return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(Ve,{title:"Integration settings",description:"Configure alerting, ingestors, and connected services available for this tenant."}),e.jsxs(He,{defaultValue:"alerting",children:[e.jsxs($e,{layout:"underlined",className:"mb-6",children:[e.jsx(_,{value:"alerting",variant:"underlined",children:"Alerting"}),e.jsx(_,{value:"ingestors",variant:"underlined",children:"Ingestors"}),e.jsx(_,{value:"metrics",variant:"underlined",children:"Metrics"}),s&&o&&e.jsx(_,{value:"github",variant:"underlined",children:"GitHub"})]}),e.jsxs(M,{value:"alerting",children:[e.jsx(Lt,{}),r&&e.jsx(b,{className:"my-6"}),r&&e.jsx(Rt,{}),i&&e.jsx(b,{className:"my-6"}),i&&e.jsx(_t,{})]}),e.jsx(M,{value:"ingestors",children:e.jsx(Dt,{})}),e.jsx(M,{value:"metrics",children:e.jsx(Nt,{})}),s&&e.jsx(M,{value:"github",children:e.jsx(Gt,{})})]})]})})}function U({title:t,description:n,action:a}){return e.jsxs("div",{className:"mb-4 flex flex-col gap-2 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:t}),e.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:n})]}),a]})}const Lt=()=>{const{tenantId:t}=v(),n=C({...I.alertingSettings.get(t)}),[a,r]=c.useState(!1),{handleApiError:i}=y({}),s=N({mutationKey:["tenant:update"],mutationFn:async o=>{await w.tenantUpdate(t,o)},onMutate:()=>{r(!0)},onSuccess:()=>{r(!1),n.refetch()},onError:i});return n.data?e.jsx(it,{alertingSettings:n.data,isLoading:a,onSubmit:o=>{s.mutate(o)},fieldErrors:{}}):e.jsx(S,{})};function Rt(){const{tenant:t}=F(),{tenantId:n}=v(),[a,r]=c.useState(!1),[i,s]=c.useState(null),[o,l]=c.useState((t==null?void 0:t.alertMemberEmails)||!1),{handleApiError:d}=y({}),u=N({mutationKey:["tenant:update"],mutationFn:async h=>{await w.tenantUpdate(n,h)},onError:d}),m=C({...I.emailGroups.list(n)}),x=c.useMemo(()=>{var f;const h=((f=m.data)==null?void 0:f.rows)||[];return[{emails:[],metadata:{id:"default",createdAt:"default",updatedAt:"default"}},...h]},[m.data]),j=c.useMemo(()=>[{columnLabel:"Emails",cellRenderer:h=>e.jsx(tt,{group:h})},{columnLabel:"Created",cellRenderer:h=>h.metadata.id!="default"?e.jsx(Y,{date:h.metadata.createdAt}):e.jsx("div",{})},{columnLabel:"",cellRenderer:h=>e.jsx(nt,{group:h,alertTenantEmailsSet:o})},{columnLabel:"",cellRenderer:h=>e.jsx(at,{group:h,alertTenantEmailsSet:o,onDeleteClick:f=>{s(f)},onToggleMembersClick:f=>{l(f),u.mutate({alertMemberEmails:f})}})}],[o,u]);return e.jsxs("div",{children:[e.jsx(U,{title:"Email Groups",description:"Create reusable email recipient groups for alert delivery, including a default group for tenant members.",action:e.jsx(g,{onClick:()=>{r(!0)},children:"Create new group"},"create-email-group")}),e.jsx(b,{className:"my-4"}),x.length>0?e.jsx(G,{columns:j,data:x,rowKey:h=>h.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No email groups found. Create a group to receive alerts via email."}),a&&e.jsx(It,{onSuccess:()=>{r(!1),m.refetch()},showGroupDialog:a,setShowGroupDialog:r}),i&&e.jsx(Tt,{emailGroup:i,setShowEmailGroupDelete:()=>s(null),onSuccess:()=>{s(null),m.refetch()}})]})}function It({showGroupDialog:t,setShowGroupDialog:n,onSuccess:a}){const{tenantId:r}=v(),[i,s]=c.useState({}),{handleApiError:o}=y({setFieldErrors:s}),l=N({mutationKey:["alert-email-group:create",r],mutationFn:async d=>(await w.alertEmailGroupCreate(r,d)).data,onSuccess:()=>{a()},onError:o});return e.jsx(T,{open:t,onOpenChange:n,children:e.jsx(Je,{isLoading:l.isPending,onSubmit:l.mutate,fieldErrors:i})})}function Tt({emailGroup:t,setShowEmailGroupDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["alert-email-group:delete",r,t],mutationFn:async()=>{await w.alertEmailGroupDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(T,{open:!!t,onOpenChange:n,children:e.jsx(Xe,{emailGroup:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function _t(){var o,l;const{tenantId:t}=v(),{isControlPlaneEnabled:n}=ne(),[a,r]=c.useState(null),i=C({...I.slackWebhooks.list(t)}),s=c.useMemo(()=>[{columnLabel:"Team",cellRenderer:d=>e.jsx("div",{children:d.teamName})},{columnLabel:"Channel",cellRenderer:d=>e.jsx("div",{children:d.channelName})},{columnLabel:"Created",cellRenderer:d=>e.jsx(Y,{date:d.metadata.createdAt})},{columnLabel:"Actions",cellRenderer:d=>e.jsx(st,{webhook:d,onDeleteClick:u=>{r(u)}})}],[]);return e.jsxs("div",{children:[e.jsx(U,{title:"Slack Webhooks",description:"Connect Slack channels so Hatchet can send tenant alerts directly into your team workflows.",action:e.jsx("a",{href:n?"/api/v1/control-plane/tenants/"+t+"/slack/start":"/api/v1/tenants/"+t+"/slack/start",children:e.jsx(g,{children:"Add Slack Webhook"},"add-slack-webhook")})}),e.jsx(b,{className:"my-4"}),(((o=i.data)==null?void 0:o.rows)||[]).length>0?e.jsx(G,{columns:s,data:((l=i.data)==null?void 0:l.rows)||[],rowKey:d=>d.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No Slack webhooks found. Add a webhook to receive alerts in Slack."}),a&&e.jsx(Mt,{slackWebhook:a,setShowSlackWebhookDelete:()=>r(null),onSuccess:()=>{r(null),i.refetch()}})]})}function Mt({slackWebhook:t,setShowSlackWebhookDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["slack-webhook:delete",r,t],mutationFn:async()=>{await w.slackWebhookDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(T,{open:!!t,onOpenChange:n,children:e.jsx(et,{slackWebhook:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function Dt(){var l,d;const{tenantId:t}=v(),[n,a]=c.useState(!1),[r,i]=c.useState(null),s=C({...I.snsIntegrations.list(t)}),o=c.useMemo(()=>[{columnLabel:"Topic ARN",cellRenderer:u=>e.jsx("div",{children:u.topicArn})},{columnLabel:"Ingest URL",cellRenderer:u=>e.jsx(vt,{ingestUrl:u.ingestUrl||""})},{columnLabel:"Created",cellRenderer:u=>e.jsx(Y,{date:u.metadata.createdAt})},{columnLabel:"Actions",cellRenderer:u=>e.jsx(wt,{integration:u,onDeleteClick:m=>{i(m)}})}],[]);return e.jsxs("div",{children:[e.jsx(U,{title:"SNS Integrations",description:"Create SNS ingestion endpoints to receive events from AWS services and forward them into this tenant.",action:e.jsx(g,{onClick:()=>a(!0),children:"Create SNS Endpoint"})}),e.jsx(b,{className:"my-4"}),(((l=s.data)==null?void 0:l.rows)||[]).length>0?e.jsx(G,{columns:o,data:((d=s.data)==null?void 0:d.rows)||[],rowKey:u=>u.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No SNS integrations found. Create an endpoint to receive events from AWS SNS."}),n&&e.jsx(Pt,{showSNSDialog:n,setShowSNSDialog:a,onSuccess:()=>{s.refetch()}}),r&&e.jsx(Ft,{snsIntegration:r,setShowSNSDelete:()=>i(null),onSuccess:()=>{i(null),s.refetch()}})]})}function Pt({showSNSDialog:t,setShowSNSDialog:n,onSuccess:a}){const{tenantId:r}=v(),[i,s]=c.useState(),[o,l]=c.useState({}),{handleApiError:d}=y({setFieldErrors:l}),u=N({mutationKey:["sns:create",r],mutationFn:async m=>(await w.snsCreate(r,m)).data,onSuccess:m=>{s(m.ingestUrl),a()},onError:d});return e.jsx(T,{open:t,onOpenChange:n,children:e.jsx(bt,{isLoading:u.isPending,onSubmit:u.mutate,snsIngestionUrl:i,fieldErrors:o})})}function Ft({snsIntegration:t,setShowSNSDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["sns:delete",r,t],mutationFn:async()=>{await w.snsDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(T,{open:!!t,onOpenChange:n,children:e.jsx(St,{snsIntegration:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function Gt(){var u,m;const{tenantId:t}=v(),{tenant:n}=F(),[a,r]=c.useState(),i=C({...I.github.listInstallations(t)}),{handleApiError:s}=y({}),o=N({mutationKey:["github-app:update:installation",t,a],mutationFn:async()=>(We(a),(await Oe.githubAppUpdateInstallation(a,{tenant:t})).data),onSuccess:()=>{r(void 0),i.refetch()},onError:s}),l=c.useMemo(()=>[{columnLabel:"Account name",cellRenderer:x=>e.jsx(gt,{installation:x})},{columnLabel:"Link to tenant?",cellRenderer:x=>e.jsx(ft,{installation:x,onLinkToTenant:j=>{r(j)}})},{columnLabel:"GitHub Settings",cellRenderer:x=>e.jsx(pt,{installation:x})}],[]),d=window.location.pathname;return e.jsxs("div",{children:[e.jsx(U,{title:"GitHub Accounts",description:"Link GitHub accounts and installations that this tenant can use for connected repository workflows.",action:e.jsx("a",{href:`/api/v1/cloud/users/github-app/start?redirect_to=${encodeURIComponent(d)}&with_repo_installation=false`,children:e.jsx(g,{children:"Link new account"})})}),e.jsx(b,{className:"my-4"}),(((u=i.data)==null?void 0:u.rows)||[]).length>0?e.jsx(G,{columns:l,data:((m=i.data)==null?void 0:m.rows)||[],rowKey:x=>x.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No GitHub accounts linked. Link an account to integrate with CI/CD."}),e.jsx(Ke,{title:"Are you sure?",description:`Linking this app to ${n==null?void 0:n.name} will allow other members of the tenant to view this installation. Users will only be able to deploy to repositories that they have access to.`,submitLabel:"Yes, link to tenant",submitVariant:"default",onSubmit:o.mutate,onCancel:()=>r(void 0),isLoading:o.isPending,isOpen:a!==void 0})]})}export{Vt as default}; diff --git a/hatchetembed/dashboard/assets/index-pi5SpzWM.js b/hatchetembed/dashboard/assets/index-pi5SpzWM.js new file mode 100644 index 0000000000..3ca0fbfd21 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-pi5SpzWM.js @@ -0,0 +1 @@ +import{h as u,n as f,E as g,p as m,q as r,b as d,j as t,B as p,H as h,O as x}from"./index-wypz6hY5.js";import{N as b}from"./new-tenant-saver-form-CeUxqioj.js";import{u as v}from"./redirect-DImNvkP_.js";import{A as y}from"./auth-layout-iBwbZOUC.js";import"./welcome-modal-state-B1mOgpQO.js";import"./support-chat-CGvrRU-a.js";import"./shard-deployment-key-CJfQX3l3.js";import"./XMarkIcon-BazlLPpF.js";import"./use-analytics-BZxgE2Kk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="536ae054-d21f-4793-a003-c9cb8b379e87",e._sentryDebugIdIdentifier="sentry-dbid-536ae054-d21f-4793-a003-c9cb8b379e87")}catch{}})();function R(){const e=v(),a=u(),{userUpdateLogoutMutation:s}=f(),{organizations:o}=g({from:"/onboarding/create-tenant"}),i=m({...s(),onSettled:()=>{r.clear(),a({to:d.authLoginRoute.to})}}),l=o&&o.length>0?o[0].metadata.id:void 0;return t.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[t.jsx("div",{className:"absolute top-4 right-4 z-10",children:t.jsx(p,{variant:"ghost",size:"sm",onClick:()=>i.mutate(),disabled:i.isPending,children:"Sign out"})}),t.jsxs(y,{children:[t.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[t.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:t.jsx(h,{className:"h-8 w-auto"})}),t.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Create a new tenant"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"A tenant is an isolated environment for your workflows. Set one up to get started."})]}),t.jsx(b,{defaultOrganizationId:l,afterSave:n=>{const c=n.type==="cloud"?n.tenant.id:n.tenant.metadata.id;n.type==="cloud"&&r.prefetchQuery(x.controlPlane.subscriptionPlans()).catch(()=>{}),e({to:d.tenantOverviewRoute.to,params:{tenant:c},replace:!0})}})]})]})}export{R as default}; diff --git a/hatchetembed/dashboard/assets/index-wypz6hY5.js b/hatchetembed/dashboard/assets/index-wypz6hY5.js new file mode 100644 index 0000000000..d6bec7f143 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-wypz6hY5.js @@ -0,0 +1,466 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-maO15O3V.js","assets/auth-page-CDHDcFHW.js","assets/auth-layout-iBwbZOUC.js","assets/index-B8ZIkEyz.js","assets/index-Cbzx2tRp.js","assets/top-nav-CUkIIMqx.js","assets/organization-selector-BF1UJlxh.js","assets/global-emitter-Y_aFw8Zc.js","assets/shard-deployment-key-CJfQX3l3.js","assets/PlusIcon-Cn-pCVk3.js","assets/use-pending-invites-DaP3hNjC.js","assets/resource-limit-status-ynncxZIe.js","assets/index-C8__5p50.js","assets/use-analytics-BZxgE2Kk.js","assets/index--gDRExcs.js","assets/new-organization-saver-form-Uz97g08A.js","assets/welcome-modal-state-B1mOgpQO.js","assets/support-chat-CGvrRU-a.js","assets/ExclamationTriangleIcon-CruVDzqB.js","assets/index-DoDygpS4.js","assets/index-zTXL414p.js","assets/outlet-C0gyZt4v.js","assets/index-6bdxZZIJ.js","assets/index-CKuymrZy.js","assets/settings-page-header-Dal4BvfD.js","assets/accordion-CBy735bO.js","assets/switch-C23Bp5tT.js","assets/data-contracts-BsCw40yT.js","assets/tenant-wrapper-DXQKBTdd.js","assets/confirm-dialog-CMXood8J.js","assets/upgrade-required-BNScyCLS.js","assets/shield-check-lCThuR8D.js","assets/XMarkIcon-BazlLPpF.js","assets/KeyIcon-DY8qn5rN.js","assets/billing-Cllt8jqB.js","assets/tenant-resource-limits-table-xMx7u5rD.js","assets/resource-limit-columns-7zhUq4Ly.js","assets/index-CFQLfotn.js","assets/index-DXK1Y_MW.js","assets/authenticated-Dx4rOWYX.js","assets/new-tenant-saver-form-CeUxqioj.js","assets/invite-modal-DH7a-93Y.js","assets/redirect-DImNvkP_.js","assets/index-pi5SpzWM.js","assets/index-Bk1maSCV.js","assets/index-Cav1D8tQ.js","assets/index-CQOYucXO.js","assets/index-BsmMkLz7.js","assets/index-BjeCcGOX.js","assets/index-jG0QnzWT.js","assets/index-D3mkQrYj.js","assets/resource-not-found-C1NYDT14.js","assets/index-BnRg_ecZ.js","assets/secret-copier-BNLi8BbD.js","assets/index-CgbK7Qzb.js","assets/index-Fd0xVSp_.css","assets/index-CxZ5d6ga.js","assets/ServerStackIcon-nXfmiORr.js","assets/index-DK4vQ8G3.js","assets/billing-required-TKoe60qy.js","assets/managed-compute-cM-46wXY.js","assets/managed-workers-gate-DSQbhr0o.js","assets/github-button-Bg3zFNFs.js","assets/ArrowPathIcon-7-QIcdZ1.js","assets/index-O5nwRdcL.js","assets/steps-2xcvKVXE.js","assets/index-Szwct97L.js","assets/create-worker-form-CwO9Ppzx.js","assets/index-BhNMQvJK.js","assets/index-CqFaS3ri.js","assets/index-CZayBdOE.js","assets/index-oGawEXJa.js","assets/index-liT-riRX.js"])))=>i.map(i=>d[i]); +var bfe=Object.defineProperty;var H8=e=>{throw TypeError(e)};var Sfe=(e,t,n)=>t in e?bfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var re=(e,t,n)=>Sfe(e,typeof t!="symbol"?t+"":t,n),hT=(e,t,n)=>t.has(e)||H8("Cannot "+n);var le=(e,t,n)=>(hT(e,t,"read from private field"),n?n.call(e):t.get(e)),yt=(e,t,n)=>t.has(e)?H8("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),nt=(e,t,n,r)=>(hT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Xt=(e,t,n)=>(hT(e,t,"access private method"),n);var ZS=(e,t,n,r)=>({set _(o){nt(e,t,o,n)},get _(){return le(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="209f45f1-405e-42a1-88a2-96103e2caf57",e._sentryDebugIdIdentifier="sentry-dbid-209f45f1-405e-42a1-88a2-96103e2caf57")}catch{}})();function _fe(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Efe=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Efe.SENTRY_RELEASE={id:"e84bee178c248ca2d5bbc130b1c8e22c3618322f"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ln(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Cfe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var pT={exports:{}},g1={},mT={exports:{}},Pn={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var G8;function Ofe(){if(G8)return Pn;G8=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator;function h(z){return z===null||typeof z!="object"?null:(z=d&&z[d]||z["@@iterator"],typeof z=="function"?z:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function w(z,X,ee){this.props=z,this.context=X,this.refs=y,this.updater=ee||p}w.prototype.isReactComponent={},w.prototype.setState=function(z,X){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,X,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function _(){}_.prototype=w.prototype;function C(z,X,ee){this.props=z,this.context=X,this.refs=y,this.updater=ee||p}var O=C.prototype=new _;O.constructor=C,x(O,w.prototype),O.isPureReactComponent=!0;var P=Array.isArray,R=Object.prototype.hasOwnProperty,T={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function M(z,X,ee){var ae,fe={},ie=null,ge=null;if(X!=null)for(ae in X.ref!==void 0&&(ge=X.ref),X.key!==void 0&&(ie=""+X.key),X)R.call(X,ae)&&!k.hasOwnProperty(ae)&&(fe[ae]=X[ae]);var he=arguments.length-2;if(he===1)fe.children=ee;else if(1Tfe||!Afe.test(t)?null:t}const Nfe=6e4,Mfe=1e3,jfe=1e4,Yj="exchange-token";function Ife(e){return[Yj,e]}function ZG(e,t){return{queryKey:Ife(e),queryFn:()=>t(),staleTime:n=>{const r=n.state.data;if(!r)return 0;const o=new Date(r.expiresAt).getTime();return Math.max(0,o-Date.now()-Nfe)},gcTime:3600*1e3,retry:5,retryDelay:n=>Math.min(Mfe*2**n,jfe)}}function JG(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dfe}=Object.prototype,{getPrototypeOf:CO}=Object,{iterator:OO,toStringTag:eK}=Symbol,RO=(e=>t=>{const n=Dfe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ql=e=>(e=e.toLowerCase(),t=>RO(t)===e),PO=e=>t=>typeof t===e,{isArray:My}=Array,Wv=PO("undefined");function qx(e){return e!==null&&!Wv(e)&&e.constructor!==null&&!Wv(e.constructor)&&Ra(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tK=ql("ArrayBuffer");function Lfe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tK(e.buffer),t}const $fe=PO("string"),Ra=PO("function"),nK=PO("number"),Ux=e=>e!==null&&typeof e=="object",Ffe=e=>e===!0||e===!1,Y_=e=>{if(RO(e)!=="object")return!1;const t=CO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(eK in e)&&!(OO in e)},Bfe=e=>{if(!Ux(e)||qx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},zfe=ql("Date"),qfe=ql("File"),Ufe=e=>!!(e&&typeof e.uri<"u"),Vfe=e=>e&&typeof e.getParts<"u",Wfe=ql("Blob"),Hfe=ql("FileList"),Gfe=e=>Ux(e)&&Ra(e.pipe);function Kfe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Q8=Kfe(),Z8=typeof Q8.FormData<"u"?Q8.FormData:void 0,Yfe=e=>{if(!e)return!1;if(Z8&&e instanceof Z8)return!0;const t=CO(e);if(!t||t===Object.prototype||!Ra(e.append))return!1;const n=RO(e);return n==="formdata"||n==="object"&&Ra(e.toString)&&e.toString()==="[object FormData]"},Xfe=ql("URLSearchParams"),[Qfe,Zfe,Jfe,ede]=["ReadableStream","Request","Response","Headers"].map(ql),tde=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vx(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),My(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const wp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oK=e=>!Wv(e)&&e!==wp;function Xj(...e){const{caseless:t,skipUndefined:n}=oK(this)&&this||{},r={},o=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&rK(r,a)||a,l=Qj(r,s)?r[s]:void 0;Y_(l)&&Y_(i)?r[s]=Xj(l,i):Y_(i)?r[s]=Xj({},i):My(i)?r[s]=i.slice():(!n||!Wv(i))&&(r[s]=i)};for(let i=0,a=e.length;i(Vx(t,(o,i)=>{n&&Ra(o)?Object.defineProperty(e,i,{__proto__:null,value:JG(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),rde=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ode=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},ide=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&CO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ade=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},sde=e=>{if(!e)return null;if(My(e))return e;let t=e.length;if(!nK(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},lde=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&CO(Uint8Array)),ude=(e,t)=>{const r=(e&&e[OO]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},cde=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},fde=ql("HTMLFormElement"),dde=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Qj=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hde=ql("RegExp"),iK=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vx(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},pde=e=>{iK(e,(t,n)=>{if(Ra(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ra(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},mde=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return My(e)?r(e):r(String(e).split(t)),n},gde=()=>{},vde=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yde(e){return!!(e&&Ra(e.append)&&e[eK]==="FormData"&&e[OO])}const wde=e=>{const t=new Array(10),n=(r,o)=>{if(Ux(r)){if(t.indexOf(r)>=0)return;if(qx(r))return r;if(!("toJSON"in r)){t[o]=r;const i=My(r)?[]:{};return Vx(r,(a,s)=>{const l=n(a,o+1);!Wv(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},xde=ql("AsyncFunction"),bde=e=>e&&(Ux(e)||Ra(e))&&Ra(e.then)&&Ra(e.catch),aK=((e,t)=>e?setImmediate:t?((n,r)=>(wp.addEventListener("message",({source:o,data:i})=>{o===wp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),wp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ra(wp.postMessage)),Sde=typeof queueMicrotask<"u"?queueMicrotask.bind(wp):typeof process<"u"&&process.nextTick||aK,_de=e=>e!=null&&Ra(e[OO]),Re={isArray:My,isArrayBuffer:tK,isBuffer:qx,isFormData:Yfe,isArrayBufferView:Lfe,isString:$fe,isNumber:nK,isBoolean:Ffe,isObject:Ux,isPlainObject:Y_,isEmptyObject:Bfe,isReadableStream:Qfe,isRequest:Zfe,isResponse:Jfe,isHeaders:ede,isUndefined:Wv,isDate:zfe,isFile:qfe,isReactNativeBlob:Ufe,isReactNative:Vfe,isBlob:Wfe,isRegExp:hde,isFunction:Ra,isStream:Gfe,isURLSearchParams:Xfe,isTypedArray:lde,isFileList:Hfe,forEach:Vx,merge:Xj,extend:nde,trim:tde,stripBOM:rde,inherits:ode,toFlatObject:ide,kindOf:RO,kindOfTest:ql,endsWith:ade,toArray:sde,forEachEntry:ude,matchAll:cde,isHTMLForm:fde,hasOwnProperty:Qj,hasOwnProp:Qj,reduceDescriptors:iK,freezeMethods:pde,toObjectSet:mde,toCamelCase:dde,noop:gde,toFiniteNumber:vde,findKey:rK,global:wp,isContextDefined:oK,isSpecCompliantForm:yde,toJSONObject:wde,isAsyncFn:xde,isThenable:bde,setImmediate:aK,asap:Sde,isIterable:_de},Ede=Re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Cde=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Ede[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},J8=Symbol("internals"),Ode=/[^\x09\x20-\x7E\x80-\xFF]/g;function Rde(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function v1(e){return e&&String(e).trim().toLowerCase()}function Pde(e){return Rde(e.replace(Ode,""))}function X_(e){return e===!1||e==null?e:Re.isArray(e)?e.map(X_):Pde(String(e))}function Tde(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ade=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gT(e,t,n,r,o){if(Re.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Re.isString(t)){if(Re.isString(r))return t.indexOf(r)!==-1;if(Re.isRegExp(r))return r.test(t)}}function kde(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nde(e,t){const n=Re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}let Zi=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,u){const c=v1(l);if(!c)throw new Error("header name must be a non-empty string");const d=Re.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=X_(s))}const a=(s,l)=>Re.forEach(s,(u,c)=>i(u,c,l));if(Re.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Re.isString(t)&&(t=t.trim())&&!Ade(t))a(Cde(t),n);else if(Re.isObject(t)&&Re.isIterable(t)){let s={},l,u;for(const c of t){if(!Re.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?Re.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}a(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=v1(t),t){const r=Re.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Tde(o);if(Re.isFunction(n))return n.call(this,o,r);if(Re.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=v1(t),t){const r=Re.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||gT(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=v1(a),a){const s=Re.findKey(r,a);s&&(!n||gT(r,r[s],s,n))&&(delete r[s],o=!0)}}return Re.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||gT(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Re.forEach(this,(o,i)=>{const a=Re.findKey(r,i);if(a){n[a]=X_(o),delete n[i];return}const s=t?kde(i):String(i).trim();s!==i&&delete n[i],n[s]=X_(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Re.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[J8]=this[J8]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=v1(a);r[s]||(Nde(o,a),r[s]=!0)}return Re.isArray(t)?t.forEach(i):i(t),this}};Zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Re.reduceDescriptors(Zi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Re.freezeMethods(Zi);const Mde="[REDACTED ****]";function jde(e){if(Re.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Re.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Ide(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],o=i=>{if(i===null||typeof i!="object"||Re.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof Zi&&(i=i.toJSON()),r.push(i);let a;if(Re.isArray(i))a=[],i.forEach((s,l)=>{const u=o(s);Re.isUndefined(u)||(a[l]=u)});else{if(!Re.isPlainObject(i)&&jde(i))return r.pop(),i;a=Object.create(null);for(const[s,l]of Object.entries(i)){const u=n.has(s.toLowerCase())?Mde:o(l);Re.isUndefined(u)||(a[s]=u)}}return r.pop(),a};return o(e)}let Pt=class sK extends Error{static from(t,n,r,o,i,a){const s=new sK(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(t,n,r,o,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&Re.hasOwnProp(t,"redact")?t.redact:void 0,r=Re.isArray(n)&&n.length>0?Ide(t,n):Re.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Pt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Pt.ERR_BAD_OPTION="ERR_BAD_OPTION";Pt.ECONNABORTED="ECONNABORTED";Pt.ETIMEDOUT="ETIMEDOUT";Pt.ECONNREFUSED="ECONNREFUSED";Pt.ERR_NETWORK="ERR_NETWORK";Pt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Pt.ERR_DEPRECATED="ERR_DEPRECATED";Pt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Pt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Pt.ERR_CANCELED="ERR_CANCELED";Pt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Pt.ERR_INVALID_URL="ERR_INVALID_URL";Pt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Dde=null;function Zj(e){return Re.isPlainObject(e)||Re.isArray(e)}function lK(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function vT(e,t,n){return e?e.concat(t).map(function(o,i){return o=lK(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Lde(e){return Re.isArray(e)&&!e.some(Zj)}const $de=Re.toFlatObject(Re,{},null,function(t){return/^is[A-Z]/.test(t)});function TO(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,_){return!Re.isUndefined(_[w])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,u=s&&Re.isSpecCompliantForm(t);if(!Re.isFunction(o))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(Re.isDate(y))return y.toISOString();if(Re.isBoolean(y))return y.toString();if(!u&&Re.isBlob(y))throw new Pt("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(y)||Re.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,w,_){let C=y;if(Re.isReactNative(t)&&Re.isReactNativeBlob(y))return t.append(vT(_,w,i),c(y)),!1;if(y&&!_&&typeof y=="object"){if(Re.endsWith(w,"{}"))w=r?w:w.slice(0,-2),y=JSON.stringify(y);else if(Re.isArray(y)&&Lde(y)||(Re.isFileList(y)||Re.endsWith(w,"[]"))&&(C=Re.toArray(y)))return w=lK(w),C.forEach(function(P,R){!(Re.isUndefined(P)||P===null)&&t.append(a===!0?vT([w],R,i):a===null?w:w+"[]",c(P))}),!1}return Zj(y)?!0:(t.append(vT(_,w,i),c(y)),!1)}const h=[],p=Object.assign($de,{defaultVisitor:d,convertValue:c,isVisitable:Zj});function x(y,w,_=0){if(!Re.isUndefined(y)){if(_>l)throw new Pt("Object is too deeply nested ("+_+" levels). Max depth: "+l,Pt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(y)!==-1)throw Error("Circular reference detected in "+w.join("."));h.push(y),Re.forEach(y,function(O,P){(!(Re.isUndefined(O)||O===null)&&o.call(t,O,Re.isString(P)?P.trim():P,w,p))===!0&&x(O,w?w.concat(P):[P],_+1)}),h.pop()}}if(!Re.isObject(e))throw new TypeError("data must be an object");return x(e),t}function e6(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function C3(e,t){this._pairs=[],e&&TO(e,this,t)}const uK=C3.prototype;uK.append=function(t,n){this._pairs.push([t,n])};uK.toString=function(t){const n=t?function(r){return t.call(this,r,e6)}:e6;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Fde(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cK(e,t,n){if(!t)return e;const r=n&&n.encode||Fde,o=Re.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(i?a=i(t,o):a=Re.isURLSearchParams(t)?t.toString():new C3(t,o).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class t6{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const O3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Bde=typeof URLSearchParams<"u"?URLSearchParams:C3,zde=typeof FormData<"u"?FormData:null,qde=typeof Blob<"u"?Blob:null,Ude={isBrowser:!0,classes:{URLSearchParams:Bde,FormData:zde,Blob:qde},protocols:["http","https","file","blob","url","data"]},R3=typeof window<"u"&&typeof document<"u",Jj=typeof navigator=="object"&&navigator||void 0,Vde=R3&&(!Jj||["ReactNative","NativeScript","NS"].indexOf(Jj.product)<0),Wde=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hde=R3&&window.location.href||"http://localhost",Gde=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:R3,hasStandardBrowserEnv:Vde,hasStandardBrowserWebWorkerEnv:Wde,navigator:Jj,origin:Hde},Symbol.toStringTag,{value:"Module"})),Ri={...Gde,...Ude};function Kde(e,t){return TO(e,new Ri.classes.URLSearchParams,{visitor:function(n,r,o,i){return Ri.isNode&&Re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Yde(e){return Re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xde(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Re.isArray(o)?o.length:a,l?(Re.hasOwnProp(o,a)?o[a]=Re.isArray(o[a])?o[a].concat(r):[o[a],r]:o[a]=r,!s):((!o[a]||!Re.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Re.isArray(o[a])&&(o[a]=Xde(o[a])),!s)}if(Re.isFormData(e)&&Re.isFunction(e.entries)){const n={};return Re.forEachEntry(e,(r,o)=>{t(Yde(r),o,n,0)}),n}return null}const qg=(e,t)=>e!=null&&Re.hasOwnProp(e,t)?e[t]:void 0;function Qde(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wx={transitional:O3,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Re.isObject(t);if(i&&Re.isHTMLForm(t)&&(t=new FormData(t)),Re.isFormData(t))return o?JSON.stringify(fK(t)):t;if(Re.isArrayBuffer(t)||Re.isBuffer(t)||Re.isStream(t)||Re.isFile(t)||Re.isBlob(t)||Re.isReadableStream(t))return t;if(Re.isArrayBufferView(t))return t.buffer;if(Re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){const l=qg(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kde(t,l).toString();if((s=Re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=qg(this,"env"),c=u&&u.FormData;return TO(s?{"files[]":t}:t,c&&new c,l)}}return i||o?(n.setContentType("application/json",!1),Qde(t)):t}],transformResponse:[function(t){const n=qg(this,"transitional")||Wx.transitional,r=n&&n.forcedJSONParsing,o=qg(this,"responseType"),i=o==="json";if(Re.isResponse(t)||Re.isReadableStream(t))return t;if(t&&Re.isString(t)&&(r&&!o||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,qg(this,"parseReviver"))}catch(l){if(s)throw l.name==="SyntaxError"?Pt.from(l,Pt.ERR_BAD_RESPONSE,this,null,qg(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ri.classes.FormData,Blob:Ri.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Re.forEach(["delete","get","head","post","put","patch","query"],e=>{Wx.headers[e]={}});function yT(e,t){const n=this||Wx,r=t||n,o=Zi.from(r.headers);let i=r.data;return Re.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function dK(e){return!!(e&&e.__CANCEL__)}let Hx=class extends Pt{constructor(t,n,r){super(t??"canceled",Pt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function hK(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Pt("Request failed with status code "+n.status,n.status>=400&&n.status<500?Pt.ERR_BAD_REQUEST:Pt.ERR_BAD_RESPONSE,n.config,n.request,n))}function Zde(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Jde(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];a||(a=u),n[o]=l,r[o]=u;let d=i,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a{n=c,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(o=u,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const gE=(e,t,n=3)=>{let r=0;const o=Jde(50,250);return ehe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=s!=null?Math.min(a,s):a,u=Math.max(0,l-r),c=o(u);r=Math.max(r,l);const d={loaded:l,total:s,progress:s?l/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s?(s-l)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},n6=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},r6=e=>(...t)=>Re.asap(()=>e(...t)),the=Ri.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ri.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ri.origin),Ri.navigator&&/(msie|trident)/i.test(Ri.navigator.userAgent)):()=>!0,nhe=Ri.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];Re.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Re.isString(r)&&s.push(`path=${r}`),Re.isString(o)&&s.push(`domain=${o}`),i===!0&&s.push("secure"),Re.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Zi?{...e}:e;function Hp(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,c,d,h){return Re.isPlainObject(u)&&Re.isPlainObject(c)?Re.merge.call({caseless:h},u,c):Re.isPlainObject(c)?Re.merge({},c):Re.isArray(c)?c.slice():c}function o(u,c,d,h){if(Re.isUndefined(c)){if(!Re.isUndefined(u))return r(void 0,u,d,h)}else return r(u,c,d,h)}function i(u,c){if(!Re.isUndefined(c))return r(void 0,c)}function a(u,c){if(Re.isUndefined(c)){if(!Re.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(Re.hasOwnProp(t,d))return r(u,c);if(Re.hasOwnProp(e,d))return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>o(o6(u),o6(c),d,!0)};return Re.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=Re.hasOwnProp(l,c)?l[c]:o,h=Re.hasOwnProp(e,c)?e[c]:void 0,p=Re.hasOwnProp(t,c)?t[c]:void 0,x=d(h,p,c);Re.isUndefined(x)&&d!==s||(n[c]=x)}),n}const ihe=["content-type","content-length"];function ahe(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{ihe.includes(r.toLowerCase())&&e.set(r,o)})}const she=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),mK=e=>{const t=Hp({},e),n=h=>Re.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(t.headers=s=Zi.from(s),t.url=cK(pK(u,d,c),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?she(l.password):""))),Re.isFormData(r)&&(Ri.hasStandardBrowserEnv||Ri.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):Re.isFunction(r.getHeaders)&&ahe(s,r.getHeaders(),n("formDataHeaderPolicy"))),Ri.hasStandardBrowserEnv&&(Re.isFunction(o)&&(o=o(t)),o===!0||o==null&&the(t.url))){const p=i&&a&&nhe.read(a);p&&s.set(i,p)}return t},lhe=typeof XMLHttpRequest<"u",uhe=lhe&&function(e){return new Promise(function(n,r){const o=mK(e);let i=o.data;const a=Zi.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=o,c,d,h,p,x;function y(){p&&p(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function _(){if(!w)return;const O=Zi.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),R={data:!s||s==="text"||s==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:O,config:e,request:w};hK(function(k){n(k),y()},function(k){r(k),y()},R),w=null}"onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(_)},w.onabort=function(){w&&(r(new Pt("Request aborted",Pt.ECONNABORTED,e,w)),y(),w=null)},w.onerror=function(P){const R=P&&P.message?P.message:"Network Error",T=new Pt(R,Pt.ERR_NETWORK,e,w);T.event=P||null,r(T),y(),w=null},w.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||O3;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new Pt(P,R.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,e,w)),y(),w=null},i===void 0&&a.setContentType(null),"setRequestHeader"in w&&Re.forEach(a.toJSON(),function(P,R){w.setRequestHeader(R,P)}),Re.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),s&&s!=="json"&&(w.responseType=o.responseType),u&&([h,x]=gE(u,!0),w.addEventListener("progress",h)),l&&w.upload&&([d,p]=gE(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=O=>{w&&(r(!O||O.type?new Hx(null,e,w):O),w.abort(),y(),w=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const C=Zde(o.url);if(C&&!Ri.protocols.includes(C)){r(new Pt("Unsupported protocol "+C+":",Pt.ERR_BAD_REQUEST,e));return}w.send(i||null)})},che=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Pt?c:new Hx(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new Pt(`timeout of ${t}ms exceeded`,Pt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Re.asap(s),l}},fhe=function*(e,t){let n=e.byteLength;if(n{const o=dhe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),o.return()}},{highWaterMark:2})};function phe(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let a=r.length;const s=r.length;for(let p=0;p=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(a-=2,p+=2)}let l=0,u=s-1;const c=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);u>=0&&(r.charCodeAt(u)===61?(l++,u--):c(u)&&(l++,u-=3)),l===1&&u>=0&&(r.charCodeAt(u)===61||c(u))&&l++;const h=Math.floor(a/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let a=0,s=r.length;a=55296&&l<=56319&&a+1=56320&&u<=57343?(i+=4,a++):i+=3}else i+=3}return i}const P3="1.16.0",a6=64*1024,{isFunction:JS}=Re,s6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mhe=e=>{const t=Re.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Re.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?JS(o):typeof fetch=="function",l=JS(i),u=JS(a);if(!s)return!1;const c=s&&JS(n),d=s&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):async _=>new Uint8Array(await new i(_).arrayBuffer())),h=l&&c&&s6(()=>{let _=!1;const C=new i(Ri.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),O=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),_&&!O}),p=u&&c&&s6(()=>Re.isReadableStream(new a("").body)),x={stream:p&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!x[_]&&(x[_]=(C,O)=>{let P=C&&C[_];if(P)return P.call(C);throw new Pt(`Response type '${_}' is not supported`,Pt.ERR_NOT_SUPPORT,O)})});const y=async _=>{if(_==null)return 0;if(Re.isBlob(_))return _.size;if(Re.isSpecCompliantForm(_))return(await new i(Ri.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Re.isArrayBufferView(_)||Re.isArrayBuffer(_))return _.byteLength;if(Re.isURLSearchParams(_)&&(_=_+""),Re.isString(_))return(await d(_)).byteLength},w=async(_,C)=>{const O=Re.toFiniteNumber(_.getContentLength());return O??y(C)};return async _=>{let{url:C,method:O,data:P,signal:R,cancelToken:T,timeout:k,onDownloadProgress:M,onUploadProgress:j,responseType:$,headers:L,withCredentials:V="same-origin",fetchOptions:G,maxContentLength:D,maxBodyLength:H}=mK(_);const U=Re.isNumber(D)&&D>-1,Y=Re.isNumber(H)&&H>-1;let q=o||fetch;$=$?($+"").toLowerCase():"text";let W=che([R,T&&T.toAbortSignal()],k),K=null;const z=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let X;try{if(U&&typeof C=="string"&&C.startsWith("data:")&&phe(C)>D)throw new Pt("maxContentLength size of "+D+" exceeded",Pt.ERR_BAD_RESPONSE,_,K);if(Y&&O!=="get"&&O!=="head"){const he=await w(L,P);if(typeof he=="number"&&isFinite(he)&&he>H)throw new Pt("Request body larger than maxBodyLength limit",Pt.ERR_BAD_REQUEST,_,K)}if(j&&h&&O!=="get"&&O!=="head"&&(X=await w(L,P))!==0){let he=new i(C,{method:"POST",body:P,duplex:"half"}),ue;if(Re.isFormData(P)&&(ue=he.headers.get("content-type"))&&L.setContentType(ue),he.body){const[we,Ae]=n6(X,gE(r6(j)));P=i6(he.body,a6,we,Ae)}}Re.isString(V)||(V=V?"include":"omit");const ee=l&&"credentials"in i.prototype;if(Re.isFormData(P)){const he=L.getContentType();he&&/^multipart\/form-data/i.test(he)&&!/boundary=/i.test(he)&&L.delete("content-type")}L.set("User-Agent","axios/"+P3,!1);const ae={...G,signal:W,method:O.toUpperCase(),headers:L.normalize().toJSON(),body:P,duplex:"half",credentials:ee?V:void 0};K=l&&new i(C,ae);let fe=await(l?q(K,G):q(C,ae));if(U){const he=Re.toFiniteNumber(fe.headers.get("content-length"));if(he!=null&&he>D)throw new Pt("maxContentLength size of "+D+" exceeded",Pt.ERR_BAD_RESPONSE,_,K)}const ie=p&&($==="stream"||$==="response");if(p&&fe.body&&(M||U||ie&&z)){const he={};["status","statusText","headers"].forEach(We=>{he[We]=fe[We]});const ue=Re.toFiniteNumber(fe.headers.get("content-length")),[we,Ae]=M&&n6(ue,gE(r6(M),!0))||[];let ye=0;const Xe=We=>{if(U&&(ye=We,ye>D))throw new Pt("maxContentLength size of "+D+" exceeded",Pt.ERR_BAD_RESPONSE,_,K);we&&we(We)};fe=new a(i6(fe.body,a6,Xe,()=>{Ae&&Ae(),z&&z()}),he)}$=$||"text";let ge=await x[Re.findKey(x,$)||"text"](fe,_);if(U&&!p&&!ie){let he;if(ge!=null&&(typeof ge.byteLength=="number"?he=ge.byteLength:typeof ge.size=="number"?he=ge.size:typeof ge=="string"&&(he=typeof r=="function"?new r().encode(ge).byteLength:ge.length)),typeof he=="number"&&he>D)throw new Pt("maxContentLength size of "+D+" exceeded",Pt.ERR_BAD_RESPONSE,_,K)}return!ie&&z&&z(),await new Promise((he,ue)=>{hK(he,ue,{data:ge,headers:Zi.from(fe.headers),status:fe.status,statusText:fe.statusText,config:_,request:K})})}catch(ee){if(z&&z(),W&&W.aborted&&W.reason instanceof Pt){const ae=W.reason;throw ae.config=_,K&&(ae.request=K),ee!==ae&&(ae.cause=ee),ae}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,_,K,ee&&ee.response),{cause:ee.cause||ee}):Pt.from(ee,ee&&ee.code,_,K,ee&&ee.response)}}},ghe=new Map,gK=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a=i.length,s=a,l,u,c=ghe;for(;s--;)l=i[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:mhe(t)),c=u;return u};gK();const T3={http:Dde,xhr:uhe,fetch:{get:gK}};Re.forEach(T3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const l6=e=>`- ${e}`,vhe=e=>Re.isFunction(e)||e===null||e===!1;function yhe(e,t){e=Re.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since : +`+a.map(l6).join(` +`):" "+l6(a[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o}const vK={getAdapter:yhe,adapters:T3};function wT(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hx(null,e)}function u6(e){return wT(e),e.headers=Zi.from(e.headers),e.data=yT.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vK.getAdapter(e.adapter||Wx.adapter,e)(e).then(function(r){wT(e),e.response=r;try{r.data=yT.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Zi.from(r.headers),r},function(r){if(!dK(r)&&(wT(e),r&&r.response)){e.response=r.response;try{r.response.data=yT.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Zi.from(r.response.headers)}return Promise.reject(r)})}const AO={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{AO[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const c6={};AO.transitional=function(t,n,r){function o(i,a){return"[Axios v"+P3+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Pt(o(a," has been removed"+(n?" in "+n:"")),Pt.ERR_DEPRECATED);return n&&!c6[a]&&(c6[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};AO.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function whe(e,t,n){if(typeof e!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Pt("option "+i+" must be "+l,Pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pt("Unknown option "+i,Pt.ERR_BAD_OPTION)}}const Q_={assertOptions:whe,validators:AO},Es=Q_.validators;let $p=class{constructor(t){this.defaults=t||{},this.interceptors={request:new t6,response:new t6}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(` +`);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=i;else if(i){const a=i.indexOf(` +`),s=a===-1?-1:i.indexOf(` +`,a+1),l=s===-1?"":i.slice(s+1);String(r.stack).endsWith(l)||(r.stack+=` +`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hp(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Q_.assertOptions(r,{silentJSONParsing:Es.transitional(Es.boolean),forcedJSONParsing:Es.transitional(Es.boolean),clarifyTimeoutError:Es.transitional(Es.boolean),legacyInterceptorReqResOrdering:Es.transitional(Es.boolean)},!1),o!=null&&(Re.isFunction(o)?n.paramsSerializer={serialize:o}:Q_.assertOptions(o,{encode:Es.function,serialize:Es.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Q_.assertOptions(n,{baseUrl:Es.spelling("baseURL"),withXsrfToken:Es.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Re.merge(i.common,i[n.method]);i&&Re.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete i[x]}),n.headers=Zi.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;l=l&&y.synchronous;const w=n.transitional||O3;w&&w.legacyInterceptorReqResOrdering?s.unshift(y.fulfilled,y.rejected):s.push(y.fulfilled,y.rejected)});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,d=0,h;if(!l){const x=[u6.bind(this),void 0];for(x.unshift(...s),x.push(...u),h=x.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Hx(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new yK(function(o){t=o}),cancel:t}}};function bhe(e){return function(n){return e.apply(null,n)}}function She(e){return Re.isObject(e)&&e.isAxiosError===!0}const eI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(eI).forEach(([e,t])=>{eI[t]=e});function wK(e){const t=new $p(e),n=JG($p.prototype.request,t);return Re.extend(n,$p.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return wK(Hp(e,o))},n}const $r=wK(Wx);$r.Axios=$p;$r.CanceledError=Hx;$r.CancelToken=xhe;$r.isCancel=dK;$r.VERSION=P3;$r.toFormData=TO;$r.AxiosError=Pt;$r.Cancel=$r.CanceledError;$r.all=function(t){return Promise.all(t)};$r.spread=bhe;$r.isAxiosError=She;$r.mergeConfig=Hp;$r.AxiosHeaders=Zi;$r.formToJSON=e=>fK(Re.isHTMLForm(e)?new FormData(e):e);$r.getAdapter=vK.getAdapter;$r.HttpStatusCode=eI;$r.default=$r;const{Axios:CJe,AxiosError:OJe,CanceledError:RJe,isCancel:PJe,CancelToken:TJe,VERSION:AJe,all:kJe,Cancel:NJe,isAxiosError:A3,spread:MJe,toFormData:jJe,AxiosHeaders:IJe,HttpStatusCode:DJe,formToJSON:LJe,getAdapter:$Je,mergeConfig:FJe,create:BJe}=$r;function xK(e,t){var r;if(!(e<3))return!1;if(A3(t)){const o=(r=t.response)==null?void 0:r.status;if(!o)return!0;if(o>=400&&o<500)return o===408||o===429}return!0}var mm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tp,wd,Av,FG,_he=(FG=class extends mm{constructor(){super();yt(this,Tp);yt(this,wd);yt(this,Av);nt(this,Av,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){le(this,wd)||this.setEventListener(le(this,Av))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,wd))==null||t.call(this),nt(this,wd,void 0))}setEventListener(t){var n;nt(this,Av,t),(n=le(this,wd))==null||n.call(this),nt(this,wd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){le(this,Tp)!==t&&(nt(this,Tp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof le(this,Tp)=="boolean"?le(this,Tp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Tp=new WeakMap,wd=new WeakMap,Av=new WeakMap,FG),k3=new _he,Ehe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xd,E3,BG,Che=(BG=class{constructor(){yt(this,xd,Ehe);yt(this,E3,!1)}setTimeoutProvider(e){nt(this,xd,e)}setTimeout(e,t){return le(this,xd).setTimeout(e,t)}clearTimeout(e){le(this,xd).clearTimeout(e)}setInterval(e,t){return le(this,xd).setInterval(e,t)}clearInterval(e){le(this,xd).clearInterval(e)}},xd=new WeakMap,E3=new WeakMap,BG),xp=new Che;function Ohe(e){setTimeout(e,0)}var Rhe=typeof window>"u"||"Deno"in globalThis;function _i(){}function Phe(e,t){return typeof e=="function"?e(t):e}function tI(e){return typeof e=="number"&&e>=0&&e!==1/0}function bK(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dd(e,t){return typeof e=="function"?e(t):e}function Ns(e,t){return typeof e=="function"?e(t):e}function f6(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==N3(a,t.options))return!1}else if(!Aw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function d6(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Gp(t.options.mutationKey)!==Gp(i))return!1}else if(!Aw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function N3(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gp)(e)}function Gp(e){return JSON.stringify(e,(t,n)=>nI(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Aw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Aw(e[n],t[n])):!1}var The=Object.prototype.hasOwnProperty;function M3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=h6(e)&&h6(t);if(!r&&!(nI(e)&&nI(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),s=a.length,l=r?new Array(s):{};let u=0;for(let c=0;c{xp.setTimeout(t,e)})}function rI(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?M3(e,t):t}function khe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nhe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var j3=Symbol();function SK(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===j3?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function I3(e,t){return typeof e=="function"?e(...t):!!e}function Mhe(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Nw=(()=>{let e=()=>Rhe;return{isServer(){return e()},setIsServer(t){e=t}}})();function oI(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var jhe=Ohe;function Ihe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=jhe;const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Gr=Ihe(),kv,bd,Nv,zG,Dhe=(zG=class extends mm{constructor(){super();yt(this,kv,!0);yt(this,bd);yt(this,Nv);nt(this,Nv,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){le(this,bd)||this.setEventListener(le(this,Nv))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,bd))==null||t.call(this),nt(this,bd,void 0))}setEventListener(t){var n;nt(this,Nv,t),(n=le(this,bd))==null||n.call(this),nt(this,bd,t(this.setOnline.bind(this)))}setOnline(t){le(this,kv)!==t&&(nt(this,kv,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return le(this,kv)}},kv=new WeakMap,bd=new WeakMap,Nv=new WeakMap,zG),vE=new Dhe;function Lhe(e){return Math.min(1e3*2**e,3e4)}function _K(e){return(e??"online")==="online"?vE.isOnline():!0}var iI=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function EK(e){let t=!1,n=0,r;const o=oI(),i=()=>o.status!=="pending",a=y=>{var w;if(!i()){const _=new iI(y);h(_),(w=e.onCancel)==null||w.call(e,_)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>k3.isFocused()&&(e.networkMode==="always"||vE.isOnline())&&e.canRun(),c=()=>_K(e.networkMode)&&e.canRun(),d=y=>{i()||(r==null||r(),o.resolve(y))},h=y=>{i()||(r==null||r(),o.reject(y))},p=()=>new Promise(y=>{var w;r=_=>{(i()||u())&&y(_)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),x=()=>{if(i())return;let y;const w=n===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(_){y=Promise.reject(_)}Promise.resolve(y).then(d).catch(_=>{var T;if(i())return;const C=e.retry??(Nw.isServer()?0:3),O=e.retryDelay??Lhe,P=typeof O=="function"?O(n,_):O,R=C===!0||typeof C=="number"&&nu()?void 0:p()).then(()=>{t?h(_):x()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r==null||r(),o),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?x():p().then(x),o)}}var Ap,qG,CK=(qG=class{constructor(){yt(this,Ap)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tI(this.gcTime)&&nt(this,Ap,xp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Nw.isServer()?1/0:300*1e3))}clearGcTimeout(){le(this,Ap)!==void 0&&(xp.clearTimeout(le(this,Ap)),nt(this,Ap,void 0))}},Ap=new WeakMap,qG),kp,Mv,As,Np,Wo,Nx,Mp,es,OK,qc,UG,$he=(UG=class extends CK{constructor(t){super();yt(this,es);yt(this,kp);yt(this,Mv);yt(this,As);yt(this,Np);yt(this,Wo);yt(this,Nx);yt(this,Mp);nt(this,Mp,!1),nt(this,Nx,t.defaultOptions),this.setOptions(t.options),this.observers=[],nt(this,Np,t.client),nt(this,As,le(this,Np).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,nt(this,kp,g6(this.options)),this.state=t.state??le(this,kp),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=le(this,Wo))==null?void 0:t.promise}setOptions(t){if(this.options={...le(this,Nx),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=g6(this.options);n.data!==void 0&&(this.setState(m6(n.data,n.dataUpdatedAt)),nt(this,kp,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,As).remove(this)}setData(t,n){const r=rI(this.state.data,t,this.options);return Xt(this,es,qc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Xt(this,es,qc).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=le(this,Wo))==null?void 0:r.promise;return(o=le(this,Wo))==null||o.cancel(t),n?n.then(_i).catch(_i):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,kp)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ns(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===j3||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!bK(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=le(this,Wo))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=le(this,Wo))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),le(this,As).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(le(this,Wo)&&(le(this,Mp)||Xt(this,es,OK).call(this)?le(this,Wo).cancel({revert:!0}):le(this,Wo).cancelRetry()),this.scheduleGc()),le(this,As).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xt(this,es,qc).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,c,d,h,p,x,y,w,_,C,O;if(this.state.fetchStatus!=="idle"&&((l=le(this,Wo))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(le(this,Wo))return le(this,Wo).continueRetry(),le(this,Wo).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(R=>R.options.queryFn);P&&this.setOptions(P.options)}const r=new AbortController,o=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(nt(this,Mp,!0),r.signal)})},i=()=>{const P=SK(this.options,n),T=(()=>{const k={client:le(this,Np),queryKey:this.queryKey,meta:this.meta};return o(k),k})();return nt(this,Mp,!1),this.options.persister?this.options.persister(P,T,this):P(T)},s=(()=>{const P={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:le(this,Np),state:this.state,fetchFn:i};return o(P),P})();(u=this.options.behavior)==null||u.onFetch(s,this),nt(this,Mv,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Xt(this,es,qc).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),nt(this,Wo,EK({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:P=>{P instanceof iI&&P.revert&&this.setState({...le(this,Mv),fetchStatus:"idle"}),r.abort()},onFail:(P,R)=>{Xt(this,es,qc).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{Xt(this,es,qc).call(this,{type:"pause"})},onContinue:()=>{Xt(this,es,qc).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const P=await le(this,Wo).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(p=(h=le(this,As).config).onSuccess)==null||p.call(h,P,this),(y=(x=le(this,As).config).onSettled)==null||y.call(x,P,this.state.error,this),P}catch(P){if(P instanceof iI){if(P.silent)return le(this,Wo).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Xt(this,es,qc).call(this,{type:"error",error:P}),(_=(w=le(this,As).config).onError)==null||_.call(w,P,this),(O=(C=le(this,As).config).onSettled)==null||O.call(C,this.state.data,P,this),P}finally{this.scheduleGc()}}},kp=new WeakMap,Mv=new WeakMap,As=new WeakMap,Np=new WeakMap,Wo=new WeakMap,Nx=new WeakMap,Mp=new WeakMap,es=new WeakSet,OK=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},qc=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...RK(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...m6(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return nt(this,Mv,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Gr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),le(this,As).notify({query:this,type:"updated",action:t})})},UG);function RK(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_K(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function m6(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function g6(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xa,Un,Mx,Wi,jp,jv,Gc,Sd,jx,Iv,Dv,Ip,Dp,_d,Lv,cr,K1,aI,sI,lI,uI,cI,fI,dI,PK,VG,kO=(VG=class extends mm{constructor(t,n){super();yt(this,cr);yt(this,xa);yt(this,Un);yt(this,Mx);yt(this,Wi);yt(this,jp);yt(this,jv);yt(this,Gc);yt(this,Sd);yt(this,jx);yt(this,Iv);yt(this,Dv);yt(this,Ip);yt(this,Dp);yt(this,_d);yt(this,Lv,new Set);this.options=n,nt(this,xa,t),nt(this,Sd,null),nt(this,Gc,oI()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Un).addObserver(this),v6(le(this,Un),this.options)?Xt(this,cr,K1).call(this):this.updateResult(),Xt(this,cr,uI).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hI(le(this,Un),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hI(le(this,Un),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Xt(this,cr,cI).call(this),Xt(this,cr,fI).call(this),le(this,Un).removeObserver(this)}setOptions(t){const n=this.options,r=le(this,Un);if(this.options=le(this,xa).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ns(this.options.enabled,le(this,Un))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Xt(this,cr,dI).call(this),le(this,Un).setOptions(this.options),n._defaulted&&!kw(this.options,n)&&le(this,xa).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Un),observer:this});const o=this.hasListeners();o&&y6(le(this,Un),r,this.options,n)&&Xt(this,cr,K1).call(this),this.updateResult(),o&&(le(this,Un)!==r||Ns(this.options.enabled,le(this,Un))!==Ns(n.enabled,le(this,Un))||Dd(this.options.staleTime,le(this,Un))!==Dd(n.staleTime,le(this,Un)))&&Xt(this,cr,aI).call(this);const i=Xt(this,cr,sI).call(this);o&&(le(this,Un)!==r||Ns(this.options.enabled,le(this,Un))!==Ns(n.enabled,le(this,Un))||i!==le(this,_d))&&Xt(this,cr,lI).call(this,i)}getOptimisticResult(t){const n=le(this,xa).getQueryCache().build(le(this,xa),t),r=this.createResult(n,t);return Bhe(this,r)&&(nt(this,Wi,r),nt(this,jv,this.options),nt(this,jp,le(this,Un).state)),r}getCurrentResult(){return le(this,Wi)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&le(this,Gc).status==="pending"&&le(this,Gc).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){le(this,Lv).add(t)}getCurrentQuery(){return le(this,Un)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=le(this,xa).defaultQueryOptions(t),r=le(this,xa).getQueryCache().build(le(this,xa),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Xt(this,cr,K1).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,Wi)))}createResult(t,n){var j;const r=le(this,Un),o=this.options,i=le(this,Wi),a=le(this,jp),s=le(this,jv),u=t!==r?t.state:le(this,Mx),{state:c}=t;let d={...c},h=!1,p;if(n._optimisticResults){const $=this.hasListeners(),L=!$&&v6(t,n),V=$&&y6(t,r,n,o);(L||V)&&(d={...d,...RK(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:x,errorUpdatedAt:y,status:w}=d;p=d.data;let _=!1;if(n.placeholderData!==void 0&&p===void 0&&w==="pending"){let $;i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?($=i.data,_=!0):$=typeof n.placeholderData=="function"?n.placeholderData((j=le(this,Dv))==null?void 0:j.state.data,le(this,Dv)):n.placeholderData,$!==void 0&&(w="success",p=rI(i==null?void 0:i.data,$,n),h=!0)}if(n.select&&p!==void 0&&!_)if(i&&p===(a==null?void 0:a.data)&&n.select===le(this,jx))p=le(this,Iv);else try{nt(this,jx,n.select),p=n.select(p),p=rI(i==null?void 0:i.data,p,n),nt(this,Iv,p),nt(this,Sd,null)}catch($){nt(this,Sd,$)}le(this,Sd)&&(x=le(this,Sd),p=le(this,Iv),y=Date.now(),w="error");const C=d.fetchStatus==="fetching",O=w==="pending",P=w==="error",R=O&&C,T=p!==void 0,M={status:w,fetchStatus:d.fetchStatus,isPending:O,isSuccess:w==="success",isError:P,isInitialLoading:R,isLoading:R,data:p,dataUpdatedAt:d.dataUpdatedAt,error:x,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!O,isLoadingError:P&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:P&&T,isStale:D3(t,n),refetch:this.refetch,promise:le(this,Gc),isEnabled:Ns(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=M.data!==void 0,L=M.status==="error"&&!$,V=H=>{L?H.reject(M.error):$&&H.resolve(M.data)},G=()=>{const H=nt(this,Gc,M.promise=oI());V(H)},D=le(this,Gc);switch(D.status){case"pending":t.queryHash===r.queryHash&&V(D);break;case"fulfilled":(L||M.data!==D.value)&&G();break;case"rejected":(!L||M.error!==D.reason)&&G();break}}return M}updateResult(){const t=le(this,Wi),n=this.createResult(le(this,Un),this.options);if(nt(this,jp,le(this,Un).state),nt(this,jv,this.options),le(this,jp).data!==void 0&&nt(this,Dv,le(this,Un)),kw(n,t))return;nt(this,Wi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!le(this,Lv).size)return!0;const a=new Set(i??le(this,Lv));return this.options.throwOnError&&a.add("error"),Object.keys(le(this,Wi)).some(s=>{const l=s;return le(this,Wi)[l]!==t[l]&&a.has(l)})};Xt(this,cr,PK).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Xt(this,cr,uI).call(this)}},xa=new WeakMap,Un=new WeakMap,Mx=new WeakMap,Wi=new WeakMap,jp=new WeakMap,jv=new WeakMap,Gc=new WeakMap,Sd=new WeakMap,jx=new WeakMap,Iv=new WeakMap,Dv=new WeakMap,Ip=new WeakMap,Dp=new WeakMap,_d=new WeakMap,Lv=new WeakMap,cr=new WeakSet,K1=function(t){Xt(this,cr,dI).call(this);let n=le(this,Un).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_i)),n},aI=function(){Xt(this,cr,cI).call(this);const t=Dd(this.options.staleTime,le(this,Un));if(Nw.isServer()||le(this,Wi).isStale||!tI(t))return;const r=bK(le(this,Wi).dataUpdatedAt,t)+1;nt(this,Ip,xp.setTimeout(()=>{le(this,Wi).isStale||this.updateResult()},r))},sI=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Un)):this.options.refetchInterval)??!1},lI=function(t){Xt(this,cr,fI).call(this),nt(this,_d,t),!(Nw.isServer()||Ns(this.options.enabled,le(this,Un))===!1||!tI(le(this,_d))||le(this,_d)===0)&&nt(this,Dp,xp.setInterval(()=>{(this.options.refetchIntervalInBackground||k3.isFocused())&&Xt(this,cr,K1).call(this)},le(this,_d)))},uI=function(){Xt(this,cr,aI).call(this),Xt(this,cr,lI).call(this,Xt(this,cr,sI).call(this))},cI=function(){le(this,Ip)!==void 0&&(xp.clearTimeout(le(this,Ip)),nt(this,Ip,void 0))},fI=function(){le(this,Dp)!==void 0&&(xp.clearInterval(le(this,Dp)),nt(this,Dp,void 0))},dI=function(){const t=le(this,xa).getQueryCache().build(le(this,xa),this.options);if(t===le(this,Un))return;const n=le(this,Un);nt(this,Un,t),nt(this,Mx,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},PK=function(t){Gr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(le(this,Wi))}),le(this,xa).getQueryCache().notify({query:le(this,Un),type:"observerResultsUpdated"})})},VG);function Fhe(e,t){return Ns(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function v6(e,t){return Fhe(e,t)||e.state.data!==void 0&&hI(e,t,t.refetchOnMount)}function hI(e,t,n){if(Ns(t.enabled,e)!==!1&&Dd(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&D3(e,t)}return!1}function y6(e,t,n,r){return(e!==t||Ns(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&D3(e,n)}function D3(e,t){return Ns(t.enabled,e)!==!1&&e.isStaleByTime(Dd(t.staleTime,e))}function Bhe(e,t){return!kw(e.getCurrentResult(),t)}function yE(e){return{onFetch:(t,n)=>{var c,d,h,p,x;const r=t.options,o=(h=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((x=t.state.data)==null?void 0:x.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const w=O=>{Mhe(O,()=>t.signal,()=>y=!0)},_=SK(t.options,t.fetchOptions),C=async(O,P,R)=>{if(y)return Promise.reject();if(P==null&&O.pages.length)return Promise.resolve(O);const k=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:P,direction:R?"backward":"forward",meta:t.options.meta};return w(L),L})(),M=await _(k),{maxPages:j}=t.options,$=R?Nhe:khe;return{pages:$(O.pages,M,j),pageParams:$(O.pageParams,P,j)}};if(o&&i.length){const O=o==="backward",P=O?TK:pI,R={pages:i,pageParams:a},T=P(r,R);s=await C(R,T,O)}else{const O=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:pI(r,s);if(l>0&&P==null)break;s=await C(s,P),l++}while(l{var y,w;return(w=(y=t.options).persister)==null?void 0:w.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function pI(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function TK(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function zhe(e,t){return t?pI(e,t)!=null:!1}function qhe(e,t){return!t||!e.getPreviousPageParam?!1:TK(e,t)!=null}var Uhe=class extends kO{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:yE()})}getOptimisticResult(e){return e.behavior=yE(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var x,y;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:i,isError:a,isRefetchError:s}=r,l=(y=(x=n.fetchMeta)==null?void 0:x.fetchMore)==null?void 0:y.direction,u=a&&l==="forward",c=o&&l==="forward",d=a&&l==="backward",h=o&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:zhe(t,n.data),hasPreviousPage:qhe(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:h,isRefetchError:s&&!u&&!d,isRefetching:i&&!c&&!h}}},Ix,ju,bi,Lp,Iu,ud,WG,Vhe=(WG=class extends CK{constructor(t){super();yt(this,Iu);yt(this,Ix);yt(this,ju);yt(this,bi);yt(this,Lp);nt(this,Ix,t.client),this.mutationId=t.mutationId,nt(this,bi,t.mutationCache),nt(this,ju,[]),this.state=t.state||AK(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){le(this,ju).includes(t)||(le(this,ju).push(t),this.clearGcTimeout(),le(this,bi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){nt(this,ju,le(this,ju).filter(n=>n!==t)),this.scheduleGc(),le(this,bi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){le(this,ju).length||(this.state.status==="pending"?this.scheduleGc():le(this,bi).remove(this))}continue(){var t;return((t=le(this,Lp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,l,u,c,d,h,p,x,y,w,_,C,O,P,R,T,k;const n=()=>{Xt(this,Iu,ud).call(this,{type:"continue"})},r={client:le(this,Ix),meta:this.options.meta,mutationKey:this.options.mutationKey};nt(this,Lp,EK({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,j)=>{Xt(this,Iu,ud).call(this,{type:"failed",failureCount:M,error:j})},onPause:()=>{Xt(this,Iu,ud).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,bi).canRun(this)}));const o=this.state.status==="pending",i=!le(this,Lp).canStart();try{if(o)n();else{Xt(this,Iu,ud).call(this,{type:"pending",variables:t,isPaused:i}),le(this,bi).config.onMutate&&await le(this,bi).config.onMutate(t,this,r);const j=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t,r));j!==this.state.context&&Xt(this,Iu,ud).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const M=await le(this,Lp).start();return await((u=(l=le(this,bi).config).onSuccess)==null?void 0:u.call(l,M,t,this.state.context,this,r)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,M,t,this.state.context,r)),await((p=(h=le(this,bi).config).onSettled)==null?void 0:p.call(h,M,null,this.state.variables,this.state.context,this,r)),await((y=(x=this.options).onSettled)==null?void 0:y.call(x,M,null,t,this.state.context,r)),Xt(this,Iu,ud).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(w=le(this,bi).config).onError)==null?void 0:_.call(w,M,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((O=(C=this.options).onError)==null?void 0:O.call(C,M,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((R=(P=le(this,bi).config).onSettled)==null?void 0:R.call(P,void 0,M,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((k=(T=this.options).onSettled)==null?void 0:k.call(T,void 0,M,t,this.state.context,r))}catch(j){Promise.reject(j)}throw Xt(this,Iu,ud).call(this,{type:"error",error:M}),M}finally{le(this,bi).runNext(this)}}},Ix=new WeakMap,ju=new WeakMap,bi=new WeakMap,Lp=new WeakMap,Iu=new WeakSet,ud=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Gr.batch(()=>{le(this,ju).forEach(r=>{r.onMutationUpdate(t)}),le(this,bi).notify({mutation:this,type:"updated",action:t})})},WG);function AK(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kc,Sl,Dx,HG,Whe=(HG=class extends mm{constructor(t={}){super();yt(this,Kc);yt(this,Sl);yt(this,Dx);this.config=t,nt(this,Kc,new Set),nt(this,Sl,new Map),nt(this,Dx,0)}build(t,n,r){const o=new Vhe({client:t,mutationCache:this,mutationId:++ZS(this,Dx)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){le(this,Kc).add(t);const n=e_(t);if(typeof n=="string"){const r=le(this,Sl).get(n);r?r.push(t):le(this,Sl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(le(this,Kc).delete(t)){const n=e_(t);if(typeof n=="string"){const r=le(this,Sl).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&le(this,Sl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=e_(t);if(typeof n=="string"){const r=le(this,Sl).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=e_(t);if(typeof n=="string"){const o=(r=le(this,Sl).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Gr.batch(()=>{le(this,Kc).forEach(t=>{this.notify({type:"removed",mutation:t})}),le(this,Kc).clear(),le(this,Sl).clear()})}getAll(){return Array.from(le(this,Kc))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>d6(n,r))}findAll(t={}){return this.getAll().filter(n=>d6(t,n))}notify(t){Gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Gr.batch(()=>Promise.all(t.map(n=>n.continue().catch(_i))))}},Kc=new WeakMap,Sl=new WeakMap,Dx=new WeakMap,HG);function e_(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Yc,Ed,ba,Xc,sf,Z_,mI,GG,Hhe=(GG=class extends mm{constructor(n,r){super();yt(this,sf);yt(this,Yc);yt(this,Ed);yt(this,ba);yt(this,Xc);nt(this,Yc,n),this.setOptions(r),this.bindMethods(),Xt(this,sf,Z_).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=le(this,Yc).defaultMutationOptions(n),kw(this.options,r)||le(this,Yc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,ba),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Gp(r.mutationKey)!==Gp(this.options.mutationKey)?this.reset():((o=le(this,ba))==null?void 0:o.state.status)==="pending"&&le(this,ba).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=le(this,ba))==null||n.removeObserver(this)}onMutationUpdate(n){Xt(this,sf,Z_).call(this),Xt(this,sf,mI).call(this,n)}getCurrentResult(){return le(this,Ed)}reset(){var n;(n=le(this,ba))==null||n.removeObserver(this),nt(this,ba,void 0),Xt(this,sf,Z_).call(this),Xt(this,sf,mI).call(this)}mutate(n,r){var o;return nt(this,Xc,r),(o=le(this,ba))==null||o.removeObserver(this),nt(this,ba,le(this,Yc).getMutationCache().build(le(this,Yc),this.options)),le(this,ba).addObserver(this),le(this,ba).execute(n)}},Yc=new WeakMap,Ed=new WeakMap,ba=new WeakMap,Xc=new WeakMap,sf=new WeakSet,Z_=function(){var r;const n=((r=le(this,ba))==null?void 0:r.state)??AK();nt(this,Ed,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},mI=function(n){Gr.batch(()=>{var r,o,i,a,s,l,u,c;if(le(this,Xc)&&this.hasListeners()){const d=le(this,Ed).variables,h=le(this,Ed).context,p={client:le(this,Yc),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=le(this,Xc)).onSuccess)==null||o.call(r,n.data,d,h,p)}catch(x){Promise.reject(x)}try{(a=(i=le(this,Xc)).onSettled)==null||a.call(i,n.data,null,d,h,p)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=le(this,Xc)).onError)==null||l.call(s,n.error,d,h,p)}catch(x){Promise.reject(x)}try{(c=(u=le(this,Xc)).onSettled)==null||c.call(u,void 0,n.error,d,h,p)}catch(x){Promise.reject(x)}}}this.listeners.forEach(d=>{d(le(this,Ed))})})},GG);function w6(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function Ghe(e,t,n){const r=e.slice(0);return r[t]=n,r}var $v,Za,Fv,Bv,ks,Cd,Lx,$x,Fx,Bx,ai,gI,vI,yI,wI,xI,KG,Khe=(KG=class extends mm{constructor(t,n,r){super();yt(this,ai);yt(this,$v);yt(this,Za);yt(this,Fv);yt(this,Bv);yt(this,ks);yt(this,Cd);yt(this,Lx);yt(this,$x);yt(this,Fx);yt(this,Bx,[]);nt(this,$v,t),nt(this,Bv,r),nt(this,Fv,[]),nt(this,ks,[]),nt(this,Za,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&le(this,ks).forEach(t=>{t.subscribe(n=>{Xt(this,ai,wI).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,le(this,ks).forEach(t=>{t.destroy()})}setQueries(t,n){nt(this,Fv,t),nt(this,Bv,n),Gr.batch(()=>{const r=le(this,ks),o=Xt(this,ai,yI).call(this,le(this,Fv));o.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=o.map(d=>d.observer),a=i.map(d=>d.getCurrentResult()),s=r.length!==i.length,l=i.some((d,h)=>d!==r[h]),u=s||l,c=u?!0:a.some((d,h)=>{const p=le(this,Za)[h];return!p||!kw(d,p)});!u&&!c||(u&&(nt(this,Bx,o),nt(this,ks,i)),nt(this,Za,a),this.hasListeners()&&(u&&(w6(r,i).forEach(d=>{d.destroy()}),w6(i,r).forEach(d=>{d.subscribe(h=>{Xt(this,ai,wI).call(this,d,h)})})),Xt(this,ai,xI).call(this)))})}getCurrentResult(){return le(this,Za)}getQueries(){return le(this,ks).map(t=>t.getCurrentQuery())}getObservers(){return le(this,ks)}getOptimisticResult(t,n){const r=Xt(this,ai,yI).call(this,t),o=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[o,a=>Xt(this,ai,vI).call(this,a??o,n,i),()=>Xt(this,ai,gI).call(this,o,r)]}},$v=new WeakMap,Za=new WeakMap,Fv=new WeakMap,Bv=new WeakMap,ks=new WeakMap,Cd=new WeakMap,Lx=new WeakMap,$x=new WeakMap,Fx=new WeakMap,Bx=new WeakMap,ai=new WeakSet,gI=function(t,n){return n.map((r,o)=>{const i=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,a=>{n.forEach(s=>{s.observer.trackProp(a)})})})},vI=function(t,n,r){if(n){const o=le(this,Fx),i=r!==void 0&&o!==void 0&&(o.length!==r.length||r.some((a,s)=>a!==o[s]));return(!le(this,Cd)||le(this,Za)!==le(this,$x)||i||n!==le(this,Lx))&&(nt(this,Lx,n),nt(this,$x,le(this,Za)),r!==void 0&&nt(this,Fx,r),nt(this,Cd,M3(le(this,Cd),n(t)))),le(this,Cd)}return t},yI=function(t){const n=new Map;le(this,ks).forEach(o=>{const i=o.options.queryHash;if(!i)return;const a=n.get(i);a?a.push(o):n.set(i,[o])});const r=[];return t.forEach(o=>{var l;const i=le(this,$v).defaultQueryOptions(o),s=((l=n.get(i.queryHash))==null?void 0:l.shift())??new kO(le(this,$v),i);r.push({defaultedQueryOptions:i,observer:s})}),r},wI=function(t,n){const r=le(this,ks).indexOf(t);r!==-1&&(nt(this,Za,Ghe(le(this,Za),r,n)),Xt(this,ai,xI).call(this))},xI=function(){var t;if(this.hasListeners()){const n=le(this,Cd),r=Xt(this,ai,gI).call(this,le(this,Za),le(this,Bx)),o=Xt(this,ai,vI).call(this,r,(t=le(this,Bv))==null?void 0:t.combine);n!==o&&Gr.batch(()=>{this.listeners.forEach(i=>{i(le(this,Za))})})}},KG),Du,YG,Yhe=(YG=class extends mm{constructor(t={}){super();yt(this,Du);this.config=t,nt(this,Du,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??N3(o,n);let a=this.get(i);return a||(a=new $he({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){le(this,Du).has(t.queryHash)||(le(this,Du).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=le(this,Du).get(t.queryHash);n&&(t.destroy(),n===t&&le(this,Du).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return le(this,Du).get(t)}getAll(){return[...le(this,Du).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>f6(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>f6(t,r)):n}notify(t){Gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Gr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Du=new WeakMap,YG),Wr,Od,Rd,zv,qv,Pd,Uv,Vv,XG,Xhe=(XG=class{constructor(e={}){yt(this,Wr);yt(this,Od);yt(this,Rd);yt(this,zv);yt(this,qv);yt(this,Pd);yt(this,Uv);yt(this,Vv);nt(this,Wr,e.queryCache||new Yhe),nt(this,Od,e.mutationCache||new Whe),nt(this,Rd,e.defaultOptions||{}),nt(this,zv,new Map),nt(this,qv,new Map),nt(this,Pd,0)}mount(){ZS(this,Pd)._++,le(this,Pd)===1&&(nt(this,Uv,k3.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Wr).onFocus())})),nt(this,Vv,vE.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Wr).onOnline())})))}unmount(){var e,t;ZS(this,Pd)._--,le(this,Pd)===0&&((e=le(this,Uv))==null||e.call(this),nt(this,Uv,void 0),(t=le(this,Vv))==null||t.call(this),nt(this,Vv,void 0))}isFetching(e){return le(this,Wr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Od).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=le(this,Wr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=le(this,Wr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Dd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return le(this,Wr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=le(this,Wr).get(r.queryHash),i=o==null?void 0:o.state.data,a=Phe(t,i);if(a!==void 0)return le(this,Wr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Gr.batch(()=>le(this,Wr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=le(this,Wr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=le(this,Wr);Gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=le(this,Wr);return Gr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Gr.batch(()=>le(this,Wr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(_i).catch(_i)}invalidateQueries(e,t={}){return Gr.batch(()=>(le(this,Wr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Gr.batch(()=>le(this,Wr).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(_i)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(_i)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=le(this,Wr).build(this,t);return n.isStaleByTime(Dd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_i).catch(_i)}fetchInfiniteQuery(e){return e.behavior=yE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_i).catch(_i)}ensureInfiniteQueryData(e){return e.behavior=yE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vE.isOnline()?le(this,Od).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Wr)}getMutationCache(){return le(this,Od)}getDefaultOptions(){return le(this,Rd)}setDefaultOptions(e){nt(this,Rd,e)}setQueryDefaults(e,t){le(this,zv).set(Gp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...le(this,zv).values()],n={};return t.forEach(r=>{Aw(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){le(this,qv).set(Gp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...le(this,qv).values()],n={};return t.forEach(r=>{Aw(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...le(this,Rd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=N3(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===j3&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Rd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Wr).clear(),le(this,Od).clear()}},Wr=new WeakMap,Od=new WeakMap,Rd=new WeakMap,zv=new WeakMap,qv=new WeakMap,Pd=new WeakMap,Uv=new WeakMap,Vv=new WeakMap,XG),b=zx();const J=Ln(b),NO=_fe({__proto__:null,default:J},[b]);var kK=b.createContext(void 0),ec=e=>{const t=b.useContext(kK);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Qhe=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(kK.Provider,{value:e,children:t})),NK=b.createContext(!1),MK=()=>b.useContext(NK);NK.Provider;function Zhe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jhe=b.createContext(Zhe()),jK=()=>b.useContext(Jhe),IK=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?I3(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},DK=e=>{b.useEffect(()=>{e.clearReset()},[e])},LK=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||I3(n,[e.error,r])),$K=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},epe=(e,t)=>e.isLoading&&e.isFetching&&!t,bI=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,SI=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tpe({queries:e,...t},n){const r=ec(),o=MK(),i=jK(),a=b.useMemo(()=>e.map(y=>{const w=r.defaultQueryOptions(y);return w._optimisticResults=o?"isRestoring":"optimistic",w}),[e,r,o]);a.forEach(y=>{$K(y);const w=r.getQueryCache().get(y.queryHash);IK(y,i,w)}),DK(i);const[s]=b.useState(()=>new Khe(r,a,t)),[l,u,c]=s.getOptimisticResult(a,t.combine),d=!o&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(y=>d?s.subscribe(Gr.batchCalls(y)):_i,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),b.useEffect(()=>{s.setQueries(a,t)},[a,t,s]);const p=l.some((y,w)=>bI(a[w],y))?l.flatMap((y,w)=>{const _=a[w];if(_&&bI(_,y)){const C=new kO(r,_);return SI(_,C,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const x=l.find((y,w)=>{const _=a[w];return _&&LK({result:y,errorResetBoundary:i,throwOnError:_.throwOnError,query:r.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(x!=null&&x.error)throw x.error;return u(c())}function FK(e,t,n){var h,p,x,y;const r=MK(),o=jK(),i=ec(),a=i.defaultQueryOptions(e);(p=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,a);const s=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",$K(a),IK(a,o,s),DK(o);const l=!i.getQueryCache().get(a.queryHash),[u]=b.useState(()=>new t(i,a)),c=u.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(w=>{const _=d?u.subscribe(Gr.batchCalls(w)):_i;return u.updateResult(),_},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(a)},[a,u]),bI(a,c))throw SI(a,u,o);if(LK({result:c,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw c.error;if((y=(x=i.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||y.call(x,a,c),a.experimental_prefetchInRender&&!Nw.isServer()&&epe(c,r)){const w=l?SI(a,u,o):s==null?void 0:s.promise;w==null||w.catch(_i).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function In(e,t){return FK(e,kO)}function Ir(e,t){const n=ec(),[r]=b.useState(()=>new Hhe(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(Gr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=b.useCallback((a,s)=>{r.mutate(a,s).catch(_i)},[r]);if(o.error&&I3(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function npe(e,t){return FK(e,Uhe)}const Ds=new Xhe({defaultOptions:{queries:{retry:xK}}});function rpe(){if(typeof window>"u"||typeof navigator>"u")return;let e,t=!1;const n=s=>{t=t||s,e&&window.clearTimeout(e),e=window.setTimeout(()=>{e=void 0;const l=t;if(t=!1,l){Ds.invalidateQueries({queryKey:[Yj],refetchType:"all"});return}Ds.refetchQueries({queryKey:[Yj],stale:!0,type:"all"})},250)},r=()=>n(!1),o=()=>n(!0);window.addEventListener("focus",r),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&r()}),window.addEventListener("online",o);const i=navigator,a=i.connection??i.mozConnection??i.webkitConnection;a==null||a.addEventListener("change",o)}rpe();const ope="modulepreload",ipe=function(e){return"/"+e},x6={},mn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let a=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=a(n.map(u=>{if(u=ipe(u),u in x6)return;x6[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":ope,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((p,x)=>{h.addEventListener("load",p),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};function BK(e){return!!e}var wn=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(wn||{});let ape=class{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}},spe=class extends ape{constructor(){super(...arguments);re(this,"v1TaskGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1TaskEventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}/task-events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1LogLineList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1TaskCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/tasks/cancel`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TenantLogLineList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TenantLogLineGetPointMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/log-point-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/tasks/replay`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskRestore",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/tasks/${n}/restore`,method:"POST",secure:!0,format:"json",...r,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1DagListTasks",Object.assign((n,r={})=>this.request({path:"/api/v1/stable/dags/tasks",method:"GET",query:n,secure:!0,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"v1WorkflowRunList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunDisplayNamesList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/display-names`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunExternalIdsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/external-ids`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/trigger`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1DurableTaskBranch",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/durable-tasks/branch`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1DurableTaskEventLogList",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/durable-tasks/${r}`,method:"GET",query:o,secure:!0,format:"json",...i,xResources:["tenant","durable-task"]}),{resources:new Set(["tenant","durable-task"])}));re(this,"v1WorkflowRunGet",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1WorkflowRunGetStatus",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/status`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1WorkflowRunTaskEventsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/task-events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1ObservabilityGetTrace",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/traces`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunGetTimings",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/task-timings`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1TaskListStatusMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/task-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskGetPointMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/task-point-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1EventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1EventGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/events/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-event"]}),{resources:new Set(["tenant","v1-event"])}));re(this,"v1EventKeyList",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/tenants/${n}/events/keys`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1FilterDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1FilterUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1WebhookList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WebhookCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WebhookGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookReceive",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"POST",body:o,format:"json",...i,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1CelDebug",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/cel/debug`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"readinessGet",Object.assign((n={})=>this.request({path:"/api/ready",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"livenessGet",Object.assign((n={})=>this.request({path:"/api/live",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"metadataGet",Object.assign((n={})=>this.request({path:"/api/v1/meta",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"cloudMetadataGet",Object.assign((n={})=>this.request({path:"/api/v1/cloud/metadata",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"metadataListIntegrations",Object.assign((n={})=>this.request({path:"/api/v1/meta/integrations",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateLogin",Object.assign((n,r={})=>this.request({path:"/api/v1/users/login",method:"POST",body:n,type:wn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGoogleOauthStart",Object.assign((n={})=>this.request({path:"/api/v1/users/google/start",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGoogleOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/google/callback",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubOauthStart",Object.assign((n={})=>this.request({path:"/api/v1/users/github/start",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/github/callback",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateSlackOauthStart",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/slack/start`,method:"GET",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"userUpdateSlackOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/slack/callback",method:"GET",secure:!0,...n,xResources:[]}),{resources:new Set([])}));re(this,"snsUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/sns/${n}/${r}`,method:"POST",...o,xResources:[]}),{resources:new Set([])}));re(this,"snsList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/sns`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"snsCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/sns`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/alerting-email-groups`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/alerting-email-groups`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantResourcePolicyGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/resource-policy`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/alerting-email-groups/${n}`,method:"PATCH",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant","alert-email-group"]}),{resources:new Set(["tenant","alert-email-group"])}));re(this,"alertEmailGroupDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/alerting-email-groups/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","alert-email-group"]}),{resources:new Set(["tenant","alert-email-group"])}));re(this,"snsDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/sns/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","sns"]}),{resources:new Set(["tenant","sns"])}));re(this,"slackWebhookList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/slack`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"slackWebhookDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/slack/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","slack"]}),{resources:new Set(["tenant","slack"])}));re(this,"userGetCurrent",Object.assign((n={})=>this.request({path:"/api/v1/users/current",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdatePassword",Object.assign((n,r={})=>this.request({path:"/api/v1/users/password",method:"POST",body:n,secure:!0,type:wn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/users/register",method:"POST",body:n,type:wn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateLogout",Object.assign((n={})=>this.request({path:"/api/v1/users/logout",method:"POST",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantMembershipsList",Object.assign((n={})=>this.request({path:"/api/v1/users/memberships",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userListTenantInvites",Object.assign((n={})=>this.request({path:"/api/v1/users/invites",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantInviteAccept",Object.assign((n,r={})=>this.request({path:"/api/v1/users/invites/accept",method:"POST",body:n,secure:!0,type:wn.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantInviteReject",Object.assign((n,r={})=>this.request({path:"/api/v1/users/invites/reject",method:"POST",body:n,secure:!0,type:wn.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/tenants",method:"POST",body:n,secure:!0,type:wn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}`,method:"PATCH",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantAlertingSettingsGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/alerting/settings`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/invites`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/invites`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/invites/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","tenant-invite"]}),{resources:new Set(["tenant","tenant-invite"])}));re(this,"tenantInviteDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/invites/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","tenant-invite"]}),{resources:new Set(["tenant","tenant-invite"])}));re(this,"apiTokenCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"apiTokenList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"apiTokenUpdateRevoke",Object.assign((n,r={})=>this.request({path:`/api/v1/api-tokens/${n}`,method:"POST",secure:!0,...r,xResources:["tenant","api-token"]}),{resources:new Set(["tenant","api-token"])}));re(this,"tenantGetQueueMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/queue-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGetStepRunQueueMetrics",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/step-run-queue-metrics`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventCreateBulk",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/bulk`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventUpdateReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/replay`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventUpdateCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/cancel`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"rateLimitList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/rate-limits`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"rateLimitDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/rate-limits`,method:"DELETE",query:r,secure:!0,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantMemberList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/members`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantMemberUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/members/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","member"]}),{resources:new Set(["tenant","member"])}));re(this,"tenantMemberDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/members/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","member"]}),{resources:new Set(["tenant","member"])}));re(this,"eventGet",Object.assign((n,r={})=>this.request({path:`/api/v1/events/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","event"]}),{resources:new Set(["tenant","event"])}));re(this,"eventDataGet",Object.assign((n,r={})=>this.request({path:`/api/v1/events/${n}/data`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","event"]}),{resources:new Set(["tenant","event"])}));re(this,"eventDataGetWithTenant",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${r}/events/${n}/data`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","event-with-tenant"]}),{resources:new Set(["tenant","event-with-tenant"])}));re(this,"eventKeyList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/events/keys`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"scheduledWorkflowRunCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/scheduled`,method:"POST",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"DELETE",secure:!0,...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledTrigger",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledBulkDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/bulk-delete`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledBulkUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/bulk-update`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"cronWorkflowTriggerCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/crons`,method:"POST",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"cronWorkflowList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowCronGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"DELETE",secure:!0,...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"PATCH",body:o,secure:!0,type:wn.Json,...i,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronTrigger",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowRunCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/cancel`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowGet",Object.assign((n,r={})=>this.request({path:`/api/v1/workflows/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/workflows/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}`,method:"PATCH",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowVersionGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}/versions`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowRunCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/workflows/${n}/trigger`,method:"POST",query:o,body:r,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}/metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"stepRunListEvents",Object.assign((n,r,o={})=>this.request({path:`/api/v1/step-runs/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workflowRunListStepRunEvents",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/step-run-events`,method:"GET",query:o,secure:!0,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"stepRunListArchives",Object.assign((n,r,o={})=>this.request({path:`/api/v1/step-runs/${n}/archives`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workflowGetWorkersCount",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/worker-count`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowRunList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/runs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunUpdateReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/replay`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/runs/metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"workflowRunGetShape",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/shape`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"stepRunGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunUpdateRerun",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/rerun`,method:"POST",body:o,secure:!0,type:wn.Json,format:"json",...i,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunUpdateCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/cancel`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunGetSchema",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/schema`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workerList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/worker`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workerUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workers/${n}`,method:"PATCH",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant","worker"]}),{resources:new Set(["tenant","worker"])}));re(this,"workerGet",Object.assign((n,r={})=>this.request({path:`/api/v1/workers/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","worker"]}),{resources:new Set(["tenant","worker"])}));re(this,"webhookList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/webhook-workers`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"webhookCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/webhook-workers`,method:"POST",body:r,secure:!0,type:wn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"webhookDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/webhook-workers/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","webhook"]}),{resources:new Set(["tenant","webhook"])}));re(this,"webhookRequestsList",Object.assign((n,r={})=>this.request({path:`/api/v1/webhook-workers/${n}/requests`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","webhook"]}),{resources:new Set(["tenant","webhook"])}));re(this,"workflowRunGetInput",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/input`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"monitoringPostRunProbe",Object.assign((n,r={})=>this.request({path:`/api/v1/monitoring/${n}/probe`,method:"POST",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"infoGetVersion",Object.assign((n={})=>this.request({path:"/api/v1/version",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantGetPrometheusMetrics",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/prometheus-metrics`,method:"GET",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGetTaskStats",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/task-stats`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantFeatureFlagEvaluate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/feature-flags`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}))}};var Eo=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(Eo||{});let lpe=class{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}},upe=class extends lpe{constructor(){super(...arguments);re(this,"metadataGet",Object.assign((n={})=>this.request({path:"/api/v1/cloud/metadata",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubAppOauthStart",Object.assign((n,r={})=>this.request({path:"/api/v1/cloud/users/github-app/start",method:"GET",query:n,secure:!0,...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubAppOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/cloud/users/github-app/callback",method:"GET",secure:!0,...n,xResources:[]}),{resources:new Set([])}));re(this,"githubUpdateGlobalWebhook",Object.assign((n={})=>this.request({path:"/api/v1/cloud/github/webhook",method:"POST",...n,xResources:[]}),{resources:new Set([])}));re(this,"githubUpdateTenantWebhook",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/github/webhook/${n}`,method:"POST",...r,xResources:[]}),{resources:new Set([])}));re(this,"githubAppListInstallations",Object.assign((n,r={})=>this.request({path:"/api/v1/cloud/github-app/installations",method:"GET",query:n,secure:!0,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"githubAppListRepos",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/repos`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"githubAppUpdateInstallation",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/link`,method:"GET",query:r,secure:!0,...o,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"githubAppListBranches",Object.assign((n,r,o,i,a={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/repos/${r}/${o}/branches`,method:"GET",query:i,secure:!0,format:"json",...a,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"managedWorkerList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerTemplateCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker/template`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"computeCostGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker/cost`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"managedWorkerUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"managedWorkerDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"DELETE",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"infraAsCodeCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/infra-as-code/${n}`,method:"POST",body:r,secure:!0,type:Eo.Json,...o,xResources:["tenant","infra-as-code-request"]}),{resources:new Set(["tenant","infra-as-code-request"])}));re(this,"runtimeConfigListActions",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/runtime-config/${n}/actions`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","runtime-config"]}),{resources:new Set(["tenant","managed-worker","runtime-config"])}));re(this,"managedWorkerInstancesList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/instances`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"buildGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/build/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","build"]}),{resources:new Set(["tenant","managed-worker","build"])}));re(this,"managedWorkerEventsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/events`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsCpuGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/cpu`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsMemoryGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/memory`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsDiskGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/disk`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"workflowRunEventsGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/runs-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"logList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"iacLogsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/iac-logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"buildLogsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/build/${n}/logs`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","build"]}),{resources:new Set(["tenant","managed-worker","build"])}));re(this,"logCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/logs`,method:"POST",body:r,secure:!0,type:Eo.Json,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"userOffersList",Object.assign((n={})=>this.request({path:"/api/v1/billing/offers",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userOfferRedeem",Object.assign((n,r={})=>this.request({path:"/api/v1/billing/offers/redeem",method:"POST",body:n,secure:!0,type:Eo.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"featureFlagsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/feature-flags`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"externalAutoscalingConfigCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/autoscaling`,method:"POST",body:r,secure:!0,type:Eo.Json,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"organizationList",Object.assign((n={})=>this.request({path:"/api/v1/management/organizations",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"organizationCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/management/organizations",method:"POST",body:n,secure:!0,type:Eo.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationGet",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}`,method:"PATCH",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationCreateTenant",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/tenants`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationTenantUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}`,method:"PATCH",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-tenants/${n}`,method:"DELETE",secure:!0,format:"json",...r,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantListApiTokens",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantCreateApiToken",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantDeleteApiToken",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens/${r}`,method:"DELETE",secure:!0,...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationMemberDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-members/${n}`,method:"DELETE",body:r,secure:!0,type:Eo.Json,...o,xResources:["organization","organization-member"]}),{resources:new Set(["organization","organization-member"])}));re(this,"managementTokenCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/management-tokens`,method:"POST",body:r,secure:!0,type:Eo.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"managementTokenList",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}/management-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"managementTokenDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/management-tokens/${n}`,method:"DELETE",secure:!0,...r,xResources:["organization","management-token"]}),{resources:new Set(["organization","management-token"])}));re(this,"userListOrganizationInvites",Object.assign((n={})=>this.request({path:"/api/v1/management/invites",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteAccept",Object.assign((n,r={})=>this.request({path:"/api/v1/management/invites/accept",method:"POST",body:n,secure:!0,type:Eo.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteReject",Object.assign((n,r={})=>this.request({path:"/api/v1/management/invites/reject",method:"POST",body:n,secure:!0,type:Eo.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteList",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}/invites`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationInviteCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/invites`,method:"POST",body:r,secure:!0,type:Eo.Json,...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationInviteDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-invites/${n}`,method:"DELETE",secure:!0,...r,xResources:["organization","organization-invite"]}),{resources:new Set(["organization","organization-invite"])}));re(this,"organizationListAuditLogs",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/audit-logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationTenantMembersAdd",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/management/organizations/${n}/tenants/${r}/members`,method:"POST",body:o,secure:!0,type:Eo.Json,...i,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}))}};var pr=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(pr||{});class cpe{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}}class fpe extends cpe{constructor(){super(...arguments);re(this,"readinessGet",(n={})=>this.request({path:"/api/ready",method:"GET",...n}));re(this,"livenessGet",(n={})=>this.request({path:"/api/live",method:"GET",...n}));re(this,"metadataGet",(n={})=>this.request({path:"/api/v1/control-plane/metadata",method:"GET",format:"json",...n}));re(this,"metadataListIntegrations",(n={})=>this.request({path:"/api/v1/control-plane/metadata/integrations",method:"GET",secure:!0,format:"json",...n}));re(this,"cloudUserUpdateLogin",(n,r={})=>this.request({path:"/api/v1/control-plane/users/login",method:"POST",body:n,type:pr.Json,format:"json",...r}));re(this,"cloudUserUpdateLogout",(n={})=>this.request({path:"/api/v1/control-plane/users/logout",method:"POST",secure:!0,format:"json",...n}));re(this,"cloudUserUpdatePassword",(n,r={})=>this.request({path:"/api/v1/control-plane/users/password",method:"POST",body:n,secure:!0,type:pr.Json,format:"json",...r}));re(this,"cloudUserCreate",(n,r={})=>this.request({path:"/api/v1/control-plane/users/register",method:"POST",body:n,type:pr.Json,format:"json",...r}));re(this,"cloudUserGetCurrent",(n={})=>this.request({path:"/api/v1/control-plane/users/current",method:"GET",secure:!0,format:"json",...n}));re(this,"cloudUserUpdateGoogleOauthStart",(n={})=>this.request({path:"/api/v1/control-plane/users/google/start",method:"GET",...n}));re(this,"cloudUserUpdateGoogleOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/google/callback",method:"GET",...n}));re(this,"cloudUserUpdateGithubOauthStart",(n={})=>this.request({path:"/api/v1/control-plane/users/github/start",method:"GET",...n}));re(this,"cloudUserUpdateGithubOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/github/callback",method:"GET",...n}));re(this,"cloudUserUpdateSlackOauthStart",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/slack/start`,method:"GET",secure:!0,...r}));re(this,"cloudUserUpdateSlackOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/slack/callback",method:"GET",secure:!0,...n}));re(this,"shardsListShared",(n={})=>this.request({path:"/api/v1/control-plane/shared-shards",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationList",(n={})=>this.request({path:"/api/v1/control-plane/organizations",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationCreate",(n,r={})=>this.request({path:"/api/v1/control-plane/organizations",method:"POST",body:n,secure:!0,type:pr.Json,format:"json",...r}));re(this,"organizationGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}`,method:"PATCH",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationCreateTenant",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationListAvailableShards",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/available-shards`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationListAuditLogs",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/audit-logs`,method:"GET",query:r,secure:!0,format:"json",...o}));re(this,"organizationTenantDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}`,method:"DELETE",secure:!0,format:"json",...r}));re(this,"organizationTenantListApiTokens",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantCreateApiToken",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationTenantDeleteApiToken",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens/${r}`,method:"DELETE",secure:!0,...o}));re(this,"organizationMemberDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-members/${n}`,method:"DELETE",body:r,secure:!0,type:pr.Json,...o}));re(this,"managementTokenCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/management-tokens`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"managementTokenList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/management-tokens`,method:"GET",secure:!0,format:"json",...r}));re(this,"managementTokenDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/management-tokens/${n}`,method:"DELETE",secure:!0,...r}));re(this,"userListOrganizationInvites",(n={})=>this.request({path:"/api/v1/control-plane/invites",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationInviteAccept",(n,r={})=>this.request({path:"/api/v1/control-plane/invites/accept",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"organizationInviteReject",(n,r={})=>this.request({path:"/api/v1/control-plane/invites/reject",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"organizationInviteList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/invites`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationInviteCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/invites`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"organizationInviteDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-invites/${n}`,method:"DELETE",secure:!0,...r}));re(this,"ssoList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"ssoDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"DELETE",secure:!0,...r}));re(this,"ssoDomainList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-domain`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoDomainCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-domain`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"ssoDomainDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/sso-domain/${n}`,method:"DELETE",secure:!0,...r}));re(this,"ssoConfigGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-config`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoConfigUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-config`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"organizationEntitlementsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/entitlements`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantListTags",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/tags`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationTenantSetTags",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/tags`,method:"PUT",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationTenantMembersAdd",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/members`,method:"POST",body:o,secure:!0,type:pr.Json,...i}));re(this,"organizationUserGroupsList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationUserGroupsCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationUserGroupGet",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationUserGroupDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"DELETE",secure:!0,...o}));re(this,"organizationUserGroupListTags",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/tags`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupSetTags",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/tags`,method:"PUT",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationUserGroupListMembers",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupAddMember",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members`,method:"POST",body:o,secure:!0,type:pr.Json,...i}));re(this,"organizationUserGroupRemoveMember",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members/${o}`,method:"DELETE",secure:!0,...i}));re(this,"cloudUserUpdateSsoOauthStart",(n,r={})=>this.request({path:"/api/v1/control-plane/users/sso/start",method:"GET",query:n,...r}));re(this,"cloudUserUpdateSsoOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/sso/callback",method:"GET",...n}));re(this,"tenantMembershipsList",(n={})=>this.request({path:"/api/v1/control-plane/users/memberships",method:"GET",secure:!0,format:"json",...n}));re(this,"userListTenantInvites",(n={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites",method:"GET",secure:!0,format:"json",...n}));re(this,"tenantInviteAccept",(n,r={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites/accept",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"tenantInviteReject",(n,r={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites/reject",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"exchangeTokenCreate",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/token`,method:"POST",secure:!0,format:"json",...r}));re(this,"tenantMemberList",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members`,method:"GET",secure:!0,format:"json",...r}));re(this,"tenantMemberUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"tenantMemberDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members/${r}`,method:"DELETE",secure:!0,...o}));re(this,"tenantInviteList",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites`,method:"GET",secure:!0,format:"json",...r}));re(this,"tenantInviteCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"tenantInviteUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"tenantInviteDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites/${r}`,method:"DELETE",secure:!0,...o}));re(this,"subscriptionPlansList",(n={})=>this.request({path:"/api/v1/control-plane/billing/plans",method:"GET",format:"json",...n}));re(this,"organizationBillingStateGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantResourceLimitsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/tenant-resource-limits`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationSubscriptionUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/subscription`,method:"PATCH",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"billingPortalLinkGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/billing-portal-link`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationPaymentMethodsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/payment-methods`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationCreditBalanceGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/credit-balance`,method:"GET",secure:!0,format:"json",...r}))}}var xT,b6;function jy(){return b6||(b6=1,xT=TypeError),xT}const dpe={},hpe=Object.freeze(Object.defineProperty({__proto__:null,default:dpe},Symbol.toStringTag,{value:"Module"})),ppe=Cfe(hpe);var bT,S6;function MO(){if(S6)return bT;S6=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype,d=c?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,x=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,_=String.prototype.match,C=String.prototype.slice,O=String.prototype.replace,P=String.prototype.toUpperCase,R=String.prototype.toLowerCase,T=RegExp.prototype.test,k=Array.prototype.concat,M=Array.prototype.join,j=Array.prototype.slice,$=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",H=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,U=Object.prototype.propertyIsEnumerable,Y=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Ee){return Ee.__proto__}:null);function q(Ee,Ce){if(Ee===1/0||Ee===-1/0||Ee!==Ee||Ee&&Ee>-1e3&&Ee<1e3||T.call(/e/,Ce))return Ce;var me=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Ee=="number"){var Te=Ee<0?-$(-Ee):$(Ee);if(Te!==Ee){var De=String(Te),Fe=C.call(Ce,De.length+1);return O.call(De,me,"$&_")+"."+O.call(O.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(Ce,me,"$&_")}var W=ppe,K=W.custom,z=We(K)?K:null,X={__proto__:null,double:'"',single:"'"},ee={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};bT=function Ee(Ce,me,Te,De){var Fe=me||{};if(st(Fe,"quoteStyle")&&!st(X,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(st(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Vt=st(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Vt!="boolean"&&Vt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(st(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(st(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Ut=Fe.numericSeparator;if(typeof Ce>"u")return"undefined";if(Ce===null)return"null";if(typeof Ce=="boolean")return Ce?"true":"false";if(typeof Ce=="string")return Ye(Ce,Fe);if(typeof Ce=="number"){if(Ce===0)return 1/0/Ce>0?"0":"-0";var bn=String(Ce);return Ut?q(Ce,bn):bn}if(typeof Ce=="bigint"){var it=String(Ce)+"n";return Ut?q(Ce,it):it}var gt=typeof Fe.depth>"u"?5:Fe.depth;if(typeof Te>"u"&&(Te=0),Te>=gt&>>0&&typeof Ce=="object")return ge(Ce)?"[Array]":"[Object]";var Dt=tr(Fe,Te);if(typeof De>"u")De=[];else if(gn(De,Ce)>=0)return"[Circular]";function kt(Di,Fa,Yl){if(Fa&&(De=j.call(De),De.push(Fa)),Yl){var Js={depth:Fe.depth};return st(Fe,"quoteStyle")&&(Js.quoteStyle=Fe.quoteStyle),Ee(Di,Js,Te+1,De)}return Ee(Di,Fe,Te+1,De)}if(typeof Ce=="function"&&!ue(Ce)){var Zn=Kt(Ce),Yr=Mr(Ce,kt);return"[Function"+(Zn?": "+Zn:" (anonymous)")+"]"+(Yr.length>0?" { "+M.call(Yr,", ")+" }":"")}if(We(Ce)){var ta=D?O.call(String(Ce),/^(Symbol\(.*\))_[^)]*$/,"$1"):G.call(Ce);return typeof Ce=="object"&&!D?tt(ta):ta}if(Ve(Ce)){for(var Xr="<"+R.call(String(Ce.nodeName)),Xs=Ce.attributes||[],ko=0;ko",Xr}if(ge(Ce)){if(Ce.length===0)return"[]";var na=Mr(Ce,kt);return Dt&&!an(na)?"["+$n(na,Dt)+"]":"[ "+M.call(na,", ")+" ]"}if(we(Ce)){var ra=Mr(Ce,kt);return!("cause"in Error.prototype)&&"cause"in Ce&&!U.call(Ce,"cause")?"{ ["+String(Ce)+"] "+M.call(k.call("[cause]: "+kt(Ce.cause),ra),", ")+" }":ra.length===0?"["+String(Ce)+"]":"{ ["+String(Ce)+"] "+M.call(ra,", ")+" }"}if(typeof Ce=="object"&&Vt){if(z&&typeof Ce[z]=="function"&&W)return W(Ce,{depth:gt-Te});if(Vt!=="symbol"&&typeof Ce.inspect=="function")return Ce.inspect()}if(un(Ce)){var ds=[];return r&&r.call(Ce,function(Di,Fa){ds.push(kt(Fa,Ce,!0)+" => "+kt(Di,Ce))}),Ot("Map",n.call(Ce),ds,Dt)}if(de(Ce)){var La=[];return s&&s.call(Ce,function(Di){La.push(kt(Di,Ce))}),Ot("Set",a.call(Ce),La,Dt)}if(on(Ce))return Tt("WeakMap");if(Se(Ce))return Tt("WeakSet");if(oe(Ce))return Tt("WeakRef");if(ye(Ce))return tt(kt(Number(Ce)));if(et(Ce))return tt(kt(L.call(Ce)));if(Xe(Ce))return tt(x.call(Ce));if(Ae(Ce))return tt(kt(String(Ce)));if(typeof window<"u"&&Ce===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ce===globalThis||typeof Fu<"u"&&Ce===Fu)return"{ [object globalThis] }";if(!he(Ce)&&!ue(Ce)){var Qs=Mr(Ce,kt),oa=Y?Y(Ce)===Object.prototype:Ce instanceof Object||Ce.constructor===Object,Ko=Ce instanceof Object?"":"null prototype",$a=!oa&&H&&Object(Ce)===Ce&&H in Ce?C.call(Ge(Ce),8,-1):Ko?"Object":"",hs=oa||typeof Ce.constructor!="function"?"":Ce.constructor.name?Ce.constructor.name+" ":"",Zs=hs+($a||Ko?"["+M.call(k.call([],$a||[],Ko||[]),": ")+"] ":"");return Qs.length===0?Zs+"{}":Dt?Zs+"{"+$n(Qs,Dt)+"}":Zs+"{ "+M.call(Qs,", ")+" }"}return String(Ce)};function ae(Ee,Ce,me){var Te=me.quoteStyle||Ce,De=X[Te];return De+Ee+De}function fe(Ee){return O.call(String(Ee),/"/g,""")}function ie(Ee){return!H||!(typeof Ee=="object"&&(H in Ee||typeof Ee[H]<"u"))}function ge(Ee){return Ge(Ee)==="[object Array]"&&ie(Ee)}function he(Ee){return Ge(Ee)==="[object Date]"&&ie(Ee)}function ue(Ee){return Ge(Ee)==="[object RegExp]"&&ie(Ee)}function we(Ee){return Ge(Ee)==="[object Error]"&&ie(Ee)}function Ae(Ee){return Ge(Ee)==="[object String]"&&ie(Ee)}function ye(Ee){return Ge(Ee)==="[object Number]"&&ie(Ee)}function Xe(Ee){return Ge(Ee)==="[object Boolean]"&&ie(Ee)}function We(Ee){if(D)return Ee&&typeof Ee=="object"&&Ee instanceof Symbol;if(typeof Ee=="symbol")return!0;if(!Ee||typeof Ee!="object"||!G)return!1;try{return G.call(Ee),!0}catch{}return!1}function et(Ee){if(!Ee||typeof Ee!="object"||!L)return!1;try{return L.call(Ee),!0}catch{}return!1}var ft=Object.prototype.hasOwnProperty||function(Ee){return Ee in this};function st(Ee,Ce){return ft.call(Ee,Ce)}function Ge(Ee){return y.call(Ee)}function Kt(Ee){if(Ee.name)return Ee.name;var Ce=_.call(w.call(Ee),/^function\s*([\w$]+)/);return Ce?Ce[1]:null}function gn(Ee,Ce){if(Ee.indexOf)return Ee.indexOf(Ce);for(var me=0,Te=Ee.length;meCe.maxStringLength){var me=Ee.length-Ce.maxStringLength,Te="... "+me+" more character"+(me>1?"s":"");return Ye(C.call(Ee,0,Ce.maxStringLength),Ce)+Te}var De=ee[Ce.quoteStyle||"single"];De.lastIndex=0;var Fe=O.call(O.call(Ee,De,"\\$1"),/[\x00-\x1f]/g,He);return ae(Fe,"single",Ce)}function He(Ee){var Ce=Ee.charCodeAt(0),me={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ce];return me?"\\"+me:"\\x"+(Ce<16?"0":"")+P.call(Ce.toString(16))}function tt(Ee){return"Object("+Ee+")"}function Tt(Ee){return Ee+" { ? }"}function Ot(Ee,Ce,me,Te){var De=Te?$n(me,Te):M.call(me,", ");return Ee+" ("+Ce+") {"+De+"}"}function an(Ee){for(var Ce=0;Ce=0)return!1;return!0}function tr(Ee,Ce){var me;if(Ee.indent===" ")me=" ";else if(typeof Ee.indent=="number"&&Ee.indent>0)me=M.call(Array(Ee.indent+1)," ");else return null;return{base:me,prev:M.call(Array(Ce+1),me)}}function $n(Ee,Ce){if(Ee.length===0)return"";var me=` +`+Ce.prev+Ce.base;return me+M.call(Ee,","+me)+` +`+Ce.prev}function Mr(Ee,Ce){var me=ge(Ee),Te=[];if(me){Te.length=Ee.length;for(var De=0;De"u"||!k?e:k(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&k?k(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":R,"%TypedArray%":G,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":$,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":M,"%Math.abs%":u,"%Math.floor%":c,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":x,"%Math.sign%":y,"%Reflect.getPrototypeOf%":j};if(k)try{null.error}catch(ue){var H=k(k(ue));D["%Error.prototype%"]=H}var U=function ue(we){var Ae;if(we==="%AsyncFunction%")Ae=_("async function () {}");else if(we==="%GeneratorFunction%")Ae=_("function* () {}");else if(we==="%AsyncGeneratorFunction%")Ae=_("async function* () {}");else if(we==="%AsyncGenerator%"){var ye=ue("%AsyncGeneratorFunction%");ye&&(Ae=ye.prototype)}else if(we==="%AsyncIteratorPrototype%"){var Xe=ue("%AsyncGenerator%");Xe&&k&&(Ae=k(Xe.prototype))}return D[we]=Ae,Ae},Y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},q=jO(),W=Fpe(),K=q.call(L,Array.prototype.concat),z=q.call($,Array.prototype.splice),X=q.call(L,String.prototype.replace),ee=q.call(L,String.prototype.slice),ae=q.call(L,RegExp.prototype.exec),fe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,ge=function(we){var Ae=ee(we,0,1),ye=ee(we,-1);if(Ae==="%"&&ye!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(ye==="%"&&Ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Xe=[];return X(we,fe,function(We,et,ft,st){Xe[Xe.length]=ft?X(st,ie,"$1"):et||We}),Xe},he=function(we,Ae){var ye=we,Xe;if(W(Y,ye)&&(Xe=Y[ye],ye="%"+Xe[0]+"%"),W(D,ye)){var We=D[ye];if(We===V&&(We=U(ye)),typeof We>"u"&&!Ae)throw new s("intrinsic "+we+" exists, but is not available. Please file an issue!");return{alias:Xe,name:ye,value:We}}throw new a("intrinsic "+we+" does not exist!")};return t2=function(we,Ae){if(typeof we!="string"||we.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ae!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ae(/^%?[^%]*%?$/,we)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ye=ge(we),Xe=ye.length>0?ye[0]:"",We=he("%"+Xe+"%",Ae),et=We.name,ft=We.value,st=!1,Ge=We.alias;Ge&&(Xe=Ge[0],z(ye,K([0,1],Ge)));for(var Kt=1,gn=!0;Kt=ye.length){var de=C(ft,un);gn=!!de,gn&&"get"in de&&!("originalValue"in de.get)?ft=de.get:ft=ft[un]}else gn=W(ft,un),ft=ft[un];gn&&!st&&(D[et]=ft)}}return ft},t2}var n2,rF;function GK(){if(rF)return n2;rF=1;var e=$3(),t=HK(),n=t([e("%String.prototype.indexOf%")]);return n2=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},n2}var r2,oF;function KK(){if(oF)return r2;oF=1;var e=$3(),t=GK(),n=MO(),r=jy(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return r2=!!o&&function(){var d,h={assert:function(p){if(!h.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var x=l(d,p);return u(d)===0&&(d=void 0),x}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,x){d||(d=new o),a(d,p,x)}};return h},r2}var o2,iF;function Bpe(){if(iF)return o2;iF=1;var e=$3(),t=GK(),n=MO(),r=KK(),o=jy(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return o2=i?function(){var d,h,p={assert:function(x){if(!p.has(x))throw new o("Side channel does not contain "+n(x))},delete:function(x){if(i&&x&&(typeof x=="object"||typeof x=="function")){if(d)return u(d,x)}else if(r&&h)return h.delete(x);return!1},get:function(x){return i&&x&&(typeof x=="object"||typeof x=="function")&&d?a(d,x):h&&h.get(x)},has:function(x){return i&&x&&(typeof x=="object"||typeof x=="function")&&d?l(d,x):!!h&&h.has(x)},set:function(x,y){i&&x&&(typeof x=="object"||typeof x=="function")?(d||(d=new i),s(d,x,y)):r&&(h||(h=r()),h.set(x,y))}};return p}:r,o2}var i2,aF;function YK(){if(aF)return i2;aF=1;var e=jy(),t=MO(),n=mpe(),r=KK(),o=Bpe(),i=o||r||n;return i2=function(){var s,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,c){s||(s=i()),s.set(u,c)}};return l},i2}var a2,sF;function F3(){if(sF)return a2;sF=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return a2={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},a2}var s2,lF;function XK(){if(lF)return s2;lF=1;var e=F3(),t=YK(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(k,M){return o.set(k,M),k},a=function(k){return o.has(k)},s=function(k){return o.get(k)},l=function(k,M){o.set(k,M)},u=(function(){for(var T=[],k=0;k<256;++k)T[T.length]="%"+((k<16?"0":"")+k.toString(16)).toUpperCase();return T})(),c=function(k){for(;k.length>1;){var M=k.pop(),j=M.obj[M.prop];if(r(j)){for(var $=[],L=0;Lj.arrayLimit)return i(d(k.concat(M),j),$);k[$]=M}else if(k&&typeof k=="object")if(a(k)){var L=s(k)+1;k[L]=M,l(k,L)}else{if(j&&j.strictMerge)return[k,M];(j&&(j.plainObjects||j.allowPrototypes)||!n.call(Object.prototype,M))&&(k[M]=!0)}else return[k,M];return k}if(!k||typeof k!="object"){if(a(M)){for(var V=Object.keys(M),G=j&&j.plainObjects?{__proto__:null,0:k}:{0:k},D=0;Dj.arrayLimit?i(d(U,j),U.length-1):U}var Y=k;return r(k)&&!r(M)&&(Y=d(k,j)),r(k)&&r(M)?(M.forEach(function(q,W){if(n.call(k,W)){var K=k[W];K&&typeof K=="object"&&q&&typeof q=="object"?k[W]=T(K,q,j):k[k.length]=q}else k[W]=q}),k):Object.keys(M).reduce(function(q,W){var K=M[W];if(n.call(q,W)?q[W]=T(q[W],K,j):q[W]=K,a(M)&&!a(q)&&i(q,s(M)),a(q)){var z=parseInt(W,10);String(z)===W&&z>=0&&z>s(q)&&l(q,z)}return q},Y)},p=function(k,M){return Object.keys(M).reduce(function(j,$){return j[$]=M[$],j},k)},x=function(T,k,M){var j=T.replace(/\+/g," ");if(M==="iso-8859-1")return j.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(j)}catch{return j}},y=1024,w=function(k,M,j,$,L){if(k.length===0)return k;var V=k;if(typeof k=="symbol"?V=Symbol.prototype.toString.call(k):typeof k!="string"&&(V=String(k)),j==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(W){return"%26%23"+parseInt(W.slice(2),16)+"%3B"});for(var G="",D=0;D=y?V.slice(D,D+y):V,U=[],Y=0;Y=48&&q<=57||q>=65&&q<=90||q>=97&&q<=122||L===e.RFC1738&&(q===40||q===41)){U[U.length]=H.charAt(Y);continue}if(q<128){U[U.length]=u[q];continue}if(q<2048){U[U.length]=u[192|q>>6]+u[128|q&63];continue}if(q<55296||q>=57344){U[U.length]=u[224|q>>12]+u[128|q>>6&63]+u[128|q&63];continue}Y+=1,q=65536+((q&1023)<<10|H.charCodeAt(Y)&1023),U[U.length]=u[240|q>>18]+u[128|q>>12&63]+u[128|q>>6&63]+u[128|q&63]}G+=U.join("")}return G},_=function(k){for(var M=[{obj:{o:k},prop:"o"}],j=[],$=0;$j?i(d(V,{plainObjects:$}),V.length-1):V},R=function(k,M){if(r(k)){for(var j=[],$=0;$"u"&&(K=0)}if(typeof j=="function"?q=j(_,q):q instanceof Date?q=V(q):C==="comma"&&i(q)&&(q=t.maybeMap(q,function(et){return et instanceof Date?V(et):et})),q===null){if(R)return D(M&&!H?M(_,c.encoder,U,"key",G):_);q=""}if(d(q)||t.isBuffer(q)){if(M){var ee=H?_:M(_,c.encoder,U,"key",G);return[D(ee)+"="+D(M(q,c.encoder,U,"value",G))]}return[D(_)+"="+D(String(q))]}var ae=[];if(typeof q>"u")return ae;var fe;if(C==="comma"&&i(q))H&&M&&(q=t.maybeMap(q,function(et){return et==null?et:M(et)})),fe=[{value:q.length>0?q.join(",")||null:void 0}];else if(i(j))fe=j;else{var ie=Object.keys(q);fe=$?ie.sort($):ie}var ge=k?String(_).replace(/\./g,"%2E"):String(_),he=O&&i(q)&&q.length===1?ge+"[]":ge;if(P&&i(q)&&q.length===0)return he+"[]";for(var ue=0;ue"u"?w.encodeDotInKeys===!0?!0:c.allowDots:!!w.allowDots;return{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:c.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof w.allowEmptyArrays=="boolean"?!!w.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:R,charset:_,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!w.commaRoundTrip,delimiter:typeof w.delimiter>"u"?c.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:c.encode,encodeDotInKeys:typeof w.encodeDotInKeys=="boolean"?w.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof w.encoder=="function"?w.encoder:c.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:c.encodeValuesOnly,filter:P,format:C,formatter:O,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:c.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:c.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:c.strictNullHandling}};return l2=function(y,w){var _=y,C=x(w),O,P;typeof C.filter=="function"?(P=C.filter,_=P("",_)):i(C.filter)&&(P=C.filter,O=P);var R=[];if(typeof _!="object"||_===null)return"";var T=o[C.arrayFormat],k=T==="comma"&&C.commaRoundTrip;O||(O=Object.keys(_)),C.sort&&O.sort(C.sort);for(var M=e(),j=0;j"u"||$===null)){var L=_[$];C.skipNulls&&L===null||s(R,p(L,$,T,k,C.allowEmptyArrays,C.strictNullHandling,C.skipNulls,C.encodeDotInKeys,C.encode?C.encoder:null,C.filter,C.sort,C.allowDots,C.serializeDate,C.format,C.formatter,C.encodeValuesOnly,C.charset,M))}}var V=R.join(C.delimiter),G=C.addQueryPrefix===!0?"?":"";return C.charsetSentinel&&(C.charset==="iso-8859-1"?G+="utf8=%26%2310003%3B"+C.delimiter:G+="utf8=%E2%9C%93"+C.delimiter),V.length>0?G+V:""},l2}var u2,cF;function qpe(){if(cF)return u2;cF=1;var e=XK(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(x,y){return String.fromCharCode(parseInt(y,10))})},i=function(p,x,y){if(p&&typeof p=="string"&&x.comma&&p.indexOf(",")>-1)return p.split(",");if(x.throwOnLimitExceeded&&y>=x.arrayLimit)throw new RangeError("Array limit exceeded. Only "+x.arrayLimit+" element"+(x.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(x,y){var w={__proto__:null},_=y.ignoreQueryPrefix?x.replace(/^\?/,""):x;_=_.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var C=y.parameterLimit===1/0?void 0:y.parameterLimit,O=_.split(y.delimiter,y.throwOnLimitExceeded&&typeof C<"u"?C+1:C);if(y.throwOnLimitExceeded&&typeof C<"u"&&O.length>C)throw new RangeError("Parameter limit exceeded. Only "+C+" parameter"+(C===1?"":"s")+" allowed.");var P=-1,R,T=y.charset;if(y.charsetSentinel)for(R=0;R-1&&(L=n(L)?[L]:L),y.comma&&n(L)&&L.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");L=e.combine([],L,y.arrayLimit,y.plainObjects)}if($!==null){var V=t.call(w,$);V&&(y.duplicates==="combine"||k.indexOf("[]=")>-1)?w[$]=e.combine(w[$],L,y.arrayLimit,y.plainObjects):(!V||y.duplicates==="last")&&(w[$]=L)}}return w},u=function(p,x,y,w){var _=0;if(p.length>0&&p[p.length-1]==="[]"){var C=p.slice(0,-1).join("");_=Array.isArray(x)&&x[C]?x[C].length:0}for(var O=w?x:i(x,y,_),P=p.length-1;P>=0;--P){var R,T=p[P];if(T==="[]"&&y.parseArrays)e.isOverflow(O)?R=O:R=y.allowEmptyArrays&&(O===""||y.strictNullHandling&&O===null)?[]:e.combine([],O,y.arrayLimit,y.plainObjects);else{R=y.plainObjects?{__proto__:null}:{};var k=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,M=y.decodeDotInKeys?k.replace(/%2E/g,"."):k,j=parseInt(M,10),$=!isNaN(j)&&T!==M&&String(j)===M&&j>=0&&y.parseArrays;if(!y.parseArrays&&M==="")R={0:O};else if($&&j=0?w.slice(0,C):w;if(O){if(!y.plainObjects&&t.call(Object.prototype,O)&&!y.allowPrototypes)return;_[_.length]=O}for(var P=w.length,R=C,T=0;R>=0&&T=0){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");_[_.length]="["+w.slice(R)+"]"}return _},d=function(x,y,w,_){if(x){var C=c(x,w);if(C)return u(C,y,w,_)}},h=function(x){if(!x)return r;if(typeof x.allowEmptyArrays<"u"&&typeof x.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof x.decodeDotInKeys<"u"&&typeof x.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(x.decoder!==null&&typeof x.decoder<"u"&&typeof x.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof x.charset<"u"&&x.charset!=="utf-8"&&x.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof x.throwOnLimitExceeded<"u"&&typeof x.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof x.charset>"u"?r.charset:x.charset,w=typeof x.duplicates>"u"?r.duplicates:x.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var _=typeof x.allowDots>"u"?x.decodeDotInKeys===!0?!0:r.allowDots:!!x.allowDots;return{allowDots:_,allowEmptyArrays:typeof x.allowEmptyArrays=="boolean"?!!x.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof x.allowPrototypes=="boolean"?x.allowPrototypes:r.allowPrototypes,allowSparse:typeof x.allowSparse=="boolean"?x.allowSparse:r.allowSparse,arrayLimit:typeof x.arrayLimit=="number"?x.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof x.charsetSentinel=="boolean"?x.charsetSentinel:r.charsetSentinel,comma:typeof x.comma=="boolean"?x.comma:r.comma,decodeDotInKeys:typeof x.decodeDotInKeys=="boolean"?x.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof x.decoder=="function"?x.decoder:r.decoder,delimiter:typeof x.delimiter=="string"||e.isRegExp(x.delimiter)?x.delimiter:r.delimiter,depth:typeof x.depth=="number"||x.depth===!1?+x.depth:r.depth,duplicates:w,ignoreQueryPrefix:x.ignoreQueryPrefix===!0,interpretNumericEntities:typeof x.interpretNumericEntities=="boolean"?x.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof x.parameterLimit=="number"?x.parameterLimit:r.parameterLimit,parseArrays:x.parseArrays!==!1,plainObjects:typeof x.plainObjects=="boolean"?x.plainObjects:r.plainObjects,strictDepth:typeof x.strictDepth=="boolean"?!!x.strictDepth:r.strictDepth,strictMerge:typeof x.strictMerge=="boolean"?!!x.strictMerge:r.strictMerge,strictNullHandling:typeof x.strictNullHandling=="boolean"?x.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof x.throwOnLimitExceeded=="boolean"?x.throwOnLimitExceeded:!1}};return u2=function(p,x){var y=h(x);if(p===""||p===null||typeof p>"u")return y.plainObjects?{__proto__:null}:{};for(var w=typeof p=="string"?l(p,y):p,_=y.plainObjects?{__proto__:null}:{},C=Object.keys(w),O=0;OB3.stringify(e,{arrayFormat:"repeat"})}),Cn=new upe({paramsSerializer:e=>B3.stringify(e,{arrayFormat:"repeat"})}),Mt=new fpe({paramsSerializer:e=>B3.stringify(e,{arrayFormat:"repeat"})});rt.instance.interceptors.request.use(eY);Cn.instance.interceptors.request.use(eY);const ZK="controlPlaneLastTenant";function Hpe(){var e;try{const t=localStorage.getItem(ZK);return t?((e=JSON.parse(t).metadata)==null?void 0:e.id)??null:null}catch{return null}}function Gpe(e){const t=e.split("/").filter(Boolean),n=t.indexOf("tenants");if(n===-1)return null;const r=t[n+1];return!r||!QK(r)?null:r}function Kpe(){return typeof window>"u"?null:Gpe(window.location.pathname)}function Ype(e){return e.xTenantId??Kpe()??Hpe()}const JK={queryKey:["control-plane-metadata:get"],queryFn:async()=>{try{return await Mt.metadataGet()}catch{return null}},staleTime:1e3*60};async function IO(){const e=await Ds.fetchQuery(JK);return{meta:e,isControlPlaneEnabled:BK(e==null?void 0:e.data)}}async function Xpe(){return(await IO()).isControlPlaneEnabled}async function eY(e){if(!(e.xResources??[]).includes("tenant")&&!e.useExchangeToken)return e;const n=await Xpe(),r=Ype(e);if(!n||!r)return e;try{const o=await Ds.fetchQuery(ZG(r,()=>Mt.exchangeTokenCreate(r).then(i=>i.data)));e.baseURL=o.apiUrl,e.withCredentials=!1,e.headers.set("Authorization",`Bearer ${o.token}`),e.headers.set("X-Exchange-Token","true")}catch(o){console.error("[exchange-token interceptor] failed to get token",{url:e.url,tenantId:r,err:o})}return e}function Iy(){var n,r;const e=In({...JK,refetchOnMount:"always"});return{isControlPlaneEnabled:b.useMemo(()=>{var o;return BK((o=e.data)==null?void 0:o.data)},[(n=e.data)==null?void 0:n.data]),isControlPlaneLoading:e.isLoading,controlPlaneMeta:(r=e.data)==null?void 0:r.data}}const Qpe=e=>!!e&&!(e!=null&&e.errors),DO={queryKey:["cloud-metadata:get"],retry:!1,queryFn:async()=>{try{const{data:e}=await Cn.metadataGet(),t=Qpe(e);if(t)return console.log("🪓☁️"),{...e,isCloudEnabled:t};console.log("\x1B[33m🪓 Thanks for self-hosting Hatchet!\x1B[0m"),console.log("For support, please contact support@hatchet.run,"),console.log("Join our Discord server at https://hatchet.run/discord,"),console.log("or visit https://docs.hatchet.run/self-hosting")}catch(e){console.error("Failed to get cloud metadata",e)}return{isCloudEnabled:!1}},staleTime:1e3*60};function z3(e){var i,a,s,l,u;const t=In(DO),{isControlPlaneEnabled:n,controlPlaneMeta:r}=Iy(),o=In({queryKey:["feature-flags:list",e],retry:!1,enabled:(n||((i=t.data)==null?void 0:i.isCloudEnabled))&&!!e,queryFn:async()=>{try{return e===void 0?null:await Cn.featureFlagsList(e)}catch{return null}},staleTime:1e3*60});return n?{cloud:{canBill:(r==null?void 0:r.canBill)??!1,canLinkGithub:!0,metricsEnabled:!0,requireBillingForManagedCompute:!0,inactivityLogoutMs:r==null?void 0:r.inactivityLogoutMs},isCloudEnabled:!0,isCloudLoaded:!0,isCloudLoading:!1,featureFlags:((a=o.data)==null?void 0:a.data)||null}:t.data&&t.data.isCloudEnabled?{cloud:t.data,isCloudEnabled:t.data.isCloudEnabled,isCloudLoaded:!0,isCloudLoading:t.isLoading,featureFlags:((s=o.data)==null?void 0:s.data)||null}:{isCloudEnabled:!1,isCloudLoaded:t.isSuccess,isCloudLoading:t.isLoading,featureFlags:((l=o.data)==null?void 0:l.data)||null,cloud:(u=t==null?void 0:t.data)!=null&&u.isCloudEnabled?t.data:null}}function tY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t0)return a(c);if(h==="number"&&isFinite(c))return d.long?l(c):s(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function a(c){if(c=String(c),!(c.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(d){var h=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*o;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function s(c){var d=Math.abs(c);return d>=r?Math.round(c/r)+"d":d>=n?Math.round(c/n)+"h":d>=t?Math.round(c/t)+"m":d>=e?Math.round(c/e)+"s":c+"ms"}function l(c){var d=Math.abs(c);return d>=r?u(c,d,r,"day"):d>=n?u(c,d,n,"hour"):d>=t?u(c,d,t,"minute"):d>=e?u(c,d,e,"second"):c+" ms"}function u(c,d,h,p){var x=d>=h*1.5;return Math.round(c/h)+" "+p+(x?"s":"")}return f2}var Jpe=Zpe();const eme=Ln(Jpe),tme=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),nY=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wE="-",hF=[],rme="arbitrary..",ome=e=>{const t=ame(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return ime(a);const s=a.split(wE),l=s[0]===""&&s.length>1?1:0;return rY(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],u=n[a];return l?u?tme(u,l):l:u||hF}return n[a]||hF}}},rY=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=rY(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const s=t===0?e.join(wE):e.slice(t).join(wE),l=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?rme+r:void 0})(),ame=e=>{const{theme:t,classGroups:n}=e;return sme(n,t)},sme=(e,t)=>{const n=nY();for(const r in e){const o=e[r];q3(o,n,r,t)}return n},q3=(e,t,n,r)=>{const o=e.length;for(let i=0;i{if(typeof e=="string"){ume(e,t,n);return}if(typeof e=="function"){cme(e,t,n,r);return}fme(e,t,n,r)},ume=(e,t,n)=>{const r=e===""?t:oY(t,e);r.classGroupId=n},cme=(e,t,n,r)=>{if(dme(e)){q3(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(nme(n,e))},fme=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a{let n=e;const r=t.split(wE),o=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,hme=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},_I="!",pF=":",pme=[],mF=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),mme=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,u;const c=o.length;for(let y=0;yl?u-l:void 0;return mF(i,p,h,x)};if(t){const o=t+pF,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):mF(pme,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},gme=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},vme=e=>({cache:hme(e.cacheSize),parseClassName:mme(e),sortModifiers:gme(e),...ome(e)}),yme=/\s+/,wme=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(yme);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:y}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let w=!!y,_=r(w?x.substring(0,y):x);if(!_){if(!w){l=c+(l.length>0?" "+l:l);continue}if(_=r(x),!_){l=c+(l.length>0?" "+l:l);continue}w=!1}const C=h.length===0?"":h.length===1?h[0]:i(h).join(":"),O=p?C+_I:C,P=O+_;if(a.indexOf(P)>-1)continue;a.push(P);const R=o(_,w);for(let T=0;T0?" "+l:l)}return l},xme=(...e)=>{let t=0,n,r,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,o,i;const a=l=>{const u=t.reduce((c,d)=>d(c),e());return n=vme(u),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const u=r(l);if(u)return u;const c=wme(l,n);return o(l,c),c};return i=a,(...l)=>i(xme(...l))},Sme=[],So=e=>{const t=n=>n[e]||Sme;return t.isThemeGetter=!0,t},aY=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sY=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_me=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Eme=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cme=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ome=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rme=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pme=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,id=e=>_me.test(e),En=e=>!!e&&!Number.isNaN(Number(e)),ad=e=>!!e&&Number.isInteger(Number(e)),d2=e=>e.endsWith("%")&&En(e.slice(0,-1)),$c=e=>Eme.test(e),lY=()=>!0,Tme=e=>Cme.test(e)&&!Ome.test(e),U3=()=>!1,Ame=e=>Rme.test(e),kme=e=>Pme.test(e),Nme=e=>!Et(e)&&!Rt(e),Mme=e=>Qd(e,fY,U3),Et=e=>aY.test(e),cp=e=>Qd(e,dY,Tme),gF=e=>Qd(e,zme,En),jme=e=>Qd(e,pY,lY),Ime=e=>Qd(e,hY,U3),vF=e=>Qd(e,uY,U3),Dme=e=>Qd(e,cY,kme),t_=e=>Qd(e,mY,Ame),Rt=e=>sY.test(e),y1=e=>gm(e,dY),Lme=e=>gm(e,hY),yF=e=>gm(e,uY),$me=e=>gm(e,fY),Fme=e=>gm(e,cY),n_=e=>gm(e,mY,!0),Bme=e=>gm(e,pY,!0),Qd=(e,t,n)=>{const r=aY.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gm=(e,t,n=!1)=>{const r=sY.exec(e);return r?r[1]?t(r[1]):n:!1},uY=e=>e==="position"||e==="percentage",cY=e=>e==="image"||e==="url",fY=e=>e==="length"||e==="size"||e==="bg-size",dY=e=>e==="length",zme=e=>e==="number",hY=e=>e==="family-name",pY=e=>e==="number"||e==="weight",mY=e=>e==="shadow",qme=()=>{const e=So("color"),t=So("font"),n=So("text"),r=So("font-weight"),o=So("tracking"),i=So("leading"),a=So("breakpoint"),s=So("container"),l=So("spacing"),u=So("radius"),c=So("shadow"),d=So("inset-shadow"),h=So("text-shadow"),p=So("drop-shadow"),x=So("blur"),y=So("perspective"),w=So("aspect"),_=So("ease"),C=So("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...P(),Rt,Et],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],M=()=>[Rt,Et,l],j=()=>[id,"full","auto",...M()],$=()=>[ad,"none","subgrid",Rt,Et],L=()=>["auto",{span:["full",ad,Rt,Et]},ad,Rt,Et],V=()=>[ad,"auto",Rt,Et],G=()=>["auto","min","max","fr",Rt,Et],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...M()],Y=()=>[id,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],q=()=>[id,"screen","full","dvw","lvw","svw","min","max","fit",...M()],W=()=>[id,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],K=()=>[e,Rt,Et],z=()=>[...P(),yF,vF,{position:[Rt,Et]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",$me,Mme,{size:[Rt,Et]}],ae=()=>[d2,y1,cp],fe=()=>["","none","full",u,Rt,Et],ie=()=>["",En,y1,cp],ge=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[En,d2,yF,vF],we=()=>["","none",x,Rt,Et],Ae=()=>["none",En,Rt,Et],ye=()=>["none",En,Rt,Et],Xe=()=>[En,Rt,Et],We=()=>[id,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$c],breakpoint:[$c],color:[lY],container:[$c],"drop-shadow":[$c],ease:["in","out","in-out"],font:[Nme],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$c],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$c],shadow:[$c],spacing:["px",En],text:[$c],"text-shadow":[$c],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",id,Et,Rt,w]}],container:["container"],columns:[{columns:[En,Et,Rt,s]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ad,"auto",Rt,Et]}],basis:[{basis:[id,"full","auto",s,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[En,id,"auto","initial","none",Et]}],grow:[{grow:["",En,Rt,Et]}],shrink:[{shrink:["",En,Rt,Et]}],order:[{order:[ad,"first","last","none",Rt,Et]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[s,"screen",...Y()]}],"min-w":[{"min-w":[s,"screen","none",...Y()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,y1,cp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Bme,jme]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",d2,Et]}],"font-family":[{font:[Lme,Ime,t]}],"font-features":[{"font-features":[Et]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Rt,Et]}],"line-clamp":[{"line-clamp":[En,"none",Rt,gF]}],leading:[{leading:[i,...M()]}],"list-image":[{"list-image":["none",Rt,Et]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Rt,Et]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[En,"from-font","auto",Rt,cp]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[En,"auto",Rt,Et]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Rt,Et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Rt,Et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ad,Rt,Et],radial:["",Rt,Et],conic:[ad,Rt,Et]},Fme,Dme]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[En,Rt,Et]}],"outline-w":[{outline:["",En,y1,cp]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",c,n_,t_]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,n_,t_]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[En,cp]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",h,n_,t_]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[En,Rt,Et]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[En]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Rt,Et]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[En]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Rt,Et]}],filter:[{filter:["","none",Rt,Et]}],blur:[{blur:we()}],brightness:[{brightness:[En,Rt,Et]}],contrast:[{contrast:[En,Rt,Et]}],"drop-shadow":[{"drop-shadow":["","none",p,n_,t_]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",En,Rt,Et]}],"hue-rotate":[{"hue-rotate":[En,Rt,Et]}],invert:[{invert:["",En,Rt,Et]}],saturate:[{saturate:[En,Rt,Et]}],sepia:[{sepia:["",En,Rt,Et]}],"backdrop-filter":[{"backdrop-filter":["","none",Rt,Et]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[En,Rt,Et]}],"backdrop-contrast":[{"backdrop-contrast":[En,Rt,Et]}],"backdrop-grayscale":[{"backdrop-grayscale":["",En,Rt,Et]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[En,Rt,Et]}],"backdrop-invert":[{"backdrop-invert":["",En,Rt,Et]}],"backdrop-opacity":[{"backdrop-opacity":[En,Rt,Et]}],"backdrop-saturate":[{"backdrop-saturate":[En,Rt,Et]}],"backdrop-sepia":[{"backdrop-sepia":["",En,Rt,Et]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Rt,Et]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[En,"initial",Rt,Et]}],ease:[{ease:["linear","initial",_,Rt,Et]}],delay:[{delay:[En,Rt,Et]}],animate:[{animate:["none",C,Rt,Et]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Rt,Et]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Ae()}],"rotate-x":[{"rotate-x":Ae()}],"rotate-y":[{"rotate-y":Ae()}],"rotate-z":[{"rotate-z":Ae()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Xe()}],"skew-x":[{"skew-x":Xe()}],"skew-y":[{"skew-y":Xe()}],transform:[{transform:[Rt,Et,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Rt,Et]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Rt,Et]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[En,y1,cp,gF]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ume=bme(qme);function je(...e){return Ume(jn(e))}function Vme(e){const t={};if(!e.errors)return t;for(const n of e.errors)n.field&&n.description&&(t[n.field]=n.description);return t}function LO(e){if(e){if(e.length==0)return e;if(e.length==1)return e.charAt(0).toUpperCase()}else return"";return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()}function GJe(e){if(!e)return"N/A";const t=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),n=Wme(e);if(!n)return"N/A";let r=n.time;return n.when==="past"&&(r=-r),LO(t.format(r,n.unitOfTime))}function Wme(e,t){const n=new Date(e).getTime();if(!n)return;let r=new Date().getTime(),o=n/1e3-r/1e3;const i={when:"now",unitOfTime:"seconds",time:0};return o>0?i.when="future":o<-1&&(i.when="past"),o=Math.abs(o),o/(3600*24*365)>1?(i.unitOfTime="years",i.time=Math.floor(o/(3600*24*365))):o/(3600*24*45)>1?(i.unitOfTime="months",i.time=Math.floor(o/(3600*24*45))):o/(3600*24)>1?(i.unitOfTime="days",i.time=Math.floor(o/(3600*24))):o/3600>1?(i.unitOfTime="hours",i.time=Math.floor(o/3600)):o/60>1?(i.unitOfTime="minutes",i.time=Math.floor(o/60)):(i.unitOfTime="seconds",i.time=Math.floor(o)),i}function gY(e){if(e<0)return"0s";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5)return`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`;{const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return`${t}h ${n}m ${r}s`}}const vY="00000000-0000-0000-0000-000000000000";function KJe(e){const t=e.trim();if(!t)return null;if(t==="-1")return-1;const n=t.match(/\d+\s*[a-z]+/gi);if(!n)return null;let r=0;for(const o of n){const i=eme(o.replace(/\s/g,""));if(typeof i!="number"||isNaN(i))return null;r+=i}return r>0?r:null}function YJe(e){if(e<=0)return"";let t=e;const n=Math.floor(t/864e5);t-=n*864e5;const r=Math.floor(t/36e5);t-=r*36e5;const o=Math.floor(t/6e4);t-=o*6e4;const i=Math.floor(t/1e3);return t-=i*1e3,[n&&`${n}d`,r&&`${r}h`,o&&`${o}m`,i&&`${i}s`,t&&`${t}ms`].filter(Boolean).join("")}const wF=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xF=jn,Ul=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xF(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const h=wF(c)||wF(d);return o[u][h]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(x=>{let[y,w]=x;return Array.isArray(w)?w.includes({...i,...s}[y]):{...i,...s}[y]===w})?[...u,d,h]:u},[]);return xF(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},Hme=Ul("rounded-lg border",{variants:{variant:{default:"rounded-xl bg-card text-card-foreground shadow",light:"bg-gray-50/50 border-gray-200 dark:bg-gray-800/20 dark:border-gray-700"}},defaultVariants:{variant:"default"}}),yY=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,className:je(Hme({variant:t}),e),...n}));yY.displayName="Card";const wY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("flex flex-col space-y-0.5 p-4",e),...t}));wY.displayName="CardHeader";const Gme=b.forwardRef(({className:e,...t},n)=>v.jsx("h3",{ref:n,className:je("text-sm font-semibold leading-tight",e),...t}));Gme.displayName="CardTitle";const Kme=b.forwardRef(({className:e,...t},n)=>v.jsx("p",{ref:n,className:je("text-xs text-muted-foreground leading-snug",e),...t}));Kme.displayName="CardDescription";const xY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("px-4 pb-4 pt-0",e),...t}));xY.displayName="CardContent";const bY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("flex items-center p-6 pt-0",e),...t}));bY.displayName="CardFooter";function $O({title:e,description:t,icon:n,actions:r,children:o,className:i}){return v.jsx("div",{className:"flex h-full w-full flex-1 flex-row items-center justify-center p-6",children:v.jsxs(yY,{className:je("w-full max-w-xl border-border/60 bg-background shadow-sm",i),children:[v.jsxs(wY,{className:"pb-3 text-center",children:[n&&v.jsx("div",{className:"mx-auto mb-2 flex h-10 w-10 items-center justify-center rounded-md border bg-muted/30 text-foreground/80",children:n}),v.jsx("div",{className:"text-xl font-semibold tracking-tight sm:text-2xl",children:e}),t&&v.jsx("div",{className:"mx-auto max-w-prose text-sm text-muted-foreground",children:t})]}),o&&v.jsx(xY,{className:"pt-0",children:v.jsx("div",{className:"space-y-3",children:o})}),r&&v.jsx(bY,{className:"flex flex-col gap-2 sm:flex-row sm:justify-center",children:r})]})})}const Yme=Ul("inline-flex items-center rounded-md border px-3 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",successful:"border-transparent rounded-sm font-normal text-green-800 dark:text-green-300 bg-green-500/20 ring-green-500/30",failed:"border-transparent rounded-sm font-normal text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500/30",inProgress:"border-transparent rounded-sm font-normal text-yellow-800 dark:text-yellow-300 bg-yellow-500/20 ring-yellow-500/30",outlineDestructive:"border border-destructive rounded-sm font-normal text-red-800 dark:text-red-300 bg-transparent",queued:"border-transparent rounded-sm font-normal text-slate-800 dark:text-slate-300 bg-slate-500/20 ring-slate-500/30",cancelled:"border-transparent rounded-sm font-normal text-orange-800 dark:text-orange-300 bg-orange-500/20 ring-orange-500/30",evicted:"border-transparent rounded-sm font-normal text-indigo-800 dark:text-indigo-300 bg-indigo-500/20 ring-indigo-500/30"}},defaultVariants:{variant:"default"}});function Ti({className:e,variant:t,...n}){return v.jsx("span",{className:je(Yme({variant:t}),e),...n})}function Ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function bF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=bF(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{const{children:a,...s}=i,l=b.useMemo(()=>s,Object.values(s));return v.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function fs(e,t=[]){let n=[];function r(i,a){const s=b.createContext(a),l=n.length;n=[...n,a];const u=d=>{var _;const{scope:h,children:p,...x}=d,y=((_=h==null?void 0:h[e])==null?void 0:_[l])||s,w=b.useMemo(()=>x,Object.values(x));return v.jsx(y.Provider,{value:w,children:p})};u.displayName=i+"Provider";function c(d,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[l])||s,x=b.useContext(p);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(a=>b.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Qme(o,...t)]}function Qme(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var h2={exports:{}},wa={},p2={exports:{}},m2={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var SF;function Zme(){return SF||(SF=1,(function(e){function t(q,W){var K=q.length;q.push(W);e:for(;0>>1,X=q[z];if(0>>1;zo(fe,K))ieo(ge,fe)?(q[z]=ge,q[ie]=K,z=ie):(q[z]=fe,q[ae]=K,z=ae);else if(ieo(ge,K))q[z]=ge,q[ie]=K,z=ie;else break e}}return W}function o(q,W){var K=q.sortIndex-W.sortIndex;return K!==0?K:q.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,h=3,p=!1,x=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(q){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=q)r(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(u)}}function P(q){if(y=!1,O(q),!x)if(n(l)!==null)x=!0,U(R);else{var W=n(u);W!==null&&Y(P,W.startTime-q)}}function R(q,W){x=!1,y&&(y=!1,_(M),M=-1),p=!0;var K=h;try{for(O(W),d=n(l);d!==null&&(!(d.expirationTime>W)||q&&!L());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var X=z(d.expirationTime<=W);W=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(l)&&r(l),O(W)}else r(l);d=n(l)}if(d!==null)var ee=!0;else{var ae=n(u);ae!==null&&Y(P,ae.startTime-W),ee=!1}return ee}finally{d=null,h=K,p=!1}}var T=!1,k=null,M=-1,j=5,$=-1;function L(){return!(e.unstable_now()-$q||125z?(q.sortIndex=K,t(u,q),n(l)===null&&q===n(u)&&(y?(_(M),M=-1):y=!0,Y(P,K-z))):(q.sortIndex=X,t(l,q),x||p||(x=!0,U(R))),q},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(q){var W=h;return function(){var K=h;h=W;try{return q.apply(this,arguments)}finally{h=K}}}})(m2)),m2}var _F;function Jme(){return _F||(_F=1,p2.exports=Zme()),p2.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var EF;function ege(){if(EF)return wa;EF=1;var e=zx(),t=Jme();function n(f){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+f,E=1;E"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,c={},d={};function h(f){return l.call(d,f)?!0:l.call(c,f)?!1:u.test(f)?d[f]=!0:(c[f]=!0,!1)}function p(f,m,E,A){if(E!==null&&E.type===0)return!1;switch(typeof m){case"function":case"symbol":return!0;case"boolean":return A?!1:E!==null?!E.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function x(f,m,E,A){if(m===null||typeof m>"u"||p(f,m,E,A))return!0;if(A)return!1;if(E!==null)switch(E.type){case 3:return!m;case 4:return m===!1;case 5:return isNaN(m);case 6:return isNaN(m)||1>m}return!1}function y(f,m,E,A,I,B,Z){this.acceptsBooleans=m===2||m===3||m===4,this.attributeName=A,this.attributeNamespace=I,this.mustUseProperty=E,this.propertyName=f,this.type=m,this.sanitizeURL=B,this.removeEmptyString=Z}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){w[f]=new y(f,0,!1,f,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var m=f[0];w[m]=new y(m,1,!1,f[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(f){w[f]=new y(f,2,!1,f.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){w[f]=new y(f,2,!1,f,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(f){w[f]=new y(f,3,!1,f.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(f){w[f]=new y(f,3,!0,f,null,!1,!1)}),["capture","download"].forEach(function(f){w[f]=new y(f,4,!1,f,null,!1,!1)}),["cols","rows","size","span"].forEach(function(f){w[f]=new y(f,6,!1,f,null,!1,!1)}),["rowSpan","start"].forEach(function(f){w[f]=new y(f,5,!1,f.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function C(f){return f[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(f){w[f]=new y(f,1,!1,f.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(f){w[f]=new y(f,1,!1,f.toLowerCase(),null,!0,!0)});function O(f,m,E,A){var I=w.hasOwnProperty(m)?w[m]:null;(I!==null?I.type!==0:A||!(2se||I[Z]!==B[se]){var pe=` +`+I[Z].replace(" at new "," at ");return f.displayName&&pe.includes("")&&(pe=pe.replace("",f.displayName)),pe}while(1<=Z&&0<=se);break}}}finally{ee=!1,Error.prepareStackTrace=E}return(f=f?f.displayName||f.name:"")?X(f):""}function fe(f){switch(f.tag){case 5:return X(f.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return f=ae(f.type,!1),f;case 11:return f=ae(f.type.render,!1),f;case 1:return f=ae(f.type,!0),f;default:return""}}function ie(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case k:return"Fragment";case T:return"Portal";case j:return"Profiler";case M:return"StrictMode";case G:return"Suspense";case D:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case L:return(f.displayName||"Context")+".Consumer";case $:return(f._context.displayName||"Context")+".Provider";case V:var m=f.render;return f=f.displayName,f||(f=m.displayName||m.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case H:return m=f.displayName||null,m!==null?m:ie(f.type)||"Memo";case U:m=f._payload,f=f._init;try{return ie(f(m))}catch{}}return null}function ge(f){var m=f.type;switch(f.tag){case 24:return"Cache";case 9:return(m.displayName||"Context")+".Consumer";case 10:return(m._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=m.render,f=f.displayName||f.name||"",m.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return m;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ie(m);case 8:return m===M?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m}return null}function he(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function ue(f){var m=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function we(f){var m=ue(f)?"checked":"value",E=Object.getOwnPropertyDescriptor(f.constructor.prototype,m),A=""+f[m];if(!f.hasOwnProperty(m)&&typeof E<"u"&&typeof E.get=="function"&&typeof E.set=="function"){var I=E.get,B=E.set;return Object.defineProperty(f,m,{configurable:!0,get:function(){return I.call(this)},set:function(Z){A=""+Z,B.call(this,Z)}}),Object.defineProperty(f,m,{enumerable:E.enumerable}),{getValue:function(){return A},setValue:function(Z){A=""+Z},stopTracking:function(){f._valueTracker=null,delete f[m]}}}}function Ae(f){f._valueTracker||(f._valueTracker=we(f))}function ye(f){if(!f)return!1;var m=f._valueTracker;if(!m)return!0;var E=m.getValue(),A="";return f&&(A=ue(f)?f.checked?"true":"false":f.value),f=A,f!==E?(m.setValue(f),!0):!1}function Xe(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function We(f,m){var E=m.checked;return K({},m,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:E??f._wrapperState.initialChecked})}function et(f,m){var E=m.defaultValue==null?"":m.defaultValue,A=m.checked!=null?m.checked:m.defaultChecked;E=he(m.value!=null?m.value:E),f._wrapperState={initialChecked:A,initialValue:E,controlled:m.type==="checkbox"||m.type==="radio"?m.checked!=null:m.value!=null}}function ft(f,m){m=m.checked,m!=null&&O(f,"checked",m,!1)}function st(f,m){ft(f,m);var E=he(m.value),A=m.type;if(E!=null)A==="number"?(E===0&&f.value===""||f.value!=E)&&(f.value=""+E):f.value!==""+E&&(f.value=""+E);else if(A==="submit"||A==="reset"){f.removeAttribute("value");return}m.hasOwnProperty("value")?Kt(f,m.type,E):m.hasOwnProperty("defaultValue")&&Kt(f,m.type,he(m.defaultValue)),m.checked==null&&m.defaultChecked!=null&&(f.defaultChecked=!!m.defaultChecked)}function Ge(f,m,E){if(m.hasOwnProperty("value")||m.hasOwnProperty("defaultValue")){var A=m.type;if(!(A!=="submit"&&A!=="reset"||m.value!==void 0&&m.value!==null))return;m=""+f._wrapperState.initialValue,E||m===f.value||(f.value=m),f.defaultValue=m}E=f.name,E!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,E!==""&&(f.name=E)}function Kt(f,m,E){(m!=="number"||Xe(f.ownerDocument)!==f)&&(E==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+E&&(f.defaultValue=""+E))}var gn=Array.isArray;function un(f,m,E,A){if(f=f.options,m){m={};for(var I=0;I"+m.valueOf().toString()+"",m=He.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;m.firstChild;)f.appendChild(m.firstChild)}});function Tt(f,m){if(m){var E=f.firstChild;if(E&&E===f.lastChild&&E.nodeType===3){E.nodeValue=m;return}}f.textContent=m}var Ot={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},an=["Webkit","ms","Moz","O"];Object.keys(Ot).forEach(function(f){an.forEach(function(m){m=m+f.charAt(0).toUpperCase()+f.substring(1),Ot[m]=Ot[f]})});function tr(f,m,E){return m==null||typeof m=="boolean"||m===""?"":E||typeof m!="number"||m===0||Ot.hasOwnProperty(f)&&Ot[f]?(""+m).trim():m+"px"}function $n(f,m){f=f.style;for(var E in m)if(m.hasOwnProperty(E)){var A=E.indexOf("--")===0,I=tr(E,m[E],A);E==="float"&&(E="cssFloat"),A?f.setProperty(E,I):f[E]=I}}var Mr=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(f,m){if(m){if(Mr[f]&&(m.children!=null||m.dangerouslySetInnerHTML!=null))throw Error(n(137,f));if(m.dangerouslySetInnerHTML!=null){if(m.children!=null)throw Error(n(60));if(typeof m.dangerouslySetInnerHTML!="object"||!("__html"in m.dangerouslySetInnerHTML))throw Error(n(61))}if(m.style!=null&&typeof m.style!="object")throw Error(n(62))}}function Ce(f,m){if(f.indexOf("-")===-1)return typeof m.is=="string";switch(f){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var me=null;function Te(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var De=null,Fe=null,Vt=null;function Ut(f){if(f=du(f)){if(typeof De!="function")throw Error(n(280));var m=f.stateNode;m&&(m=vn(m),De(f.stateNode,f.type,m))}}function bn(f){Fe?Vt?Vt.push(f):Vt=[f]:Fe=f}function it(){if(Fe){var f=Fe,m=Vt;if(Vt=Fe=null,Ut(f),m)for(f=0;f>>=0,f===0?32:31-(nl(f)/Li|0)|0}var No=64,Yo=4194304;function sc(f){switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function lc(f,m){var E=f.pendingLanes;if(E===0)return 0;var A=0,I=f.suspendedLanes,B=f.pingedLanes,Z=E&268435455;if(Z!==0){var se=Z&~I;se!==0?A=sc(se):(B&=Z,B!==0&&(A=sc(B)))}else Z=E&~I,Z!==0?A=sc(Z):B!==0&&(A=sc(B));if(A===0)return 0;if(m!==0&&m!==A&&(m&I)===0&&(I=A&-A,B=m&-m,I>=B||I===16&&(B&4194240)!==0))return m;if((A&4)!==0&&(A|=E&16),m=f.entangledLanes,m!==0)for(f=f.entanglements,m&=A;0E;E++)m.push(f);return m}function rl(f,m,E){f.pendingLanes|=m,m!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,m=31-Jn(m),f[m]=E}function dh(f,m){var E=f.pendingLanes&~m;f.pendingLanes=m,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=m,f.mutableReadLanes&=m,f.entangledLanes&=m,m=f.entanglements;var A=f.eventTimes;for(f=f.expirationTimes;0=fc),v0=" ",Gb=!1;function Kb(f,m){switch(f){case"keyup":return Hb.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yb(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Tf=!1;function RP(f,m){switch(f){case"compositionend":return Yb(m);case"keypress":return m.which!==32?null:(Gb=!0,v0);case"textInput":return f=m.data,f===v0&&Gb?null:f;default:return null}}function Af(f,m){if(Tf)return f==="compositionend"||!Qo&&Kb(f,m)?(f=nu(),Of=Qr=tu=null,Tf=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1=m)return{node:E,offset:m-f};f=A}e:{for(;E;){if(E.nextSibling){E=E.nextSibling;break e}E=E.parentNode}E=void 0}E=ht(E)}}function Hn(f,m){return f&&m?f===m?!0:f&&f.nodeType===3?!1:m&&m.nodeType===3?Hn(f,m.parentNode):"contains"in f?f.contains(m):f.compareDocumentPosition?!!(f.compareDocumentPosition(m)&16):!1:!1}function Br(){for(var f=window,m=Xe();m instanceof f.HTMLIFrameElement;){try{var E=typeof m.contentWindow.location.href=="string"}catch{E=!1}if(E)f=m.contentWindow;else break;m=Xe(f.document)}return m}function rr(f){var m=f&&f.nodeName&&f.nodeName.toLowerCase();return m&&(m==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||m==="textarea"||f.contentEditable==="true")}function w0(f){var m=Br(),E=f.focusedElem,A=f.selectionRange;if(m!==E&&E&&E.ownerDocument&&Hn(E.ownerDocument.documentElement,E)){if(A!==null&&rr(E)){if(m=A.start,f=A.end,f===void 0&&(f=m),"selectionStart"in E)E.selectionStart=m,E.selectionEnd=Math.min(f,E.value.length);else if(f=(m=E.ownerDocument||document)&&m.defaultView||window,f.getSelection){f=f.getSelection();var I=E.textContent.length,B=Math.min(A.start,I);A=A.end===void 0?B:Math.min(A.end,I),!f.extend&&B>A&&(I=A,A=B,B=I),I=sn(E,B);var Z=sn(E,A);I&&Z&&(f.rangeCount!==1||f.anchorNode!==I.node||f.anchorOffset!==I.offset||f.focusNode!==Z.node||f.focusOffset!==Z.offset)&&(m=m.createRange(),m.setStart(I.node,I.offset),f.removeAllRanges(),B>A?(f.addRange(m),f.extend(Z.node,Z.offset)):(m.setEnd(Z.node,Z.offset),f.addRange(m)))}}for(m=[],f=E;f=f.parentNode;)f.nodeType===1&&m.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E=document.documentMode,vo=null,Mf=null,wh=null,su=!1;function xh(f,m,E){var A=E.window===E?E.document:E.nodeType===9?E:E.ownerDocument;su||vo==null||vo!==Xe(A)||(A=vo,"selectionStart"in A&&rr(A)?A={start:A.selectionStart,end:A.selectionEnd}:(A=(A.ownerDocument&&A.ownerDocument.defaultView||window).getSelection(),A={anchorNode:A.anchorNode,anchorOffset:A.anchorOffset,focusNode:A.focusNode,focusOffset:A.focusOffset}),wh&&Ne(wh,A)||(wh=A,A=Ph(Mf,"onSelect"),0Bf||(f.current=E0[Bf],E0[Bf]=null,Bf--)}function hr(f,m){Bf++,E0[Bf]=f.current,f.current=m}var pu={},Io=hu(pu),ci=hu(!1),gc=pu;function fi(f,m){var E=f.type.contextTypes;if(!E)return pu;var A=f.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===m)return A.__reactInternalMemoizedMaskedChildContext;var I={},B;for(B in E)I[B]=m[B];return A&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=m,f.__reactInternalMemoizedMaskedChildContext=I),I}function di(f){return f=f.childContextTypes,f!=null}function Hm(){Xn(ci),Xn(Io)}function lS(f,m,E){if(Io.current!==pu)throw Error(n(168));hr(Io,m),hr(ci,E)}function uS(f,m,E){var A=f.stateNode;if(m=m.childContextTypes,typeof A.getChildContext!="function")return E;A=A.getChildContext();for(var I in A)if(!(I in m))throw Error(n(108,ge(f)||"Unknown",I));return K({},E,A)}function Gm(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||pu,gc=Io.current,hr(Io,f),hr(ci,ci.current),!0}function vs(f,m,E){var A=f.stateNode;if(!A)throw Error(n(169));E?(f=uS(f,m,gc),A.__reactInternalMemoizedMergedChildContext=f,Xn(ci),Xn(Io),hr(Io,f)):Xn(ci),hr(ci,E)}var sl=null,Km=!1,C0=!1;function cS(f){sl===null?sl=[f]:sl.push(f)}function jP(f){Km=!0,cS(f)}function hi(){if(!C0&&sl!==null){C0=!0;var f=0,m=Fn;try{var E=sl;for(Fn=1;f>=Z,I-=Z,ll=1<<32-Jn(m)+I|E<Yt?(to=zt,zt=null):to=zt.sibling;var Gn=Be(Oe,zt,Pe[Yt],Qe);if(Gn===null){zt===null&&(zt=to);break}f&&zt&&Gn.alternate===null&&m(Oe,zt),xe=B(Gn,xe,Yt),Bt===null?St=Gn:Bt.sibling=Gn,Bt=Gn,zt=to}if(Yt===Pe.length)return E(Oe,zt),wr&&mu(Oe,Yt),St;if(zt===null){for(;YtYt?(to=zt,zt=null):to=zt.sibling;var ku=Be(Oe,zt,Gn.value,Qe);if(ku===null){zt===null&&(zt=to);break}f&&zt&&ku.alternate===null&&m(Oe,zt),xe=B(ku,xe,Yt),Bt===null?St=ku:Bt.sibling=ku,Bt=ku,zt=to}if(Gn.done)return E(Oe,zt),wr&&mu(Oe,Yt),St;if(zt===null){for(;!Gn.done;Yt++,Gn=Pe.next())Gn=Ke(Oe,Gn.value,Qe),Gn!==null&&(xe=B(Gn,xe,Yt),Bt===null?St=Gn:Bt.sibling=Gn,Bt=Gn);return wr&&mu(Oe,Yt),St}for(zt=A(Oe,zt);!Gn.done;Yt++,Gn=Pe.next())Gn=ct(zt,Oe,Yt,Gn.value,Qe),Gn!==null&&(f&&Gn.alternate!==null&&zt.delete(Gn.key===null?Yt:Gn.key),xe=B(Gn,xe,Yt),Bt===null?St=Gn:Bt.sibling=Gn,Bt=Gn);return f&&zt.forEach(function(eT){return m(Oe,eT)}),wr&&mu(Oe,Yt),St}function Ar(Oe,xe,Pe,Qe){if(typeof Pe=="object"&&Pe!==null&&Pe.type===k&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case R:e:{for(var St=Pe.key,Bt=xe;Bt!==null;){if(Bt.key===St){if(St=Pe.type,St===k){if(Bt.tag===7){E(Oe,Bt.sibling),xe=I(Bt,Pe.props.children),xe.return=Oe,Oe=xe;break e}}else if(Bt.elementType===St||typeof St=="object"&&St!==null&&St.$$typeof===U&&Dh(St)===Bt.type){E(Oe,Bt.sibling),xe=I(Bt,Pe.props),xe.ref=Uf(Oe,Bt,Pe),xe.return=Oe,Oe=xe;break e}E(Oe,Bt);break}else m(Oe,Bt);Bt=Bt.sibling}Pe.type===k?(xe=jc(Pe.props.children,Oe.mode,Qe,Pe.key),xe.return=Oe,Oe=xe):(Qe=Mc(Pe.type,Pe.key,Pe.props,null,Oe.mode,Qe),Qe.ref=Uf(Oe,xe,Pe),Qe.return=Oe,Oe=Qe)}return Z(Oe);case T:e:{for(Bt=Pe.key;xe!==null;){if(xe.key===Bt)if(xe.tag===4&&xe.stateNode.containerInfo===Pe.containerInfo&&xe.stateNode.implementation===Pe.implementation){E(Oe,xe.sibling),xe=I(xe,Pe.children||[]),xe.return=Oe,Oe=xe;break e}else{E(Oe,xe);break}else m(Oe,xe);xe=xe.sibling}xe=f1(Pe,Oe.mode,Qe),xe.return=Oe,Oe=xe}return Z(Oe);case U:return Bt=Pe._init,Ar(Oe,xe,Bt(Pe._payload),Qe)}if(gn(Pe))return vt(Oe,xe,Pe,Qe);if(W(Pe))return bt(Oe,xe,Pe,Qe);Qm(Oe,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,xe!==null&&xe.tag===6?(E(Oe,xe.sibling),xe=I(xe,Pe),xe.return=Oe,Oe=xe):(E(Oe,xe),xe=c1(Pe,Oe.mode,Qe),xe.return=Oe,Oe=xe),Z(Oe)):E(Oe,xe)}return Ar}var xc=hS(!0),so=hS(!1),Vf=hu(null),Lh=null,Zo=null,$h=null;function Wf(){$h=Zo=Lh=null}function cl(f){var m=Vf.current;Xn(Vf),f._currentValue=m}function Zm(f,m,E){for(;f!==null;){var A=f.alternate;if((f.childLanes&m)!==m?(f.childLanes|=m,A!==null&&(A.childLanes|=m)):A!==null&&(A.childLanes&m)!==m&&(A.childLanes|=m),f===E)break;f=f.return}}function zr(f,m){Lh=f,$h=Zo=null,f=f.dependencies,f!==null&&f.firstContext!==null&&((f.lanes&m)!==0&&(xo=!0),f.firstContext=null)}function mi(f){var m=f._currentValue;if($h!==f)if(f={context:f,memoizedValue:m,next:null},Zo===null){if(Lh===null)throw Error(n(308));Zo=f,Lh.dependencies={lanes:0,firstContext:f}}else Zo=Zo.next=f;return m}var bc=null;function P0(f){bc===null?bc=[f]:bc.push(f)}function pS(f,m,E,A){var I=m.interleaved;return I===null?(E.next=E,P0(m)):(E.next=I.next,I.next=E),m.interleaved=E,qa(f,A)}function qa(f,m){f.lanes|=m;var E=f.alternate;for(E!==null&&(E.lanes|=m),E=f,f=f.return;f!==null;)f.childLanes|=m,E=f.alternate,E!==null&&(E.childLanes|=m),E=f,f=f.return;return E.tag===3?E.stateNode:null}var vu=!1;function Sc(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function T0(f,m){f=f.updateQueue,m.updateQueue===f&&(m.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function fl(f,m){return{eventTime:f,lane:m,tag:0,payload:null,callback:null,next:null}}function yu(f,m,E){var A=f.updateQueue;if(A===null)return null;if(A=A.shared,(zn&2)!==0){var I=A.pending;return I===null?m.next=m:(m.next=I.next,I.next=m),A.pending=m,qa(f,E)}return I=A.interleaved,I===null?(m.next=m,P0(A)):(m.next=I.next,I.next=m),A.interleaved=m,qa(f,E)}function wu(f,m,E){if(m=m.updateQueue,m!==null&&(m=m.shared,(E&4194240)!==0)){var A=m.lanes;A&=f.pendingLanes,E|=A,m.lanes=E,dn(f,E)}}function mS(f,m){var E=f.updateQueue,A=f.alternate;if(A!==null&&(A=A.updateQueue,E===A)){var I=null,B=null;if(E=E.firstBaseUpdate,E!==null){do{var Z={eventTime:E.eventTime,lane:E.lane,tag:E.tag,payload:E.payload,callback:E.callback,next:null};B===null?I=B=Z:B=B.next=Z,E=E.next}while(E!==null);B===null?I=B=m:B=B.next=m}else I=B=m;E={baseState:A.baseState,firstBaseUpdate:I,lastBaseUpdate:B,shared:A.shared,effects:A.effects},f.updateQueue=E;return}f=E.lastBaseUpdate,f===null?E.firstBaseUpdate=m:f.next=m,E.lastBaseUpdate=m}function Jm(f,m,E,A){var I=f.updateQueue;vu=!1;var B=I.firstBaseUpdate,Z=I.lastBaseUpdate,se=I.shared.pending;if(se!==null){I.shared.pending=null;var pe=se,ke=pe.next;pe.next=null,Z===null?B=ke:Z.next=ke,Z=pe;var ze=f.alternate;ze!==null&&(ze=ze.updateQueue,se=ze.lastBaseUpdate,se!==Z&&(se===null?ze.firstBaseUpdate=ke:se.next=ke,ze.lastBaseUpdate=pe))}if(B!==null){var Ke=I.baseState;Z=0,ze=ke=pe=null,se=B;do{var Be=se.lane,ct=se.eventTime;if((A&Be)===Be){ze!==null&&(ze=ze.next={eventTime:ct,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var vt=f,bt=se;switch(Be=m,ct=E,bt.tag){case 1:if(vt=bt.payload,typeof vt=="function"){Ke=vt.call(ct,Ke,Be);break e}Ke=vt;break e;case 3:vt.flags=vt.flags&-65537|128;case 0:if(vt=bt.payload,Be=typeof vt=="function"?vt.call(ct,Ke,Be):vt,Be==null)break e;Ke=K({},Ke,Be);break e;case 2:vu=!0}}se.callback!==null&&se.lane!==0&&(f.flags|=64,Be=I.effects,Be===null?I.effects=[se]:Be.push(se))}else ct={eventTime:ct,lane:Be,tag:se.tag,payload:se.payload,callback:se.callback,next:null},ze===null?(ke=ze=ct,pe=Ke):ze=ze.next=ct,Z|=Be;if(se=se.next,se===null){if(se=I.shared.pending,se===null)break;Be=se,se=Be.next,Be.next=null,I.lastBaseUpdate=Be,I.shared.pending=null}}while(!0);if(ze===null&&(pe=Ke),I.baseState=pe,I.firstBaseUpdate=ke,I.lastBaseUpdate=ze,m=I.shared.interleaved,m!==null){I=m;do Z|=I.lane,I=I.next;while(I!==m)}else B===null&&(I.shared.lanes=0);Tc|=Z,f.lanes=Z,f.memoizedState=Ke}}function eg(f,m,E){if(f=m.effects,m.effects=null,f!==null)for(m=0;mE?E:4,f(!0);var A=rg.transition;rg.transition={};try{f(!1),m()}finally{Fn=E,rg.transition=A}}function B0(){return fa().memoizedState}function wS(f,m,E){var A=Pu(f);if(E={lane:A,action:E,hasEagerState:!1,eagerState:null,next:null},z0(f))q0(m,E);else if(E=pS(f,m,E,A),E!==null){var I=qo();Ha(E,f,A,I),Jo(E,m,A)}}function DP(f,m,E){var A=Pu(f),I={lane:A,action:E,hasEagerState:!1,eagerState:null,next:null};if(z0(f))q0(m,I);else{var B=f.alternate;if(f.lanes===0&&(B===null||B.lanes===0)&&(B=m.lastRenderedReducer,B!==null))try{var Z=m.lastRenderedState,se=B(Z,E);if(I.hasEagerState=!0,I.eagerState=se,Me(se,Z)){var pe=m.interleaved;pe===null?(I.next=I,P0(m)):(I.next=pe.next,pe.next=I),m.interleaved=I;return}}catch{}finally{}E=pS(f,m,I,A),E!==null&&(I=qo(),Ha(E,f,A,I),Jo(E,m,A))}}function z0(f){var m=f.alternate;return f===br||m!==null&&m===br}function q0(f,m){Ec=Vh=!0;var E=f.pending;E===null?m.next=m:(m.next=E.next,E.next=m),f.pending=m}function Jo(f,m,E){if((E&4194240)!==0){var A=m.lanes;A&=f.pendingLanes,E|=A,m.lanes=E,dn(f,E)}}var qi={readContext:mi,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},LP={readContext:mi,useCallback:function(f,m){return Ua().memoizedState=[f,m===void 0?null:m],f},useContext:mi,useEffect:ag,useImperativeHandle:function(f,m,E){return E=E!=null?E.concat([f]):null,Yf(4194308,4,pl.bind(null,m,f),E)},useLayoutEffect:function(f,m){return Yf(4194308,4,f,m)},useInsertionEffect:function(f,m){return Yf(4,2,f,m)},useMemo:function(f,m){var E=Ua();return m=m===void 0?null:m,f=f(),E.memoizedState=[f,m],f},useReducer:function(f,m,E){var A=Ua();return m=E!==void 0?E(m):m,A.memoizedState=A.baseState=m,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:m},A.queue=f,f=f.dispatch=wS.bind(null,br,f),[A.memoizedState,f]},useRef:function(f){var m=Ua();return f={current:f},m.memoizedState=f},useState:L0,useDebugValue:sg,useDeferredValue:function(f){return Ua().memoizedState=f},useTransition:function(){var f=L0(!1),m=f[0];return f=IP.bind(null,f[1]),Ua().memoizedState=f,[m,f]},useMutableSource:function(){},useSyncExternalStore:function(f,m,E){var A=br,I=Ua();if(wr){if(E===void 0)throw Error(n(407));E=E()}else{if(E=m(),co===null)throw Error(n(349));(_c&30)!==0||I0(A,m,E)}I.memoizedState=E;var B={value:E,getSnapshot:m};return I.queue=B,ag(vi.bind(null,A,B,f),[f]),A.flags|=2048,bu(9,D0.bind(null,A,B,E,m),void 0,null),E},useId:function(){var f=Ua(),m=co.identifierPrefix;if(wr){var E=ys,A=ll;E=(A&~(1<<32-Jn(A)-1)).toString(32)+E,m=":"+m+"R"+E,E=Wh++,0<\/script>",f=f.removeChild(f.firstChild)):typeof A.is=="string"?f=Z.createElement(E,{is:A.is}):(f=Z.createElement(E),E==="select"&&(Z=f,A.multiple?Z.multiple=!0:A.size&&(Z.size=A.size))):f=Z.createElementNS(f,E),f[gs]=m,f[Mh]=A,K0(f,m,!1,!1),m.stateNode=f;e:{switch(Z=Ce(E,A),E){case"dialog":gr("cancel",f),gr("close",f),I=A;break;case"iframe":case"object":case"embed":gr("load",f),I=A;break;case"video":case"audio":for(I=0;Ind&&(m.flags|=128,A=!0,Jf(B,!1),m.lanes=4194304)}else{if(!A)if(f=qh(Z),f!==null){if(m.flags|=128,A=!0,E=f.updateQueue,E!==null&&(m.updateQueue=E,m.flags|=4),Jf(B,!0),B.tail===null&&B.tailMode==="hidden"&&!Z.alternate&&!wr)return Fo(m),null}else 2*dr()-B.renderingStartTime>nd&&E!==1073741824&&(m.flags|=128,A=!0,Jf(B,!1),m.lanes=4194304);B.isBackwards?(Z.sibling=m.child,m.child=Z):(E=B.last,E!==null?E.sibling=Z:m.child=Z,B.last=Z)}return B.tail!==null?(m=B.tail,B.rendering=m,B.tail=m.sibling,B.renderingStartTime=dr(),m.sibling=null,E=xr.current,hr(xr,A?E&1|2:E&1),m):(Fo(m),null);case 22:case 23:return s1(),A=m.memoizedState!==null,f!==null&&f.memoizedState!==null!==A&&(m.flags|=8192),A&&(m.mode&1)!==0?(Ui&1073741824)!==0&&(Fo(m),m.subtreeFlags&6&&(m.flags|=8192)):Fo(m),null;case 24:return null;case 25:return null}throw Error(n(156,m.tag))}function FP(f,m){switch(jh(m),m.tag){case 1:return di(m.type)&&Hm(),f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 3:return Gf(),Xn(ci),Xn(Io),A0(),f=m.flags,(f&65536)!==0&&(f&128)===0?(m.flags=f&-65537|128,m):null;case 5:return ng(m),null;case 13:if(Xn(xr),f=m.memoizedState,f!==null&&f.dehydrated!==null){if(m.alternate===null)throw Error(n(340));yc()}return f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 19:return Xn(xr),null;case 4:return Gf(),null;case 10:return cl(m.type._context),null;case 22:case 23:return s1(),null;case 24:return null;default:return null}}var xg=!1,Bo=!1,gl=typeof WeakSet=="function"?WeakSet:Set,at=null;function Su(f,m){var E=f.ref;if(E!==null)if(typeof E=="function")try{E(null)}catch(A){Sr(f,m,A)}else E.current=null}function Y0(f,m,E){try{E()}catch(A){Sr(f,m,A)}}var bg=!1;function BP(f,m){if(_0=km,f=Br(),rr(f)){if("selectionStart"in f)var E={start:f.selectionStart,end:f.selectionEnd};else e:{E=(E=f.ownerDocument)&&E.defaultView||window;var A=E.getSelection&&E.getSelection();if(A&&A.rangeCount!==0){E=A.anchorNode;var I=A.anchorOffset,B=A.focusNode;A=A.focusOffset;try{E.nodeType,B.nodeType}catch{E=null;break e}var Z=0,se=-1,pe=-1,ke=0,ze=0,Ke=f,Be=null;t:for(;;){for(var ct;Ke!==E||I!==0&&Ke.nodeType!==3||(se=Z+I),Ke!==B||A!==0&&Ke.nodeType!==3||(pe=Z+A),Ke.nodeType===3&&(Z+=Ke.nodeValue.length),(ct=Ke.firstChild)!==null;)Be=Ke,Ke=ct;for(;;){if(Ke===f)break t;if(Be===E&&++ke===I&&(se=Z),Be===B&&++ze===A&&(pe=Z),(ct=Ke.nextSibling)!==null)break;Ke=Be,Be=Ke.parentNode}Ke=ct}E=se===-1||pe===-1?null:{start:se,end:pe}}else E=null}E=E||{start:0,end:0}}else E=null;for(Ah={focusedElem:f,selectionRange:E},km=!1,at=m;at!==null;)if(m=at,f=m.child,(m.subtreeFlags&1028)!==0&&f!==null)f.return=m,at=f;else for(;at!==null;){m=at;try{var vt=m.alternate;if((m.flags&1024)!==0)switch(m.tag){case 0:case 11:case 15:break;case 1:if(vt!==null){var bt=vt.memoizedProps,Ar=vt.memoizedState,Oe=m.stateNode,xe=Oe.getSnapshotBeforeUpdate(m.elementType===m.type?bt:Lo(m.type,bt),Ar);Oe.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var Pe=m.stateNode.containerInfo;Pe.nodeType===1?Pe.textContent="":Pe.nodeType===9&&Pe.documentElement&&Pe.removeChild(Pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Qe){Sr(m,m.return,Qe)}if(f=m.sibling,f!==null){f.return=m.return,at=f;break}at=m.return}return vt=bg,bg=!1,vt}function tp(f,m,E){var A=m.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var I=A=A.next;do{if((I.tag&f)===f){var B=I.destroy;I.destroy=void 0,B!==void 0&&Y0(m,E,B)}I=I.next}while(I!==A)}}function _u(f,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var E=m=m.next;do{if((E.tag&f)===f){var A=E.create;E.destroy=A()}E=E.next}while(E!==m)}}function Sg(f){var m=f.ref;if(m!==null){var E=f.stateNode;switch(f.tag){case 5:f=E;break;default:f=E}typeof m=="function"?m(f):m.current=f}}function X0(f){var m=f.alternate;m!==null&&(f.alternate=null,X0(m)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(m=f.stateNode,m!==null&&(delete m[gs],delete m[Mh],delete m[mc],delete m[sS],delete m[te])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function AS(f){return f.tag===5||f.tag===3||f.tag===4}function kS(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||AS(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function Q0(f,m,E){var A=f.tag;if(A===5||A===6)f=f.stateNode,m?E.nodeType===8?E.parentNode.insertBefore(f,m):E.insertBefore(f,m):(E.nodeType===8?(m=E.parentNode,m.insertBefore(f,E)):(m=E,m.appendChild(f)),E=E._reactRootContainer,E!=null||m.onclick!==null||(m.onclick=Th));else if(A!==4&&(f=f.child,f!==null))for(Q0(f,m,E),f=f.sibling;f!==null;)Q0(f,m,E),f=f.sibling}function Z0(f,m,E){var A=f.tag;if(A===5||A===6)f=f.stateNode,m?E.insertBefore(f,m):E.appendChild(f);else if(A!==4&&(f=f.child,f!==null))for(Z0(f,m,E),f=f.sibling;f!==null;)Z0(f,m,E),f=f.sibling}var uo=null,da=!1;function Eu(f,m,E){for(E=E.child;E!==null;)_g(f,m,E),E=E.sibling}function _g(f,m,E){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(mt,E)}catch{}switch(E.tag){case 5:Bo||Su(E,m);case 6:var A=uo,I=da;uo=null,Eu(f,m,E),uo=A,da=I,uo!==null&&(da?(f=uo,E=E.stateNode,f.nodeType===8?f.parentNode.removeChild(E):f.removeChild(E)):uo.removeChild(E.stateNode));break;case 18:uo!==null&&(da?(f=uo,E=E.stateNode,f.nodeType===8?cu(f.parentNode,E):f.nodeType===1&&cu(f,E),nr(f)):cu(uo,E.stateNode));break;case 4:A=uo,I=da,uo=E.stateNode.containerInfo,da=!0,Eu(f,m,E),uo=A,da=I;break;case 0:case 11:case 14:case 15:if(!Bo&&(A=E.updateQueue,A!==null&&(A=A.lastEffect,A!==null))){I=A=A.next;do{var B=I,Z=B.destroy;B=B.tag,Z!==void 0&&((B&2)!==0||(B&4)!==0)&&Y0(E,m,Z),I=I.next}while(I!==A)}Eu(f,m,E);break;case 1:if(!Bo&&(Su(E,m),A=E.stateNode,typeof A.componentWillUnmount=="function"))try{A.props=E.memoizedProps,A.state=E.memoizedState,A.componentWillUnmount()}catch(se){Sr(E,m,se)}Eu(f,m,E);break;case 21:Eu(f,m,E);break;case 22:E.mode&1?(Bo=(A=Bo)||E.memoizedState!==null,Eu(f,m,E),Bo=A):Eu(f,m,E);break;default:Eu(f,m,E)}}function J0(f){var m=f.updateQueue;if(m!==null){f.updateQueue=null;var E=f.stateNode;E===null&&(E=f.stateNode=new gl),m.forEach(function(A){var I=GP.bind(null,f,A);E.has(A)||(E.add(A),A.then(I,I))})}}function ei(f,m){var E=m.deletions;if(E!==null)for(var A=0;AI&&(I=Z),A&=~B}if(A=I,A=dr()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*zP(A/1960))-A,10f?16:f,Ru===null)var A=!1;else{if(f=Ru,Ru=null,Pg=0,(zn&6)!==0)throw Error(n(331));var I=zn;for(zn|=4,at=f.current;at!==null;){var B=at,Z=B.child;if((at.flags&16)!==0){var se=B.deletions;if(se!==null){for(var pe=0;pedr()-n1?kc(f,0):Cg|=E),wi(f,m)}function zS(f,m){m===0&&((f.mode&1)===0?m=1:(m=Yo,Yo<<=1,(Yo&130023424)===0&&(Yo=4194304)));var E=qo();f=qa(f,m),f!==null&&(rl(f,m,E),wi(f,E))}function HP(f){var m=f.memoizedState,E=0;m!==null&&(E=m.retryLane),zS(f,E)}function GP(f,m){var E=0;switch(f.tag){case 13:var A=f.stateNode,I=f.memoizedState;I!==null&&(E=I.retryLane);break;case 19:A=f.stateNode;break;default:throw Error(n(314))}A!==null&&A.delete(m),zS(f,E)}var qS;qS=function(f,m,E){if(f!==null)if(f.memoizedProps!==m.pendingProps||ci.current)xo=!0;else{if((f.lanes&E)===0&&(m.flags&128)===0)return xo=!1,G0(f,m,E);xo=(f.flags&131072)!==0}else xo=!1,wr&&(m.flags&1048576)!==0&&fS(m,Ym,m.index);switch(m.lanes=0,m.tag){case 2:var A=m.type;bs(f,m),f=m.pendingProps;var I=fi(m,Io.current);zr(m,E),I=M0(null,m,A,f,I,E);var B=Cc();return m.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,di(A)?(B=!0,Gm(m)):B=!1,m.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Sc(m),I.updater=Xh,m.stateNode=I,I._reactInternals=m,Rc(m,A,f,E),m=vg(null,m,A,!0,B,E)):(m.tag=0,wr&&B&&O0(m),$o(null,m,I,E),m=m.child),m;case 16:A=m.elementType;e:{switch(bs(f,m),f=m.pendingProps,I=A._init,A=I(A._payload),m.type=A,I=m.tag=VS(A),f=Lo(A,f),I){case 0:m=gg(null,m,A,f,E);break e;case 1:m=ES(null,m,A,f,E);break e;case 11:m=mg(null,m,A,f,E);break e;case 14:m=_S(null,m,A,Lo(A.type,f),E);break e}throw Error(n(306,A,""))}return m;case 0:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),gg(f,m,A,I,E);case 1:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),ES(f,m,A,I,E);case 3:e:{if(CS(m),f===null)throw Error(n(387));A=m.pendingProps,B=m.memoizedState,I=B.element,T0(f,m),Jm(m,A,null,E);var Z=m.memoizedState;if(A=Z.element,B.isDehydrated)if(B={element:A,isDehydrated:!1,cache:Z.cache,pendingSuspenseBoundaries:Z.pendingSuspenseBoundaries,transitions:Z.transitions},m.updateQueue.baseState=B,m.memoizedState=B,m.flags&256){I=Xf(Error(n(423)),m),m=OS(f,m,A,E,I);break e}else if(A!==I){I=Xf(Error(n(424)),m),m=OS(f,m,A,E,I);break e}else for(Do=fu(m.stateNode.containerInfo.firstChild),wo=m,wr=!0,ca=null,E=so(m,null,A,E),m.child=E;E;)E.flags=E.flags&-3|4096,E=E.sibling;else{if(yc(),A===I){m=ml(f,m,E);break e}$o(f,m,A,E)}m=m.child}return m;case 5:return tg(m),f===null&&ul(m),A=m.type,I=m.pendingProps,B=f!==null?f.memoizedProps:null,Z=I.children,pc(A,I)?Z=null:B!==null&&pc(A,B)&&(m.flags|=32),H0(f,m),$o(f,m,Z,E),m.child;case 6:return f===null&&ul(m),null;case 13:return yg(f,m,E);case 4:return zh(m,m.stateNode.containerInfo),A=m.pendingProps,f===null?m.child=xc(m,null,A,E):$o(f,m,A,E),m.child;case 11:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),mg(f,m,A,I,E);case 7:return $o(f,m,m.pendingProps,E),m.child;case 8:return $o(f,m,m.pendingProps.children,E),m.child;case 12:return $o(f,m,m.pendingProps.children,E),m.child;case 10:e:{if(A=m.type._context,I=m.pendingProps,B=m.memoizedProps,Z=I.value,hr(Vf,A._currentValue),A._currentValue=Z,B!==null)if(Me(B.value,Z)){if(B.children===I.children&&!ci.current){m=ml(f,m,E);break e}}else for(B=m.child,B!==null&&(B.return=m);B!==null;){var se=B.dependencies;if(se!==null){Z=B.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===A){if(B.tag===1){pe=fl(-1,E&-E),pe.tag=2;var ke=B.updateQueue;if(ke!==null){ke=ke.shared;var ze=ke.pending;ze===null?pe.next=pe:(pe.next=ze.next,ze.next=pe),ke.pending=pe}}B.lanes|=E,pe=B.alternate,pe!==null&&(pe.lanes|=E),Zm(B.return,E,m),se.lanes|=E;break}pe=pe.next}}else if(B.tag===10)Z=B.type===m.type?null:B.child;else if(B.tag===18){if(Z=B.return,Z===null)throw Error(n(341));Z.lanes|=E,se=Z.alternate,se!==null&&(se.lanes|=E),Zm(Z,E,m),Z=B.sibling}else Z=B.child;if(Z!==null)Z.return=B;else for(Z=B;Z!==null;){if(Z===m){Z=null;break}if(B=Z.sibling,B!==null){B.return=Z.return,Z=B;break}Z=Z.return}B=Z}$o(f,m,I.children,E),m=m.child}return m;case 9:return I=m.type,A=m.pendingProps.children,zr(m,E),I=mi(I),A=A(I),m.flags|=1,$o(f,m,A,E),m.child;case 14:return A=m.type,I=Lo(A,m.pendingProps),I=Lo(A.type,I),_S(f,m,A,I,E);case 15:return W0(f,m,m.type,m.pendingProps,E);case 17:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),bs(f,m),m.tag=1,di(A)?(f=!0,Gm(m)):f=!1,zr(m,E),U0(m,A,I),Rc(m,A,I,E),vg(null,m,A,!0,f,E);case 19:return wg(f,m,E);case 22:return xs(f,m,E)}throw Error(n(156,m.tag))};function US(f,m){return Yl(f,m)}function KP(f,m,E,A){this.tag=f,this.key=E,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ma(f,m,E,A){return new KP(f,m,E,A)}function u1(f){return f=f.prototype,!(!f||!f.isReactComponent)}function VS(f){if(typeof f=="function")return u1(f)?1:0;if(f!=null){if(f=f.$$typeof,f===V)return 11;if(f===H)return 14}return 2}function Au(f,m){var E=f.alternate;return E===null?(E=ma(f.tag,m,f.key,f.mode),E.elementType=f.elementType,E.type=f.type,E.stateNode=f.stateNode,E.alternate=f,f.alternate=E):(E.pendingProps=m,E.type=f.type,E.flags=0,E.subtreeFlags=0,E.deletions=null),E.flags=f.flags&14680064,E.childLanes=f.childLanes,E.lanes=f.lanes,E.child=f.child,E.memoizedProps=f.memoizedProps,E.memoizedState=f.memoizedState,E.updateQueue=f.updateQueue,m=f.dependencies,E.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},E.sibling=f.sibling,E.index=f.index,E.ref=f.ref,E}function Mc(f,m,E,A,I,B){var Z=2;if(A=f,typeof f=="function")u1(f)&&(Z=1);else if(typeof f=="string")Z=5;else e:switch(f){case k:return jc(E.children,I,B,m);case M:Z=8,I|=8;break;case j:return f=ma(12,E,m,I|2),f.elementType=j,f.lanes=B,f;case G:return f=ma(13,E,m,I),f.elementType=G,f.lanes=B,f;case D:return f=ma(19,E,m,I),f.elementType=D,f.lanes=B,f;case Y:return Ng(E,I,B,m);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case $:Z=10;break e;case L:Z=9;break e;case V:Z=11;break e;case H:Z=14;break e;case U:Z=16,A=null;break e}throw Error(n(130,f==null?f:typeof f,""))}return m=ma(Z,E,m,I),m.elementType=f,m.type=A,m.lanes=B,m}function jc(f,m,E,A){return f=ma(7,f,A,m),f.lanes=E,f}function Ng(f,m,E,A){return f=ma(22,f,A,m),f.elementType=Y,f.lanes=E,f.stateNode={isHidden:!1},f}function c1(f,m,E){return f=ma(6,f,null,m),f.lanes=E,f}function f1(f,m,E){return m=ma(4,f.children!==null?f.children:[],f.key,m),m.lanes=E,m.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},m}function YP(f,m,E,A,I){this.tag=m,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ba(0),this.expirationTimes=Ba(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ba(0),this.identifierPrefix=A,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function d1(f,m,E,A,I,B,Z,se,pe){return f=new YP(f,m,E,se,pe),m===1?(m=1,B===!0&&(m|=8)):m=0,B=ma(3,null,null,m),f.current=B,B.stateNode=f,B.memoizedState={element:A,isDehydrated:E,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sc(B),f}function XP(f,m,E){var A=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),h2.exports=ege(),h2.exports}var zs=SY();const _Y=Ln(zs);function Kp(e){const t=tge(e),n=b.forwardRef((r,o)=>{const{children:i,...a}=r,s=b.Children.toArray(i),l=s.find(rge);if(l){const u=l.props.children,c=s.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return v.jsx(t,{...a,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function tge(e){const t=b.forwardRef((n,r)=>{const{children:o,...i}=n;if(b.isValidElement(o)){const a=ige(o),s=oge(i,o.props);return o.type!==b.Fragment&&(s.ref=r?Gx(r,a):a),b.cloneElement(o,s)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EY=Symbol("radix.slottable");function nge(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=EY,t}function rge(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EY}function oge(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ige(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var age=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zt=age.reduce((e,t)=>{const n=Kp(`Primitive.${t}`),r=b.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function V3(e,t){e&&zs.flushSync(()=>e.dispatchEvent(t))}function Ji(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sge(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var lge="DismissableLayer",EI="dismissableLayer.update",uge="dismissableLayer.pointerDownOutside",cge="dismissableLayer.focusOutside",OF,CY=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,u=b.useContext(CY),[c,d]=b.useState(null),h=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),x=Bn(t,k=>d(k)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(w),C=c?y.indexOf(c):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=_,R=dge(k=>{const M=k.target,j=[...u.branches].some($=>$.contains(M));!P||j||(o==null||o(k),a==null||a(k),k.defaultPrevented||s==null||s())},h),T=hge(k=>{const M=k.target;[...u.branches].some($=>$.contains(M))||(i==null||i(k),a==null||a(k),k.defaultPrevented||s==null||s())},h);return sge(k=>{C===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(OF=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),RF(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=OF)}},[c,h,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),RF())},[c,u]),b.useEffect(()=>{const k=()=>p({});return document.addEventListener(EI,k),()=>document.removeEventListener(EI,k)},[]),v.jsx(Zt.div,{...l,ref:x,style:{pointerEvents:O?P?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,R.onPointerDownCapture)})});Zd.displayName=lge;var fge="DismissableLayerBranch",OY=b.forwardRef((e,t)=>{const n=b.useContext(CY),r=b.useRef(null),o=Bn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(Zt.div,{...e,ref:o})});OY.displayName=fge;function dge(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){RY(uge,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hge(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e),r=b.useRef(!1);return b.useEffect(()=>{const o=i=>{i.target&&!r.current&&RY(cge,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RF(){const e=new CustomEvent(EI);document.dispatchEvent(e)}function RY(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?V3(o,i):o.dispatchEvent(i)}var pge=Zd,mge=OY,ii=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},gge=NO[" useId ".trim().toString()]||(()=>{}),vge=0;function Pa(e){const[t,n]=b.useState(gge());return ii(()=>{n(r=>r??String(vge++))},[e]),t?`radix-${t}`:""}const yge=["top","right","bottom","left"],Wd=Math.min,os=Math.max,xE=Math.round,r_=Math.floor,Uu=e=>({x:e,y:e}),wge={left:"right",right:"left",bottom:"top",top:"bottom"},xge={start:"end",end:"start"};function CI(e,t,n){return os(e,Wd(t,n))}function lf(e,t){return typeof e=="function"?e(t):e}function uf(e){return e.split("-")[0]}function Dy(e){return e.split("-")[1]}function W3(e){return e==="x"?"y":"x"}function H3(e){return e==="y"?"height":"width"}const bge=new Set(["top","bottom"]);function Bu(e){return bge.has(uf(e))?"y":"x"}function G3(e){return W3(Bu(e))}function Sge(e,t,n){n===void 0&&(n=!1);const r=Dy(e),o=G3(e),i=H3(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bE(a)),[a,bE(a)]}function _ge(e){const t=bE(e);return[OI(e),t,OI(t)]}function OI(e){return e.replace(/start|end/g,t=>xge[t])}const PF=["left","right"],TF=["right","left"],Ege=["top","bottom"],Cge=["bottom","top"];function Oge(e,t,n){switch(e){case"top":case"bottom":return n?t?TF:PF:t?PF:TF;case"left":case"right":return t?Ege:Cge;default:return[]}}function Rge(e,t,n,r){const o=Dy(e);let i=Oge(uf(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(OI)))),i}function bE(e){return e.replace(/left|right|bottom|top/g,t=>wge[t])}function Pge(e){return{top:0,right:0,bottom:0,left:0,...e}}function PY(e){return typeof e!="number"?Pge(e):{top:e,right:e,bottom:e,left:e}}function SE(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function AF(e,t,n){let{reference:r,floating:o}=e;const i=Bu(t),a=G3(t),s=H3(a),l=uf(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Dy(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1);break}return p}const Tge=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=AF(u,r,l),h=r,p={},x=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=lf(e,t)||{};if(u==null)return{};const d=PY(c),h={x:n,y:r},p=G3(o),x=H3(p),y=await a.getDimensions(u),w=p==="y",_=w?"top":"left",C=w?"bottom":"right",O=w?"clientHeight":"clientWidth",P=i.reference[x]+i.reference[p]-h[p]-i.floating[x],R=h[p]-i.reference[p],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=T?T[O]:0;(!k||!await(a.isElement==null?void 0:a.isElement(T)))&&(k=s.floating[O]||i.floating[x]);const M=P/2-R/2,j=k/2-y[x]/2-1,$=Wd(d[_],j),L=Wd(d[C],j),V=$,G=k-y[x]-L,D=k/2-y[x]/2+M,H=CI(V,D,G),U=!l.arrow&&Dy(o)!=null&&D!==H&&i.reference[x]/2-(DD<=0)){var L,V;const D=(((L=i.flip)==null?void 0:L.index)||0)+1,H=k[D];if(H&&(!(d==="alignment"?C!==Bu(H):!1)||$.every(q=>Bu(q.placement)===C?q.overflows[0]>0:!0)))return{data:{index:D,overflows:$},reset:{placement:H}};let U=(V=$.filter(Y=>Y.overflows[0]<=0).sort((Y,q)=>Y.overflows[1]-q.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(p){case"bestFit":{var G;const Y=(G=$.filter(q=>{if(T){const W=Bu(q.placement);return W===C||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,K)=>W+K,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:G[0];Y&&(U=Y);break}case"initialPlacement":U=s;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function kF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function NF(e){return yge.some(t=>e[t]>=0)}const Nge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=lf(e,t);switch(r){case"referenceHidden":{const i=await Mw(t,{...o,elementContext:"reference"}),a=kF(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:NF(a)}}}case"escaped":{const i=await Mw(t,{...o,altBoundary:!0}),a=kF(i,n.floating);return{data:{escapedOffsets:a,escaped:NF(a)}}}default:return{}}}}},TY=new Set(["left","top"]);async function Mge(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=uf(n),s=Dy(n),l=Bu(n)==="y",u=TY.has(a)?-1:1,c=i&&l?-1:1,d=lf(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof x=="number"&&(p=s==="end"?x*-1:x),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const jge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await Mge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ige=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:C}=w;return{x:_,y:C}}},...l}=lf(e,t),u={x:n,y:r},c=await Mw(t,l),d=Bu(uf(o)),h=W3(d);let p=u[h],x=u[d];if(i){const w=h==="y"?"top":"left",_=h==="y"?"bottom":"right",C=p+c[w],O=p-c[_];p=CI(C,p,O)}if(a){const w=d==="y"?"top":"left",_=d==="y"?"bottom":"right",C=x+c[w],O=x-c[_];x=CI(C,x,O)}const y=s.fn({...t,[h]:p,[d]:x});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[d]:a}}}}}},Dge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=lf(e,t),c={x:n,y:r},d=Bu(o),h=W3(d);let p=c[h],x=c[d];const y=lf(s,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const O=h==="y"?"height":"width",P=i.reference[h]-i.floating[O]+w.mainAxis,R=i.reference[h]+i.reference[O]-w.mainAxis;pR&&(p=R)}if(u){var _,C;const O=h==="y"?"width":"height",P=TY.has(uf(o)),R=i.reference[d]-i.floating[O]+(P&&((_=a.offset)==null?void 0:_[d])||0)+(P?0:w.crossAxis),T=i.reference[d]+i.reference[O]+(P?0:((C=a.offset)==null?void 0:C[d])||0)-(P?w.crossAxis:0);xT&&(x=T)}return{[h]:p,[d]:x}}}},Lge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=lf(e,t),c=await Mw(t,u),d=uf(o),h=Dy(o),p=Bu(o)==="y",{width:x,height:y}=i.floating;let w,_;d==="top"||d==="bottom"?(w=d,_=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(_=d,w=h==="end"?"top":"bottom");const C=y-c.top-c.bottom,O=x-c.left-c.right,P=Wd(y-c[w],C),R=Wd(x-c[_],O),T=!t.middlewareData.shift;let k=P,M=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=C),T&&!h){const $=os(c.left,0),L=os(c.right,0),V=os(c.top,0),G=os(c.bottom,0);p?M=x-2*($!==0||L!==0?$+L:os(c.left,c.right)):k=y-2*(V!==0||G!==0?V+G:os(c.top,c.bottom))}await l({...t,availableWidth:M,availableHeight:k});const j=await a.getDimensions(s.floating);return x!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function FO(){return typeof window<"u"}function Ly(e){return AY(e)?(e.nodeName||"").toLowerCase():"#document"}function ss(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tc(e){var t;return(t=(AY(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AY(e){return FO()?e instanceof Node||e instanceof ss(e).Node:!1}function Il(e){return FO()?e instanceof Element||e instanceof ss(e).Element:!1}function Ku(e){return FO()?e instanceof HTMLElement||e instanceof ss(e).HTMLElement:!1}function MF(e){return!FO()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ss(e).ShadowRoot}const $ge=new Set(["inline","contents"]);function Kx(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!$ge.has(o)}const Fge=new Set(["table","td","th"]);function Bge(e){return Fge.has(Ly(e))}const zge=[":popover-open",":modal"];function BO(e){return zge.some(t=>{try{return e.matches(t)}catch{return!1}})}const qge=["transform","translate","scale","rotate","perspective"],Uge=["transform","translate","scale","rotate","perspective","filter"],Vge=["paint","layout","strict","content"];function K3(e){const t=Y3(),n=Il(e)?Dl(e):e;return qge.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Uge.some(r=>(n.willChange||"").includes(r))||Vge.some(r=>(n.contain||"").includes(r))}function Wge(e){let t=Hd(e);for(;Ku(t)&&!Hv(t);){if(K3(t))return t;if(BO(t))return null;t=Hd(t)}return null}function Y3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Hge=new Set(["html","body","#document"]);function Hv(e){return Hge.has(Ly(e))}function Dl(e){return ss(e).getComputedStyle(e)}function zO(e){return Il(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hd(e){if(Ly(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MF(e)&&e.host||tc(e);return MF(t)?t.host:t}function kY(e){const t=Hd(e);return Hv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ku(t)&&Kx(t)?t:kY(t)}function jw(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kY(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ss(o);if(i){const s=RI(a);return t.concat(a,a.visualViewport||[],Kx(o)?o:[],s&&n?jw(s):[])}return t.concat(o,jw(o,[],n))}function RI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function NY(e){const t=Dl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ku(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=xE(n)!==i||xE(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function X3(e){return Il(e)?e:e.contextElement}function mv(e){const t=X3(e);if(!Ku(t))return Uu(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=NY(t);let a=(i?xE(n.width):n.width)/r,s=(i?xE(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Gge=Uu(0);function MY(e){const t=ss(e);return!Y3()||!t.visualViewport?Gge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ss(e)?!1:t}function Yp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=X3(e);let a=Uu(1);t&&(r?Il(r)&&(a=mv(r)):a=mv(e));const s=Kge(i,n,r)?MY(i):Uu(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const h=ss(i),p=r&&Il(r)?ss(r):r;let x=h,y=RI(x);for(;y&&r&&p!==x;){const w=mv(y),_=y.getBoundingClientRect(),C=Dl(y),O=_.left+(y.clientLeft+parseFloat(C.paddingLeft))*w.x,P=_.top+(y.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=O,u+=P,x=ss(y),y=RI(x)}}return SE({width:c,height:d,x:l,y:u})}function Q3(e,t){const n=zO(e).scrollLeft;return t?t.left+n:Yp(tc(e)).left+n}function jY(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Q3(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Yge(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=tc(r),s=t?BO(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Uu(1);const c=Uu(0),d=Ku(r);if((d||!d&&!i)&&((Ly(r)!=="body"||Kx(a))&&(l=zO(r)),Ku(r))){const p=Yp(r);u=mv(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=a&&!d&&!i?jY(a,l,!0):Uu(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Xge(e){return Array.from(e.getClientRects())}function Qge(e){const t=tc(e),n=zO(e),r=e.ownerDocument.body,o=os(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=os(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Q3(e);const s=-n.scrollTop;return Dl(r).direction==="rtl"&&(a+=os(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Zge(e,t){const n=ss(e),r=tc(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=Y3();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}const Jge=new Set(["absolute","fixed"]);function eve(e,t){const n=Yp(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ku(e)?mv(e):Uu(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function jF(e,t,n){let r;if(t==="viewport")r=Zge(e,n);else if(t==="document")r=Qge(tc(e));else if(Il(t))r=eve(t,n);else{const o=MY(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return SE(r)}function IY(e,t){const n=Hd(e);return n===t||!Il(n)||Hv(n)?!1:Dl(n).position==="fixed"||IY(n,t)}function tve(e,t){const n=t.get(e);if(n)return n;let r=jw(e,[],!1).filter(s=>Il(s)&&Ly(s)!=="body"),o=null;const i=Dl(e).position==="fixed";let a=i?Hd(e):e;for(;Il(a)&&!Hv(a);){const s=Dl(a),l=K3(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&Jge.has(o.position)||Kx(a)&&!l&&IY(e,a))?r=r.filter(c=>c!==a):o=s,a=Hd(a)}return t.set(e,r),r}function nve(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?BO(t)?[]:tve(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=jF(t,c,o);return u.top=os(d.top,u.top),u.right=Wd(d.right,u.right),u.bottom=Wd(d.bottom,u.bottom),u.left=os(d.left,u.left),u},jF(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rve(e){const{width:t,height:n}=NY(e);return{width:t,height:n}}function ove(e,t,n){const r=Ku(t),o=tc(t),i=n==="fixed",a=Yp(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Uu(0);function u(){l.x=Q3(o)}if(r||!r&&!i)if((Ly(t)!=="body"||Kx(o))&&(s=zO(t)),r){const p=Yp(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=o&&!r&&!i?jY(o,s):Uu(0),d=a.left+s.scrollLeft-l.x-c.x,h=a.top+s.scrollTop-l.y-c.y;return{x:d,y:h,width:a.width,height:a.height}}function g2(e){return Dl(e).position==="static"}function IF(e,t){if(!Ku(e)||Dl(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return tc(e)===n&&(n=n.ownerDocument.body),n}function DY(e,t){const n=ss(e);if(BO(e))return n;if(!Ku(e)){let o=Hd(e);for(;o&&!Hv(o);){if(Il(o)&&!g2(o))return o;o=Hd(o)}return n}let r=IF(e,t);for(;r&&Bge(r)&&g2(r);)r=IF(r,t);return r&&Hv(r)&&g2(r)&&!K3(r)?n:r||Wge(e)||n}const ive=async function(e){const t=this.getOffsetParent||DY,n=this.getDimensions,r=await n(e.floating);return{reference:ove(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ave(e){return Dl(e).direction==="rtl"}const sve={convertOffsetParentRelativeRectToViewportRelativeRect:Yge,getDocumentElement:tc,getClippingRect:nve,getOffsetParent:DY,getElementRects:ive,getClientRects:Xge,getDimensions:rve,getScale:mv,isElement:Il,isRTL:ave};function LY(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lve(e,t){let n=null,r;const o=tc(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(s||t(),!h||!p)return;const x=r_(d),y=r_(o.clientWidth-(c+h)),w=r_(o.clientHeight-(d+p)),_=r_(c),O={rootMargin:-x+"px "+-y+"px "+-w+"px "+-_+"px",threshold:os(0,Wd(1,l))||1};let P=!0;function R(T){const k=T[0].intersectionRatio;if(k!==l){if(!P)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!LY(u,e.getBoundingClientRect())&&a(),P=!1}try{n=new IntersectionObserver(R,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,O)}n.observe(e)}return a(!0),i}function uve(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=X3(e),c=o||i?[...u?jw(u):[],...jw(t)]:[];c.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const d=u&&s?lve(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(_=>{let[C]=_;C&&C.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var O;(O=p)==null||O.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let x,y=l?Yp(e):null;l&&w();function w(){const _=Yp(e);y&&!LY(y,_)&&n(),y=_,x=requestAnimationFrame(w)}return n(),()=>{var _;c.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),d==null||d(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(x)}}const cve=jge,fve=Ige,dve=kge,hve=Lge,pve=Nge,DF=Age,mve=Dge,gve=(e,t,n)=>{const r=new Map,o={platform:sve,...n},i={...o.platform,_c:r};return Tge(e,t,{...o,platform:i})};var vve=typeof document<"u",yve=function(){},J_=vve?b.useLayoutEffect:yve;function _E(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_E(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!_E(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $Y(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LF(e,t){const n=$Y(e);return Math.round(t*n)/n}function v2(e){const t=b.useRef(e);return J_(()=>{t.current=e}),t}function wve(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=b.useState(r);_E(h,r)||p(r);const[x,y]=b.useState(null),[w,_]=b.useState(null),C=b.useCallback(q=>{q!==T.current&&(T.current=q,y(q))},[]),O=b.useCallback(q=>{q!==k.current&&(k.current=q,_(q))},[]),P=i||x,R=a||w,T=b.useRef(null),k=b.useRef(null),M=b.useRef(c),j=l!=null,$=v2(l),L=v2(o),V=v2(u),G=b.useCallback(()=>{if(!T.current||!k.current)return;const q={placement:t,strategy:n,middleware:h};L.current&&(q.platform=L.current),gve(T.current,k.current,q).then(W=>{const K={...W,isPositioned:V.current!==!1};D.current&&!_E(M.current,K)&&(M.current=K,zs.flushSync(()=>{d(K)}))})},[h,t,n,L,V]);J_(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[u]);const D=b.useRef(!1);J_(()=>(D.current=!0,()=>{D.current=!1}),[]),J_(()=>{if(P&&(T.current=P),R&&(k.current=R),P&&R){if($.current)return $.current(P,R,G);G()}},[P,R,G,$,j]);const H=b.useMemo(()=>({reference:T,floating:k,setReference:C,setFloating:O}),[C,O]),U=b.useMemo(()=>({reference:P,floating:R}),[P,R]),Y=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!U.floating)return q;const W=LF(U.floating,c.x),K=LF(U.floating,c.y);return s?{...q,transform:"translate("+W+"px, "+K+"px)",...$Y(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:K}},[n,s,U.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:G,refs:H,elements:U,floatingStyles:Y}),[c,G,H,U,Y])}const xve=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?DF({element:r.current,padding:o}).fn(n):{}:r?DF({element:r,padding:o}).fn(n):{}}}},bve=(e,t)=>({...cve(e),options:[e,t]}),Sve=(e,t)=>({...fve(e),options:[e,t]}),_ve=(e,t)=>({...mve(e),options:[e,t]}),Eve=(e,t)=>({...dve(e),options:[e,t]}),Cve=(e,t)=>({...hve(e),options:[e,t]}),Ove=(e,t)=>({...pve(e),options:[e,t]}),Rve=(e,t)=>({...xve(e),options:[e,t]});var Pve="Arrow",FY=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return v.jsx(Zt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});FY.displayName=Pve;var Tve=FY;function BY(e){const[t,n]=b.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Z3="Popper",[zY,nc]=fs(Z3),[Ave,qY]=zY(Z3),UY=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return v.jsx(Ave,{scope:t,anchor:r,onAnchorChange:o,children:n})};UY.displayName=Z3;var VY="PopperAnchor",WY=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qY(VY,n),a=b.useRef(null),s=Bn(t,a),l=b.useRef(null);return b.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:v.jsx(Zt.div,{...o,ref:s})});WY.displayName=VY;var J3="PopperContent",[kve,Nve]=zY(J3),HY=b.forwardRef((e,t)=>{var ge,he,ue,we,Ae,ye;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:x,...y}=e,w=qY(J3,n),[_,C]=b.useState(null),O=Bn(t,Xe=>C(Xe)),[P,R]=b.useState(null),T=BY(P),k=(T==null?void 0:T.width)??0,M=(T==null?void 0:T.height)??0,j=r+(i!=="center"?"-"+i:""),$=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],V=L.length>0,G={padding:$,boundary:L.filter(jve),altBoundary:V},{refs:D,floatingStyles:H,placement:U,isPositioned:Y,middlewareData:q}=wve({strategy:"fixed",placement:j,whileElementsMounted:(...Xe)=>uve(...Xe,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[bve({mainAxis:o+M,alignmentAxis:a}),l&&Sve({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?_ve():void 0,...G}),l&&Eve({...G}),Cve({...G,apply:({elements:Xe,rects:We,availableWidth:et,availableHeight:ft})=>{const{width:st,height:Ge}=We.reference,Kt=Xe.floating.style;Kt.setProperty("--radix-popper-available-width",`${et}px`),Kt.setProperty("--radix-popper-available-height",`${ft}px`),Kt.setProperty("--radix-popper-anchor-width",`${st}px`),Kt.setProperty("--radix-popper-anchor-height",`${Ge}px`)}}),P&&Rve({element:P,padding:s}),Ive({arrowWidth:k,arrowHeight:M}),h&&Ove({strategy:"referenceHidden",...G})]}),[W,K]=YY(U),z=Ji(x);ii(()=>{Y&&(z==null||z())},[Y,z]);const X=(ge=q.arrow)==null?void 0:ge.x,ee=(he=q.arrow)==null?void 0:he.y,ae=((ue=q.arrow)==null?void 0:ue.centerOffset)!==0,[fe,ie]=b.useState();return ii(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Y?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(we=q.transformOrigin)==null?void 0:we.x,(Ae=q.transformOrigin)==null?void 0:Ae.y].join(" "),...((ye=q.hide)==null?void 0:ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(kve,{scope:n,placedSide:W,onArrowChange:R,arrowX:X,arrowY:ee,shouldHideArrow:ae,children:v.jsx(Zt.div,{"data-side":W,"data-align":K,...y,ref:O,style:{...y.style,animation:Y?void 0:"none"}})})})});HY.displayName=J3;var GY="PopperArrow",Mve={top:"bottom",right:"left",bottom:"top",left:"right"},KY=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Nve(GY,r),a=Mve[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(Tve,{...o,ref:n,style:{...o.style,display:"block"}})})});KY.displayName=GY;function jve(e){return e!==null}var Ive=e=>({name:"transformOrigin",options:e,fn(t){var w,_,C;const{placement:n,rects:r,middlewareData:o}=t,a=((w=o.arrow)==null?void 0:w.centerOffset)!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,c]=YY(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(((_=o.arrow)==null?void 0:_.x)??0)+s/2,p=(((C=o.arrow)==null?void 0:C.y)??0)+l/2;let x="",y="";return u==="bottom"?(x=a?d:`${h}px`,y=`${-l}px`):u==="top"?(x=a?d:`${h}px`,y=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,y=a?d:`${p}px`):u==="left"&&(x=`${r.floating.width+l}px`,y=a?d:`${p}px`),{data:{x,y}}}});function YY(e){const[t,n="center"]=e.split("-");return[t,n]}var $y=UY,Fy=WY,Yx=HY,Xx=KY,Dve="Portal",vm=b.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=b.useState(!1);ii(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?_Y.createPortal(v.jsx(Zt.div,{...r,ref:t}),a):null});vm.displayName=Dve;function Lve(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ji=e=>{const{present:t,children:n}=e,r=$ve(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Bn(r.ref,Fve(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};ji.displayName="Presence";function $ve(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),i=b.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Lve(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=o_(r.current);i.current=s==="mounted"?u:"none"},[s]),ii(()=>{const u=r.current,c=o.current;if(c!==e){const h=i.current,p=o_(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ii(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=p=>{const y=o_(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(l("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=p=>{p.target===t&&(i.current=o_(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function o_(e){return(e==null?void 0:e.animationName)||"none"}function Fve(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bve=NO[" useInsertionEffect ".trim().toString()]||ii;function qs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=zve({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const c=b.useRef(e!==void 0);b.useEffect(()=>{const d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,r])}const u=b.useCallback(c=>{var d;if(s){const h=qve(c)?c(e):c;h!==e&&((d=a.current)==null||d.call(a,h))}else i(c)},[s,e,i,a]);return[l,u]}function zve({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),i=b.useRef(t);return Bve(()=>{i.current=t},[t]),b.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function qve(e){return typeof e=="function"}var XY=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Uve="VisuallyHidden",qO=b.forwardRef((e,t)=>v.jsx(Zt.span,{...e,ref:t,style:{...XY,...e.style}}));qO.displayName=Uve;var Vve=qO,[UO]=fs("Tooltip",[nc]),VO=nc(),QY="TooltipProvider",Wve=700,PI="tooltip.open",[Hve,eL]=UO(QY),ZY=e=>{const{__scopeTooltip:t,delayDuration:n=Wve,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=b.useRef(!0),s=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),v.jsx(Hve,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:i})};ZY.displayName=QY;var Iw="Tooltip",[Gve,Qx]=UO(Iw),JY=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=eL(Iw,e.__scopeTooltip),u=VO(t),[c,d]=b.useState(null),h=Pa(),p=b.useRef(0),x=a??l.disableHoverableContent,y=s??l.delayDuration,w=b.useRef(!1),[_,C]=qs({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(PI))):l.onClose(),i==null||i(k)},caller:Iw}),O=b.useMemo(()=>_?w.current?"delayed-open":"instant-open":"closed",[_]),P=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w.current=!1,C(!0)},[C]),R=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,C(!1)},[C]),T=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{w.current=!0,C(!0),p.current=0},y)},[y,C]);return b.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),v.jsx($y,{...u,children:v.jsx(Gve,{scope:t,contentId:h,open:_,stateAttribute:O,trigger:c,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?T():P()},[l.isOpenDelayedRef,T,P]),onTriggerLeave:b.useCallback(()=>{x?R():(window.clearTimeout(p.current),p.current=0)},[R,x]),onOpen:P,onClose:R,disableHoverableContent:x,children:n})})};JY.displayName=Iw;var TI="TooltipTrigger",eX=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qx(TI,n),i=eL(TI,n),a=VO(n),s=b.useRef(null),l=Bn(t,s,o.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),v.jsx(Fy,{asChild:!0,...a,children:v.jsx(Zt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Ze(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ze(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:Ze(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ze(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ze(e.onBlur,o.onClose),onClick:Ze(e.onClick,o.onClose)})})});eX.displayName=TI;var tL="TooltipPortal",[Kve,Yve]=UO(tL,{forceMount:void 0}),tX=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Qx(tL,t);return v.jsx(Kve,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(vm,{asChild:!0,container:o,children:r})})})};tX.displayName=tL;var Gv="TooltipContent",nX=b.forwardRef((e,t)=>{const n=Yve(Gv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Qx(Gv,e.__scopeTooltip);return v.jsx(ji,{present:r||a.open,children:a.disableHoverableContent?v.jsx(rX,{side:o,...i,ref:t}):v.jsx(Xve,{side:o,...i,ref:t})})}),Xve=b.forwardRef((e,t)=>{const n=Qx(Gv,e.__scopeTooltip),r=eL(Gv,e.__scopeTooltip),o=b.useRef(null),i=Bn(t,o),[a,s]=b.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((x,y)=>{const w=x.currentTarget,_={x:x.clientX,y:x.clientY},C=tye(_,w.getBoundingClientRect()),O=nye(_,C),P=rye(y.getBoundingClientRect()),R=iye([...O,...P]);s(R),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&c){const x=w=>p(w,c),y=w=>p(w,l);return l.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[l,c,p,h]),b.useEffect(()=>{if(a){const x=y=>{const w=y.target,_={x:y.clientX,y:y.clientY},C=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),O=!oye(_,a);C?h():O&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,c,a,u,h]),v.jsx(rX,{...e,ref:i})}),[Qve,Zve]=UO(Iw,{isInside:!1}),Jve=nge("TooltipContent"),rX=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Qx(Gv,n),u=VO(n),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(PI,c),()=>document.removeEventListener(PI,c)),[c]),b.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),v.jsx(Zd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:v.jsxs(Yx,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(Jve,{children:r}),v.jsx(Qve,{scope:n,isInside:!0,children:v.jsx(Vve,{id:l.contentId,role:"tooltip",children:o||r})})]})})});nX.displayName=Gv;var oX="TooltipArrow",eye=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=VO(n);return Zve(oX,n).isInside?null:v.jsx(Xx,{...o,...r,ref:t})});eye.displayName=oX;function tye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nye(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function rye(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function oye(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;ir!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}function iye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),aye(t)}function aye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var sye=ZY,lye=JY,uye=eX,cye=tX,iX=nX;const Ll=sye,$l=lye,Fl=uye,Us=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(cye,{children:v.jsx(iX,{ref:r,sideOffset:t,className:je("z-[300] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),avoidCollisions:!0,collisionPadding:8,...n})}));Us.displayName=iX.displayName;var fye=Symbol.for("react.lazy"),EE=NO[" use ".trim().toString()];function dye(e){return typeof e=="object"&&e!==null&&"then"in e}function aX(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fye&&"_payload"in e&&dye(e._payload)}function sX(e){const t=pye(e),n=b.forwardRef((r,o)=>{let{children:i,...a}=r;aX(i)&&typeof EE=="function"&&(i=EE(i._payload));const s=b.Children.toArray(i),l=s.find(vye);if(l){const u=l.props.children,c=s.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return v.jsx(t,{...a,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var hye=sX("Slot");function pye(e){const t=b.forwardRef((n,r)=>{let{children:o,...i}=n;if(aX(o)&&typeof EE=="function"&&(o=EE(o._payload)),b.isValidElement(o)){const a=wye(o),s=yye(i,o.props);return o.type!==b.Fragment&&(s.ref=r?Gx(r,a):a),b.cloneElement(o,s)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lX=Symbol("radix.slottable");function mye(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=lX,t}var gye=mye("Slottable");function vye(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lX}function yye(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wye(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const AI=Ul("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9",xs:""},variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",icon:"hover:bg-accent hover:text-accent-foreground p-1",cta:"bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 border px-3"}},defaultVariants:{variant:"default",size:"default"}}),wt=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,hoverText:o=void 0,hoverTextSide:i="top",leftIcon:a,rightIcon:s,fullWidth:l,children:u,...c},d)=>{const h=r?hye:"button",p=je(a&&n!=="icon"&&"pl-3",s&&n!=="icon"&&"pr-3"),x=l?"w-full":"";return v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsxs(h,{className:je(AI({variant:t,size:n,className:e}),p,x),ref:d,...c,children:[a&&v.jsx("span",{className:"-ml-1 mr-2",children:a}),v.jsx(gye,{children:u}),s&&v.jsx("span",{className:"-mr-1 ml-2",children:s})]})}),o&&v.jsx(Us,{side:i,children:o})]})})});wt.displayName="Button";const gv=new WeakMap,eE=new WeakMap,CE={current:[]};let y2=!1,lw=0;const Y1=new Set,i_=new Map;function uX(e){const t=Array.from(e).sort((n,r)=>n instanceof vv&&n.options.deps.includes(r)?1:r instanceof vv&&r.options.deps.includes(n)?-1:0);for(const n of t){if(CE.current.includes(n))continue;CE.current.push(n),n.recompute();const r=eE.get(n);if(r)for(const o of r){const i=gv.get(o);i&&uX(i)}}}function xye(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function bye(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function cX(e){if(lw>0&&!i_.has(e)&&i_.set(e,e.prevState),Y1.add(e),!(lw>0)&&!y2)try{for(y2=!0;Y1.size>0;){const t=Array.from(Y1);Y1.clear();for(const n of t){const r=i_.get(n)??n.prevState;n.prevState=r,xye(n)}for(const n of t){const r=gv.get(n);r&&(CE.current.push(n),uX(r))}for(const n of t){const r=gv.get(n);if(r)for(const o of r)bye(o)}}}finally{y2=!1,CE.current=[],i_.clear()}}function uw(e){lw++;try{e()}finally{if(lw--,lw===0){const t=Y1.values().next().value;t&&cX(t)}}}function Sye(e){return typeof e=="function"}class kI{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var o,i;this.listeners.add(r);const a=(i=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:i.call(o,r,this);return()=>{this.listeners.delete(r),a==null||a()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):Sye(t)?this.state=t(this.prevState):this.state=t,(o=(r=this.options)==null?void 0:r.onUpdate)==null||o.call(r),cX(this)}}class vv{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),o=new Array(n);for(let i=0;i{var n,r;this.prevState=this.state;const o=this.getDepVals();this.state=this.options.fn(o),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof vv&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:o}=this.getDepVals();for(let i=0;i(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,o;this.listeners.add(n);const i=(o=(r=this.options).onSubscribe)==null?void 0:o.call(r,n,this);return()=>{this.listeners.delete(n),i==null||i()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof vv)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof kI){let r=gv.get(n);r||(r=new Set,gv.set(n,r)),r.add(this);let o=eE.get(this);o||(o=new Set,eE.set(this,o)),o.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof vv)this.unregisterFromGraph(n.options.deps);else if(n instanceof kI){const r=gv.get(n);r&&r.delete(this);const o=eE.get(this);o&&o.delete(n)}}}const Ld="__TSR_index",$F="popstate",FF="beforeunload";function _ye(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(s=>s({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},i=async({task:a,navigateOpts:s,...l})=>{var h,p;if((s==null?void 0:s.ignoreBlocker)??!1){a();return}const c=((h=e.getBlockers)==null?void 0:h.call(e))??[],d=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&d)for(const x of c){const y=OE(l.path,l.state);if(await x.blockerFn({currentLocation:t,nextLocation:y,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,s,l)=>{const u=t.state[Ld];s=BF(u+1,s),i({task:()=>{e.pushState(a,s),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:s})},replace:(a,s,l)=>{const u=t.state[Ld];s=BF(u,s),i({task:()=>{e.replaceState(a,s),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:s})},go:(a,s)=>{i({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:s,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Ld]!==0,createHref:a=>e.createHref(a),block:a=>{var l;if(!e.setBlockers)return()=>{};const s=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...s,a]),()=>{var c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(h=>h!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function BF(e,t){t||(t={});const n=nL();return{...t,key:n,__TSR_key:n,[Ld]:e}}function Eye(e){var M,j;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const i=()=>o,a=$=>o=$,s=($=>$),l=(()=>OE(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((j=t.history.state)!=null&&j.key)){const $=nL();t.history.replaceState({[Ld]:0,key:$,__TSR_key:$},"")}let u=l(),c,d=!1,h=!1,p=!1,x=!1;const y=()=>u;let w,_;const C=()=>{w&&(k._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),k._ignoreSubscribers=!1,w=void 0,_=void 0,c=void 0)},O=($,L,V)=>{const G=s(L);_||(c=u),u=OE(L,V),w={href:G,state:V,isPush:(w==null?void 0:w.isPush)||$==="push"},_||(_=Promise.resolve().then(()=>C()))},P=$=>{u=l(),k.notify({type:$})},R=async()=>{if(h){h=!1;return}const $=l(),L=$.state[Ld]-u.state[Ld],V=L===1,G=L===-1,D=!V&&!G||d;d=!1;const H=D?"GO":G?"BACK":"FORWARD",U=D?{type:"GO",index:L}:{type:G?"BACK":"FORWARD"};if(p)p=!1;else{const Y=i();if(typeof document<"u"&&Y.length){for(const q of Y)if(await q.blockerFn({currentLocation:u,nextLocation:$,action:H})){h=!0,t.history.go(1),k.notify(U);return}}}u=l(),k.notify(U)},T=$=>{if(x){x=!1;return}let L=!1;const V=i();if(typeof document<"u"&&V.length)for(const G of V){const D=G.enableBeforeUnload??!0;if(D===!0){L=!0;break}if(typeof D=="function"&&D()===!0){L=!0;break}}if(L)return $.preventDefault(),$.returnValue=""},k=_ye({getLocation:y,getLength:()=>t.history.length,pushState:($,L)=>O("push",$,L),replaceState:($,L)=>O("replace",$,L),back:$=>($&&(p=!0),x=!0,t.history.back()),forward:$=>{$&&(p=!0),x=!0,t.history.forward()},go:$=>{d=!0,t.history.go($)},createHref:$=>s($),flush:C,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(FF,T,{capture:!0}),t.removeEventListener($F,R)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(FF,T,{capture:!0}),t.addEventListener($F,R),t.history.pushState=function(...$){const L=n.apply(t.history,$);return k._ignoreSubscribers||P("PUSH"),L},t.history.replaceState=function(...$){const L=r.apply(t.history,$);return k._ignoreSubscribers||P("REPLACE"),L},k}function OE(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),o=nL();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Ld]:0,key:o,__TSR_key:o}}}function nL(){return(Math.random()+1).toString(36).substring(7)}function RE(e){return e[e.length-1]}function Cye(e){return typeof e=="function"}function Td(e,t){return Cye(e)?e(t):e}const Oye=Object.prototype.hasOwnProperty;function Ts(e,t){if(e===t)return e;const n=t,r=UF(e)&&UF(n);if(!r&&!(PE(e)&&PE(n)))return n;const o=r?e:zF(e);if(!o)return n;const i=r?n:zF(n);if(!i)return n;const a=o.length,s=i.length,l=r?new Array(s):{};let u=0;for(let c=0;c"u")return!0;const n=t.prototype;return!(!qF(n)||!n.hasOwnProperty("isPrototypeOf"))}function qF(e){return Object.prototype.toString.call(e)==="[object Object]"}function UF(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fp(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;ro||!Fp(e[a],t[a],n)))return!1;return o===i}return!1}function Kv(e){let t,n;const r=new Promise((o,i)=>{t=o,n=i});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e==null||e(o)},r.reject=o=>{r.status="rejected",n(o)},r}function Rye(e){return typeof(e==null?void 0:e.message)!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function $d(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function VF(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function WF(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,o="",i;for(;(i=n.exec(e))!==null;)o+=VF(e.slice(r,i.index))+i[0],r=n.lastIndex;return o+VF(r?e.slice(r):e)}var Pye="Invariant failed";function Cr(e,t){if(!e)throw new Error(Pye)}function TE(e){const t=new Map;let n,r;const o=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=t.get(i);if(a)return o(a),a.value},set(i,a){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const s=t.get(i);if(s)s.value=a,o(s);else{const l={key:i,value:a,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(i,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const Yv=0,Xp=1,Qp=2,Dw=3,Tye=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Aye=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,kye=/^([^{]*)\{\$\}([^}]*)$/;function rL(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,i=e.substring(t,o);if(!i||!i.includes("$"))return n[0]=Yv,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(i==="$"){const u=e.length;return n[0]=Qp,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(i.charCodeAt(0)===36)return n[0]=Xp,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=i.match(kye);if(a){const c=a[1].length;return n[0]=Qp,n[1]=t+c,n[2]=t+c+1,n[3]=t+c+2,n[4]=t+c+3,n[5]=e.length,n}const s=i.match(Aye);if(s){const u=s[1],c=s[2],d=s[3],h=u.length;return n[0]=Dw,n[1]=t+h,n[2]=t+h+3,n[3]=t+h+3+c.length,n[4]=o-d.length,n[5]=o,n}const l=i.match(Tye);if(l){const u=l[1],c=l[2],d=l[3],h=u.length;return n[0]=Xp,n[1]=t+h,n[2]=t+h+2,n[3]=t+h+2+c.length,n[4]=o-d.length,n[5]=o,n}return n[0]=Yv,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function WO(e,t,n,r,o,i,a){var l,u,c,d,h;a==null||a(n);let s=r;{const p=n.fullPath??n.from,x=p.length,y=((l=n.options)==null?void 0:l.caseSensitive)??e;for(;sL.caseSensitive===k&&L.prefix===M&&L.suffix===j);if($)_=$;else{const L=x2(Xp,n.fullPath??n.from,k,M,j);_=L,L.depth=i,L.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(L)}break}case Dw:{const R=p.substring(C,w[1]),T=p.substring(w[4],O),k=y&&!!(R||T),M=R?k?R:R.toLowerCase():void 0,j=T?k?T:T.toLowerCase():void 0,$=(h=o.optional)==null?void 0:h.find(L=>L.caseSensitive===k&&L.prefix===M&&L.suffix===j);if($)_=$;else{const L=x2(Dw,n.fullPath??n.from,k,M,j);_=L,L.parent=o,L.depth=i,o.optional??(o.optional=[]),o.optional.push(L)}break}case Qp:{const R=p.substring(C,w[1]),T=p.substring(w[4],O),k=y&&!!(R||T),M=R?k?R:R.toLowerCase():void 0,j=T?k?T:T.toLowerCase():void 0,$=x2(Qp,n.fullPath??n.from,k,M,j);_=$,$.parent=o,$.depth=i,o.wildcard??(o.wildcard=[]),o.wildcard.push($)}}o=_}if((n.path||!n.children)&&!n.isRoot){const w=p.endsWith("/");w||(o.notFound=n),(!o.route||!o.isIndex&&w)&&(o.route=n,o.fullPath=n.fullPath??n.from),o.isIndex||(o.isIndex=w)}}if(n.children)for(const p of n.children)WO(e,t,p,s,o,i,a)}function w2(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function yp(e){var t,n,r;if(e.static)for(const o of e.static.values())yp(o);if(e.staticInsensitive)for(const o of e.staticInsensitive.values())yp(o);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(w2);for(const o of e.dynamic)yp(o)}if((n=e.optional)!=null&&n.length){e.optional.sort(w2);for(const o of e.optional)yp(o)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(w2);for(const o of e.wildcard)yp(o)}}function Lw(e){return{kind:Yv,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function x2(e,t,n,r,o){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:o}}function Nye(e,t){const n=Lw("/"),r=new Uint16Array(6);for(const o of e)WO(!1,r,o,1,n,0);yp(n),t.masksTree=n,t.flatCache=TE(1e3)}function Mye(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=oL(e,t.masksTree);return t.flatCache.set(e,r),r}function jye(e,t,n,r,o){e||(e="/"),r||(r="/");const i=t?`case\0${e}`:e;let a=o.singleCache.get(i);if(!a){a=Lw("/");const s=new Uint16Array(6);WO(t,s,{from:e},1,a,0),o.singleCache.set(i,a)}return oL(r,a,n)}function Iye(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||(e="/");const i=oL(e,t.segmentTree,n);return i&&(i.branch=Fye(i.route)),t.matchCache.set(r,i),i}function Dye(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Lye(e,t=!1,n){const r=Lw(e.fullPath),o=new Uint16Array(6),i={},a={};let s=0;return WO(t,o,e,1,r,0,u=>{if(n==null||n(u,s),Cr(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,s!==0&&u.path){const c=Dye(u.fullPath);(!a[c]||u.fullPath.endsWith("/"))&&(a[c]=u)}s++}),yp(r),{processedTree:{segmentTree:r,singleCache:TE(1e3),matchCache:TE(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function oL(e,t,n=!1){const r=e.split("/"),o=zye(e,r,t,n);if(!o)return null;const i=$ye(e,r,o),a="**"in o;return a&&(i["**"]=o["**"]),{route:a?o.node.notFound??o.node.route:o.node.route,params:i}}function $ye(e,t,n){var a,s,l,u,c,d;const r=Bye(n.node);let o=null;const i={};for(let h=0,p=0,x=0;p=0;M--){const j=h.optional[M];s.push({node:j,index:p,skipped:T,depth:k,statics:w,dynamics:_,optionals:C})}if(!O)for(let M=h.optional.length-1;M>=0;M--){const j=h.optional[M],{prefix:$,suffix:L}=j;if($||L){const V=j.caseSensitive?P:R??(R=P.toLowerCase());if($&&!V.startsWith($)||L&&!V.endsWith(L))continue}s.push({node:j,index:p+1,skipped:x,depth:k,statics:w,dynamics:_,optionals:C+1})}}if(!O&&h.dynamic&&P)for(let T=h.dynamic.length-1;T>=0;T--){const k=h.dynamic[T],{prefix:M,suffix:j}=k;if(M||j){const $=k.caseSensitive?P:R??(R=P.toLowerCase());if(M&&!$.startsWith(M)||j&&!$.endsWith(j))continue}s.push({node:k,index:p+1,skipped:x,depth:y+1,statics:w,dynamics:_+1,optionals:C})}if(!O&&h.staticInsensitive){const T=h.staticInsensitive.get(R??(R=P.toLowerCase()));T&&s.push({node:T,index:p+1,skipped:x,depth:y+1,statics:w+1,dynamics:_,optionals:C})}if(!O&&h.static){const T=h.static.get(P);T&&s.push({node:T,index:p+1,skipped:x,depth:y+1,statics:w+1,dynamics:_,optionals:C})}}if(c&&l)return a_(l,c)?c:l;if(c)return c;if(l)return l;if(r&&u){let d=u.index;for(let p=0;pe.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function tE(e){return iL(e.filter(t=>t!==void 0).join("/"))}function iL(e){return e.replace(/\/{2,}/g,"/")}function fX(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Bp(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function nE(e){return Bp(fX(e))}function AE(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function qye(e,t,n){return AE(e,n)===AE(t,n)}function Uye({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),i=!o&&t===".";let a;if(r){a=o?t:i?e:e+"\0"+t;const d=r.get(a);if(d)return d}let s;if(i)s=e.split("/");else if(o)s=t.split("/");else{for(s=e.split("/");s.length>1&&RE(s)==="";)s.pop();const d=t.split("/");for(let h=0,p=d.length;h1&&(RE(s)===""?n==="never"&&s.pop():n==="always"&&s.push(""));let l,u="";for(let d=0;d0&&(u+="/");const h=s[d];if(!h)continue;l=rL(h,0,l);const p=l[0];if(p===Yv){u+=h;continue}const x=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],x),_=h.substring(l[2],l[3]);p===Xp?u+=y||w?`${y}{$${_}}${w}`:`$${_}`:p===Qp?u+=y||w?`${y}{$}${w}`:"$":u+=`${y}{-$${_}}${w}`}u=iL(u);const c=u||"/";return a&&r&&r.set(a,c),c}function b2(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):Vye(r,n)}function S2({path:e,params:t,decodeCharMap:n}){let r=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:r};const i=e.length;let a=0,s,l="";for(;a{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function Gye(){const e=Wye();if(!e)return null;const t=e.getItem(kE);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Td(r,n)||n,e.setItem(kE,JSON.stringify(n)))}}const s_=Gye(),NI=e=>e.state.__TSR_key||e.href;function Kye(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let NE=!1;function dX({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:i}){var u,c;let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(d){console.error(d);return}const s=t||((u=window.history.state)==null?void 0:u.__TSR_key),l=a[s];NE=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const p in l){const x=l[p];if(p==="window")window.scrollTo({top:x.scrollY,left:x.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=x.scrollX,y.scrollTop=x.scrollY)}}break e}const d=(i??window.location).hash.split("#",2)[1];if(d){const p=((c=window.history.state)==null?void 0:c.__hashScrollIntoViewOptions)??!0;if(p){const x=document.getElementById(d);x&&x.scrollIntoView(p)}break e}const h={top:0,left:0,behavior:n};if(window.scrollTo(h),o)for(const p of o){if(p==="window")continue;const x=typeof p=="function"?p():document.querySelector(p);x&&x.scrollTo(h)}}NE=!1}function Yye(e,t){if(!s_&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!s_))return;e.isScrollRestorationSetup=!0,NE=!1;const r=e.options.getScrollRestorationKey||NI;window.history.scrollRestoration="manual";const o=i=>{if(NE||!e.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const l=i.target.getAttribute("data-scroll-restoration-id");l?a=`[data-scroll-restoration-id="${l}"]`:a=Kye(i.target)}const s=r(e.state.location);s_.set(l=>{const u=l[s]||(l[s]={}),c=u[a]||(u[a]={});if(a==="window")c.scrollX=window.scrollX||0,c.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(c.scrollX=d.scrollLeft||0,c.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",Hye(o,100),!0),e.subscribe("onRendered",i=>{const a=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(dX({storageKey:kE,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&s_.set(s=>(s[a]||(s[a]={}),s)))})}function Xye(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Qye(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function _2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Zye(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const i=n[r];i==null?n[r]=_2(o):Array.isArray(i)?i.push(_2(o)):n[r]=[i,_2(o)]}return n}const Jye=t0e(JSON.parse),e0e=n0e(JSON.stringify,JSON.parse);function t0e(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Zye(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function n0e(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const i=Qye(o,r);return i?`?${i}`:""}}const ts="__root__";function Dn(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Al(e){return e instanceof Response&&!!e.options}const rE=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},HO=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),hX=(e,t)=>{var o;const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&((o=e.router.options)!=null&&o.defaultNotFoundComponent)&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Cr(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);Cr(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,hX(e,t))},Ad=(e,t,n)=>{var r,o,i;if(!(!Al(n)&&!Ls(n))){if(Al(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=t._nonReactive.loaderPromise)==null||o.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=Al(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:a,isFetching:!1,error:n})),Ls(n)&&!n.routeId&&(n.routeId=t.routeId),(i=t._nonReactive.loadPromise)==null||i.resolve()}throw Al(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(hX(e,n),n)}},pX=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},w1=(e,t,n,r)=>{var s,l;const{id:o,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Ad(e,e.router.getMatch(o),n);try{(l=(s=a.options).onError)==null||l.call(s,n)}catch(u){n=u,Ad(e,e.router.getMatch(o),n)}e.updateMatch(o,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},r0e=(e,t,n,r)=>{var p;const o=e.router.getMatch(t),i=(p=e.matches[n-1])==null?void 0:p.id,a=i?e.router.getMatch(i):void 0;if(e.router.isShell()){o.ssr=r.id===ts;return}if((a==null?void 0:a.ssr)===!1){o.ssr=!1;return}const s=x=>x===!0&&(a==null?void 0:a.ssr)==="data-only"?"data-only":x,l=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){o.ssr=s(l);return}if(typeof r.options.ssr!="function"){o.ssr=s(r.options.ssr);return}const{search:u,params:c}=o,d={search:l_(u,o.searchError),params:l_(c,o.paramsError),location:e.location,matches:e.matches.map(x=>({index:x.index,pathname:x.pathname,fullPath:x.fullPath,staticData:x.staticData,id:x.id,routeId:x.routeId,search:l_(x.search,x.searchError),params:l_(x.params,x.paramsError),ssr:x.ssr}))},h=r.options.ssr(d);if($d(h))return h.then(x=>{o.ssr=s(x??l)});o.ssr=s(h??l)},mX=(e,t,n,r)=>{var a;if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!HO(e,t)&&(n.options.loader||n.options.beforeLoad||yX(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??((a=e.router.options)==null?void 0:a.defaultPendingComponent)))){const s=setTimeout(()=>{rE(e)},o);r._nonReactive.pendingTimeout=s}},o0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;mX(e,t,n,r);const o=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Ad(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},i0e=(e,t,n,r)=>{var T;const o=e.router.getMatch(t),i=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Kv(()=>{i==null||i.resolve()});const{paramsError:a,searchError:s}=o;a&&w1(e,n,a,"PARSE_PARAMS"),s&&w1(e,n,s,"VALIDATE_SEARCH"),mX(e,t,r,o);const l=new AbortController,u=(T=e.matches[n-1])==null?void 0:T.id,c=u?e.router.getMatch(u):void 0,d=(c==null?void 0:c.context)??e.router.options.context??void 0;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:l})))},x=()=>{var k;(k=o._nonReactive.beforeLoadPromise)==null||k.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!r.options.beforeLoad){uw(()=>{p(),x()});return}o._nonReactive.beforeLoadPromise=Kv();const{search:y,params:w,cause:_}=o,C=HO(e,t),O={search:y,abortController:l,params:w,preload:C,context:{...d,...c==null?void 0:c.__beforeLoadContext,...o.__routeContext},location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":_,matches:e.matches,...e.router.options.additionalContext},P=k=>{if(k===void 0){uw(()=>{p(),x()});return}(Al(k)||Ls(k))&&(p(),w1(e,n,k,"BEFORE_LOAD")),uw(()=>{p(),e.updateMatch(t,M=>({...M,__beforeLoadContext:k})),x()})};let R;try{if(R=r.options.beforeLoad(O),$d(R))return p(),R.catch(k=>{w1(e,n,k,"BEFORE_LOAD")}).then(P)}catch(k){p(),w1(e,n,k,"BEFORE_LOAD")}P(R)},a0e=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const l=r0e(e,n,t,o);if($d(l))return l.then(s)}return s()},a=()=>i0e(e,n,t,o),s=()=>{if(pX(e,n))return;const l=o0e(e,n,o);return $d(l)?l.then(a):a()};return i()},cw=(e,t,n)=>{var i,a,s,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(a=(i=n.options).head)==null?void 0:a.call(i,o),(l=(s=n.options).scripts)==null?void 0:l.call(s,o),(c=(u=n.options).headers)==null?void 0:c.call(u,o)]).then(([d,h,p])=>{const x=d==null?void 0:d.meta,y=d==null?void 0:d.links,w=d==null?void 0:d.scripts,_=d==null?void 0:d.styles;return{meta:x,links:y,headScripts:w,headers:p,scripts:h,styles:_}})},gX=(e,t,n,r)=>{const o=e.matchPromises[n-1],{params:i,loaderDeps:a,abortController:s,cause:l}=e.router.getMatch(t);let u=e.router.options.context??{};for(let d=0;d<=n;d++){const h=e.matches[d];if(!h)continue;const p=e.router.getMatch(h.id);p&&(u={...u,...p.__routeContext??{},...p.__beforeLoadContext??{}})}const c=HO(e,t);return{params:i,deps:a,preload:!!c,parentMatchPromise:o,abortController:s,context:u,location:e.location,navigate:d=>e.router.navigate({...d,_fromLocation:e.location}),cause:c?"preload":l,route:r,...e.router.options.additionalContext}},HF=async(e,t,n,r)=>{var o,i,a,s,l,u;try{const c=e.router.getMatch(t);try{(!e.router.isServer||c.ssr===!0)&&vX(r);const d=(i=(o=r.options).loader)==null?void 0:i.call(o,gX(e,t,n,r)),h=r.options.loader&&$d(d);if(!!(h||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(t,_=>({..._,isFetching:"loader"})),r.options.loader){const _=h?await d:d;Ad(e,e.router.getMatch(t),_),_!==void 0&&e.updateMatch(t,C=>({...C,loaderData:_}))}r._lazyPromise&&await r._lazyPromise;const x=cw(e,t,r),y=x?await x:void 0,w=c._nonReactive.minPendingPromise;w&&await w,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,_=>({..._,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...y}))}catch(d){let h=d;const p=c._nonReactive.minPendingPromise;p&&await p,Ls(d)&&await((s=(a=r.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:s.call(a)),Ad(e,e.router.getMatch(t),d);try{(u=(l=r.options).onError)==null||u.call(l,d)}catch(w){h=w,Ad(e,e.router.getMatch(t),w)}const x=cw(e,t,r),y=x?await x:void 0;e.updateMatch(t,w=>({...w,error:h,status:"error",isFetching:!1,...y}))}}catch(c){const d=e.router.getMatch(t);if(d){const h=cw(e,t,r);if(h){const p=await h;e.updateMatch(t,x=>({...x,...p}))}d._nonReactive.loaderPromise=void 0}Ad(e,d,c)}},s0e=async(e,t)=>{var c,d;const{id:n,routeId:r}=e.matches[t];let o=!1,i=!1;const a=e.router.looseRoutesById[r],s=()=>{const h={...e.router.options.context};for(let p=0;p<=t;p++){const x=e.matches[p];if(!x)continue;const y=e.router.getMatch(x.id);y&&Object.assign(h,y.__routeContext,y.__beforeLoadContext)}e.updateMatch(n,p=>({...p,context:h}))};if(pX(e,n)){if(e.router.isServer){const h=cw(e,n,a);if(h){const p=await h;e.updateMatch(n,x=>({...x,...p}))}return e.router.getMatch(n)}}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),x=p._nonReactive.error||p.error;x&&Ad(e,p,x)}else{const p=Date.now()-h.updatedAt,x=HO(e,n),y=x?a.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??e.router.options.defaultStaleTime??0,w=a.options.shouldReload,_=typeof w=="function"?w(gX(e,n,t,a)):w,C=!!x&&!e.router.state.matches.some(T=>T.id===n),O=e.router.getMatch(n);O._nonReactive.loaderPromise=Kv(),C!==O.preload&&e.updateMatch(n,T=>({...T,preload:C}));const{status:P,invalid:R}=O;if(o=P==="success"&&(R||(_??p>y)),!(x&&a.options.preload===!1))if(o&&!e.sync)i=!0,(async()=>{var T,k;try{await HF(e,n,t,a),s();const M=e.router.getMatch(n);(T=M._nonReactive.loaderPromise)==null||T.resolve(),(k=M._nonReactive.loadPromise)==null||k.resolve(),M._nonReactive.loaderPromise=void 0}catch(M){Al(M)&&await e.router.navigate(M.options)}})();else if(P!=="success"||o&&e.sync)await HF(e,n,t,a);else{const T=cw(e,n,a);if(T){const k=await T;e.updateMatch(n,M=>({...M,...k}))}}}}const l=e.router.getMatch(n);i||((c=l._nonReactive.loaderPromise)==null||c.resolve(),(d=l._nonReactive.loadPromise)==null||d.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,i||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0,i||s();const u=i?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:u,invalid:!1})),e.router.getMatch(n)):l};async function GF(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&rE(t);try{for(let o=0;o{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var r;const n=[];for(const o of wX){const i=(r=e.options[o])==null?void 0:r.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function l_(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function yX(e){var t;for(const n of wX)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const wX=["component","errorComponent","pendingComponent","notFoundComponent"];function l0e(e){return{input:({url:t})=>{for(const n of e)t=xX(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=bX(e[n],t);return t}}}function u0e(e){const t=nE(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const s=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return s===o?a.pathname="/":s.startsWith(i)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=tE(["/",t,a.pathname]),a)}}function xX(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function bX(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function zp(e){const t=e.resolvedLocation,n=e.location,r=(t==null?void 0:t.pathname)!==n.pathname,o=(t==null?void 0:t.href)!==n.href,i=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:i}}class c0e{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var h;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(p=>[encodeURIComponent(p),p])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Eye())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new kI(d0e(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(p=>!["redirected"].includes(p.status))}}}),Yye(this));let s=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(i||o!==l||a!==u){this.basepath=l;const p=[];nE(l)!==""&&p.push(u0e({basepath:l})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:l0e(p),this.history&&this.updateLatestLocation(),s=!0}s&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:o}=Lye(this.routeTree,this.options.caseSensitive,(a,s)=>{a.init({originalIndex:s})});this.options.routeMasks&&Nye(this.options.routeMasks,o),this.routesById=n,this.routesByPath=r,this.processedTree=o;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({href:l,state:u})=>{const c=new URL(l,this.origin),d=xX(this.rewrite,c),h=this.options.parseSearch(d.search),p=this.options.stringifySearch(h);d.search=p;const x=d.href.replace(d.origin,""),{pathname:y,hash:w}=d;return{href:x,publicHref:l,url:d.href,pathname:WF(y),searchStr:p,search:Ts(r==null?void 0:r.search,h),hash:w.split("#").reverse()[0]??"",state:Ts(r==null?void 0:r.state,u)}},i=o(n),{__tempLocation:a,__tempKey:s}=i.state;if(a&&(!s||s===this.tempLocationKey)){const l=o(a);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathCache=TE(1e3),this.resolvePathWithBase=(n,r)=>Uye({base:n,to:iL(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>h0e({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{var $,L;const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,s=this.matchRoutes(a,{_buildLocation:!0}),l=RE(s);i.from;const u=i.unsafeRelative==="path"?a.pathname:i.from??l.fullPath,c=this.resolvePathWithBase(u,"."),d=l.search,h={...l.params},p=i.to?this.resolvePathWithBase(c,`${i.to}`):this.resolvePathWithBase(c,"."),x=i.params===!1||i.params===null?{}:(i.params??!0)===!0?h:Object.assign(h,Td(i.params,h)),y=S2({path:p,params:x}).interpolatedPath,w=this.matchRoutes(y,void 0,{_buildLocation:!0}).map(V=>this.looseRoutesById[V.routeId]);if(Object.keys(x).length>0)for(const V of w){const G=(($=V.options.params)==null?void 0:$.stringify)??V.options.stringifyParams;G&&Object.assign(x,G(x))}const _=n.leaveParams?p:WF(S2({path:p,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let C=d;if(n._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const V={};w.forEach(G=>{if(G.options.validateSearch)try{Object.assign(V,MI(G.options.validateSearch,{...V,...C}))}catch{}}),C=V}C=p0e({search:C,dest:i,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),C=Ts(d,C);const O=this.options.stringifySearch(C),P=i.hash===!0?a.hash:i.hash?Td(i.hash,a.hash):void 0,R=P?`#${P}`:"";let T=i.state===!0?a.state:i.state?Td(i.state,a.state):{};T=Ts(a.state,T);const k=`${_}${O}${R}`,M=new URL(k,this.origin),j=bX(this.rewrite,M);return{publicHref:j.pathname+j.search+j.hash,href:k,url:j.href,pathname:_,search:C,searchStr:O,state:T,hash:P??"",unmaskOnReload:i.unmaskOnReload}},o=(i={},a)=>{const s=r(i);let l=a?r(a):void 0;if(!l){const u={};if(this.options.routeMasks){const c=Mye(s.pathname,this.processedTree);if(c){Object.assign(u,c.params);const{from:d,params:h,...p}=c.route,x=h===!1||h===null?{}:(h??!0)===!0?u:Object.assign(u,Td(h,u));a={from:n.from,...p,params:x},l=r(a)}}}return l&&(s.maskedLocation=l),s};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...o})=>{const i=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{o.state[c]=this.latestLocation.state[c]});const u=Fp(o.state,this.latestLocation.state);return l.forEach(c=>{delete o.state[c]}),u},a=Bp(this.latestLocation.href)===Bp(o.href),s=this.commitLocationPromise;if(this.commitLocationPromise=Kv(()=>{s==null||s.resolve()}),a&&i())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=o;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:i,ignoreBlocker:a,href:s,...l}={})=>{if(s){const d=this.history.location.state.__TSR_index,h=OE(s,{__TSR_index:n?d:d+1});l.to=h.pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:o,...i})=>{var a;if(!r&&o)try{new URL(`${o}`),r=!0}catch{}if(r){if(o||(o=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const s=this.history,l=((a=s.getBlockers)==null?void 0:a.call(s))??[];for(const u of l)if(u!=null&&u.blockerFn&&await u.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(o):window.location.href=o,Promise.resolve()}return this.buildAndCommitLocation({...i,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),o=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(nE(o(this.latestLocation.href))!==nE(o(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),Dn({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(o=>!n.some(i=>i.id===o.id))}))},this.load=async n=>{let r,o,i;for(i=new Promise(s=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,c=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...zp({resolvedLocation:c,location:u})}),this.emit({type:"onBeforeLoad",...zp({resolvedLocation:c,location:u})}),await GF({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=[],h=[],p=[];uw(()=>{this.__store.setState(x=>{const y=x.matches,w=x.pendingMatches||x.matches;return d=y.filter(_=>!w.some(C=>C.id===_.id)),h=w.filter(_=>!y.some(C=>C.id===_.id)),p=w.filter(_=>y.some(C=>C.id===_.id)),{...x,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...x.cachedMatches,...d.filter(_=>_.status!=="error"&&_.status!=="notFound")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[h,"onEnter"],[p,"onStay"]].forEach(([x,y])=>{x.forEach(w=>{var _,C;(C=(_=this.looseRoutesById[w.routeId].options)[y])==null||C.call(_,w)})})})})}})}catch(u){Al(u)?(r=u,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ls(u)&&(o=u),this.__store.setState(c=>({...c,statusCode:r?r.status:o?404:c.matches.some(d=>d.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),s()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(s=>s.status==="error")&&(a=500),a!==void 0&&this.__store.setState(s=>({...s,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,s=typeof r.types=="function"?r.types(zp({resolvedLocation:a,location:i})):r.types;if(s===!1){n();return}o={update:n,types:s}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{var i;const o=(i=this.state.pendingMatches)!=null&&i.some(a=>a.id===n)?"pendingMatches":this.state.matches.some(a=>a.id===n)?"matches":this.state.cachedMatches.some(a=>a.id===n)?"cachedMatches":"";o&&this.__store.setState(a=>{var s;return{...a,[o]:(s=a[o])==null?void 0:s.map(l=>l.id===n?r(l):l)}})})},this.getMatch=n=>{var o;const r=i=>i.id===n;return this.state.cachedMatches.find(r)??((o=this.state.pendingMatches)==null?void 0:o.find(r))??this.state.matches.find(r)},this.invalidate=n=>{const r=o=>{var i;return((i=n==null?void 0:n.filter)==null?void 0:i.call(n,o))??!0?{...o,invalid:!0,...n!=null&&n.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.__store.setState(o=>{var i;return{...o,matches:o.matches.map(r),cachedMatches:o.cachedMatches.map(r),pendingMatches:(i=o.pendingMatches)==null?void 0:i.map(r)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let o=r.url;this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(i=>!r(i))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!0;const i=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=vX,this.preloadRoute=async n=>{const r=this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(s=>s.id)),a=new Set([...i,...this.state.cachedMatches.map(s=>s.id)]);uw(()=>{o.forEach(s=>{a.has(s.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,s]}))})});try{return o=await GF({router:this,matches:o,location:r,preload:!0,updateMatch:(s,l)=>{i.has(s)?o=o.map(u=>u.id===s?l(u):u):this.updateMatch(s,l)}}),o}catch(s){if(Al(s))return s.options.reloadDocument?void 0:await this.preloadRoute({...s.options,_fromLocation:r});Ls(s)||console.error(s);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(o);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const s=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=jye(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,s.pathname,this.processedTree);return!l||n.params&&!Fp(l.params,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Fp(s.search,i.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??e0e,parseSearch:t.parseSearch??Jye}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:i}=r;let{matchedRoutes:a}=r,s=!1;(o?o.path!=="/"&&i["**"]:Bp(t.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:s=!0);const l=(()=>{if(s){if(this.options.notFoundMode!=="root")for(let d=a.length-1;d>=0;d--){const h=a[d];if(h.children)return h.id}return ts}})(),u=[],c=d=>(d==null?void 0:d.id)?d.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((d,h)=>{var G,D,H;const p=u[h-1],[x,y,w]=(()=>{const U=(p==null?void 0:p.search)??t.search,Y=(p==null?void 0:p._strictSearch)??void 0;try{const q=MI(d.options.validateSearch,{...U})??void 0;return[{...U,...q},{...Y,...q},void 0]}catch(q){let W=q;if(q instanceof ME||(W=new ME(q.message,{cause:q})),n!=null&&n.throwOnError)throw W;return[U,{},W]}})(),_=((D=(G=d.options).loaderDeps)==null?void 0:D.call(G,{search:x}))??"",C=_?JSON.stringify(_):"",{interpolatedPath:O,usedParams:P}=S2({path:d.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),R=d.id+O+C,T=this.getMatch(R),k=this.state.matches.find(U=>U.routeId===d.id),M=(T==null?void 0:T._strictParams)??P;let j;if(!T){const U=((H=d.options.params)==null?void 0:H.parse)??d.options.parseParams;if(U)try{Object.assign(M,U(M))}catch(Y){if(Ls(Y)||Al(Y)?j=Y:j=new f0e(Y.message,{cause:Y}),n!=null&&n.throwOnError)throw j}}Object.assign(i,M);const $=k?"stay":"enter";let L;if(T)L={...T,cause:$,params:k?Ts(k.params,i):i,_strictParams:M,search:Ts(k?k.search:T.search,x),_strictSearch:y};else{const U=d.options.loader||d.options.beforeLoad||d.lazyFn||yX(d)?"pending":"success";L={id:R,ssr:this.isServer?void 0:d.options.ssr,index:h,routeId:d.id,params:k?Ts(k.params,i):i,_strictParams:M,pathname:O,updatedAt:Date.now(),search:k?Ts(k.search,x):x,_strictSearch:y,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:j,__routeContext:void 0,_nonReactive:{loadPromise:Kv()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:k?Ts(k.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}n!=null&&n.preload||(L.globalNotFound=l===d.id),L.searchError=w;const V=c(p);L.context={...V,...L.__routeContext,...L.__beforeLoadContext},u.push(L)}),u.forEach((d,h)=>{const p=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&(n==null?void 0:n._buildLocation)!==!0){const y=u[h-1],w=c(y);if(p.options.context){const _={deps:d.loaderDeps,params:d.params,context:w??{},location:t,navigate:C=>this.navigate({...C,_fromLocation:t}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:u};d.__routeContext=p.options.context(_)??void 0}d.context={...w,...d.__routeContext,...d.__beforeLoadContext}}}),u}}class ME extends Error{}class f0e extends Error{}function d0e(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function MI(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new ME("Async validation not supported");if(n.issues)throw new ME(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function h0e({pathname:e,routesById:t,processedTree:n}){const r={},o=Bp(e);let i;const a=Iye(o,n,!0);return a&&(i=a.route,Object.assign(r,a.params)),{matchedRoutes:(a==null?void 0:a.branch)||[t[ts]],routeParams:r,foundRoute:i}}function p0e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const o=n.reduce((s,l)=>{var c;const u=[];if("search"in l.options)(c=l.options.search)!=null&&c.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const d=({search:h,next:p})=>{let x=h;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(x=l.options.preSearchFilters.reduce((w,_)=>_(w),h));const y=p(x);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((w,_)=>_(w),y):y};u.push(d)}if(r&&l.options.validateSearch){const d=({search:h,next:p})=>{const x=p(h);try{return{...x,...MI(l.options.validateSearch,x)??void 0}}catch{return x}};u.push(d)}return s.concat(u)},[])??[],i=({search:s})=>t.search?t.search===!0?s:Td(t.search,s):{};o.push(i);const a=(s,l)=>{if(s>=o.length)return l;const u=o[s];return u({search:l,next:d=>a(s+1,d)})};return a(0,e)}const m0e="Error preloading route! ☝️";class SX{constructor(t){if(this.init=n=>{var u,c;this.originalIndex=n.originalIndex;const r=this.options,o=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(c=(u=this.options).getParentRoute)==null?void 0:c.call(u),o?this._path=ts:this.parentRoute||Cr(!1);let i=o?ts:r==null?void 0:r.path;i&&i!=="/"&&(i=fX(i));const a=(r==null?void 0:r.id)||i;let s=o?ts:tE([this.parentRoute.id===ts?"":this.parentRoute.id,a]);i===ts&&(i="/"),s!==ts&&(s=tE(["/",s]));const l=s===ts?"/":tE([this.parentRoute.fullPath,i]);this._path=i,this._id=s,this._fullPath=l,this._to=l},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class g0e extends SX{constructor(t){super(t)}}function aL(e){const t=e.errorComponent??GO;return v.jsx(v0e,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?b.createElement(t,{error:n,reset:r}):e.children})}class v0e extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function GO({error:e}){const[t,n]=b.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function y0e({children:e,fallback:t=null}){return w0e()?v.jsx(J.Fragment,{children:e}):v.jsx(J.Fragment,{children:t})}function w0e(){return J.useSyncExternalStore(x0e,()=>!0,()=>!1)}function x0e(){return()=>{}}var E2={exports:{}},C2={},O2={exports:{}},R2={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var KF;function b0e(){if(KF)return R2;KF=1;var e=zx();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var p=h(),x=r({inst:{value:p,getSnapshot:h}}),y=x[0].inst,w=x[1];return i(function(){y.value=p,y.getSnapshot=h,l(y)&&w({inst:y})},[d,p,h]),o(function(){return l(y)&&w({inst:y}),d(function(){l(y)&&w({inst:y})})},[d]),a(p),p}function l(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!n(d,p)}catch{return!0}}function u(d,h){return h()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return R2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,R2}var YF;function S0e(){return YF||(YF=1,O2.exports=b0e()),O2.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var XF;function _0e(){if(XF)return C2;XF=1;var e=zx(),t=S0e();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return C2.useSyncExternalStoreWithSelector=function(u,c,d,h,p){var x=i(null);if(x.current===null){var y={hasValue:!1,value:null};x.current=y}else y=x.current;x=s(function(){function _(T){if(!C){if(C=!0,O=T,T=h(T),p!==void 0&&y.hasValue){var k=y.value;if(p(k,T))return P=k}return P=T}if(k=P,r(O,T))return k;var M=h(T);return p!==void 0&&p(k,M)?(O=T,k):(O=T,P=M)}var C=!1,O,P,R=d===void 0?null:d;return[function(){return _(c())},R===null?void 0:function(){return _(R())}]},[c,d,h,p]);var w=o(u,x[0],x[1]);return a(function(){y.hasValue=!0,y.value=w},[w]),l(w),w},C2}var QF;function E0e(){return QF||(QF=1,E2.exports=_0e()),E2.exports}var _X=E0e();const C0e=Ln(_X);function O0e(e,t=r=>r,n={}){const r=n.equal??R0e;return _X.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function R0e(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!t.has(r)||!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=ZF(e);if(n.length!==ZF(t).length)return!1;for(let r=0;r"u"?P2:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=P2,P2)}function Na(e){const t=b.useContext(EX());return e==null||e.warn,t}function Ai(e){const t=Na({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=b.useRef(void 0);return O0e(n.__store,o=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=Ts(r.current,e.select(o));return r.current=i,i}return e.select(o)}return o})}const KO=b.createContext(void 0),P0e=b.createContext(void 0);function Yu(e){const t=b.useContext(e.from?P0e:KO);return Ai({select:r=>{const o=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Cr(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function sL(e){return Yu({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function lL(e){const{select:t,...n}=e;return Yu({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Hs(e){return Yu({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function uL(e){return Yu({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const u_=typeof window<"u"?b.useLayoutEffect:b.useEffect;function T2(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function T0e(e,t,n={},r={}){b.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([i])=>{t(i)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function A0e(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function Vl(e){const t=Na();return b.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function k0e(e,t){const n=Na(),[r,o]=b.useState(!1),i=b.useRef(!1),a=A0e(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:c,preload:d,preloadDelay:h,hashScrollIntoView:p,replace:x,startTransition:y,resetScroll:w,viewTransition:_,children:C,target:O,disabled:P,style:R,className:T,onClick:k,onFocus:M,onMouseEnter:j,onMouseLeave:$,onTouchStart:L,ignoreBlocker:V,params:G,search:D,hash:H,state:U,mask:Y,reloadDocument:q,unsafeRelative:W,from:K,_fromLocation:z,...X}=e,ee=Ai({select:oe=>oe.location.search,structuralSharing:!0}),ae=e.from,fe=b.useMemo(()=>({...e,from:ae}),[n,ee,ae,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=b.useMemo(()=>n.buildLocation({...fe}),[n,fe]),ge=b.useMemo(()=>{if(P)return;let oe=ie.maskedLocation?ie.maskedLocation.url:ie.url,de=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":de=!0),{href:oe,external:de}},[P,ie.maskedLocation,ie.url,n.origin,n.history]),he=b.useMemo(()=>{if(ge!=null&&ge.external)return ge.href;try{return new URL(c),c}catch{}},[c,ge]),ue=e.reloadDocument||he?!1:d??n.options.defaultPreload,we=h??n.options.defaultPreloadDelay??0,Ae=Ai({select:oe=>{if(he)return!1;if(u!=null&&u.exact){if(!qye(oe.location.pathname,ie.pathname,n.basepath))return!1}else{const de=AE(oe.location.pathname,n.basepath),Se=AE(ie.pathname,n.basepath);if(!(de.startsWith(Se)&&(de.length===Se.length||de[Se.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!Fp(oe.location.search,ie.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?oe.location.hash===ie.hash:!0}}),ye=b.useCallback(()=>{n.preloadRoute({...fe}).catch(oe=>{console.warn(oe),console.warn(m0e)})},[n,fe]),Xe=b.useCallback(oe=>{oe!=null&&oe.isIntersecting&&ye()},[ye]);T0e(a,Xe,D0e,{disabled:!!P||ue!=="viewport"}),b.useEffect(()=>{i.current||!P&&ue==="render"&&(ye(),i.current=!0)},[P,ye,ue]);const We=oe=>{const de=oe.currentTarget.getAttribute("target"),Se=O!==void 0?O:de;if(!P&&!L0e(oe)&&!oe.defaultPrevented&&(!Se||Se==="_self")&&oe.button===0){oe.preventDefault(),zs.flushSync(()=>{o(!0)});const Ve=n.subscribe("onResolved",()=>{Ve(),o(!1)});n.navigate({...fe,replace:x,resetScroll:w,hashScrollIntoView:p,startTransition:y,viewTransition:_,ignoreBlocker:V})}};if(he)return{...X,ref:a,href:he,...C&&{children:C},...O&&{target:O},...P&&{disabled:P},...R&&{style:R},...T&&{className:T},...k&&{onClick:k},...M&&{onFocus:M},...j&&{onMouseEnter:j},...$&&{onMouseLeave:$},...L&&{onTouchStart:L}};const et=oe=>{P||ue&&ye()},ft=et,st=oe=>{if(!(P||!ue))if(!we)ye();else{const de=oe.target;if(x1.has(de))return;const Se=setTimeout(()=>{x1.delete(de),ye()},we);x1.set(de,Se)}},Ge=oe=>{if(P||!ue||!we)return;const de=oe.target,Se=x1.get(de);Se&&(clearTimeout(Se),x1.delete(de))},Kt=Ae?Td(s,{})??N0e:A2,gn=Ae?A2:Td(l,{})??A2,un=[T,Kt.className,gn.className].filter(Boolean).join(" "),on=(R||Kt.style||gn.style)&&{...R,...Kt.style,...gn.style};return{...X,...Kt,...gn,href:ge==null?void 0:ge.href,ref:a,onClick:b1([k,We]),onFocus:b1([M,et]),onMouseEnter:b1([j,st]),onMouseLeave:b1([$,Ge]),onTouchStart:b1([L,ft]),disabled:!!P,target:O,...on&&{style:on},...un&&{className:un},...P&&M0e,...Ae&&j0e,...r&&I0e}}const A2={},N0e={className:"active"},M0e={role:"link","aria-disabled":!0},j0e={"data-status":"active","aria-current":"page"},I0e={"data-transitioning":"transitioning"},x1=new WeakMap,D0e={rootMargin:"100px"},b1=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Bl=b.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,ref:i,...a}=k0e(r,t),s=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;return n===void 0&&delete a.disabled,b.createElement(n||"a",{...a,ref:i},s)});function L0e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class $0e extends SX{constructor(t){super(t),this.useMatch=n=>Yu({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Yu({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>uL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Hs({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>lL({...n,from:this.id}),this.useLoaderData=n=>sL({...n,from:this.id}),this.useNavigate=()=>Vl({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>v.jsx(Bl,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function pt(e){return new $0e(e)}class F0e extends g0e{constructor(t){super(t),this.useMatch=n=>Yu({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Yu({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>uL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Hs({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>lL({...n,from:this.id}),this.useLoaderData=n=>sL({...n,from:this.id}),this.useNavigate=()=>Vl({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>v.jsx(Bl,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B0e(e){return new F0e(e)}function JF(e){return typeof e=="object"?new e7(e,{silent:!0}).createRoute(e):new e7(e,{silent:!0}).createRoute}class e7{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const o=pt(r);return o.isRoot=!1,o},this.silent=n==null?void 0:n.silent}}class t7{constructor(t){this.useMatch=n=>Yu({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Yu({from:this.options.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>uL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>Hs({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>lL({...n,from:this.options.id}),this.useLoaderData=n=>sL({...n,from:this.options.id}),this.useNavigate=()=>{const n=Na();return Vl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function n7(e){return typeof e=="object"?new t7(e):t=>new t7({id:e,...t})}function kn(e,t){let n,r,o,i;const a=()=>(n||(n=e().then(l=>{n=void 0,r=l[t]}).catch(l=>{if(o=l,Rye(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),i=!0)}})),n),s=function(u){if(i)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)throw a();return b.createElement(r,u)};return s.preload=a,s}function z0e(){const e=Na(),t=b.useRef({router:e,mounted:!1}),[n,r]=b.useState(!1),{hasPendingMatches:o,isLoading:i}=Ai({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(h=>h.status==="pending")}),structuralSharing:!0}),a=T2(i),s=i||n||o,l=T2(s),u=i||o,c=T2(u);return e.startTransition=d=>{r(!0),b.startTransition(()=>{d(),r(!1)})},b.useEffect(()=>{const d=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Bp(e.latestLocation.href)!==Bp(h.href)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),u_(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),u_(()=>{a&&!i&&e.emit({type:"onLoad",...zp(e.state)})},[a,e,i]),u_(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...zp(e.state)})},[u,c,e]),u_(()=>{if(l&&!s){const d=zp(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),d.hrefChanged&&Xye(e)}},[s,l,e]),null}function q0e(e){const t=Ai({select:n=>`not-found-${n.location.pathname}-${n.status}`});return v.jsx(aL,{getResetKey:()=>t,onCatch:(n,r)=>{var o;if(Ls(n))(o=e.onCatch)==null||o.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;if(Ls(n))return(r=e.fallback)==null?void 0:r.call(e,n);throw n},children:e.children})}function U0e(){return v.jsx("p",{children:"Not Found"})}function iv(e){return v.jsx(v.Fragment,{children:e.children})}function CX(e,t,n){return t.options.notFoundComponent?v.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?v.jsx(e.options.defaultNotFoundComponent,{...n}):v.jsx(U0e,{})}function V0e({children:e}){var n;const t=Na();return t.isServer?v.jsx("script",{nonce:(n=t.options.ssr)==null?void 0:n.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function W0e(){const e=Na();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||NI)(e.latestLocation),r=n!==NI(e.latestLocation)?n:void 0,o={storageKey:kE,shouldScrollRestoration:!0};return r&&(o.key=r),v.jsx(V0e,{children:`(${dX.toString()})(${JSON.stringify(o)})`})}const OX=b.memo(function({matchId:t}){var _,C;const n=Na(),r=Ai({select:O=>{const P=O.matches.find(R=>R.id===t);return Cr(P),{routeId:P.routeId,ssr:P.ssr,_displayPending:P._displayPending}},structuralSharing:!0}),o=n.routesById[r.routeId],i=o.options.pendingComponent??n.options.defaultPendingComponent,a=i?v.jsx(i,{}):null,s=o.options.errorComponent??n.options.defaultErrorComponent,l=o.options.onCatch??n.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??((_=n.options.notFoundRoute)==null?void 0:_.options.component):o.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!o.isRoot||o.options.wrapInSuspense||c)&&(o.options.wrapInSuspense??i??(((C=o.options.errorComponent)==null?void 0:C.preload)||c))?b.Suspense:iv,h=s?aL:iv,p=u?q0e:iv,x=Ai({select:O=>O.loadedAt}),y=Ai({select:O=>{var R;const P=O.matches.findIndex(T=>T.id===t);return(R=O.matches[P-1])==null?void 0:R.routeId}}),w=o.isRoot?o.options.shellComponent??iv:iv;return v.jsxs(w,{children:[v.jsx(KO.Provider,{value:t,children:v.jsx(d,{fallback:a,children:v.jsx(h,{getResetKey:()=>x,errorComponent:s||GO,onCatch:(O,P)=>{if(Ls(O))throw O;l==null||l(O,P)},children:v.jsx(p,{fallback:O=>{if(!u||O.routeId&&O.routeId!==r.routeId||!O.routeId&&!o.isRoot)throw O;return b.createElement(u,O)},children:c||r._displayPending?v.jsx(y0e,{fallback:a,children:v.jsx(r7,{matchId:t})}):v.jsx(r7,{matchId:t})})})})}),y===ts&&n.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(H0e,{}),v.jsx(W0e,{})]}):null]})});function H0e(){const e=Na(),t=b.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...zp(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const r7=b.memo(function({matchId:t}){var l,u,c,d;const n=Na(),{match:r,key:o,routeId:i}=Ai({select:h=>{const p=h.matches.find(C=>C.id===t),x=p.routeId,y=n.routesById[x].options.remountDeps??n.options.defaultRemountDeps,w=y==null?void 0:y({routeId:x,loaderDeps:p.loaderDeps,params:p._strictParams,search:p._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:x,match:{id:p.id,status:p.status,error:p.error,_forcePending:p._forcePending,_displayPending:p._displayPending}}},structuralSharing:!0}),a=n.routesById[i],s=b.useMemo(()=>{const h=a.options.component??n.options.defaultComponent;return h?v.jsx(h,{},o):v.jsx(YO,{})},[o,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw(l=n.getMatch(r.id))==null?void 0:l._nonReactive.displayPendingPromise;if(r._forcePending)throw(u=n.getMatch(r.id))==null?void 0:u._nonReactive.minPendingPromise;if(r.status==="pending"){const h=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(r.id);if(p&&!p._nonReactive.minPendingPromise&&!n.isServer){const x=Kv();p._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw(c=n.getMatch(r.id))==null?void 0:c._nonReactive.loadPromise}if(r.status==="notFound")return Cr(Ls(r.error)),CX(n,a,r.error);if(r.status==="redirected")throw Cr(Al(r.error)),(d=n.getMatch(r.id))==null?void 0:d._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const h=(a.options.errorComponent??n.options.defaultErrorComponent)||GO;return v.jsx(h,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return s}),YO=b.memo(function(){const t=Na(),n=b.useContext(KO),r=Ai({select:u=>{var c;return(c=u.matches.find(d=>d.id===n))==null?void 0:c.routeId}}),o=t.routesById[r],i=Ai({select:u=>{const d=u.matches.find(h=>h.id===n);return Cr(d),d.globalNotFound}}),a=Ai({select:u=>{var h;const c=u.matches,d=c.findIndex(p=>p.id===n);return(h=c[d+1])==null?void 0:h.id}}),s=t.options.defaultPendingComponent?v.jsx(t.options.defaultPendingComponent,{}):null;if(i)return CX(t,o,void 0);if(!a)return null;const l=v.jsx(OX,{matchId:a});return r===ts?v.jsx(b.Suspense,{fallback:s,children:l}):l});function G0e(){const e=Na(),n=e.routesById[ts].options.pendingComponent??e.options.defaultPendingComponent,r=n?v.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?iv:b.Suspense,i=v.jsxs(o,{fallback:r,children:[!e.isServer&&v.jsx(z0e,{}),v.jsx(K0e,{})]});return e.options.InnerWrap?v.jsx(e.options.InnerWrap,{children:i}):i}function K0e(){const e=Na(),t=Ai({select:o=>{var i;return(i=o.matches[0])==null?void 0:i.id}}),n=Ai({select:o=>o.loadedAt}),r=t?v.jsx(OX,{matchId:t}):null;return v.jsx(KO.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:v.jsx(aL,{getResetKey:()=>n,errorComponent:GO,onCatch:o=>{o.message||o.toString()},children:r})})}function RX(){const e=Na();return Ai({select:t=>{var n;return[t.location.href,(n=t.resolvedLocation)==null?void 0:n.href,t.status]},structuralSharing:!0}),b.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:o,includeSearch:i,...a}=t;return e.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:o,includeSearch:i})},[e])}const Y0e=e=>new X0e(e);let X0e=class extends c0e{constructor(t){super(t)}};typeof globalThis<"u"?(globalThis.createFileRoute=JF,globalThis.createLazyFileRoute=n7):typeof window<"u"&&(window.createFileRoute=JF,window.createLazyFileRoute=n7);function Q0e({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=EX(),o=v.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?v.jsx(e.options.Wrap,{children:o}):o}function Z0e({router:e,...t}){return v.jsx(Q0e,{router:e,...t,children:v.jsx(G0e,{})})}function By(e){return Ai({select:t=>t.location})}const jI=b.createContext(void 0);function QJe({context:e}){const t=b.useContext(jI),n=e===void 0?t:e;return v.jsx(jI.Provider,{value:n,children:v.jsx(YO,{})})}function ZJe(){return b.useContext(jI)}function Zx(){const e=By(),t=Vl();return[b.useMemo(()=>new URLSearchParams(e.searchStr??""),[e.searchStr]),(o,i)=>{const a=new URLSearchParams(e.searchStr??""),s=typeof o=="function"?o(a):o;let l;if(s instanceof URLSearchParams)l={},s.forEach((u,c)=>{try{l[c]=JSON.parse(u)}catch{l[c]=u}});else if(typeof s=="string"){const u=new URLSearchParams(s);l={},u.forEach((c,d)=>{try{l[d]=JSON.parse(c)}catch{l[d]=c}})}else l={},Object.entries(s||{}).forEach(([u,c])=>{if(c!=null)if(typeof c=="string")try{l[u]=JSON.parse(c)}catch{l[u]=c}else l[u]=c});t({to:e.pathname,search:l,replace:i==null?void 0:i.replace,state:i==null?void 0:i.state})}]}function cL(e,t){if(!e||typeof e!="object")return;const n=Reflect.get(e,t);return typeof n=="string"?n:void 0}/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PX=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J0e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e1e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o7=e=>{const t=e1e(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var k2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t1e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},n1e=b.createContext({}),r1e=()=>b.useContext(n1e),o1e=b.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>{const{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:h="currentColor",className:p=""}=r1e()??{},x=r??d?Number(n??c)*24/Number(t??u):n??c;return b.createElement("svg",{ref:l,...k2,width:t??u??k2.width,height:t??u??k2.height,stroke:e??h,strokeWidth:x,className:PX("lucide",p,o),...!i&&!t1e(s)&&{"aria-hidden":"true"},...s},[...a.map(([y,w])=>b.createElement(y,w)),...Array.isArray(i)?i:[i]])});/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const or=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(o1e,{ref:i,iconNode:t,className:PX(`lucide-${J0e(o7(e))}`,`lucide-${e}`,r),...o}));return n.displayName=o7(e),n};/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i1e=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],N2=or("activity",i1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],s1e=or("ban",a1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l1e=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],u1e=or("book-open-text",l1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c1e=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],f1e=or("chart-column",c1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d1e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fL=or("check",d1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h1e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],p1e=or("chevron-down",h1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m1e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],g1e=or("chevron-right",m1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v1e=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],y1e=or("chevrons-down-up",v1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w1e=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],x1e=or("chevrons-up-down",w1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],S1e=or("circle-alert",b1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],E1e=or("circle-minus",_1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],O1e=or("circle-x",C1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],P1e=or("clock",R1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T1e=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],A1e=or("cloud-download",T1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k1e=[["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"}]],N1e=or("copy",k1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M1e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],j1e=or("external-link",M1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I1e=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],D1e=or("file-question-mark",I1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L1e=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],i7=or("fullscreen",L1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $1e=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],TX=or("house",$1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F1e=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],B1e=or("log-out",F1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z1e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],q1e=or("panel-right",z1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U1e=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],AX=or("play",U1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V1e=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],kX=or("refresh-cw",V1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W1e=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}],["path",{d:"M11 10h1v4",key:"70cz1p"}]],H1e=or("repeat-1",W1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G1e=[["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"}]],K1e=or("save",G1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y1e=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],X1e=or("shield-x",Y1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q1e=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Z1e=or("square-pen",Q1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J1e=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ewe=or("trash-2",J1e);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const twe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],nwe=or("triangle-alert",twe);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rwe=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],NX=or("undo-2",rwe);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const owe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],XO=or("x",owe);function QO(){const e=Vl(),t=By(),n=Hs({strict:!1}),r=cL(n,"tenant");return v.jsxs($O,{icon:v.jsx(D1e,{className:"h-5 w-5"}),title:"Page not found",description:"This page doesn’t exist or may have moved.",actions:v.jsxs(v.Fragment,{children:[v.jsx(wt,{leftIcon:v.jsx(TX,{className:"h-4 w-4"}),onClick:()=>e(r?{to:At.tenantRunsRoute.to,params:{tenant:r},replace:!0}:{to:At.authenticatedRoute.to,replace:!0}),children:"Dashboard"}),v.jsx(wt,{leftIcon:v.jsx(NX,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"404"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested path"}),v.jsx("div",{className:"break-all text-foreground/90",children:t.pathname})]})]})}function iwe({status:e,statusText:t}){const n=Vl(),r=By();return v.jsxs($O,{icon:v.jsx(nwe,{className:"h-6 w-6"}),title:"Something went wrong",description:t||"An unexpected error occurred.",actions:v.jsxs(v.Fragment,{children:[v.jsx(wt,{leftIcon:v.jsx(kX,{className:"h-4 w-4"}),onClick:()=>window.location.reload(),children:"Reload"}),v.jsx(wt,{onClick:()=>n({to:At.authenticatedRoute.to}),variant:"outline",children:"Dashboard"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:e??"error"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Path"}),v.jsx("div",{className:"break-all text-foreground/90",children:r.pathname})]})]})}function awe(){const e=Vl(),t=By(),n=new URLSearchParams(t.search);if(!n.has("updated")){n.set("updated","true");const r=`${t.pathname}?${n.toString()}`;window.location.href=r}return v.jsxs($O,{icon:v.jsx(A1e,{className:"h-6 w-6"}),title:"Update available",description:"A new version of the app is available.",actions:v.jsxs(v.Fragment,{children:[v.jsx(wt,{onClick:()=>window.location.reload(),children:"Reload"}),v.jsx(wt,{leftIcon:v.jsx(TX,{className:"h-4 w-4"}),onClick:()=>e({to:At.authenticatedRoute.to}),variant:"outline",children:"Dashboard"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"update"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Path"}),v.jsx("div",{className:"break-all text-foreground/90",children:t.pathname})]})]})}var MX=(e=>(e.TenantLogWorkflowFilterEnabled="tenant-log-workflow-filter-enabled",e.TraceMinimapEnabled="trace-minimap-enabled",e.OrganizationSsoEnabled="organization-sso-enabled",e))(MX||{}),oE=(e=>(e.INFO="INFO",e.WARNING="WARNING",e.CRITICAL="CRITICAL",e))(oE||{}),swe=(e=>(e.WORKFLOW="WORKFLOW",e.TASK="TASK",e))(swe||{}),lwe=(e=>(e.CANCEL_IN_PROGRESS="CANCEL_IN_PROGRESS",e.DROP_NEWEST="DROP_NEWEST",e.QUEUE_NEWEST="QUEUE_NEWEST",e.GROUP_ROUND_ROBIN="GROUP_ROUND_ROBIN",e))(lwe||{}),uwe=(e=>(e.Name="name",e.CreatedAt="createdAt",e))(uwe||{}),cwe=(e=>(e.PENDING="PENDING",e.RUNNING="RUNNING",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.QUEUED="QUEUED",e.SCHEDULED="SCHEDULED",e))(cwe||{}),fwe=(e=>(e.ASC="ASC",e.DESC="DESC",e))(fwe||{}),dwe=(e=>(e.TriggerAt="triggerAt",e.CreatedAt="createdAt",e))(dwe||{}),hwe=(e=>(e.Asc="asc",e.Desc="desc",e))(hwe||{}),pwe=(e=>(e.Key="key",e.Value="value",e.LimitValue="limitValue",e))(pwe||{}),mwe=(e=>(e.OWNER="OWNER",e.ADMIN="ADMIN",e.MEMBER="MEMBER",e))(mwe||{}),gwe=(e=>(e.WORKER="WORKER",e.WORKER_SLOT="WORKER_SLOT",e.EVENT="EVENT",e.TASK_RUN="TASK_RUN",e.CRON="CRON",e.SCHEDULE="SCHEDULE",e.INCOMING_WEBHOOK="INCOMING_WEBHOOK",e))(gwe||{}),vwe=(e=>(e.HEX="HEX",e.BASE64="BASE64",e.BASE64URL="BASE64URL",e))(vwe||{}),ywe=(e=>(e.SHA1="SHA1",e.SHA256="SHA256",e.SHA512="SHA512",e.MD5="MD5",e))(ywe||{}),wwe=(e=>(e.BASIC="BASIC",e.API_KEY="API_KEY",e.HMAC="HMAC",e))(wwe||{}),xwe=(e=>(e.GENERIC="GENERIC",e.GITHUB="GITHUB",e.STRIPE="STRIPE",e.SLACK="SLACK",e.LINEAR="LINEAR",e.SVIX="SVIX",e))(xwe||{}),Lr=(e=>(e.UNSET="UNSET",e.OK="OK",e.ERROR="ERROR",e))(Lr||{}),Vu=(e=>(e.SLEEP="SLEEP",e.USER_EVENT="USER_EVENT",e.CHILD_WORKFLOW="CHILD_WORKFLOW",e))(Vu||{}),zy=(e=>(e.RUN="RUN",e.WAIT_FOR="WAIT_FOR",e.MEMO="MEMO",e))(zy||{}),jE=(e=>(e.ALL="ALL",e.EVICTED="EVICTED",e.ON_WORKER="ON_WORKER",e))(jE||{}),jX=(e=>(e.ASC="ASC",e.DESC="DESC",e))(jX||{}),Xi=(e=>(e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e))(Xi||{}),An=(e=>(e.REQUEUED_NO_WORKER="REQUEUED_NO_WORKER",e.REQUEUED_RATE_LIMIT="REQUEUED_RATE_LIMIT",e.SCHEDULING_TIMED_OUT="SCHEDULING_TIMED_OUT",e.ASSIGNED="ASSIGNED",e.STARTED="STARTED",e.FINISHED="FINISHED",e.FAILED="FAILED",e.RETRYING="RETRYING",e.CANCELLED="CANCELLED",e.TIMED_OUT="TIMED_OUT",e.REASSIGNED="REASSIGNED",e.SLOT_RELEASED="SLOT_RELEASED",e.TIMEOUT_REFRESHED="TIMEOUT_REFRESHED",e.RETRIED_BY_USER="RETRIED_BY_USER",e.SENT_TO_WORKER="SENT_TO_WORKER",e.RATE_LIMIT_ERROR="RATE_LIMIT_ERROR",e.ACKNOWLEDGED="ACKNOWLEDGED",e.CREATED="CREATED",e.QUEUED="QUEUED",e.SKIPPED="SKIPPED",e.COULD_NOT_SEND_TO_WORKER="COULD_NOT_SEND_TO_WORKER",e.DURABLE_EVICTED="DURABLE_EVICTED",e.DURABLE_RESTORING="DURABLE_RESTORING",e))(An||{}),qt=(e=>(e.QUEUED="QUEUED",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e))(qt||{}),bwe=e=>{let t=Object.keys(e).sort((n,r)=>n.localeCompare(r));if(t.some(n=>n.startsWith("_")))throw new Error('Keys that start with "_" are reserved for Query Key Factory');return t};function Vo(e){return Object.assign(Object.create(null),e)}function a7(e,t){let n={_def:[e]};if(t==null)return Vo(n);let r=(i,a)=>bwe(i).reduce((s,l)=>{let u=i[l],c=[...a,l],d=p=>Array.isArray(p),h;if(typeof u=="function"){let p=(...x)=>{let y=u(...x);if(d(y))return Vo({queryKey:[...c,...y]});let w=[...c,...y.queryKey];if("queryFn"in y){let _={queryKey:w,queryFn:y.queryFn};if("contextQueries"in y){let C=r(y.contextQueries,w);return Vo({_ctx:Vo(Object.fromEntries(C)),..._})}return Vo({..._})}if("contextQueries"in y){let _=r(y.contextQueries,w);return Vo({_ctx:Vo(Object.fromEntries(_)),queryKey:w})}return Vo({queryKey:w})};p._def=c,h=p}else if(u==null)h=Vo({queryKey:c});else if(d(u))h=Vo({_def:c,queryKey:[...c,...u]});else if("queryFn"in u){let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]],y={queryKey:x,queryFn:u.queryFn};if("contextQueries"in u){let w=r(u.contextQueries,x);h=Vo({_ctx:Vo(Object.fromEntries(w)),...p,...y})}else h=Vo({...p,...y})}else if("contextQueries"in u){let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]],y=r(u.contextQueries,x);h=Vo({_ctx:Vo(Object.fromEntries(y)),queryKey:x,...p})}else{let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]];h=Vo({queryKey:x,...p})}return s.set(l,h),s},new Map),o=r(t,n._def);return Vo({...Object.fromEntries(o),...n})}function Swe(e){let t=Object.keys(e).reduce((n,r)=>{let o=e[r],i=o?a7(r,o):a7(r);return n.set(r,i),n},new Map);return Vo(Object.fromEntries(t))}const io=Swe({controlPlane:{billing:e=>({queryKey:["organization-billing-state:get",e],queryFn:async()=>(await Mt.organizationBillingStateGet(e)).data}),tenantResourceLimits:e=>({queryKey:["organization-tenant-resource-limits:get",e],queryFn:async()=>(await Mt.organizationTenantResourceLimitsGet(e)).data}),creditBalance:e=>({queryKey:["organization-credit-balance:get",e],queryFn:async()=>(await Mt.organizationCreditBalanceGet(e)).data}),subscriptionPlans:()=>({queryKey:["subscription-plans:list"],queryFn:async()=>(await Mt.subscriptionPlansList()).data}),paymentMethods:e=>({queryKey:["organization-payment-methods:get",e],queryFn:async()=>(await Mt.organizationPaymentMethodsGet(e)).data})},cloud:{getComputeCost:e=>({queryKey:["compute-cost:get",e],queryFn:async()=>(await Cn.computeCostGet(e)).data}),createComputeDemoTemplate:(e,t)=>({queryKey:["compute-demo-template:create",e,t],queryFn:async()=>(await Cn.managedWorkerTemplateCreate(e,{name:t})).data}),getManagedWorker:e=>({queryKey:["managed-worker:get",e],queryFn:async()=>(await Cn.managedWorkerGet(e)).data}),listManagedWorkers:e=>({queryKey:["managed-worker:list",e],queryFn:async()=>(await Cn.managedWorkerList(e)).data}),listManagedWorkerInstances:e=>({queryKey:["managed-worker:list:instances",e],queryFn:async()=>(await Cn.managedWorkerInstancesList(e)).data}),getManagedWorkerLogs:(e,t)=>({queryKey:["managed-worker:get:logs",e,t],queryFn:async()=>(await Cn.logList(e,t)).data}),getBuild:e=>({queryKey:["build:get",e],queryFn:async()=>(await Cn.buildGet(e)).data}),getBuildLogs:e=>({queryKey:["build-logs:list",e],queryFn:async()=>(await Cn.buildLogsList(e)).data}),getIacLogs:(e,t)=>({queryKey:["iac-logs:list",e,t],queryFn:async()=>(await Cn.iacLogsList(e,{deployKey:t})).data}),getManagedWorkerCpuMetrics:(e,t)=>({queryKey:["managed-worker:get:cpu-metrics",e,t],queryFn:async()=>(await Cn.metricsCpuGet(e,t)).data}),getManagedWorkerMemoryMetrics:(e,t)=>({queryKey:["managed-worker:get:memory-metrics",e,t],queryFn:async()=>(await Cn.metricsMemoryGet(e,t)).data}),getManagedWorkerDiskMetrics:(e,t)=>({queryKey:["managed-worker:get:disk-metrics",e,t],queryFn:async()=>(await Cn.metricsDiskGet(e,t)).data}),listManagedWorkerEvents:e=>({queryKey:["managed-worker:get:events",e],queryFn:async()=>(await Cn.managedWorkerEventsList(e)).data}),workflowRunMetrics:(e,t)=>({queryKey:["workflow-run:metrics",e,t],queryFn:async()=>(await Cn.workflowRunEventsGetMetrics(e,t)).data}),offers:()=>({queryKey:["offers:list"],queryFn:async()=>(await Cn.userOffersList()).data})},alertingSettings:{get:e=>({queryKey:["tenant-alerting-settings:get",e],queryFn:async()=>(await rt.tenantAlertingSettingsGet(e)).data})},tenantResourcePolicy:{get:e=>({queryKey:["tenant-resource-policy:get",e],queryFn:async()=>(await rt.tenantResourcePolicyGet(e)).data})},tokens:{list:e=>({queryKey:["api-token:list",e],queryFn:async()=>(await rt.apiTokenList(e)).data})},emailGroups:{list:e=>({queryKey:["email-group:list",e],queryFn:async()=>(await rt.alertEmailGroupList(e)).data})},slackWebhooks:{list:e=>({queryKey:["slack-webhook:list",e],queryFn:async()=>(await rt.slackWebhookList(e)).data})},snsIntegrations:{list:e=>({queryKey:["sns:list",e],queryFn:async()=>(await rt.snsList(e)).data})},workflows:{list:(e,t)=>({queryKey:["workflow:list",e,t],queryFn:async()=>(await rt.workflowList(e,t)).data}),get:e=>({queryKey:["workflow:get",e],queryFn:async()=>(await rt.workflowGet(e)).data}),getMetrics:e=>({queryKey:["workflow:get:metrics",e],queryFn:async()=>(await rt.workflowGetMetrics(e)).data}),getVersion:(e,t)=>({queryKey:["workflow-version:get",e,t],queryFn:async()=>(await rt.workflowVersionGet(e,{version:t})).data})},scheduledRuns:{list:(e,t)=>({queryKey:["scheduled-run:list",e,t],queryFn:async()=>(await rt.workflowScheduledList(e,t)).data})},cronJobs:{list:(e,t)=>({queryKey:["cron-job:list",e,t],queryFn:async()=>(await rt.cronWorkflowList(e,t)).data})},workflowRuns:{list:(e,t)=>({queryKey:["workflow-run:list",e,t],queryFn:async()=>(await rt.workflowRunList(e,t)).data}),shape:(e,t)=>({queryKey:["workflow-run:get:shape",e,t],queryFn:async()=>(await rt.workflowRunGetShape(e,t)).data}),get:(e,t)=>({queryKey:["workflow-run:get",e,t],queryFn:async()=>(await rt.workflowRunGet(e,t)).data}),getInput:(e,t)=>({queryKey:["workflow-run:get:input",e,t],queryFn:async()=>(await rt.workflowRunGetInput(e,t)).data}),metrics:(e,t)=>({queryKey:["workflow-run:metrics",e,t],queryFn:async()=>(await rt.workflowRunGetMetrics(e,t)).data}),listStepRunEvents:(e,t)=>({queryKey:["workflow-run:list:step-run-events",t],queryFn:async()=>(await rt.workflowRunListStepRunEvents(e,t)).data})},v1Webhooks:{list:(e,t)=>({queryKey:["v1:webhook:list",e],queryFn:async()=>(await rt.v1WebhookList(e,t)).data})},v1Events:{list:(e,t)=>({queryKey:["v1:events:list",e,t],queryFn:async()=>(await rt.v1EventList(e,t)).data})},v1WorkflowRuns:{list:(e,t)=>({queryKey:["v1:workflow-run:list",e,t],queryFn:async()=>(await rt.v1WorkflowRunList(e,t)).data}),listTaskEvents:e=>({queryKey:["v1:workflow-run:list-tasks",e],queryFn:async()=>(await rt.v1WorkflowRunTaskEventsList(e)).data}),listTaskTimings:(e,t)=>({queryKey:["v1:workflow-run:list-tasks-timings",e,t],queryFn:async()=>(await rt.v1WorkflowRunGetTimings(e,{depth:t})).data}),details:e=>({queryKey:["workflow-run-details:get",e],queryFn:async()=>(await rt.v1WorkflowRunGet(e)).data}),listDisplayNames:(e,t)=>({queryKey:["workflow-run:display-names:list",e,t],queryFn:async()=>(await rt.v1WorkflowRunDisplayNamesList(e,{external_ids:t})).data})},v1Tasks:{get:e=>({queryKey:["v1-task:get",e],queryFn:async()=>(await rt.v1TaskGet(e)).data}),getByDagId:(e,t)=>({queryKey:["v1-task:get-by-dag-id",t],queryFn:async()=>(await rt.v1DagListTasks({dag_ids:t,tenant:e})).data}),getLogs:(e,t)=>({queryKey:["v1-log-line:list",e,t],queryFn:async()=>(await rt.v1LogLineList(e,t)).data})},v1DurableTasks:{eventLog:(e,t)=>({queryKey:["v1-durable-task:event-log",e,t],queryFn:async()=>(await rt.v1DurableTaskEventLogList(e,t)).data})},v1TaskEvents:{list:(e,t,n,r)=>({queryKey:["v1:workflow-run:list",e,n,r,t],queryFn:async()=>{if(n)return(await rt.v1TaskEventList(n,t)).data;if(r)return(await rt.v1WorkflowRunTaskEventsList(r)).data;throw new Error("Either task or workflowRunId must be set")}})},v1TaskRuns:{metrics:(e,t)=>({queryKey:["v1:task-run:metrics",e,t],queryFn:async()=>(await rt.v1TaskListStatusMetrics(e,t)).data}),pointMetrics:(e,t)=>({queryKey:["v1-task:metrics",e,t],queryFn:async()=>(await rt.v1TaskGetPointMetrics(e,t)).data})},metrics:{get:e=>({queryKey:["queue-metrics:get",e],queryFn:async()=>(await rt.tenantGetQueueMetrics(e)).data}),getStepRunQueueMetrics:e=>({queryKey:["queue-metrics:get:step-run",e],queryFn:async()=>(await rt.tenantGetStepRunQueueMetrics(e)).data})},stepRuns:{get:(e,t)=>({queryKey:["step-run:get",e,t],queryFn:async()=>(await rt.stepRunGet(e,t)).data}),getLogs:(e,t)=>({queryKey:["log-lines:list",e],queryFn:async()=>(await rt.v1LogLineList(e,t)).data}),getSchema:(e,t)=>({queryKey:["step-run:get:schema",t],queryFn:async()=>(await rt.stepRunGetSchema(e,t)).data}),listEvents:e=>({queryKey:["step-run:list:events",e],queryFn:async()=>(await rt.stepRunListEvents(e)).data}),listArchives:e=>({queryKey:["step-run:list:archives",e],queryFn:async()=>(await rt.stepRunListArchives(e)).data})},events:{list:(e,t)=>({queryKey:["event:list",e,t],queryFn:async()=>(await rt.eventList(e,t)).data}),listKeys:e=>({queryKey:["event-keys:list",e],queryFn:async()=>(await rt.eventKeyList(e)).data}),get:e=>({queryKey:["event:get",e],queryFn:async()=>(await rt.eventGet(e)).data}),getData:e=>({queryKey:["event-data:get",e],queryFn:async()=>(await rt.eventDataGet(e)).data})},rate_limits:{list:(e,t)=>({queryKey:["rate-limits:list",e,t],queryFn:async()=>(await rt.rateLimitList(e,t)).data})},workers:{list:(e,t)=>({queryKey:["worker:list",e,t],queryFn:async()=>(await rt.workerList(e,t)).data}),get:e=>({queryKey:["worker:get",e],queryFn:async()=>(await rt.workerGet(e)).data})},github:{listInstallations:e=>({queryKey:["github-app:list:installations"],queryFn:async()=>(await Cn.githubAppListInstallations({tenant:e})).data}),listRepos:(e,t)=>({queryKey:["github-app:list:repos",e,t],queryFn:async()=>(Cr(t),(await Cn.githubAppListRepos(t,{tenant:e})).data),enabled:!!t}),listBranches:(e,t,n,r)=>({queryKey:["github-app:list:branches",e,t,n,r],queryFn:async()=>(Cr(t),Cr(n),Cr(r),(await Cn.githubAppListBranches(t,n,r,{tenant:e})).data),enabled:!!t&&!!n&&!!r})},webhookWorkers:{list:e=>({queryKey:["webhook-worker:list",e],queryFn:async()=>(await rt.webhookList(e)).data}),create:(e,t)=>({queryKey:["webhook-worker:create",e,t],queryFn:async()=>(await rt.webhookCreate(e,t)).data}),listRequests:e=>({queryKey:["webhook-worker:list:requests",e],queryFn:async()=>(await rt.webhookRequestsList(e)).data})},info:{getVersion:{queryKey:["info:version"],queryFn:async()=>(await rt.infoGetVersion()).data}}}),_we=1,Ewe=1e6;let M2=0;function Cwe(){return M2=(M2+1)%Number.MAX_SAFE_INTEGER,M2.toString()}const j2=new Map,s7=e=>{if(j2.has(e))return;const t=setTimeout(()=>{j2.delete(e),fw({type:"REMOVE_TOAST",toastId:e})},Ewe);j2.set(e,t)},Owe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,_we)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?s7(n):e.toasts.forEach(r=>{s7(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},iE=[];let aE={toasts:[]};function fw(e){aE=Owe(aE,e),iE.forEach(t=>{t(aE)})}function Rwe({...e}){const t=Cwe(),n=o=>fw({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>fw({type:"DISMISS_TOAST",toastId:t});return fw({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function dL(){const[e,t]=b.useState(aE);return b.useEffect(()=>(iE.push(t),()=>{const n=iE.indexOf(t);n>-1&&iE.splice(n,1)}),[e]),{...e,toast:Rwe,dismiss:n=>fw({type:"DISMISS_TOAST",toastId:n})}}function l7(e){return!!e&&typeof e=="object"&&Array.isArray(e.errors)}function Pwe(e){return!!e&&typeof e=="object"&&typeof e.description=="string"}const c_="An internal error occurred.";function ZO(e={}){const{toast:t}=dL(),n=e.setErrors?e.setErrors:o=>{for(const i of o)t({title:"Error",description:i,duration:5e3})};return{handleApiError:o=>{var s,l;console.log(o);const i=(s=o.response)==null?void 0:s.status,a=(l=o.response)==null?void 0:l.data;if(i!==void 0&&i>=500){n([c_]);return}if(i===400&&l7(a)&&a.errors.length>0){const u=Vme(a);if(Object.keys(u).length!==0){e.setFieldErrors&&e.setFieldErrors(u),e.setErrors&&e.setErrors(Object.values(u));return}}if(l7(a)&&a.errors.length>0){n(a.errors.map(u=>u.description||c_));return}if(Pwe(a)){n([a.description||c_]);return}n([c_])}}}function JJe(){var n;const{isControlPlaneEnabled:e}=Iy();return(n=In({queryKey:["metadata:get:integrations",e],queryFn:async()=>{try{return e?await Mt.metadataListIntegrations():await rt.metadataListIntegrations()}catch(r){return console.error("Failed to get API meta integrations",r),null}},retry:!1}).data)==null?void 0:n.data}const IX=b.createContext(null),hL=({isCloudEnabled:e,isCloudLoaded:t,isControlPlaneEnabled:n})=>({queryKey:["user-universe",e,n],queryFn:async()=>{const[r,o]=await Promise.all([e?n?Mt.organizationList():Cn.organizationList():null,n?Mt.tenantMembershipsList():rt.tenantMembershipsList()]),i=((r==null?void 0:r.data.rows)||[]).map(s=>({...s,tenants:s.tenants||[]})),a=o.data.rows||[];return e?{isCloudEnabled:e,organizations:i,tenantMemberships:a}:{isCloudEnabled:e,organizations:null,tenantMemberships:a}},enabled:t});function Twe({children:e}){const{isCloudEnabled:t,isCloudLoaded:n}=z3(),r=Vl(),{handleApiError:o}=ZO({}),{isControlPlaneEnabled:i}=Iy(),a=In(hL({isCloudEnabled:t,isCloudLoaded:n,isControlPlaneEnabled:i})),s=ec(),l=b.useCallback(()=>s.resetQueries({queryKey:["user-universe"]}),[s]),u=Ir({mutationKey:["user:update:logout"],mutationFn:async()=>{if(i){await Mt.cloudUserUpdateLogout();return}await rt.userUpdateLogout()},onError:o,onSettled:()=>{s.clear(),r({to:At.authLoginRoute.to})}}),c=b.useCallback(()=>a.refetch({cancelRefetch:!1}).then(h=>{if(h.isSuccess)return h.data;throw h.error}),[a]),d=b.useMemo(()=>{const h=a.isSuccess,p=a.isFetching;if(t){const x=c;return h?(Cr(a.data.organizations),{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:a.data.organizations,tenantMemberships:a.data.tenantMemberships,get:x,invalidate:l,logoutMutation:u}):{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:null,get:x,invalidate:l,logoutMutation:u}}else{const x=c;return h?{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:a.data.tenantMemberships,get:x,invalidate:l,logoutMutation:u}:{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:null,get:x,invalidate:l,logoutMutation:u}}},[a,t,c,l,u]);return v.jsx(IX.Provider,{value:d,children:e})}function JO(){const e=b.useContext(IX);return Cr(e),e}function DX(){const{isControlPlaneEnabled:e}=Iy();return b.useMemo(()=>({userGetCurrentQuery:()=>({queryKey:["user:get"],queryFn:async()=>(await(e?Mt.cloudUserGetCurrent():rt.userGetCurrent())).data}),userUpdateGoogleOauthStartQuery:()=>({queryKey:["user:google-oauth:start"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGoogleOauthStart():rt.userUpdateGoogleOauthStart())).data}),userUpdateGoogleOauthCallbackQuery:()=>({queryKey:["user:google-oauth:callback"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGoogleOauthCallback():rt.userUpdateGoogleOauthCallback())).data}),userUpdateGithubOauthStartQuery:()=>({queryKey:["user:github-oauth:start"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGithubOauthStart():rt.userUpdateGithubOauthStart())).data}),userUpdateGithubOauthCallbackQuery:()=>({queryKey:["user:github-oauth:callback"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGithubOauthCallback():rt.userUpdateGithubOauthCallback())).data}),userUpdateLoginMutation:()=>({mutationKey:["user:update:login"],mutationFn:async t=>(await(e?Mt.cloudUserUpdateLogin(t):rt.userUpdateLogin(t))).data}),userCreateMutation:()=>({mutationKey:["user:create"],mutationFn:async t=>(await(e?Mt.cloudUserCreate(t):rt.userCreate(t))).data}),userUpdateLogoutMutation:()=>({mutationKey:["user:update:logout"],mutationFn:async()=>(await(e?Mt.cloudUserUpdateLogout():rt.userUpdateLogout())).data}),userUpdatePasswordMutation:()=>({mutationKey:["user:update:password"],mutationFn:async t=>(await(e?Mt.cloudUserUpdatePassword(t):rt.userUpdatePassword(t))).data})}),[e])}const Lu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function LX(e){return"init"in e}function II(e){return!!e.write}function Awe(e){return!!e.onMount}function u7(e){return"v"in e||"e"in e}function IE(e){if("e"in e)throw e.e;if((Lu?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function DE(e){return typeof(e==null?void 0:e.then)=="function"}function $X(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function FX(e,t,n){const r=n.get(e),o=r==null?void 0:r.t,i=t.p;if(!(o!=null&&o.size))return i;if(!i.size)return o;const a=new Set(o);for(const s of i)a.add(s);return a}const kwe=(e,t,...n)=>t.read(...n),Nwe=(e,t,...n)=>t.write(...n),Mwe=(e,t)=>{var n;return(n=t.INTERNAL_onInit)==null?void 0:n.call(t,e)},jwe=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},Iwe=(e,t)=>{var n;const r=To(e),o=r[0],i=r[6],a=r[9];if((Lu?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let s=o.get(t);return s||(s={d:new Map,p:new Set,n:0},o.set(t,s),(n=i.i)==null||n.call(i,t),a==null||a(e,t)),s},Dwe=e=>{var t;const n=To(e),r=n[1],o=n[3],i=n[4],a=n[5],s=n[6],l=n[13];if(!s.f&&!o.size&&!i.size&&!a.size)return;const u=[],c=d=>{try{d()}catch(h){u.push(h)}};do{s.f&&c(s.f);const d=new Set;for(const h of o){const p=(t=r.get(h))==null?void 0:t.l;if(p)for(const x of p)d.add(x)}o.clear();for(const h of a)d.add(h);a.clear();for(const h of i)d.add(h);i.clear();for(const h of d)c(h);o.size&&l(e)}while(o.size||a.size||i.size);if(u.length)throw new AggregateError(u)},Lwe=e=>{const t=To(e),n=t[1],r=t[2],o=t[3],i=t[11],a=t[14],s=t[17];if(!o.size)return;const l=[],u=[],c=new WeakSet,d=new WeakSet,h=[],p=[];for(const x of o)h.push(x),p.push(i(e,x));for(;h.length;){const x=h.length-1,y=h[x],w=p[x];if(d.has(y)){h.pop(),p.pop();continue}if(c.has(y)){if(r.get(y)===w.n)l.push(y),u.push(w);else if((Lu?"production":void 0)!=="production"&&r.has(y))throw new Error("[Bug] invalidated atom exists");d.add(y),h.pop(),p.pop();continue}c.add(y);for(const _ of FX(y,w,n))c.has(_)||(h.push(_),p.push(i(e,_)))}for(let x=l.length-1;x>=0;--x){const y=l[x],w=u[x];let _=!1;for(const C of w.d.keys())if(C!==y&&o.has(C)){_=!0;break}_&&(r.set(y,w.n),a(e,y),s(e,y)),r.delete(y)}},DI=new WeakSet,$we=(e,t)=>{var n,r;const o=To(e),i=o[1],a=o[2],s=o[3],l=o[6],u=o[7],c=o[11],d=o[12],h=o[13],p=o[14],x=o[16],y=o[17],w=o[20],_=o[26],C=o[28],O=c(e,t),P=C[0];if(u7(O)){if(i.has(t)&&a.get(t)!==O.n||O.m===P)return O.m=P,O;let H=!1;for(const[U,Y]of O.d)if(p(e,U).n!==Y){H=!0;break}if(!H)return O.m=P,O}let R=!0;const T=new Set(O.d.keys()),k=()=>{for(const H of T)O.d.delete(H)},M=()=>{if(i.has(t)){const H=!s.size;y(e,t),H&&(h(e),d(e))}},j=H=>{var U;if(H===t){const q=c(e,H);if(!u7(q))if(LX(H))w(e,H,H.init);else throw new Error("no atom init");return IE(q)}const Y=p(e,H);try{return IE(Y)}finally{T.delete(H),O.d.set(H,Y.n),DE(O.v)&&$X(t,O.v,Y),i.has(t)&&((U=i.get(H))==null||U.t.add(t)),R||M()}};let $,L;const V={get signal(){return $||($=new AbortController),$.signal},get setSelf(){return(Lu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(Lu?"production":void 0)!=="production"&&!II(t)&&console.warn("setSelf function cannot be used with read-only atom"),!L&&II(t)&&(L=(...H)=>{if((Lu?"production":void 0)!=="production"&&R&&console.warn("setSelf function cannot be called in sync"),!R)try{return x(e,t,...H)}finally{h(e),d(e)}}),L}},G=O.n,D=a.get(t)===G;try{(Lu?"production":void 0)!=="production"&&DI.delete(e);const H=u(e,t,j,V);if((Lu?"production":void 0)!=="production"&&DI.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),w(e,t,H),DE(H)){_(e,H,()=>$==null?void 0:$.abort());const U=()=>{k(),M()};H.then(U,U)}else k();return(n=l.r)==null||n.call(l,t),O.m=P,O}catch(H){return delete O.v,O.e=H,++O.n,O.m=P,O}finally{R=!1,O.n!==G&&D&&(a.set(t,O.n),s.add(t),(r=l.c)==null||r.call(l,t))}},Fwe=(e,t)=>{const n=To(e),r=n[1],o=n[2],i=n[11],a=[t];for(;a.length;){const s=a.pop(),l=i(e,s);for(const u of FX(s,l,r)){const c=i(e,u);o.get(u)!==c.n&&(o.set(u,c.n),a.push(u))}}},Bwe=(e,t,...n)=>{const r=To(e),o=r[3],i=r[6],a=r[8],s=r[11],l=r[12],u=r[13],c=r[14],d=r[15],h=r[16],p=r[17],x=r[20],y=r[28];let w=!0;const _=O=>IE(c(e,O)),C=(O,...P)=>{var R;const T=s(e,O);try{if(O===t){if(!LX(O))throw new Error("atom not writable");(Lu?"production":void 0)!=="production"&&DI.add(e);const k=T.n,M=P[0];x(e,O,M),p(e,O),k!==T.n&&(++y[0],o.add(O),d(e,O),(R=i.c)==null||R.call(i,O));return}else return h(e,O,...P)}finally{w||(u(e),l(e))}};try{return a(e,t,_,C,...n)}finally{w=!1}},zwe=(e,t)=>{var n;const r=To(e),o=r[1],i=r[3],a=r[6],s=r[11],l=r[15],u=r[18],c=r[19],d=s(e,t),h=o.get(t);if(h&&d.d.size>0){for(const[p,x]of d.d)if(!h.d.has(p)){const y=s(e,p);u(e,p).t.add(t),h.d.add(p),x!==y.n&&(i.add(p),l(e,p),(n=a.c)==null||n.call(a,p))}for(const p of h.d)if(!d.d.has(p)){h.d.delete(p);const x=c(e,p);x==null||x.t.delete(t)}}},qwe=(e,t)=>{var n;const r=To(e),o=r[1],i=r[4],a=r[6],s=r[10],l=r[11],u=r[12],c=r[13],d=r[14],h=r[16],p=r[18],x=l(e,t);let y=o.get(t);if(!y){d(e,t);for(const w of x.d.keys())p(e,w).t.add(t);if(y={l:new Set,d:new Set(x.d.keys()),t:new Set},o.set(t,y),II(t)&&Awe(t)){const w=()=>{let _=!0;const C=(...O)=>{try{return h(e,t,...O)}finally{_||(c(e),u(e))}};try{const O=s(e,t,C);O&&(y.u=()=>{_=!0;try{O()}finally{_=!1}})}finally{_=!1}};i.add(w)}(n=a.m)==null||n.call(a,t)}return y},Uwe=(e,t)=>{var n,r;const o=To(e),i=o[1],a=o[5],s=o[6],l=o[11],u=o[19],c=l(e,t);let d=i.get(t);if(!d||d.l.size)return d;let h=!1;for(const p of d.t)if((n=i.get(p))!=null&&n.d.has(t)){h=!0;break}if(!h){d.u&&a.add(d.u),d=void 0,i.delete(t);for(const p of c.d.keys()){const x=u(e,p);x==null||x.t.delete(t)}(r=s.u)==null||r.call(s,t);return}return d},Vwe=(e,t,n)=>{const r=To(e),o=r[11],i=r[27],a=o(e,t),s="v"in a,l=a.v;if(DE(n))for(const u of a.d.keys())$X(t,n,o(e,u));a.v=n,delete a.e,(!s||!Object.is(l,a.v))&&(++a.n,DE(l)&&i(e,l))},Wwe=(e,t)=>{const n=To(e)[14];return IE(n(e,t))},Hwe=(e,t,...n)=>{const r=To(e),o=r[3],i=r[12],a=r[13],s=r[16],l=o.size;try{return s(e,t,...n)}finally{o.size!==l&&(a(e),i(e))}},Gwe=(e,t,n)=>{const r=To(e),o=r[12],i=r[18],a=r[19],l=i(e,t).l;return l.add(n),o(e),()=>{l.delete(n),a(e,t),o(e)}},Kwe=(e,t,n)=>{const o=To(e)[25];let i=o.get(t);if(!i){i=new Set,o.set(t,i);const a=()=>o.delete(t);t.then(a,a)}i.add(n)},Ywe=(e,t)=>{const o=To(e)[25].get(t);o==null||o.forEach(i=>i())},BX=new WeakMap,To=e=>{const t=BX.get(e);if((Lu?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function Xwe(e){const t=To(e),n=t[24];return n?n(t):t}function Qwe(...e){const t={get(r){const o=To(t)[21];return o(t,r)},set(r,...o){const i=To(t)[22];return i(t,r,...o)},sub(r,o){const i=To(t)[23];return i(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},kwe,Nwe,Mwe,jwe,Iwe,Dwe,Lwe,$we,Fwe,Bwe,zwe,qwe,Uwe,Vwe,Wwe,Hwe,Gwe,void 0,new WeakMap,Kwe,Ywe,[0]].map((r,o)=>e[o]||r);return BX.set(t,Object.freeze(n)),t}const zX={};let Zwe=0;function qy(e,t){const n=`atom${++Zwe}`,r={toString(){return(zX?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=Jwe,r.write=exe),t&&(r.write=t),r}function Jwe(e){return e(this)}function exe(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function txe(){return Qwe()}let S1;function nxe(){return S1||(S1=txe(),(zX?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=S1),globalThis.__JOTAI_DEFAULT_STORE__!==S1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),S1}const rxe={},oxe=b.createContext(void 0);function qX(e){return b.useContext(oxe)||nxe()}const LI=e=>typeof(e==null?void 0:e.then)=="function",$I=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},ixe=J.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:($I(e),e)}),I2=new WeakMap,c7=(e,t,n)=>{const o=Xwe(e)[26];let i=I2.get(t);return i||(i=new Promise((a,s)=>{let l=t;const u=h=>p=>{l===h&&a(p)},c=h=>p=>{l===h&&s(p)},d=()=>{try{const h=n();LI(h)?(I2.set(h,i),l=h,h.then(u(h),c(h)),o(e,h,d)):a(h)}catch(h){s(h)}};t.then(u(t),c(t)),o(e,t,d)}),I2.set(t,i)),i};function axe(e,t){const{delay:n,unstable_promiseStatus:r=!J.use}={},o=qX(),[[i,a,s],l]=b.useReducer(c=>{const d=o.get(e);return Object.is(c[0],d)&&c[1]===o&&c[2]===e?c:[d,o,e]},void 0,()=>[o.get(e),o,e]);let u=i;if((a!==o||s!==e)&&(l(),u=o.get(e)),b.useEffect(()=>{const c=o.sub(e,()=>{if(r)try{const d=o.get(e);LI(d)&&$I(c7(o,d,()=>o.get(e)))}catch{}if(typeof n=="number"){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3. + +Migration guide: + +Create a custom hook like the following. + +function useAtomValueWithDelay( + atom: Atom, + options: { delay: number }, +): Value { + const { delay } = options + const store = useStore(options) + const [value, setValue] = useState(() => store.get(atom)) + useEffect(() => { + const unsub = store.sub(atom, () => { + setTimeout(() => setValue(store.get(atom)), delay) + }) + return unsub + }, [store, atom, delay]) + return value +} +`),setTimeout(l,n);return}l()});return l(),c},[o,e,n,r]),b.useDebugValue(u),LI(u)){const c=c7(o,u,()=>o.get(e));return r&&$I(c),ixe(c)}return u}function UX(e,t){const n=qX();return b.useCallback((...o)=>{if((rxe?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function VX(e,t){return[axe(e),UX(e)]}const pL=(e,t)=>{const n=localStorage.getItem(e);if(n!==null)return JSON.parse(n);if(t!==void 0)return t},FI="lastTenant",f7=qy(pL(FI)),mL=qy(e=>e(f7),(e,t,n)=>{if(t(f7,n),n===void 0){localStorage.removeItem(FI);return}localStorage.setItem(FI,JSON.stringify(n))}),WX="lastWorkerMetricsTimeRange",d7=qy(pL(WX,"1h")),eet=qy(e=>e(d7),(e,t,n)=>{t(d7,n),localStorage.setItem(WX,JSON.stringify(n))}),HX="wrView",h7=qy(pL(HX,"minimap")),tet=qy(e=>e(h7),(e,t,n)=>{t(h7,n),localStorage.setItem(HX,JSON.stringify(n))}),GX=b.createContext(null),sxe=e=>{if(e)return Cr(e.tenant),e.tenant};function lxe({children:e}){var R,T,k;const t=Hs({strict:!1}),[n,r]=VX(mL),o=t.tenant,i=t.organization,{userGetCurrentQuery:a}=DX(),s=In({...a(),retry:!1}),l=ec(),u=b.useCallback(()=>{l.resetQueries({queryKey:a().queryKey})},[l,a]),{isLoaded:c,organizations:d,tenantMemberships:h,isCloudEnabled:p}=JO(),x=b.useMemo(()=>{var $;if(!i||!p||!d)return;const M=d.find(L=>L.metadata.id===i);return M?M.tenants.some(L=>L.id===(n==null?void 0:n.metadata.id))?n==null?void 0:n.metadata.id:($=M.tenants[0])==null?void 0:$.id:void 0},[i,p,d,n==null?void 0:n.metadata.id]),y=b.useMemo(()=>{if(!(!(n!=null&&n.metadata.id)||!h))return h.find(M=>{var j;return((j=M.tenant)==null?void 0:j.metadata.id)===n.metadata.id})},[n==null?void 0:n.metadata.id,h]),w=((R=y==null?void 0:y.tenant)==null?void 0:R.metadata.id)??((k=(T=h==null?void 0:h[0])==null?void 0:T.tenant)==null?void 0:k.metadata.id),_=o||x||w,C=b.useMemo(()=>{if(!(!_||!h))return h.find(M=>{var j;return((j=M.tenant)==null?void 0:j.metadata.id)===_})},[_,h]),O=b.useMemo(()=>sxe(C),[C]);b.useEffect(()=>{O&&O.metadata.id!==(n==null?void 0:n.metadata.id)&&r(O)},[O,n,r]);const P=b.useMemo(()=>{const M={user:s.data,isUserLoaded:s.isSuccess,isUserLoading:s.isLoading,userError:s.error,isUserError:s.isError,invalidateCurrentUser:u,tenant:O,tenantId:o||(O==null?void 0:O.metadata.id)};return c?p?{...M,isUserUniverseLoaded:!0,isCloudEnabled:!0,membership:C==null?void 0:C.role,organizations:d||[]}:{...M,isUserUniverseLoaded:!0,isCloudEnabled:!1,membership:C==null?void 0:C.role,organizations:void 0}:{...M,isUserUniverseLoaded:!1,membership:void 0,organizations:void 0}},[s.data,s.isLoading,s.isSuccess,s.error,s.isError,u,O,o,c,p,C==null?void 0:C.role,d]);return v.jsx(GX.Provider,{value:P,children:e})}function eR(){const e=b.useContext(GX);if(!e)throw new Error("useAppContext must be used within AppContextProvider");return e}function uxe(){const{user:e,isUserLoading:t,isUserError:n,userError:r,invalidateCurrentUser:o}=eR();return{currentUser:e,isLoading:t,isError:n||!e&&!t,error:r,invalidate:o}}var cxe=(e=>(e.YCAlumni="YC Alumni",e.YCCurrentBatch="YC Current Batch",e.Startup="Startup",e.Custom="Custom",e))(cxe||{}),fxe=(e=>(e.Requested="Requested",e.Approved="Approved",e.Redeemed="Redeemed",e))(fxe||{}),dxe=(e=>(e.PENDING="PENDING",e.ACCEPTED="ACCEPTED",e.REJECTED="REJECTED",e.EXPIRED="EXPIRED",e))(dxe||{}),hxe=(e=>(e.Value30D="30D",e.Value60D="60D",e.Value90D="90D",e))(hxe||{}),KX=(e=>(e.ACTIVE="ACTIVE",e.ARCHIVED="ARCHIVED",e))(KX||{}),pxe=(e=>(e.OWNER="OWNER",e.MEMBER="MEMBER",e))(pxe||{}),mxe=(e=>(e.QUICKSTART_PYTHON="QUICKSTART_PYTHON",e.QUICKSTART_TYPESCRIPT="QUICKSTART_TYPESCRIPT",e.QUICKSTART_GO="QUICKSTART_GO",e))(mxe||{}),gxe=(e=>(e.Ams="ams",e.Arn="arn",e.Bom="bom",e.Cdg="cdg",e.Dfw="dfw",e.Ewr="ewr",e.Fra="fra",e.Gru="gru",e.Iad="iad",e.Jnb="jnb",e.Lax="lax",e.Lhr="lhr",e.Nrt="nrt",e.Ord="ord",e.Sin="sin",e.Sjc="sjc",e.Syd="syd",e.Yyz="yyz",e))(gxe||{}),vxe=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.SCALE_UP="SCALE_UP",e.SCALE_DOWN="SCALE_DOWN",e))(vxe||{});function yxe(){const{isControlPlaneEnabled:e}=Iy();return b.useMemo(()=>({organizationListQuery:()=>({queryKey:["organization:list"],queryFn:async()=>(await(e?Mt.organizationList():Cn.organizationList())).data}),organizationGetQuery:t=>({queryKey:["organization:get",t],queryFn:async()=>(await(e?Mt.organizationGet(t):Cn.organizationGet(t))).data}),organizationAvailableShardsQuery:t=>({queryKey:["organization:available-shards",t],queryFn:async()=>(await Mt.organizationListAvailableShards(t)).data}),sharedShardsQuery:()=>({queryKey:["shards:list:shared"],queryFn:async()=>(await Mt.shardsListShared()).data}),organizationSsoDomainGetQuery:t=>({queryKey:["organization:sso_domain:get",t],queryFn:async()=>(await Mt.ssoDomainList(t)).data}),organizationSsoConfigGetQuery:t=>({queryKey:["organization:sso_config:get",t],queryFn:async()=>(await Mt.ssoConfigGet(t)).data}),organizationEntitlementsGetQuery:t=>({queryKey:["organization:entitlements:get",t],queryFn:async()=>(await Mt.organizationEntitlementsGet(t)).data}),managementTokenListQuery:t=>({queryKey:["management-tokens:list",t],queryFn:async()=>(await(e?Mt.managementTokenList(t):Cn.managementTokenList(t))).data}),userListOrganizationInvitesQuery:()=>({queryKey:["user:list:organization-invites"],queryFn:async()=>(await(e?Mt.userListOrganizationInvites():Cn.userListOrganizationInvites())).data}),organizationInviteListQuery:t=>({queryKey:["organization-invites:list",t],queryFn:async()=>(await(e?Mt.organizationInviteList(t):Cn.organizationInviteList(t))).data}),organizationSsoConfigUpdateMutation:t=>({mutationKey:["organization:sso_config:update",t],mutationFn:async n=>(await Mt.ssoConfigUpdate(t,{forceSSO:n})).data}),organizationSsoDomainCreateMutation:t=>({mutationKey:["organization:sso_domain:create",t],mutationFn:async n=>(await Mt.ssoDomainCreate(t,{ssoDomain:n})).data}),organizationSsoDomainDeleteMutation:t=>({mutationKey:["organization:sso_domain:create",t],mutationFn:async n=>(await Mt.ssoDomainDelete(n)).data}),organizationCreateMutation:()=>({mutationKey:["organization:create"],mutationFn:async t=>(await(e?Mt.organizationCreate(t):Cn.organizationCreate(t))).data}),organizationUpdateMutation:t=>({mutationKey:["organization:update",t],mutationFn:async n=>(await(e?Mt.organizationUpdate(t,n):Cn.organizationUpdate(t,n))).data}),organizationCreateTenantMutation:t=>({mutationKey:["organization:create-tenant",t],mutationFn:async n=>(await(e?Mt.organizationCreateTenant(t,n):Cn.organizationCreateTenant(t,n))).data}),organizationTenantDeleteMutation:t=>({mutationKey:["organization-tenant:delete",t],mutationFn:async()=>(await(e?Mt.organizationTenantDelete(t):Cn.organizationTenantDelete(t))).data}),organizationMemberDeleteMutation:t=>({mutationKey:["organization-member:delete",t],mutationFn:async n=>(await(e?Mt.organizationMemberDelete(t,n):Cn.organizationMemberDelete(t,n))).data}),managementTokenCreateMutation:t=>({mutationKey:["management-token:create",t],mutationFn:async n=>(await(e?Mt.managementTokenCreate(t,n):Cn.managementTokenCreate(t,n))).data}),managementTokenDeleteMutation:t=>({mutationKey:["management-token:delete",t],mutationFn:async()=>(await(e?Mt.managementTokenDelete(t):Cn.managementTokenDelete(t))).data}),organizationInviteAcceptMutation:()=>({mutationKey:["organization-invite:accept"],mutationFn:async t=>(await(e?Mt.organizationInviteAccept(t):Cn.organizationInviteAccept(t))).data}),organizationInviteRejectMutation:()=>({mutationKey:["organization-invite:reject"],mutationFn:async t=>(await(e?Mt.organizationInviteReject(t):Cn.organizationInviteReject(t))).data}),organizationInviteCreateMutation:t=>({mutationKey:["organization-invite:create",t],mutationFn:async n=>(await(e?Mt.organizationInviteCreate(t,n):Cn.organizationInviteCreate(t,n))).data}),organizationInviteDeleteMutation:t=>({mutationKey:["organization-invite:delete",t],mutationFn:async()=>(await(e?Mt.organizationInviteDelete(t):Cn.organizationInviteDelete(t))).data}),tenantTagsGetQuery:(t,n)=>({queryKey:["organization-tenant:list:tags",t,n],queryFn:async()=>(await Mt.organizationTenantListTags(t,n)).data}),tenantTagsSetMutation:(t,n)=>({mutationKey:["organization-tenant:set:tags",t,n],mutationFn:async r=>(await Mt.organizationTenantSetTags(t,n,{tags:r})).data}),userGroupsListQuery:t=>({queryKey:["organization:user-groups:list",t],queryFn:async()=>(await Mt.organizationUserGroupsList(t)).data}),userGroupCreateMutation:t=>({mutationKey:["organization:user-groups:create",t],mutationFn:async n=>(await Mt.organizationUserGroupsCreate(t,{name:n.name,role:n.role})).data}),userGroupGetQuery:(t,n)=>({queryKey:["organization:user-group:get",t,n],queryFn:async()=>(await Mt.organizationUserGroupGet(t,n)).data}),userGroupUpdateMutation:(t,n)=>({mutationKey:["organization:user-group:update",t,n],mutationFn:async r=>(await Mt.organizationUserGroupUpdate(t,n,r)).data}),userGroupDeleteMutation:(t,n)=>({mutationKey:["organization:user-group:delete",t,n],mutationFn:async()=>Mt.organizationUserGroupDelete(t,n)}),userGroupTagsGetQuery:(t,n)=>({queryKey:["organization:user-group:tags:get",t,n],queryFn:async()=>(await Mt.organizationUserGroupListTags(t,n)).data}),userGroupTagsSetMutation:(t,n)=>({mutationKey:["organization:user-group:tags:set",t,n],mutationFn:async r=>(await Mt.organizationUserGroupSetTags(t,n,{tags:r})).data}),userGroupMembersListQuery:(t,n)=>({queryKey:["organization:user-group:members:list",t,n],queryFn:async()=>(await Mt.organizationUserGroupListMembers(t,n)).data}),userGroupMemberAddMutation:(t,n)=>({mutationKey:["organization:user-group:members:add",t,n],mutationFn:async r=>Mt.organizationUserGroupAddMember(t,n,{organizationMemberId:r})}),userGroupMemberRemoveMutation:(t,n)=>({mutationKey:["organization:user-group:members:remove",t,n],mutationFn:async r=>Mt.organizationUserGroupRemoveMember(t,n,r)}),organizationTenantMembersAddMutation:(t,n)=>({mutationKey:["organization-tenant:members:add",t,n],mutationFn:async r=>(await(e?Mt.organizationTenantMembersAdd(t,n,r):Cn.organizationTenantMembersAdd(t,n,r))).data})}),[e])}const wxe=336*60*60*1e3;function xxe(){var K;const{organizations:e,isLoaded:t,isCloudEnabled:n}=JO(),{handleApiError:r}=ZO({}),o=yxe(),i=In({...o.organizationListQuery(),enabled:n}),a=b.useMemo(()=>t&&n?(Cr(e),e):[],[t,e,n]),s=b.useMemo(()=>{const z=new Map;return a.forEach(X=>{X.tenants.forEach(ee=>{z.set(ee.id,X)})}),X=>z.get(X)},[a]),l=b.useCallback(z=>{const X=s(z);return(X==null?void 0:X.metadata.id)||null},[s]),u=b.useCallback(z=>{var ee,ae;const X=s(z);return X?((ae=(ee=X.tenants)==null?void 0:ee.find(fe=>fe.id===z))==null?void 0:ae.status)===KX.ARCHIVED:!1},[s]),c=b.useMemo(()=>{var z,X;return(((X=(z=i.data)==null?void 0:z.rows)==null?void 0:X.length)||0)>0},[(K=i.data)==null?void 0:K.rows]),d=o.organizationInviteAcceptMutation(),h=Ir({mutationKey:d.mutationKey,mutationFn:async z=>{await d.mutationFn({id:z.inviteId})},onError:r}),p=o.organizationInviteRejectMutation(),x=Ir({mutationKey:p.mutationKey,mutationFn:async z=>{await p.mutationFn({id:z.inviteId})},onError:r}),y=Ir({mutationFn:async z=>o.organizationCreateTenantMutation(z.organizationId).mutationFn({name:z.name,slug:z.slug}),onSuccess:()=>{localStorage.setItem("hatchet:show-welcome","1")},onError:r}),w=Ir({mutationFn:async z=>{await o.organizationInviteDeleteMutation(z.inviteId).mutationFn()},onError:r}),_=b.useCallback((z,X,ee)=>{w.mutate({inviteId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[w]),C=Ir({mutationFn:async z=>{const X={name:z.name};return z.duration!=null&&(X.duration=z.duration),z.tags&&z.tags.length>0&&(X.tags=z.tags),o.managementTokenCreateMutation(z.organizationId).mutationFn(X)},onError:r}),O=Ir({mutationFn:async z=>{await o.organizationMemberDeleteMutation(z.memberId).mutationFn({emails:[z.email]})},onError:r}),P=Ir({mutationFn:async z=>{await o.managementTokenDeleteMutation(z.tokenId).mutationFn()},onError:r}),R=Ir({mutationFn:async z=>{await o.organizationTenantDeleteMutation(z.tenantId).mutationFn()},onError:r}),T=Ir({mutationFn:async z=>o.organizationUpdateMutation(z.organizationId).mutationFn({name:z.name,inactivity_timeout:z.inactivity_timeout}),onError:r}),k=o.organizationCreateMutation(),M=Ir({...k,onError:r,onSuccess:()=>{i.refetch()}}),j=Ir({mutationFn:async z=>o.organizationSsoDomainCreateMutation(z.organizationId).mutationFn(z.ssoDomain),onError:r}),$=Ir({mutationFn:async z=>o.organizationSsoDomainDeleteMutation(z.organizationId).mutationFn(z.ssoDomain),onError:r}),L=b.useCallback((z,X,ee,ae,fe)=>{C.mutate({organizationId:z,name:X,duration:ee,tags:fe},{onSuccess:ie=>{ae(ie)},onError:()=>{}})},[C]),V=b.useCallback((z,X,ee)=>{z&&O.mutate({memberId:z.metadata.id,email:z.email},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[O]),G=b.useCallback((z,X,ee)=>{P.mutate({tokenId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[P]),D=b.useCallback((z,X,ee)=>{R.mutate({tenantId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[R]),H=b.useCallback((z,X,ee)=>{T.mutate({organizationId:z,name:X},{onSuccess:()=>{ee()},onError:()=>{}})},[T]),U=(z,X,ee)=>{if(X>wxe)throw new Error("Inactivity timeout must not exceed 14 days.");T.mutate({organizationId:z,inactivity_timeout:`${X}ms`},{onSuccess:()=>{ee()},onError:()=>{}})},Y=b.useCallback((z,X)=>{M.mutate({name:z},{onSuccess:ee=>{X(ee.metadata.id)},onError:()=>{}})},[M]),q=b.useCallback((z,X,ee,ae)=>{j.mutate({organizationId:z,ssoDomain:X},{onSuccess:()=>{ee(z)},onError:()=>{ae==null||ae()}})},[j]),W=b.useCallback((z,X,ee)=>{$.mutate({organizationId:z,ssoDomain:X},{onSuccess:()=>{ee(z)},onError:()=>{}})},[$]);return{organizations:a,organizationData:e,isCloudEnabled:n,getOrganizationForTenant:s,getOrganizationIdForTenant:l,isTenantArchivedInOrg:u,hasOrganizations:c,acceptOrgInviteMutation:h,rejectOrgInviteMutation:x,createTenantMutation:y,handleCancelInvite:_,handleCreateToken:L,handleDeleteMember:V,handleDeleteToken:G,handleDeleteTenant:D,handleUpdateOrganization:H,handleUpdateOrganizationTimeout:U,handleCreateOrganization:Y,handleCreateOrganizationSsoDomain:q,handleDeleteOrganizationSsoDomain:W,cancelInviteLoading:w.isPending,createTokenLoading:C.isPending,deleteMemberLoading:O.isPending,deleteTokenLoading:P.isPending,deleteTenantLoading:R.isPending,updateOrganizationLoading:T.isPending,createOrganizationLoading:M.isPending,isUserUniverseLoaded:t,error:i.error}}function bxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))}const Sxe=b.forwardRef(bxe);function _xe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Exe=b.forwardRef(_xe);function Cxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Oxe=b.forwardRef(Cxe);function Rxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const YX=b.forwardRef(Rxe);function Pxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const XX=b.forwardRef(Pxe);function Txe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Axe=b.forwardRef(Txe);function kxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const Nxe=b.forwardRef(kxe);function Mxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}const p7=b.forwardRef(Mxe);function jxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const QX=b.forwardRef(jxe);function ZX({membership:e,onSelect:t,indented:n}){var r;return v.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-foreground/80 transition-colors hover:bg-muted/50 hover:text-foreground",style:n?{paddingLeft:"2rem"}:void 0,children:[v.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:v.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"})}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:(r=e.tenant)==null?void 0:r.name})]})}function Ixe({organization:e,tenants:t,onTenantSelect:n,defaultExpanded:r}){const[o,i]=b.useState(r??!0);return t.length===0?null:v.jsxs("div",{children:[v.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm font-medium transition-colors hover:bg-muted/50",children:[o?v.jsx(YX,{className:"size-3 shrink-0"}):v.jsx(XX,{className:"size-3 shrink-0"}),v.jsx(Sxe,{className:"size-4 shrink-0"}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})]}),o&&t.sort((a,s)=>{var l,u;return(((l=a.tenant)==null?void 0:l.name)??"").toLowerCase().localeCompare((((u=s.tenant)==null?void 0:u.name)??"").toLowerCase())}).map(a=>v.jsx(ZX,{membership:a,onSelect:()=>n(a),indented:!0},a.metadata.id))]})}function Dxe(){const e=Vl(),t=Hs({strict:!1}),n=cL(t,"tenant"),r=UX(mL),o=ec(),{currentUser:i}=uxe(),{tenantMemberships:a,isCloudEnabled:s}=JO(),{organizations:l,getOrganizationForTenant:u,isTenantArchivedInOrg:c}=xxe(),{userUpdateLogoutMutation:d}=DX(),h=Ir({...d(),onSuccess:()=>{o.clear(),e({to:At.authLoginRoute.to,replace:!0})}}),p=_=>{_.tenant&&(r(_.tenant),o.clear(),e({to:At.tenantRunsRoute.to,params:{tenant:_.tenant.metadata.id}}))},x=b.useMemo(()=>(a==null?void 0:a.filter(_=>{var O;const C=(O=_.tenant)==null?void 0:O.metadata.id;return!(!C||C===n||s&&c(C))}))||[],[a,n,s,c]),{orgGroups:y,standaloneTenants:w}=b.useMemo(()=>{if(!s)return{orgGroups:[],standaloneTenants:x};const _=new Map,C=[];return x.forEach(P=>{var k;const R=((k=P.tenant)==null?void 0:k.metadata.id)||"",T=u(R);if(T){const M=T.metadata.id;_.has(M)||_.set(M,[]),_.get(M).push(P)}else C.push(P)}),{orgGroups:l.map(P=>({organization:P,tenants:_.get(P.metadata.id)||[]})).filter(P=>P.tenants.length>0).sort((P,R)=>P.organization.name.toLowerCase().localeCompare(R.organization.name.toLowerCase())),standaloneTenants:C}},[s,x,l,u]);return v.jsxs($O,{icon:v.jsx(X1e,{className:"h-6 w-6"}),title:"Access denied",description:"You don't have permission to view this tenant.",actions:v.jsx(wt,{leftIcon:v.jsx(NX,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"403"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested Tenant"}),v.jsx("div",{className:"break-all text-foreground/90",children:n||"unknown"})]}),x.length>0&&v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-1",children:[v.jsx("div",{className:"px-3 pb-1 pt-2 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Switch to another tenant"}),v.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[y.map(({organization:_,tenants:C})=>v.jsx(Ixe,{organization:_,tenants:C,onTenantSelect:p},_.metadata.id)),w.length>0&&w.sort((_,C)=>{var O,P;return(((O=_.tenant)==null?void 0:O.name)??"").toLowerCase().localeCompare((((P=C.tenant)==null?void 0:P.name)??"").toLowerCase())}).map(_=>v.jsx(ZX,{membership:_,onSelect:()=>p(_)},_.metadata.id))]})]}),v.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-center gap-2",children:[!!(i!=null&&i.email)&&v.jsxs("div",{className:"text-xs text-muted-foreground",children:["Signed in as ",v.jsx("span",{className:"font-mono",children:i.email})]}),v.jsx(wt,{leftIcon:v.jsx(B1e,{className:"size-4"}),onClick:()=>h.mutate(),size:"sm",variant:"ghost",children:"Sign out"})]})]})}function JX(e,t){if(!(!e||typeof e!="object"))return Reflect.get(e,t)}function gL(e){var n;if(!e)return;if(e instanceof Response)return e.status;if(A3(e))return(n=e.response)==null?void 0:n.status;const t=JX(e,"status");return typeof t=="number"?t:void 0}function Lxe(e){var n;if(!e)return;if(e instanceof Response)return e.statusText;if(A3(e))return(n=e.response)==null?void 0:n.statusText;const t=JX(e,"statusText");return typeof t=="string"?t:void 0}function net(e){const t=gL(e);return!(t!==void 0&&t>=400&&t<500)}function $xe({error:e}){const t=RX(),n=Hs({strict:!1}),r=cL(n,"tenant"),o=gL(e),i=Lxe(e);if(console.error(e),e instanceof TypeError&&e.message.includes("Failed to fetch dynamically imported module:"))return v.jsx(awe,{});const a=!!t({to:At.tenantRoute.to,params:r?{tenant:r}:void 0,fuzzy:!0});return o===403&&a?v.jsx(Dxe,{}):o===404?v.jsx(QO,{}):v.jsx(iwe,{status:o,statusText:i})}const D2="hatchet:local-storage";function Xv(e,t){const[n,r]=b.useState(()=>{try{const i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),o=i=>{try{r(a=>{const s=typeof i=="function"?i(a):i;return window.localStorage.setItem(e,JSON.stringify(s)),window.dispatchEvent(new CustomEvent(D2,{detail:{key:e,value:s}})),s})}catch(a){console.warn(`Error setting localStorage key "${e}":`,a)}};return b.useEffect(()=>{const i=s=>{if(s.key===e&&s.newValue)try{r(JSON.parse(s.newValue))}catch(l){console.warn(`Error parsing localStorage change for key "${e}":`,l)}},a=s=>{var u;const l=s;((u=l.detail)==null?void 0:u.key)===e&&r(l.detail.value)};return window.addEventListener("storage",i),window.addEventListener(D2,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(D2,a)}},[e]),[n,o]}const Fxe="v1SidebarWidth",Bxe="v1SidebarWidthExpanded",zxe="v1SidebarCollapsed",m7=768,sE=200,eQ=200,ret=520,qxe=56,oet=eQ,iet=eQ-100,aet=3,Uxe={sidebarOpen:"closed",setSidebarOpen:()=>null,toggleSidebarOpen:()=>null,isWide:!1,sidebarWidth:void 0,collapsed:!1,setCollapsed:()=>null,toggleCollapsed:()=>null,expandedWidth:sE,setExpandedWidth:()=>null},tQ=b.createContext(Uxe);function Vxe({children:e,defaultSidebarOpen:t="closed",...n}){const[r,o]=b.useState(()=>t),[i,a]=b.useState(()=>typeof window<"u"?window.innerWidth>=m7:!1),s=b.useMemo(()=>{if(typeof window>"u")return sE;try{const x=window.localStorage.getItem(Fxe);return x?JSON.parse(x):sE}catch{return sE}},[]),[l,u]=Xv(Bxe,s),[c,d]=Xv(zxe,!1),h=b.useMemo(()=>{if(i)return c?qxe:l},[c,l,i]),p=b.useCallback(()=>{d(!c)},[c,d]);return b.useEffect(()=>{const x=()=>{a(window.innerWidth>=m7)};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]),b.useEffect(()=>{o(i?"open":"closed")},[i]),v.jsx(tQ.Provider,{...n,value:{sidebarOpen:r,setSidebarOpen:x=>{o(x)},toggleSidebarOpen:()=>{o(x=>x==="open"?"closed":"open")},isWide:i,sidebarWidth:h,collapsed:c,setCollapsed:d,toggleCollapsed:p,expandedWidth:l,setExpandedWidth:u},children:e})}const set=()=>{const e=b.useContext(tQ);if(e===void 0)throw new Error("useSidebar must be used within a SidebarProvider");return e},Wxe={theme:"system",setTheme:()=>null,toggleTheme:()=>null,currentlyVisibleTheme:"light"},nQ=b.createContext(Wxe),L2=e=>e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;function Hxe({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=b.useState(()=>localStorage.getItem(n)||t),[a,s]=b.useState(()=>L2(o));b.useEffect(()=>{const d=window.document.documentElement;d.classList.remove("light","dark");const h=L2(o);s(h),d.classList.add(h)},[o]),b.useEffect(()=>{if(o!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const p=L2("system");s(p);const x=window.document.documentElement;x.classList.remove("light","dark"),x.classList.add(p)};return d.addEventListener("change",h),()=>d.removeEventListener("change",h)},[o]);const l=d=>{localStorage.setItem(n,d),i(d)},c={theme:o,setTheme:l,toggleTheme:()=>{l(o==="dark"?"light":"dark")},currentlyVisibleTheme:a};return v.jsx(nQ.Provider,{...r,value:c,children:e})}const vL=()=>{const e=b.useContext(nQ);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var $2="focusScope.autoFocusOnMount",F2="focusScope.autoFocusOnUnmount",g7={bubbles:!1,cancelable:!0},Gxe="FocusScope",Jx=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=b.useState(null),u=Ji(o),c=Ji(i),d=b.useRef(null),h=Bn(t,y=>l(y)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let y=function(O){if(p.paused||!s)return;const P=O.target;s.contains(P)?d.current=P:cd(d.current,{select:!0})},w=function(O){if(p.paused||!s)return;const P=O.relatedTarget;P!==null&&(s.contains(P)||cd(d.current,{select:!0}))},_=function(O){if(document.activeElement===document.body)for(const R of O)R.removedNodes.length>0&&cd(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const C=new MutationObserver(_);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),C.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){y7.add(p);const y=document.activeElement;if(!s.contains(y)){const _=new CustomEvent($2,g7);s.addEventListener($2,u),s.dispatchEvent(_),_.defaultPrevented||(Kxe(Jxe(rQ(s)),{select:!0}),document.activeElement===y&&cd(s))}return()=>{s.removeEventListener($2,u),setTimeout(()=>{const _=new CustomEvent(F2,g7);s.addEventListener(F2,c),s.dispatchEvent(_),_.defaultPrevented||cd(y??document.body,{select:!0}),s.removeEventListener(F2,c),y7.remove(p)},0)}}},[s,u,c,p]);const x=b.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(w&&_){const C=y.currentTarget,[O,P]=Yxe(C);O&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&cd(O,{select:!0})):y.shiftKey&&_===O&&(y.preventDefault(),n&&cd(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,p.paused]);return v.jsx(Zt.div,{tabIndex:-1,...a,ref:h,onKeyDown:x})});Jx.displayName=Gxe;function Kxe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cd(r,{select:t}),document.activeElement!==n)return}function Yxe(e){const t=rQ(e),n=v7(t,e),r=v7(t.reverse(),e);return[n,r]}function rQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function v7(e,t){for(const n of e)if(!Xxe(n,{upTo:t}))return n}function Xxe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qxe(e){return e instanceof HTMLInputElement&&"select"in e}function cd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qxe(e)&&t&&e.select()}}var y7=Zxe();function Zxe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=w7(e,t),e.unshift(t)},remove(t){var n;e=w7(e,t),(n=e[0])==null||n.resume()}}}function w7(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jxe(e){return e.filter(t=>t.tagName!=="A")}var B2=0;function tR(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??x7()),document.body.insertAdjacentElement("beforeend",e[1]??x7()),B2++,()=>{B2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),B2--}},[])}function x7(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pi=function(){return Pi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return dbe;var t=hbe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mbe=wL(),yv="data-scroll-locked",gbe=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(ebe,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat(yv,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(dw,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(hw,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(dw," .").concat(dw,` { + right: 0 `).concat(r,`; + } + + .`).concat(hw," .").concat(hw,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(yv,`] { + `).concat(tbe,": ").concat(s,`px; + } +`)},S7=function(){var e=parseInt(document.body.getAttribute(yv)||"0",10);return isFinite(e)?e:0},vbe=function(){b.useEffect(function(){return document.body.setAttribute(yv,(S7()+1).toString()),function(){var e=S7()-1;e<=0?document.body.removeAttribute(yv):document.body.setAttribute(yv,e.toString())}},[])},cQ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vbe();var i=b.useMemo(function(){return pbe(o)},[o]);return b.createElement(mbe,{styles:gbe(i,!t,o,n?"":"!important")})},BI=!1;if(typeof window<"u")try{var f_=Object.defineProperty({},"passive",{get:function(){return BI=!0,!0}});window.addEventListener("test",f_,f_),window.removeEventListener("test",f_,f_)}catch{BI=!1}var Ug=BI?{passive:!1}:!1,ybe=function(e){return e.tagName==="TEXTAREA"},fQ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ybe(e)&&n[t]==="visible")},wbe=function(e){return fQ(e,"overflowY")},xbe=function(e){return fQ(e,"overflowX")},_7=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=dQ(e,r);if(o){var i=hQ(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Sbe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dQ=function(e,t){return e==="v"?wbe(t):xbe(t)},hQ=function(e,t){return e==="v"?bbe(t):Sbe(t)},_be=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ebe=function(e,t,n,r,o){var i=_be(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,h=0;do{if(!s)break;var p=hQ(e,s),x=p[0],y=p[1],w=p[2],_=y-w-i*x;(x||_)&&dQ(e,s)&&(d+=_,h+=x);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(d)<1||!c&&Math.abs(h)<1)&&(u=!0),u},d_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},E7=function(e){return[e.deltaX,e.deltaY]},C7=function(e){return e&&"current"in e?e.current:e},Cbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Obe=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Rbe=0,Vg=[];function Pbe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(Rbe++)[0],i=b.useState(wL)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=oQ([e.lockRef.current],(e.shards||[]).map(C7),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=d_(y),C=n.current,O="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],R,T=y.target,k=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in y&&k==="h"&&T.type==="range")return!1;var M=_7(k,T);if(!M)return!0;if(M?R=k:(R=k==="v"?"h":"v",M=_7(k,T)),!M)return!1;if(!r.current&&"changedTouches"in y&&(O||P)&&(r.current=R),!R)return!0;var j=r.current||R;return Ebe(j,w,y,j==="h"?O:P)},[]),l=b.useCallback(function(y){var w=y;if(!(!Vg.length||Vg[Vg.length-1]!==i)){var _="deltaY"in w?E7(w):d_(w),C=t.current.filter(function(R){return R.name===w.type&&(R.target===w.target||w.target===R.shadowParent)&&Cbe(R.delta,_)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var O=(a.current.shards||[]).map(C7).filter(Boolean).filter(function(R){return R.contains(w.target)}),P=O.length>0?s(w,O[0]):!a.current.noIsolation;P&&w.cancelable&&w.preventDefault()}}},[]),u=b.useCallback(function(y,w,_,C){var O={name:y,delta:w,target:_,should:C,shadowParent:Tbe(_)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),c=b.useCallback(function(y){n.current=d_(y),r.current=void 0},[]),d=b.useCallback(function(y){u(y.type,E7(y),y.target,s(y,e.lockRef.current))},[]),h=b.useCallback(function(y){u(y.type,d_(y),y.target,s(y,e.lockRef.current))},[]);b.useEffect(function(){return Vg.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ug),document.addEventListener("touchmove",l,Ug),document.addEventListener("touchstart",c,Ug),function(){Vg=Vg.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,Ug),document.removeEventListener("touchmove",l,Ug),document.removeEventListener("touchstart",c,Ug)}},[]);var p=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(i,{styles:Obe(o)}):null,p?b.createElement(cQ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Tbe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Abe=lQ(uQ,Pbe);var eb=b.forwardRef(function(e,t){return b.createElement(nR,Pi({},e,{ref:t,sideCar:Abe}))});eb.classNames=nR.classNames;var kbe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wg=new WeakMap,h_=new WeakMap,p_={},V2=0,pQ=function(e){return e&&(e.host||pQ(e.parentNode))},Nbe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pQ(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Mbe=function(e,t,n,r){var o=Nbe(t,Array.isArray(e)?e:[e]);p_[n]||(p_[n]=new WeakMap);var i=p_[n],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),x=p!==null&&p!=="false",y=(Wg.get(h)||0)+1,w=(i.get(h)||0)+1;Wg.set(h,y),i.set(h,w),a.push(h),y===1&&x&&h_.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return c(t),s.clear(),V2++,function(){a.forEach(function(d){var h=Wg.get(d)-1,p=i.get(d)-1;Wg.set(d,h),i.set(d,p),h||(h_.has(d)||d.removeAttribute(r),h_.delete(d)),p||d.removeAttribute(n)}),V2--,V2||(Wg=new WeakMap,Wg=new WeakMap,h_=new WeakMap,p_={})}},tb=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=kbe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Mbe(r,o,n,"aria-hidden")):function(){return null}},rR="Dialog",[mQ]=fs(rR),[jbe,Wl]=mQ(rR),gQ=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=b.useRef(null),l=b.useRef(null),[u,c]=qs({prop:r,defaultProp:o??!1,onChange:i,caller:rR});return v.jsx(jbe,{scope:t,triggerRef:s,contentRef:l,contentId:Pa(),titleId:Pa(),descriptionId:Pa(),open:u,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};gQ.displayName=rR;var vQ="DialogTrigger",yQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wl(vQ,n),i=Bn(t,o.triggerRef);return v.jsx(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":SL(o.open),...r,ref:i,onClick:Ze(e.onClick,o.onOpenToggle)})});yQ.displayName=vQ;var xL="DialogPortal",[Ibe,wQ]=mQ(xL,{forceMount:void 0}),xQ=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Wl(xL,t);return v.jsx(Ibe,{scope:t,forceMount:n,children:b.Children.map(r,a=>v.jsx(ji,{present:n||i.open,children:v.jsx(vm,{asChild:!0,container:o,children:a})}))})};xQ.displayName=xL;var LE="DialogOverlay",bQ=b.forwardRef((e,t)=>{const n=wQ(LE,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Wl(LE,e.__scopeDialog);return i.modal?v.jsx(ji,{present:r||i.open,children:v.jsx(Lbe,{...o,ref:t})}):null});bQ.displayName=LE;var Dbe=Kp("DialogOverlay.RemoveScroll"),Lbe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wl(LE,n);return v.jsx(eb,{as:Dbe,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(Zt.div,{"data-state":SL(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Zp="DialogContent",SQ=b.forwardRef((e,t)=>{const n=wQ(Zp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Wl(Zp,e.__scopeDialog);return v.jsx(ji,{present:r||i.open,children:i.modal?v.jsx($be,{...o,ref:t}):v.jsx(Fbe,{...o,ref:t})})});SQ.displayName=Zp;var $be=b.forwardRef((e,t)=>{const n=Wl(Zp,e.__scopeDialog),r=b.useRef(null),o=Bn(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return tb(i)},[]),v.jsx(_Q,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ze(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Ze(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ze(e.onFocusOutside,i=>i.preventDefault())})}),Fbe=b.forwardRef((e,t)=>{const n=Wl(Zp,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return v.jsx(_Q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),_Q=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Wl(Zp,n),l=b.useRef(null),u=Bn(t,l);return tR(),v.jsxs(v.Fragment,{children:[v.jsx(Jx,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Zd,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":SL(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(Bbe,{titleId:s.titleId}),v.jsx(qbe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),bL="DialogTitle",EQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wl(bL,n);return v.jsx(Zt.h2,{id:o.titleId,...r,ref:t})});EQ.displayName=bL;var CQ="DialogDescription",OQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wl(CQ,n);return v.jsx(Zt.p,{id:o.descriptionId,...r,ref:t})});OQ.displayName=CQ;var RQ="DialogClose",PQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Wl(RQ,n);return v.jsx(Zt.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,()=>o.onOpenChange(!1))})});PQ.displayName=RQ;function SL(e){return e?"open":"closed"}var TQ="DialogTitleWarning",[uet,AQ]=Xme(TQ,{contentName:Zp,titleName:bL,docsSlug:"dialog"}),Bbe=({titleId:e})=>{const t=AQ(TQ),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},zbe="DialogDescriptionWarning",qbe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${AQ(zbe).contentName}}.`;return b.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ube=gQ,Vbe=yQ,Wbe=xQ,kQ=bQ,NQ=SQ,MQ=EQ,jQ=OQ,Hbe=PQ;const nb=Ube,cet=Vbe,Gbe=Wbe,fet=Hbe,IQ=b.forwardRef(({className:e,...t},n)=>v.jsx(kQ,{ref:n,className:je("fixed inset-0 z-[200] bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));IQ.displayName=kQ.displayName;const Uy=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Gbe,{children:[v.jsx(IQ,{}),v.jsx(NQ,{ref:r,className:je("fixed left-[50%] top-[50%] z-[200] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:t})]}));Uy.displayName=NQ.displayName;const rb=({className:e,...t})=>v.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rb.displayName="DialogHeader";const DQ=({className:e,...t})=>v.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DQ.displayName="DialogFooter";const Vy=b.forwardRef(({className:e,...t},n)=>v.jsx(MQ,{ref:n,className:je("text-lg font-semibold leading-none tracking-tight",e),...t}));Vy.displayName=MQ.displayName;const oR=b.forwardRef(({className:e,...t},n)=>v.jsx(jQ,{ref:n,className:je("text-sm text-gray-700 dark:text-gray-300",e),...t}));oR.displayName=jQ.displayName;function Kbe({title:e="Hatchet",colorVariant:t="brand",variant:n="lockup",className:r,...o}){const i=n==="mark",a=n==="wordmark";return v.jsxs("svg",{viewBox:i?"0 0 33 24":a?"41 0 96 24":"0 0 137 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":e,className:je(t==="brand"&&"text-[rgb(0,26,56)] dark:text-[rgb(184,217,255)]",r),...o,children:[a?null:v.jsxs(v.Fragment,{children:[v.jsx("path",{d:"M17.5 10L22 0L30.6059 8.60589C31.7939 9.79394 32.388 10.388 32.6105 11.0729C32.8063 11.6755 32.8063 12.3245 32.6105 12.9271C32.388 13.612 31.7939 14.2061 30.6059 15.3941L22 24H15L26.7517 11.3444C27.146 10.9197 27.3432 10.7074 27.3527 10.5263C27.361 10.3691 27.2947 10.2171 27.1739 10.1162C27.0347 10 26.7449 10 26.1654 10H17.5Z",fill:"currentColor"}),v.jsx("path",{d:"M16.5 14L12 24L3.39411 15.3941C2.20606 14.2061 1.61204 13.612 1.38947 12.9271C1.1937 12.3245 1.1937 11.6755 1.38947 11.0729C1.61204 10.388 2.20606 9.79394 3.39411 8.60589L12 0H19L7.24833 12.6556C6.854 13.0803 6.65684 13.2926 6.6473 13.4737C6.63902 13.6309 6.70527 13.7829 6.82612 13.8838C6.96529 14 7.25505 14 7.83457 14H16.5Z",fill:"currentColor"})]}),i?null:v.jsx("path",{d:"M88.5908 3.14502C92.0637 3.14506 94.5478 5.30746 94.5479 8.96436V10.1147H91.0977V9.05615C91.0975 7.42337 90.0857 6.36577 88.5908 6.36572C87.0959 6.36572 86.0841 7.42333 86.084 9.05615V14.9448C86.0841 16.5776 87.0959 17.6353 88.5908 17.6353C90.0856 17.6352 91.0975 16.5776 91.0977 14.9448V13.6108H94.5479V14.9448C94.5477 18.6476 92.0866 20.8549 88.5908 20.855C85.0949 20.855 82.634 18.6476 82.6338 14.9448V8.96436C82.6338 5.30742 85.1179 3.14502 88.5908 3.14502ZM80.4238 6.61865H76.3994V20.6489H72.9492V6.61865H68.9238V3.39893H80.4238V6.61865ZM136.884 6.61865H132.858V20.6489H129.408V6.61865H125.384V3.39893H136.884V6.61865ZM44.4502 10.3677H49.4414V3.37549H52.8916V20.6255H49.4414V13.5874H44.4502V20.6255H41V3.37549H44.4502V10.3677ZM68.4639 20.6255H64.3926L63.9326 18.3022H59.7461L59.2861 20.6255H55.4688L59.7461 3.37549H64.1855L68.4639 20.6255ZM101.157 10.3677H106.148V3.37549H109.598V20.6255H106.148V13.5874H101.157V20.6255H97.707V3.37549H101.157V10.3677ZM122.801 6.59521H116.361V10.1831H121.812V13.4038H116.361V17.4058H122.848V20.6255H112.911V3.37549H122.801V6.59521ZM60.2988 15.5425H63.4033L61.8623 7.72217L60.2988 15.5425Z",fill:"currentColor"})]})}function Ybe(e){const t=e.trim();if(!t)return null;try{return t.includes("://")?new URL(t):new URL(`https://${t}`)}catch{return null}}function O7(e,t){return new URL(`${t.pathname}${t.search}${t.hash}`,e.origin).href}function Xbe(e){return typeof e=="object"&&e!==null&&e.isCloudEnabled===!0}function Qbe(){const{data:e}=In(DO),t=b.useMemo(()=>{var s;if(!Xbe(e))return null;const a=(s=e.redirectFrontendHost)==null?void 0:s.trim();return a?Ybe(a):null},[e]),n=(t==null?void 0:t.host)??"a new domain",r=t&&typeof window<"u"?O7(t,window.location):t==null?void 0:t.origin,o=b.useMemo(()=>!(typeof window>"u"||!t||window.location.origin===t.origin),[t]),i=b.useCallback(()=>{t&&window.location.assign(O7(t,window.location))},[t]);return v.jsx(nb,{open:o,children:v.jsx(Uy,{className:"max-w-lg text-center",onEscapeKeyDown:a=>a.preventDefault(),onInteractOutside:a=>a.preventDefault(),children:v.jsxs("div",{className:"flex flex-col items-center gap-6",children:[v.jsx(Kbe,{variant:"mark",className:"h-10 w-10"}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Vy,{className:"text-center text-2xl",children:"We moved Hatchet Cloud"}),v.jsxs(oR,{className:"text-center text-base text-muted-foreground",children:["Your dashboard now lives on"," ",v.jsx("a",{href:r,className:"text-primary underline-offset-4 hover:underline",children:n}),". ",v.jsx("br",{}),v.jsx("br",{})," We're making this change to unlock new features like multi-region support and improved performance."]})]}),v.jsx("div",{className:"flex w-full flex-col gap-2",children:v.jsx(wt,{className:"w-full",onClick:i,children:"Take me there →"})})]})})})}function Tr(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Zbe=["color"],R7=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,Zbe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Jbe=["color"],det=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,Jbe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),eSe=["color"],het=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,eSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),tSe=["color"],P7=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,tSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),nSe=["color"],rSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,nSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),oSe=["color"],iSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,oSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),aSe=["color"],iR=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,aSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),sSe=["color"],_L=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,sSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lSe=["color"],LQ=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,lSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),uSe=["color"],EL=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,uSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cSe=["color"],fSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,cSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dSe=["color"],hSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,dSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pSe=["color"],Qv=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,pSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mSe=["color"],gSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,mSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),vSe=["color"],ySe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,vSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wSe=["color"],xSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,wSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bSe=["color"],SSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,bSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_Se=["color"],ESe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,_Se);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),CSe=["color"],pet=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,CSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),OSe=["color"],met=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,OSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),RSe=["color"],$Q=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,RSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),PSe=["color"],TSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,PSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ASe=["color"],get=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,ASe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kSe=["color"],NSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,kSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),MSe=["color"],vet=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,MSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function aR(e){const t=e+"CollectionProvider",[n,r]=fs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:w,children:_}=y,C=J.useRef(null),O=J.useRef(new Map).current;return v.jsx(o,{scope:w,itemMap:O,collectionRef:C,children:_})};a.displayName=t;const s=e+"CollectionSlot",l=Kp(s),u=J.forwardRef((y,w)=>{const{scope:_,children:C}=y,O=i(s,_),P=Bn(w,O.collectionRef);return v.jsx(l,{ref:P,children:C})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",h=Kp(c),p=J.forwardRef((y,w)=>{const{scope:_,children:C,...O}=y,P=J.useRef(null),R=Bn(w,P),T=i(c,_);return J.useEffect(()=>(T.itemMap.set(P,{ref:P,...O}),()=>void T.itemMap.delete(P))),v.jsx(h,{[d]:"",ref:R,children:C})});p.displayName=c;function x(y){const w=i(e+"CollectionConsumer",y);return J.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const O=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((T,k)=>O.indexOf(T.ref.current)-O.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},x,r]}var CL="ToastProvider",[OL,jSe,ISe]=aR("Toast"),[FQ]=fs("Toast",[ISe]),[DSe,sR]=FQ(CL),BQ=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${CL}\`. Expected non-empty \`string\`.`),v.jsx(OL.Provider,{scope:t,children:v.jsx(DSe,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:b.useCallback(()=>c(p=>p+1),[]),onToastRemove:b.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};BQ.displayName=CL;var zQ="ToastViewport",LSe=["F8"],zI="toast.viewportPause",qI="toast.viewportResume",qQ=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=LSe,label:o="Notifications ({hotkey})",...i}=e,a=sR(zQ,n),s=jSe(n),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),h=Bn(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;b.useEffect(()=>{const w=_=>{var O;r.length!==0&&r.every(P=>_[P]||_.code===P)&&((O=d.current)==null||O.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),b.useEffect(()=>{const w=l.current,_=d.current;if(x&&w&&_){const C=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(zI);_.dispatchEvent(T),a.isClosePausedRef.current=!0}},O=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(qI);_.dispatchEvent(T),a.isClosePausedRef.current=!1}},P=T=>{!w.contains(T.relatedTarget)&&O()},R=()=>{w.contains(document.activeElement)||O()};return w.addEventListener("focusin",C),w.addEventListener("focusout",P),w.addEventListener("pointermove",C),w.addEventListener("pointerleave",R),window.addEventListener("blur",C),window.addEventListener("focus",O),()=>{w.removeEventListener("focusin",C),w.removeEventListener("focusout",P),w.removeEventListener("pointermove",C),w.removeEventListener("pointerleave",R),window.removeEventListener("blur",C),window.removeEventListener("focus",O)}}},[x,a.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:w})=>{const C=s().map(O=>{const P=O.ref.current,R=[P,...XSe(P)];return w==="forwards"?R:R.reverse()});return(w==="forwards"?C.reverse():C).flat()},[s]);return b.useEffect(()=>{const w=d.current;if(w){const _=C=>{var R,T,k;const O=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!O){const M=document.activeElement,j=C.shiftKey;if(C.target===w&&j){(R=u.current)==null||R.focus();return}const V=y({tabbingDirection:j?"backwards":"forwards"}),G=V.findIndex(D=>D===M);W2(V.slice(G+1))?C.preventDefault():j?(T=u.current)==null||T.focus():(k=c.current)==null||k.focus()}};return w.addEventListener("keydown",_),()=>w.removeEventListener("keydown",_)}},[s,y]),v.jsxs(mge,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&v.jsx(UI,{ref:u,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"forwards"});W2(w)}}),v.jsx(OL.Slot,{scope:n,children:v.jsx(Zt.ol,{tabIndex:-1,...i,ref:h})}),x&&v.jsx(UI,{ref:c,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"backwards"});W2(w)}})]})});qQ.displayName=zQ;var UQ="ToastFocusProxy",UI=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=sR(UQ,n);return v.jsx(qO,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const s=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(s))&&r()}})});UI.displayName=UQ;var ob="Toast",$Se="toast.swipeStart",FSe="toast.swipeMove",BSe="toast.swipeCancel",zSe="toast.swipeEnd",VQ=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=qs({prop:r,defaultProp:o??!0,onChange:i,caller:ob});return v.jsx(ji,{present:n||s,children:v.jsx(VSe,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Ji(e.onPause),onResume:Ji(e.onResume),onSwipeStart:Ze(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ze(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ze(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ze(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});VQ.displayName=ob;var[qSe,USe]=FQ(ob,{onClose(){}}),VSe=b.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...x}=e,y=sR(ob,n),[w,_]=b.useState(null),C=Bn(t,D=>_(D)),O=b.useRef(null),P=b.useRef(null),R=o||y.duration,T=b.useRef(0),k=b.useRef(R),M=b.useRef(0),{onToastAdd:j,onToastRemove:$}=y,L=Ji(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=y.viewport)==null||H.focus()),a()}),V=b.useCallback(D=>{!D||D===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(L,D))},[L]);b.useEffect(()=>{const D=y.viewport;if(D){const H=()=>{V(k.current),u==null||u()},U=()=>{const Y=new Date().getTime()-T.current;k.current=k.current-Y,window.clearTimeout(M.current),l==null||l()};return D.addEventListener(zI,U),D.addEventListener(qI,H),()=>{D.removeEventListener(zI,U),D.removeEventListener(qI,H)}}},[y.viewport,R,l,u,V]),b.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(R)},[i,R,y.isClosePausedRef,V]),b.useEffect(()=>(j(),()=>$()),[j,$]);const G=b.useMemo(()=>w?QQ(w):null,[w]);return y.viewport?v.jsxs(v.Fragment,{children:[G&&v.jsx(WSe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:G}),v.jsx(qSe,{scope:n,onClose:L,children:zs.createPortal(v.jsx(OL.ItemSlot,{scope:n,children:v.jsx(pge,{asChild:!0,onEscapeKeyDown:Ze(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||L(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Zt.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...x,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ze(e.onKeyDown,D=>{D.key==="Escape"&&(s==null||s(D.nativeEvent),D.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:Ze(e.onPointerDown,D=>{D.button===0&&(O.current={x:D.clientX,y:D.clientY})}),onPointerMove:Ze(e.onPointerMove,D=>{if(!O.current)return;const H=D.clientX-O.current.x,U=D.clientY-O.current.y,Y=!!P.current,q=["left","right"].includes(y.swipeDirection),W=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,K=q?W(0,H):0,z=q?0:W(0,U),X=D.pointerType==="touch"?10:2,ee={x:K,y:z},ae={originalEvent:D,delta:ee};Y?(P.current=ee,m_(FSe,d,ae,{discrete:!1})):T7(ee,y.swipeDirection,X)?(P.current=ee,m_($Se,c,ae,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(H)>X||Math.abs(U)>X)&&(O.current=null)}),onPointerUp:Ze(e.onPointerUp,D=>{const H=P.current,U=D.target;if(U.hasPointerCapture(D.pointerId)&&U.releasePointerCapture(D.pointerId),P.current=null,O.current=null,H){const Y=D.currentTarget,q={originalEvent:D,delta:H};T7(H,y.swipeDirection,y.swipeThreshold)?m_(zSe,p,q,{discrete:!0}):m_(BSe,h,q,{discrete:!0}),Y.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),WSe=e=>{const{__scopeToast:t,children:n,...r}=e,o=sR(ob,t),[i,a]=b.useState(!1),[s,l]=b.useState(!1);return KSe(()=>a(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:v.jsx(vm,{asChild:!0,children:v.jsx(qO,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},HSe="ToastTitle",WQ=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Zt.div,{...r,ref:t})});WQ.displayName=HSe;var GSe="ToastDescription",HQ=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Zt.div,{...r,ref:t})});HQ.displayName=GSe;var GQ="ToastAction",KQ=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(XQ,{altText:n,asChild:!0,children:v.jsx(RL,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${GQ}\`. Expected non-empty \`string\`.`),null)});KQ.displayName=GQ;var YQ="ToastClose",RL=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=USe(YQ,n);return v.jsx(XQ,{asChild:!0,children:v.jsx(Zt.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,o.onClose)})})});RL.displayName=YQ;var XQ=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(Zt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function QQ(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),YSe(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...QQ(r))}}),t}function m_(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?V3(o,i):o.dispatchEvent(i)}var T7=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function KSe(e=()=>{}){const t=Ji(e);ii(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function YSe(e){return e.nodeType===e.ELEMENT_NODE}function XSe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function W2(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var QSe=BQ,ZQ=qQ,JQ=VQ,eZ=WQ,tZ=HQ,nZ=KQ,rZ=RL;const ZSe=QSe,oZ=b.forwardRef(({className:e,...t},n)=>v.jsx(ZQ,{ref:n,className:je("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));oZ.displayName=ZQ.displayName;const JSe=Ul("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border-foreground bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),iZ=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx(JQ,{ref:r,className:je(JSe({variant:t}),e),...n}));iZ.displayName=JQ.displayName;const e_e=b.forwardRef(({className:e,...t},n)=>v.jsx(nZ,{ref:n,className:je("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));e_e.displayName=nZ.displayName;const aZ=b.forwardRef(({className:e,...t},n)=>v.jsx(rZ,{ref:n,className:je("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:v.jsx(Qv,{className:"h-4 w-4"})}));aZ.displayName=rZ.displayName;const sZ=b.forwardRef(({className:e,...t},n)=>v.jsx(eZ,{ref:n,className:je("text-sm font-semibold [&+div]:text-xs",e),...t}));sZ.displayName=eZ.displayName;const lZ=b.forwardRef(({className:e,...t},n)=>v.jsx(tZ,{ref:n,className:je("text-sm opacity-90",e),...t}));lZ.displayName=tZ.displayName;function uZ(){const{toasts:e}=dL();return v.jsxs(ZSe,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return v.jsxs(iZ,{...i,children:[v.jsxs("div",{className:"grid gap-1",children:[n&&v.jsx(sZ,{children:n}),r&&v.jsx(lZ,{children:r})]}),o,v.jsx(aZ,{})]},t)}),v.jsx(oZ,{})]})}const pw={off:{label:"Off",value:!1},"5s":{label:"5s",value:5e3},"10s":{label:"10s",value:1e4},"30s":{label:"30s",value:3e4},"1m":{label:"1m",value:6e4},"5m":{label:"5m",value:3e5}},cZ=b.createContext(null),t_e="app-default-refetch-interval",n_e=({children:e})=>{const{pathname:t}=By(),[n,r]=Xv(t_e,"10s"),[o,i]=Xv("app-refetch-interval-frozen",!1),a=b.useMemo(()=>pw[n],[n]),s=b.useMemo(()=>o?!1:a.value,[o,a]),l=b.useCallback(c=>{var h;const d=(h=Object.entries(pw).find(([,p])=>p.value===c.value))==null?void 0:h[0];d&&(r(d),i(!1))},[r,i]),u=b.useMemo(()=>({isFrozen:o,setIsFrozen:i,userRefetchIntervalPreference:a,refetchInterval:s,setRefetchInterval:l}),[s,l,o,i,a]);return b.useEffect(()=>{o&&i(!1)},[t]),v.jsx(cZ.Provider,{value:u,children:e})},vf=()=>{const e=b.useContext(cZ);if(!e)throw new Error("useRefetchInterval must be used within a RefetchIntervalProvider");return e};var r_e=b.createContext(void 0);function lR(e){const t=b.useContext(r_e);return e||t||"ltr"}var H2="rovingFocusGroup.onEntryFocus",o_e={bubbles:!1,cancelable:!0},ib="RovingFocusGroup",[VI,fZ,i_e]=aR(ib),[a_e,uR]=fs(ib,[i_e]),[s_e,l_e]=a_e(ib),dZ=b.forwardRef((e,t)=>v.jsx(VI.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(VI.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(u_e,{...e,ref:t})})}));dZ.displayName=ib;var u_e=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,h=b.useRef(null),p=Bn(t,h),x=lR(i),[y,w]=qs({prop:a,defaultProp:s??null,onChange:l,caller:ib}),[_,C]=b.useState(!1),O=Ji(u),P=fZ(n),R=b.useRef(!1),[T,k]=b.useState(0);return b.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(H2,O),()=>M.removeEventListener(H2,O)},[O]),v.jsx(s_e,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:y,onItemFocus:b.useCallback(M=>w(M),[w]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:b.useCallback(()=>k(M=>M-1),[]),children:v.jsx(Zt.div,{tabIndex:_||T===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Ze(e.onMouseDown,()=>{R.current=!0}),onFocus:Ze(e.onFocus,M=>{const j=!R.current;if(M.target===M.currentTarget&&j&&!_){const $=new CustomEvent(H2,o_e);if(M.currentTarget.dispatchEvent($),!$.defaultPrevented){const L=P().filter(U=>U.focusable),V=L.find(U=>U.active),G=L.find(U=>U.id===y),H=[V,G,...L].filter(Boolean).map(U=>U.ref.current);mZ(H,c)}}R.current=!1}),onBlur:Ze(e.onBlur,()=>C(!1))})})}),hZ="RovingFocusGroupItem",pZ=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=Pa(),u=i||l,c=l_e(hZ,n),d=c.currentTabStopId===u,h=fZ(n),{onFocusableItemAdd:p,onFocusableItemRemove:x,currentTabStopId:y}=c;return b.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),v.jsx(VI.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:v.jsx(Zt.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Ze(e.onMouseDown,w=>{r?c.onItemFocus(u):w.preventDefault()}),onFocus:Ze(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Ze(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const _=d_e(w,c.orientation,c.dir);if(_!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let O=h().filter(P=>P.focusable).map(P=>P.ref.current);if(_==="last")O.reverse();else if(_==="prev"||_==="next"){_==="prev"&&O.reverse();const P=O.indexOf(w.currentTarget);O=c.loop?h_e(O,P+1):O.slice(P+1)}setTimeout(()=>mZ(O))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:y!=null}):a})})});pZ.displayName=hZ;var c_e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f_e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d_e(e,t,n){const r=f_e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return c_e[r]}function mZ(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function h_e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gZ=dZ,vZ=pZ,WI=["Enter"," "],p_e=["ArrowDown","PageUp","Home"],yZ=["ArrowUp","PageDown","End"],m_e=[...p_e,...yZ],g_e={ltr:[...WI,"ArrowRight"],rtl:[...WI,"ArrowLeft"]},v_e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ab="Menu",[$w,y_e,w_e]=aR(ab),[ym,wZ]=fs(ab,[w_e,nc,uR]),sb=nc(),xZ=uR(),[bZ,Jd]=ym(ab),[x_e,lb]=ym(ab),SZ=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=sb(t),[l,u]=b.useState(null),c=b.useRef(!1),d=Ji(i),h=lR(o);return b.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),v.jsx($y,{...s,children:v.jsx(bZ,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:v.jsx(x_e,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};SZ.displayName=ab;var b_e="MenuAnchor",PL=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=sb(n);return v.jsx(Fy,{...o,...r,ref:t})});PL.displayName=b_e;var TL="MenuPortal",[S_e,_Z]=ym(TL,{forceMount:void 0}),EZ=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Jd(TL,t);return v.jsx(S_e,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(vm,{asChild:!0,container:o,children:r})})})};EZ.displayName=TL;var $s="MenuContent",[__e,AL]=ym($s),CZ=b.forwardRef((e,t)=>{const n=_Z($s,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Jd($s,e.__scopeMenu),a=lb($s,e.__scopeMenu);return v.jsx($w.Provider,{scope:e.__scopeMenu,children:v.jsx(ji,{present:r||i.open,children:v.jsx($w.Slot,{scope:e.__scopeMenu,children:a.modal?v.jsx(E_e,{...o,ref:t}):v.jsx(C_e,{...o,ref:t})})})})}),E_e=b.forwardRef((e,t)=>{const n=Jd($s,e.__scopeMenu),r=b.useRef(null),o=Bn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return tb(i)},[]),v.jsx(kL,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ze(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),C_e=b.forwardRef((e,t)=>{const n=Jd($s,e.__scopeMenu);return v.jsx(kL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),O_e=Kp("MenuContent.ScrollLock"),kL=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:x,...y}=e,w=Jd($s,n),_=lb($s,n),C=sb(n),O=xZ(n),P=y_e(n),[R,T]=b.useState(null),k=b.useRef(null),M=Bn(t,k,w.onContentChange),j=b.useRef(0),$=b.useRef(""),L=b.useRef(0),V=b.useRef(null),G=b.useRef("right"),D=b.useRef(0),H=x?eb:b.Fragment,U=x?{as:O_e,allowPinchZoom:!0}:void 0,Y=W=>{var ge,he;const K=$.current+W,z=P().filter(ue=>!ue.disabled),X=document.activeElement,ee=(ge=z.find(ue=>ue.ref.current===X))==null?void 0:ge.textValue,ae=z.map(ue=>ue.textValue),fe=$_e(ae,K,ee),ie=(he=z.find(ue=>ue.textValue===fe))==null?void 0:he.ref.current;(function ue(we){$.current=we,window.clearTimeout(j.current),we!==""&&(j.current=window.setTimeout(()=>ue(""),1e3))})(K),ie&&setTimeout(()=>ie.focus())};b.useEffect(()=>()=>window.clearTimeout(j.current),[]),tR();const q=b.useCallback(W=>{var z,X;return G.current===((z=V.current)==null?void 0:z.side)&&B_e(W,(X=V.current)==null?void 0:X.area)},[]);return v.jsx(__e,{scope:n,searchRef:$,onItemEnter:b.useCallback(W=>{q(W)&&W.preventDefault()},[q]),onItemLeave:b.useCallback(W=>{var K;q(W)||((K=k.current)==null||K.focus(),T(null))},[q]),onTriggerLeave:b.useCallback(W=>{q(W)&&W.preventDefault()},[q]),pointerGraceTimerRef:L,onPointerGraceIntentChange:b.useCallback(W=>{V.current=W},[]),children:v.jsx(H,{...U,children:v.jsx(Jx,{asChild:!0,trapped:o,onMountAutoFocus:Ze(i,W=>{var K;W.preventDefault(),(K=k.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:v.jsx(Zd,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:v.jsx(gZ,{asChild:!0,...O,dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:T,onEntryFocus:Ze(l,W=>{_.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(Yx,{role:"menu","aria-orientation":"vertical","data-state":qZ(w.open),"data-radix-menu-content":"",dir:_.dir,...C,...y,ref:M,style:{outline:"none",...y.style},onKeyDown:Ze(y.onKeyDown,W=>{const z=W.target.closest("[data-radix-menu-content]")===W.currentTarget,X=W.ctrlKey||W.altKey||W.metaKey,ee=W.key.length===1;z&&(W.key==="Tab"&&W.preventDefault(),!X&&ee&&Y(W.key));const ae=k.current;if(W.target!==ae||!m_e.includes(W.key))return;W.preventDefault();const ie=P().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);yZ.includes(W.key)&&ie.reverse(),D_e(ie)}),onBlur:Ze(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(j.current),$.current="")}),onPointerMove:Ze(e.onPointerMove,Fw(W=>{const K=W.target,z=D.current!==W.clientX;if(W.currentTarget.contains(K)&&z){const X=W.clientX>D.current?"right":"left";G.current=X,D.current=W.clientX}}))})})})})})})});CZ.displayName=$s;var R_e="MenuGroup",NL=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Zt.div,{role:"group",...r,ref:t})});NL.displayName=R_e;var P_e="MenuLabel",OZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Zt.div,{...r,ref:t})});OZ.displayName=P_e;var $E="MenuItem",A7="menu.itemSelect",cR=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=b.useRef(null),a=lb($E,e.__scopeMenu),s=AL($E,e.__scopeMenu),l=Bn(t,i),u=b.useRef(!1),c=()=>{const d=i.current;if(!n&&d){const h=new CustomEvent(A7,{bubbles:!0,cancelable:!0});d.addEventListener(A7,p=>r==null?void 0:r(p),{once:!0}),V3(d,h),h.defaultPrevented?u.current=!1:a.onClose()}};return v.jsx(RZ,{...o,ref:l,disabled:n,onClick:Ze(e.onClick,c),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:Ze(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:Ze(e.onKeyDown,d=>{const h=s.searchRef.current!=="";n||h&&d.key===" "||WI.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});cR.displayName=$E;var RZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=AL($E,n),s=xZ(n),l=b.useRef(null),u=Bn(t,l),[c,d]=b.useState(!1),[h,p]=b.useState("");return b.useEffect(()=>{const x=l.current;x&&p((x.textContent??"").trim())},[i.children]),v.jsx($w.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:v.jsx(vZ,{asChild:!0,...s,focusable:!r,children:v.jsx(Zt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Ze(e.onPointerMove,Fw(x=>{r?a.onItemLeave(x):(a.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ze(e.onPointerLeave,Fw(x=>a.onItemLeave(x))),onFocus:Ze(e.onFocus,()=>d(!0)),onBlur:Ze(e.onBlur,()=>d(!1))})})})}),T_e="MenuCheckboxItem",PZ=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.jsx(MZ,{scope:e.__scopeMenu,checked:n,children:v.jsx(cR,{role:"menuitemcheckbox","aria-checked":FE(n)?"mixed":n,...o,ref:t,"data-state":IL(n),onSelect:Ze(o.onSelect,()=>r==null?void 0:r(FE(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PZ.displayName=T_e;var TZ="MenuRadioGroup",[A_e,k_e]=ym(TZ,{value:void 0,onValueChange:()=>{}}),AZ=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ji(r);return v.jsx(A_e,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx(NL,{...o,ref:t})})});AZ.displayName=TZ;var kZ="MenuRadioItem",NZ=b.forwardRef((e,t)=>{const{value:n,...r}=e,o=k_e(kZ,e.__scopeMenu),i=n===o.value;return v.jsx(MZ,{scope:e.__scopeMenu,checked:i,children:v.jsx(cR,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":IL(i),onSelect:Ze(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});NZ.displayName=kZ;var ML="MenuItemIndicator",[MZ,N_e]=ym(ML,{checked:!1}),jZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=N_e(ML,n);return v.jsx(ji,{present:r||FE(i.checked)||i.checked===!0,children:v.jsx(Zt.span,{...o,ref:t,"data-state":IL(i.checked)})})});jZ.displayName=ML;var M_e="MenuSeparator",IZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Zt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});IZ.displayName=M_e;var j_e="MenuArrow",DZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=sb(n);return v.jsx(Xx,{...o,...r,ref:t})});DZ.displayName=j_e;var jL="MenuSub",[I_e,LZ]=ym(jL),$Z=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=Jd(jL,t),a=sb(t),[s,l]=b.useState(null),[u,c]=b.useState(null),d=Ji(o);return b.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),v.jsx($y,{...a,children:v.jsx(bZ,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:v.jsx(I_e,{scope:t,contentId:Pa(),triggerId:Pa(),trigger:s,onTriggerChange:l,children:n})})})};$Z.displayName=jL;var X1="MenuSubTrigger",FZ=b.forwardRef((e,t)=>{const n=Jd(X1,e.__scopeMenu),r=lb(X1,e.__scopeMenu),o=LZ(X1,e.__scopeMenu),i=AL(X1,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},c=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>c,[c]),b.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),v.jsx(PL,{asChild:!0,...u,children:v.jsx(RZ,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qZ(n.open),...e,ref:Gx(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ze(e.onPointerMove,Fw(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ze(e.onPointerLeave,Fw(d=>{var p,x;c();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const y=(x=n.content)==null?void 0:x.dataset.side,w=y==="right",_=w?-5:5,C=h[w?"left":"right"],O=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+_,y:d.clientY},{x:C,y:h.top},{x:O,y:h.top},{x:O,y:h.bottom},{x:C,y:h.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Ze(e.onKeyDown,d=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&d.key===" "||g_e[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});FZ.displayName=X1;var BZ="MenuSubContent",zZ=b.forwardRef((e,t)=>{const n=_Z($s,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Jd($s,e.__scopeMenu),a=lb($s,e.__scopeMenu),s=LZ(BZ,e.__scopeMenu),l=b.useRef(null),u=Bn(t,l);return v.jsx($w.Provider,{scope:e.__scopeMenu,children:v.jsx(ji,{present:r||i.open,children:v.jsx($w.Slot,{scope:e.__scopeMenu,children:v.jsx(kL,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;a.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ze(e.onFocusOutside,c=>{c.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Ze(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ze(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),h=v_e[a.dir].includes(c.key);d&&h&&(i.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});zZ.displayName=BZ;function qZ(e){return e?"open":"closed"}function FE(e){return e==="indeterminate"}function IL(e){return FE(e)?"indeterminate":e?"checked":"unchecked"}function D_e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function L_e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $_e(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=L_e(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function F_e(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;ir!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}function B_e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return F_e(n,t)}function Fw(e){return t=>t.pointerType==="mouse"?e(t):void 0}var z_e=SZ,q_e=PL,U_e=EZ,V_e=CZ,W_e=NL,H_e=OZ,G_e=cR,K_e=PZ,Y_e=AZ,X_e=NZ,Q_e=jZ,Z_e=IZ,J_e=DZ,eEe=$Z,tEe=FZ,nEe=zZ,fR="DropdownMenu",[rEe]=fs(fR,[wZ]),Ii=wZ(),[oEe,UZ]=rEe(fR),VZ=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=Ii(t),u=b.useRef(null),[c,d]=qs({prop:o,defaultProp:i??!1,onChange:a,caller:fR});return v.jsx(oEe,{scope:t,triggerId:Pa(),triggerRef:u,contentId:Pa(),open:c,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),modal:s,children:v.jsx(z_e,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};VZ.displayName=fR;var WZ="DropdownMenuTrigger",HZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=UZ(WZ,n),a=Ii(n);return v.jsx(q_e,{asChild:!0,...a,children:v.jsx(Zt.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Gx(t,i.triggerRef),onPointerDown:Ze(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:Ze(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});HZ.displayName=WZ;var iEe="DropdownMenuPortal",GZ=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ii(t);return v.jsx(U_e,{...r,...n})};GZ.displayName=iEe;var KZ="DropdownMenuContent",YZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=UZ(KZ,n),i=Ii(n),a=b.useRef(!1);return v.jsx(V_e,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:Ze(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)==null||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ze(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!o.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});YZ.displayName=KZ;var aEe="DropdownMenuGroup",sEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(W_e,{...o,...r,ref:t})});sEe.displayName=aEe;var lEe="DropdownMenuLabel",XZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(H_e,{...o,...r,ref:t})});XZ.displayName=lEe;var uEe="DropdownMenuItem",QZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(G_e,{...o,...r,ref:t})});QZ.displayName=uEe;var cEe="DropdownMenuCheckboxItem",ZZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(K_e,{...o,...r,ref:t})});ZZ.displayName=cEe;var fEe="DropdownMenuRadioGroup",dEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(Y_e,{...o,...r,ref:t})});dEe.displayName=fEe;var hEe="DropdownMenuRadioItem",JZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(X_e,{...o,...r,ref:t})});JZ.displayName=hEe;var pEe="DropdownMenuItemIndicator",eJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(Q_e,{...o,...r,ref:t})});eJ.displayName=pEe;var mEe="DropdownMenuSeparator",tJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(Z_e,{...o,...r,ref:t})});tJ.displayName=mEe;var gEe="DropdownMenuArrow",vEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(J_e,{...o,...r,ref:t})});vEe.displayName=gEe;var yEe=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Ii(t),[s,l]=qs({prop:r,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return v.jsx(eEe,{...a,open:s,onOpenChange:l,children:n})},wEe="DropdownMenuSubTrigger",nJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(tEe,{...o,...r,ref:t})});nJ.displayName=wEe;var xEe="DropdownMenuSubContent",rJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(nEe,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rJ.displayName=xEe;var bEe=VZ,SEe=HZ,_Ee=GZ,oJ=YZ,iJ=XZ,aJ=QZ,sJ=ZZ,lJ=JZ,uJ=eJ,cJ=tJ,EEe=yEe,fJ=nJ,dJ=rJ;const DL=bEe,LL=SEe,yet=EEe,CEe=b.forwardRef(({className:e,inset:t,children:n,...r},o)=>v.jsxs(fJ,{ref:o,className:je("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,v.jsx(EL,{className:"ml-auto h-4 w-4"})]}));CEe.displayName=fJ.displayName;const OEe=b.forwardRef(({className:e,...t},n)=>v.jsx(dJ,{ref:n,className:je("z-[300] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));OEe.displayName=dJ.displayName;const REe=Ul("min-w-[8rem] overflow-hidden rounded-md border p-1 text-popover-foreground shadow-md",{variants:{variant:{default:"z-[300] bg-popover",sidebar:"z-[300] bg-secondary text-secondary-foreground shadow-lg pointer-events-auto"}},defaultVariants:{variant:"default"}}),dR=b.forwardRef(({className:e,sideOffset:t=4,variant:n,...r},o)=>v.jsx(_Ee,{children:v.jsx(oJ,{ref:o,sideOffset:t,className:je(REe({variant:n}),"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));dR.displayName=oJ.displayName;const PEe=Ul("relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"cursor-default focus:bg-accent focus:text-accent-foreground",interactive:"cursor-pointer hover:bg-primary/10 focus:bg-primary/10 focus:text-accent-foreground",static:"cursor-default hover:bg-transparent focus:bg-transparent"}},defaultVariants:{variant:"default"}}),mw=b.forwardRef(({className:e,inset:t,variant:n,...r},o)=>v.jsx(aJ,{ref:o,className:je(PEe({variant:n}),t&&"pl-8",e),...r}));mw.displayName=aJ.displayName;const TEe=b.forwardRef(({className:e,children:t,checked:n,...r},o)=>v.jsxs(sJ,{ref:o,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(uJ,{children:v.jsx(iR,{className:"h-4 w-4"})})}),t]}));TEe.displayName=sJ.displayName;const AEe=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(lJ,{ref:r,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(uJ,{children:v.jsx(gSe,{className:"h-4 w-4 fill-current"})})}),t]}));AEe.displayName=lJ.displayName;const kEe=b.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(iJ,{ref:r,className:je("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));kEe.displayName=iJ.displayName;const hJ=b.forwardRef(({className:e,...t},n)=>v.jsx(cJ,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));hJ.displayName=cJ.displayName;const NEe=({className:e,...t})=>v.jsx("span",{className:je("ml-auto text-xs tracking-widest opacity-60",e),...t});NEe.displayName="DropdownMenuShortcut";function Dr({column:e,title:t,className:n}){return e.getCanSort()?v.jsx("div",{className:je("flex items-center space-x-2",n),children:v.jsxs(DL,{children:[v.jsx(LL,{asChild:!0,children:v.jsx(wt,{variant:"ghost",size:"sm",className:"data-[state=open]:bg-accent",rightIcon:e.getIsSorted()==="desc"?v.jsx(R7,{className:"size-4"}):e.getIsSorted()==="asc"?v.jsx(P7,{className:"size-4"}):v.jsx(iSe,{className:"size-4"}),children:v.jsx("span",{children:t})})}),v.jsxs(dR,{align:"start",children:[v.jsxs(mw,{onClick:()=>e.toggleSorting(!1),children:[v.jsx(P7,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Asc"]}),v.jsxs(mw,{onClick:()=>e.toggleSorting(!0),children:[v.jsx(R7,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Desc"]}),v.jsx(hJ,{}),v.jsxs(mw,{onClick:()=>e.toggleVisibility(!1),children:[v.jsx(ESe,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Hide"]})]})]})}):v.jsx("div",{className:je(n,"text-xs"),children:t})}const pJ=({text:e,className:t,withText:n,onCopy:r})=>{const[o,i]=b.useState(!1);return v.jsxs(wt,{className:je(t,n?"mt-2 flex cursor-pointer flex-row items-center gap-2":"h-6 w-6 cursor-pointer p-0"),variant:n?"default":"ghost",onClick:()=>{navigator.clipboard.writeText(e),i(!0),r&&r(),setTimeout(()=>{i(!1)},2e3)},children:[o?v.jsx(Oxe,{className:"h-4 w-4"}):v.jsx(hSe,{className:"h-4 w-4"}),n&&(o?"Copied":"Copy to clipboard")]})};function MEe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jEe(e,t){if(e==null)return{};var n,r,o=MEe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);n=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var G2={};function qEe(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return G2[t]||(G2[t]=zEe(e)),G2[t]}function UEe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(i){return i!=="token"}),o=qEe(r);return o.reduce(function(i,a){return uv(uv({},i),n[a])},t)}function N7(e){return e.join(" ")}function VEe(e,t){var n=0;return function(r){return n+=1,r.map(function(o,i){return gJ({node:o,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function gJ(e){var t=e.node,n=e.stylesheet,r=e.style,o=r===void 0?{}:r,i=e.useInlineStyles,a=e.key,s=t.properties,l=t.type,u=t.tagName,c=t.value;if(l==="text")return c;if(u){var d=VEe(n,i),h;if(!i)h=uv(uv({},s),{},{className:N7(s.className)});else{var p=Object.keys(n).reduce(function(_,C){return C.split(".").forEach(function(O){_.includes(O)||_.push(O)}),_},[]),x=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&x.concat(s.className.filter(function(_){return!p.includes(_)}));h=uv(uv({},s),{},{className:N7(y)||void 0,style:UEe(s.className,Object.assign({},s.style,o),n)})}var w=d(t.children);return J.createElement(u,Ni({key:a},h),w)}}const WEe=(function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1});var HEe=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function M7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kd(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=0;r2&&arguments[2]!==void 0?arguments[2]:[];return lE({children:R,lineNumber:T,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:o,lineProps:n,className:k,showLineNumbers:r,wrapLongLines:l,wrapLines:t})}function y(R,T){if(r&&T&&o){var k=yJ(s,T,a);R.unshift(vJ(T,k))}return R}function w(R,T){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||k.length>0?x(R,T,k):y(R,T)}for(var _=function(){var T=c[p],k=T.children[0].value,M=KEe(k);if(M){var j=k.split(` +`);j.forEach(function($,L){var V=r&&d.length+i,G={type:"text",value:"".concat($,` +`)};if(L===0){var D=c.slice(h+1,p).concat(lE({children:[G],className:T.properties.className})),H=w(D,V);d.push(H)}else if(L===j.length-1){var U=c[p+1]&&c[p+1].children&&c[p+1].children[0],Y={type:"text",value:"".concat($)};if(U){var q=lE({children:[Y],className:T.properties.className});c.splice(p+1,0,q)}else{var W=[Y],K=w(W,V,T.properties.className);d.push(K)}}else{var z=[G],X=w(z,V,T.properties.className);d.push(X)}}),h=p}p++};p/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(me,...Te){const De=Object.create(null);for(const Fe in me)De[Fe]=me[Fe];return Te.forEach(function(Fe){for(const Vt in Fe)De[Vt]=Fe[Vt]}),De}const a="",s=me=>!!me.kind;class l{constructor(Te,De){this.buffer="",this.classPrefix=De.classPrefix,Te.walk(this)}addText(Te){this.buffer+=o(Te)}openNode(Te){if(!s(Te))return;let De=Te.kind;Te.sublanguage||(De=`${this.classPrefix}${De}`),this.span(De)}closeNode(Te){s(Te)&&(this.buffer+=a)}value(){return this.buffer}span(Te){this.buffer+=``}}class u{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Te){this.top.children.push(Te)}openNode(Te){const De={kind:Te,children:[]};this.add(De),this.stack.push(De)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Te){return this.constructor._walk(Te,this.rootNode)}static _walk(Te,De){return typeof De=="string"?Te.addText(De):De.children&&(Te.openNode(De),De.children.forEach(Fe=>this._walk(Te,Fe)),Te.closeNode(De)),Te}static _collapse(Te){typeof Te!="string"&&Te.children&&(Te.children.every(De=>typeof De=="string")?Te.children=[Te.children.join("")]:Te.children.forEach(De=>{u._collapse(De)}))}}class c extends u{constructor(Te){super(),this.options=Te}addKeyword(Te,De){Te!==""&&(this.openNode(De),this.addText(Te),this.closeNode())}addText(Te){Te!==""&&this.add(Te)}addSublanguage(Te,De){const Fe=Te.root;Fe.kind=De,Fe.sublanguage=!0,this.add(Fe)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(me){return new RegExp(me.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function h(me){return me?typeof me=="string"?me:me.source:null}function p(...me){return me.map(De=>h(De)).join("")}function x(...me){return"("+me.map(De=>h(De)).join("|")+")"}function y(me){return new RegExp(me.toString()+"|").exec("").length-1}function w(me,Te){const De=me&&me.exec(Te);return De&&De.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(me,Te="|"){let De=0;return me.map(Fe=>{De+=1;const Vt=De;let Ut=h(Fe),bn="";for(;Ut.length>0;){const it=_.exec(Ut);if(!it){bn+=Ut;break}bn+=Ut.substring(0,it.index),Ut=Ut.substring(it.index+it[0].length),it[0][0]==="\\"&&it[1]?bn+="\\"+String(Number(it[1])+Vt):(bn+=it[0],it[0]==="("&&De++)}return bn}).map(Fe=>`(${Fe})`).join(Te)}const O=/\b\B/,P="[a-zA-Z]\\w*",R="[a-zA-Z_]\\w*",T="\\b\\d+(\\.\\d+)?",k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",M="\\b(0b[01]+)",j="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$=(me={})=>{const Te=/^#![ ]*\//;return me.binary&&(me.begin=p(Te,/.*\b/,me.binary,/\b.*/)),i({className:"meta",begin:Te,end:/$/,relevance:0,"on:begin":(De,Fe)=>{De.index!==0&&Fe.ignoreMatch()}},me)},L={begin:"\\\\[\\s\\S]",relevance:0},V={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[L]},G={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[L]},D={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},H=function(me,Te,De={}){const Fe=i({className:"comment",begin:me,end:Te,contains:[]},De);return Fe.contains.push(D),Fe.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),Fe},U=H("//","$"),Y=H("/\\*","\\*/"),q=H("#","$"),W={className:"number",begin:T,relevance:0},K={className:"number",begin:k,relevance:0},z={className:"number",begin:M,relevance:0},X={className:"number",begin:T+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},ee={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[L,{begin:/\[/,end:/\]/,relevance:0,contains:[L]}]}]},ae={className:"title",begin:P,relevance:0},fe={className:"title",begin:R,relevance:0},ie={begin:"\\.\\s*"+R,relevance:0};var he=Object.freeze({__proto__:null,MATCH_NOTHING_RE:O,IDENT_RE:P,UNDERSCORE_IDENT_RE:R,NUMBER_RE:T,C_NUMBER_RE:k,BINARY_NUMBER_RE:M,RE_STARTERS_RE:j,SHEBANG:$,BACKSLASH_ESCAPE:L,APOS_STRING_MODE:V,QUOTE_STRING_MODE:G,PHRASAL_WORDS_MODE:D,COMMENT:H,C_LINE_COMMENT_MODE:U,C_BLOCK_COMMENT_MODE:Y,HASH_COMMENT_MODE:q,NUMBER_MODE:W,C_NUMBER_MODE:K,BINARY_NUMBER_MODE:z,CSS_NUMBER_MODE:X,REGEXP_MODE:ee,TITLE_MODE:ae,UNDERSCORE_TITLE_MODE:fe,METHOD_GUARD:ie,END_SAME_AS_BEGIN:function(me){return Object.assign(me,{"on:begin":(Te,De)=>{De.data._beginMatch=Te[1]},"on:end":(Te,De)=>{De.data._beginMatch!==Te[1]&&De.ignoreMatch()}})}});function ue(me,Te){me.input[me.index-1]==="."&&Te.ignoreMatch()}function we(me,Te){Te&&me.beginKeywords&&(me.begin="\\b("+me.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",me.__beforeBegin=ue,me.keywords=me.keywords||me.beginKeywords,delete me.beginKeywords,me.relevance===void 0&&(me.relevance=0))}function Ae(me,Te){Array.isArray(me.illegal)&&(me.illegal=x(...me.illegal))}function ye(me,Te){if(me.match){if(me.begin||me.end)throw new Error("begin & end are not supported with match");me.begin=me.match,delete me.match}}function Xe(me,Te){me.relevance===void 0&&(me.relevance=1)}const We=["of","and","for","in","not","or","if","then","parent","list","value"],et="keyword";function ft(me,Te,De=et){const Fe={};return typeof me=="string"?Vt(De,me.split(" ")):Array.isArray(me)?Vt(De,me):Object.keys(me).forEach(function(Ut){Object.assign(Fe,ft(me[Ut],Te,Ut))}),Fe;function Vt(Ut,bn){Te&&(bn=bn.map(it=>it.toLowerCase())),bn.forEach(function(it){const gt=it.split("|");Fe[gt[0]]=[Ut,st(gt[0],gt[1])]})}}function st(me,Te){return Te?Number(Te):Ge(me)?0:1}function Ge(me){return We.includes(me.toLowerCase())}function Kt(me,{plugins:Te}){function De(it,gt){return new RegExp(h(it),"m"+(me.case_insensitive?"i":"")+(gt?"g":""))}class Fe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(gt,Dt){Dt.position=this.position++,this.matchIndexes[this.matchAt]=Dt,this.regexes.push([Dt,gt]),this.matchAt+=y(gt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const gt=this.regexes.map(Dt=>Dt[1]);this.matcherRe=De(C(gt),!0),this.lastIndex=0}exec(gt){this.matcherRe.lastIndex=this.lastIndex;const Dt=this.matcherRe.exec(gt);if(!Dt)return null;const kt=Dt.findIndex((Yr,ta)=>ta>0&&Yr!==void 0),Zn=this.matchIndexes[kt];return Dt.splice(0,kt),Object.assign(Dt,Zn)}}class Vt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(gt){if(this.multiRegexes[gt])return this.multiRegexes[gt];const Dt=new Fe;return this.rules.slice(gt).forEach(([kt,Zn])=>Dt.addRule(kt,Zn)),Dt.compile(),this.multiRegexes[gt]=Dt,Dt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(gt,Dt){this.rules.push([gt,Dt]),Dt.type==="begin"&&this.count++}exec(gt){const Dt=this.getMatcher(this.regexIndex);Dt.lastIndex=this.lastIndex;let kt=Dt.exec(gt);if(this.resumingScanAtSamePosition()&&!(kt&&kt.index===this.lastIndex)){const Zn=this.getMatcher(0);Zn.lastIndex=this.lastIndex+1,kt=Zn.exec(gt)}return kt&&(this.regexIndex+=kt.position+1,this.regexIndex===this.count&&this.considerAll()),kt}}function Ut(it){const gt=new Vt;return it.contains.forEach(Dt=>gt.addRule(Dt.begin,{rule:Dt,type:"begin"})),it.terminatorEnd&>.addRule(it.terminatorEnd,{type:"end"}),it.illegal&>.addRule(it.illegal,{type:"illegal"}),gt}function bn(it,gt){const Dt=it;if(it.isCompiled)return Dt;[ye].forEach(Zn=>Zn(it,gt)),me.compilerExtensions.forEach(Zn=>Zn(it,gt)),it.__beforeBegin=null,[we,Ae,Xe].forEach(Zn=>Zn(it,gt)),it.isCompiled=!0;let kt=null;if(typeof it.keywords=="object"&&(kt=it.keywords.$pattern,delete it.keywords.$pattern),it.keywords&&(it.keywords=ft(it.keywords,me.case_insensitive)),it.lexemes&&kt)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return kt=kt||it.lexemes||/\w+/,Dt.keywordPatternRe=De(kt,!0),gt&&(it.begin||(it.begin=/\B|\b/),Dt.beginRe=De(it.begin),it.endSameAsBegin&&(it.end=it.begin),!it.end&&!it.endsWithParent&&(it.end=/\B|\b/),it.end&&(Dt.endRe=De(it.end)),Dt.terminatorEnd=h(it.end)||"",it.endsWithParent&>.terminatorEnd&&(Dt.terminatorEnd+=(it.end?"|":"")+gt.terminatorEnd)),it.illegal&&(Dt.illegalRe=De(it.illegal)),it.contains||(it.contains=[]),it.contains=[].concat(...it.contains.map(function(Zn){return un(Zn==="self"?it:Zn)})),it.contains.forEach(function(Zn){bn(Zn,Dt)}),it.starts&&bn(it.starts,gt),Dt.matcher=Ut(Dt),Dt}if(me.compilerExtensions||(me.compilerExtensions=[]),me.contains&&me.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return me.classNameAliases=i(me.classNameAliases||{}),bn(me)}function gn(me){return me?me.endsWithParent||gn(me.starts):!1}function un(me){return me.variants&&!me.cachedVariants&&(me.cachedVariants=me.variants.map(function(Te){return i(me,{variants:null},Te)})),me.cachedVariants?me.cachedVariants:gn(me)?i(me,{starts:me.starts?i(me.starts):null}):Object.isFrozen(me)?i(me):me}var on="10.7.3";function oe(me){return!!(me||me==="")}function de(me){const Te={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!me.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let Fe={};return this.autoDetect?(Fe=me.highlightAuto(this.code),this.detectedLanguage=Fe.language):(Fe=me.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),Fe.value},autoDetect(){return!this.language||oe(this.autodetect)},ignoreIllegals(){return!0}},render(Fe){return Fe("pre",{},[Fe("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:Te,VuePlugin:{install(Fe){Fe.component("highlightjs",Te)}}}}const Se={"after:highlightElement":({el:me,result:Te,text:De})=>{const Fe=Ye(me);if(!Fe.length)return;const Vt=document.createElement("div");Vt.innerHTML=Te.value,Te.value=He(Fe,Ye(Vt),De)}};function Ve(me){return me.nodeName.toLowerCase()}function Ye(me){const Te=[];return(function De(Fe,Vt){for(let Ut=Fe.firstChild;Ut;Ut=Ut.nextSibling)Ut.nodeType===3?Vt+=Ut.nodeValue.length:Ut.nodeType===1&&(Te.push({event:"start",offset:Vt,node:Ut}),Vt=De(Ut,Vt),Ve(Ut).match(/br|hr|img|input/)||Te.push({event:"stop",offset:Vt,node:Ut}));return Vt})(me,0),Te}function He(me,Te,De){let Fe=0,Vt="";const Ut=[];function bn(){return!me.length||!Te.length?me.length?me:Te:me[0].offset!==Te[0].offset?me[0].offset"}function gt(kt){Vt+=""}function Dt(kt){(kt.event==="start"?it:gt)(kt.node)}for(;me.length||Te.length;){let kt=bn();if(Vt+=o(De.substring(Fe,kt[0].offset)),Fe=kt[0].offset,kt===me){Ut.reverse().forEach(gt);do Dt(kt.splice(0,1)[0]),kt=bn();while(kt===me&&kt.length&&kt[0].offset===Fe);Ut.reverse().forEach(it)}else kt[0].event==="start"?Ut.push(kt[0].node):Ut.pop(),Dt(kt.splice(0,1)[0])}return Vt+o(De.substr(Fe))}const tt={},Tt=me=>{console.error(me)},Ot=(me,...Te)=>{console.log(`WARN: ${me}`,...Te)},an=(me,Te)=>{tt[`${me}/${Te}`]||(console.log(`Deprecated as of ${me}. ${Te}`),tt[`${me}/${Te}`]=!0)},tr=o,$n=i,Mr=Symbol("nomatch");var Ce=function(me){const Te=Object.create(null),De=Object.create(null),Fe=[];let Vt=!0;const Ut=/(^(<[^>]+>|\t|)+|\n)/gm,bn="Could not find the language '{}', did you forget to load/include a language module?",it={disableAutodetect:!0,name:"Plain text",contains:[]};let gt={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:c};function Dt(qe){return gt.noHighlightRe.test(qe)}function kt(qe){let mt=qe.className+" ";mt+=qe.parentNode?qe.parentNode.className:"";const tn=gt.languageDetectRe.exec(mt);if(tn){const Wn=li(tn[1]);return Wn||(Ot(bn.replace("{}",tn[1])),Ot("Falling back to no-highlight mode for this block.",qe)),Wn?tn[1]:"no-highlight"}return mt.split(/\s+/).find(Wn=>Dt(Wn)||li(Wn))}function Zn(qe,mt,tn,Wn){let Jn="",nl="";typeof mt=="object"?(Jn=qe,tn=mt.ignoreIllegals,nl=mt.language,Wn=void 0):(an("10.7.0","highlight(lang, code, ...args) has been deprecated."),an("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),nl=qe,Jn=mt);const Li={code:Jn,language:nl};tl("before:highlight",Li);const $i=Li.result?Li.result:Yr(Li.language,Li.code,tn,Wn);return $i.code=Li.code,tl("after:highlight",$i),$i}function Yr(qe,mt,tn,Wn){function Jn(_t,It){const nn=Ba.case_insensitive?It[0].toLowerCase():It[0];return Object.prototype.hasOwnProperty.call(_t.keywords,nn)&&_t.keywords[nn]}function nl(){if(!dn.keywords){Fr.addText(ir);return}let _t=0;dn.keywordPatternRe.lastIndex=0;let It=dn.keywordPatternRe.exec(ir),nn="";for(;It;){nn+=ir.substring(_t,It.index);const _n=Jn(dn,It);if(_n){const[Rr,ms]=_n;if(Fr.addText(nn),nn="",ol+=ms,Rr.startsWith("_"))nn+=It[0];else{const Jl=Ba.classNameAliases[Rr]||Rr;Fr.addKeyword(It[0],Jl)}}else nn+=It[0];_t=dn.keywordPatternRe.lastIndex,It=dn.keywordPatternRe.exec(ir)}nn+=ir.substr(_t),Fr.addText(nn)}function Li(){if(ir==="")return;let _t=null;if(typeof dn.subLanguage=="string"){if(!Te[dn.subLanguage]){Fr.addText(ir);return}_t=Yr(dn.subLanguage,ir,!0,Fn[dn.subLanguage]),Fn[dn.subLanguage]=_t.top}else _t=Xr(ir,dn.subLanguage.length?dn.subLanguage:null);dn.relevance>0&&(ol+=_t.relevance),Fr.addSublanguage(_t.emitter,_t.language)}function $i(){dn.subLanguage!=null?Li():nl(),ir=""}function No(_t){return _t.className&&Fr.openNode(Ba.classNameAliases[_t.className]||_t.className),dn=Object.create(_t,{parent:{value:dn}}),dn}function Yo(_t,It,nn){let _n=w(_t.endRe,nn);if(_n){if(_t["on:end"]){const Rr=new r(_t);_t["on:end"](It,Rr),Rr.isMatchIgnored&&(_n=!1)}if(_n){for(;_t.endsParent&&_t.parent;)_t=_t.parent;return _t}}if(_t.endsWithParent)return Yo(_t.parent,It,nn)}function sc(_t){return dn.matcher.regexIndex===0?(ir+=_t[0],1):(uc=!0,0)}function lc(_t){const It=_t[0],nn=_t.rule,_n=new r(nn),Rr=[nn.__beforeBegin,nn["on:begin"]];for(const ms of Rr)if(ms&&(ms(_t,_n),_n.isMatchIgnored))return sc(It);return nn&&nn.endSameAsBegin&&(nn.endRe=d(It)),nn.skip?ir+=It:(nn.excludeBegin&&(ir+=It),$i(),!nn.returnBegin&&!nn.excludeBegin&&(ir=It)),No(nn),nn.returnBegin?0:It.length}function _f(_t){const It=_t[0],nn=mt.substr(_t.index),_n=Yo(dn,_t,nn);if(!_n)return Mr;const Rr=dn;Rr.skip?ir+=It:(Rr.returnEnd||Rr.excludeEnd||(ir+=It),$i(),Rr.excludeEnd&&(ir=It));do dn.className&&Fr.closeNode(),!dn.skip&&!dn.subLanguage&&(ol+=dn.relevance),dn=dn.parent;while(dn!==_n.parent);return _n.starts&&(_n.endSameAsBegin&&(_n.starts.endRe=_n.endRe),No(_n.starts)),Rr.returnEnd?0:It.length}function Tm(){const _t=[];for(let It=dn;It!==Ba;It=It.parent)It.className&&_t.unshift(It.className);_t.forEach(It=>Fr.openNode(It))}let Zl={};function Ef(_t,It){const nn=It&&It[0];if(ir+=_t,nn==null)return $i(),0;if(Zl.type==="begin"&&It.type==="end"&&Zl.index===It.index&&nn===""){if(ir+=mt.slice(It.index,It.index+1),!Vt){const _n=new Error("0 width match regex");throw _n.languageName=qe,_n.badRule=Zl.rule,_n}return 1}if(Zl=It,It.type==="begin")return lc(It);if(It.type==="illegal"&&!tn){const _n=new Error('Illegal lexeme "'+nn+'" for mode "'+(dn.className||"")+'"');throw _n.mode=dn,_n}else if(It.type==="end"){const _n=_f(It);if(_n!==Mr)return _n}if(It.type==="illegal"&&nn==="")return 1;if(Cf>1e5&&Cf>It.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ir+=nn,nn.length}const Ba=li(qe);if(!Ba)throw Tt(bn.replace("{}",qe)),new Error('Unknown language: "'+qe+'"');const rl=Kt(Ba,{plugins:Fe});let dh="",dn=Wn||rl;const Fn={},Fr=new gt.__emitter(gt);Tm();let ir="",ol=0,ps=0,Cf=0,uc=!1;try{for(dn.matcher.considerAll();;){Cf++,uc?uc=!1:dn.matcher.considerAll(),dn.matcher.lastIndex=ps;const _t=dn.matcher.exec(mt);if(!_t)break;const It=mt.substring(ps,_t.index),nn=Ef(It,_t);ps=_t.index+nn}return Ef(mt.substr(ps)),Fr.closeAllNodes(),Fr.finalize(),dh=Fr.toHTML(),{relevance:Math.floor(ol),value:dh,language:qe,illegal:!1,emitter:Fr,top:dn}}catch(_t){if(_t.message&&_t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:_t.message,context:mt.slice(ps-100,ps+100),mode:_t.mode},sofar:dh,relevance:0,value:tr(mt),emitter:Fr};if(Vt)return{illegal:!1,relevance:0,value:tr(mt),emitter:Fr,language:qe,top:dn,errorRaised:_t};throw _t}}function ta(qe){const mt={relevance:0,emitter:new gt.__emitter(gt),value:tr(qe),illegal:!1,top:it};return mt.emitter.addText(qe),mt}function Xr(qe,mt){mt=mt||gt.languages||Object.keys(Te);const tn=ta(qe),Wn=mt.filter(li).filter(dr).map(No=>Yr(No,qe,!1));Wn.unshift(tn);const Jn=Wn.sort((No,Yo)=>{if(No.relevance!==Yo.relevance)return Yo.relevance-No.relevance;if(No.language&&Yo.language){if(li(No.language).supersetOf===Yo.language)return 1;if(li(Yo.language).supersetOf===No.language)return-1}return 0}),[nl,Li]=Jn,$i=nl;return $i.second_best=Li,$i}function Xs(qe){return gt.tabReplace||gt.useBR?qe.replace(Ut,mt=>mt===` +`?gt.useBR?"
":mt:gt.tabReplace?mt.replace(/\t/g,gt.tabReplace):mt):qe}function ko(qe,mt,tn){const Wn=mt?De[mt]:tn;qe.classList.add("hljs"),Wn&&qe.classList.add(Wn)}const na={"before:highlightElement":({el:qe})=>{gt.useBR&&(qe.innerHTML=qe.innerHTML.replace(/\n/g,"").replace(//g,` +`))},"after:highlightElement":({result:qe})=>{gt.useBR&&(qe.value=qe.value.replace(/\n/g,"
"))}},ra=/^(<[^>]+>|\t)+/gm,ds={"after:highlightElement":({result:qe})=>{gt.tabReplace&&(qe.value=qe.value.replace(ra,mt=>mt.replace(/\t/g,gt.tabReplace)))}};function La(qe){let mt=null;const tn=kt(qe);if(Dt(tn))return;tl("before:highlightElement",{el:qe,language:tn}),mt=qe;const Wn=mt.textContent,Jn=tn?Zn(Wn,{language:tn,ignoreIllegals:!0}):Xr(Wn);tl("after:highlightElement",{el:qe,result:Jn,text:Wn}),qe.innerHTML=Jn.value,ko(qe,tn,Jn.language),qe.result={language:Jn.language,re:Jn.relevance,relavance:Jn.relevance},Jn.second_best&&(qe.second_best={language:Jn.second_best.language,re:Jn.second_best.relevance,relavance:Jn.second_best.relevance})}function Qs(qe){qe.useBR&&(an("10.3.0","'useBR' will be removed entirely in v11.0"),an("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),gt=$n(gt,qe)}const oa=()=>{if(oa.called)return;oa.called=!0,an("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(La)};function Ko(){an("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),$a=!0}let $a=!1;function hs(){if(document.readyState==="loading"){$a=!0;return}document.querySelectorAll("pre code").forEach(La)}function Zs(){$a&&hs()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Zs,!1);function Di(qe,mt){let tn=null;try{tn=mt(me)}catch(Wn){if(Tt("Language definition for '{}' could not be registered.".replace("{}",qe)),Vt)Tt(Wn);else throw Wn;tn=it}tn.name||(tn.name=qe),Te[qe]=tn,tn.rawDefinition=mt.bind(null,me),tn.aliases&&el(tn.aliases,{languageName:qe})}function Fa(qe){delete Te[qe];for(const mt of Object.keys(De))De[mt]===qe&&delete De[mt]}function Yl(){return Object.keys(Te)}function Js(qe){an("10.4.0","requireLanguage will be removed entirely in v11."),an("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const mt=li(qe);if(mt)return mt;throw new Error("The '{}' language is required, but not loaded.".replace("{}",qe))}function li(qe){return qe=(qe||"").toLowerCase(),Te[qe]||Te[De[qe]]}function el(qe,{languageName:mt}){typeof qe=="string"&&(qe=[qe]),qe.forEach(tn=>{De[tn.toLowerCase()]=mt})}function dr(qe){const mt=li(qe);return mt&&!mt.disableAutodetect}function Xl(qe){qe["before:highlightBlock"]&&!qe["before:highlightElement"]&&(qe["before:highlightElement"]=mt=>{qe["before:highlightBlock"](Object.assign({block:mt.el},mt))}),qe["after:highlightBlock"]&&!qe["after:highlightElement"]&&(qe["after:highlightElement"]=mt=>{qe["after:highlightBlock"](Object.assign({block:mt.el},mt))})}function ic(qe){Xl(qe),Fe.push(qe)}function tl(qe,mt){const tn=qe;Fe.forEach(function(Wn){Wn[tn]&&Wn[tn](mt)})}function Ql(qe){return an("10.2.0","fixMarkup will be removed entirely in v11.0"),an("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),Xs(qe)}function ac(qe){return an("10.7.0","highlightBlock will be removed entirely in v12.0"),an("10.7.0","Please use highlightElement now."),La(qe)}Object.assign(me,{highlight:Zn,highlightAuto:Xr,highlightAll:hs,fixMarkup:Ql,highlightElement:La,highlightBlock:ac,configure:Qs,initHighlighting:oa,initHighlightingOnLoad:Ko,registerLanguage:Di,unregisterLanguage:Fa,listLanguages:Yl,getLanguage:li,registerAliases:el,requireLanguage:Js,autoDetection:dr,inherit:$n,addPlugin:ic,vuePlugin:de(me).VuePlugin}),me.debugMode=function(){Vt=!1},me.safeMode=function(){Vt=!0},me.versionString=on;for(const qe in he)typeof he[qe]=="object"&&t(he[qe]);return Object.assign(me,he),me.addPlugin(na),me.addPlugin(Se),me.addPlugin(ds),me}({});return K2=Ce,K2}var Y2={exports:{}},I7;function rCe(){return I7||(I7=1,(function(e){(function(){var t;t=e.exports=o,t.format=o,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(o.apply(null,arguments))}function r(i,a){return o.apply(null,[i].concat(a))}function o(i){for(var a=1,s=[].slice.call(arguments),l=0,u=i.length,c="",d,h=!1,p,x,y=!1,w,_=function(){return s[a++]},C=function(){for(var O="";/\d/.test(i[l]);)O+=i[l++],d=i[l];return O.length>0?parseInt(O):null};lk.relevance&&(k=M),M.relevance>T.relevance&&(k=T,T=M));return k.language&&(T.secondBest=k),T}function i(w,_){e.registerLanguage(w,_)}function a(){return e.listLanguages()}function s(w,_){var C=w,O;_&&(C={},C[w]=_);for(O in C)e.registerAliases(C[O],{languageName:O})}function l(w){this.options=w,this.rootNode={children:[]},this.stack=[this.rootNode]}function u(w,_){this.openNode(_),this.addText(w),this.closeNode()}function c(w,_){var C=this.stack,O=C[C.length-1],P=w.rootNode.children,R=_?{type:"element",tagName:"span",properties:{className:[_]},children:P}:P;O.children=O.children.concat(R)}function d(w){var _=this.stack,C,O;w!==""&&(C=_[_.length-1],O=C.children[C.children.length-1],O&&O.type==="text"?O.value+=w:C.children.push({type:"text",value:w}))}function h(w){var _=this.stack,C=this.options.classPrefix+w,O=_[_.length-1],P={type:"element",tagName:"span",properties:{className:[C]},children:[]};O.children.push(P),_.push(P)}function p(){this.stack.pop()}function x(){return""}function y(){}return fp}var Q2,$7;function aCe(){if($7)return Q2;$7=1;function e(t){const n={literal:"true false null"},r=[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],o=[t.QUOTE_STRING_MODE,t.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:o,keywords:n},a={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE],illegal:"\\n"},t.inherit(i,{begin:/:/})].concat(r),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[t.inherit(i)],illegal:"\\S"};return o.push(a,s),r.forEach(function(l){o.push(l)}),{name:"JSON",contains:o,keywords:n,illegal:"\\S"}}return Q2=e,Q2}var Z2,F7;function sCe(){if(F7)return Z2;F7=1;function e(t){var n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},s=t.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",d="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",h={className:"number",begin:"\\b"+l+u+c+d+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},x={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},y={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},w=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},h,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},x,y,a],_=[...w];return _.pop(),_.push(s),p.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return Z2=e,Z2}var J2,B7;function lCe(){if(B7)return J2;B7=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],r=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],o=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","module","global"],s=[].concat(i,a,r,o);function l(p){return p?typeof p=="string"?p:p.source:null}function u(p){return c("(?=",p,")")}function c(...p){return p.map(y=>l(y)).join("")}function d(p){const x=(Y,{after:q})=>{const W="",end:""},_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,q)=>{const W=Y[0].length+Y.index,K=Y.input[W];if(K==="<"){q.ignoreMatch();return}K===">"&&(x(Y,{after:W})||q.ignoreMatch())}},C={$pattern:e,keyword:t,literal:n,built_in:s},O="[0-9](_?[0-9])*",P=`\\.(${O})`,R="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",T={className:"number",variants:[{begin:`(\\b(${R})((${P})|\\.)?|(${P}))[eE][+-]?(${O})\\b`},{begin:`\\b(${R})\\b((${P})\\b|\\.)?|(${P})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},M={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},j={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,k],subLanguage:"css"}},$={className:"string",begin:"`",end:"`",contains:[p.BACKSLASH_ESCAPE,k]},V={className:"comment",variants:[p.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),p.C_BLOCK_COMMENT_MODE,p.C_LINE_COMMENT_MODE]},G=[p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,M,j,$,T,p.REGEXP_MODE];k.contains=G.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(G)});const D=[].concat(V,k.contains),H=D.concat([{begin:/\(/,end:/\)/,keywords:C,contains:["self"].concat(D)}]),U={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:H};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:H},illegal:/#(?![$_A-z])/,contains:[p.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,M,j,$,V,T,{begin:c(/[{,\n]\s*/,u(c(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,y+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:y+u("\\s*:"),relevance:0}]},{begin:"("+p.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[V,p.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+p.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:p.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:H}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:w.begin,end:w.end},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:C,contains:["self",p.inherit(p.TITLE_MODE,{begin:y}),U],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:p.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[U,p.inherit(p.TITLE_MODE,{begin:y})]},{variants:[{begin:"\\."+y},{begin:"\\$"+y}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},p.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[p.inherit(p.TITLE_MODE,{begin:y}),"self",U]},{begin:"(get|set)\\s+(?="+y+"\\()",end:/\{/,keywords:"get set",contains:[p.inherit(p.TITLE_MODE,{begin:y}),{begin:/\(\)/},U]},{begin:/\$[(.]/}]}}function h(p){const x=e,y={beginKeywords:"namespace",end:/\{/,excludeEnd:!0},w={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},_={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},C=["any","void","number","boolean","string","object","never","enum"],O=["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"],P={$pattern:e,keyword:t.concat(O),literal:n,built_in:s.concat(C)},R={className:"meta",begin:"@"+x},T=(j,$,L)=>{const V=j.contains.findIndex(G=>G.label===$);if(V===-1)throw new Error("can not find mode to replace");j.contains.splice(V,1,L)},k=d(p);Object.assign(k.keywords,P),k.exports.PARAMS_CONTAINS.push(R),k.contains=k.contains.concat([R,y,w]),T(k,"shebang",p.SHEBANG()),T(k,"use_strict",_);const M=k.contains.find(j=>j.className==="function");return M.relevance=0,Object.assign(k,{name:"TypeScript",aliases:["ts","tsx"]}),k}return J2=h,J2}var uCe=iCe();const bJ=Ln(uCe);var ub=tCe(bJ,{});ub.registerLanguage=bJ.registerLanguage;var cCe=aCe();const fCe=Ln(cCe);var dCe=lCe();const hCe=Ln(dCe);var pCe=sCe();const mCe=Ln(pCe),gCe={"hljs-comment":{color:"#B6B18B"},"hljs-quote":{color:"#B6B18B"},"hljs-variable":{color:"#EB3C54"},"hljs-template-variable":{color:"#EB3C54"},"hljs-tag":{color:"#EB3C54"},"hljs-name":{color:"#EB3C54"},"hljs-selector-id":{color:"#EB3C54"},"hljs-selector-class":{color:"#EB3C54"},"hljs-regexp":{color:"#EB3C54"},"hljs-deletion":{color:"#EB3C54"},"hljs-number":{color:"#E7CE56"},"hljs-built_in":{color:"#E7CE56"},"hljs-builtin-name":{color:"#E7CE56"},"hljs-literal":{color:"#E7CE56"},"hljs-type":{color:"#E7CE56"},"hljs-params":{color:"#E7CE56"},"hljs-meta":{color:"#E7CE56"},"hljs-link":{color:"#E7CE56"},"hljs-attribute":{color:"#EE7C2B"},"hljs-string":{color:"#4FB4D7"},"hljs-symbol":{color:"#4FB4D7"},"hljs-bullet":{color:"#4FB4D7"},"hljs-addition":{color:"#4FB4D7"},"hljs-title":{color:"#78BB65"},"hljs-section":{color:"#78BB65"},"hljs-keyword":{color:"#B45EA4"},"hljs-selector-tag":{color:"#B45EA4"},hljs:{display:"block",overflowX:"auto",background:"#1C1D21",color:"#c0c5ce",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}},vCe={hljs:{display:"block",overflowX:"auto",padding:"0.5em",color:"#383a42",background:"#fafafa"},"hljs-comment":{color:"#a0a1a7",fontStyle:"italic"},"hljs-quote":{color:"#a0a1a7",fontStyle:"italic"},"hljs-doctag":{color:"#a626a4"},"hljs-keyword":{color:"#a626a4"},"hljs-formula":{color:"#a626a4"},"hljs-section":{color:"#e45649"},"hljs-name":{color:"#e45649"},"hljs-selector-tag":{color:"#e45649"},"hljs-deletion":{color:"#e45649"},"hljs-subst":{color:"#e45649"},"hljs-literal":{color:"#0184bb"},"hljs-string":{color:"#50a14f"},"hljs-regexp":{color:"#50a14f"},"hljs-addition":{color:"#50a14f"},"hljs-attribute":{color:"#50a14f"},"hljs-meta-string":{color:"#50a14f"},"hljs-built_in":{color:"#c18401"},"hljs-class .hljs-title":{color:"#c18401"},"hljs-attr":{color:"#986801"},"hljs-variable":{color:"#986801"},"hljs-template-variable":{color:"#986801"},"hljs-type":{color:"#986801"},"hljs-selector-class":{color:"#986801"},"hljs-selector-attr":{color:"#986801"},"hljs-selector-pseudo":{color:"#986801"},"hljs-number":{color:"#986801"},"hljs-symbol":{color:"#4078f2"},"hljs-bullet":{color:"#4078f2"},"hljs-link":{color:"#4078f2",textDecoration:"underline"},"hljs-meta":{color:"#4078f2"},"hljs-selector-id":{color:"#4078f2"},"hljs-title":{color:"#4078f2"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};ub.registerLanguage("typescript",hCe);ub.registerLanguage("yaml",mCe);ub.registerLanguage("json",fCe);function cf({code:e,copyCode:t,language:n,className:r,maxHeight:o,minHeight:i,maxWidth:a,minWidth:s,copy:l=!0,wrapLines:u=!0,onCopy:c}){const{theme:d}=vL();return v.jsxs("div",{className:je("relative h-fit w-full rounded-lg bg-muted",r),children:[v.jsx(ub,{language:n,style:d=="dark"?gCe:vCe,wrapLines:u,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},customStyle:{cursor:"default",borderRadius:"0.5rem",maxHeight:o,minHeight:i,maxWidth:a,minWidth:s,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",fontSize:"0.75rem",lineHeight:"1rem",padding:"0.5rem",paddingRight:"2rem",flex:"1",background:"transparent"},children:e.trim()}),l&&v.jsx(pJ,{className:"absolute right-2 top-2",text:(t||e).trim(),onCopy:c})]})}const _1={id:"ID",workflowId:"Workflow",scope:"Scope",expression:"Expression",isDeclarative:"Is Declarative"},yCe="id",KI="workflowId",YI="scope",wCe="expression",xCe="isDeclarative",wet=(e,t)=>[{accessorKey:yCe,header:({column:n})=>v.jsx(Dr,{column:n,title:_1.id}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:v.jsx(wt,{className:"w-fit pl-0",variant:"link",onClick:()=>{t==null||t(n.original)},children:n.original.metadata.id})}),enableSorting:!1,enableHiding:!0},{accessorKey:KI,header:({column:n})=>v.jsx(Dr,{column:n,title:_1.workflowId}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:e[n.original.workflowId]}),enableSorting:!1,enableHiding:!0},{accessorKey:YI,header:({column:n})=>v.jsx(Dr,{column:n,title:_1.scope}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:n.original.scope}),enableSorting:!1,enableHiding:!0},{accessorKey:wCe,header:({column:n})=>v.jsx(Dr,{column:n,title:_1.expression}),cell:({row:n})=>v.jsx(cf,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:n.original.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"}),enableSorting:!1,enableHiding:!0},{accessorKey:xCe,header:({column:n})=>v.jsx(Dr,{column:n,title:_1.isDeclarative}),cell:({row:n})=>n.original.isDeclarative?v.jsx(fL,{className:"size-4 text-green-600"}):null,enableSorting:!1,enableHiding:!0}],E1=(e,t)=>{const n=e.get(t);if(!n)return{pageIndex:0,pageSize:50};const r=JSON.parse(n);if(!r||typeof r!="object"||!("i"in r)||!("s"in r))return{pageIndex:0,pageSize:50};const{i:o,s:i}=r;return{pageIndex:o,pageSize:i}},C1=(e,t,n,r)=>({...Object.fromEntries(e.entries()),[t]:{i:n,s:r}}),bCe=e=>{if(!e)return"";try{return JSON.stringify(e)}catch{return e.map(t=>String(t)).join("|")}},$L=({key:e,resetPageOnChange:t})=>{const[n,r]=Zx(),o=`pagination-${e}`,i=b.useMemo(()=>E1(n,o),[n,o]),a=bCe(t),s=b.useRef(a);b.useEffect(()=>{s.current!==a&&(s.current=a,i.pageIndex!==0&&r(p=>{const x=E1(p,o);return C1(p,o,0,x.pageSize)}))},[a,i.pageIndex,r,o]);const l=b.useMemo(()=>i?i.pageIndex*i.pageSize:0,[i]),u=b.useMemo(()=>i?i.pageSize:25,[i]),c=b.useCallback(()=>{r(p=>{const x=E1(p,o);return C1(p,o,x.pageIndex+1,x.pageSize)})},[r,o]),d=b.useCallback(()=>{r(p=>{const x=E1(p,o);return C1(p,o,Math.max(0,x.pageIndex-1),x.pageSize)})},[r,o]),h=b.useCallback(p=>{r(x=>C1(x,o,0,p))},[r,o]);return{pagination:i,setPagination:p=>{r(x=>{const y=E1(x,o),w=typeof p=="function"?p(y):p;return C1(x,o,w.pageIndex,w.pageSize)})},offset:l,limit:u,nextPage:c,prevPage:d,setPageSize:h}};function Ma(){const{tenantId:e}=eR();return Cr(e),{tenantId:e}}function xet(){var $,L,V;const e=eR(),t=e.tenantId,n=e.tenant,r=e.membership,{invalidate:o}=JO(),i=ec(),a=RX(),s=Vl(),l=Hs({strict:!1}),[u,c]=VX(mL),d=l.tenant,h=b.useCallback((G,D)=>{if(c(G),(D==null?void 0:D.navigate)===!1)return;if(!!!a({to:At.tenantRoute.to,params:d?{tenant:d}:void 0,fuzzy:!0})){s({to:At.tenantRunsRoute.to,params:{tenant:G.metadata.id}});return}s({to:".",params:{tenant:G.metadata.id}})},[a,s,c,d]),p=Ir({mutationKey:["tenant:create"],mutationFn:async({name:G})=>{const D={name:G,slug:G.toLowerCase().replace(/\s+/g,"-")};return(await rt.tenantCreate(D)).data},onSuccess:async G=>(await i.invalidateQueries({queryKey:["user:*"]}),await o(),G.metadata.id&&h(G),G)}),x=Ir({mutationKey:["tenant:update",n==null?void 0:n.metadata.id],mutationFn:async G=>{if(!(n!=null&&n.metadata.id))throw new Error("Tenant not found");return(await rt.tenantUpdate(n.metadata.id,G)).data},onSuccess:()=>{i.invalidateQueries({queryKey:["user:*"]}),i.invalidateQueries({queryKey:["tenant:*"]})}}),y=In({queryKey:["tenant-resource-policy:get",n==null?void 0:n.metadata.id],queryFn:async()=>(await rt.tenantResourcePolicyGet((n==null?void 0:n.metadata.id)??"")).data.limits,enabled:!!(n!=null&&n.metadata.id)}),[w,_]=b.useState(!1),{cloud:C,isCloudEnabled:O}=z3(),P=b.useMemo(()=>{var G;if(!(!e.isUserUniverseLoaded||!e.organizations))return(G=e.organizations.find(D=>D.tenants.some(H=>{var U;return H.id===((U=n==null?void 0:n.metadata)==null?void 0:U.id)})))==null?void 0:G.metadata.id},[e.isUserUniverseLoaded,e.organizations,($=n==null?void 0:n.metadata)==null?void 0:$.id]),R=In({...io.controlPlane.billing(P||""),enabled:!!P&&O&&!!(C!=null&&C.canBill),refetchInterval:w?1e3:!1,retry:!1}),T=In({...io.controlPlane.paymentMethods(P||""),enabled:!!P&&!!(C!=null&&C.canBill),retry:!1}),k=b.useMemo(()=>{var D,H;const G=(H=(D=R.data)==null?void 0:D.currentSubscription)==null?void 0:H.plan;return G||"free"},[(V=(L=R.data)==null?void 0:L.currentSubscription)==null?void 0:V.plan]),M=b.useMemo(()=>{var H;if(!(C!=null&&C.canBill))return;const G=(((H=T.data)==null?void 0:H.length)||0)>0,D=T.isLoading||R.isLoading;return{state:R.data,setPollBilling:_,plan:k,hasPaymentMethods:G,isLoading:D}},[C==null?void 0:C.canBill,R.data,T.data,T.isLoading,R.isLoading,k]),j=b.useCallback(G=>G({tenant:n,billing:M,meta:C??void 0}),[M,C,n]);return{tenantId:t,tenant:n,isUserUniverseLoaded:e.isUserUniverseLoaded,membership:r,setTenant:h,create:p,update:{mutate:G=>x.mutate(G),mutateAsync:G=>x.mutateAsync(G),isPending:x.isPending},limit:y,billing:M,organizationId:P,can:j,lastTenantId:u==null?void 0:u.metadata.id}}const eA=(e,t)=>{const n=e.get(t);if(!n)return{w:[],s:[]};const r=JSON.parse(n);if(!r||typeof r!="object"||!("w"in r)||!("s"in r))return{w:[],s:[]};const{w:o,s:i}=r;return{w:Array.isArray(o)&&o.length>0?o:void 0,s:Array.isArray(i)&&i.length>0?i:void 0}},SJ=({key:e,scopeOverrides:t})=>{var X;const n=ec(),[r,o]=Zx(),{tenantId:i}=Ma(),{refetchInterval:a}=vf(),s=`filters-${e}`,l=b.useMemo(()=>{const{w:ee}=eA(r,s);return ee},[r,s]),u=b.useMemo(()=>{if(t&&t.length>0)return t;const{s:ee}=eA(r,s);return ee},[r,s,t]),{limit:c,offset:d,pagination:h,setPagination:p,setPageSize:x}=$L({key:e,resetPageOnChange:[l,u]}),y=b.useMemo(()=>{const{w:ee,s:ae}=eA(r,s),fe=[];return ee&&ee.length>0&&fe.push({id:KI,value:ee}),ae&&ae.length>0&&fe.push({id:YI,value:ae}),fe},[r,s]),w=b.useCallback(ee=>{o(ae=>{const ie=typeof ee=="function"?ee(y):ee,ge=ie.find(ye=>ye.id===KI),he=ie.find(ye=>ye.id===YI),ue=ge!=null&&ge.value?Array.isArray(ge.value)?ge.value:[ge.value]:[],we=he!=null&&he.value?Array.isArray(he.value)?he.value:[he.value]:[],Ae={w:ue,s:we};return{...Object.fromEntries(ae.entries()),[s]:Ae}})},[y,s,o]),{data:_,isLoading:C,isRefetching:O,refetch:P,error:R}=In({queryKey:["v1:filter:list",i,e,d,c,l,u],queryFn:async()=>(await rt.v1FilterList(i,{offset:d,limit:c,workflowIds:l,scopes:u})).data,refetchInterval:a,placeholderData:ee=>ee}),T=(_==null?void 0:_.rows)??[],k=((X=_==null?void 0:_.pagination)==null?void 0:X.num_pages)??1,{data:M,isLoading:j,error:$}=In({...io.workflows.list(i,{limit:200})}),L=b.useMemo(()=>{var ee;return((ee=M==null?void 0:M.rows)==null?void 0:ee.map(ae=>({value:ae.metadata.id,label:ae.name})))||[]},[M]),V=b.useMemo(()=>L.reduce((ee,ae)=>(ee[ae.value]=ae.label,ee),{}),[L]),{mutate:G,isPending:D}=Ir({mutationFn:async ee=>(await rt.v1FilterDelete(i,ee)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]})}}),{mutate:H,isPending:U}=Ir({mutationFn:async({filterId:ee,data:ae})=>(await rt.v1FilterUpdate(i,ee,ae)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]}),await n.invalidateQueries({queryKey:["v1:filter:get",i]})}}),{mutate:Y,isPending:q}=Ir({mutationFn:async ee=>(await rt.v1FilterCreate(i,ee)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]})}}),W=b.useCallback(async ee=>G(ee),[G]),K=b.useCallback(async(ee,ae)=>H({filterId:ee,data:ae}),[H]),z=b.useCallback(async ee=>Y(ee),[Y]);return{filters:T,numFilters:k,isLoading:C||j,refetch:P,isRefetching:O,error:R||$,pagination:h,setPagination:p,setPageSize:x,columnFilters:y,setColumnFilters:w,selectedWorkflowIds:l,selectedScopes:u,workflowNameFilters:L,workflowIdToName:V,mutations:{delete:{perform:W,isPending:D},update:{perform:K,isPending:U},create:{perform:z,isPending:q}}}},SCe=e=>{const{tenantId:t}=Ma(),{data:n,isLoading:r,error:o,refetch:i}=In({queryKey:["v1:filter:get",t,e],queryFn:async()=>(await rt.v1FilterGet(t,e)).data});return{filter:n,isLoading:r,error:o,refetch:i}};function _Ce(e){if(e===void 0)return"border-transparent rounded-full bg-muted";switch(e){case qt.CANCELLED:return"border-transparent rounded-full bg-orange-500";case qt.FAILED:return"border-transparent rounded-full bg-red-500";case qt.RUNNING:return"border-transparent rounded-full bg-yellow-500";case qt.QUEUED:return"border-transparent rounded-full bg-slate-500";case qt.COMPLETED:return"border-transparent rounded-full bg-green-500";default:{const t=e;throw new Error(`Unknown status: ${t}`)}}}function _J({status:e,isSkipped:t}){if(t)return v.jsx(E1e,{className:"h-3 w-3 text-muted-foreground"});const n=_Ce(e);return v.jsx("div",{className:je(n,"h-[6px] w-[6px] rounded-full")})}const ECe=({workflow:e,parentTaskExternalId:t,additionalMetadata:n,createdAfter:r,createdBefore:o,showQueueMetrics:i})=>{const{tenantId:a}=Ma(),{refetchInterval:s}=vf(),{data:l,isLoading:u,isFetching:c,isRefetching:d,refetch:h}=In({...io.v1TaskRuns.metrics(a,{since:r||new Date(Date.now()-1440*60*1e3).toISOString(),until:o,parent_task_external_id:t,workflow_ids:e?[e]:[],additional_metadata:n}),placeholderData:_=>_,refetchInterval:s}),p=l||[],{data:x,isLoading:y}=In({...io.metrics.getStepRunQueueMetrics(a),refetchInterval:5e3,enabled:i}),w=(x==null?void 0:x.queues)||{};return{runStatusCounts:p,isStatusCountsRefetching:d,isStatusCountsLoading:u,isStatusCountsFetching:c,isQueueMetricsLoading:y,refetch:h,queueMetrics:w}},CCe=({key:e,rowSelection:t,createdAfter:n,finishedBefore:r,statuses:o,runningFilter:i,additionalMetadata:a,workerId:s,workflowIds:l,parentTaskExternalId:u,triggeringEventExternalId:c,onlyTasks:d,disablePagination:h=!1})=>{const{tenantId:p}=Ma(),{refetchInterval:x}=vf(),{offset:y,pagination:w,setPageSize:_,setPagination:C}=$L({key:"runs-table-"+e,resetPageOnChange:[n,r,o,i,a,s,l,u,c,d]}),[O]=b.useState(new Date(Date.now()-1440*60*1e3).toISOString()),P=b.useMemo(()=>u?new Date(Date.now()-744*60*60*1e3).toISOString():n||O,[n,O,u]),R=In({...io.v1WorkflowRuns.list(p,{offset:h?0:y,limit:h?500:w.pageSize,statuses:o&&o.length>0?o:void 0,workflow_ids:l&&l.length>0?l:[],parent_task_external_id:u,since:P,until:r,additional_metadata:a,worker_id:s,only_tasks:d,triggering_event_external_id:c,include_payloads:!1,running_filter:i}),refetchInterval:Object.keys(t).length>0?!1:x}),T=R.data,k=b.useMemo(()=>(T==null?void 0:T.rows)||[],[T]),M=b.useMemo(()=>Object.entries(t).filter(([,$])=>!!$).map(([$])=>{const L=V=>{for(const G of V){if(G.metadata.id===$)return G;if(G.children){const D=L(G.children);if(D)return D}}};return L(k)}).filter($=>$!==void 0),[t,k]),j=b.useCallback($=>$.metadata.id,[]);return{numPages:(T==null?void 0:T.pagination.num_pages)||0,tableRows:k,selectedRuns:M,refetch:R.refetch,isLoading:R.isLoading,isError:R.isError,isFetching:R.isFetching,getRowId:j,isRefetching:R.isRefetching,pagination:w,setPagination:C,setPageSize:_}};var hR="Popover",[EJ]=fs(hR,[nc]),cb=nc(),[OCe,eh]=EJ(hR),CJ=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=cb(t),l=b.useRef(null),[u,c]=b.useState(!1),[d,h]=qs({prop:r,defaultProp:o??!1,onChange:i,caller:hR});return v.jsx($y,{...s,children:v.jsx(OCe,{scope:t,contentId:Pa(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>c(!0),[]),onCustomAnchorRemove:b.useCallback(()=>c(!1),[]),modal:a,children:n})})};CJ.displayName=hR;var OJ="PopoverAnchor",RCe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=eh(OJ,n),i=cb(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return b.useEffect(()=>(a(),()=>s()),[a,s]),v.jsx(Fy,{...i,...r,ref:t})});RCe.displayName=OJ;var RJ="PopoverTrigger",PJ=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=eh(RJ,n),i=cb(n),a=Bn(t,o.triggerRef),s=v.jsx(Zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":MJ(o.open),...r,ref:a,onClick:Ze(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:v.jsx(Fy,{asChild:!0,...i,children:s})});PJ.displayName=RJ;var FL="PopoverPortal",[PCe,TCe]=EJ(FL,{forceMount:void 0}),TJ=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=eh(FL,t);return v.jsx(PCe,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(vm,{asChild:!0,container:o,children:r})})})};TJ.displayName=FL;var Zv="PopoverContent",AJ=b.forwardRef((e,t)=>{const n=TCe(Zv,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=eh(Zv,e.__scopePopover);return v.jsx(ji,{present:r||i.open,children:i.modal?v.jsx(kCe,{...o,ref:t}):v.jsx(NCe,{...o,ref:t})})});AJ.displayName=Zv;var ACe=Kp("PopoverContent.RemoveScroll"),kCe=b.forwardRef((e,t)=>{const n=eh(Zv,e.__scopePopover),r=b.useRef(null),o=Bn(t,r),i=b.useRef(!1);return b.useEffect(()=>{const a=r.current;if(a)return tb(a)},[]),v.jsx(eb,{as:ACe,allowPinchZoom:!0,children:v.jsx(kJ,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ze(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Ze(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Ze(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),NCe=b.forwardRef((e,t)=>{const n=eh(Zv,e.__scopePopover),r=b.useRef(!1),o=b.useRef(!1);return v.jsx(kJ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),kJ=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,h=eh(Zv,n),p=cb(n);return tR(),v.jsx(Jx,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Zd,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:v.jsx(Yx,{"data-state":MJ(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),NJ="PopoverClose",MCe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=eh(NJ,n);return v.jsx(Zt.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,()=>o.onOpenChange(!1))})});MCe.displayName=NJ;var jCe="PopoverArrow",ICe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=cb(n);return v.jsx(Xx,{...o,...r,ref:t})});ICe.displayName=jCe;function MJ(e){return e?"open":"closed"}var DCe=CJ,LCe=PJ,$Ce=TJ,jJ=AJ;const Wy=DCe,Hy=LCe,wm=b.forwardRef(({className:e,container:t,align:n="center",sideOffset:r=4,...o},i)=>v.jsx($Ce,{container:t,children:v.jsx(jJ,{ref:i,align:n,sideOffset:r,className:je("z-[300] w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));wm.displayName=jJ.displayName;const XI=b.memo(function({metadata:t,onClick:n,isOpen:r,onOpenChange:o,title:i="Metadata",align:a="end"}){const s=Object.entries(t||{});if(s.length===0)return null;const l=s.length;return v.jsx("div",{className:"flex max-w-32 items-center justify-start",children:v.jsxs(Wy,{open:r,onOpenChange:o,children:[v.jsx(Hy,{asChild:!0,children:v.jsxs("div",{className:"flex cursor-pointer items-center gap-1 rounded px-2 py-1 transition-colors hover:bg-muted/50",children:[v.jsx(p7,{className:"size-3 flex-shrink-0 text-muted-foreground"}),v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]})}),v.jsx(wm,{className:"w-80 p-0 shadow-md shadow-slate-800/30",align:a,children:v.jsxs("div",{className:"p-3",children:[v.jsxs("div",{className:"mb-3 flex items-center gap-2 border-b pb-2",children:[v.jsx(p7,{className:"size-4 text-muted-foreground"}),v.jsxs("span",{className:"text-sm font-medium",children:[i," (",l," ",l===1?"item":"items",")"]})]}),v.jsx("div",{className:"max-h-60 space-y-2 overflow-y-auto",children:s.sort(([u],[c])=>u.toLowerCase().localeCompare(c.toLowerCase())).map(([u,c])=>v.jsxs("div",{className:"group flex cursor-pointer flex-col gap-1 rounded border p-2 transition-colors hover:bg-muted/30",onClick:()=>n==null?void 0:n({key:u,value:c}),children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:u})}),v.jsx("div",{className:"break-all text-sm",children:v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsx("div",{className:"truncate",children:FCe(c)})}),v.jsx(Us,{side:"left",className:"max-w-xs",children:v.jsx("pre",{className:"whitespace-pre-wrap text-xs",children:JSON.stringify(c,null,2)})})]})})})]},u))})]})})]})})},(e,t)=>e.isOpen===t.isOpen&&e.onClick===t.onClick&&e.onOpenChange===t.onOpenChange&&JSON.stringify(e.metadata)===JSON.stringify(t.metadata)),FCe=e=>{if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e.length>50?`${e.substring(0,50)}...`:e;if(typeof e=="object"){const t=JSON.stringify(e);return t.length>50?`${t.substring(0,50)}...`:t}return String(e)};var tA,pR="HoverCard",[IJ]=fs(pR,[nc]),mR=nc(),[BCe,BL]=IJ(pR),DJ=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:s=300}=e,l=mR(t),u=b.useRef(0),c=b.useRef(0),d=b.useRef(!1),h=b.useRef(!1),[p,x]=qs({prop:r,defaultProp:o??!1,onChange:i,caller:pR}),y=b.useCallback(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>x(!0),a)},[a,x]),w=b.useCallback(()=>{clearTimeout(u.current),!d.current&&!h.current&&(c.current=window.setTimeout(()=>x(!1),s))},[s,x]),_=b.useCallback(()=>x(!1),[x]);return b.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),v.jsx(BCe,{scope:t,open:p,onOpenChange:x,onOpen:y,onClose:w,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:h,children:v.jsx($y,{...l,children:n})})};DJ.displayName=pR;var LJ="HoverCardTrigger",$J=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=BL(LJ,n),i=mR(n);return v.jsx(Fy,{asChild:!0,...i,children:v.jsx(Zt.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:Ze(e.onPointerEnter,zE(o.onOpen)),onPointerLeave:Ze(e.onPointerLeave,zE(o.onClose)),onFocus:Ze(e.onFocus,o.onOpen),onBlur:Ze(e.onBlur,o.onClose),onTouchStart:Ze(e.onTouchStart,a=>a.preventDefault())})})});$J.displayName=LJ;var zCe="HoverCardPortal",[bet,qCe]=IJ(zCe,{forceMount:void 0}),BE="HoverCardContent",zL=b.forwardRef((e,t)=>{const n=qCe(BE,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=BL(BE,e.__scopeHoverCard);return v.jsx(ji,{present:r||i.open,children:v.jsx(UCe,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Ze(e.onPointerEnter,zE(i.onOpen)),onPointerLeave:Ze(e.onPointerLeave,zE(i.onClose)),ref:t})})});zL.displayName=BE;var UCe=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,l=BL(BE,n),u=mR(n),c=b.useRef(null),d=Bn(t,c),[h,p]=b.useState(!1);return b.useEffect(()=>{if(h){const x=document.body;return tA=x.style.userSelect||x.style.webkitUserSelect,x.style.userSelect="none",x.style.webkitUserSelect="none",()=>{x.style.userSelect=tA,x.style.webkitUserSelect=tA}}},[h]),b.useEffect(()=>{if(c.current){const x=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var w;((w=document.getSelection())==null?void 0:w.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",x),()=>{document.removeEventListener("pointerup",x),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),b.useEffect(()=>{c.current&&HCe(c.current).forEach(y=>y.setAttribute("tabindex","-1"))}),v.jsx(Zd,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Ze(i,x=>{x.preventDefault()}),onDismiss:l.onDismiss,children:v.jsx(Yx,{...u,...s,onPointerDown:Ze(s.onPointerDown,x=>{x.currentTarget.contains(x.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),VCe="HoverCardArrow",WCe=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=mR(n);return v.jsx(Xx,{...o,...r,ref:t})});WCe.displayName=VCe;function zE(e){return t=>t.pointerType==="touch"?void 0:e()}function HCe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var GCe=DJ,KCe=$J,FJ=zL;const YCe=GCe,XCe=KCe,QCe=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>v.jsx(FJ,{ref:o,align:t,sideOffset:n,className:je("z-[300] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));QCe.displayName=FJ.displayName;function ZCe(e){switch(e){case"SUCCEEDED":return{text:"Succeeded",variant:"successful"};case"FAILED":return{text:"Failed",variant:"failed"};case"CANCELLED":return{text:"Cancelled",variant:"cancelled"};case"CANCELLING":return{text:"Cancelling",variant:"cancelled"};case"RUNNING":return{text:"Running",variant:"inProgress"};case"QUEUED":return{text:"Queued",variant:"queued"};case"PENDING":return{text:"Pending",variant:"queued"};case"PENDING_ASSIGNMENT":return{text:"Pending",variant:"queued"};case"ASSIGNED":return{text:"Assigned",variant:"inProgress"};case"SCHEDULED":return{text:"Scheduled",variant:"queued"};default:return{text:"Unknown",variant:"outline"}}}function JCe(e){switch(e){case qt.COMPLETED:return{text:"Succeeded",variant:"successful"};case qt.FAILED:return{text:"Failed",variant:"failed"};case qt.CANCELLED:return{text:"Cancelled",variant:"cancelled"};case qt.RUNNING:return{text:"Running",variant:"inProgress"};case qt.QUEUED:return{text:"Queued",variant:"queued"};default:{const t=e;throw new Error(`Unknown status: ${t}`)}}}const eOe={TIMED_OUT:"Runtime Timed Out",SCHEDULING_TIMED_OUT:"Scheduling Timed Out"},tOe={TIMED_OUT:{text:"Timed Out",variant:"failed"},SCHEDULING_TIMED_OUT:{text:"Timed Out",variant:"failed"}};function nOe({status:e,reason:t,className:n}){const{text:r,variant:o}=ZCe(e),{text:i,variant:a}=t&&tOe[t]||{},s=()=>v.jsx(Ti,{variant:a||o,className:n,children:LO(i||r)});return t?v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{children:v.jsx(s,{})}),v.jsx(Us,{children:eOe[t]||t})]})}):v.jsx(s,{})}function rOe({status:e,errorMessage:t,className:n}){const{text:r,variant:o}=JCe(e),i=()=>v.jsx(Ti,{variant:o,className:n,children:v.jsx("span",{className:"flex items-center gap-1",children:LO(r)})});return t?v.jsxs(YCe,{children:[v.jsx(XCe,{className:"hover:cursor-help",children:v.jsx(i,{})}),v.jsx(zL,{className:"z-10 max-h-96 max-w-96 overflow-auto rounded-md border border-gray-600 border-opacity-50 bg-card p-4 shadow-xl lg:max-w-[500px]",children:v.jsx("p",{className:"text-xs",children:t})})]}):v.jsx(i,{})}function oOe({row:e,actions:t}){return t!=null&&t.length?v.jsxs(DL,{children:[v.jsx(LL,{asChild:!0,children:v.jsxs(wt,{variant:"ghost",size:"sm",className:"flex data-[state=open]:bg-muted",children:[v.jsx(ySe,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Open menu"})]})}),v.jsx(dR,{align:"end",className:"w-[160px]",children:t==null?void 0:t.map(n=>v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{className:"w-full",children:v.jsx(mw,{onClick:()=>n.onClick(e),disabled:!!n.disabled,className:"w-full hover:cursor-pointer",children:n.label})}),n.disabled&&v.jsx(Us,{children:n.disabled})]})},n.label))})]}):null}function Qt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Aa(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ei(e,t){const n=Qt(e);return isNaN(t)?Aa(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Vs(e,t){const n=Qt(e);if(isNaN(t))return Aa(e,NaN);if(!t)return n;const r=n.getDate(),o=Aa(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function av(e,t){const{years:n=0,months:r=0,weeks:o=0,days:i=0,hours:a=0,minutes:s=0,seconds:l=0}=t,u=Qt(e),c=r||n?Vs(u,r+n*12):u,d=i||o?Ei(c,i+o*7):c,h=s+a*60,x=(l+h*60)*1e3;return Aa(e,d.getTime()+x)}const qL=6048e5,iOe=864e5,UL=6e4,VL=36e5,_et=43200,Eet=1440;let aOe={};function fb(){return aOe}function Xu(e,t){var s,l,u,c;const n=fb(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=Qt(e),i=o.getDay(),a=(i=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Jv(e){const t=Qt(e);return t.setHours(0,0,0,0),t}function qE(e){const t=Qt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function kl(e,t){const n=Jv(e),r=Jv(t),o=+n-qE(n),i=+r-qE(r);return Math.round((o-i)/iOe)}function sOe(e){const t=BJ(e),n=Aa(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Jp(n)}function QI(e,t){const n=t*7;return Ei(e,n)}function lOe(e,t){return Vs(e,t*12)}function uOe(e){let t;return e.forEach(function(n){const r=Qt(n);(t===void 0||t{const r=Qt(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function gw(e,t){const n=Qt(e),r=Qt(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function Ca(e,t){const n=Jv(e),r=Jv(t);return+n==+r}function WL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fOe(e){if(!WL(e)&&typeof e!="number")return!1;const t=Qt(e);return!isNaN(Number(t))}function ey(e,t){const n=Qt(e),r=Qt(t),o=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return o*12+i}function dOe(e,t,n){const r=Xu(e,n),o=Xu(t,n),i=+r-qE(r),a=+o-qE(o);return Math.round((i-a)/qL)}function hOe(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()-r.getFullYear()}function pOe(e,t){const n=Qt(e),r=Qt(t),o=z7(n,r),i=Math.abs(kl(n,r));n.setDate(n.getDate()-o*i);const a=+(z7(n,r)===-o),s=o*(i-a);return s===0?0:s}function z7(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function HL(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function GL(e,t){return+Qt(e)-+Qt(t)}function mOe(e,t,n){const r=GL(e,t)/VL;return HL(n==null?void 0:n.roundingMethod)(r)}function gOe(e,t,n){const r=GL(e,t)/UL;return HL(n==null?void 0:n.roundingMethod)(r)}function vOe(e){const t=Qt(e);return t.setHours(23,59,59,999),t}function gR(e){const t=Qt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function yOe(e){const t=Qt(e);return+vOe(t)==+gR(t)}function wOe(e,t){const n=Qt(e),r=Qt(t),o=gw(n,r),i=Math.abs(ey(n,r));let a;if(i<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*i);let s=gw(n,r)===-o;yOe(Qt(e))&&i===1&&gw(e,r)===1&&(s=!1),a=o*(i-Number(s))}return a===0?0:a}function xOe(e,t,n){const r=GL(e,t)/1e3;return HL(n==null?void 0:n.roundingMethod)(r)}function bOe(e,t){const n=Qt(e),r=Qt(t),o=gw(n,r),i=Math.abs(hOe(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=gw(n,r)===-o,s=o*(i-+a);return s===0?0:s}function Ta(e){const t=Qt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zJ(e){const t=Qt(e),n=Aa(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function KL(e,t){var s,l,u,c;const n=fb(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=Qt(e),i=o.getDay(),a=(i{let r;const o=SOe[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function nA(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const EOe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},COe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OOe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ROe={date:nA({formats:EOe,defaultWidth:"full"}),time:nA({formats:COe,defaultWidth:"full"}),dateTime:nA({formats:OOe,defaultWidth:"full"})},POe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TOe=(e,t,n,r)=>POe[e];function O1(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const AOe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kOe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NOe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},MOe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jOe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},IOe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},DOe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},LOe={ordinalNumber:DOe,era:O1({values:AOe,defaultWidth:"wide"}),quarter:O1({values:kOe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:O1({values:NOe,defaultWidth:"wide"}),day:O1({values:MOe,defaultWidth:"wide"}),dayPeriod:O1({values:jOe,defaultWidth:"wide",formattingValues:IOe,defaultFormattingWidth:"wide"})};function R1(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?FOe(s,d=>d.test(a)):$Oe(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function $Oe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function FOe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const zOe=/^(\d+)(th|st|nd|rd)?/i,qOe=/\d+/i,UOe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VOe={any:[/^b/i,/^(a|c)/i]},WOe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},HOe={any:[/1/i,/2/i,/3/i,/4/i]},GOe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KOe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YOe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},XOe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},QOe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ZOe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JOe={ordinalNumber:BOe({matchPattern:zOe,parsePattern:qOe,valueCallback:e=>parseInt(e,10)}),era:R1({matchPatterns:UOe,defaultMatchWidth:"wide",parsePatterns:VOe,defaultParseWidth:"any"}),quarter:R1({matchPatterns:WOe,defaultMatchWidth:"wide",parsePatterns:HOe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:R1({matchPatterns:GOe,defaultMatchWidth:"wide",parsePatterns:KOe,defaultParseWidth:"any"}),day:R1({matchPatterns:YOe,defaultMatchWidth:"wide",parsePatterns:XOe,defaultParseWidth:"any"}),dayPeriod:R1({matchPatterns:QOe,defaultMatchWidth:"any",parsePatterns:ZOe,defaultParseWidth:"any"})},UJ={code:"en-US",formatDistance:_Oe,formatLong:ROe,formatRelative:TOe,localize:LOe,match:JOe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eRe(e){const t=Qt(e);return kl(t,zJ(t))+1}function VJ(e){const t=Qt(e),n=+Jp(t)-+sOe(t);return Math.round(n/qL)+1}function WJ(e,t){var c,d,h,p;const n=Qt(e),r=n.getFullYear(),o=fb(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=Aa(e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Xu(a,t),l=Aa(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=Xu(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function tRe(e,t){var s,l,u,c;const n=fb(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=WJ(e,t),i=Aa(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Xu(i,t)}function HJ(e,t){const n=Qt(e),r=+Xu(n,t)-+tRe(n,t);return Math.round(r/qL)+1}function fr(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const sd={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return fr(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):fr(n+1,2)},d(e,t){return fr(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return fr(e.getHours()%12||12,t.length)},H(e,t){return fr(e.getHours(),t.length)},m(e,t){return fr(e.getMinutes(),t.length)},s(e,t){return fr(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return fr(o,t.length)}},Hg={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q7={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return sd.y(e,t)},Y:function(e,t,n,r){const o=WJ(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return fr(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):fr(i,t.length)},R:function(e,t){const n=BJ(e);return fr(n,t.length)},u:function(e,t){const n=e.getFullYear();return fr(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return fr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return fr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return sd.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return fr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=HJ(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):fr(o,t.length)},I:function(e,t,n){const r=VJ(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):fr(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):sd.d(e,t)},D:function(e,t,n){const r=eRe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):fr(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return fr(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return fr(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return fr(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Hg.noon:r===0?o=Hg.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Hg.evening:r>=12?o=Hg.afternoon:r>=4?o=Hg.morning:o=Hg.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return sd.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):sd.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):fr(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):fr(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):sd.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):sd.s(e,t)},S:function(e,t){return sd.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return V7(r);case"XXXX":case"XX":return hp(r);case"XXXXX":case"XXX":default:return hp(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return V7(r);case"xxxx":case"xx":return hp(r);case"xxxxx":case"xxx":default:return hp(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+U7(r,":");case"OOOO":default:return"GMT"+hp(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+U7(r,":");case"zzzz":default:return"GMT"+hp(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return fr(r,t.length)},T:function(e,t,n){const r=e.getTime();return fr(r,t.length)}};function U7(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+fr(i,2)}function V7(e,t){return e%60===0?(e>0?"-":"+")+fr(Math.abs(e)/60,2):hp(e,t)}function hp(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=fr(Math.trunc(r/60),2),i=fr(r%60,2);return n+o+t+i}const W7=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},GJ=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},nRe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return W7(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",W7(r,t)).replace("{{time}}",GJ(o,t))},rRe={p:GJ,P:nRe},oRe=/^D+$/,iRe=/^Y+$/,aRe=["D","DD","YY","YYYY"];function sRe(e){return oRe.test(e)}function lRe(e){return iRe.test(e)}function uRe(e,t,n){const r=cRe(e,t,n);if(console.warn(r),aRe.includes(e))throw new RangeError(r)}function cRe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const fRe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dRe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hRe=/^'([^]*?)'?$/,pRe=/''/g,mRe=/[a-zA-Z]/;function yf(e,t,n){var c,d,h,p,x,y,w,_;const r=fb(),o=(n==null?void 0:n.locale)??r.locale??UJ,i=(n==null?void 0:n.firstWeekContainsDate)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((y=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((_=(w=r.locale)==null?void 0:w.options)==null?void 0:_.weekStartsOn)??0,s=Qt(e);if(!fOe(s))throw new RangeError("Invalid time value");let l=t.match(dRe).map(C=>{const O=C[0];if(O==="p"||O==="P"){const P=rRe[O];return P(C,o.formatLong)}return C}).join("").match(fRe).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const O=C[0];if(O==="'")return{isToken:!1,value:gRe(C)};if(q7[O])return{isToken:!0,value:C};if(O.match(mRe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:C}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(C=>{if(!C.isToken)return C.value;const O=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&lRe(O)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&sRe(O))&&uRe(O,t,String(e));const P=q7[O[0]];return P(s,O,o.localize,u)}).join("")}function gRe(e){const t=e.match(hRe);return t?t[1].replace(pRe,"'"):e}function vRe(e){const t=Qt(e),n=t.getFullYear(),r=t.getMonth(),o=Aa(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function yRe(e){return Math.trunc(+Qt(e)/1e3)}function wRe(e){const t=Qt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function xRe(e,t){return dOe(wRe(e),Ta(e),t)+1}function bRe(e){const t=Qt(e.start),n=Qt(e.end),r={},o=bOe(n,t);o&&(r.years=o);const i=av(t,{years:r.years}),a=wOe(n,i);a&&(r.months=a);const s=av(i,{months:r.months}),l=pOe(n,s);l&&(r.days=l);const u=av(s,{days:r.days}),c=mOe(n,u);c&&(r.hours=c);const d=av(u,{hours:r.hours}),h=gOe(n,d);h&&(r.minutes=h);const p=av(d,{minutes:r.minutes}),x=xOe(n,p);return x&&(r.seconds=x),r}function ZI(e,t){const n=Qt(e),r=Qt(t);return n.getTime()>r.getTime()}function KJ(e,t){const n=Qt(e),r=Qt(t);return+n<+r}function YL(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function SRe(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()===r.getFullYear()}function rA(e,t){return Ei(e,-t)}function _Re(e,t){const r=RRe(e);let o;if(r.date){const l=PRe(r.date,2);o=TRe(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const i=o.getTime();let a=0,s;if(r.time&&(a=ARe(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=kRe(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(i+a),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(i+a+s)}const g_={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ERe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,CRe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ORe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function RRe(e){const t={},n=e.split(g_.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],g_.timeZoneDelimiter.test(t.date)&&(t.date=e.split(g_.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const o=g_.timezone.exec(r);o?(t.time=r.replace(o[1],""),t.timezone=o[1]):t.time=r}return t}function PRe(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function TRe(e,t){if(t===null)return new Date(NaN);const n=e.match(ERe);if(!n)return new Date(NaN);const r=!!n[4],o=P1(n[1]),i=P1(n[2])-1,a=P1(n[3]),s=P1(n[4]),l=P1(n[5])-1;if(r)return DRe(t,s,l)?NRe(t,s,l):new Date(NaN);{const u=new Date(0);return!jRe(t,i,a)||!IRe(t,o)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(o,a)),u)}}function P1(e){return e?parseInt(e):1}function ARe(e){const t=e.match(CRe);if(!t)return NaN;const n=oA(t[1]),r=oA(t[2]),o=oA(t[3]);return LRe(n,r,o)?n*VL+r*UL+o*1e3:NaN}function oA(e){return e&&parseFloat(e.replace(",","."))||0}function kRe(e){if(e==="Z")return 0;const t=e.match(ORe);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return $Re(r,o)?n*(r*VL+o*UL):NaN}function NRe(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,i=(t-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const MRe=[31,null,31,30,31,30,31,31,30,31,30,31];function YJ(e){return e%400===0||e%4===0&&e%100!==0}function jRe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(MRe[t]||(YJ(e)?29:28))}function IRe(e,t){return t>=1&&t<=(YJ(e)?366:365)}function DRe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function LRe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function $Re(e,t){return t>=0&&t<=59}function iA(e,t){const n=Qt(e),r=n.getFullYear(),o=n.getDate(),i=Aa(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const a=vRe(i);return n.setMonth(t,Math.min(o,a)),n}function H7(e,t){const n=Qt(e);return isNaN(+n)?Aa(e,NaN):(n.setFullYear(t),n)}var FRe=["second","minute","hour","day","week","month","year"];function BRe(e,t){if(t===0)return["just now","right now"];var n=FRe[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var zRe=["秒","分钟","小时","天","周","个月","年"];function qRe(e,t){if(t===0)return["刚刚","片刻后"];var n=zRe[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var JI={},XJ=function(e,t){JI[e]=t},QJ=function(e){return JI[e]||JI.en_US},bp=[60,60,24,7,365/7/12,12];function G7(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function ZJ(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=bp[o]&&o(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function JJ(e,t){var n=t?G7(t):new Date;return(+n-+G7(e))/1e3}function URe(e){for(var t=1,n=0,r=Math.abs(e);e>=bp[n]&&n{const n=b.useMemo(()=>typeof e=="string"?_Re(e):e,[e]),[r,o]=b.useState("");return b.useEffect(()=>{if(t){const i=()=>{const s=new Date,l=n.getTime()-s.getTime();if(l<=0){o("");return}const u=Math.floor(l/(1e3*3600*24)),c=Math.floor(l%(1e3*3600*24)/(1e3*3600)),d=Math.floor(l%(1e3*3600)/(1e3*60)),h=Math.floor(l%(1e3*60)/1e3),p=[];u>0&&p.push(`${u}d`),(c>0||u>0)&&p.push(`${c}h`),(d>0||c>0||u>0)&&p.push(`${d}m`),p.push(`${h}s`),o(p.join(" "))};i();const a=setInterval(i,1e3);return()=>{clearInterval(a)}}},[n,t]),e=="0001-01-01T00:00:00Z"?null:v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,onFocusCapture:i=>{i.stopPropagation()},children:v.jsx("span",{children:t&&r?r:v.jsx(QRe,{datetime:n})})}),v.jsx(Us,{side:"top",children:yf(n,"yyyy-MM-dd HH:mm:ss.SSS zzz")})]})})};function Y7(e,t){const n=[];if(e.days&&n.push(`${e.days}d`),e.hours&&n.push(`${e.hours}h`),e.minutes&&n.push(`${e.minutes}m`),t<1e4&&e.seconds){const r=Math.floor(t%1e3/10);return n.push(`${e.seconds}.${r.toString().padStart(2,"0")}s`),n.join(" ")}if(e.seconds&&n.push(`${e.seconds}s`),t<1e3){const r=t%1e3;n.push(`${r}ms`)}return n.join(" ")}const X7=e=>{if(!e)return!1;const t=typeof e=="string"?new Date(e):e;return t.getFullYear()<=1?!1:!isNaN(t.getTime())&&t.getFullYear()>1970},aA=Ul("text-sm",{variants:{variant:{default:"text-muted-foreground",compact:"font-mono text-xs"}},defaultVariants:{variant:"default"}});function ZRe({className:e,variant:t,start:n,end:r,status:o,showIcon:i=!0,asChild:a,...s}){if(!X7(n))return v.jsx("span",{className:je(!a&&aA({variant:t}),e),...s,children:"-"});const l=typeof n=="string"?new Date(n):n,u=X7(r)?new Date(r):new Date,c=bRe({start:l,end:u}),d=u.getTime()-l.getTime(),h=o==="RUNNING",p=v.jsxs("span",{className:"flex items-center gap-1",children:[i?v.jsx(P1e,{className:"h-3.5 w-3.5"}):null,v.jsxs("span",{className:h?"animate-pulse":"",children:[Y7(c,d),h?"...":null]})]});return t==="compact"?v.jsx("span",{className:je(!a&&aA({variant:t}),e),...s,children:p}):v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsx("span",{className:je(!a&&aA({variant:t}),e),...s,children:p})}),v.jsxs(Us,{children:[h?"Running for ":"",Y7(c,d)]})]})})}function ree(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vR="Checkbox",[JRe]=fs(vR),[ePe,QL]=JRe(vR);function tPe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[h,p]=qs({prop:n,defaultProp:o??!1,onChange:l,caller:vR}),[x,y]=b.useState(null),[w,_]=b.useState(null),C=b.useRef(!1),O=x?!!a||!!x.closest("form"):!0,P={checked:h,disabled:i,setChecked:p,control:x,setControl:y,name:s,form:a,value:c,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:Fd(o)?!1:o,isFormControl:O,bubbleInput:w,setBubbleInput:_};return v.jsx(ePe,{scope:t,...P,children:nPe(d)?d(P):r})}var oee="CheckboxTrigger",iee=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:a,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:x}=QL(oee,e),y=Bn(o,c),w=b.useRef(l);return b.useEffect(()=>{const _=i==null?void 0:i.form;if(_){const C=()=>d(w.current);return _.addEventListener("reset",C),()=>_.removeEventListener("reset",C)}},[i,d]),v.jsx(Zt.button,{type:"button",role:"checkbox","aria-checked":Fd(l)?"mixed":l,"aria-required":u,"data-state":cee(l),"data-disabled":s?"":void 0,disabled:s,value:a,...r,ref:y,onKeyDown:Ze(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Ze(n,_=>{d(C=>Fd(C)?!0:!C),x&&p&&(h.current=_.isPropagationStopped(),h.current||_.stopPropagation())})})});iee.displayName=oee;var ZL=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return v.jsx(tPe,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:h})=>v.jsxs(v.Fragment,{children:[v.jsx(iee,{...d,ref:t,__scopeCheckbox:n}),h&&v.jsx(uee,{__scopeCheckbox:n})]})})});ZL.displayName=vR;var aee="CheckboxIndicator",see=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=QL(aee,n);return v.jsx(ji,{present:r||Fd(i.checked)||i.checked===!0,children:v.jsx(Zt.span,{"data-state":cee(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});see.displayName=aee;var lee="CheckboxBubbleInput",uee=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:h,setBubbleInput:p}=QL(lee,e),x=Bn(n,p),y=ree(i),w=BY(r);b.useEffect(()=>{const C=h;if(!C)return;const O=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(O,"checked").set,T=!o.current;if(y!==i&&R){const k=new Event("click",{bubbles:T});C.indeterminate=Fd(i),R.call(C,Fd(i)?!1:i),C.dispatchEvent(k)}},[h,y,i,o]);const _=b.useRef(Fd(i)?!1:i);return v.jsx(Zt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});uee.displayName=lee;function nPe(e){return typeof e=="function"}function Fd(e){return e==="indeterminate"}function cee(e){return Fd(e)?"indeterminate":e?"checked":"unchecked"}const qp=b.forwardRef(({className:e,...t},n)=>v.jsx(ZL,{ref:n,className:je("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:v.jsx(see,{className:je("flex items-center justify-center text-current"),children:v.jsx(iR,{className:"h-4 w-4"})})}));qp.displayName=ZL.displayName;const Ps={taskName:"Task Name",status:"Status",workflow:"Workflow",parentTaskExternalId:"Parent Task External ID",flattenDAGs:"Flatten DAGs",runningFilter:"Running Filter",createdAt:"Created At",startedAt:"Started At",finishedAt:"Finished At",duration:"Duration",additionalMetadata:"Metadata"},JL="workflow",rPe="parentTaskExternalId",db="flattenDAGs",fee="createdAt",oPe="startedAt",iPe="finishedAt",aPe="duration",vw="additionalMetadata",sPe="taskName",Up="status",dee="createdAfter",hee="finishedBefore",pee="isCustomTimeRange",mee="timeWindow",yR="runningFilter",lPe=(e,t,n,r,o)=>[{id:"select",header:({table:i})=>v.jsx(qp,{checked:i.getIsAllPageRowsSelected()||i.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:a=>i.toggleAllPageRowsSelected(!!a),"aria-label":"Select all",className:"translate-y-[2px]"}),cell:({row:i})=>v.jsxs("div",{className:je(`pl-${i.depth*4}`,"flex flex-row items-center justify-start gap-x-2"),children:[v.jsx(qp,{checked:i.getIsSelected(),onCheckedChange:a=>i.toggleSelected(!!a),"aria-label":"Select row"}),i.getCanExpand()&&v.jsx(wt,{onClick:()=>i.toggleExpanded(),variant:"icon",className:"px-2",hoverText:"Show tasks",children:i.getIsExpanded()?v.jsx(YX,{className:"size-4"}):v.jsx(XX,{className:"size-4"})})]}),enableSorting:!1,enableHiding:!1},{accessorKey:sPe,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.taskName}),cell:({row:i})=>i.getCanExpand()?v.jsx(Bl,{to:At.tenantRunRoute.to,params:{tenant:e,run:i.original.metadata.id},children:v.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:i.original.displayName})}):v.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",onClick:()=>r(i.original.metadata.id),children:i.original.displayName}),enableSorting:!1,enableHiding:!1},{accessorKey:Up,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.status}),cell:({row:i})=>v.jsx(rOe,{className:"items-center justify-center px-2 text-center",status:i.original.status,errorMessage:i.original.errorMessage}),enableSorting:!1,enableHiding:!1},{accessorKey:JL,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.workflow}),cell:({row:i})=>{const a=i.original.workflowId,s=i.original.workflowName;return v.jsx("div",{className:"min-w-fit whitespace-nowrap",children:a&&s&&v.jsx(Bl,{to:At.tenantWorkflowRoute.to,params:{tenant:e,workflow:a},children:s})||"N/A"})},show:!1,enableSorting:!1,enableHiding:!0},{accessorKey:rPe,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.parentTaskExternalId}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:db,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.flattenDAGs}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:yR,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.runningFilter}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:fee,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.createdAt,className:"whitespace-nowrap"}),cell:({row:i})=>v.jsx("div",{className:"whitespace-nowrap",children:i.original.metadata.createdAt?v.jsx(Ml,{date:i.original.metadata.createdAt}):"N/A"}),enableSorting:!1,enableHiding:!0},{accessorKey:oPe,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.startedAt,className:"whitespace-nowrap"}),cell:({row:i})=>v.jsx("div",{className:"whitespace-nowrap",children:i.original.startedAt?v.jsx(Ml,{date:i.original.startedAt}):"N/A"}),enableSorting:!1,enableHiding:!0},{accessorKey:iPe,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.finishedAt,className:"whitespace-nowrap"}),cell:({row:i})=>{const a=i.original.finishedAt?v.jsx(Ml,{date:i.original.finishedAt}):"N/A";return v.jsx("div",{className:"whitespace-nowrap",children:a})},enableSorting:!1,enableHiding:!0},{accessorKey:aPe,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.duration}),cell:({row:i})=>{const a=i.original.startedAt,s=i.original.finishedAt,l=i.getValue(Up);return v.jsx(ZRe,{start:a,end:s,status:l,variant:"compact"})},enableSorting:!1,enableHiding:!0},{accessorKey:vw,header:({column:i})=>v.jsx(Dr,{column:i,title:Ps.additionalMetadata}),cell:({row:i})=>i.original.additionalMetadata?v.jsx(XI,{metadata:i.original.additionalMetadata,onClick:n,isOpen:t===i.original.metadata.id,onOpenChange:a=>{o(i.original.metadata.id,a)}}):v.jsx("div",{}),enableSorting:!1},{id:"actions",cell:({row:i})=>v.jsx(oOe,{row:i.original,actions:[{label:"Copy Run Id",onClick:()=>{navigator.clipboard.writeText(i.original.metadata.id)}}]})}];function gee(e,t,n){const[r,o]=Zx(),i=b.useMemo(()=>{const c=r.get(t);if(!c)return e.parse({});try{const d=typeof c=="string"?JSON.parse(c):c;return e.parse(d)}catch{return e.parse({})}},[r,t,e]),a=b.useCallback(c=>{o(d=>({...Object.fromEntries(d.entries()),[t]:c}))},[t,o]),s=b.useMemo(()=>{const c=[];return Object.entries(n).forEach(([d,h])=>{const p=i[d];p!=null&&(Array.isArray(p)&&p.length>0?c.push({id:h,value:p}):typeof p=="string"&&p.length>0?c.push({id:h,value:p}):(typeof p=="number"||typeof p=="boolean")&&c.push({id:h,value:p}))}),c},[i,n]),l=b.useCallback(c=>{const h=typeof c=="function"?c(s):c,p={...i};Object.keys(n).forEach(x=>{const y=i[x];Array.isArray(y)?p[x]=[]:p[x]=void 0}),h.forEach(x=>{var w;const y=(w=Object.entries(n).find(([,_])=>_===x.id))==null?void 0:w[0];y&&(p[y]=x.value)}),a(p)},[s,i,a,n]),u=b.useCallback(()=>{const c=e.parse({});a(c)},[e,a]);return{state:i,columnFilters:s,setColumnFilters:l,resetFilters:u}}var Qn;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Qn||(Qn={}));var Q7;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Q7||(Q7={}));const Ct=Qn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),dd=e=>{switch(typeof e){case"undefined":return Ct.undefined;case"string":return Ct.string;case"number":return Number.isNaN(e)?Ct.nan:Ct.number;case"boolean":return Ct.boolean;case"function":return Ct.function;case"bigint":return Ct.bigint;case"symbol":return Ct.symbol;case"object":return Array.isArray(e)?Ct.array:e===null?Ct.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ct.promise:typeof Map<"u"&&e instanceof Map?Ct.map:typeof Set<"u"&&e instanceof Set?Ct.set:typeof Date<"u"&&e instanceof Date?Ct.date:Ct.object;default:return Ct.unknown}},Je=Qn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ff extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;ln.message){const n={},r=[];for(const o of this.issues)if(o.path.length>0){const i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ff.create=e=>new ff(e);const nD=(e,t)=>{let n;switch(e.code){case Je.invalid_type:e.received===Ct.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Je.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Qn.jsonStringifyReplacer)}`;break;case Je.unrecognized_keys:n=`Unrecognized key(s) in object: ${Qn.joinValues(e.keys,", ")}`;break;case Je.invalid_union:n="Invalid input";break;case Je.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Qn.joinValues(e.options)}`;break;case Je.invalid_enum_value:n=`Invalid enum value. Expected ${Qn.joinValues(e.options)}, received '${e.received}'`;break;case Je.invalid_arguments:n="Invalid function arguments";break;case Je.invalid_return_type:n="Invalid function return type";break;case Je.invalid_date:n="Invalid date";break;case Je.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Qn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Je.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Je.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Je.custom:n="Invalid input";break;case Je.invalid_intersection_types:n="Intersection results could not be merged";break;case Je.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Je.not_finite:n="Number must be finite";break;default:n=t.defaultError,Qn.assertNever(e)}return{message:n}};let uPe=nD;function cPe(){return uPe}const fPe=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function dt(e,t){const n=cPe(),r=fPe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===nD?void 0:nD].filter(o=>!!o)});e.common.issues.push(r)}class ls{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return cn;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return ls.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return cn;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const cn=Object.freeze({status:"aborted"}),Q1=e=>({status:"dirty",value:e}),Gs=e=>({status:"valid",value:e}),Z7=e=>e.status==="aborted",J7=e=>e.status==="dirty",ty=e=>e.status==="valid",UE=e=>typeof Promise<"u"&&e instanceof Promise;var jt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(jt||(jt={}));class Gd{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const e9=(e,t)=>{if(ty(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ff(e.common.issues);return this._error=n,this._error}}};function On(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Kn{get description(){return this._def.description}_getType(t){return dd(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:dd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ls,ctx:{common:t.parent.common,data:t.data,parsedType:dd(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(UE(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)},o=this._parseSync({data:t,path:r.path,parent:r});return e9(r,o)}"~validate"(t){var r,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return ty(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>ty(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dd(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(UE(o)?o:Promise.resolve(o));return e9(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:Je.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new nm({schema:this,typeName:fn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return tf.create(this,this._def)}nullable(){return rm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wu.create(this)}promise(){return YE.create(this,this._def)}or(t){return WE.create([this,t],this._def)}and(t){return HE.create(this,t,this._def)}transform(t){return new nm({...On(this._def),schema:this,typeName:fn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new XE({...On(this._def),innerType:this,defaultValue:n,typeName:fn.ZodDefault})}brand(){return new xee({typeName:fn.ZodBranded,type:this,...On(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new QE({...On(this._def),innerType:this,catchValue:n,typeName:fn.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return t$.create(this,t)}readonly(){return ZE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dPe=/^c[^\s-]{8,}$/i,hPe=/^[0-9a-z]+$/,pPe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mPe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gPe=/^[a-z0-9_-]{21}$/i,vPe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yPe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wPe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xPe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sA;const bPe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,SPe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_Pe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,EPe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CPe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,OPe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vee="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",RPe=new RegExp(`^${vee}$`);function yee(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function PPe(e){return new RegExp(`^${yee(e)}$`)}function TPe(e){let t=`${vee}T${yee(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function APe(e,t){return!!((t==="v4"||!t)&&bPe.test(e)||(t==="v6"||!t)&&_Pe.test(e))}function kPe(e,t){if(!vPe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function NPe(e,t){return!!((t==="v4"||!t)&&SPe.test(e)||(t==="v6"||!t)&&EPe.test(e))}class Nd extends Kn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ct.string){const i=this._getOrReturnCtx(t);return dt(i,{code:Je.invalid_type,expected:Ct.string,received:i.parsedType}),cn}const r=new ls;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Je.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.lengtht.test(o),{validation:n,code:Je.invalid_string,...jt.errToObj(r)})}_addCheck(t){return new Nd({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...jt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...jt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...jt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...jt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...jt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...jt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...jt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...jt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...jt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...jt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...jt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...jt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...jt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...jt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...jt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...jt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...jt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...jt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...jt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...jt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...jt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...jt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...jt.errToObj(n)})}nonempty(t){return this.min(1,jt.errToObj(t))}trim(){return new Nd({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Nd({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Nd({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Nd({checks:[],typeName:fn.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...On(e)});function MPe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class ny extends Kn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ct.number){const i=this._getOrReturnCtx(t);return dt(i,{code:Je.invalid_type,expected:Ct.number,received:i.parsedType}),cn}let r;const o=new ls;for(const i of this._def.checks)i.kind==="int"?Qn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?MPe(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.not_finite,message:i.message}),o.dirty()):Qn.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,jt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,jt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,jt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,jt.toString(n))}setLimit(t,n,r,o){return new ny({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:jt.toString(o)}]})}_addCheck(t){return new ny({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:jt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:jt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:jt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:jt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:jt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:jt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:jt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:jt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:jt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&Qn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ny({checks:[],typeName:fn.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...On(e)});class zw extends Kn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ct.bigint)return this._getInvalidInput(t);let r;const o=new ls;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),dt(r,{code:Je.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Qn.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return dt(n,{code:Je.invalid_type,expected:Ct.bigint,received:n.parsedType}),cn}gte(t,n){return this.setLimit("min",t,!0,jt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,jt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,jt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,jt.toString(n))}setLimit(t,n,r,o){return new zw({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:jt.toString(o)}]})}_addCheck(t){return new zw({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:jt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:jt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:jt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:jt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:jt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew zw({checks:[],typeName:fn.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...On(e)});class rD extends Kn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ct.boolean){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.boolean,received:r.parsedType}),cn}return Gs(t.data)}}rD.create=e=>new rD({typeName:fn.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...On(e)});class VE extends Kn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ct.date){const i=this._getOrReturnCtx(t);return dt(i,{code:Je.invalid_type,expected:Ct.date,received:i.parsedType}),cn}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return dt(i,{code:Je.invalid_date}),cn}const r=new ls;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(o=this._getOrReturnCtx(t,o),dt(o,{code:Je.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Qn.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new VE({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:jt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:jt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew VE({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:fn.ZodDate,...On(e)});class t9 extends Kn{_parse(t){if(this._getType(t)!==Ct.symbol){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.symbol,received:r.parsedType}),cn}return Gs(t.data)}}t9.create=e=>new t9({typeName:fn.ZodSymbol,...On(e)});class oD extends Kn{_parse(t){if(this._getType(t)!==Ct.undefined){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.undefined,received:r.parsedType}),cn}return Gs(t.data)}}oD.create=e=>new oD({typeName:fn.ZodUndefined,...On(e)});class iD extends Kn{_parse(t){if(this._getType(t)!==Ct.null){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.null,received:r.parsedType}),cn}return Gs(t.data)}}iD.create=e=>new iD({typeName:fn.ZodNull,...On(e)});class n9 extends Kn{constructor(){super(...arguments),this._any=!0}_parse(t){return Gs(t.data)}}n9.create=e=>new n9({typeName:fn.ZodAny,...On(e)});class r9 extends Kn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Gs(t.data)}}r9.create=e=>new r9({typeName:fn.ZodUnknown,...On(e)});class Kd extends Kn{_parse(t){const n=this._getOrReturnCtx(t);return dt(n,{code:Je.invalid_type,expected:Ct.never,received:n.parsedType}),cn}}Kd.create=e=>new Kd({typeName:fn.ZodNever,...On(e)});class o9 extends Kn{_parse(t){if(this._getType(t)!==Ct.undefined){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.void,received:r.parsedType}),cn}return Gs(t.data)}}o9.create=e=>new o9({typeName:fn.ZodVoid,...On(e)});class Wu extends Kn{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ct.array)return dt(n,{code:Je.invalid_type,expected:Ct.array,received:n.parsedType}),cn;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.lengtho.maxLength.value&&(dt(n,{code:Je.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Gd(n,a,n.path,s)))).then(a=>ls.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Gd(n,a,n.path,s)));return ls.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Wu({...this._def,minLength:{value:t,message:jt.toString(n)}})}max(t,n){return new Wu({...this._def,maxLength:{value:t,message:jt.toString(n)}})}length(t,n){return new Wu({...this._def,exactLength:{value:t,message:jt.toString(n)}})}nonempty(t){return this.min(1,t)}}Wu.create=(e,t)=>new Wu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:fn.ZodArray,...On(t)});function sv(e){if(e instanceof mo){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=tf.create(sv(r))}return new mo({...e._def,shape:()=>t})}else return e instanceof Wu?new Wu({...e._def,type:sv(e.element)}):e instanceof tf?tf.create(sv(e.unwrap())):e instanceof rm?rm.create(sv(e.unwrap())):e instanceof em?em.create(e.items.map(t=>sv(t))):e}class mo extends Kn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Qn.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ct.object){const u=this._getOrReturnCtx(t);return dt(u,{code:Je.invalid_type,expected:Ct.object,received:u.parsedType}),cn}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Kd&&this._def.unknownKeys==="strip"))for(const u in o.data)a.includes(u)||s.push(u);const l=[];for(const u of a){const c=i[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Gd(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Kd){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")s.length>0&&(dt(o,{code:Je.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Gd(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>ls.mergeObjectSync(r,u)):ls.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return jt.errToObj,new mo({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a;const o=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:jt.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new mo({...this._def,unknownKeys:"strip"})}passthrough(){return new mo({...this._def,unknownKeys:"passthrough"})}extend(t){return new mo({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mo({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:fn.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mo({...this._def,catchall:t})}pick(t){const n={};for(const r of Qn.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new mo({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Qn.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new mo({...this._def,shape:()=>n})}deepPartial(){return sv(this)}partial(t){const n={};for(const r of Qn.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new mo({...this._def,shape:()=>n})}required(t){const n={};for(const r of Qn.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof tf;)i=i._def.innerType;n[r]=i}return new mo({...this._def,shape:()=>n})}keyof(){return wee(Qn.objectKeys(this.shape))}}mo.create=(e,t)=>new mo({shape:()=>e,unknownKeys:"strip",catchall:Kd.create(),typeName:fn.ZodObject,...On(t)});mo.strictCreate=(e,t)=>new mo({shape:()=>e,unknownKeys:"strict",catchall:Kd.create(),typeName:fn.ZodObject,...On(t)});mo.lazycreate=(e,t)=>new mo({shape:e,unknownKeys:"strip",catchall:Kd.create(),typeName:fn.ZodObject,...On(t)});class WE extends Kn{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new ff(s.ctx.common.issues));return dt(n,{code:Je.invalid_union,unionErrors:a}),cn}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new ff(l));return dt(n,{code:Je.invalid_union,unionErrors:s}),cn}}get options(){return this._def.options}}WE.create=(e,t)=>new WE({options:e,typeName:fn.ZodUnion,...On(t)});const Uc=e=>e instanceof sD?Uc(e.schema):e instanceof nm?Uc(e.innerType()):e instanceof GE?[e.value]:e instanceof tm?e.options:e instanceof KE?Qn.objectValues(e.enum):e instanceof XE?Uc(e._def.innerType):e instanceof oD?[void 0]:e instanceof iD?[null]:e instanceof tf?[void 0,...Uc(e.unwrap())]:e instanceof rm?[null,...Uc(e.unwrap())]:e instanceof xee||e instanceof ZE?Uc(e.unwrap()):e instanceof QE?Uc(e._def.innerType):[];class e$ extends Kn{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ct.object)return dt(n,{code:Je.invalid_type,expected:Ct.object,received:n.parsedType}),cn;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(dt(n,{code:Je.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),cn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Uc(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new e$({typeName:fn.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...On(r)})}}function aD(e,t){const n=dd(e),r=dd(t);if(e===t)return{valid:!0,data:e};if(n===Ct.object&&r===Ct.object){const o=Qn.objectKeys(t),i=Qn.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=aD(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ct.array&&r===Ct.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i{if(Z7(i)||Z7(a))return cn;const s=aD(i.value,a.value);return s.valid?((J7(i)||J7(a))&&n.dirty(),{status:n.value,value:s.data}):(dt(r,{code:Je.invalid_intersection_types}),cn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}HE.create=(e,t,n)=>new HE({left:e,right:t,typeName:fn.ZodIntersection,...On(n)});class em extends Kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ct.array)return dt(r,{code:Je.invalid_type,expected:Ct.array,received:r.parsedType}),cn;if(r.data.lengththis._def.items.length&&(dt(r,{code:Je.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Gd(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ls.mergeArray(n,a)):ls.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new em({...this._def,rest:t})}}em.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new em({items:e,typeName:fn.ZodTuple,rest:null,...On(t)})};class i9 extends Kn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ct.map)return dt(r,{code:Je.invalid_type,expected:Ct.map,received:r.parsedType}),cn;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],u)=>({key:o._parse(new Gd(r,s,r.path,[u,"key"])),value:i._parse(new Gd(r,l,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return cn;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return cn;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}i9.create=(e,t,n)=>new i9({valueType:t,keyType:e,typeName:fn.ZodMap,...On(n)});class qw extends Kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ct.set)return dt(r,{code:Je.invalid_type,expected:Ct.set,received:r.parsedType}),cn;const o=this._def;o.minSize!==null&&r.data.sizeo.maxSize.value&&(dt(r,{code:Je.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return cn;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((l,u)=>i._parse(new Gd(r,l,r.path,u)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new qw({...this._def,minSize:{value:t,message:jt.toString(n)}})}max(t,n){return new qw({...this._def,maxSize:{value:t,message:jt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}qw.create=(e,t)=>new qw({valueType:e,minSize:null,maxSize:null,typeName:fn.ZodSet,...On(t)});class sD extends Kn{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}sD.create=(e,t)=>new sD({getter:e,typeName:fn.ZodLazy,...On(t)});class GE extends Kn{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return dt(n,{received:n.data,code:Je.invalid_literal,expected:this._def.value}),cn}return{status:"valid",value:t.data}}get value(){return this._def.value}}GE.create=(e,t)=>new GE({value:e,typeName:fn.ZodLiteral,...On(t)});function wee(e,t){return new tm({values:e,typeName:fn.ZodEnum,...On(t)})}class tm extends Kn{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{expected:Qn.joinValues(r),received:n.parsedType,code:Je.invalid_type}),cn}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return dt(n,{received:n.data,code:Je.invalid_enum_value,options:r}),cn}return Gs(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return tm.create(t,{...this._def,...n})}exclude(t,n=this._def){return tm.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}tm.create=wee;class KE extends Kn{_parse(t){const n=Qn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ct.string&&r.parsedType!==Ct.number){const o=Qn.objectValues(n);return dt(r,{expected:Qn.joinValues(o),received:r.parsedType,code:Je.invalid_type}),cn}if(this._cache||(this._cache=new Set(Qn.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Qn.objectValues(n);return dt(r,{received:r.data,code:Je.invalid_enum_value,options:o}),cn}return Gs(t.data)}get enum(){return this._def.values}}KE.create=(e,t)=>new KE({values:e,typeName:fn.ZodNativeEnum,...On(t)});class YE extends Kn{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ct.promise&&n.common.async===!1)return dt(n,{code:Je.invalid_type,expected:Ct.promise,received:n.parsedType}),cn;const r=n.parsedType===Ct.promise?n.data:Promise.resolve(n.data);return Gs(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}YE.create=(e,t)=>new YE({type:e,typeName:fn.ZodPromise,...On(t)});class nm extends Kn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{dt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return cn;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?cn:l.status==="dirty"||n.value==="dirty"?Q1(l.value):l});{if(n.value==="aborted")return cn;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?cn:s.status==="dirty"||n.value==="dirty"?Q1(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?cn:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?cn:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ty(a))return cn;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ty(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):cn);Qn.assertNever(o)}}nm.create=(e,t,n)=>new nm({schema:e,typeName:fn.ZodEffects,effect:t,...On(n)});nm.createWithPreprocess=(e,t,n)=>new nm({schema:t,effect:{type:"preprocess",transform:e},typeName:fn.ZodEffects,...On(n)});class tf extends Kn{_parse(t){return this._getType(t)===Ct.undefined?Gs(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:fn.ZodOptional,...On(t)});class rm extends Kn{_parse(t){return this._getType(t)===Ct.null?Gs(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}rm.create=(e,t)=>new rm({innerType:e,typeName:fn.ZodNullable,...On(t)});class XE extends Kn{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ct.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}XE.create=(e,t)=>new XE({innerType:e,typeName:fn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...On(t)});class QE extends Kn{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return UE(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ff(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ff(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}QE.create=(e,t)=>new QE({innerType:e,typeName:fn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...On(t)});class a9 extends Kn{_parse(t){if(this._getType(t)!==Ct.nan){const r=this._getOrReturnCtx(t);return dt(r,{code:Je.invalid_type,expected:Ct.nan,received:r.parsedType}),cn}return{status:"valid",value:t.data}}}a9.create=e=>new a9({typeName:fn.ZodNaN,...On(e)});class xee extends Kn{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class t$ extends Kn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?cn:i.status==="dirty"?(n.dirty(),Q1(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?cn:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new t$({in:t,out:n,typeName:fn.ZodPipeline})}}class ZE extends Kn{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ty(o)&&(o.value=Object.freeze(o.value)),o);return UE(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ZE.create=(e,t)=>new ZE({innerType:e,typeName:fn.ZodReadonly,...On(t)});var fn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(fn||(fn={}));const Oo=Nd.create,Cet=ny.create,s9=rD.create;Kd.create;const Hc=Wu.create,Gy=mo.create,Oet=WE.create,Ret=e$.create;HE.create;em.create;const Pet=GE.create,jPe=tm.create,lD=KE.create;YE.create;tf.create;rm.create;const T1=e=>{switch(e){case"1h":return new Date(Date.now()-3600*1e3).toISOString();case"6h":return new Date(Date.now()-360*60*1e3).toISOString();case"1d":return new Date(Date.now()-1440*60*1e3).toISOString();case"7d":return new Date(Date.now()-10080*60*1e3).toISOString();default:{const t=e;throw new Error(`Unhandled time range: ${t}`)}}},IPe=e=>Gy({tw:jPe(["1h","6h","1d","7d"]).default("1d"),ctr:s9().default(!1),s:Oo().optional(),u:Oo().optional(),st:Hc(lD(qt)).default(()=>Object.values(qt)),w:Hc(Oo()).optional().default(()=>{var t;return(t=e==null?void 0:e.workflowIds)!=null&&t.length?e.workflowIds:[]}),m:Hc(Oo()).optional(),f:s9().default(!1),rf:lD(jE).optional()}),DPe=(e,t)=>{const n=e+"-workflow-runs-filters",r=IPe(t),[,o]=Zx(),i=gee(r,n,{tw:mee,ctr:pee,u:hee,s:dee,st:Up,w:JL,m:vw,f:db,rf:yR}),{state:a,columnFilters:s,setColumnFilters:l,resetFilters:u}=i,{tw:c,ctr:d,s:h,u:p,st:x,w:y,m:w,f:_,rf:C}=a,O=b.useMemo(()=>h||T1(c),[h,c]),P=b.useCallback(L=>{const V={...a,...L};o(G=>({...Object.fromEntries(G.entries()),[n]:V}))},[a,o,n]),R=b.useCallback(L=>{P({tw:L,ctr:!1,s:T1(L),u:void 0})},[P]),T=b.useCallback(()=>{d||P({...a,s:T1(c)})},[d,c,P,a]),k=b.useCallback(L=>{P(L?{ctr:!0,s:L.start,u:L.end}:{ctr:!1,s:T1(c),u:void 0})},[P,c]),M=b.useCallback(L=>{const V=L.length>0?L:Object.values(qt),G=s.filter(D=>D.id!==Up).concat([{id:Up,value:V}]);l(G)},[l,s]),j=b.useCallback(({key:L,value:V})=>{const H=[...(w||[]).filter(Y=>Y.split(":")[0]!==L),`${L}:${V}`],U=s.filter(Y=>Y.id!==vw).concat([{id:vw,value:H}]);l(U)},[l,s,w]),$=b.useMemo(()=>({since:O||T1("1d"),until:p,statuses:x,workflowIds:y,additionalMetadata:w,flattenDAGs:_||!1,runningFilter:C}),[O,p,x,y,w,_,C]);return{columnFilters:s,timeWindow:c,isCustomTimeRange:d,apiFilters:$,setTimeWindow:R,setCustomTimeRange:k,updateCurrentTimeWindow:T,setStatuses:M,setAdditionalMetadata:j,setColumnFilters:l,resetFilters:u}};function LPe(e,t,n,r){var o=this,i=b.useRef(null),a=b.useRef(0),s=b.useRef(0),l=b.useRef(null),u=b.useRef([]),c=b.useRef(),d=b.useRef(),h=b.useRef(e),p=b.useRef(!0),x=b.useRef(),y=b.useRef();h.current=e;var w=typeof window<"u",_=!t&&t!==0&&w;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var C=!!(n=n||{}).leading,O=!("trailing"in n)||!!n.trailing,P=!!n.flushOnExit&&O,R="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,k=R?Math.max(+n.maxWait||0,t):null,M=b.useMemo(function(){var j=function(U){var Y=u.current,q=c.current;return u.current=c.current=null,a.current=U,s.current=s.current||U,d.current=h.current.apply(q,Y)},$=function(U,Y){_&&cancelAnimationFrame(l.current),l.current=_?requestAnimationFrame(U):setTimeout(U,Y)},L=function(U){if(!p.current)return!1;var Y=U-i.current;return!i.current||Y>=t||Y<0||R&&U-a.current>=k},V=function(U){return l.current=null,O&&u.current?j(U):(u.current=c.current=null,d.current)},G=function U(){var Y=Date.now();if(C&&s.current===a.current&&D(),L(Y))return V(Y);if(p.current){var q=t-(Y-i.current),W=R?Math.min(q,k-(Y-a.current)):q;$(U,W)}},D=function(){r&&r({})},H=function(){if(w||T){var U,Y=Date.now(),q=L(Y);if(u.current=[].slice.call(arguments),c.current=o,i.current=Y,P&&!x.current&&(x.current=function(){var W;((W=globalThis.document)==null?void 0:W.visibilityState)==="hidden"&&y.current.flush()},(U=globalThis.document)==null||U.addEventListener==null||U.addEventListener("visibilitychange",x.current)),q){if(!l.current&&p.current)return a.current=i.current,$(G,t),C?j(i.current):d.current;if(R)return $(G,t),j(i.current)}return l.current||$(G,t),d.current}};return H.cancel=function(){var U=l.current;U&&(_?cancelAnimationFrame(l.current):clearTimeout(l.current)),a.current=0,u.current=i.current=c.current=l.current=null,U&&r&&r({})},H.isPending=function(){return!!l.current},H.flush=function(){return l.current?V(Date.now()):d.current},H},[C,R,t,k,O,P,_,w,T,r]);return y.current=M,b.useEffect(function(){return p.current=!0,function(){var j;P&&y.current.flush(),x.current&&((j=globalThis.document)==null||j.removeEventListener==null||j.removeEventListener("visibilitychange",x.current),x.current=null),p.current=!1}},[P]),M}function $Pe(e,t){return e===t}function FPe(e,t,n){var r=$Pe,o=b.useRef(e),i=b.useState({})[1],a=LPe(b.useCallback(function(l){o.current=l,i({})},[i]),t,n,i),s=b.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const BPe=e=>{const{tenantId:t}=Ma(),[n]=FPe(e,300),{data:r}=In({...io.workflows.list(t,{limit:200,name:n||void 0}),staleTime:3e4});return(r==null?void 0:r.rows)??[]};var wR="Tabs",[zPe]=fs(wR,[uR]),bee=uR(),[qPe,n$]=zPe(wR),See=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=lR(s),[d,h]=qs({prop:r,onChange:o,defaultProp:i??"",caller:wR});return v.jsx(qPe,{scope:n,baseId:Pa(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:l,children:v.jsx(Zt.div,{dir:c,"data-orientation":a,...u,ref:t})})});See.displayName=wR;var _ee="TabsList",Eee=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=n$(_ee,n),a=bee(n);return v.jsx(gZ,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:v.jsx(Zt.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Eee.displayName=_ee;var Cee="TabsTrigger",Oee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=n$(Cee,n),s=bee(n),l=Tee(a.baseId,r),u=Aee(a.baseId,r),c=r===a.value;return v.jsx(vZ,{asChild:!0,...s,focusable:!o,active:c,children:v.jsx(Zt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:Ze(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:Ze(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:Ze(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!o&&d&&a.onValueChange(r)})})})});Oee.displayName=Cee;var Ree="TabsContent",Pee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=n$(Ree,n),l=Tee(s.baseId,r),u=Aee(s.baseId,r),c=r===s.value,d=b.useRef(c);return b.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),v.jsx(ji,{present:o||c,children:({present:h})=>v.jsx(Zt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&i})})});Pee.displayName=Ree;function Tee(e,t){return`${e}-trigger-${t}`}function Aee(e,t){return`${e}-content-${t}`}var UPe=See,kee=Eee,Nee=Oee,Mee=Pee;const JE=UPe,VPe=Ul("",{variants:{layout:{default:"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-gray-700 dark:text-gray-300",underlined:"w-full justify-start rounded-none border-b bg-transparent p-0"}},defaultVariants:{layout:"default"}}),Uw=b.forwardRef(({className:e,layout:t="default",...n},r)=>v.jsx(kee,{ref:r,className:je(VPe({layout:t}),e),...n}));Uw.displayName=kee.displayName;const WPe=Ul("",{variants:{variant:{underlined:"relative rounded-none border-b-2 border-b-transparent bg-transparent px-3 py-1 text-sm font-medium text-gray-700 dark:text-gray-300 shadow-none transition-none focus-visible:ring-0 data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none ",default:"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow"}},defaultVariants:{variant:"default"}}),Sa=b.forwardRef(({className:e,variant:t="default",...n},r)=>v.jsx(Nee,{ref:r,className:je(WPe({variant:t}),e),...n}));Sa.displayName=Nee.displayName;const _a=b.forwardRef(({className:e,...t},n)=>v.jsx(Mee,{ref:n,className:je("data-[state=inactive]:!hidden",e),...t}));_a.displayName=Mee.displayName;function HPe(e){return/^(0[0-9]|1[0-9]|2[0-3])$/.test(e)}function GPe(e){return/^(0[1-9]|1[0-2])$/.test(e)}function KPe(e){return/^[0-5][0-9]$/.test(e)}function xR(e,{max:t,min:n=0,loop:r=!1}){let o=parseInt(e,10);return isNaN(o)?"00":(r?(o>t&&(o=n),ot&&(o=t),o=22?`${e-12}`:e%12>9?`${e}`:`0${e%12}`}const ri=b.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ri.displayName="Input";const uE=J.forwardRef(({className:e,value:t,id:n,name:r,date:o=new Date(new Date().setHours(0,0,0,0)),setDate:i,onChange:a,onKeyDown:s,picker:l,period:u,onLeftFocus:c,onRightFocus:d,...h},p)=>{const[x,y]=J.useState(!1),[w,_]=J.useState("0");J.useEffect(()=>{if(x){const T=setTimeout(()=>{y(!1)},2e3);return()=>clearTimeout(T)}},[x]);const C=J.useMemo(()=>tTe(o,l),[o,l]),O=T=>l==="12hours"&&x&&C.slice(1,2)==="1"&&w==="0"?"0"+T:x?C.slice(1,2)+T:"0"+T,P=T=>{if(T.key!=="Tab"){if(T.preventDefault(),T.key==="ArrowRight"&&(d==null||d()),T.key==="ArrowLeft"&&(c==null||c()),["ArrowUp","ArrowDown"].includes(T.key)){const k=T.key==="ArrowUp"?1:-1,M=nTe(C,k,l);x&&y(!1);const j=new Date(o);i(u9(j,M,l,u))}if(T.key>="0"&&T.key<="9"){l==="12hours"&&_(T.key);const k=O(T.key);x&&(d==null||d()),y(j=>!j);const M=new Date(o);i(u9(M,k,l,u))}}},R=T=>T<10?`0${T}`:T;return v.jsx(ri,{ref:p,id:n||l,name:r||l,className:je("w-[48px] text-center font-mono text-xs tabular-nums caret-transparent focus:bg-accent focus:text-accent-foreground [&::-webkit-inner-spin-button]:appearance-none",e),value:t||R(parseInt(C)),onChange:T=>{T.preventDefault(),a==null||a(T)},min:0,max:59,type:"number",inputMode:"numeric",onKeyDown:T=>{s==null||s(T),P(T)},...h})});uE.displayName="TimePickerInput";var iTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dee=iTe.reduce((e,t)=>{const n=sX(`Primitive.${t}`),r=b.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),aTe="Label",o$=b.forwardRef((e,t)=>v.jsx(Dee.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));o$.displayName=aTe;var Lee=o$;const sTe=Ul("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),is=b.forwardRef(({className:e,...t},n)=>v.jsx(Lee,{ref:n,className:je(sTe(),e),...t}));is.displayName=Lee.displayName;function lTe({date:e,setDate:t}){const n=b.useRef(null),r=b.useRef(null),o=b.useRef(null);return v.jsxs("div",{className:"flex items-end gap-2",children:[v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"hours",className:"text-xs",children:"Hours"}),v.jsx(uE,{picker:"hours",date:e,setDate:t,ref:r,onRightFocus:()=>{var i;return(i=n.current)==null?void 0:i.focus()}})]}),v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),v.jsx(uE,{picker:"minutes",date:e,setDate:t,ref:n,onLeftFocus:()=>{var i;return(i=r.current)==null?void 0:i.focus()},onRightFocus:()=>{var i;return(i=o.current)==null?void 0:i.focus()}})]}),v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"seconds",className:"text-xs",children:"Seconds"}),v.jsx(uE,{picker:"seconds",date:e,setDate:t,ref:o,onLeftFocus:()=>{var i;return(i=n.current)==null?void 0:i.focus()}})]})]})}var ln=function(){return ln=Object.assign||function(t){for(var n,r=1,o=arguments.length;r1&&(l||!u),d=t>1&&(u||!l),h=function(){r&&i(r)},p=function(){o&&i(o)};return v.jsx(zTe,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:o,previousMonth:r,onPreviousClick:h,onNextClick:p})}function qTe(e){var t,n=Or(),r=n.classNames,o=n.disableNavigation,i=n.styles,a=n.captionLayout,s=n.components,l=(t=s==null?void 0:s.CaptionLabel)!==null&&t!==void 0?t:Bee,u;return o?u=v.jsx(l,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?u=v.jsx(c9,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?u=v.jsxs(v.Fragment,{children:[v.jsx(c9,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),v.jsx(f9,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=v.jsxs(v.Fragment,{children:[v.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),v.jsx(f9,{displayMonth:e.displayMonth,id:e.id})]}),v.jsx("div",{className:r.caption,style:i.caption,children:u})}function UTe(e){var t=Or(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?v.jsx("tfoot",{className:o,style:r.tfoot,children:v.jsx("tr",{children:v.jsx("td",{colSpan:8,children:n})})}):v.jsx(v.Fragment,{})}function VTe(e,t,n){for(var r=n?Jp(new Date):Xu(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Ei(r,i);o.push(a)}return o}function WTe(){var e=Or(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=VTe(o,i,a);return v.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&v.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(c,d){return v.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(c,{locale:o}),children:s(c,{locale:o})},d)})]})}function HTe(){var e,t=Or(),n=t.classNames,r=t.styles,o=t.components,i=(e=o==null?void 0:o.HeadRow)!==null&&e!==void 0?e:WTe;return v.jsx("thead",{style:r.head,className:n.head,children:v.jsx(i,{})})}function GTe(e){var t=Or(),n=t.locale,r=t.formatters.formatDay;return v.jsx(v.Fragment,{children:r(e.date,{locale:n})})}var i$=b.createContext(void 0);function KTe(e){if(!hb(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return v.jsx(i$.Provider,{value:t,children:e.children})}return v.jsx(YTe,{initialProps:e.initialProps,children:e.children})}function YTe(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a=function(u,c,d){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,u,c,d);var x=!!(c.selected&&o&&(r==null?void 0:r.length)===o);if(!x){var y=!!(!c.selected&&i&&(r==null?void 0:r.length)===i);if(!y){var w=r?$ee([],r):[];if(c.selected){var _=w.findIndex(function(C){return Ca(u,C)});w.splice(_,1)}else w.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,w,u,c,d)}}},s={disabled:[]};r&&s.disabled.push(function(u){var c=i&&r.length>i-1,d=r.some(function(h){return Ca(h,u)});return!!(c&&!d)});var l={selected:r,onDayClick:a,modifiers:s};return v.jsx(i$.Provider,{value:l,children:n})}function a$(){var e=b.useContext(i$);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function XTe(e,t){var n=t||{},r=n.from,o=n.to;return r&&o?Ca(o,e)&&Ca(r,e)?void 0:Ca(o,e)?{from:o,to:void 0}:Ca(r,e)?void 0:ZI(r,e)?{from:e,to:o}:{from:r,to:e}:o?ZI(e,o)?{from:o,to:e}:{from:e,to:o}:r?KJ(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var s$=b.createContext(void 0);function QTe(e){if(!pb(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return v.jsx(s$.Provider,{value:t,children:e.children})}return v.jsx(ZTe,{initialProps:e.initialProps,children:e.children})}function ZTe(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,s=t.min,l=t.max,u=function(p,x,y){var w,_;(w=t.onDayClick)===null||w===void 0||w.call(t,p,x,y);var C=XTe(p,r);(_=t.onSelect)===null||_===void 0||_.call(t,C,p,x,y)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],Ca(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),s&&(i&&!a&&c.disabled.push({after:rA(i,s-1),before:Ei(i,s-1)}),i&&a&&c.disabled.push({after:i,before:Ei(i,s-1)}),!i&&a&&c.disabled.push({after:rA(a,s-1),before:Ei(a,s-1)})),l){if(i&&!a&&(c.disabled.push({before:Ei(i,-l+1)}),c.disabled.push({after:Ei(i,l-1)})),i&&a){var d=kl(a,i)+1,h=l-d;c.disabled.push({before:rA(i,h)}),c.disabled.push({after:Ei(a,h)})}!i&&a&&(c.disabled.push({before:Ei(a,-l+1)}),c.disabled.push({after:Ei(a,l-1)}))}return v.jsx(s$.Provider,{value:{selected:r,onDayClick:u,modifiers:c},children:n})}function l$(){var e=b.useContext(s$);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function cE(e){return Array.isArray(e)?$ee([],e):e!==void 0?[e]:[]}function JTe(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],o=n[1];t[r]=cE(o)}),t}var zl;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(zl||(zl={}));var e2e=zl.Selected,Fc=zl.Disabled,t2e=zl.Hidden,n2e=zl.Today,lA=zl.RangeEnd,uA=zl.RangeMiddle,cA=zl.RangeStart,r2e=zl.Outside;function o2e(e,t,n){var r,o=(r={},r[e2e]=cE(e.selected),r[Fc]=cE(e.disabled),r[t2e]=cE(e.hidden),r[n2e]=[e.today],r[lA]=[],r[uA]=[],r[cA]=[],r[r2e]=[],r);return e.fromDate&&o[Fc].push({before:e.fromDate}),e.toDate&&o[Fc].push({after:e.toDate}),hb(e)?o[Fc]=o[Fc].concat(t.modifiers[Fc]):pb(e)&&(o[Fc]=o[Fc].concat(n.modifiers[Fc]),o[cA]=n.modifiers[cA],o[uA]=n.modifiers[uA],o[lA]=n.modifiers[lA]),o}var Uee=b.createContext(void 0);function i2e(e){var t=Or(),n=a$(),r=l$(),o=o2e(t,n,r),i=JTe(t.modifiers),a=ln(ln({},o),i);return v.jsx(Uee.Provider,{value:a,children:e.children})}function Vee(){var e=b.useContext(Uee);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function a2e(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function s2e(e){return!!(e&&typeof e=="object"&&"from"in e)}function l2e(e){return!!(e&&typeof e=="object"&&"after"in e)}function u2e(e){return!!(e&&typeof e=="object"&&"before"in e)}function c2e(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function f2e(e,t){var n,r=t.from,o=t.to;if(r&&o){var i=kl(o,r)<0;i&&(n=[o,r],r=n[0],o=n[1]);var a=kl(e,r)>=0&&kl(o,e)>=0;return a}return o?Ca(o,e):r?Ca(r,e):!1}function d2e(e){return WL(e)}function h2e(e){return Array.isArray(e)&&e.every(WL)}function p2e(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(d2e(n))return Ca(e,n);if(h2e(n))return n.includes(e);if(s2e(n))return f2e(e,n);if(c2e(n))return n.dayOfWeek.includes(e.getDay());if(a2e(n)){var r=kl(n.before,e),o=kl(n.after,e),i=r>0,a=o<0,s=ZI(n.before,n.after);return s?a&&i:i||a}return l2e(n)?kl(e,n.after)>0:u2e(n)?kl(n.before,e)>0:typeof n=="function"?n(e):!1})}function u$(e,t,n){var r=Object.keys(t).reduce(function(i,a){var s=t[a];return p2e(e,s)&&i.push(a),i},[]),o={};return r.forEach(function(i){return o[i]=!0}),n&&!YL(e,n)&&(o.outside=!0),o}function m2e(e,t){for(var n=Ta(e[0]),r=gR(e[e.length-1]),o,i,a=n;a<=r;){var s=u$(a,t),l=!s.disabled&&!s.hidden;if(!l){a=Ei(a,1);continue}if(s.selected)return a;s.today&&!i&&(i=a),o||(o=a),a=Ei(a,1)}return i||o}var g2e=365;function Wee(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,l=o.weekStartsOn,u=o.fromDate,c=o.toDate,d=o.locale,h={day:Ei,week:QI,month:Vs,year:lOe,startOfWeek:function(w){return o.ISOWeek?Jp(w):Xu(w,{locale:d,weekStartsOn:l})},endOfWeek:function(w){return o.ISOWeek?qJ(w):KL(w,{locale:d,weekStartsOn:l})}},p=h[n](e,r==="after"?1:-1);r==="before"&&u?p=uOe([u,p]):r==="after"&&c&&(p=cOe([c,p]));var x=!0;if(i){var y=u$(p,i);x=!y.disabled&&!y.hidden}return x?p:s.count>g2e?s.lastFocused:Wee(p,{moveBy:n,direction:r,context:o,modifiers:i,retry:ln(ln({},s),{count:s.count+1})})}var Hee=b.createContext(void 0);function v2e(e){var t=mb(),n=Vee(),r=b.useState(),o=r[0],i=r[1],a=b.useState(),s=a[0],l=a[1],u=m2e(t.displayMonths,n),c=o??(s&&t.isDateDisplayed(s))?s:u,d=function(){l(o),i(void 0)},h=function(w){i(w)},p=Or(),x=function(w,_){if(o){var C=Wee(o,{moveBy:w,direction:_,context:p,modifiers:n});Ca(o,C)||(t.goToDate(C,o),h(C))}},y={focusedDay:o,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return x("day","after")},focusDayBefore:function(){return x("day","before")},focusWeekAfter:function(){return x("week","after")},focusWeekBefore:function(){return x("week","before")},focusMonthBefore:function(){return x("month","before")},focusMonthAfter:function(){return x("month","after")},focusYearBefore:function(){return x("year","before")},focusYearAfter:function(){return x("year","after")},focusStartOfWeek:function(){return x("startOfWeek","before")},focusEndOfWeek:function(){return x("endOfWeek","after")}};return v.jsx(Hee.Provider,{value:y,children:e.children})}function c$(){var e=b.useContext(Hee);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function y2e(e,t){var n=Vee(),r=u$(e,n,t);return r}var f$=b.createContext(void 0);function w2e(e){if(!bR(e.initialProps)){var t={selected:void 0};return v.jsx(f$.Provider,{value:t,children:e.children})}return v.jsx(x2e,{initialProps:e.initialProps,children:e.children})}function x2e(e){var t=e.initialProps,n=e.children,r=function(i,a,s){var l,u,c;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,a,s),a.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,i,i,a,s)},o={selected:t.selected,onDayClick:r};return v.jsx(f$.Provider,{value:o,children:n})}function Gee(){var e=b.useContext(f$);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function b2e(e,t){var n=Or(),r=Gee(),o=a$(),i=l$(),a=c$(),s=a.focusDayAfter,l=a.focusDayBefore,u=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,p=a.focusMonthBefore,x=a.focusMonthAfter,y=a.focusYearBefore,w=a.focusYearAfter,_=a.focusStartOfWeek,C=a.focusEndOfWeek,O=function(Y){var q,W,K,z;bR(n)?(q=r.onDayClick)===null||q===void 0||q.call(r,e,t,Y):hb(n)?(W=o.onDayClick)===null||W===void 0||W.call(o,e,t,Y):pb(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,Y):(z=n.onDayClick)===null||z===void 0||z.call(n,e,t,Y)},P=function(Y){var q;h(e),(q=n.onDayFocus)===null||q===void 0||q.call(n,e,t,Y)},R=function(Y){var q;d(),(q=n.onDayBlur)===null||q===void 0||q.call(n,e,t,Y)},T=function(Y){var q;(q=n.onDayMouseEnter)===null||q===void 0||q.call(n,e,t,Y)},k=function(Y){var q;(q=n.onDayMouseLeave)===null||q===void 0||q.call(n,e,t,Y)},M=function(Y){var q;(q=n.onDayPointerEnter)===null||q===void 0||q.call(n,e,t,Y)},j=function(Y){var q;(q=n.onDayPointerLeave)===null||q===void 0||q.call(n,e,t,Y)},$=function(Y){var q;(q=n.onDayTouchCancel)===null||q===void 0||q.call(n,e,t,Y)},L=function(Y){var q;(q=n.onDayTouchEnd)===null||q===void 0||q.call(n,e,t,Y)},V=function(Y){var q;(q=n.onDayTouchMove)===null||q===void 0||q.call(n,e,t,Y)},G=function(Y){var q;(q=n.onDayTouchStart)===null||q===void 0||q.call(n,e,t,Y)},D=function(Y){var q;(q=n.onDayKeyUp)===null||q===void 0||q.call(n,e,t,Y)},H=function(Y){var q;switch(Y.key){case"ArrowLeft":Y.preventDefault(),Y.stopPropagation(),n.dir==="rtl"?s():l();break;case"ArrowRight":Y.preventDefault(),Y.stopPropagation(),n.dir==="rtl"?l():s();break;case"ArrowDown":Y.preventDefault(),Y.stopPropagation(),u();break;case"ArrowUp":Y.preventDefault(),Y.stopPropagation(),c();break;case"PageUp":Y.preventDefault(),Y.stopPropagation(),Y.shiftKey?y():p();break;case"PageDown":Y.preventDefault(),Y.stopPropagation(),Y.shiftKey?w():x();break;case"Home":Y.preventDefault(),Y.stopPropagation(),_();break;case"End":Y.preventDefault(),Y.stopPropagation(),C();break}(q=n.onDayKeyDown)===null||q===void 0||q.call(n,e,t,Y)},U={onClick:O,onFocus:P,onBlur:R,onKeyDown:H,onKeyUp:D,onMouseEnter:T,onMouseLeave:k,onPointerEnter:M,onPointerLeave:j,onTouchCancel:$,onTouchEnd:L,onTouchMove:V,onTouchStart:G};return U}function S2e(){var e=Or(),t=Gee(),n=a$(),r=l$(),o=bR(e)?t.selected:hb(e)?n.selected:pb(e)?r.selected:void 0;return o}function _2e(e){return Object.values(zl).includes(e)}function E2e(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var o=e.modifiersClassNames[r];if(o)n.push(o);else if(_2e(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function C2e(e,t){var n=ln({},e.styles.day);return Object.keys(t).forEach(function(r){var o;n=ln(ln({},n),(o=e.modifiersStyles)===null||o===void 0?void 0:o[r])}),n}function O2e(e,t,n){var r,o,i,a=Or(),s=c$(),l=y2e(e,t),u=b2e(e,l),c=S2e(),d=!!(a.onDayClick||a.mode!=="default");b.useEffect(function(){var T;l.outside||s.focusedDay&&d&&Ca(s.focusedDay,e)&&((T=n.current)===null||T===void 0||T.focus())},[s.focusedDay,e,n,d,l.outside]);var h=E2e(a,l).join(" "),p=C2e(a,l),x=!!(l.outside&&!a.showOutsideDays||l.hidden),y=(i=(o=a.components)===null||o===void 0?void 0:o.DayContent)!==null&&i!==void 0?i:GTe,w=v.jsx(y,{date:e,displayMonth:t,activeModifiers:l}),_={style:p,className:h,children:w,role:"gridcell"},C=s.focusTarget&&Ca(s.focusTarget,e)&&!l.outside,O=s.focusedDay&&Ca(s.focusedDay,e),P=ln(ln(ln({},_),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=O||C?0:-1,r)),u),R={isButton:d,isHidden:x,activeModifiers:l,selectedDays:c,buttonProps:P,divProps:_};return R}function R2e(e){var t=b.useRef(null),n=O2e(e.date,e.displayMonth,t);return n.isHidden?v.jsx("div",{role:"gridcell"}):n.isButton?v.jsx(tC,ln({name:"day",ref:t},n.buttonProps)):v.jsx("div",ln({},n.divProps))}function P2e(e){var t=e.number,n=e.dates,r=Or(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,s=r.locale,l=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,c=u(Number(t),{locale:s});if(!o)return v.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var d=l(Number(t),{locale:s}),h=function(p){o(t,n,p)};return v.jsx(tC,{name:"week-number","aria-label":d,className:a.weeknumber,style:i.weeknumber,onClick:h,children:c})}function T2e(e){var t,n,r=Or(),o=r.styles,i=r.classNames,a=r.showWeekNumber,s=r.components,l=(t=s==null?void 0:s.Day)!==null&&t!==void 0?t:R2e,u=(n=s==null?void 0:s.WeekNumber)!==null&&n!==void 0?n:P2e,c;return a&&(c=v.jsx("td",{className:i.cell,style:o.cell,children:v.jsx(u,{number:e.weekNumber,dates:e.dates})})),v.jsxs("tr",{className:i.row,style:o.row,children:[c,e.dates.map(function(d){return v.jsx("td",{className:i.cell,style:o.cell,role:"presentation",children:v.jsx(l,{displayMonth:e.displayMonth,date:d})},yRe(d))})]})}function d9(e,t,n){for(var r=n!=null&&n.ISOWeek?qJ(t):KL(t,n),o=n!=null&&n.ISOWeek?Jp(e):Xu(e,n),i=kl(r,o),a=[],s=0;s<=i;s++)a.push(Ei(o,s));var l=a.reduce(function(u,c){var d=n!=null&&n.ISOWeek?VJ(c):HJ(c,n),h=u.find(function(p){return p.weekNumber===d});return h?(h.dates.push(c),u):(u.push({weekNumber:d,dates:[c]}),u)},[]);return l}function A2e(e,t){var n=d9(Ta(e),gR(e),t);if(t!=null&&t.useFixedWeeks){var r=xRe(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=QI(i,6-r),s=d9(QI(i,1),a,t);n.push.apply(n,s)}}return n}function k2e(e){var t,n,r,o=Or(),i=o.locale,a=o.classNames,s=o.styles,l=o.hideHead,u=o.fixedWeeks,c=o.components,d=o.weekStartsOn,h=o.firstWeekContainsDate,p=o.ISOWeek,x=A2e(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:h}),y=(t=c==null?void 0:c.Head)!==null&&t!==void 0?t:HTe,w=(n=c==null?void 0:c.Row)!==null&&n!==void 0?n:T2e,_=(r=c==null?void 0:c.Footer)!==null&&r!==void 0?r:UTe;return v.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&v.jsx(y,{}),v.jsx("tbody",{className:a.tbody,style:s.tbody,children:x.map(function(C){return v.jsx(w,{displayMonth:e.displayMonth,dates:C.dates,weekNumber:C.weekNumber},C.weekNumber)})}),v.jsx(_,{displayMonth:e.displayMonth})]})}function N2e(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var M2e=N2e()?b.useLayoutEffect:b.useEffect,fA=!1,j2e=0;function h9(){return"react-day-picker-".concat(++j2e)}function I2e(e){var t,n=e??(fA?h9():null),r=b.useState(n),o=r[0],i=r[1];return M2e(function(){o===null&&i(h9())},[]),b.useEffect(function(){fA===!1&&(fA=!0)},[]),(t=e??o)!==null&&t!==void 0?t:void 0}function D2e(e){var t,n,r=Or(),o=r.dir,i=r.classNames,a=r.styles,s=r.components,l=mb().displayMonths,u=I2e(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],h=a.month,p=e.displayIndex===0,x=e.displayIndex===l.length-1,y=!p&&!x;o==="rtl"&&(t=[p,x],x=t[0],p=t[1]),p&&(d.push(i.caption_start),h=ln(ln({},h),a.caption_start)),x&&(d.push(i.caption_end),h=ln(ln({},h),a.caption_end)),y&&(d.push(i.caption_between),h=ln(ln({},h),a.caption_between));var w=(n=s==null?void 0:s.Caption)!==null&&n!==void 0?n:qTe;return v.jsxs("div",{className:d.join(" "),style:h,children:[v.jsx(w,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),v.jsx(k2e,{id:c,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function L2e(e){var t=Or(),n=t.classNames,r=t.styles;return v.jsx("div",{className:n.months,style:r.months,children:e.children})}function $2e(e){var t,n,r=e.initialProps,o=Or(),i=c$(),a=mb(),s=b.useState(!1),l=s[0],u=s[1];b.useEffect(function(){o.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),u(!0)))},[o.initialFocus,l,i.focus,i.focusTarget,i]);var c=[o.classNames.root,o.className];o.numberOfMonths>1&&c.push(o.classNames.multiple_months),o.showWeekNumber&&c.push(o.classNames.with_weeknumber);var d=ln(ln({},o.styles.root),o.style),h=Object.keys(r).filter(function(x){return x.startsWith("data-")}).reduce(function(x,y){var w;return ln(ln({},x),(w={},w[y]=r[y],w))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:L2e;return v.jsx("div",ln({className:c.join(" "),style:d,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:v.jsx(p,{children:a.displayMonths.map(function(x,y){return v.jsx(D2e,{displayIndex:y,displayMonth:x},y)})})}))}function F2e(e){var t=e.children,n=uTe(e,["children"]);return v.jsx(PTe,{initialProps:n,children:v.jsx($Te,{children:v.jsx(w2e,{initialProps:n,children:v.jsx(KTe,{initialProps:n,children:v.jsx(QTe,{initialProps:n,children:v.jsx(i2e,{children:v.jsx(v2e,{children:t})})})})})})})}function B2e(e){return v.jsx(F2e,ln({},e,{children:v.jsx($2e,{initialProps:e})}))}function Kee({className:e,classNames:t,showOutsideDays:n=!0,...r}){return v.jsx(B2e,{showOutsideDays:n,className:je("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:je(AI({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:je("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:je(AI({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:()=>v.jsx(LQ,{className:"h-4 w-4"}),IconRight:()=>v.jsx(EL,{className:"h-4 w-4"})},...r})}Kee.displayName="Calendar";function uD({date:e,setDate:t,label:n,triggerClassName:r}){const o=i=>{if(!i)return;if(!e){t(i);return}const s=(i.getTime()-e.getTime())/(1e3*60*60*24),l=av(e,{days:Math.ceil(s)});t(l)};return v.jsxs(Wy,{children:[v.jsx(Hy,{asChild:!0,children:v.jsxs(wt,{variant:"outline",className:je("w-fit justify-start text-left text-xs font-normal",!e&&"text-muted-foreground",r),children:[v.jsx(rSe,{className:"mr-2 size-4"}),e?n+": "+yf(e,"PPP HH:mm:ss"):v.jsx("span",{children:n})]})}),v.jsxs(wm,{className:"w-auto p-0",children:[v.jsx(Kee,{mode:"single",selected:e,onSelect:i=>o(i),initialFocus:!0}),v.jsx("div",{className:"border-t border-border p-3",children:v.jsx(lTe,{setDate:t,date:e})})]})]})}function p9(e,[t,n]){return Math.min(n,Math.max(t,e))}var z2e=[" ","Enter","ArrowUp","ArrowDown"],q2e=[" ","Enter"],om="Select",[SR,_R,U2e]=aR(om),[Ky]=fs(om,[U2e,nc]),ER=nc(),[V2e,th]=Ky(om),[W2e,H2e]=Ky(om),Yee=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:h,required:p,form:x}=e,y=ER(t),[w,_]=b.useState(null),[C,O]=b.useState(null),[P,R]=b.useState(!1),T=lR(u),[k,M]=qs({prop:r,defaultProp:o??!1,onChange:i,caller:om}),[j,$]=qs({prop:a,defaultProp:s,onChange:l,caller:om}),L=b.useRef(null),V=w?x||!!w.closest("form"):!0,[G,D]=b.useState(new Set),H=Array.from(G).map(U=>U.props.value).join(";");return v.jsx($y,{...y,children:v.jsxs(V2e,{required:p,scope:t,trigger:w,onTriggerChange:_,valueNode:C,onValueNodeChange:O,valueNodeHasChildren:P,onValueNodeHasChildrenChange:R,contentId:Pa(),value:j,onValueChange:$,open:k,onOpenChange:M,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[v.jsx(SR.Provider,{scope:t,children:v.jsx(W2e,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(U=>{D(Y=>new Set(Y).add(U))},[]),onNativeOptionRemove:b.useCallback(U=>{D(Y=>{const q=new Set(Y);return q.delete(U),q})},[]),children:n})}),V?v.jsxs(wte,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:j,onChange:U=>$(U.target.value),disabled:h,form:x,children:[j===void 0?v.jsx("option",{value:""}):null,Array.from(G)]},H):null]})})};Yee.displayName=om;var Xee="SelectTrigger",Qee=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=ER(n),a=th(Xee,n),s=a.disabled||r,l=Bn(t,a.onTriggerChange),u=_R(n),c=b.useRef("touch"),[d,h,p]=bte(y=>{const w=u().filter(O=>!O.disabled),_=w.find(O=>O.value===a.value),C=Ste(w,y,_);C!==void 0&&a.onValueChange(C.value)}),x=y=>{s||(a.onOpenChange(!0),p()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return v.jsx(Fy,{asChild:!0,...i,children:v.jsx(Zt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":xte(a.value)?"":void 0,...o,ref:l,onClick:Ze(o.onClick,y=>{y.currentTarget.focus(),c.current!=="mouse"&&x(y)}),onPointerDown:Ze(o.onPointerDown,y=>{c.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(x(y),y.preventDefault())}),onKeyDown:Ze(o.onKeyDown,y=>{const w=d.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&h(y.key),!(w&&y.key===" ")&&z2e.includes(y.key)&&(x(),y.preventDefault())})})})});Qee.displayName=Xee;var Zee="SelectValue",Jee=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=th(Zee,n),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,d=Bn(t,l.onValueNodeChange);return ii(()=>{u(c)},[u,c]),v.jsx(Zt.span,{...s,ref:d,style:{pointerEvents:"none"},children:xte(l.value)?v.jsx(v.Fragment,{children:a}):i})});Jee.displayName=Zee;var G2e="SelectIcon",ete=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.jsx(Zt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ete.displayName=G2e;var K2e="SelectPortal",tte=e=>v.jsx(vm,{asChild:!0,...e});tte.displayName=K2e;var im="SelectContent",nte=b.forwardRef((e,t)=>{const n=th(im,e.__scopeSelect),[r,o]=b.useState();if(ii(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?zs.createPortal(v.jsx(rte,{scope:e.__scopeSelect,children:v.jsx(SR.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),i):null}return v.jsx(ote,{...e,ref:t})});nte.displayName=im;var xl=10,[rte,nh]=Ky(im),Y2e="SelectContentImpl",X2e=Kp("SelectContent.RemoveScroll"),ote=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:y,avoidCollisions:w,..._}=e,C=th(im,n),[O,P]=b.useState(null),[R,T]=b.useState(null),k=Bn(t,ge=>P(ge)),[M,j]=b.useState(null),[$,L]=b.useState(null),V=_R(n),[G,D]=b.useState(!1),H=b.useRef(!1);b.useEffect(()=>{if(O)return tb(O)},[O]),tR();const U=b.useCallback(ge=>{const[he,...ue]=V().map(ye=>ye.ref.current),[we]=ue.slice(-1),Ae=document.activeElement;for(const ye of ge)if(ye===Ae||(ye==null||ye.scrollIntoView({block:"nearest"}),ye===he&&R&&(R.scrollTop=0),ye===we&&R&&(R.scrollTop=R.scrollHeight),ye==null||ye.focus(),document.activeElement!==Ae))return},[V,R]),Y=b.useCallback(()=>U([M,O]),[U,M,O]);b.useEffect(()=>{G&&Y()},[G,Y]);const{onOpenChange:q,triggerPointerDownPosRef:W}=C;b.useEffect(()=>{if(O){let ge={x:0,y:0};const he=we=>{var Ae,ye;ge={x:Math.abs(Math.round(we.pageX)-(((Ae=W.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(we.pageY)-(((ye=W.current)==null?void 0:ye.y)??0))}},ue=we=>{ge.x<=10&&ge.y<=10?we.preventDefault():O.contains(we.target)||q(!1),document.removeEventListener("pointermove",he),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ue,{capture:!0})}}},[O,q,W]),b.useEffect(()=>{const ge=()=>q(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[q]);const[K,z]=bte(ge=>{const he=V().filter(Ae=>!Ae.disabled),ue=he.find(Ae=>Ae.ref.current===document.activeElement),we=Ste(he,ge,ue);we&&setTimeout(()=>we.ref.current.focus())}),X=b.useCallback((ge,he,ue)=>{const we=!H.current&&!ue;(C.value!==void 0&&C.value===he||we)&&(j(ge),we&&(H.current=!0))},[C.value]),ee=b.useCallback(()=>O==null?void 0:O.focus(),[O]),ae=b.useCallback((ge,he,ue)=>{const we=!H.current&&!ue;(C.value!==void 0&&C.value===he||we)&&L(ge)},[C.value]),fe=r==="popper"?cD:ite,ie=fe===cD?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:y,avoidCollisions:w}:{};return v.jsx(rte,{scope:n,content:O,viewport:R,onViewportChange:T,itemRefCallback:X,selectedItem:M,onItemLeave:ee,itemTextRefCallback:ae,focusSelectedItem:Y,selectedItemText:$,position:r,isPositioned:G,searchRef:K,children:v.jsx(eb,{as:X2e,allowPinchZoom:!0,children:v.jsx(Jx,{asChild:!0,trapped:C.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:Ze(o,ge=>{var he;(he=C.trigger)==null||he.focus({preventScroll:!0}),ge.preventDefault()}),children:v.jsx(Zd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:v.jsx(fe,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ge=>ge.preventDefault(),..._,...ie,onPlaced:()=>D(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Ze(_.onKeyDown,ge=>{const he=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!he&&ge.key.length===1&&z(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let we=V().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const Ae=ge.target,ye=we.indexOf(Ae);we=we.slice(ye+1)}setTimeout(()=>U(we)),ge.preventDefault()}})})})})})})});ote.displayName=Y2e;var Q2e="SelectItemAlignedPosition",ite=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=th(im,n),a=nh(im,n),[s,l]=b.useState(null),[u,c]=b.useState(null),d=Bn(t,k=>c(k)),h=_R(n),p=b.useRef(!1),x=b.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:_,focusSelectedItem:C}=a,O=b.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&w&&_){const k=i.trigger.getBoundingClientRect(),M=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),$=_.getBoundingClientRect();if(i.dir!=="rtl"){const Ae=$.left-M.left,ye=j.left-Ae,Xe=k.left-ye,We=k.width+Xe,et=Math.max(We,M.width),ft=window.innerWidth-xl,st=p9(ye,[xl,Math.max(xl,ft-et)]);s.style.minWidth=We+"px",s.style.left=st+"px"}else{const Ae=M.right-$.right,ye=window.innerWidth-j.right-Ae,Xe=window.innerWidth-k.right-ye,We=k.width+Xe,et=Math.max(We,M.width),ft=window.innerWidth-xl,st=p9(ye,[xl,Math.max(xl,ft-et)]);s.style.minWidth=We+"px",s.style.right=st+"px"}const L=h(),V=window.innerHeight-xl*2,G=y.scrollHeight,D=window.getComputedStyle(u),H=parseInt(D.borderTopWidth,10),U=parseInt(D.paddingTop,10),Y=parseInt(D.borderBottomWidth,10),q=parseInt(D.paddingBottom,10),W=H+U+G+q+Y,K=Math.min(w.offsetHeight*5,W),z=window.getComputedStyle(y),X=parseInt(z.paddingTop,10),ee=parseInt(z.paddingBottom,10),ae=k.top+k.height/2-xl,fe=V-ae,ie=w.offsetHeight/2,ge=w.offsetTop+ie,he=H+U+ge,ue=W-he;if(he<=ae){const Ae=L.length>0&&w===L[L.length-1].ref.current;s.style.bottom="0px";const ye=u.clientHeight-y.offsetTop-y.offsetHeight,Xe=Math.max(fe,ie+(Ae?ee:0)+ye+Y),We=he+Xe;s.style.height=We+"px"}else{const Ae=L.length>0&&w===L[0].ref.current;s.style.top="0px";const Xe=Math.max(ae,H+y.offsetTop+(Ae?X:0)+ie)+ue;s.style.height=Xe+"px",y.scrollTop=he-ae+y.offsetTop}s.style.margin=`${xl}px 0`,s.style.minHeight=K+"px",s.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,s,u,y,w,_,i.dir,r]);ii(()=>O(),[O]);const[P,R]=b.useState();ii(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const T=b.useCallback(k=>{k&&x.current===!0&&(O(),C==null||C(),x.current=!1)},[O,C]);return v.jsx(J2e,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:T,children:v.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:v.jsx(Zt.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ite.displayName=Q2e;var Z2e="SelectPopperPosition",cD=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=xl,...i}=e,a=ER(n);return v.jsx(Yx,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cD.displayName=Z2e;var[J2e,d$]=Ky(im,{}),fD="SelectViewport",ate=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=nh(fD,n),a=d$(fD,n),s=Bn(t,i.onViewportChange),l=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(SR.Slot,{scope:n,children:v.jsx(Zt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ze(o.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&d){const p=Math.abs(l.current-c.scrollTop);if(p>0){const x=window.innerHeight-xl*2,y=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),_=Math.max(y,w);if(_0?P:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});ate.displayName=fD;var ste="SelectGroup",[eAe,tAe]=Ky(ste),nAe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pa();return v.jsx(eAe,{scope:n,id:o,children:v.jsx(Zt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});nAe.displayName=ste;var lte="SelectLabel",ute=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tAe(lte,n);return v.jsx(Zt.div,{id:o.id,...r,ref:t})});ute.displayName=lte;var nC="SelectItem",[rAe,cte]=Ky(nC),fte=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=th(nC,n),l=nh(nC,n),u=s.value===r,[c,d]=b.useState(i??""),[h,p]=b.useState(!1),x=Bn(t,C=>{var O;return(O=l.itemRefCallback)==null?void 0:O.call(l,C,r,o)}),y=Pa(),w=b.useRef("touch"),_=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(rAe,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:b.useCallback(C=>{d(O=>O||((C==null?void 0:C.textContent)??"").trim())},[]),children:v.jsx(SR.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:v.jsx(Zt.div,{role:"option","aria-labelledby":y,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:x,onFocus:Ze(a.onFocus,()=>p(!0)),onBlur:Ze(a.onBlur,()=>p(!1)),onClick:Ze(a.onClick,()=>{w.current!=="mouse"&&_()}),onPointerUp:Ze(a.onPointerUp,()=>{w.current==="mouse"&&_()}),onPointerDown:Ze(a.onPointerDown,C=>{w.current=C.pointerType}),onPointerMove:Ze(a.onPointerMove,C=>{var O;w.current=C.pointerType,o?(O=l.onItemLeave)==null||O.call(l):w.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ze(a.onPointerLeave,C=>{var O;C.currentTarget===document.activeElement&&((O=l.onItemLeave)==null||O.call(l))}),onKeyDown:Ze(a.onKeyDown,C=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&C.key===" "||(q2e.includes(C.key)&&_(),C.key===" "&&C.preventDefault())})})})})});fte.displayName=nC;var Z1="SelectItemText",dte=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=th(Z1,n),s=nh(Z1,n),l=cte(Z1,n),u=H2e(Z1,n),[c,d]=b.useState(null),h=Bn(t,_=>d(_),l.onItemTextChange,_=>{var C;return(C=s.itemTextRefCallback)==null?void 0:C.call(s,_,l.value,l.disabled)}),p=c==null?void 0:c.textContent,x=b.useMemo(()=>v.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=u;return ii(()=>(y(x),()=>w(x)),[y,w,x]),v.jsxs(v.Fragment,{children:[v.jsx(Zt.span,{id:l.textId,...i,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?zs.createPortal(i.children,a.valueNode):null]})});dte.displayName=Z1;var hte="SelectItemIndicator",pte=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cte(hte,n).isSelected?v.jsx(Zt.span,{"aria-hidden":!0,...r,ref:t}):null});pte.displayName=hte;var dD="SelectScrollUpButton",mte=b.forwardRef((e,t)=>{const n=nh(dD,e.__scopeSelect),r=d$(dD,e.__scopeSelect),[o,i]=b.useState(!1),a=Bn(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?v.jsx(vte,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});mte.displayName=dD;var hD="SelectScrollDownButton",gte=b.forwardRef((e,t)=>{const n=nh(hD,e.__scopeSelect),r=d$(hD,e.__scopeSelect),[o,i]=b.useState(!1),a=Bn(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?v.jsx(vte,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});gte.displayName=hD;var vte=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=nh("SelectScrollButton",n),a=b.useRef(null),s=_R(n),l=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>l(),[l]),ii(()=>{var c;const u=s().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[s]),v.jsx(Zt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ze(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ze(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ze(o.onPointerLeave,()=>{l()})})}),oAe="SelectSeparator",yte=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(Zt.div,{"aria-hidden":!0,...r,ref:t})});yte.displayName=oAe;var pD="SelectArrow",iAe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ER(n),i=th(pD,n),a=nh(pD,n);return i.open&&a.position==="popper"?v.jsx(Xx,{...o,...r,ref:t}):null});iAe.displayName=pD;var aAe="SelectBubbleInput",wte=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),i=Bn(r,o),a=ree(t);return b.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&c){const d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx(Zt.select,{...n,style:{...XY,...n.style},ref:i,defaultValue:t})});wte.displayName=aAe;function xte(e){return e===""||e===void 0}function bte(e){const t=Ji(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(a=>{const s=n.current+a;t(s),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Ste(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=sAe(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function sAe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lAe=Yee,_te=Qee,uAe=Jee,cAe=ete,fAe=tte,Ete=nte,dAe=ate,Cte=ute,Ote=fte,hAe=dte,pAe=pte,Rte=mte,Pte=gte,Tte=yte;const h$=lAe,p$=uAe,CR=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(_te,{ref:r,className:je("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,v.jsx(cAe,{asChild:!0,children:v.jsx(_L,{className:"h-4 w-4 opacity-50"})})]}));CR.displayName=_te.displayName;const Ate=b.forwardRef(({className:e,...t},n)=>v.jsx(Rte,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(fSe,{})}));Ate.displayName=Rte.displayName;const kte=b.forwardRef(({className:e,...t},n)=>v.jsx(Pte,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(_L,{})}));kte.displayName=Pte.displayName;const OR=b.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>v.jsx(fAe,{children:v.jsxs(Ete,{ref:o,className:je("relative z-[300] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[v.jsx(Ate,{}),v.jsx(dAe,{className:je("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(kte,{})]})}));OR.displayName=Ete.displayName;const mAe=b.forwardRef(({className:e,...t},n)=>v.jsx(Cte,{ref:n,className:je("px-2 py-1.5 text-sm font-semibold",e),...t}));mAe.displayName=Cte.displayName;const gd=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Ote,{ref:r,className:je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(pAe,{children:v.jsx(iR,{className:"h-4 w-4"})})}),v.jsx(hAe,{children:t})]}));gd.displayName=Ote.displayName;const gAe=b.forwardRef(({className:e,...t},n)=>v.jsx(Tte,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));gAe.displayName=Tte.displayName;function vAe({table:e,column:t,filter:n}){const r=t==null?void 0:t.getFilterValue(),[o,i]=b.useState(""),a=b.useRef(null),s=b.useRef(null),l=b.useRef(null),[u,c]=b.useState(""),[d,h]=b.useState(""),[p,x]=b.useState("");if(!n.type)return null;switch(n.type){case Vn.TimeRange:const y=n.timeRangeConfig;return y?v.jsxs("div",{className:"space-y-3",children:[y.isCustomTimeRange&&v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Custom Range"}),v.jsx(wt,{onClick:y.onClearTimeRange,variant:"ghost",size:"sm",leftIcon:v.jsx(QX,{className:"size-4"}),children:"Clear"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"w-full space-y-1",children:v.jsx(uD,{label:"After",date:y.createdAfter?new Date(y.createdAfter):void 0,setDate:j=>{var $;return($=y.onCreatedAfterChange)==null?void 0:$.call(y,j==null?void 0:j.toISOString())},triggerClassName:"w-full"})}),v.jsx("div",{className:"w-full space-y-1",children:v.jsx(uD,{label:"Before",date:y.finishedBefore?new Date(y.finishedBefore):void 0,setDate:j=>{var $;return($=y.onFinishedBeforeChange)==null?void 0:$.call(y,j==null?void 0:j.toISOString())},triggerClassName:"w-full"})})]})]}),!y.isCustomTimeRange&&v.jsx("div",{className:"space-y-1",children:v.jsxs(h$,{value:y.isCustomTimeRange?"custom":y.currentTimeWindow,onValueChange:j=>{var $;return($=y.onTimeWindowChange)==null?void 0:$.call(y,j)},children:[v.jsx(CR,{className:"h-8 text-xs",children:v.jsx(p$,{placeholder:"Choose time range"})}),v.jsxs(OR,{children:[v.jsx(gd,{value:"1h",children:"1 hour"}),v.jsx(gd,{value:"6h",children:"6 hours"}),v.jsx(gd,{value:"1d",children:"1 day"}),v.jsx(gd,{value:"7d",children:"7 days"}),v.jsx(gd,{value:"custom",children:"Custom"})]})]})})]}):null;case Vn.Switch:return v.jsxs("div",{className:"flex items-center justify-between rounded-md border bg-muted/10 px-3 py-2 hover:bg-muted/50",children:[v.jsx(is,{htmlFor:`filter-${n.columnId}`,className:"flex-1 cursor-pointer text-sm font-medium",children:n.title}),v.jsx(qp,{id:`filter-${n.columnId}`,checked:!!r,onCheckedChange:j=>t==null?void 0:t.setFilterValue(j===!0?!0:void 0)})]});case Vn.KeyValue:const w=Array.isArray(r)?r:r?[r]:[],_=()=>{if(u.trim()&&d.trim()){const j=`${u.trim()}:${d.trim()}`;t==null||t.setFilterValue([...w,j]),c(""),h("")}};return v.jsxs("div",{className:"space-y-3",children:[w.length>0&&v.jsx("div",{className:"space-y-2",children:w.map((j,$)=>{const L=j.includes(":")?":":"=",[V,G]=j.split(L);return v.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-2 py-1 text-xs",children:[v.jsxs("div",{className:"flex items-center gap-1 font-mono",children:[v.jsx("span",{className:"font-medium text-blue-600",children:V}),v.jsx("span",{className:"text-muted-foreground",children:L}),v.jsx("span",{className:"text-green-600",children:G})]}),v.jsx(wt,{variant:"icon",size:"xs",onClick:()=>{const D=w.filter((H,U)=>U!==$);t==null||t.setFilterValue(D.length>0?D:void 0)},children:v.jsx(Qv,{className:"size-3"})})]},$)})}),v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[v.jsxs("div",{className:"space-y-1",children:[v.jsx("label",{className:"text-xs text-muted-foreground",children:"Key"}),v.jsx(ri,{ref:a,placeholder:"ENV",value:u,onChange:j=>c(j.target.value),onKeyDown:j=>{var $;j.key==="Enter"?_():j.key==="Tab"&&!j.shiftKey&&(j.preventDefault(),($=s.current)==null||$.focus())},className:"h-8 text-xs placeholder:text-muted-foreground/50"})]}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("label",{className:"text-xs text-muted-foreground",children:"Value"}),v.jsx(ri,{ref:s,placeholder:"PRODUCTION",value:d,onChange:j=>h(j.target.value),onKeyDown:j=>{var $;j.key==="Enter"?_():j.key==="Tab"&&j.shiftKey&&(j.preventDefault(),($=a.current)==null||$.focus())},className:"h-8 text-xs placeholder:text-muted-foreground/50"})]})]}),v.jsx(wt,{variant:"outline",size:"sm",disabled:!u.trim()||!d.trim(),onClick:_,className:"w-full",children:"Add Filter"})]})]});case Vn.Array:const C=Array.isArray(r)?r:r?[r]:[],O=()=>{p.trim()&&(t==null||t.setFilterValue([...C,p]),x(""))};return v.jsxs("div",{className:"space-y-3",children:[C.length>0&&v.jsx("div",{className:"space-y-2",children:C.map((j,$)=>v.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-2 py-1 text-xs",children:[v.jsx("div",{className:"flex items-center gap-1 font-mono",children:v.jsx("span",{className:"text-muted-foreground",children:j})}),v.jsx(wt,{variant:"icon",size:"xs",onClick:()=>{const L=C.filter((V,G)=>G!==$);t==null||t.setFilterValue(L.length>0?L:void 0)},children:v.jsx(Qv,{className:"size-3"})})]},$))}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(ri,{ref:l,placeholder:"foobar",value:p,onChange:j=>x(j.target.value),onKeyDown:j=>{j.key==="Enter"&&O()},className:"h-8 w-full text-xs placeholder:text-muted-foreground/50"}),v.jsx(wt,{variant:"outline",size:"sm",disabled:!p.trim(),onClick:O,className:"w-full",children:"Add Filter"})]})]});case Vn.Checkbox:case Vn.Radio:if(!n.options)return null;const P=Array.isArray(r)?r:r?[r]:[],R=n.searchConfig?n.options:n.options.filter(j=>j.label.toLowerCase().includes(o.toLowerCase())),T=j=>{i(j),b.startTransition(()=>{var $;($=n.searchConfig)==null||$.onSearch(j)})};return v.jsxs("div",{className:"space-y-2",children:[(n.searchConfig||n.options.length>5)&&v.jsx(ri,{placeholder:`Search ${n.title.toLowerCase()}...`,value:o,onChange:j=>T(j.target.value),className:"h-8 text-xs"}),v.jsx("div",{className:"max-h-56 space-y-1 overflow-y-auto rounded-md border bg-muted/10 p-2",children:R.length>0?R.map(j=>{var D;const $=P.includes(j.value),L=j.subFilterColumnId?e.getColumn(j.subFilterColumnId):void 0,V=L==null?void 0:L.getFilterValue(),G=((D=j.subOptions)==null?void 0:D.map(H=>H.value))||[];return v.jsxs(b.Fragment,{children:[v.jsxs("div",{className:"flex items-center space-x-2 rounded-md px-2 py-1.5 hover:bg-muted/50",children:[v.jsx(qp,{id:`${n.columnId}-${j.value}`,checked:$,onCheckedChange:H=>{let U;H?(U=[...P,j.value],L&&j.subOptions&&L.setFilterValue(void 0)):(U=P.filter(Y=>Y!==j.value),L&&L.setFilterValue(void 0)),t==null||t.setFilterValue(U.length>0?U:void 0)}}),v.jsx(is,{htmlFor:`${n.columnId}-${j.value}`,className:"flex-1 cursor-pointer truncate text-sm",children:j.label})]}),j.subOptions&&j.subFilterColumnId&&j.subOptions.map(H=>{const U=G.find(q=>q!==H.value),Y=$&&(V===void 0||V===H.value);return v.jsxs("div",{className:"flex items-center space-x-2 rounded-md py-1.5 pl-8 pr-2 hover:bg-muted/50",children:[v.jsx(qp,{id:`${n.columnId}-${j.value}-${H.value}`,checked:Y,onCheckedChange:q=>{const W=j.subFilterColumnId;e.setColumnFilters(K=>{const z=K.filter(X=>X.id!==n.columnId&&X.id!==W);if(q){const X=$?P:[...P,j.value];z.push({id:n.columnId,value:X}),$||z.push({id:W,value:H.value})}else if(V===void 0)z.push({id:n.columnId,value:P}),z.push({id:W,value:U});else{const X=P.filter(ee=>ee!==j.value);X.length>0&&z.push({id:n.columnId,value:X})}return z})}}),v.jsx(is,{htmlFor:`${n.columnId}-${j.value}-${H.value}`,className:"flex-1 cursor-pointer truncate text-xs text-muted-foreground",children:H.label})]},H.value)})]},j.value)}):v.jsx("div",{className:"py-3 text-center text-xs text-muted-foreground",children:"No options found"})})]});case Vn.Search:const k=r&&String(r)||"";return v.jsx(ri,{ref:a,placeholder:`Search ${n.title.toLowerCase()}...`,value:k,onChange:j=>t==null?void 0:t.setFilterValue(j.target.value),onKeyDown:j=>{j.key==="Escape"&&(t==null||t.setFilterValue(void 0))},className:"h-8 w-full text-xs placeholder:text-muted-foreground/50"});default:return n.type}}function yAe(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,r)=>n===t[r])}function wAe({table:e,filters:t,hiddenFilters:n,columnKeyToName:r,onResetFilters:o}){const i=e.getState().columnFilters,a=b.useMemo(()=>{var c;return((c=i==null?void 0:i.filter(d=>!(d.id===Up&&yAe(d.value,Object.values(qt))||d.id===dee||d.id===hee||d.id===pee&&d.value!==!0||d.id===mee&&d.value==="1d"||d.id===db&&!d.value||d.id===yR||n.includes(d.id)||d.value===void 0||d.value===null||d.value===""||Array.isArray(d.value)&&d.value.length===0)))==null?void 0:c.length)||0},[n,i]),l=t.filter(c=>!n.includes(c.columnId)).length>0,u=e.getAllColumns().filter(c=>typeof c.accessorFn<"u"&&c.getCanHide()).length>0;return!l&&!u?null:v.jsxs(DL,{children:[v.jsx(LL,{asChild:!0,children:v.jsxs(wt,{variant:"outline",size:"sm",className:"flex-shrink-0",children:[v.jsx(TSe,{className:"size-4"}),v.jsx("span",{className:"cq-xl:inline ml-2 hidden text-sm",children:"Filters"}),a>0&&v.jsx(Ti,{variant:"secondary",className:"ml-2 px-1 py-0 text-xs",children:a}),v.jsx(_L,{className:"cq-xl:inline ml-2 hidden size-4"})]})}),v.jsx(dR,{align:"end",className:"max-h-[32rem] w-96 overflow-y-auto p-0 shadow-lg",children:v.jsx(Nte,{table:e,filters:t,hiddenFilters:n,columnKeyToName:r,showColumnVisibility:!0,onResetFilters:o,activeFiltersCount:a})})]})}function m9({table:e,filters:t,hiddenFilters:n,onResetFilters:r,activeFiltersCount:o=0}){const i=t.filter(a=>!n.includes(a.columnId));return v.jsxs("div",{className:"space-y-0",children:[r&&o>0&&v.jsx("div",{className:"border-b bg-muted/10 p-3",children:v.jsxs(wt,{variant:"outline",size:"sm",onClick:r,className:"w-full",children:[v.jsx(Qv,{className:"mr-2 size-3"}),"Clear All Filters"]})}),v.jsx("div",{className:"max-h-96 overflow-y-auto",children:v.jsx("div",{className:"space-y-4 p-3",children:i.map((a,s)=>{var l;return v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("label",{className:"text-sm font-medium text-foreground",children:a.title}),((l=e.getColumn(a.columnId))==null?void 0:l.getFilterValue())!==void 0&&[Vn.Array,Vn.KeyValue,Vn.Checkbox,Vn.TimeRange,Vn.Radio].includes(a.type)&&v.jsx(wt,{variant:"icon",size:"xs",onClick:()=>{var u;return(u=e.getColumn(a.columnId))==null?void 0:u.setFilterValue(void 0)},children:v.jsx(Qv,{className:"size-3"})})]}),v.jsx(vAe,{table:e,column:e.getColumn(a.columnId),filter:a}),stypeof n.accessorFn<"u"&&n.getCanHide()).map(n=>{const r=(t??{})[n.id]||n.id;return v.jsxs("div",{className:"flex items-center space-x-3 rounded-md px-2 py-2 transition-colors hover:bg-muted/50",children:[v.jsx(qp,{id:`column-${n.id}`,checked:n.getIsVisible(),onCheckedChange:o=>n.toggleVisibility(!!o)}),v.jsx(is,{htmlFor:`column-${n.id}`,className:"flex-1 cursor-pointer truncate text-sm font-medium",children:r})]},n.id)})})}),v.jsx("div",{className:"border-t p-3",children:v.jsxs("div",{className:"flex w-full gap-1",children:[v.jsx(wt,{variant:"ghost",size:"sm",onClick:()=>e.toggleAllColumnsVisible(!1),className:"flex-1",children:"Hide All"}),v.jsx(wt,{variant:"ghost",size:"sm",onClick:()=>e.toggleAllColumnsVisible(!0),className:"flex-1",children:"Show All"})]})})]})}function Nte({table:e,filters:t,columnKeyToName:n,hiddenFilters:r,showColumnVisibility:o,onResetFilters:i,activeFiltersCount:a=0}){const[s,l]=b.useState("filters"),c=t.filter(p=>!r.includes(p.columnId)).length>0,d=e.getAllColumns().filter(p=>typeof p.accessorFn<"u"&&p.getCanHide()).length>0;return c&&d&&o?v.jsxs(JE,{value:s,onValueChange:p=>l(p),className:"w-full rounded-none p-0",children:[v.jsxs(Uw,{className:"grid w-full grid-cols-2 rounded-none bg-muted/30 px-2",children:[v.jsx(Sa,{value:"filters",className:"text-xs font-medium data-[state=active]:bg-background data-[state=active]:text-foreground",children:v.jsxs("div",{className:"flex items-center gap-2",children:["Filters",a>0&&v.jsx(Ti,{variant:"secondary",className:"h-4 px-1.5 text-[10px] leading-none",children:a})]})}),v.jsx(Sa,{value:"columns",className:"text-xs font-medium data-[state=active]:bg-background data-[state=active]:text-foreground",children:"Column Visibility"})]}),v.jsx(_a,{value:"filters",className:"mt-0 space-y-0",children:v.jsx(m9,{table:e,filters:t,hiddenFilters:r,onResetFilters:i,activeFiltersCount:a})}),v.jsx(_a,{value:"columns",className:"mt-0",children:v.jsx(g9,{table:e,columnKeyToName:n})})]}):v.jsx("div",{className:"w-full",children:c?v.jsx(m9,{table:e,filters:t,hiddenFilters:r,onResetFilters:i,activeFiltersCount:a}):d&&o?v.jsx(g9,{table:e,columnKeyToName:n}):v.jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:"No options available"})})}const xAe=({isRefetching:e,onRefetch:t})=>{const{userRefetchIntervalPreference:n,setRefetchInterval:r}=vf(),o=b.useMemo(()=>Object.entries(pw).map(([s,l])=>({key:s,...l})),[]),i=s=>{const u=pw[s];r(u)},a=b.useMemo(()=>{var s;return((s=Object.entries(pw).find(([,l])=>l.value===n.value))==null?void 0:s[0])||"off"},[n]);return v.jsxs("div",{className:"flex h-8 flex-row items-center",children:[v.jsxs(wt,{className:"flex h-full flex-row gap-x-2 rounded-l-md rounded-r-none pl-3",variant:"outline",onClick:t,children:[v.jsx(kX,{"data-is-refetching":e,className:"size-4 data-[is-refetching=true]:animate-spin"}),v.jsx("span",{className:"cq-xl:inline hidden",children:"Refresh"})]}),v.jsxs(h$,{value:a,onValueChange:i,children:[v.jsx(CR,{className:"flex h-full flex-row items-center gap-x-2 rounded-l-none rounded-r-md border-l-0 hover:bg-accent",children:a!=="off"&&v.jsx(p$,{})}),v.jsx(OR,{children:o.map(({key:s,label:l})=>v.jsx(gd,{value:s,children:l},s))})]})]})},bAe={gitHub:e=>v.jsx("svg",{viewBox:"0 0 438.549 438.549",...e,children:v.jsx("path",{fill:"currentColor",d:"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"})}),google:e=>v.jsx("svg",{role:"img",viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"})}),spinner:e=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})};function Mte({className:e}){return v.jsx(bAe.spinner,{className:je("mr-2 h-4 w-4 animate-spin",e)})}function gb({className:e}){return v.jsx("div",{className:je("flex h-full w-full flex-1 flex-row",e),children:v.jsx(Mte,{})})}var J1={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */var SAe=J1.exports,v9;function _Ae(){return v9||(v9=1,(function(e,t){(function(){var n,r="4.18.1",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,x=4,y=1,w=2,_=1,C=2,O=4,P=8,R=16,T=32,k=64,M=128,j=256,$=512,L=30,V="...",G=800,D=16,H=1,U=2,Y=3,q=1/0,W=9007199254740991,K=17976931348623157e292,z=NaN,X=4294967295,ee=X-1,ae=X>>>1,fe=[["ary",M],["bind",_],["bindKey",C],["curry",P],["curryRight",R],["flip",$],["partial",T],["partialRight",k],["rearg",j]],ie="[object Arguments]",ge="[object Array]",he="[object AsyncFunction]",ue="[object Boolean]",we="[object Date]",Ae="[object DOMException]",ye="[object Error]",Xe="[object Function]",We="[object GeneratorFunction]",et="[object Map]",ft="[object Number]",st="[object Null]",Ge="[object Object]",Kt="[object Promise]",gn="[object Proxy]",un="[object RegExp]",on="[object Set]",oe="[object String]",de="[object Symbol]",Se="[object Undefined]",Ve="[object WeakMap]",Ye="[object WeakSet]",He="[object ArrayBuffer]",tt="[object DataView]",Tt="[object Float32Array]",Ot="[object Float64Array]",an="[object Int8Array]",tr="[object Int16Array]",$n="[object Int32Array]",Mr="[object Uint8Array]",Ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",me="[object Uint32Array]",Te=/\b__p \+= '';/g,De=/\b(__p \+=) '' \+/g,Fe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,Ut=/[&<>"']/g,bn=RegExp(Vt.source),it=RegExp(Ut.source),gt=/<%-([\s\S]+?)%>/g,Dt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,Zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yr=/^\w*$/,ta=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xr=/[\\^$.*+?()[\]{}|]/g,Xs=RegExp(Xr.source),ko=/^\s+/,na=/\s/,ra=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ds=/\{\n\/\* \[wrapped with (.+)\] \*/,La=/,? & /,Qs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oa=/[()=,{}\[\]\/\s]/,Ko=/\\(\\)?/g,$a=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hs=/\w*$/,Zs=/^[-+]0x[0-9a-f]+$/i,Di=/^0b[01]+$/i,Fa=/^\[object .+?Constructor\]$/,Yl=/^0o[0-7]+$/i,Js=/^(?:0|[1-9]\d*)$/,li=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,el=/($^)/,dr=/['\n\r\u2028\u2029\\]/g,Xl="\\ud800-\\udfff",ic="\\u0300-\\u036f",tl="\\ufe20-\\ufe2f",Ql="\\u20d0-\\u20ff",ac=ic+tl+Ql,qe="\\u2700-\\u27bf",mt="a-z\\xdf-\\xf6\\xf8-\\xff",tn="\\xac\\xb1\\xd7\\xf7",Wn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jn="\\u2000-\\u206f",nl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Li="A-Z\\xc0-\\xd6\\xd8-\\xde",$i="\\ufe0e\\ufe0f",No=tn+Wn+Jn+nl,Yo="['’]",sc="["+Xl+"]",lc="["+No+"]",_f="["+ac+"]",Tm="\\d+",Zl="["+qe+"]",Ef="["+mt+"]",Ba="[^"+Xl+No+Tm+qe+mt+Li+"]",rl="\\ud83c[\\udffb-\\udfff]",dh="(?:"+_f+"|"+rl+")",dn="[^"+Xl+"]",Fn="(?:\\ud83c[\\udde6-\\uddff]){2}",Fr="[\\ud800-\\udbff][\\udc00-\\udfff]",ir="["+Li+"]",ol="\\u200d",ps="(?:"+Ef+"|"+Ba+")",Cf="(?:"+ir+"|"+Ba+")",uc="(?:"+Yo+"(?:d|ll|m|re|s|t|ve))?",_t="(?:"+Yo+"(?:D|LL|M|RE|S|T|VE))?",It=dh+"?",nn="["+$i+"]?",_n="(?:"+ol+"(?:"+[dn,Fn,Fr].join("|")+")"+nn+It+")*",Rr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ms="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jl=nn+It+_n,eu="(?:"+[Zl,Fn,Fr].join("|")+")"+Jl,vP="(?:"+[dn+_f+"?",_f,Fn,Fr,sc].join("|")+")",Ib=RegExp(Yo,"g"),hh=RegExp(_f,"g"),s0=RegExp(rl+"(?="+rl+")|"+vP+Jl,"g"),Db=RegExp([ir+"?"+Ef+"+"+uc+"(?="+[lc,ir,"$"].join("|")+")",Cf+"+"+_t+"(?="+[lc,ir+ps,"$"].join("|")+")",ir+"?"+ps+"+"+uc,ir+"+"+_t,ms,Rr,Tm,eu].join("|"),"g"),Am=RegExp("["+ol+Xl+ac+$i+"]"),Lb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yP=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ph=-1,nr={};nr[Tt]=nr[Ot]=nr[an]=nr[tr]=nr[$n]=nr[Mr]=nr[Ee]=nr[Ce]=nr[me]=!0,nr[ie]=nr[ge]=nr[He]=nr[ue]=nr[tt]=nr[we]=nr[ye]=nr[Xe]=nr[et]=nr[ft]=nr[Ge]=nr[un]=nr[on]=nr[oe]=nr[Ve]=!1;var Yn={};Yn[ie]=Yn[ge]=Yn[He]=Yn[tt]=Yn[ue]=Yn[we]=Yn[Tt]=Yn[Ot]=Yn[an]=Yn[tr]=Yn[$n]=Yn[et]=Yn[ft]=Yn[Ge]=Yn[un]=Yn[on]=Yn[oe]=Yn[de]=Yn[Mr]=Yn[Ee]=Yn[Ce]=Yn[me]=!0,Yn[ye]=Yn[Xe]=Yn[Ve]=!1;var km={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},wP={"&":"&","<":"<",">":">",'"':""","'":"'"},xP={"&":"&","<":"<",">":">",""":'"',"'":"'"},l0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nm=parseFloat,u0=parseInt,c0=typeof Fu=="object"&&Fu&&Fu.Object===Object&&Fu,tu=typeof self=="object"&&self&&self.Object===Object&&self,Qr=c0||tu||Function("return this")(),Of=t&&!t.nodeType&&t,nu=Of&&!0&&e&&!e.nodeType&&e,mh=nu&&nu.exports===Of,Rf=mh&&c0.process,Fi=(function(){try{var be=nu&&nu.require&&nu.require("util").types;return be||Rf&&Rf.binding&&Rf.binding("util")}catch{}})(),ui=Fi&&Fi.isArrayBuffer,cc=Fi&&Fi.isDate,Mm=Fi&&Fi.isMap,Pf=Fi&&Fi.isRegExp,$b=Fi&&Fi.isSet,jm=Fi&&Fi.isTypedArray;function Xo(be,Me,Ne){switch(Ne.length){case 0:return be.call(Me);case 1:return be.call(Me,Ne[0]);case 2:return be.call(Me,Ne[0],Ne[1]);case 3:return be.call(Me,Ne[0],Ne[1],Ne[2])}return be.apply(Me,Ne)}function gh(be,Me,Ne,ht){for(var sn=-1,Hn=be==null?0:be.length;++sn-1}function vh(be,Me,Ne){for(var ht=-1,sn=be==null?0:be.length;++ht-1;);return Ne}function v0(be,Me){for(var Ne=be.length;Ne--&&iu(Me,be[Ne],0)>-1;);return Ne}function Gb(be,Me){for(var Ne=be.length,ht=0;Ne--;)be[Ne]===Me&&++ht;return ht}var Kb=h0(km),Yb=h0(wP);function Tf(be){return"\\"+l0[be]}function RP(be,Me){return be==null?n:be[Me]}function Af(be){return Am.test(be)}function PP(be){return Lb.test(be)}function Xb(be){for(var Me,Ne=[];!(Me=be.next()).done;)Ne.push(Me.value);return Ne}function $m(be){var Me=-1,Ne=Array(be.size);return be.forEach(function(ht,sn){Ne[++Me]=[sn,ht]}),Ne}function kf(be,Me){return function(Ne){return be(Me(Ne))}}function ia(be,Me){for(var Ne=-1,ht=be.length,sn=0,Hn=[];++Ne-1}function Gm(g,S){var N=this.__data__,F=Do(N,g);return F<0?(++this.size,N.push([g,S])):N[F][1]=S,this}fi.prototype.clear=di,fi.prototype.delete=Hm,fi.prototype.get=lS,fi.prototype.has=uS,fi.prototype.set=Gm;function vs(g){var S=-1,N=g==null?0:g.length;for(this.clear();++S=S?g:S)),g}function zi(g,S,N,F,Q,ne){var ce,ve=S&h,_e=S&p,Le=S&x;if(N&&(ce=Q?N(g,F,Q,ne):N(g)),ce!==n)return ce;if(!jr(g))return g;var $e=hn(g);if($e){if(ce=Fo(g),!ve)return Jo(g,ce)}else{var Ue=lo(g),ut=Ue==Xe||Ue==We;if(od(g))return sg(g,ve);if(Ue==Ge||Ue==ie||ut&&!Q){if(ce=_e||ut?{}:TS(g),!ve)return _e?$P(g,dS(ce,g)):LP(g,ca(ce,g))}else{if(!Yn[Ue])return Q?g:{};ce=FP(g,Ue,ve)}}ne||(ne=new pi);var Nt=ne.get(g);if(Nt)return Nt;ne.set(g,ce),A8(g)?g.forEach(function(Wt){ce.add(zi(Wt,S,N,Wt,g,ne))}):P8(g)&&g.forEach(function(Wt,Mn){ce.set(Mn,zi(Wt,S,N,Mn,g,ne))});var Jt=Le?_e?yg:Jh:_e?va:Uo,Sn=$e?n:Jt(g);return Mo(Sn||g,function(Wt,Mn){Sn&&(Mn=Wt,Wt=g[Mn]),wo(ce,Mn,zi(Wt,S,N,Mn,g,ne))}),ce}function Xm(g){var S=Uo(g);return function(N){return R0(N,g,S)}}function R0(g,S,N){var F=N.length;if(g==null)return!F;for(g=rr(g);F--;){var Q=N[F],ne=S[Q],ce=g[Q];if(ce===n&&!(Q in g)||!ne(ce))return!1}return!0}function yc(g,S,N){if(typeof g!="function")throw new vo(a);return ei(function(){g.apply(n,N)},S)}function wc(g,S,N,F){var Q=-1,ne=Im,ce=!0,ve=g.length,_e=[],Le=S.length;if(!ve)return _e;N&&(S=yr(S,Qo(N))),F?(ne=vh,ce=!1):S.length>=o&&(ne=yh,ce=!1,S=new hi(S));e:for(;++QQ?0:Q+N),F=F===n||F>Q?Q:yn(F),F<0&&(F+=Q),F=N>F?0:N8(F);N0&&N(ve)?S>1?so(ve,S-1,N,F,Q):ou(Q,ve):F||(Q[Q.length]=ve)}return Q}var Vf=Xh(),Lh=Xh(!0);function Zo(g,S){return g&&Vf(g,S,Uo)}function $h(g,S){return g&&Lh(g,S,Uo)}function Wf(g,S){return ru(S,function(N){return Ic(g[N])})}function cl(g,S){S=hl(S,g);for(var N=0,F=S.length;g!=null&&NS}function bc(g,S){return g!=null&&Nn.call(g,S)}function P0(g,S){return g!=null&&S in rr(g)}function pS(g,S,N){return g>=jo(S,N)&&g=120&&$e.length>=120)?new hi(ce&&$e):n}$e=g[0];var Ue=-1,ut=ve[0];e:for(;++Ue-1;)ve!==g&&qm.call(ve,_e,1),qm.call(g,_e,1);return g}function Vh(g,S){for(var N=g?S.length:0,F=N-1;N--;){var Q=S[N];if(N==F||Q!==ne){var ne=Q;gl(Q)?qm.call(g,Q,1):ig(g,Q)}}return g}function Ec(g,S){return g+Ch(Th()*(S-g+1))}function Wh(g,S,N,F){for(var Q=-1,ne=Zr(uu((S-g)/(N||1)),0),ce=Ne(ne);ne--;)ce[F?ne:++Q]=g,g+=N;return ce}function k0(g,S){var N="";if(!g||S<1||S>W)return N;do S%2&&(N+=g),S=Ch(S/2),S&&(g+=g);while(S);return N}function Lt(g,S){return Eg(uo(g,S,ya),g+"")}function N0(g){return mu(zg(g))}function M0(g,S){var N=zg(g);return np(N,ul(S,0,N.length))}function Cc(g,S,N,F){if(!jr(g))return g;S=hl(S,g);for(var Q=-1,ne=S.length,ce=ne-1,ve=g;ve!=null&&++QQ?0:Q+S),N=N>Q?Q:N,N<0&&(N+=Q),Q=S>N?0:N-S>>>0,S>>>=0;for(var ne=Ne(Q);++F>>1,ce=g[ne];ce!==null&&!Ga(ce)&&(N?ce<=S:ce=o){var Le=S?null:_S(g);if(Le)return Fm(Le);ce=!1,Q=yh,_e=new hi}else _e=S?[]:ve;e:for(;++F=F?g:gi(g,S,N)}var F0=gr||function(g){return Qr.clearTimeout(g)};function sg(g,S){if(S)return g.slice();var N=g.length,F=al?al(N):new g.constructor(N);return g.copy(F),F}function lg(g){var S=new g.constructor(g.byteLength);return new Sh(S).set(new Sh(g)),S}function vS(g,S){var N=S?lg(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.byteLength)}function yS(g){var S=new g.constructor(g.source,hs.exec(g));return S.lastIndex=g.lastIndex,S}function IP(g){return mc?rr(mc.call(g)):{}}function B0(g,S){var N=S?lg(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.length)}function wS(g,S){if(g!==S){var N=g!==n,F=g===null,Q=g===g,ne=Ga(g),ce=S!==n,ve=S===null,_e=S===S,Le=Ga(S);if(!ve&&!Le&&!ne&&g>S||ne&&ce&&_e&&!ve&&!Le||F&&ce&&_e||!N&&_e||!Q)return 1;if(!F&&!ne&&!Le&&g=ve)return _e;var Le=N[F];return _e*(Le=="desc"?-1:1)}}return g.index-S.index}function z0(g,S,N,F){for(var Q=-1,ne=g.length,ce=N.length,ve=-1,_e=S.length,Le=Zr(ne-ce,0),$e=Ne(_e+Le),Ue=!F;++ve<_e;)$e[ve]=S[ve];for(;++Q1?N[Q-1]:n,ce=Q>2?N[2]:n;for(ne=g.length>3&&typeof ne=="function"?(Q--,ne):n,ce&&at(N[0],N[1],ce)&&(ne=Q<3?n:ne,Q=1),S=rr(S);++F-1?Q[ne?S[ce]:ce]:n}}function dg(g){return Va(function(S){var N=S.length,F=N,Q=yo.prototype.thru;for(g&&S.reverse();F--;){var ne=S[F];if(typeof ne!="function")throw new vo(a);if(Q&&!ce&&Pc(ne)=="wrapper")var ce=new yo([],!0)}for(F=ce?F:N;++F1&&qn.reverse(),$e&&_eve))return!1;var Le=ne.get(g),$e=ne.get(S);if(Le&&$e)return Le==S&&$e==g;var Ue=-1,ut=!0,Nt=N&w?new hi:n;for(ne.set(g,S),ne.set(S,g);++Ue1?"& ":"")+S[F],S=S.join(N>2?", ":" "),g.replace(ra,`{ +/* [wrapped with `+S+`] */ +`)}function Bo(g){return hn(g)||up(g)||!!(If&&g&&g[If])}function gl(g,S){var N=typeof g;return S=S??W,!!S&&(N=="number"||N!="symbol"&&Js.test(g))&&g>-1&&g%1==0&&g0){if(++S>=G)return arguments[0]}else S=0;return g.apply(n,arguments)}}function np(g,S){var N=-1,F=g.length,Q=F-1;for(S=S===n?F:S;++N1?g[S-1]:n;return N=typeof N=="function"?(g.pop(),N):n,BS(g,N)});function VS(g){var S=te(g);return S.__chain__=!0,S}function Au(g,S){return S(g),g}function Mc(g,S){return S(g)}var jc=Va(function(g){var S=g.length,N=S?g[0]:0,F=this.__wrapped__,Q=function(ne){return Ih(ne,g)};return S>1||this.__actions__.length||!(F instanceof vn)||!gl(N)?this.thru(Q):(F=F.slice(N,+N+(S?1:0)),F.__actions__.push({func:Mc,args:[Q],thisArg:n}),new yo(F,this.__chain__).thru(function(ne){return S&&!ne.length&&ne.push(n),ne}))});function Ng(){return VS(this)}function c1(){return new yo(this.value(),this.__chain__)}function f1(){this.__values__===n&&(this.__values__=k8(this.value()));var g=this.__index__>=this.__values__.length,S=g?n:this.__values__[this.__index__++];return{done:g,value:S}}function YP(){return this}function d1(g){for(var S,N=this;N instanceof du;){var F=rp(N);F.__index__=0,F.__values__=n,S?Q.__wrapped__=F:S=F;var Q=F;N=N.__wrapped__}return Q.__wrapped__=g,S}function XP(){var g=this.__wrapped__;if(g instanceof vn){var S=g;return this.__actions__.length&&(S=new vn(this)),S=S.reverse(),S.__actions__.push({func:Mc,args:[ap],thisArg:n}),new yo(S,this.__chain__)}return this.thru(ap)}function WS(){return $0(this.__wrapped__,this.__actions__)}var HS=ug(function(g,S,N){Nn.call(g,N)?++g[N]:za(g,N,1)});function Mg(g,S,N){var F=hn(g)?Bb:Qm;return N&&at(g,S,N)&&(S=n),F(g,Ft(S,3))}function jg(g,S){var N=hn(g)?ru:xc;return N(g,Ft(S,3))}var GS=fg(ip),h1=fg(Cg);function QP(g,S){return so($g(g,S),1)}function KS(g,S){return so($g(g,S),q)}function p1(g,S,N){return N=N===n?1:yn(N),so($g(g,S),N)}function sp(g,S){var N=hn(g)?Mo:gu;return N(g,Ft(S,3))}function Ig(g,S){var N=hn(g)?Fb:Uf;return N(g,Ft(S,3))}var Dg=ug(function(g,S,N){Nn.call(g,N)?g[N].push(S):za(g,N,[S])});function YS(g,S,N,F){g=ga(g)?g:zg(g),N=N&&!F?yn(N):0;var Q=g.length;return N<0&&(N=Zr(Q+N,0)),QS(g)?N<=Q&&g.indexOf(S,N)>-1:!!Q&&iu(g,S,N)>-1}var ZP=Lt(function(g,S,N){var F=-1,Q=typeof S=="function",ne=ga(g)?Ne(g.length):[];return gu(g,function(ce){ne[++F]=Q?Xo(S,ce,N):Sc(ce,S,N)}),ne}),Lg=ug(function(g,S,N){za(g,N,S)});function $g(g,S){var N=hn(g)?yr:ng;return N(g,Ft(S,3))}function lp(g,S,N,F){return g==null?[]:(hn(S)||(S=S==null?[]:[S]),N=F?n:N,hn(N)||(N=N==null?[]:[N]),rg(g,S,N))}var JP=ug(function(g,S,N){g[N?0:1].push(S)},function(){return[[],[]]});function Fg(g,S,N){var F=hn(g)?f0:Wb,Q=arguments.length<3;return F(g,Ft(S,4),N,Q,gu)}function f(g,S,N){var F=hn(g)?bP:Wb,Q=arguments.length<3;return F(g,Ft(S,4),N,Q,Uf)}function m(g,S){var N=hn(g)?ru:xc;return N(g,St(Ft(S,3)))}function E(g){var S=hn(g)?mu:N0;return S(g)}function A(g,S,N){(N?at(g,S,N):S===n)?S=1:S=yn(S);var F=hn(g)?fS:M0;return F(g,S)}function I(g){var S=hn(g)?O0:Hh;return S(g)}function B(g){if(g==null)return 0;if(ga(g))return QS(g)?au(g):g.length;var S=lo(g);return S==et||S==on?g.size:zh(g).length}function Z(g,S,N){var F=hn(g)?d0:j0;return N&&at(g,S,N)&&(S=n),F(g,Ft(S,3))}var se=Lt(function(g,S){if(g==null)return[];var N=S.length;return N>1&&at(g,S[0],S[1])?S=[]:N>2&&at(S[0],S[1],S[2])&&(S=[S[0]]),rg(g,so(S,1),[])}),pe=S0||function(){return Qr.Date.now()};function ke(g,S){if(typeof S!="function")throw new vo(a);return g=yn(g),function(){if(--g<1)return S.apply(this,arguments)}}function ze(g,S,N){return S=N?n:S,S=g&&S==null?g.length:S,xs(g,M,n,n,n,n,S)}function Ke(g,S){var N;if(typeof S!="function")throw new vo(a);return g=yn(g),function(){return--g>0&&(N=S.apply(this,arguments)),g<=1&&(S=n),N}}var Be=Lt(function(g,S,N){var F=_;if(N.length){var Q=ia(N,Qf(Be));F|=T}return xs(g,F,S,N,Q)}),ct=Lt(function(g,S,N){var F=_|C;if(N.length){var Q=ia(N,Qf(ct));F|=T}return xs(S,F,g,N,Q)});function vt(g,S,N){S=N?n:S;var F=xs(g,P,n,n,n,n,n,S);return F.placeholder=vt.placeholder,F}function bt(g,S,N){S=N?n:S;var F=xs(g,R,n,n,n,n,n,S);return F.placeholder=bt.placeholder,F}function Ar(g,S,N){var F,Q,ne,ce,ve,_e,Le=0,$e=!1,Ue=!1,ut=!0;if(typeof g!="function")throw new vo(a);S=_s(S)||0,jr(N)&&($e=!!N.leading,Ue="maxWait"in N,ne=Ue?Zr(_s(N.maxWait)||0,S):ne,ut="trailing"in N?!!N.trailing:ut);function Nt(ro){var yl=F,Lc=Q;return F=Q=n,Le=ro,ce=g.apply(Lc,yl),ce}function Jt(ro){return Le=ro,ve=ei(Mn,S),$e?Nt(ro):ce}function Sn(ro){var yl=ro-_e,Lc=ro-Le,W8=S-yl;return Ue?jo(W8,ne-Lc):W8}function Wt(ro){var yl=ro-_e,Lc=ro-Le;return _e===n||yl>=S||yl<0||Ue&&Lc>=ne}function Mn(){var ro=pe();if(Wt(ro))return qn(ro);ve=ei(Mn,Sn(ro))}function qn(ro){return ve=n,ut&&F?Nt(ro):(F=Q=n,ce)}function Ka(){ve!==n&&F0(ve),Le=0,F=_e=Q=ve=n}function Vi(){return ve===n?ce:qn(pe())}function Ya(){var ro=pe(),yl=Wt(ro);if(F=arguments,Q=this,_e=ro,yl){if(ve===n)return Jt(_e);if(Ue)return F0(ve),ve=ei(Mn,S),Nt(_e)}return ve===n&&(ve=ei(Mn,S)),ce}return Ya.cancel=Ka,Ya.flush=Vi,Ya}var Oe=Lt(function(g,S){return yc(g,1,S)}),xe=Lt(function(g,S,N){return yc(g,_s(S)||0,N)});function Pe(g){return xs(g,$)}function Qe(g,S){if(typeof g!="function"||S!=null&&typeof S!="function")throw new vo(a);var N=function(){var F=arguments,Q=S?S.apply(this,F):F[0],ne=N.cache;if(ne.has(Q))return ne.get(Q);var ce=g.apply(this,F);return N.cache=ne.set(Q,ce)||ne,ce};return N.cache=new(Qe.Cache||vs),N}Qe.Cache=vs;function St(g){if(typeof g!="function")throw new vo(a);return function(){var S=arguments;switch(S.length){case 0:return!g.call(this);case 1:return!g.call(this,S[0]);case 2:return!g.call(this,S[0],S[1]);case 3:return!g.call(this,S[0],S[1],S[2])}return!g.apply(this,S)}}function Bt(g){return Ke(2,g)}var zt=gS(function(g,S){S=S.length==1&&hn(S[0])?yr(S[0],Qo(Ft())):yr(so(S,1),Qo(Ft()));var N=S.length;return Lt(function(F){for(var Q=-1,ne=jo(F.length,N);++Q=S}),up=T0((function(){return arguments})())?T0:function(g){return Vr(g)&&Nn.call(g,"callee")&&!rS.call(g,"callee")},hn=Ne.isArray,uue=ui?Qo(ui):fl;function ga(g){return g!=null&&XS(g.length)&&!Ic(g)}function no(g){return Vr(g)&&ga(g)}function cue(g){return g===!0||g===!1||Vr(g)&&zr(g)==ue}var od=Rh||dT,fue=cc?Qo(cc):yu;function due(g){return Vr(g)&&g.nodeType===1&&!m1(g)}function hue(g){if(g==null)return!0;if(ga(g)&&(hn(g)||typeof g=="string"||typeof g.splice=="function"||od(g)||Bg(g)||up(g)))return!g.length;var S=lo(g);if(S==et||S==on)return!g.size;if(_u(g))return!zh(g).length;for(var N in g)if(Nn.call(g,N))return!1;return!0}function pue(g,S){return wu(g,S)}function mue(g,S,N){N=typeof N=="function"?N:n;var F=N?N(g,S):n;return F===n?wu(g,S,n,N):!!F}function tT(g){if(!Vr(g))return!1;var S=zr(g);return S==ye||S==Ae||typeof g.message=="string"&&typeof g.name=="string"&&!m1(g)}function gue(g){return typeof g=="number"&&Ph(g)}function Ic(g){if(!jr(g))return!1;var S=zr(g);return S==Xe||S==We||S==he||S==gn}function R8(g){return typeof g=="number"&&g==yn(g)}function XS(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=W}function jr(g){var S=typeof g;return g!=null&&(S=="object"||S=="function")}function Vr(g){return g!=null&&typeof g=="object"}var P8=Mm?Qo(Mm):Jm;function vue(g,S){return g===S||eg(g,S,wg(S))}function yue(g,S,N){return N=typeof N=="function"?N:n,eg(g,S,wg(S),N)}function wue(g){return T8(g)&&g!=+g}function xue(g){if(tp(g))throw new sn(i);return Hf(g)}function bue(g){return g===null}function Sue(g){return g==null}function T8(g){return typeof g=="number"||Vr(g)&&zr(g)==ft}function m1(g){if(!Vr(g)||zr(g)!=Ge)return!1;var S=jf(g);if(S===null)return!0;var N=Nn.call(S,"constructor")&&S.constructor;return typeof N=="function"&&N instanceof N&&dc.call(N)==eS}var nT=Pf?Qo(Pf):ws;function _ue(g){return R8(g)&&g>=-W&&g<=W}var A8=$b?Qo($b):Fh;function QS(g){return typeof g=="string"||!hn(g)&&Vr(g)&&zr(g)==oe}function Ga(g){return typeof g=="symbol"||Vr(g)&&zr(g)==de}var Bg=jm?Qo(jm):Bh;function Eue(g){return g===n}function Cue(g){return Vr(g)&&lo(g)==Ve}function Oue(g){return Vr(g)&&zr(g)==Ye}var Rue=xo(tg),Pue=xo(function(g,S){return g<=S});function k8(g){if(!g)return[];if(ga(g))return QS(g)?Bi(g):Jo(g);if(_h&&g[_h])return Xb(g[_h]());var S=lo(g),N=S==et?$m:S==on?Fm:zg;return N(g)}function Dc(g){if(!g)return g===0?g:0;if(g=_s(g),g===q||g===-q){var S=g<0?-1:1;return S*K}return g===g?g:0}function yn(g){var S=Dc(g),N=S%1;return S===S?N?S-N:S:0}function N8(g){return g?ul(yn(g),0,X):0}function _s(g){if(typeof g=="number")return g;if(Ga(g))return z;if(jr(g)){var S=typeof g.valueOf=="function"?g.valueOf():g;g=jr(S)?S+"":S}if(typeof g!="string")return g===0?g:+g;g=Hb(g);var N=Di.test(g);return N||Yl.test(g)?u0(g.slice(2),N?2:8):Zs.test(g)?z:+g}function M8(g){return qi(g,va(g))}function Tue(g){return g?ul(yn(g),-W,W):g===0?g:0}function ar(g){return g==null?"":vi(g)}var Aue=Lo(function(g,S){if(_u(S)||ga(S)){qi(S,Uo(S),g);return}for(var N in S)Nn.call(S,N)&&wo(g,N,S[N])}),j8=Lo(function(g,S){qi(S,va(S),g)}),I8=Lo(function(g,S,N,F){qi(S,va(S),g,F)}),rT=Lo(function(g,S,N,F){qi(S,Uo(S),g,F)}),kue=Va(Ih);function Nue(g,S){var N=sa(g);return S==null?N:ca(N,S)}var Mue=Lt(function(g,S){g=rr(g);var N=-1,F=S.length,Q=F>2?S[2]:n;for(Q&&at(S[0],S[1],Q)&&(F=1);++N1),ne}),qi(g,yg(g),N),F&&(N=zi(N,h|p|x,ES));for(var Q=S.length;Q--;)ig(N,S[Q]);return N});function Que(g,S){return L8(g,St(Ft(S)))}var Zue=Va(function(g,S){return g==null?{}:_c(g,S)});function L8(g,S){if(g==null)return{};var N=yr(yg(g),function(F){return[F]});return S=Ft(S),br(g,N,function(F,Q){return S(F,Q[0])})}function Jue(g,S,N){S=hl(S,g);var F=-1,Q=S.length;for(Q||(Q=1,g=n);++FS){var F=g;g=S,S=F}if(N||g%1||S%1){var Q=Th();return jo(g+Q*(S-g+Nm("1e-"+((Q+"").length-1))),S)}return Ec(g,S)}var cce=Oc(function(g,S,N){return S=S.toLowerCase(),g+(N?B8(S):S)});function B8(g){return aT(ar(g).toLowerCase())}function z8(g){return g=ar(g),g&&g.replace(li,Kb).replace(hh,"")}function fce(g,S,N){g=ar(g),S=vi(S);var F=g.length;N=N===n?F:ul(yn(N),0,F);var Q=N;return N-=S.length,N>=0&&g.slice(N,Q)==S}function dce(g){return g=ar(g),g&&it.test(g)?g.replace(Ut,Yb):g}function hce(g){return g=ar(g),g&&Xs.test(g)?g.replace(Xr,"\\$&"):g}var pce=Oc(function(g,S,N){return g+(N?"-":"")+S.toLowerCase()}),mce=Oc(function(g,S,N){return g+(N?" ":"")+S.toLowerCase()}),gce=U0("toLowerCase");function vce(g,S,N){g=ar(g),S=yn(S);var F=S?au(g):0;if(!S||F>=S)return g;var Q=(S-F)/2;return Zh(Ch(Q),N)+g+Zh(uu(Q),N)}function yce(g,S,N){g=ar(g),S=yn(S);var F=S?au(g):0;return S&&F>>0,N?(g=ar(g),g&&(typeof S=="string"||S!=null&&!nT(S))&&(S=vi(S),!S&&Af(g))?pl(Bi(g),0,N):g.split(S,N)):[]}var Cce=Oc(function(g,S,N){return g+(N?" ":"")+aT(S)});function Oce(g,S,N){return g=ar(g),N=N==null?0:ul(yn(N),0,g.length),S=vi(S),g.slice(N,N+S.length)==S}function Rce(g,S,N){var F=te.templateSettings;N&&at(g,S,N)&&(S=n),g=ar(g),S=rT({},S,F,H0);var Q=rT({},S.imports,F.imports,H0),ne=Uo(Q),ce=fc(Q,ne);Mo(ne,function(Wt){if(oa.test(Wt))throw new sn(l)});var ve,_e,Le=0,$e=S.interpolate||el,Ue="__p += '",ut=w0((S.escape||el).source+"|"+$e.source+"|"+($e===kt?$a:el).source+"|"+(S.evaluate||el).source+"|$","g"),Nt="//# sourceURL="+(Nn.call(S,"sourceURL")?(S.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ph+"]")+` +`;g.replace(ut,function(Wt,Mn,qn,Ka,Vi,Ya){return qn||(qn=Ka),Ue+=g.slice(Le,Ya).replace(dr,Tf),Mn&&(ve=!0,Ue+=`' + +__e(`+Mn+`) + +'`),Vi&&(_e=!0,Ue+=`'; +`+Vi+`; +__p += '`),qn&&(Ue+=`' + +((__t = (`+qn+`)) == null ? '' : __t) + +'`),Le=Ya+Wt.length,Wt}),Ue+=`'; +`;var Jt=Nn.call(S,"variable")&&S.variable;if(!Jt)Ue=`with (obj) { +`+Ue+` +} +`;else if(oa.test(Jt))throw new sn(s);Ue=(_e?Ue.replace(Te,""):Ue).replace(De,"$1").replace(Fe,"$1;"),Ue="function("+(Jt||"obj")+`) { +`+(Jt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(_e?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Ue+`return __p +}`;var Sn=U8(function(){return Hn(ne,Nt+"return "+Ue).apply(n,ce)});if(Sn.source=Ue,tT(Sn))throw Sn;return Sn}function Pce(g){return ar(g).toLowerCase()}function Tce(g){return ar(g).toUpperCase()}function Ace(g,S,N){if(g=ar(g),g&&(N||S===n))return Hb(g);if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=Bi(S),ne=g0(F,Q),ce=v0(F,Q)+1;return pl(F,ne,ce).join("")}function kce(g,S,N){if(g=ar(g),g&&(N||S===n))return g.slice(0,y0(g)+1);if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=v0(F,Bi(S))+1;return pl(F,0,Q).join("")}function Nce(g,S,N){if(g=ar(g),g&&(N||S===n))return g.replace(ko,"");if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=g0(F,Bi(S));return pl(F,Q).join("")}function Mce(g,S){var N=L,F=V;if(jr(S)){var Q="separator"in S?S.separator:Q;N="length"in S?yn(S.length):N,F="omission"in S?vi(S.omission):F}g=ar(g);var ne=g.length;if(Af(g)){var ce=Bi(g);ne=ce.length}if(N>=ne)return g;var ve=N-au(F);if(ve<1)return F;var _e=ce?pl(ce,0,ve).join(""):g.slice(0,ve);if(Q===n)return _e+F;if(ce&&(ve+=_e.length-ve),nT(Q)){if(g.slice(ve).search(Q)){var Le,$e=_e;for(Q.global||(Q=w0(Q.source,ar(hs.exec(Q))+"g")),Q.lastIndex=0;Le=Q.exec($e);)var Ue=Le.index;_e=_e.slice(0,Ue===n?ve:Ue)}}else if(g.indexOf(vi(Q),ve)!=ve){var ut=_e.lastIndexOf(Q);ut>-1&&(_e=_e.slice(0,ut))}return _e+F}function jce(g){return g=ar(g),g&&bn.test(g)?g.replace(Vt,Zb):g}var Ice=Oc(function(g,S,N){return g+(N?" ":"")+S.toUpperCase()}),aT=U0("toUpperCase");function q8(g,S,N){return g=ar(g),S=N?n:S,S===n?PP(g)?kP(g):_P(g):g.match(S)||[]}var U8=Lt(function(g,S){try{return Xo(g,n,S)}catch(N){return tT(N)?N:new sn(N)}}),Dce=Va(function(g,S){return Mo(S,function(N){N=ha(N),za(g,N,Be(g[N],g))}),g});function Lce(g){var S=g==null?0:g.length,N=Ft();return g=S?yr(g,function(F){if(typeof F[1]!="function")throw new vo(a);return[N(F[0]),F[1]]}):[],Lt(function(F){for(var Q=-1;++QW)return[];var N=X,F=jo(g,X);S=Ft(S),g-=X;for(var Q=m0(F,S);++N0||S<0)?new vn(N):(g<0?N=N.takeRight(-g):g&&(N=N.drop(g)),S!==n&&(S=yn(S),N=S<0?N.dropRight(-S):N.take(S-g)),N)},vn.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},vn.prototype.toArray=function(){return this.take(X)},Zo(vn.prototype,function(g,S){var N=/^(?:filter|find|map|reject)|While$/.test(S),F=/^(?:head|last)$/.test(S),Q=te[F?"take"+(S=="last"?"Right":""):S],ne=F||/^find/.test(S);Q&&(te.prototype[S]=function(){var ce=this.__wrapped__,ve=F?[1]:arguments,_e=ce instanceof vn,Le=ve[0],$e=_e||hn(ce),Ue=function(Mn){var qn=Q.apply(te,ou([Mn],ve));return F&&ut?qn[0]:qn};$e&&N&&typeof Le=="function"&&Le.length!=1&&(_e=$e=!1);var ut=this.__chain__,Nt=!!this.__actions__.length,Jt=ne&&!ut,Sn=_e&&!Nt;if(!ne&&$e){ce=Sn?ce:new vn(this);var Wt=g.apply(ce,ve);return Wt.__actions__.push({func:Mc,args:[Ue],thisArg:n}),new yo(Wt,ut)}return Jt&&Sn?g.apply(this,ve):(Wt=this.thru(Ue),Jt?F?Wt.value()[0]:Wt.value():Wt)})}),Mo(["pop","push","shift","sort","splice","unshift"],function(g){var S=Mf[g],N=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",F=/^(?:pop|shift)$/.test(g);te.prototype[g]=function(){var Q=arguments;if(F&&!this.__chain__){var ne=this.value();return S.apply(hn(ne)?ne:[],Q)}return this[N](function(ce){return S.apply(hn(ce)?ce:[],Q)})}}),Zo(vn.prototype,function(g,S){var N=te[S];if(N){var F=N.name+"";Nn.call(cu,F)||(cu[F]=[]),cu[F].push({name:S,func:N})}}),cu[hg(n,C).name]=[{name:"wrapper",func:n}],vn.prototype.clone=E0,vn.prototype.reverse=Bf,vn.prototype.value=hu,te.prototype.at=jc,te.prototype.chain=Ng,te.prototype.commit=c1,te.prototype.next=f1,te.prototype.plant=d1,te.prototype.reverse=XP,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=WS,te.prototype.first=te.prototype.head,_h&&(te.prototype[_h]=YP),te}),Nf=NP();nu?((nu.exports=Nf)._=Nf,Of._=Nf):Qr._=Nf}).call(SAe)})(J1,J1.exports)),J1.exports}var mD=_Ae();const jte=()=>{const{tenantId:e}=Ma(),{toast:t}=dL(),{handleApiError:n}=ZO({}),r=b.useCallback(l=>{t({title:`${mD.capitalize(l)} request submitted`,description:`No need to hit '${mD.capitalize(l)}' again.`})},[t]),o=b.useCallback((l,u)=>{const c=l==="cancel"?"Canceling":"Replaying",d=u.length,h=t({title:`${c} ${d} task run${d>1?"s":""}`,description:`This may take a few seconds. You don't need to hit ${l} again.`});setTimeout(()=>{h.dismiss()},5e3)},[t]),{mutateAsync:i}=Ir({mutationKey:["task-run:action"],mutationFn:async l=>{const u=l.actionType;switch(u){case"cancel":return rt.v1TaskCancel(e,l);case"replay":return rt.v1TaskReplay(e,l);default:const c=u;throw new Error(`Unhandled action type: ${c}`)}},onError:n,onMutate:l=>{r(l.actionType)}}),a=b.useCallback(async l=>{var c;const u=await i(l);(c=u.data)!=null&&c.ids&&o(l.actionType,u.data.ids)},[i,o]);return{handleTaskRunAction:b.useCallback(l=>{var u;(u=l.externalIds)!=null&&u.length?a({actionType:l.actionType,externalIds:l.externalIds}):l.filter&&Object.values(l.filter).some(c=>!!c)&&a({actionType:l.actionType,filter:l.filter})},[a])}},EAe=e=>{switch(e){case"cancel":return"Cancel";case"replay":return"Replay";default:const t=e;throw new Error(`Unhandled action type: ${t}`)}},CAe=({label:e,params:t})=>{const{tenantId:n}=Ma(),{data:r,isLoading:o,isError:i}=In({...io.v1WorkflowRuns.listDisplayNames(n,t.externalIds||[]),enabled:!!t.externalIds});if(o||i)return null;const a=(r==null?void 0:r.rows)||[];return v.jsxs("div",{className:"flex flex-col gap-y-4",children:[v.jsxs("p",{className:"text-md",children:["Confirm to ",e.toLowerCase()," the following runs:"]}),v.jsxs("ul",{className:"ml-4 list-disc pl-4",children:[a==null?void 0:a.slice(0,10).map(s=>v.jsx("li",{className:"font-semibold",children:s.displayName},s.metadata.id)),(a.length||0)>10&&v.jsxs("li",{children:[(a.length||0)-10," more"]})]})]})};function OAe({label:e,params:t,table:n,columnKeyToName:r,filters:o,hiddenFilters:i}){var a;if((a=t.externalIds)!=null&&a.length)return v.jsx(CAe,{label:e,params:t});if(t.filter)return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Confirm to ",e.toLowerCase()," all runs matching the following filters:"]}),v.jsx(Nte,{table:n,filters:o,columnKeyToName:r,hiddenFilters:i,showColumnVisibility:!1})]});throw new Error(`Unhandled case: ${t}`)}function RAe({actionType:e,params:t,table:n,columnKeyToName:r,filters:o,hiddenFilters:i}){const a=EAe(e),{handleTaskRunAction:s}=jte(),{isActionModalOpen:l,actions:{setIsActionModalOpen:u}}=rh();return v.jsx(nb,{open:l,onOpenChange:u,children:v.jsxs(Uy,{className:"max-h-[90%] overflow-auto py-8 sm:max-w-[700px]",children:[v.jsx(rb,{className:"gap-2",children:v.jsx("div",{className:"flex w-full flex-row items-center justify-between",children:v.jsxs(Vy,{children:[a," runs"]})})}),v.jsxs("div",{className:"flex flex-col space-y-4",children:[v.jsx("div",{className:"text-sm text-muted-foreground",children:v.jsx(OAe,{label:a,params:t,table:n,filters:o,columnKeyToName:r,hiddenFilters:i,showColumnVisibility:!1})}),v.jsxs("div",{className:"flex flex-row items-center justify-end gap-3 border-t pt-4",children:[v.jsx(wt,{onClick:()=>{u(!1)},variant:"outline",children:"Close"}),v.jsx(wt,{onClick:()=>{s({...t,actionType:e}),u(!1)},children:"Confirm"})]})]})]})})}const y9=({disabled:e,params:t,icon:n,label:r,showModal:o,showLabel:i,className:a})=>{const{handleTaskRunAction:s}=jte(),{actions:{setIsActionModalOpen:l,setSelectedActionType:u}}=rh();return v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsxs(wt,{size:"sm",className:je("text-sm gap-2",a),variant:"outline",disabled:e,onClick:()=>{if(u(t.actionType),!o){s(t);return}l(!0)},children:[n,i&&r]})}),v.jsx(Us,{children:r})]})})},rC=({actionType:e,disabled:t,paramOverrides:n,showModal:r,showLabel:o,className:i})=>{const{actionModalParams:a}=rh(),s=n||a;switch(e){case"cancel":return v.jsx(y9,{disabled:t,params:{...s,actionType:"cancel"},icon:v.jsx(QX,{className:"size-4"}),label:"Cancel",showModal:r,className:i,showLabel:o});case"replay":return v.jsx(y9,{disabled:t,params:{...s,actionType:"replay"},icon:v.jsx(H1e,{className:"size-4"}),label:"Replay",showModal:r,className:i,showLabel:o});default:const l=e;throw new Error(`Unhandled action type: ${l}`)}},PAe=({onTriggerWorkflow:e})=>{const{display:{hideTriggerRunButton:t,hideCancelAndReplayButtons:n}}=rh(),r=b.useMemo(()=>{let o=[!n&&v.jsxs("div",{className:"flex flex-row gap-x-1",children:[v.jsx(rC,{actionType:"replay",disabled:!1,showModal:!0,showLabel:!1}),v.jsx(rC,{actionType:"cancel",disabled:!1,showModal:!0,showLabel:!1})]},"bulk-actions")];return t||(o=[v.jsxs(wt,{size:"sm",onClick:e,children:[v.jsx("span",{className:"cq-xl:inline hidden text-sm",children:"Trigger Run"}),v.jsx(AX,{className:"cq-xl:hidden size-4"})]},"trigger"),...o]),o},[e,t,n]);return v.jsx(v.Fragment,{children:r})};var Vn=(e=>(e.Checkbox="checkbox",e.Radio="radio",e.KeyValue="key-value",e.Array="array",e.Switch="switch",e.TimeRange="time-range",e.Search="search",e))(Vn||{});function TAe({table:e,filters:t,leftActions:n,rightActions:r=[],searchBar:o,showColumnToggle:i,isLoading:a=!1,hiddenFilters:s,columnKeyToName:l,refetchProps:u,tableActions:c,onResetFilters:d}){const h=t.filter(x=>!s.includes(x.columnId)),p=h.length>0;return c&&r.push(v.jsx(PAe,{onTriggerWorkflow:c.onTriggerWorkflow},"table-actions")),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex w-full flex-row items-center gap-2",children:[v.jsxs("div",{className:"flex min-w-0 flex-shrink-0 items-center gap-2",children:[!n&&a&&v.jsx(Mte,{}),n]}),o&&v.jsx("div",{className:"min-w-0 flex-1",children:o}),v.jsxs("div",{className:"ml-auto flex flex-shrink-0 flex-row items-center gap-2",children:[r,u&&v.jsx(xAe,{isRefetching:u.isRefetching,onRefetch:u.onRefetch}),(p||i)&&v.jsx(wAe,{table:e,filters:h,hiddenFilters:s,columnKeyToName:l,onResetFilters:d})]})]})})}const Ite=[{value:qt.COMPLETED,label:"Succeeded"},{value:qt.FAILED,label:"Failed"},{value:qt.RUNNING,label:"Running",subFilterColumnId:yR,subOptions:[{value:jE.ON_WORKER,label:"On Worker"},{value:jE.EVICTED,label:"Evicted"}]},{value:qt.QUEUED,label:"Queued"},{value:qt.CANCELLED,label:"Cancelled"}],AAe=({filterVisibility:e,filterActions:t})=>{const[n,r]=b.useState(""),o=BPe(n),i=b.useMemo(()=>o.map(s=>({value:s.metadata.id,label:s.name}))||[],[o]),a={onTimeWindowChange:s=>{s!=="custom"?t.setTimeWindow(s):t.setCustomTimeRange({start:t.apiFilters.since||new Date(Date.now()-1440*60*1e3).toISOString(),end:t.apiFilters.until||new Date().toISOString()})},onCreatedAfterChange:s=>{t.isCustomTimeRange&&t.apiFilters.until&&t.setCustomTimeRange({start:s||new Date(Date.now()-1440*60*1e3).toISOString(),end:t.apiFilters.until})},onFinishedBeforeChange:s=>{t.isCustomTimeRange&&t.apiFilters.since&&t.setCustomTimeRange({start:t.apiFilters.since,end:s||new Date().toISOString()})},onClearTimeRange:()=>t.setCustomTimeRange(null),currentTimeWindow:t.timeWindow,isCustomTimeRange:t.isCustomTimeRange,createdAfter:t.apiFilters.since,finishedBefore:t.apiFilters.until};return[{columnId:fee,title:"Time Range",type:Vn.TimeRange,timeRangeConfig:a},{columnId:JL,title:"Workflow",options:i,type:Vn.Checkbox,searchConfig:{onSearch:r}},{columnId:Up,title:"Status",options:Ite,type:Vn.Checkbox},{columnId:vw,title:"Metadata",type:Vn.KeyValue},{columnId:db,title:"Flatten DAGs",type:Vn.Switch,options:[{value:"true",label:"Flatten"},{value:"false",label:"All"}]}].filter(s=>e[s.columnId]!=!1)},v_={parentTaskExternalId:!1,flattenDAGs:!1,runningFilter:!1},Dte=b.createContext(null),gD=({tableKey:e,children:t,initColumnVisibility:n={},filterVisibility:r={},display:o,runFilters:i,persistColumnVisibilityKey:a})=>{const[s,l]=b.useState(!1),[u,c]=b.useState(null),[d,h]=b.useState({}),[p,x]=b.useState(!1),[y,w]=b.useState(!1),_=b.useMemo(()=>({...n,...v_}),[n]),[C,O]=Xv(`hatchet:columns:${a??"__none__"}`,_),[P,R]=b.useState(_),T=b.useMemo(()=>a?{...C,...v_}:P,[a,C,P]),k=b.useCallback(de=>{a?O(Se=>({...typeof de=="function"?de(Se):de,...v_})):R(Se=>({...typeof de=="function"?de(Se):de,...v_}))},[a,O]),{workflowId:M,parentTaskExternalId:j,workerId:$,triggeringEventExternalId:L}=i??{},{hideMetrics:V=!1,hideCounts:G=!1,hideDateFilter:D=!1,hideTriggerRunButton:H=!1,hideCancelAndReplayButtons:U=!1,hideColumnToggle:Y=!1,hiddenFilters:q=[]}=o??{},W=DPe(e,{workflowIds:M?[M]:void 0}),K=AAe({filterVisibility:r,filterActions:W}),z=M||(W.apiFilters.workflowIds??[])[0],X=W.apiFilters.flattenDAGs,{tableRows:ee,selectedRuns:ae,numPages:fe,isLoading:ie,isFetching:ge,refetch:he,getRowId:ue,isRefetching:we,pagination:Ae,setPagination:ye,setPageSize:Xe}=CCe({key:e,rowSelection:d,createdAfter:W.apiFilters.since,finishedBefore:W.apiFilters.until,statuses:W.apiFilters.statuses,runningFilter:W.apiFilters.runningFilter,additionalMetadata:W.apiFilters.additionalMetadata,workerId:$,workflowIds:W.apiFilters.workflowIds||(z?[z]:void 0),parentTaskExternalId:j,triggeringEventExternalId:L,onlyTasks:!!$||X}),We=b.useMemo(()=>ae.length>0?{externalIds:ae.map(de=>de==null?void 0:de.metadata.id)}:{filter:{...W.apiFilters,since:W.apiFilters.since||""}},[ae,W.apiFilters]),{runStatusCounts:et,queueMetrics:ft,isStatusCountsLoading:st,isStatusCountsFetching:Ge,refetch:Kt,isStatusCountsRefetching:gn,isQueueMetricsLoading:un}=ECe({workflow:z,parentTaskExternalId:j,createdAfter:W.apiFilters.since,createdBefore:W.apiFilters.until,additionalMetadata:W.apiFilters.additionalMetadata,showQueueMetrics:p}),on=we||gn,oe=b.useMemo(()=>({filters:W,toolbarFilters:K,tableRows:ee,selectedRuns:ae,numPages:fe,isRunsLoading:ie,isRunsFetching:ge,isStatusCountsFetching:Ge,isStatusCountsLoading:st,isQueueMetricsLoading:un,isRefetching:on,runStatusCounts:et,queueMetrics:ft,isActionModalOpen:s,actionModalParams:We,selectedActionType:u,pagination:Ae,columnVisibility:T,rowSelection:d,showTriggerWorkflow:y,showQueueMetrics:p,display:{hideMetrics:V,hideCounts:G,hideDateFilter:D,hideTriggerRunButton:H,hideCancelAndReplayButtons:U,hideColumnToggle:Y,hiddenFilters:q},actions:{setIsActionModalOpen:l,setSelectedActionType:c,refetchRuns:he,refetchMetrics:Kt,getRowId:ue,setPagination:ye,setPageSize:Xe,setColumnVisibility:k,setRowSelection:h,setShowQueueMetrics:x,setShowTriggerWorkflow:w}}),[W,K,ee,ae,fe,ie,ge,Ge,st,un,et,ft,s,V,G,D,H,q,We,u,l,c,he,Kt,ue,Xe,Ae,ye,U,Y,on,x,p,w,h,T,k,d,y]);return v.jsx(Dte.Provider,{value:oe,children:t})},rh=()=>{const e=b.useContext(Dte);if(!e)throw new Error("useRunsContext must be used within a RunsProvider");return e},m$=({taskRunId:e,limit:t=50})=>{var i,a;const{tenant:n}=Hs({from:At.tenantRoute.to}),r=In({...io.v1TaskEvents.list(n,{limit:t,offset:0},e)});return{isSkipped:((a=(i=r.data)==null?void 0:i.rows)==null?void 0:a.some(s=>s.eventType===An.SKIPPED))??!1,isLoading:r.isLoading}},y_="rd",g$=b.createContext(null);function kAe(e){const t={};let n=!1;for(const[r,o]of Object.entries(e))o!=null&&o!==""&&(t[r]=o,n=!0);return n?t:void 0}function NAe(e){const t={};return"tab"in e&&(t.tab=e.tab),"focusedTaskRunId"in e&&(t.task=e.focusedTaskRunId),"selectedSpanId"in e&&(t.span=e.selectedSpanId,e.selectedSpanId&&(t.group=void 0)),"selectedGroupId"in e&&(t.group=e.selectedGroupId,e.selectedGroupId&&(t.span=void 0)),"queryString"in e&&(t.q=e.queryString||void 0),t}function Tet({children:e}){const[t,n]=Zx(),r=t.get(y_),o=b.useMemo(()=>{if(!r)return{};try{const s=typeof r=="string"?JSON.parse(r):r;return s&&typeof s=="object"?s:{}}catch{return{}}},[r]),i=b.useCallback(s=>{n(l=>{const u=l.get(y_);let c={};if(u)try{const p=typeof u=="string"?JSON.parse(u):u;c=p&&typeof p=="object"?p:{}}catch{}const d=kAe({...c,...s}),h={};return l.forEach((p,x)=>{if(x!==y_)try{h[x]=JSON.parse(p)}catch{h[x]=p}}),d&&(h[y_]=d),h},{replace:!0})},[n]),a=b.useMemo(()=>({tab:o.tab,focusedTaskRunId:o.task,selectedSpanId:o.span,selectedGroupId:o.group,queryString:o.q??"",setTab:s=>i({tab:s}),setFocusedTaskRunId:s=>i({task:s}),setSelectedSpanId:s=>i({span:s,group:void 0}),setSelectedGroupId:s=>i({group:s,span:void 0}),setQueryString:s=>i({q:s||void 0}),set:s=>i(NAe(s))}),[o,i]);return v.jsx(g$.Provider,{value:a,children:e})}function MAe({children:e}){const[t,n]=b.useState(),[r,o]=b.useState(),[i,a]=b.useState(),[s,l]=b.useState(),[u,c]=b.useState(""),d=b.useMemo(()=>({tab:t,focusedTaskRunId:r,selectedSpanId:i,selectedGroupId:s,queryString:u,setTab:n,setFocusedTaskRunId:o,setSelectedSpanId:h=>{a(h),l(void 0)},setSelectedGroupId:h=>{l(h),a(void 0)},setQueryString:c,set:h=>{"tab"in h&&n(h.tab),"focusedTaskRunId"in h&&o(h.focusedTaskRunId),"selectedSpanId"in h&&(a(h.selectedSpanId),h.selectedSpanId&&l(void 0)),"selectedGroupId"in h&&(l(h.selectedGroupId),h.selectedGroupId&&a(void 0)),"queryString"in h&&c(h.queryString??"")}}),[t,r,i,s,u]);return v.jsx(g$.Provider,{value:d,children:e})}function v$(){const e=b.useContext(g$);if(!e)throw new Error("useRunDetailSearch must be used within a RunDetailSearchProvider");return e}function Lte(e){return e?[qt.COMPLETED,qt.FAILED,qt.CANCELLED].includes(e):!1}const jAe=()=>{const e=Hs({from:At.tenantRunRoute.to}),{data:t,isLoading:n,isError:r,error:o}=In({retry:xK,refetchInterval:d=>{var p;const h=d.state.data;return Lte((p=h==null?void 0:h.run)==null?void 0:p.status)?5e3:1e3},...io.v1WorkflowRuns.details(e.run)}),i=(t==null?void 0:t.shape)||[],a=(t==null?void 0:t.tasks)||[],s=(t==null?void 0:t.taskEvents)||[],l=t==null?void 0:t.run,u=t==null?void 0:t.workflowConfig,c=gL(o);return{shape:i,taskRuns:a,taskEvents:s,workflowRun:l,workflowConfig:u,isLoading:n,isError:r,errStatusCode:c}};function Ks(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{let t;const n=new Set,r=(c,d)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(x=>x(t,p))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(IAe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,l);return l},DAe=e=>e?w9(e):w9,{useDebugValue:LAe}=J,{useSyncExternalStoreWithSelector:$Ae}=C0e,FAe=e=>e;function $te(e,t=FAe,n){const r=$Ae(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return LAe(r),r}const x9=(e,t)=>{const n=DAe(e),r=(o,i=t)=>$te(n,o,i);return Object.assign(r,n),r},BAe=(e,t)=>e?x9(e,t):x9;function ka(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var zAe={value:()=>{}};function RR(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}fE.prototype=RR.prototype={constructor:fE,on:function(e,t){var n=this._,r=qAe(e+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var n=new Array(o),r=0,o,i;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),S9.hasOwnProperty(t)?{space:S9[t],local:e}:e}function VAe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===vD&&t.documentElement.namespaceURI===vD?t.createElement(e):t.createElementNS(n,e)}}function WAe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fte(e){var t=PR(e);return(t.local?WAe:VAe)(t)}function HAe(){}function y$(e){return e==null?HAe:function(){return this.querySelector(e)}}function GAe(e){typeof e!="function"&&(e=y$(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=O&&(O=C+1);!(R=w[O])&&++O=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function yke(e){e||(e=wke);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,o=new Array(r),i=0;it?1:e>=t?0:NaN}function xke(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bke(){return Array.from(this)}function Ske(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Mke:typeof t=="function"?Ike:jke)(e,t,n??"")):ry(this.node(),e)}function ry(e,t){return e.style.getPropertyValue(t)||Vte(e).getComputedStyle(e,null).getPropertyValue(t)}function Lke(e){return function(){delete this[e]}}function $ke(e,t){return function(){this[e]=t}}function Fke(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Bke(e,t){return arguments.length>1?this.each((t==null?Lke:typeof t=="function"?Fke:$ke)(e,t)):this.node()[e]}function Wte(e){return e.trim().split(/^|\s+/)}function w$(e){return e.classList||new Hte(e)}function Hte(e){this._node=e,this._names=Wte(e.getAttribute("class")||"")}Hte.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gte(e,t){for(var n=w$(e),r=-1,o=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function pNe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n()=>e;function yD(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}yD.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ENe(e){return!e.ctrlKey&&!e.button}function CNe(){return this.parentNode}function ONe(e,t){return t??{x:e.x,y:e.y}}function RNe(){return navigator.maxTouchPoints||"ontouchstart"in this}function PNe(){var e=ENe,t=CNe,n=ONe,r=RNe,o={},i=RR("start","drag","end"),a=0,s,l,u,c,d=0;function h(P){P.on("mousedown.drag",p).filter(r).on("touchstart.drag",w).on("touchmove.drag",_,_Ne).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(P,R){if(!(c||!e.call(this,P,R))){var T=O(this,t.call(this,P,R),P,R,"mouse");T&&(Ol(P.view).on("mousemove.drag",x,Vw).on("mouseup.drag",y,Vw),Qte(P.view),dA(P),u=!1,s=P.clientX,l=P.clientY,T("start",P))}}function x(P){if(wv(P),!u){var R=P.clientX-s,T=P.clientY-l;u=R*R+T*T>d}o.mouse("drag",P)}function y(P){Ol(P.view).on("mousemove.drag mouseup.drag",null),Zte(P.view,u),wv(P),o.mouse("end",P)}function w(P,R){if(e.call(this,P,R)){var T=P.changedTouches,k=t.call(this,P,R),M=T.length,j,$;for(j=0;j>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?x_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?x_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ANe.exec(e))?new Oa(t[1],t[2],t[3],1):(t=kNe.exec(e))?new Oa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=NNe.exec(e))?x_(t[1],t[2],t[3],t[4]):(t=MNe.exec(e))?x_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jNe.exec(e))?T9(t[1],t[2]/100,t[3]/100,1):(t=INe.exec(e))?T9(t[1],t[2]/100,t[3]/100,t[4]):_9.hasOwnProperty(e)?O9(_9[e]):e==="transparent"?new Oa(NaN,NaN,NaN,0):null}function O9(e){return new Oa(e>>16&255,e>>8&255,e&255,1)}function x_(e,t,n,r){return r<=0&&(e=t=n=NaN),new Oa(e,t,n,r)}function $Ne(e){return e instanceof yb||(e=am(e)),e?(e=e.rgb(),new Oa(e.r,e.g,e.b,e.opacity)):new Oa}function wD(e,t,n,r){return arguments.length===1?$Ne(e):new Oa(e,t,n,r??1)}function Oa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}x$(Oa,wD,Jte(yb,{brighter(e){return e=e==null?iC:Math.pow(iC,e),new Oa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ww:Math.pow(Ww,e),new Oa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Oa(Vp(this.r),Vp(this.g),Vp(this.b),aC(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:R9,formatHex:R9,formatHex8:FNe,formatRgb:P9,toString:P9}));function R9(){return`#${Sp(this.r)}${Sp(this.g)}${Sp(this.b)}`}function FNe(){return`#${Sp(this.r)}${Sp(this.g)}${Sp(this.b)}${Sp((isNaN(this.opacity)?1:this.opacity)*255)}`}function P9(){const e=aC(this.opacity);return`${e===1?"rgb(":"rgba("}${Vp(this.r)}, ${Vp(this.g)}, ${Vp(this.b)}${e===1?")":`, ${e})`}`}function aC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sp(e){return e=Vp(e),(e<16?"0":"")+e.toString(16)}function T9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rl(e,t,n,r)}function ene(e){if(e instanceof Rl)return new Rl(e.h,e.s,e.l,e.opacity);if(e instanceof yb||(e=am(e)),!e)return new Rl;if(e instanceof Rl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new Rl(a,s,l,e.opacity)}function BNe(e,t,n,r){return arguments.length===1?ene(e):new Rl(e,t,n,r??1)}function Rl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}x$(Rl,BNe,Jte(yb,{brighter(e){return e=e==null?iC:Math.pow(iC,e),new Rl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ww:Math.pow(Ww,e),new Rl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Oa(hA(e>=240?e-240:e+120,o,r),hA(e,o,r),hA(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Rl(A9(this.h),b_(this.s),b_(this.l),aC(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=aC(this.opacity);return`${e===1?"hsl(":"hsla("}${A9(this.h)}, ${b_(this.s)*100}%, ${b_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function A9(e){return e=(e||0)%360,e<0?e+360:e}function b_(e){return Math.max(0,Math.min(1,e||0))}function hA(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const b$=e=>()=>e;function zNe(e,t){return function(n){return e+n*t}}function qNe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function UNe(e){return(e=+e)==1?tne:function(t,n){return n-t?qNe(t,n,e):b$(isNaN(t)?n:t)}}function tne(e,t){var n=t-e;return n?zNe(e,n):b$(isNaN(e)?t:e)}const sC=(function e(t){var n=UNe(t);function r(o,i){var a=n((o=wD(o)).r,(i=wD(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),u=tne(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=s(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function VNe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Cl(r,o)})),n=pA.lastIndex;return n180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(o(d)+"rotate(",null,r)-2,x:Cl(u,c)})):c&&d.push(o(d)+"rotate("+c+r)}function s(u,c,d,h){u!==c?h.push({i:d.push(o(d)+"skewX(",null,r)-2,x:Cl(u,c)}):c&&d.push(o(d)+"skewX("+c+r)}function l(u,c,d,h,p,x){if(u!==d||c!==h){var y=p.push(o(p)+"scale(",null,",",null,")");x.push({i:y-4,x:Cl(u,d)},{i:y-2,x:Cl(c,h)})}else(d!==1||h!==1)&&p.push(o(p)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,h),a(u.rotate,c.rotate,d,h),s(u.skewX,c.skewX,d,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(p){for(var x=-1,y=h.length,w;++x=0&&e._call.call(void 0,t),e=e._next;--oy}function M9(){sm=(uC=Gw.now())+TR,oy=ew=0;try{sMe()}finally{oy=0,uMe(),sm=0}}function lMe(){var e=Gw.now(),t=e-uC;t>ine&&(TR-=t,uC=e)}function uMe(){for(var e,t=lC,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:lC=n);tw=e,SD(r)}function SD(e){if(!oy){ew&&(ew=clearTimeout(ew));var t=e-sm;t>24?(e<1/0&&(ew=setTimeout(M9,e-Gw.now()-TR)),A1&&(A1=clearInterval(A1))):(A1||(uC=Gw.now(),A1=setInterval(lMe,ine)),oy=1,ane(M9))}}function j9(e,t,n){var r=new cC;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var cMe=RR("start","end","cancel","interrupt"),fMe=[],lne=0,I9=1,_D=2,dE=3,D9=4,ED=5,hE=6;function AR(e,t,n,r,o,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;dMe(e,n,{name:t,index:r,group:o,on:cMe,tween:fMe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:lne})}function E$(e,t){var n=Hl(e,t);if(n.state>lne)throw new Error("too late; already scheduled");return n}function rc(e,t){var n=Hl(e,t);if(n.state>dE)throw new Error("too late; already running");return n}function Hl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function dMe(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=sne(i,0,n.time);function i(u){n.state=I9,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,h,p;if(n.state!==I9)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===dE)return j9(a);p.state===D9?(p.state=hE,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c_D&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function qMe(e,t,n){var r,o,i=zMe(t)?E$:rc;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}function UMe(e,t){var n=this._id;return arguments.length<2?Hl(this.node(),n).on.on(e):this.each(qMe(n,e,t))}function VMe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function WMe(){return this.on("end.remove",VMe(this._id))}function HMe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=y$(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a()=>e;function vje(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Qc(e,t,n){this.k=e,this.x=t,this.y=n}Qc.prototype={constructor:Qc,scale:function(e){return e===1?this:new Qc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Bd=new Qc(1,0,0);Qc.prototype;function mA(e){e.stopImmediatePropagation()}function k1(e){e.preventDefault(),e.stopImmediatePropagation()}function yje(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function wje(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function L9(){return this.__zoom||Bd}function xje(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bje(){return navigator.maxTouchPoints||"ontouchstart"in this}function Sje(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function _je(){var e=yje,t=wje,n=Sje,r=xje,o=bje,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=oMe,u=RR("start","zoom","end"),c,d,h,p=500,x=150,y=0,w=10;function _(D){D.property("__zoom",L9).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",$).filter(o).on("touchstart.zoom",L).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,H,U,Y){var q=D.selection?D.selection():D;q.property("__zoom",L9),D!==q?R(D,H,U,Y):q.interrupt().each(function(){T(this,arguments).event(Y).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},_.scaleBy=function(D,H,U,Y){_.scaleTo(D,function(){var q=this.__zoom.k,W=typeof H=="function"?H.apply(this,arguments):H;return q*W},U,Y)},_.scaleTo=function(D,H,U,Y){_.transform(D,function(){var q=t.apply(this,arguments),W=this.__zoom,K=U==null?P(q):typeof U=="function"?U.apply(this,arguments):U,z=W.invert(K),X=typeof H=="function"?H.apply(this,arguments):H;return n(O(C(W,X),K,z),q,a)},U,Y)},_.translateBy=function(D,H,U,Y){_.transform(D,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof U=="function"?U.apply(this,arguments):U),t.apply(this,arguments),a)},null,Y)},_.translateTo=function(D,H,U,Y,q){_.transform(D,function(){var W=t.apply(this,arguments),K=this.__zoom,z=Y==null?P(W):typeof Y=="function"?Y.apply(this,arguments):Y;return n(Bd.translate(z[0],z[1]).scale(K.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof U=="function"?-U.apply(this,arguments):-U),W,a)},Y,q)};function C(D,H){return H=Math.max(i[0],Math.min(i[1],H)),H===D.k?D:new Qc(H,D.x,D.y)}function O(D,H,U){var Y=H[0]-U[0]*D.k,q=H[1]-U[1]*D.k;return Y===D.x&&q===D.y?D:new Qc(D.k,Y,q)}function P(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function R(D,H,U,Y){D.on("start.zoom",function(){T(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(Y).end()}).tween("zoom",function(){var q=this,W=arguments,K=T(q,W).event(Y),z=t.apply(q,W),X=U==null?P(z):typeof U=="function"?U.apply(q,W):U,ee=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),ae=q.__zoom,fe=typeof H=="function"?H.apply(q,W):H,ie=l(ae.invert(X).concat(ee/ae.k),fe.invert(X).concat(ee/fe.k));return function(ge){if(ge===1)ge=fe;else{var he=ie(ge),ue=ee/he[2];ge=new Qc(ue,X[0]-he[0]*ue,X[1]-he[1]*ue)}K.zoom(null,ge)}})}function T(D,H,U){return!U&&D.__zooming||new k(D,H)}function k(D,H){this.that=D,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,H),this.taps=0}k.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,H){return this.mouse&&D!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var H=Ol(this.that).datum();u.call(D,this.that,new vje(D,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:u}),H)}};function M(D,...H){if(!e.apply(this,arguments))return;var U=T(this,H).event(D),Y=this.__zoom,q=Math.max(i[0],Math.min(i[1],Y.k*Math.pow(2,r.apply(this,arguments)))),W=Nu(D);if(U.wheel)(U.mouse[0][0]!==W[0]||U.mouse[0][1]!==W[1])&&(U.mouse[1]=Y.invert(U.mouse[0]=W)),clearTimeout(U.wheel);else{if(Y.k===q)return;U.mouse=[W,Y.invert(W)],pE(this),U.start()}k1(D),U.wheel=setTimeout(K,x),U.zoom("mouse",n(O(C(Y,q),U.mouse[0],U.mouse[1]),U.extent,a));function K(){U.wheel=null,U.end()}}function j(D,...H){if(h||!e.apply(this,arguments))return;var U=D.currentTarget,Y=T(this,H,!0).event(D),q=Ol(D.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",ee,!0),W=Nu(D,U),K=D.clientX,z=D.clientY;Qte(D.view),mA(D),Y.mouse=[W,this.__zoom.invert(W)],pE(this),Y.start();function X(ae){if(k1(ae),!Y.moved){var fe=ae.clientX-K,ie=ae.clientY-z;Y.moved=fe*fe+ie*ie>y}Y.event(ae).zoom("mouse",n(O(Y.that.__zoom,Y.mouse[0]=Nu(ae,U),Y.mouse[1]),Y.extent,a))}function ee(ae){q.on("mousemove.zoom mouseup.zoom",null),Zte(ae.view,Y.moved),k1(ae),Y.event(ae).end()}}function $(D,...H){if(e.apply(this,arguments)){var U=this.__zoom,Y=Nu(D.changedTouches?D.changedTouches[0]:D,this),q=U.invert(Y),W=U.k*(D.shiftKey?.5:2),K=n(O(C(U,W),Y,q),t.apply(this,H),a);k1(D),s>0?Ol(this).transition().duration(s).call(R,K,Y,D):Ol(this).call(_.transform,K,Y,D)}}function L(D,...H){if(e.apply(this,arguments)){var U=D.touches,Y=U.length,q=T(this,H,D.changedTouches.length===Y).event(D),W,K,z,X;for(mA(D),K=0;K"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},dne=hf.error001();function ao(e,t){const n=b.useContext(kR);if(n===null)throw new Error(dne);return $te(n,e,t)}const si=()=>{const e=b.useContext(kR);if(e===null)throw new Error(dne);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},Cje=e=>e.userSelectionActive?"none":"all";function Oje({position:e,children:t,className:n,style:r,...o}){const i=ao(Cje),a=`${e}`.split("-");return J.createElement("div",{className:Ks(["react-flow__panel",n,...a]),style:{...r,pointerEvents:i},...o},t)}function Rje({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:J.createElement(Oje,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},J.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Pje=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const d=b.useRef(null),[h,p]=b.useState({x:0,y:0,width:0,height:0}),x=Ks(["react-flow__edge-textwrapper",u]);return b.useEffect(()=>{if(d.current){const y=d.current.getBBox();p({x:y.x,y:y.y,width:y.width,height:y.height})}},[n]),typeof n>"u"||!n?null:J.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:x,visibility:h.width?"visible":"hidden",...c},o&&J.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:s,ry:s}),J.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:d,style:r},n),l)};var Tje=b.memo(Pje);const O$=e=>({width:e.offsetWidth,height:e.offsetHeight}),iy=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),R$=(e={x:0,y:0},t)=>({x:iy(e.x,t[0][0],t[1][0]),y:iy(e.y,t[0][1],t[1][1])}),$9=(e,t,n)=>en?-iy(Math.abs(e-n),1,50)/50:0,hne=(e,t)=>{const n=$9(e.x,35,t.width-35)*20,r=$9(e.y,35,t.height-35)*20;return[n,r]},pne=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Aje=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),P$=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),kje=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),F9=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),CD=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Nje=e=>Ms(e.width)&&Ms(e.height)&&Ms(e.x)&&Ms(e.y),Ms=e=>!isNaN(e)&&isFinite(e),Kr=Symbol.for("internals"),mne=["Enter"," ","Escape"],Mje=(e,t)=>{},jje=e=>"nativeEvent"in e;function OD(e){var o,i;const t=jje(e)?e.nativeEvent:e,n=((i=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:i[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const gne=e=>"clientX"in e,zd=(e,t)=>{var i,a;const n=gne(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},fC=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},wb=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p=20})=>J.createElement(J.Fragment,null,J.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:d,markerStart:h}),p&&J.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),o&&Ms(n)&&Ms(r)?J.createElement(Tje,{x:n,y:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null);wb.displayName="BaseEdge";function N1(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(i=>i.id===e);o&&n(r,{...o})}}function vne({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n{const[w,_,C]=wne({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return J.createElement(wb,{path:w,labelX:_,labelY:C,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,interactionWidth:y})});T$.displayName="SimpleBezierEdge";const z9={[$t.Left]:{x:-1,y:0},[$t.Right]:{x:1,y:0},[$t.Top]:{x:0,y:-1},[$t.Bottom]:{x:0,y:1}},Ije=({source:e,sourcePosition:t=$t.Bottom,target:n})=>t===$t.Left||t===$t.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Dje({source:e,sourcePosition:t=$t.Bottom,target:n,targetPosition:r=$t.Top,center:o,offset:i}){const a=z9[t],s=z9[r],l={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+s.x*i,y:n.y+s.y*i},c=Ije({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",h=c[d];let p=[],x,y;const w={x:0,y:0},_={x:0,y:0},[C,O,P,R]=vne({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){x=o.x??C,y=o.y??O;const k=[{x,y:l.y},{x,y:u.y}],M=[{x:l.x,y},{x:u.x,y}];a[d]===h?p=d==="x"?k:M:p=d==="x"?M:k}else{const k=[{x:l.x,y:u.y}],M=[{x:u.x,y:l.y}];if(d==="x"?p=a.x===h?M:k:p=a.y===h?k:M,t===r){const G=Math.abs(e[d]-n[d]);if(G<=i){const D=Math.min(i-1,i-G);a[d]===h?w[d]=(l[d]>e[d]?-1:1)*D:_[d]=(u[d]>n[d]?-1:1)*D}}if(t!==r){const G=d==="x"?"y":"x",D=a[d]===s[G],H=l[G]>u[G],U=l[G]=V?(x=(j.x+$.x)/2,y=p[0].y):(x=p[0].x,y=(j.y+$.y)/2)}return[[e,{x:l.x+w.x,y:l.y+w.y},...p,{x:u.x+_.x,y:u.y+_.y},n],x,y,P,R]}function Lje(e,t,n,r){const o=Math.min(q9(e,t)/2,q9(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x{let O="";return C>0&&C{const[_,C,O]=RD({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:h,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset});return J.createElement(wb,{path:_,labelX:C,labelY:O,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:p,markerStart:x,interactionWidth:w})});NR.displayName="SmoothStepEdge";const A$=b.memo(e=>{var t;return J.createElement(NR,{...e,pathOptions:b.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});A$.displayName="StepEdge";function $je({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=vne({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}const k$=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p})=>{const[x,y,w]=$je({sourceX:e,sourceY:t,targetX:n,targetY:r});return J.createElement(wb,{path:x,labelX:y,labelY:w,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p})});k$.displayName="StraightEdge";function E_(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function U9({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case $t.Left:return[t-E_(t-r,i),n];case $t.Right:return[t+E_(r-t,i),n];case $t.Top:return[t,n-E_(n-o,i)];case $t.Bottom:return[t,n+E_(o-n,i)]}}function xne({sourceX:e,sourceY:t,sourcePosition:n=$t.Bottom,targetX:r,targetY:o,targetPosition:i=$t.Top,curvature:a=.25}){const[s,l]=U9({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[u,c]=U9({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,h,p,x]=yne({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${o}`,d,h,p,x]}const hC=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=$t.Bottom,targetPosition:i=$t.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,pathOptions:y,interactionWidth:w})=>{const[_,C,O]=xne({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:y==null?void 0:y.curvature});return J.createElement(wb,{path:_,labelX:C,labelY:O,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,interactionWidth:w})});hC.displayName="BezierEdge";const N$=b.createContext(null),Fje=N$.Provider;N$.Consumer;const Bje=()=>b.useContext(N$),zje=e=>"id"in e&&"source"in e&&"target"in e,qje=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,PD=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,Uje=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Vje=(e,t)=>{if(!e.source||!e.target)return t;let n;return zje(e)?n={...e}:n={...e,id:qje(e)},Uje(n,t)?t:t.concat(n)},TD=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},bne=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),bv=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},M$=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:i,y:a}=bv(o,t).positionAbsolute;return Aje(r,P$({x:i,y:a,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return kje(n)},Sne=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},u=[];return e.forEach(c=>{const{width:d,height:h,selectable:p=!0,hidden:x=!1}=c;if(a&&!p||x)return!1;const{positionAbsolute:y}=bv(c,s),w={x:y.x,y:y.y,width:d||0,height:h||0},_=CD(l,w),C=typeof d>"u"||typeof h>"u"||d===null||h===null,O=i&&_>0,P=(d||0)*(h||0);(C||O||_>=P||c.dragging)&&u.push(c)}),u},_ne=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},Ene=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),u=iy(l,r,o),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*u,p=n/2-d*u;return{x:h,y:p,zoom:u}},pp=(e,t=0)=>e.transition().duration(t);function V9(e,t,n,r){return(t[n]||[]).reduce((o,i)=>{var a,s;return`${e.id}-${i.id}-${n}`!==r&&o.push({id:i.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+i.x+i.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+i.y+i.height/2}),o},[])}function Wje(e,t,n,r,o,i){const{x:a,y:s}=zd(e),u=t.elementsFromPoint(a,s).find(x=>x.classList.contains("react-flow__handle"));if(u){const x=u.getAttribute("data-nodeid");if(x){const y=j$(void 0,u),w=u.getAttribute("data-handleid"),_=i({nodeId:x,id:w,type:y});if(_){const C=o.find(O=>O.nodeId===x&&O.type===y&&O.id===w);return{handle:{id:w,type:y,nodeId:x,x:(C==null?void 0:C.x)||n.x,y:(C==null?void 0:C.y)||n.y},validHandleResult:_}}}}let c=[],d=1/0;if(o.forEach(x=>{const y=Math.sqrt((x.x-n.x)**2+(x.y-n.y)**2);if(y<=r){const w=i(x);y<=d&&(yx.isValid),p=c.some(({handle:x})=>x.type==="target");return c.find(({handle:x,validHandleResult:y})=>p?x.type==="target":h?y.isValid:!0)||c[0]}const Hje={source:null,target:null,sourceHandle:null,targetHandle:null},Cne=()=>({handleDomNode:null,isValid:!1,connection:Hje,endHandle:null});function One(e,t,n,r,o,i,a){const s=o==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...Cne(),handleDomNode:l};if(l){const c=j$(void 0,l),d=l.getAttribute("data-nodeid"),h=l.getAttribute("data-handleid"),p=l.classList.contains("connectable"),x=l.classList.contains("connectableend"),y={source:s?d:n,sourceHandle:s?h:r,target:s?n:d,targetHandle:s?r:h};u.connection=y,p&&x&&(t===lm.Strict?s&&c==="source"||!s&&c==="target":d!==n||h!==r)&&(u.endHandle={nodeId:d,handleId:h,type:c},u.isValid=i(y))}return u}function Gje({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,i)=>{if(i[Kr]){const{handleBounds:a}=i[Kr];let s=[],l=[];a&&(s=V9(i,a,"source",`${t}-${n}-${r}`),l=V9(i,a,"target",`${t}-${n}-${r}`)),o.push(...s,...l)}return o},[])}function j$(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function gA(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Kje(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Rne({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:u}){const c=pne(e.target),{connectionMode:d,domNode:h,autoPanOnConnect:p,connectionRadius:x,onConnectStart:y,panBy:w,getNodes:_,cancelConnection:C}=i();let O=0,P;const{x:R,y:T}=zd(e),k=c==null?void 0:c.elementFromPoint(R,T),M=j$(l,k),j=h==null?void 0:h.getBoundingClientRect();if(!j||!M)return;let $,L=zd(e,j),V=!1,G=null,D=!1,H=null;const U=Gje({nodes:_(),nodeId:n,handleId:t,handleType:M}),Y=()=>{if(!p)return;const[K,z]=hne(L,j);w({x:K,y:z}),O=requestAnimationFrame(Y)};a({connectionPosition:L,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:M,connectionStartHandle:{nodeId:n,handleId:t,type:M},connectionEndHandle:null}),y==null||y(e,{nodeId:n,handleId:t,handleType:M});function q(K){const{transform:z}=i();L=zd(K,j);const{handle:X,validHandleResult:ee}=Wje(K,c,TD(L,z,!1,[1,1]),x,U,ae=>One(ae,d,n,t,o?"target":"source",s,c));if(P=X,V||(Y(),V=!0),H=ee.handleDomNode,G=ee.connection,D=ee.isValid,a({connectionPosition:P&&D?bne({x:P.x,y:P.y},z):L,connectionStatus:Kje(!!P,D),connectionEndHandle:ee.endHandle}),!P&&!D&&!H)return gA($);G.source!==G.target&&H&&(gA($),$=H,H.classList.add("connecting","react-flow__handle-connecting"),H.classList.toggle("valid",D),H.classList.toggle("react-flow__handle-valid",D))}function W(K){var z,X;(P||H)&&G&&D&&(r==null||r(G)),(X=(z=i()).onConnectEnd)==null||X.call(z,K),l&&(u==null||u(K)),gA($),C(),cancelAnimationFrame(O),V=!1,D=!1,G=null,H=null,c.removeEventListener("mousemove",q),c.removeEventListener("mouseup",W),c.removeEventListener("touchmove",q),c.removeEventListener("touchend",W)}c.addEventListener("mousemove",q),c.addEventListener("mouseup",W),c.addEventListener("touchmove",q),c.addEventListener("touchend",W)}const W9=()=>!0,Yje=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Xje=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:a}=r;return{connecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n||(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===n}},Pne=b.forwardRef(({type:e="source",position:t=$t.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:a,onConnect:s,children:l,className:u,onMouseDown:c,onTouchStart:d,...h},p)=>{var j,$;const x=a||null,y=e==="target",w=si(),_=Bje(),{connectOnClick:C,noPanClassName:O}=ao(Yje,ka),{connecting:P,clickConnecting:R}=ao(Xje(_,x,e),ka);_||($=(j=w.getState()).onError)==null||$.call(j,"010",hf.error010());const T=L=>{const{defaultEdgeOptions:V,onConnect:G,hasDefaultEdges:D}=w.getState(),H={...V,...L};if(D){const{edges:U,setEdges:Y}=w.getState();Y(Vje(H,U))}G==null||G(H),s==null||s(H)},k=L=>{if(!_)return;const V=gne(L);o&&(V&&L.button===0||!V)&&Rne({event:L,handleId:x,nodeId:_,onConnect:T,isTarget:y,getState:w.getState,setState:w.setState,isValidConnection:n||w.getState().isValidConnection||W9}),V?c==null||c(L):d==null||d(L)},M=L=>{const{onClickConnectStart:V,onClickConnectEnd:G,connectionClickStartHandle:D,connectionMode:H,isValidConnection:U}=w.getState();if(!_||!D&&!o)return;if(!D){V==null||V(L,{nodeId:_,handleId:x,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:_,type:e,handleId:x}});return}const Y=pne(L.target),q=n||U||W9,{connection:W,isValid:K}=One({nodeId:_,id:x,type:e},H,D.nodeId,D.handleId||null,D.type,q,Y);K&&T(W),G==null||G(L),w.setState({connectionClickStartHandle:null})};return J.createElement("div",{"data-handleid":x,"data-nodeid":_,"data-handlepos":t,"data-id":`${_}-${x}-${e}`,className:Ks(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",O,u,{source:!y,target:y,connectable:r,connectablestart:o,connectableend:i,connecting:R,connectionindicator:r&&(o&&!P||i&&P)}]),onMouseDown:k,onTouchStart:k,onClick:C?M:void 0,ref:p,...h},l)});Pne.displayName="Handle";var ay=b.memo(Pne);const Tne=({data:e,isConnectable:t,targetPosition:n=$t.Top,sourcePosition:r=$t.Bottom})=>J.createElement(J.Fragment,null,J.createElement(ay,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,J.createElement(ay,{type:"source",position:r,isConnectable:t}));Tne.displayName="DefaultNode";var AD=b.memo(Tne);const Ane=({data:e,isConnectable:t,sourcePosition:n=$t.Bottom})=>J.createElement(J.Fragment,null,e==null?void 0:e.label,J.createElement(ay,{type:"source",position:n,isConnectable:t}));Ane.displayName="InputNode";var kne=b.memo(Ane);const Nne=({data:e,isConnectable:t,targetPosition:n=$t.Top})=>J.createElement(J.Fragment,null,J.createElement(ay,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);Nne.displayName="OutputNode";var Mne=b.memo(Nne);const I$=()=>null;I$.displayName="GroupNode";const Qje=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),C_=e=>e.id;function Zje(e,t){return ka(e.selectedNodes.map(C_),t.selectedNodes.map(C_))&&ka(e.selectedEdges.map(C_),t.selectedEdges.map(C_))}const jne=b.memo(({onSelectionChange:e})=>{const t=si(),{selectedNodes:n,selectedEdges:r}=ao(Qje,Zje);return b.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChange.forEach(i=>i(o))},[n,r,e]),null});jne.displayName="SelectionListener";const Jje=e=>!!e.onSelectionChange;function eIe({onSelectionChange:e}){const t=ao(Jje);return e||t?J.createElement(jne,{onSelectionChange:e}):null}const tIe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Gg(e,t){b.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Tn(e,t,n){b.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const nIe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:x,minZoom:y,maxZoom:w,nodeExtent:_,onNodesChange:C,onEdgesChange:O,elementsSelectable:P,connectionMode:R,snapGrid:T,snapToGrid:k,translateExtent:M,connectOnClick:j,defaultEdgeOptions:$,fitView:L,fitViewOptions:V,onNodesDelete:G,onEdgesDelete:D,onNodeDrag:H,onNodeDragStart:U,onNodeDragStop:Y,onSelectionDrag:q,onSelectionDragStart:W,onSelectionDragStop:K,noPanClassName:z,nodeOrigin:X,rfId:ee,autoPanOnConnect:ae,autoPanOnNodeDrag:fe,onError:ie,connectionRadius:ge,isValidConnection:he,nodeDragThreshold:ue})=>{const{setNodes:we,setEdges:Ae,setDefaultNodesAndEdges:ye,setMinZoom:Xe,setMaxZoom:We,setTranslateExtent:et,setNodeExtent:ft,reset:st}=ao(tIe,ka),Ge=si();return b.useEffect(()=>{const Kt=r==null?void 0:r.map(gn=>({...gn,...$}));return ye(n,Kt),()=>{st()}},[]),Tn("defaultEdgeOptions",$,Ge.setState),Tn("connectionMode",R,Ge.setState),Tn("onConnect",o,Ge.setState),Tn("onConnectStart",i,Ge.setState),Tn("onConnectEnd",a,Ge.setState),Tn("onClickConnectStart",s,Ge.setState),Tn("onClickConnectEnd",l,Ge.setState),Tn("nodesDraggable",u,Ge.setState),Tn("nodesConnectable",c,Ge.setState),Tn("nodesFocusable",d,Ge.setState),Tn("edgesFocusable",h,Ge.setState),Tn("edgesUpdatable",p,Ge.setState),Tn("elementsSelectable",P,Ge.setState),Tn("elevateNodesOnSelect",x,Ge.setState),Tn("snapToGrid",k,Ge.setState),Tn("snapGrid",T,Ge.setState),Tn("onNodesChange",C,Ge.setState),Tn("onEdgesChange",O,Ge.setState),Tn("connectOnClick",j,Ge.setState),Tn("fitViewOnInit",L,Ge.setState),Tn("fitViewOnInitOptions",V,Ge.setState),Tn("onNodesDelete",G,Ge.setState),Tn("onEdgesDelete",D,Ge.setState),Tn("onNodeDrag",H,Ge.setState),Tn("onNodeDragStart",U,Ge.setState),Tn("onNodeDragStop",Y,Ge.setState),Tn("onSelectionDrag",q,Ge.setState),Tn("onSelectionDragStart",W,Ge.setState),Tn("onSelectionDragStop",K,Ge.setState),Tn("noPanClassName",z,Ge.setState),Tn("nodeOrigin",X,Ge.setState),Tn("rfId",ee,Ge.setState),Tn("autoPanOnConnect",ae,Ge.setState),Tn("autoPanOnNodeDrag",fe,Ge.setState),Tn("onError",ie,Ge.setState),Tn("connectionRadius",ge,Ge.setState),Tn("isValidConnection",he,Ge.setState),Tn("nodeDragThreshold",ue,Ge.setState),Gg(e,we),Gg(t,Ae),Gg(y,Xe),Gg(w,We),Gg(M,et),Gg(_,ft),null},H9={display:"none"},rIe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ine="react-flow__node-desc",Dne="react-flow__edge-desc",oIe="react-flow__aria-live",iIe=e=>e.ariaLiveMessage;function aIe({rfId:e}){const t=ao(iIe);return J.createElement("div",{id:`${oIe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:rIe},t)}function sIe({rfId:e,disableKeyboardA11y:t}){return J.createElement(J.Fragment,null,J.createElement("div",{id:`${Ine}-${e}`,style:H9},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),J.createElement("div",{id:`${Dne}-${e}`,style:H9},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&J.createElement(aIe,{rfId:e}))}var Yw=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=b.useState(!1),o=b.useRef(!1),i=b.useRef(new Set([])),[a,s]=b.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,h)=>d.concat(...h),[]);return[u,c]}return[[],[]]},[e]);return b.useEffect(()=>{const l=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||l;if(e!==null){const c=p=>{if(o.current=p.ctrlKey||p.metaKey||p.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&OD(p))return!1;const y=K9(p.code,s);i.current.add(p[y]),G9(a,i.current,!1)&&(p.preventDefault(),r(!0))},d=p=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&OD(p))return!1;const y=K9(p.code,s);G9(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(p[y]),p.key==="Meta"&&i.current.clear(),o.current=!1},h=()=>{i.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",d),window.addEventListener("blur",h),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",d),window.removeEventListener("blur",h)}}},[e,r]),n};function G9(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function K9(e,t){return t.includes(e)?"code":"key"}function Lne(e,t,n,r){var s,l;const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=bv(i,r);return Lne(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(((s=i[Kr])==null?void 0:s.z)??0)>(n.z??0)?((l=i[Kr])==null?void 0:l.z)??0:n.z??0},r)}function $ne(e,t,n){e.forEach(r=>{var i;const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n!=null&&n[r.id]){const{x:a,y:s,z:l}=Lne(r,e,{...r.position,z:((i=r[Kr])==null?void 0:i.z)??0},t);r.positionAbsolute={x:a,y:s},r[Kr].z=l,n!=null&&n[r.id]&&(r[Kr].isParent=!0)}})}function vA(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach(s=>{var p;const l=(Ms(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={...s,positionAbsolute:{x:s.position.x,y:s.position.y}},d=s.parentNode||s.parentId;d&&(i[d]=!0);const h=(u==null?void 0:u.type)&&(u==null?void 0:u.type)!==s.type;Object.defineProperty(c,Kr,{enumerable:!1,value:{handleBounds:h||(p=u==null?void 0:u[Kr])==null?void 0:p.handleBounds,z:l}}),o.set(s.id,c)}),$ne(o,n,i),o}function Fne(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),h=t.initial&&!u&&c;if(s&&l&&(h||!t.initial)){const x=n().filter(w=>{var C;const _=t.includeHiddenNodes?w.width&&w.height:!w.hidden;return(C=t.nodes)!=null&&C.length?_&&t.nodes.some(O=>O.id===w.id):_}),y=x.every(w=>w.width&&w.height);if(x.length>0&&y){const w=M$(x,d),{x:_,y:C,zoom:O}=Ene(w,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),P=Bd.translate(_,C).scale(O);return typeof t.duration=="number"&&t.duration>0?s.transform(pp(l,t.duration),P):s.transform(l,P),!0}}return!1}function lIe(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Kr]:r[Kr],selected:n.selected})}),new Map(t)}function uIe(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function O_({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:lIe(e,o)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:uIe(t,i)}),s==null||s(t))}const Kg=()=>{},cIe={zoomIn:Kg,zoomOut:Kg,zoomTo:Kg,getZoom:()=>1,setViewport:Kg,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Kg,fitBounds:Kg,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},fIe=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),dIe=()=>{const e=si(),{d3Zoom:t,d3Selection:n}=ao(fIe,ka);return b.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(pp(n,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(pp(n,o==null?void 0:o.duration),1/1.2),zoomTo:(o,i)=>t.scaleTo(pp(n,i==null?void 0:i.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,i)=>{const[a,s,l]=e.getState().transform,u=Bd.translate(o.x??a,o.y??s).scale(o.zoom??l);t.transform(pp(n,i==null?void 0:i.duration),u)},getViewport:()=>{const[o,i,a]=e.getState().transform;return{x:o,y:i,zoom:a}},fitView:o=>Fne(e.getState,o),setCenter:(o,i,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,d=s/2-o*c,h=l/2-i*c,p=Bd.translate(d,h).scale(c);t.transform(pp(n,a==null?void 0:a.duration),p)},fitBounds:(o,i)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),{x:c,y:d,zoom:h}=Ene(o,a,s,l,u,(i==null?void 0:i.padding)??.1),p=Bd.translate(c,d).scale(h);t.transform(pp(n,i==null?void 0:i.duration),p)},project:o=>{const{transform:i,snapToGrid:a,snapGrid:s}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),TD(o,i,a,s)},screenToFlowPosition:o=>{const{transform:i,snapToGrid:a,snapGrid:s,domNode:l}=e.getState();if(!l)return o;const{x:u,y:c}=l.getBoundingClientRect(),d={x:o.x-u,y:o.y-c};return TD(d,i,a,s)},flowToScreenPosition:o=>{const{transform:i,domNode:a}=e.getState();if(!a)return o;const{x:s,y:l}=a.getBoundingClientRect(),u=bne(o,i);return{x:u.x+s,y:u.y+l}},viewportInitialized:!0}:cIe,[t,n])};function Bne(){const e=dIe(),t=si(),n=b.useCallback(()=>t.getState().getNodes().map(y=>({...y})),[]),r=b.useCallback(y=>t.getState().nodeInternals.get(y),[]),o=b.useCallback(()=>{const{edges:y=[]}=t.getState();return y.map(w=>({...w}))},[]),i=b.useCallback(y=>{const{edges:w=[]}=t.getState();return w.find(_=>_.id===y)},[]),a=b.useCallback(y=>{const{getNodes:w,setNodes:_,hasDefaultNodes:C,onNodesChange:O}=t.getState(),P=w(),R=typeof y=="function"?y(P):y;if(C)_(R);else if(O){const T=R.length===0?P.map(k=>({type:"remove",id:k.id})):R.map(k=>({item:k,type:"reset"}));O(T)}},[]),s=b.useCallback(y=>{const{edges:w=[],setEdges:_,hasDefaultEdges:C,onEdgesChange:O}=t.getState(),P=typeof y=="function"?y(w):y;if(C)_(P);else if(O){const R=P.length===0?w.map(T=>({type:"remove",id:T.id})):P.map(T=>({item:T,type:"reset"}));O(R)}},[]),l=b.useCallback(y=>{const w=Array.isArray(y)?y:[y],{getNodes:_,setNodes:C,hasDefaultNodes:O,onNodesChange:P}=t.getState();if(O){const T=[..._(),...w];C(T)}else if(P){const R=w.map(T=>({item:T,type:"add"}));P(R)}},[]),u=b.useCallback(y=>{const w=Array.isArray(y)?y:[y],{edges:_=[],setEdges:C,hasDefaultEdges:O,onEdgesChange:P}=t.getState();if(O)C([..._,...w]);else if(P){const R=w.map(T=>({item:T,type:"add"}));P(R)}},[]),c=b.useCallback(()=>{const{getNodes:y,edges:w=[],transform:_}=t.getState(),[C,O,P]=_;return{nodes:y().map(R=>({...R})),edges:w.map(R=>({...R})),viewport:{x:C,y:O,zoom:P}}},[]),d=b.useCallback(({nodes:y,edges:w})=>{const{nodeInternals:_,getNodes:C,edges:O,hasDefaultNodes:P,hasDefaultEdges:R,onNodesDelete:T,onEdgesDelete:k,onNodesChange:M,onEdgesChange:j}=t.getState(),$=(y||[]).map(H=>H.id),L=(w||[]).map(H=>H.id),V=C().reduce((H,U)=>{const Y=U.parentNode||U.parentId,q=!$.includes(U.id)&&Y&&H.find(K=>K.id===Y);return(typeof U.deletable=="boolean"?U.deletable:!0)&&($.includes(U.id)||q)&&H.push(U),H},[]),G=O.filter(H=>typeof H.deletable=="boolean"?H.deletable:!0),D=G.filter(H=>L.includes(H.id));if(V||D){const H=_ne(V,G),U=[...D,...H],Y=U.reduce((q,W)=>(q.includes(W.id)||q.push(W.id),q),[]);if((R||P)&&(R&&t.setState({edges:O.filter(q=>!Y.includes(q.id))}),P&&(V.forEach(q=>{_.delete(q.id)}),t.setState({nodeInternals:new Map(_)}))),Y.length>0&&(k==null||k(U),j&&j(Y.map(q=>({id:q,type:"remove"})))),V.length>0&&(T==null||T(V),M)){const q=V.map(W=>({id:W.id,type:"remove"}));M(q)}}},[]),h=b.useCallback(y=>{const w=Nje(y),_=w?null:t.getState().nodeInternals.get(y.id);return!w&&!_?[null,null,w]:[w?y:F9(_),_,w]},[]),p=b.useCallback((y,w=!0,_)=>{const[C,O,P]=h(y);return C?(_||t.getState().getNodes()).filter(R=>{if(!P&&(R.id===O.id||!R.positionAbsolute))return!1;const T=F9(R),k=CD(T,C);return w&&k>0||k>=C.width*C.height}):[]},[]),x=b.useCallback((y,w,_=!0)=>{const[C]=h(y);if(!C)return!1;const O=CD(C,w);return _&&O>0||O>=C.width*C.height},[]);return b.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:p,isNodeIntersecting:x}),[e,n,r,o,i,a,s,l,u,c,d,p,x])}const hIe={actInsideInputWithModifier:!1};var pIe=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=si(),{deleteElements:r}=Bne(),o=Yw(e,hIe),i=Yw(t);b.useEffect(()=>{if(o){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[o]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])};function mIe(e){const t=si();b.useEffect(()=>{let n;const r=()=>{var i,a;if(!e.current)return;const o=O$(e.current);(o.height===0||o.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",hf.error004())),t.setState({width:o.width||500,height:o.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const D$={position:"absolute",width:"100%",height:"100%",top:0,left:0},gIe=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,R_=e=>({x:e.x,y:e.y,zoom:e.k}),Yg=(e,t)=>e.target.closest(`.${t}`),Y9=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),X9=e=>{const t=e.ctrlKey&&fC()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},vIe=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),yIe=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=_p.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:h,translateExtent:p,minZoom:x,maxZoom:y,zoomActivationKeyCode:w,preventScrolling:_=!0,children:C,noWheelClassName:O,noPanClassName:P})=>{const R=b.useRef(),T=si(),k=b.useRef(!1),M=b.useRef(!1),j=b.useRef(null),$=b.useRef({x:0,y:0,zoom:0}),{d3Zoom:L,d3Selection:V,d3ZoomHandler:G,userSelectionActive:D}=ao(vIe,ka),H=Yw(w),U=b.useRef(0),Y=b.useRef(!1),q=b.useRef();return mIe(j),b.useEffect(()=>{if(j.current){const W=j.current.getBoundingClientRect(),K=_je().scaleExtent([x,y]).translateExtent(p),z=Ol(j.current).call(K),X=Bd.translate(h.x,h.y).scale(iy(h.zoom,x,y)),ee=[[0,0],[W.width,W.height]],ae=K.constrain()(X,ee,p);K.transform(z,ae),K.wheelDelta(X9),T.setState({d3Zoom:K,d3Selection:z,d3ZoomHandler:z.on("wheel.zoom"),transform:[ae.x,ae.y,ae.k],domNode:j.current.closest(".react-flow")})}},[]),b.useEffect(()=>{V&&L&&(a&&!H&&!D?V.on("wheel.zoom",W=>{if(Yg(W,O))return!1;W.preventDefault(),W.stopImmediatePropagation();const K=V.property("__zoom").k||1;if(W.ctrlKey&&i){const he=Nu(W),ue=X9(W),we=K*Math.pow(2,ue);L.scaleTo(V,we,he,W);return}const z=W.deltaMode===1?20:1;let X=l===_p.Vertical?0:W.deltaX*z,ee=l===_p.Horizontal?0:W.deltaY*z;!fC()&&W.shiftKey&&l!==_p.Vertical&&(X=W.deltaY*z,ee=0),L.translateBy(V,-(X/K)*s,-(ee/K)*s,{internal:!0});const ae=R_(V.property("__zoom")),{onViewportChangeStart:fe,onViewportChange:ie,onViewportChangeEnd:ge}=T.getState();clearTimeout(q.current),Y.current||(Y.current=!0,t==null||t(W,ae),fe==null||fe(ae)),Y.current&&(e==null||e(W,ae),ie==null||ie(ae),q.current=setTimeout(()=>{n==null||n(W,ae),ge==null||ge(ae),Y.current=!1},150))},{passive:!1}):typeof G<"u"&&V.on("wheel.zoom",function(W,K){if(!_&&W.type==="wheel"&&!W.ctrlKey||Yg(W,O))return null;W.preventDefault(),G.call(this,W,K)},{passive:!1}))},[D,a,l,V,L,G,H,i,_,O,t,e,n]),b.useEffect(()=>{L&&L.on("start",W=>{var X,ee;if(!W.sourceEvent||W.sourceEvent.internal)return null;U.current=(X=W.sourceEvent)==null?void 0:X.button;const{onViewportChangeStart:K}=T.getState(),z=R_(W.transform);k.current=!0,$.current=z,((ee=W.sourceEvent)==null?void 0:ee.type)==="mousedown"&&T.setState({paneDragging:!0}),K==null||K(z),t==null||t(W.sourceEvent,z)})},[L,t]),b.useEffect(()=>{L&&(D&&!k.current?L.on("zoom",null):D||L.on("zoom",W=>{var z;const{onViewportChange:K}=T.getState();if(T.setState({transform:[W.transform.x,W.transform.y,W.transform.k]}),M.current=!!(r&&Y9(d,U.current??0)),(e||K)&&!((z=W.sourceEvent)!=null&&z.internal)){const X=R_(W.transform);K==null||K(X),e==null||e(W.sourceEvent,X)}}))},[D,L,e,d,r]),b.useEffect(()=>{L&&L.on("end",W=>{if(!W.sourceEvent||W.sourceEvent.internal)return null;const{onViewportChangeEnd:K}=T.getState();if(k.current=!1,T.setState({paneDragging:!1}),r&&Y9(d,U.current??0)&&!M.current&&r(W.sourceEvent),M.current=!1,(n||K)&&gIe($.current,W.transform)){const z=R_(W.transform);$.current=z,clearTimeout(R.current),R.current=setTimeout(()=>{K==null||K(z),n==null||n(W.sourceEvent,z)},a?150:0)}})},[L,a,d,n,r]),b.useEffect(()=>{L&&L.filter(W=>{const K=H||o,z=i&&W.ctrlKey;if((d===!0||Array.isArray(d)&&d.includes(1))&&W.button===1&&W.type==="mousedown"&&(Yg(W,"react-flow__node")||Yg(W,"react-flow__edge")))return!0;if(!d&&!K&&!a&&!u&&!i||D||!u&&W.type==="dblclick"||Yg(W,O)&&W.type==="wheel"||Yg(W,P)&&(W.type!=="wheel"||a&&W.type==="wheel"&&!H)||!i&&W.ctrlKey&&W.type==="wheel"||!K&&!a&&!z&&W.type==="wheel"||!d&&(W.type==="mousedown"||W.type==="touchstart")||Array.isArray(d)&&!d.includes(W.button)&&W.type==="mousedown")return!1;const X=Array.isArray(d)&&d.includes(W.button)||!W.button||W.button<=1;return(!W.ctrlKey||W.type==="wheel")&&X})},[D,L,o,i,a,u,d,c,H]),J.createElement("div",{className:"react-flow__renderer",ref:j,style:D$},C)},wIe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function xIe(){const{userSelectionActive:e,userSelectionRect:t}=ao(wIe,ka);return e&&t?J.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Q9(e,t){const n=t.parentNode||t.parentId,r=e.find(o=>o.id===n);if(r){const o=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(o>0||i>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,o>0&&(r.style.width+=o),i>0&&(r.style.height+=i),t.position.x<0){const a=Math.abs(t.position.x);r.position.x=r.position.x-a,r.style.width+=a,t.position.x=0}if(t.position.y<0){const a=Math.abs(t.position.y);r.position.y=r.position.y-a,r.style.height+=a,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function bIe(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,o)=>{const i=e.filter(s=>s.id===o.id);if(i.length===0)return r.push(o),r;const a={...o};for(const s of i)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&Q9(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&Q9(r,a);break}case"remove":return r}return r.push(a),r},n)}function SIe(e,t){return bIe(e,t)}const hd=(e,t)=>({id:e,type:"select",selected:t});function cv(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(hd(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(hd(r.id,!1))),n},[])}const yA=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},_Ie=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),zne=b.memo(({isSelecting:e,selectionMode:t=Kw.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const h=b.useRef(null),p=si(),x=b.useRef(0),y=b.useRef(0),w=b.useRef(),{userSelectionActive:_,elementsSelectable:C,dragging:O}=ao(_Ie,ka),P=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),x.current=0,y.current=0},R=G=>{i==null||i(G),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},T=G=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){G.preventDefault();return}a==null||a(G)},k=s?G=>s(G):void 0,M=G=>{const{resetSelectedElements:D,domNode:H}=p.getState();if(w.current=H==null?void 0:H.getBoundingClientRect(),!C||!e||G.button!==0||G.target!==h.current||!w.current)return;const{x:U,y:Y}=zd(G,w.current);D(),p.setState({userSelectionRect:{width:0,height:0,startX:U,startY:Y,x:U,y:Y}}),r==null||r(G)},j=G=>{const{userSelectionRect:D,nodeInternals:H,edges:U,transform:Y,onNodesChange:q,onEdgesChange:W,nodeOrigin:K,getNodes:z}=p.getState();if(!e||!w.current||!D)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const X=zd(G,w.current),ee=D.startX??0,ae=D.startY??0,fe={...D,x:X.xwe.id),ue=ge.map(we=>we.id);if(x.current!==ue.length){x.current=ue.length;const we=cv(ie,ue);we.length&&(q==null||q(we))}if(y.current!==he.length){y.current=he.length;const we=cv(U,he);we.length&&(W==null||W(we))}p.setState({userSelectionRect:fe})},$=G=>{if(G.button!==0)return;const{userSelectionRect:D}=p.getState();!_&&D&&G.target===h.current&&(R==null||R(G)),p.setState({nodesSelectionActive:x.current>0}),P(),o==null||o(G)},L=G=>{_&&(p.setState({nodesSelectionActive:x.current>0}),o==null||o(G)),P()},V=C&&(e||_);return J.createElement("div",{className:Ks(["react-flow__pane",{dragging:O,selection:e}]),onClick:V?void 0:yA(R,h),onContextMenu:yA(T,h),onWheel:yA(k,h),onMouseEnter:V?void 0:l,onMouseDown:V?M:void 0,onMouseMove:V?j:u,onMouseUp:V?$:void 0,onMouseLeave:V?L:c,ref:h,style:D$},d,J.createElement(xIe,null))});zne.displayName="Pane";function qne(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:qne(r,t):!1}function Z9(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function EIe(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||o.parentId||!qne(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>{var i,a;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((i=o.positionAbsolute)==null?void 0:i.x)??0),y:n.y-(((a=o.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode||o.parentId,parentId:o.parentNode||o.parentId,width:o.width,height:o.height,expandParent:o.expandParent}})}function CIe(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function Une(e,t,n,r,o=[0,0],i){const a=CIe(e,e.extent||r);let s=a;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const d=n.get(l),{x:h,y:p}=bv(d,o).positionAbsolute;s=d&&Ms(h)&&Ms(p)&&Ms(d.width)&&Ms(d.height)?[[h+e.width*o[0],p+e.height*o[1]],[h+d.width-e.width+e.width*o[0],p+d.height-e.height+e.height*o[1]]]:s}else i==null||i("005",hf.error005()),s=a;else if(e.extent&&l&&e.extent!=="parent"){const d=n.get(l),{x:h,y:p}=bv(d,o).positionAbsolute;s=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let u={x:0,y:0};if(l){const d=n.get(l);u=bv(d,o).positionAbsolute}const c=s&&s!=="parent"?R$(t,s):t;return{position:{x:c.x-u.x,y:c.y-u.y},positionAbsolute:c}}function wA({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const J9=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return i.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...O$(l)}})};function M1(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function kD({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),u=s.get(e);if(!u){l==null||l("012",hf.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):o([e])}function OIe(){const e=si();return b.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:i}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:i?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:i?o[1]*Math.round(l.y/o[1]):l.y,...l}},[])}function xA(e){return(t,n,r)=>e==null?void 0:e(t,r)}function Vne({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const s=si(),[l,u]=b.useState(!1),c=b.useRef([]),d=b.useRef({x:null,y:null}),h=b.useRef(0),p=b.useRef(null),x=b.useRef({x:0,y:0}),y=b.useRef(null),w=b.useRef(!1),_=b.useRef(!1),C=b.useRef(!1),O=OIe();return b.useEffect(()=>{if(e!=null&&e.current){const P=Ol(e.current),R=({x:M,y:j})=>{const{nodeInternals:$,onNodeDrag:L,onSelectionDrag:V,updateNodePositions:G,nodeExtent:D,snapGrid:H,snapToGrid:U,nodeOrigin:Y,onError:q}=s.getState();d.current={x:M,y:j};let W=!1,K={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&D){const X=M$(c.current,Y);K=P$(X)}if(c.current=c.current.map(X=>{const ee={x:M-X.distance.x,y:j-X.distance.y};U&&(ee.x=H[0]*Math.round(ee.x/H[0]),ee.y=H[1]*Math.round(ee.y/H[1]));const ae=[[D[0][0],D[0][1]],[D[1][0],D[1][1]]];c.current.length>1&&D&&!X.extent&&(ae[0][0]=X.positionAbsolute.x-K.x+D[0][0],ae[1][0]=X.positionAbsolute.x+(X.width??0)-K.x2+D[1][0],ae[0][1]=X.positionAbsolute.y-K.y+D[0][1],ae[1][1]=X.positionAbsolute.y+(X.height??0)-K.y2+D[1][1]);const fe=Une(X,ee,$,ae,Y,q);return W=W||X.position.x!==fe.position.x||X.position.y!==fe.position.y,X.position=fe.position,X.positionAbsolute=fe.positionAbsolute,X}),!W)return;G(c.current,!0,!0),u(!0);const z=o?L:xA(V);if(z&&y.current){const[X,ee]=wA({nodeId:o,dragItems:c.current,nodeInternals:$});z(y.current,X,ee)}},T=()=>{if(!p.current)return;const[M,j]=hne(x.current,p.current);if(M!==0||j!==0){const{transform:$,panBy:L}=s.getState();d.current.x=(d.current.x??0)-M/$[2],d.current.y=(d.current.y??0)-j/$[2],L({x:M,y:j})&&R(d.current)}h.current=requestAnimationFrame(T)},k=M=>{var Y;const{nodeInternals:j,multiSelectionActive:$,nodesDraggable:L,unselectNodesAndEdges:V,onNodeDragStart:G,onSelectionDragStart:D}=s.getState();_.current=!0;const H=o?G:xA(D);(!a||!i)&&!$&&o&&((Y=j.get(o))!=null&&Y.selected||V()),o&&i&&a&&kD({id:o,store:s,nodeRef:e});const U=O(M);if(d.current=U,c.current=EIe(j,L,U,o),H&&c.current){const[q,W]=wA({nodeId:o,dragItems:c.current,nodeInternals:j});H(M.sourceEvent,q,W)}};if(t)P.on(".drag",null);else{const M=PNe().on("start",j=>{const{domNode:$,nodeDragThreshold:L}=s.getState();L===0&&k(j),C.current=!1;const V=O(j);d.current=V,p.current=($==null?void 0:$.getBoundingClientRect())||null,x.current=zd(j.sourceEvent,p.current)}).on("drag",j=>{var G,D;const $=O(j),{autoPanOnNodeDrag:L,nodeDragThreshold:V}=s.getState();if(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1&&(C.current=!0),!C.current){if(!w.current&&_.current&&L&&(w.current=!0,T()),!_.current){const H=$.xSnapped-(((G=d==null?void 0:d.current)==null?void 0:G.x)??0),U=$.ySnapped-(((D=d==null?void 0:d.current)==null?void 0:D.y)??0);Math.sqrt(H*H+U*U)>V&&k(j)}(d.current.x!==$.xSnapped||d.current.y!==$.ySnapped)&&c.current&&_.current&&(y.current=j.sourceEvent,x.current=zd(j.sourceEvent,p.current),R($))}}).on("end",j=>{if(!(!_.current||C.current)&&(u(!1),w.current=!1,_.current=!1,cancelAnimationFrame(h.current),c.current)){const{updateNodePositions:$,nodeInternals:L,onNodeDragStop:V,onSelectionDragStop:G}=s.getState(),D=o?V:xA(G);if($(c.current,!1,!1),D){const[H,U]=wA({nodeId:o,dragItems:c.current,nodeInternals:L});D(j.sourceEvent,H,U)}}}).filter(j=>{const $=j.target;return!j.button&&(!n||!Z9($,`.${n}`,e))&&(!r||Z9($,r,e))});return P.call(M),()=>{P.on(".drag",null)}}}},[e,t,n,r,i,s,o,a,O]),l}function Wne(){const e=si();return b.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:i,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=a().filter(C=>C.selected&&(C.draggable||c&&typeof C.draggable>"u")),h=s?l[0]:5,p=s?l[1]:5,x=n.isShiftPressed?4:1,y=n.x*h*x,w=n.y*p*x,_=d.map(C=>{if(C.positionAbsolute){const O={x:C.positionAbsolute.x+y,y:C.positionAbsolute.y+w};s&&(O.x=l[0]*Math.round(O.x/l[0]),O.y=l[1]*Math.round(O.y/l[1]));const{positionAbsolute:P,position:R}=Une(C,O,r,o,void 0,u);C.position=R,C.positionAbsolute=P}return C});i(_,!0,!1)},[])}const Sv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var j1=e=>{const t=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:h,onMouseLeave:p,onContextMenu:x,onDoubleClick:y,style:w,className:_,isDraggable:C,isSelectable:O,isConnectable:P,isFocusable:R,selectNodesOnDrag:T,sourcePosition:k,targetPosition:M,hidden:j,resizeObserver:$,dragHandle:L,zIndex:V,isParent:G,noDragClassName:D,noPanClassName:H,initialized:U,disableKeyboardA11y:Y,ariaLabel:q,rfId:W,hasHandleBounds:K})=>{const z=si(),X=b.useRef(null),ee=b.useRef(null),ae=b.useRef(k),fe=b.useRef(M),ie=b.useRef(r),ge=O||C||c||d||h||p,he=Wne(),ue=M1(n,z.getState,d),we=M1(n,z.getState,h),Ae=M1(n,z.getState,p),ye=M1(n,z.getState,x),Xe=M1(n,z.getState,y),We=st=>{const{nodeDragThreshold:Ge}=z.getState();if(O&&(!T||!C||Ge>0)&&kD({id:n,store:z,nodeRef:X}),c){const Kt=z.getState().nodeInternals.get(n);Kt&&c(st,{...Kt})}},et=st=>{if(!OD(st)&&!Y)if(mne.includes(st.key)&&O){const Ge=st.key==="Escape";kD({id:n,store:z,unselect:Ge,nodeRef:X})}else C&&u&&Object.prototype.hasOwnProperty.call(Sv,st.key)&&(z.setState({ariaLiveMessage:`Moved selected node ${st.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),he({x:Sv[st.key].x,y:Sv[st.key].y,isShiftPressed:st.shiftKey}))};b.useEffect(()=>()=>{ee.current&&($==null||$.unobserve(ee.current),ee.current=null)},[]),b.useEffect(()=>{if(X.current&&!j){const st=X.current;(!U||!K||ee.current!==st)&&(ee.current&&($==null||$.unobserve(ee.current)),$==null||$.observe(st),ee.current=st)}},[j,U,K]),b.useEffect(()=>{const st=ie.current!==r,Ge=ae.current!==k,Kt=fe.current!==M;X.current&&(st||Ge||Kt)&&(st&&(ie.current=r),Ge&&(ae.current=k),Kt&&(fe.current=M),z.getState().updateNodeDimensions([{id:n,nodeElement:X.current,forceUpdate:!0}]))},[n,r,k,M]);const ft=Vne({nodeRef:X,disabled:j||!C,noDragClassName:D,handleSelector:L,nodeId:n,isSelectable:O,selectNodesOnDrag:T});return j?null:J.createElement("div",{className:Ks(["react-flow__node",`react-flow__node-${r}`,{[H]:C},_,{selected:u,selectable:O,parent:G,dragging:ft}]),ref:X,style:{zIndex:V,transform:`translate(${s}px,${l}px)`,pointerEvents:ge?"all":"none",visibility:U?"visible":"hidden",...w},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ue,onMouseMove:we,onMouseLeave:Ae,onContextMenu:ye,onClick:We,onDoubleClick:Xe,onKeyDown:R?et:void 0,tabIndex:R?0:void 0,role:R?"button":void 0,"aria-describedby":Y?void 0:`${Ine}-${W}`,"aria-label":q},J.createElement(Fje,{value:n},J.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:u,isConnectable:P,sourcePosition:k,targetPosition:M,dragging:ft,dragHandle:L,zIndex:V})))};return t.displayName="NodeWrapper",b.memo(t)};const RIe=e=>{const t=e.getNodes().filter(n=>n.selected);return{...M$(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function PIe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=si(),{width:o,height:i,x:a,y:s,transformString:l,userSelectionActive:u}=ao(RIe,ka),c=Wne(),d=b.useRef(null);if(b.useEffect(()=>{var x;n||(x=d.current)==null||x.focus({preventScroll:!0})},[n]),Vne({nodeRef:d}),u||!o||!i)return null;const h=e?x=>{const y=r.getState().getNodes().filter(w=>w.selected);e(x,y)}:void 0,p=x=>{Object.prototype.hasOwnProperty.call(Sv,x.key)&&c({x:Sv[x.key].x,y:Sv[x.key].y,isShiftPressed:x.shiftKey})};return J.createElement("div",{className:Ks(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},J.createElement("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:i,top:s,left:a}}))}var TIe=b.memo(PIe);const AIe=e=>e.nodesSelectionActive,Hne=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:h,selectionMode:p,onSelectionStart:x,onSelectionEnd:y,multiSelectionKeyCode:w,panActivationKeyCode:_,zoomActivationKeyCode:C,elementsSelectable:O,zoomOnScroll:P,zoomOnPinch:R,panOnScroll:T,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:$,defaultViewport:L,translateExtent:V,minZoom:G,maxZoom:D,preventScrolling:H,onSelectionContextMenu:U,noWheelClassName:Y,noPanClassName:q,disableKeyboardA11y:W})=>{const K=ao(AIe),z=Yw(d),X=Yw(_),ee=X||$,ae=X||T,fe=z||h&&ee!==!0;return pIe({deleteKeyCode:s,multiSelectionKeyCode:w}),J.createElement(yIe,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:i,elementsSelectable:O,zoomOnScroll:P,zoomOnPinch:R,panOnScroll:ae,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:!z&&ee,defaultViewport:L,translateExtent:V,minZoom:G,maxZoom:D,zoomActivationKeyCode:C,preventScrolling:H,noWheelClassName:Y,noPanClassName:q},J.createElement(zne,{onSelectionStart:x,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ee,isSelecting:!!fe,selectionMode:p},e,K&&J.createElement(TIe,{onSelectionContextMenu:U,noPanClassName:q,disableKeyboardA11y:W})))};Hne.displayName="FlowRenderer";var kIe=b.memo(Hne);function NIe(e){return ao(b.useCallback(n=>e?Sne(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function MIe(e){const t={input:j1(e.input||kne),default:j1(e.default||AD),output:j1(e.output||Mne),group:j1(e.group||I$)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,i)=>(o[i]=j1(e[i]||AD),o),n);return{...t,...r}}const jIe=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},IIe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Gne=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:a}=ao(IIe,ka),s=NIe(e.onlyRenderVisibleElements),l=b.useRef(),u=b.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const h=d.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));i(h)});return l.current=c,c},[]);return b.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),J.createElement("div",{className:"react-flow__nodes",style:D$},s.map(c=>{var R,T,k;let d=c.type||"default";e.nodeTypes[d]||(a==null||a("003",hf.error003(d)),d="default");const h=e.nodeTypes[d]||e.nodeTypes.default,p=!!(c.draggable||t&&typeof c.draggable>"u"),x=!!(c.selectable||o&&typeof c.selectable>"u"),y=!!(c.connectable||n&&typeof c.connectable>"u"),w=!!(c.focusable||r&&typeof c.focusable>"u"),_=e.nodeExtent?R$(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,C=(_==null?void 0:_.x)??0,O=(_==null?void 0:_.y)??0,P=jIe({x:C,y:O,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return J.createElement(h,{key:c.id,id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||$t.Bottom,targetPosition:c.targetPosition||$t.Top,hidden:c.hidden,xPos:C,yPos:O,xPosOrigin:P.x,yPosOrigin:P.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:p,isSelectable:x,isConnectable:y,isFocusable:w,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((R=c[Kr])==null?void 0:R.z)??0,isParent:!!((T=c[Kr])!=null&&T.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel,hasHandleBounds:!!((k=c[Kr])!=null&&k.handleBounds)})}))};Gne.displayName="NodeRenderer";var DIe=b.memo(Gne);const LIe=(e,t,n)=>n===$t.Left?e-t:n===$t.Right?e+t:e,$Ie=(e,t,n)=>n===$t.Top?e-t:n===$t.Bottom?e+t:e,eB="react-flow__edgeupdater",tB=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:a,type:s})=>J.createElement("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:a,className:Ks([eB,`${eB}-${s}`]),cx:LIe(t,r,e),cy:$Ie(n,r,e),r,stroke:"transparent",fill:"transparent"}),FIe=()=>!0;var Xg=e=>{const t=({id:n,className:r,type:o,data:i,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:w,source:_,target:C,sourceX:O,sourceY:P,targetX:R,targetY:T,sourcePosition:k,targetPosition:M,elementsSelectable:j,hidden:$,sourceHandleId:L,targetHandleId:V,onContextMenu:G,onMouseEnter:D,onMouseMove:H,onMouseLeave:U,reconnectRadius:Y,onReconnect:q,onReconnectStart:W,onReconnectEnd:K,markerEnd:z,markerStart:X,rfId:ee,ariaLabel:ae,isFocusable:fe,isReconnectable:ie,pathOptions:ge,interactionWidth:he,disableKeyboardA11y:ue})=>{const we=b.useRef(null),[Ae,ye]=b.useState(!1),[Xe,We]=b.useState(!1),et=si(),ft=b.useMemo(()=>`url('#${PD(X,ee)}')`,[X,ee]),st=b.useMemo(()=>`url('#${PD(z,ee)}')`,[z,ee]);if($)return null;const Ge=Ot=>{var Ce;const{edges:an,addSelectedEdges:tr,unselectNodesAndEdges:$n,multiSelectionActive:Mr}=et.getState(),Ee=an.find(me=>me.id===n);Ee&&(j&&(et.setState({nodesSelectionActive:!1}),Ee.selected&&Mr?($n({nodes:[],edges:[Ee]}),(Ce=we.current)==null||Ce.blur()):tr([n])),a&&a(Ot,Ee))},Kt=N1(n,et.getState,s),gn=N1(n,et.getState,G),un=N1(n,et.getState,D),on=N1(n,et.getState,H),oe=N1(n,et.getState,U),de=(Ot,an)=>{if(Ot.button!==0)return;const{edges:tr,isValidConnection:$n}=et.getState(),Mr=an?C:_,Ee=(an?V:L)||null,Ce=an?"target":"source",me=$n||FIe,Te=an,De=tr.find(Ut=>Ut.id===n);We(!0),W==null||W(Ot,De,Ce);const Fe=Ut=>{We(!1),K==null||K(Ut,De,Ce)};Rne({event:Ot,handleId:Ee,nodeId:Mr,onConnect:Ut=>q==null?void 0:q(De,Ut),isTarget:Te,getState:et.getState,setState:et.setState,isValidConnection:me,edgeUpdaterType:Ce,onReconnectEnd:Fe})},Se=Ot=>de(Ot,!0),Ve=Ot=>de(Ot,!1),Ye=()=>ye(!0),He=()=>ye(!1),tt=!j&&!a,Tt=Ot=>{var an;if(!ue&&mne.includes(Ot.key)&&j){const{unselectNodesAndEdges:tr,addSelectedEdges:$n,edges:Mr}=et.getState();Ot.key==="Escape"?((an=we.current)==null||an.blur(),tr({edges:[Mr.find(Ce=>Ce.id===n)]})):$n([n])}};return J.createElement("g",{className:Ks(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:l,animated:u,inactive:tt,updating:Ae}]),onClick:Ge,onDoubleClick:Kt,onContextMenu:gn,onMouseEnter:un,onMouseMove:on,onMouseLeave:oe,onKeyDown:fe?Tt:void 0,tabIndex:fe?0:void 0,role:fe?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":ae===null?void 0:ae||`Edge from ${_} to ${C}`,"aria-describedby":fe?`${Dne}-${ee}`:void 0,ref:we},!Xe&&J.createElement(e,{id:n,source:_,target:C,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,data:i,style:w,sourceX:O,sourceY:P,targetX:R,targetY:T,sourcePosition:k,targetPosition:M,sourceHandleId:L,targetHandleId:V,markerStart:ft,markerEnd:st,pathOptions:ge,interactionWidth:he}),ie&&J.createElement(J.Fragment,null,(ie==="source"||ie===!0)&&J.createElement(tB,{position:k,centerX:O,centerY:P,radius:Y,onMouseDown:Se,onMouseEnter:Ye,onMouseOut:He,type:"source"}),(ie==="target"||ie===!0)&&J.createElement(tB,{position:M,centerX:R,centerY:T,radius:Y,onMouseDown:Ve,onMouseEnter:Ye,onMouseOut:He,type:"target"})))};return t.displayName="EdgeWrapper",b.memo(t)};function BIe(e){const t={default:Xg(e.default||hC),straight:Xg(e.bezier||k$),step:Xg(e.step||A$),smoothstep:Xg(e.step||NR),simplebezier:Xg(e.simplebezier||T$)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,i)=>(o[i]=Xg(e[i]||hC),o),n);return{...t,...r}}function nB(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,o=((n==null?void 0:n.y)||0)+t.y,i=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case $t.Top:return{x:r+i/2,y:o};case $t.Right:return{x:r+i,y:o+a/2};case $t.Bottom:return{x:r+i/2,y:o+a};case $t.Left:return{x:r,y:o+a/2}}}function rB(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const zIe=(e,t,n,r,o,i)=>{const a=nB(n,e,t),s=nB(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function qIe({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=P$({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),h=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*h)>0}function oB(e){var r,o,i,a,s;const t=((r=e==null?void 0:e[Kr])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const UIe=[{level:0,isMaxLevel:!0,edges:[]}];function VIe(e,t,n=!1){let r=-1;const o=e.reduce((a,s)=>{var c,d;const l=Ms(s.zIndex);let u=l?s.zIndex:0;if(n){const h=t.get(s.target),p=t.get(s.source),x=s.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),y=Math.max(((c=p==null?void 0:p[Kr])==null?void 0:c.z)||0,((d=h==null?void 0:h[Kr])==null?void 0:d.z)||0,1e3);u=(l?s.zIndex:0)+(x?y:0)}return a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),i=Object.entries(o).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return i.length===0?UIe:i}function WIe(e,t,n){const r=ao(b.useCallback(o=>e?o.edges.filter(i=>{const a=t.get(i.source),s=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&qIe({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return VIe(r,t,n)}const HIe=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),GIe=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),iB={[dC.Arrow]:HIe,[dC.ArrowClosed]:GIe};function KIe(e){const t=si();return b.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(iB,e)?iB[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",hf.error009(e)),null)},[e])}const YIe=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=KIe(t);return l?J.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:s,refX:"0",refY:"0"},J.createElement(l,{color:n,strokeWidth:a})):null},XIe=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,i)=>([i.markerStart,i.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=PD(a,t);r.includes(s)||(o.push({id:s,color:a.color||e,...a}),r.push(s))}}),o),[]).sort((o,i)=>o.id.localeCompare(i.id))},Kne=({defaultColor:e,rfId:t})=>{const n=ao(b.useCallback(XIe({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((i,a)=>i.id!==o[a].id)));return J.createElement("defs",null,n.map(r=>J.createElement(YIe,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};Kne.displayName="MarkerDefinitions";var QIe=b.memo(Kne);const ZIe=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),Yne=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeContextMenu:a,onEdgeMouseEnter:s,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:c,onEdgeDoubleClick:d,onReconnect:h,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:y,children:w,disableKeyboardA11y:_})=>{const{edgesFocusable:C,edgesUpdatable:O,elementsSelectable:P,width:R,height:T,connectionMode:k,nodeInternals:M,onError:j}=ao(ZIe,ka),$=WIe(t,M,n);return R?J.createElement(J.Fragment,null,$.map(({level:L,edges:V,isMaxLevel:G})=>J.createElement("svg",{key:L,style:{zIndex:L},width:R,height:T,className:"react-flow__edges react-flow__container"},G&&J.createElement(QIe,{defaultColor:e,rfId:r}),J.createElement("g",null,V.map(D=>{const[H,U,Y]=oB(M.get(D.source)),[q,W,K]=oB(M.get(D.target));if(!Y||!K)return null;let z=D.type||"default";o[z]||(j==null||j("011",hf.error011(z)),z="default");const X=o[z]||o.default,ee=k===lm.Strict?W.target:(W.target??[]).concat(W.source??[]),ae=rB(U.source,D.sourceHandle),fe=rB(ee,D.targetHandle),ie=(ae==null?void 0:ae.position)||$t.Bottom,ge=(fe==null?void 0:fe.position)||$t.Top,he=!!(D.focusable||C&&typeof D.focusable>"u"),ue=D.reconnectable||D.updatable,we=typeof h<"u"&&(ue||O&&typeof ue>"u");if(!ae||!fe)return j==null||j("008",hf.error008(ae,D)),null;const{sourceX:Ae,sourceY:ye,targetX:Xe,targetY:We}=zIe(H,ae,ie,q,fe,ge);return J.createElement(X,{key:D.id,id:D.id,className:Ks([D.className,i]),type:z,data:D.data,selected:!!D.selected,animated:!!D.animated,hidden:!!D.hidden,label:D.label,labelStyle:D.labelStyle,labelShowBg:D.labelShowBg,labelBgStyle:D.labelBgStyle,labelBgPadding:D.labelBgPadding,labelBgBorderRadius:D.labelBgBorderRadius,style:D.style,source:D.source,target:D.target,sourceHandleId:D.sourceHandle,targetHandleId:D.targetHandle,markerEnd:D.markerEnd,markerStart:D.markerStart,sourceX:Ae,sourceY:ye,targetX:Xe,targetY:We,sourcePosition:ie,targetPosition:ge,elementsSelectable:P,onContextMenu:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,onClick:c,onEdgeDoubleClick:d,onReconnect:h,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:y,rfId:r,ariaLabel:D.ariaLabel,isFocusable:he,isReconnectable:we,pathOptions:"pathOptions"in D?D.pathOptions:void 0,interactionWidth:D.interactionWidth,disableKeyboardA11y:_})})))),w):null};Yne.displayName="EdgeRenderer";var JIe=b.memo(Yne);const eDe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function tDe({children:e}){const t=ao(eDe);return J.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function nDe(e){const t=Bne(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const rDe={[$t.Left]:$t.Right,[$t.Right]:$t.Left,[$t.Top]:$t.Bottom,[$t.Bottom]:$t.Top},Xne=({nodeId:e,handleType:t,style:n,type:r=vd.Bezier,CustomComponent:o,connectionStatus:i})=>{var T,k,M;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=ao(b.useCallback(j=>({fromNode:j.nodeInternals.get(e),handleId:j.connectionHandleId,toX:(j.connectionPosition.x-j.transform[0])/j.transform[2],toY:(j.connectionPosition.y-j.transform[1])/j.transform[2],connectionMode:j.connectionMode}),[e]),ka),d=(T=a==null?void 0:a[Kr])==null?void 0:T.handleBounds;let h=d==null?void 0:d[t];if(c===lm.Loose&&(h=h||(d==null?void 0:d[t==="source"?"target":"source"])),!a||!h)return null;const p=s?h.find(j=>j.id===s):h[0],x=p?p.x+p.width/2:(a.width??0)/2,y=p?p.y+p.height/2:a.height??0,w=(((k=a.positionAbsolute)==null?void 0:k.x)??0)+x,_=(((M=a.positionAbsolute)==null?void 0:M.y)??0)+y,C=p==null?void 0:p.position,O=C?rDe[C]:null;if(!C||!O)return null;if(o)return J.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:p,fromX:w,fromY:_,toX:l,toY:u,fromPosition:C,toPosition:O,connectionStatus:i});let P="";const R={sourceX:w,sourceY:_,sourcePosition:C,targetX:l,targetY:u,targetPosition:O};return r===vd.Bezier?[P]=xne(R):r===vd.Step?[P]=RD({...R,borderRadius:0}):r===vd.SmoothStep?[P]=RD(R):r===vd.SimpleBezier?[P]=wne(R):P=`M${w},${_} ${l},${u}`,J.createElement("path",{d:P,fill:"none",className:"react-flow__connection-path",style:n})};Xne.displayName="ConnectionLine";const oDe=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function iDe({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:a,width:s,height:l,connectionStatus:u}=ao(oDe,ka);return!(o&&i&&s&&a)?null:J.createElement("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},J.createElement("g",{className:Ks(["react-flow__connection",u])},J.createElement(Xne,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function aB(e,t){return b.useRef(null),si(),b.useMemo(()=>t(e),[e])}const Qne=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:x,onSelectionStart:y,onSelectionEnd:w,connectionLineType:_,connectionLineStyle:C,connectionLineComponent:O,connectionLineContainerStyle:P,selectionKeyCode:R,selectionOnDrag:T,selectionMode:k,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:$,deleteKeyCode:L,onlyRenderVisibleElements:V,elementsSelectable:G,selectNodesOnDrag:D,defaultViewport:H,translateExtent:U,minZoom:Y,maxZoom:q,preventScrolling:W,defaultMarkerColor:K,zoomOnScroll:z,zoomOnPinch:X,panOnScroll:ee,panOnScrollSpeed:ae,panOnScrollMode:fe,zoomOnDoubleClick:ie,panOnDrag:ge,onPaneClick:he,onPaneMouseEnter:ue,onPaneMouseMove:we,onPaneMouseLeave:Ae,onPaneScroll:ye,onPaneContextMenu:Xe,onEdgeContextMenu:We,onEdgeMouseEnter:et,onEdgeMouseMove:ft,onEdgeMouseLeave:st,onReconnect:Ge,onReconnectStart:Kt,onReconnectEnd:gn,reconnectRadius:un,noDragClassName:on,noWheelClassName:oe,noPanClassName:de,elevateEdgesOnSelect:Se,disableKeyboardA11y:Ve,nodeOrigin:Ye,nodeExtent:He,rfId:tt})=>{const Tt=aB(e,MIe),Ot=aB(t,BIe);return nDe(i),J.createElement(kIe,{onPaneClick:he,onPaneMouseEnter:ue,onPaneMouseMove:we,onPaneMouseLeave:Ae,onPaneContextMenu:Xe,onPaneScroll:ye,deleteKeyCode:L,selectionKeyCode:R,selectionOnDrag:T,selectionMode:k,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:$,elementsSelectable:G,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:z,zoomOnPinch:X,zoomOnDoubleClick:ie,panOnScroll:ee,panOnScrollSpeed:ae,panOnScrollMode:fe,panOnDrag:ge,defaultViewport:H,translateExtent:U,minZoom:Y,maxZoom:q,onSelectionContextMenu:x,preventScrolling:W,noDragClassName:on,noWheelClassName:oe,noPanClassName:de,disableKeyboardA11y:Ve},J.createElement(tDe,null,J.createElement(JIe,{edgeTypes:Ot,onEdgeClick:s,onEdgeDoubleClick:u,onlyRenderVisibleElements:V,onEdgeContextMenu:We,onEdgeMouseEnter:et,onEdgeMouseMove:ft,onEdgeMouseLeave:st,onReconnect:Ge,onReconnectStart:Kt,onReconnectEnd:gn,reconnectRadius:un,defaultMarkerColor:K,noPanClassName:de,elevateEdgesOnSelect:!!Se,disableKeyboardA11y:Ve,rfId:tt},J.createElement(iDe,{style:C,type:_,component:O,containerStyle:P})),J.createElement("div",{className:"react-flow__edgelabel-renderer"}),J.createElement(DIe,{nodeTypes:Tt,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:D,onlyRenderVisibleElements:V,noPanClassName:de,noDragClassName:on,disableKeyboardA11y:Ve,nodeOrigin:Ye,nodeExtent:He,rfId:tt})))};Qne.displayName="GraphView";var aDe=b.memo(Qne);const ND=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ld={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:ND,nodeExtent:ND,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:lm.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Mje,isValidConnection:void 0},sDe=()=>BAe((e,t)=>({...ld,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:vA(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",i=typeof r<"u",a=o?vA(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:h}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce((y,w)=>{const _=o.get(w.id);if(_!=null&&_.hidden)o.set(_.id,{..._,[Kr]:{..._[Kr],handleBounds:void 0}});else if(_){const C=O$(w.nodeElement);!!(C.width&&C.height&&(_.width!==C.width||_.height!==C.height||w.forceUpdate))&&(o.set(_.id,{..._,[Kr]:{..._[Kr],handleBounds:{source:J9(".source",w.nodeElement,h,u),target:J9(".target",w.nodeElement,h,u)}},...C}),y.push({id:_.id,type:"dimensions",dimensions:C}))}return y},[]);$ne(o,u);const x=a||i&&!a&&Fne(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:x}),(p==null?void 0:p.length)>0&&(r==null||r(p))},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:i}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:o};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});i(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(i){const u=SIe(n,s()),c=vA(u,o,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>hd(l,!0)):(a=cv(i(),n),s=cv(o,[])),O_({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>hd(l,!0)):(a=cv(o,n),s=cv(i(),[])),O_({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=n||i(),s=r||o,l=a.map(c=>(c.selected=!1,hd(c.id,!1))),u=s.map(c=>hd(c.id,!1));O_({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r==null||r.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r==null||r.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),i=r().filter(s=>s.selected).map(s=>hd(s.id,!1)),a=n.filter(s=>s.selected).map(s=>hd(s.id,!1));O_({changedNodes:i,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=R$(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:i,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return!1;const u=Bd.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[o,i]],d=a==null?void 0:a.constrain()(u,c,l);return a.transform(s,d),r[0]!==d.x||r[1]!==d.y||r[2]!==d.k},cancelConnection:()=>e({connectionNodeId:ld.connectionNodeId,connectionHandleId:ld.connectionHandleId,connectionHandleType:ld.connectionHandleType,connectionStatus:ld.connectionStatus,connectionStartHandle:ld.connectionStartHandle,connectionEndHandle:ld.connectionEndHandle}),reset:()=>e({...ld})}),Object.is),Zne=({children:e})=>{const t=b.useRef(null);return t.current||(t.current=sDe()),J.createElement(Eje,{value:t.current},e)};Zne.displayName="ReactFlowProvider";const Jne=({children:e})=>b.useContext(kR)?J.createElement(J.Fragment,null,e):J.createElement(Zne,null,e);Jne.displayName="ReactFlowWrapper";const lDe={input:kne,default:AD,output:Mne,group:I$},uDe={default:hC,straight:k$,step:A$,smoothstep:NR,simplebezier:T$},cDe=[0,0],fDe=[15,15],dDe={x:0,y:0,zoom:1},hDe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},pDe=b.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=lDe,edgeTypes:a=uDe,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:h,onConnect:p,onConnectStart:x,onConnectEnd:y,onClickConnectStart:w,onClickConnectEnd:_,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:T,onNodeDragStart:k,onNodeDrag:M,onNodeDragStop:j,onNodesDelete:$,onEdgesDelete:L,onSelectionChange:V,onSelectionDragStart:G,onSelectionDrag:D,onSelectionDragStop:H,onSelectionContextMenu:U,onSelectionStart:Y,onSelectionEnd:q,connectionMode:W=lm.Strict,connectionLineType:K=vd.Bezier,connectionLineStyle:z,connectionLineComponent:X,connectionLineContainerStyle:ee,deleteKeyCode:ae="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ie=!1,selectionMode:ge=Kw.Full,panActivationKeyCode:he="Space",multiSelectionKeyCode:ue=fC()?"Meta":"Control",zoomActivationKeyCode:we=fC()?"Meta":"Control",snapToGrid:Ae=!1,snapGrid:ye=fDe,onlyRenderVisibleElements:Xe=!1,selectNodesOnDrag:We=!0,nodesDraggable:et,nodesConnectable:ft,nodesFocusable:st,nodeOrigin:Ge=cDe,edgesFocusable:Kt,edgesUpdatable:gn,elementsSelectable:un,defaultViewport:on=dDe,minZoom:oe=.5,maxZoom:de=2,translateExtent:Se=ND,preventScrolling:Ve=!0,nodeExtent:Ye,defaultMarkerColor:He="#b1b1b7",zoomOnScroll:tt=!0,zoomOnPinch:Tt=!0,panOnScroll:Ot=!1,panOnScrollSpeed:an=.5,panOnScrollMode:tr=_p.Free,zoomOnDoubleClick:$n=!0,panOnDrag:Mr=!0,onPaneClick:Ee,onPaneMouseEnter:Ce,onPaneMouseMove:me,onPaneMouseLeave:Te,onPaneScroll:De,onPaneContextMenu:Fe,children:Vt,onEdgeContextMenu:Ut,onEdgeDoubleClick:bn,onEdgeMouseEnter:it,onEdgeMouseMove:gt,onEdgeMouseLeave:Dt,onEdgeUpdate:kt,onEdgeUpdateStart:Zn,onEdgeUpdateEnd:Yr,onReconnect:ta,onReconnectStart:Xr,onReconnectEnd:Xs,reconnectRadius:ko=10,edgeUpdaterRadius:na=10,onNodesChange:ra,onEdgesChange:ds,noDragClassName:La="nodrag",noWheelClassName:Qs="nowheel",noPanClassName:oa="nopan",fitView:Ko=!1,fitViewOptions:$a,connectOnClick:hs=!0,attributionPosition:Zs,proOptions:Di,defaultEdgeOptions:Fa,elevateNodesOnSelect:Yl=!0,elevateEdgesOnSelect:Js=!1,disableKeyboardA11y:li=!1,autoPanOnConnect:el=!0,autoPanOnNodeDrag:dr=!0,connectionRadius:Xl=20,isValidConnection:ic,onError:tl,style:Ql,id:ac,nodeDragThreshold:qe,...mt},tn)=>{const Wn=ac||"1";return J.createElement("div",{...mt,style:{...Ql,...hDe},ref:tn,className:Ks(["react-flow",o]),"data-testid":"rf__wrapper",id:ac},J.createElement(Jne,null,J.createElement(aDe,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:h,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:a,connectionLineType:K,connectionLineStyle:z,connectionLineComponent:X,connectionLineContainerStyle:ee,selectionKeyCode:fe,selectionOnDrag:ie,selectionMode:ge,deleteKeyCode:ae,multiSelectionKeyCode:ue,panActivationKeyCode:he,zoomActivationKeyCode:we,onlyRenderVisibleElements:Xe,selectNodesOnDrag:We,defaultViewport:on,translateExtent:Se,minZoom:oe,maxZoom:de,preventScrolling:Ve,zoomOnScroll:tt,zoomOnPinch:Tt,zoomOnDoubleClick:$n,panOnScroll:Ot,panOnScrollSpeed:an,panOnScrollMode:tr,panOnDrag:Mr,onPaneClick:Ee,onPaneMouseEnter:Ce,onPaneMouseMove:me,onPaneMouseLeave:Te,onPaneScroll:De,onPaneContextMenu:Fe,onSelectionContextMenu:U,onSelectionStart:Y,onSelectionEnd:q,onEdgeContextMenu:Ut,onEdgeDoubleClick:bn,onEdgeMouseEnter:it,onEdgeMouseMove:gt,onEdgeMouseLeave:Dt,onReconnect:ta??kt,onReconnectStart:Xr??Zn,onReconnectEnd:Xs??Yr,reconnectRadius:ko??na,defaultMarkerColor:He,noDragClassName:La,noWheelClassName:Qs,noPanClassName:oa,elevateEdgesOnSelect:Js,rfId:Wn,disableKeyboardA11y:li,nodeOrigin:Ge,nodeExtent:Ye}),J.createElement(nIe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:x,onConnectEnd:y,onClickConnectStart:w,onClickConnectEnd:_,nodesDraggable:et,nodesConnectable:ft,nodesFocusable:st,edgesFocusable:Kt,edgesUpdatable:gn,elementsSelectable:un,elevateNodesOnSelect:Yl,minZoom:oe,maxZoom:de,nodeExtent:Ye,onNodesChange:ra,onEdgesChange:ds,snapToGrid:Ae,snapGrid:ye,connectionMode:W,translateExtent:Se,connectOnClick:hs,defaultEdgeOptions:Fa,fitView:Ko,fitViewOptions:$a,onNodesDelete:$,onEdgesDelete:L,onNodeDragStart:k,onNodeDrag:M,onNodeDragStop:j,onSelectionDrag:D,onSelectionDragStart:G,onSelectionDragStop:H,noPanClassName:oa,nodeOrigin:Ge,rfId:Wn,autoPanOnConnect:el,autoPanOnNodeDrag:dr,onError:tl,connectionRadius:Xl,isValidConnection:ic,nodeDragThreshold:qe}),J.createElement(eIe,{onSelectionChange:V}),Vt,J.createElement(Rje,{proOptions:Di,position:Zs}),J.createElement(sIe,{rfId:Wn,disableKeyboardA11y:li})))});pDe.displayName="ReactFlow";const ere=b.memo(({data:e})=>{var o,i,a,s,l,u;const t=e.graphVariant,n=(o=e.taskRun)!=null&&o.startedAt?new Date(e.taskRun.startedAt).getTime():0,r=(i=e.taskRun)!=null&&i.finishedAt?new Date(e.taskRun.finishedAt).getTime():0;return v.jsxs("div",{className:"flex min-w-fit grow flex-col justify-start",children:[(t=="default"||t=="input_only")&&v.jsx(ay,{type:"target",position:$t.Left,style:{visibility:"hidden"},isConnectable:!1}),v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{children:v.jsxs("div",{className:je("step-run-card mb-1 w-full rounded-sm px-2 py-3 font-mono text-xs font-semibold text-[#050c1c] shadow-md dark:text-[#ffffff]","transition-all duration-300 ease-in-out","cursor-pointer","flex flex-row items-center justify-between gap-4 border-2 dark:border-[1px]","bg-[#ffffff] dark:bg-[#050c1c]","opacity-80 hover:opacity-100","h-[30px]"),onClick:()=>e.onClick(),children:[((a=e.taskRun)==null?void 0:a.status)==qt.RUNNING&&v.jsx("span",{className:"spark mask-gradient absolute inset-0 h-[100%] w-[100%] animate-flip overflow-hidden [mask:linear-gradient(#ccc,_transparent_50%)] before:absolute before:aspect-square before:w-[200%] before:rotate-[-90deg] before:animate-rotate before:bg-[conic-gradient(from_0deg,transparent_0_340deg,#ccc_360deg)] before:content-[''] before:[inset:0_auto_auto_50%] before:[translate:-50%_-15%]"}),v.jsx("span",{className:"step-run-backdrop absolute inset-[1px] bg-background transition-colors duration-200"}),v.jsxs("div",{className:"z-10 flex w-full flex-row items-center justify-between gap-4",children:[v.jsxs("div",{className:"z-10 flex flex-row items-center justify-start gap-2",children:[v.jsx(_J,{status:(s=e.taskRun)==null?void 0:s.status,isSkipped:e.isSkipped}),v.jsx("div",{className:"max-w-[160px] flex-grow truncate",children:e.taskName})]}),((l=e.taskRun)==null?void 0:l.finishedAt)&&((u=e.taskRun)==null?void 0:u.startedAt)&&v.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:gY(r-n)})]}),(t=="default"||t=="output_only")&&v.jsx(ay,{type:"source",position:$t.Right,style:{visibility:"hidden"},isConnectable:!1})]})}),v.jsx(Us,{children:e.taskName})]})})]})}),Aet=({onClick:e})=>{const{shape:t,taskRuns:n,taskEvents:r,isLoading:o,isError:i}=jAe(),a=b.useMemo(()=>{const u=new Set;for(const c of r)c.eventType===An.SKIPPED&&u.add(c.taskId);return u},[r]),s=b.useMemo(()=>!t||!n?[]:t.map(u=>{const c=u.stepId??"placeholder",d=(u==null?void 0:u.childrenStepIds)||[],h=t.filter(p=>c&&p.childrenStepIds.includes(c)).map(p=>p.stepId);return{node:c,children:d,parents:h}}),[t,n]),l=b.useMemo(()=>{const u=[],c=new Set,d=(x,y)=>{u[y]||(u[y]=[]),u[y].push(x),c.add(x.stepId)},h=x=>{if(c.has(x.stepId))return;const y=s.find(w=>w.node==x.stepId);if(!y||y.parents.length===0)d(x,0);else{const w=Math.max(...y.parents.map(_=>{const C=t.find(O=>O.stepId===_);return C?u.findIndex(O=>O.includes(C)):-1}));w>-1&&d(x,w+1)}};let p=100;for(;c.sizev.jsx("div",{className:"flex h-full min-w-fit grow flex-col justify-start",children:u.map(d=>{const h=n.find(p=>p.metadata.id===d.taskExternalId);return v.jsx(ere,{data:{taskRun:h,graphVariant:"none",onClick:()=>e(h==null?void 0:h.metadata.id),childWorkflowsCount:(h==null?void 0:h.numSpawnedChildren)||0,taskName:d.taskName,isSkipped:h?a.has(h.metadata.id):!1}},d.stepId)})},c))})},mDe=({taskRunId:e})=>{const{refetchInterval:t}=vf(),n=In({...io.v1Tasks.get(e),refetchInterval:t});return{taskRun:n.data,isLoading:n.isLoading,isError:n.isError}},gDe=({onClick:e,taskRunId:t})=>{const{taskRun:n,isLoading:r,isError:o}=mDe({taskRunId:t}),{isSkipped:i}=m$({taskRunId:t,limit:1});return r||o||!n?null:v.jsx("div",{className:"relative flex flex-1 flex-row gap-1 rounded-sm p-4",children:v.jsx("div",{className:"flex h-fit w-full grow flex-col justify-start",children:v.jsx(ere,{data:{taskRun:n,graphVariant:"none",onClick:()=>e(n.metadata.id),childWorkflowsCount:n.numSpawnedChildren,taskName:n.displayName,isSkipped:i}})})})};function vDe(e){switch(e){case An.FAILED:case An.RATE_LIMIT_ERROR:case An.SCHEDULING_TIMED_OUT:case An.TIMED_OUT:case An.CANCELLED:return oE.CRITICAL;case An.REASSIGNED:case An.REQUEUED_NO_WORKER:case An.REQUEUED_RATE_LIMIT:case An.RETRIED_BY_USER:case An.RETRYING:case An.DURABLE_RESTORING:return oE.WARNING;case An.DURABLE_EVICTED:return"EVICTION";default:return oE.INFO}}function yDe(e){switch(e){case An.ASSIGNED:return"Assigned to worker";case An.STARTED:return"Started";case An.FINISHED:return"Completed";case An.FAILED:return"Failed";case An.CANCELLED:return"Cancelled";case An.RETRYING:return"Retrying";case An.REQUEUED_NO_WORKER:return"Requeuing (no worker available)";case An.REQUEUED_RATE_LIMIT:return"Requeuing (rate limit)";case An.SCHEDULING_TIMED_OUT:return"Scheduling timed out";case An.TIMEOUT_REFRESHED:return"Timeout refreshed";case An.REASSIGNED:return"Reassigned";case An.TIMED_OUT:return"Execution timed out";case An.SLOT_RELEASED:return"Slot released";case An.RETRIED_BY_USER:return"Replayed by user";case An.ACKNOWLEDGED:return"Acknowledged by worker";case An.CREATED:return"Created";case An.RATE_LIMIT_ERROR:return"Rate limit error";case An.SENT_TO_WORKER:return"Sent to worker";case An.QUEUED:return"Queued";case An.SKIPPED:return"Skipped";case An.COULD_NOT_SEND_TO_WORKER:return"Could not send to worker";case An.DURABLE_EVICTED:return"Durable task evicted";case An.DURABLE_RESTORING:return"Durable task restoring";case void 0:return"Unknown";default:const t=e;throw new Error(`Unhandled case: ${t}`)}}const sB={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",90:"grey"},lB={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"};function wDe(e){let t=null,n=null,r="",o=[];const i=[];let a={};for(let s=0;s{const o=bDe(n);return o?v.jsx("span",{style:o,children:n.text},r):n.text})})}function _De(e){return!!e&&Object.keys(e).length>0}function EDe(e){return JSON.stringify(e,null,2)}const CDe={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},ODe=e=>{if(e=="EVICTION_NOTICE")return{bg:"bg-indigo-500/20",text:"text-indigo-800 dark:text-indigo-300",dot:"bg-indigo-500",content:"info"};if(e=="RESTORE_NOTICE")return{bg:"bg-indigo-500/20",text:"text-indigo-800 dark:text-indigo-300",dot:"bg-indigo-500",content:"info"};switch(e){case Xi.ERROR:return{bg:"bg-red-500/10",text:"text-red-600 dark:text-red-400",dot:"bg-red-500",content:"error"};case Xi.WARN:return{bg:"bg-yellow-500/10",text:"text-yellow-600 dark:text-yellow-400",dot:"bg-yellow-500",content:"warn"};case Xi.INFO:return{bg:"bg-green-500/10",text:"text-green-600 dark:text-green-400",dot:"bg-green-500",content:"info"};case Xi.DEBUG:return{bg:"bg-gray-500/10",text:"text-gray-500 dark:text-gray-400",dot:"bg-gray-500",content:"debug"};default:const t=e;throw new Error(`Unhandled log level: ${t}`)}},RDe=e=>new Date(e).toLocaleString("sv",CDe).replace(",",".");function PDe(e,t){if(t)return t;switch(e){case qt.COMPLETED:return"Task completed with no logs.";case qt.FAILED:return"Task failed with no logs.";case qt.CANCELLED:return"Task was cancelled with no logs.";case qt.RUNNING:case qt.QUEUED:return"Waiting for logs...";default:return"No logs available."}}const TDe=({level:e})=>{const t=ODe(e);return v.jsxs("span",{className:je("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-[11px] font-medium leading-none uppercase tracking-wide",t.bg,t.text),children:[v.jsx("span",{className:je("size-1.5 rounded-full",t.dot)}),t.content]})};function ADe(e){return e!=null}function kDe({error:e}){return v.jsxs(Wy,{children:[v.jsx(Hy,{onClick:t=>t.stopPropagation(),className:"ml-2 shrink-0 inline-flex items-center rounded border border-red-500/30 px-1.5 py-0.5 font-mono text-[10px] text-red-500 dark:text-red-400 hover:border-red-500/60 hover:bg-red-500/5 transition-colors cursor-pointer",children:"View Error"}),v.jsx(wm,{className:"w-[300px] max-w-[90vw] border-border bg-popover p-0 shadow-lg sm:w-[400px] md:w-[500px] lg:w-[600px]",align:"start",children:v.jsx("div",{className:"w-[300px] max-w-[90vw] p-4 sm:w-[400px] md:w-[500px] lg:w-[600px]",children:v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center gap-2 border-b border-border pb-2",children:[v.jsx(O1e,{className:"h-5 w-5 text-destructive"}),v.jsx("h3",{className:"font-medium text-foreground",children:"Error Details"})]}),v.jsx("div",{className:"h-[400px] overflow-hidden rounded-md border border-border bg-muted/50",children:v.jsx("div",{className:"scrollbar-thin scrollbar-track-muted scrollbar-thumb-muted-foreground h-full overflow-x-hidden overflow-y-scroll p-4 font-mono text-sm text-foreground",children:v.jsx("pre",{className:"min-h-[500px] whitespace-pre-wrap break-words",children:e||"No error message found"})})})]})})})]})}function NDe({metadata:e}){const t=EDe(e);return v.jsxs(Wy,{children:[v.jsxs(Hy,{onClick:n=>n.stopPropagation(),className:"ml-2 shrink-0 inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground transition-colors hover:border-foreground/40 hover:bg-muted hover:text-foreground",children:[v.jsx("span",{"aria-hidden":"true",children:"{}"}),"Fields"]}),v.jsx(wm,{className:"w-[320px] max-w-[90vw] border-border bg-popover p-0 text-left shadow-lg sm:w-[460px] md:w-[560px] lg:w-[680px]",align:"start",children:v.jsxs("div",{className:"space-y-3 p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 border-b border-border pb-2",children:[v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:"{}"}),v.jsx("h3",{className:"font-medium text-foreground",children:"Log Fields"})]}),v.jsx("div",{className:"max-h-[420px] overflow-auto rounded-md border border-border bg-muted/50",children:b.createElement("pre",{className:"m-0 whitespace-pre-wrap break-words p-4 text-left font-mono text-xs leading-relaxed text-foreground"},t)})]})})]})}function tre({logs:e,onScrollToBottom:t,onScrollToTop:n,onAtTopChange:r,isLoading:o,taskStatus:i,onViewRun:a,emptyMessage:s,showAttempt:l=!0,showTaskName:u=!1}){const[c,d]=b.useState(!0),h=b.useRef(null),p=b.useRef(0),x=b.useRef(!0),y=b.useRef(!1),w=b.useRef(!1),[_,C]=b.useState(),O=b.useMemo(()=>e.length===0?[]:[...e].sort((V,G)=>!V.timestamp||!G.timestamp?0:new Date(G.timestamp).getTime()-new Date(V.timestamp).getTime()),[e]),{hasInstance:P,hasAttempt:R}=b.useMemo(()=>{let V=!1,G=!1;for(const D of O)if(D.instance&&(V=!0),l&&D.attempt!==void 0&&(G=!0),V&&G)break;return{hasInstance:V,hasAttempt:G}},[O,l]),T=b.useCallback(()=>{const V=h.current;if(!V)return;const{scrollTop:G,scrollHeight:D,clientHeight:H}=V,U=D-H;if(U<=0)return;const Y=G/U,q=Gp.current,K=Y<.05;r&&K!==x.current&&(x.current=K,r(K));const z=q&&Y<.3;z&&!y.current&&n&&n(),y.current=z;const X=W&&Y>.7;X&&!w.current&&t&&t(),w.current=X,p.current=G},[n,t,r]),k=i===qt.RUNNING,M="flex-1 min-h-0",j=["auto","72px",P&&"minmax(100px, 200px)",R&&"auto",u&&"minmax(100px, 200px)","minmax(0, 1fr)"].filter(Boolean).join(" ");if(o)return v.jsx("div",{className:je(M,"rounded-lg border bg-background flex items-center justify-center"),children:v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading logs..."})});if(e.length===0)return v.jsx("div",{className:je(M,"rounded-lg border bg-background flex items-center justify-center"),children:v.jsx("span",{className:"text-sm text-muted-foreground",children:PDe(i,s)})});const L=3+(P?1:0)+(R?1:0)+(u?1:0);return v.jsxs("div",{className:"relative rounded-lg border bg-background overflow-hidden flex flex-col flex-1 min-h-0",children:[k&&v.jsxs("div",{className:"absolute top-2 right-4 z-20 flex items-center gap-2 text-xs text-muted-foreground bg-background/80 px-2 py-1 rounded-md",children:[v.jsxs("span",{className:"relative flex h-2 w-2",children:[v.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),v.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),v.jsx("span",{children:"Live"})]}),v.jsxs("div",{className:je("grid overflow-y-auto",M),style:{gridTemplateColumns:j,alignContent:"start"},ref:h,onScroll:T,children:[v.jsxs("div",{className:"col-span-full grid grid-cols-subgrid sticky top-0 z-10 bg-gradient-to-b from-background/95 to-background/0 from-75%",style:{gridColumn:`1 / span ${L}`},children:[v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>d(V=>!V),children:"Timestamp"}),v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Level"}),P&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Instance"}),R&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Attempt"}),u&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Task"}),v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Message"})]}),O.filter(V=>ADe(V.line)).map((V,G)=>v.jsxs("div",{className:"col-span-full items-baseline grid grid-cols-subgrid border-b border-border/40 hover:bg-muted/30 transition-colors group",style:{gridColumn:`1 / span ${L}`},children:[v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground whitespace-nowrap tabular-nums",children:V.timestamp?c?v.jsx(Ml,{date:V.timestamp}):RDe(V.timestamp):"—"}),v.jsx("div",{className:"px-3 py-1.5 flex items-center",children:V.level?v.jsx(TDe,{level:V.level}):v.jsx("span",{className:"text-xs text-muted-foreground/50",children:"—"})}),P&&v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground truncate",children:V.instance||"—"}),R&&v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground text-center tabular-nums",children:V.attempt??"—"}),u&&v.jsx("div",{className:je("px-3 py-1.5 font-mono text-xs text-muted-foreground truncate",a&&V.taskExternalId&&"cursor-pointer hover:text-foreground hover:underline"),onClick:a&&V.taskExternalId?()=>a(V.taskExternalId):void 0,children:V.taskDisplayName||"—"}),v.jsxs("div",{className:je("px-3 py-1.5 font-mono text-xs text-foreground flex flex-row items-baseline gap-x-1 min-w-0"),onClick:()=>{C(D=>D===G?void 0:G)},onMouseEnter:D=>{const H=D.currentTarget;H.scrollWidth>H.clientWidth?H.style.cursor="pointer":H.style.cursor="default"},children:[v.jsx("span",{className:je("min-w-0",_===G?"whitespace-normal break-words":"truncate",V.linkTo&&_!==G&&"max-w-[calc(100%-1rem)]"),children:v.jsx(SDe,{text:V.line})}),_De(V.metadata)&&v.jsx(NDe,{metadata:V.metadata}),V.error&&v.jsx(kDe,{error:V.error}),V.linkTo&&v.jsx(Ll,{children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsx(Bl,{to:V.linkTo.destination,params:V.linkTo.params,className:"ml-1 shrink-0 text-muted-foreground hover:text-foreground transition-colors",onClick:D=>{D.stopPropagation()},children:v.jsx(j1e,{className:"size-3"})})}),v.jsx(Us,{children:V.linkTo.hoverText})]})})]})]},`${V.timestamp}-${V.instance??""}-${V.attempt??""}`))]})]})}const MDe=1e3;function jDe({taskRunId:e,workflowRunId:t,isDurable:n,durableTaskIds:r}){const o=!e&&!!t||!!e&&!!t&&e!==t,{tenantId:i}=Ma(),{refetchInterval:a}=vf(),{open:s}=Pm(),l=b.useRef(!1),u=In({...io.v1TaskEvents.list(i,{limit:50,offset:0},e,t),refetchInterval:a}),c=tpe({queries:[...r??[],...e?[e]:[]].map(p=>({...io.v1DurableTasks.eventLog(i,p),refetchInterval:5e3}))}),d=b.useMemo(()=>{var y;const p=DDe(((y=u.data)==null?void 0:y.rows)??[],o,i),x=c.flatMap(w=>VDe(w.data??[]));return IDe(p,x)},[u.data,o,i,c]),h=b.useCallback(p=>{l.current||(l.current=!0,s({type:"task-run-details",content:{taskRunId:p,defaultOpenTab:H$.Activity,showViewTaskRunButton:!0}}),setTimeout(()=>{l.current=!1},100))},[s]);return u.isLoading?v.jsx(gb,{}):v.jsx("div",{className:"flex flex-1 min-h-0 flex-col",children:v.jsx(tre,{logs:d,emptyMessage:"No events found.",showTaskName:o,onViewRun:p=>{p&&h(p)}})})}function IDe(e,t){const n=[...e,...t];return n.sort((r,o)=>r.timestamp?o.timestamp?r.timestampo.timestamp?1:0:1:-1),n}function DDe(e,t,n){return e.map(r=>{const o=vDe(r.eventType);let i;if(r.eventType==="DURABLE_EVICTED")i="EVICTION_NOTICE";else if(r.eventType==="DURABLE_RESTORING")i="RESTORE_NOTICE";else switch(o){case"CRITICAL":i=Xi.ERROR;break;case"WARNING":i=Xi.WARN;break;case"INFO":i=Xi.INFO;break;default:i=Xi.DEBUG;break}let a=yDe(r.eventType);r.message&&(a+=`: ${r.message}`);const s=r.workerId&&r.workerId!==vY?{destination:At.tenantWorkerRoute.to,params:{tenant:n,worker:r.workerId},hoverText:"View worker"}:void 0;return{timestamp:r.timestamp,level:i,line:a,taskDisplayName:r.taskDisplayName,taskExternalId:r.taskId,error:r.errorMessage,linkTo:s}})}const sy=3;function LDe(e){return e===0?"0s":e%36e5===0?`${e/36e5}h`:e%6e4===0?`${e/6e4}m`:e%1e3===0?`${e/1e3}s`:`${e}ms`}function uB(e){switch(e.kind){case Vu.SLEEP:return e.sleepDurationMs!=null?`sleeping for ${LDe(e.sleepDurationMs)}`:"sleeping";case Vu.USER_EVENT:return e.eventKey?`waiting for event ${e.eventKey}`:"waiting for event";case Vu.CHILD_WORKFLOW:return e.workflowName?`waiting for child ${e.workflowName} to complete`:"waiting for child to complete";default:return String(e.kind??"unknown").toLowerCase()}}function $De(e){switch(e.kind){case Vu.SLEEP:return"sleep completed";case Vu.USER_EVENT:return e.eventKey?`received event ${e.eventKey}`:"event received";case Vu.CHILD_WORKFLOW:return e.workflowName?`child ${e.workflowName} completed`:"child completed";default:return"completed"}}function cB(e){if(e.or&&e.or.length>0){const t=e.or.slice(0,sy).map(uB),n=e.or.length-sy;return n>0&&t.push(`${n} more`),`any of: ${t.join(", ")}`}return e.kind?uB(e):"waiting"}function FDe(e){if(e.length===0)return"waiting";if(e.length===1)return cB(e[0]);const t=e.slice(0,sy).map(cB),n=e.length-sy;return n>0?`${t.join(", ")}, and ${n} more`:`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function BDe(e){if(e.length===0)return"completed";if(e.length===1){const t=e[0];return t.or&&t.or.length>0?"condition satisfied":$De(t)}return"all conditions satisfied"}function P_(e,t){const n=e.kind===zy.WAIT_FOR?"durable wait":"durable run",r=e.branchId>1?` b${e.branchId}`:"";return`[${n}${r}] ${t}`}function nre(e){var n,r,o;const t=(n=e.userMessage)==null?void 0:n.trim();if(e.kind===zy.RUN){const i=(r=e.waitData)==null?void 0:r[0];return((o=e.waitData)==null?void 0:o.length)===1&&!(i!=null&&i.or)&&(i==null?void 0:i.kind)===Vu.CHILD_WORKFLOW?i.workflowName?`spawned child ${i.workflowName}`:"spawned child":t||"spawned child"}return t||(e.waitData&&e.waitData.length>0?FDe(e.waitData):"waiting")}function rre(e){var t,n;if(e.kind===zy.RUN){const r=(t=e.waitData)==null?void 0:t[0];return((n=e.waitData)==null?void 0:n.length)===1&&!(r!=null&&r.or)&&(r==null?void 0:r.kind)===Vu.CHILD_WORKFLOW?r.workflowName?`child ${r.workflowName} completed`:"child completed":"completed"}return e.waitData&&e.waitData.length>0?BDe(e.waitData):"completed"}function zDe(e){const t=[];let n=null;for(const r of e)if(r.kind===zy.RUN){if(n){const o=n.entries[n.entries.length-1];if(new Date(r.insertedAt).getTime()-new Date(o.insertedAt).getTime()<=MDe){n.entries.push(r);continue}t.push(n)}n={entries:[r]}}else n&&(t.push(n),n=null),t.push(r);return n&&t.push(n),t}function ore(e){return e.map(t=>{var r,o;const n=(r=t.waitData)==null?void 0:r[0];return((o=t.waitData)==null?void 0:o.length)===1&&!(n!=null&&n.or)&&(n==null?void 0:n.kind)===Vu.CHILD_WORKFLOW?n.workflowName??null:null})}function qDe(e){if(e.length===1)return nre(e[0]);const t=ore(e);if(t.every(i=>i===t[0])&&t[0]!==null)return`spawned ${e.length}x ${t[0]} children`;const r=t.slice(0,sy).map(i=>i??"unknown"),o=t.length-sy;return o>0?`spawned children: ${r.join(", ")}, and ${o} more`:`spawned children: ${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`}function UDe(e){if(e.length===1)return rre(e[0]);const t=ore(e);return t.every(r=>r===t[0])&&t[0]!==null?`${e.length}x ${t[0]} children completed`:"children completed"}function VDe(e){const t=[],n=e.filter(o=>o.kind!==zy.MEMO),r=zDe(n);for(const o of r)if("entries"in o){const{entries:i}=o,a=i[0];t.push({timestamp:a.insertedAt,level:"EVICTION_NOTICE",line:P_(a,qDe(i)),taskDisplayName:a.taskDisplayName,taskExternalId:a.taskExternalId});const s=i.filter(l=>l.isSatisfied&&l.satisfiedAt);if(s.length>0){const l=s.reduce((u,c)=>c.satisfiedAt>u?c.satisfiedAt:u,s[0].satisfiedAt);t.push({timestamp:l,level:Xi.INFO,line:P_(a,UDe(i)),taskDisplayName:a.taskDisplayName,taskExternalId:a.taskExternalId})}}else t.push({timestamp:o.insertedAt,level:"EVICTION_NOTICE",line:P_(o,nre(o)),taskDisplayName:o.taskDisplayName,taskExternalId:o.taskExternalId}),o.isSatisfied&&o.satisfiedAt&&t.push({timestamp:o.satisfiedAt,level:Xi.INFO,line:P_(o,rre(o)),taskDisplayName:o.taskDisplayName,taskExternalId:o.taskExternalId});return t}function Ro(e,t={}){const{unit:n="ms",precise:r=!1}=t,o=n==="ns"?e/1e6:e;if(r){if(n==="ns"&&o<1){const u=e/1e3;return u<1?"<1µs":`${Math.round(u)}µs`}if(o<1)return"<1ms";if(o<1e3)return`${Math.round(o)}ms`;if(o<6e4)return`${(o/1e3).toFixed(2)}s`;const s=Math.floor(o/6e4),l=(o%6e4/1e3).toFixed(1);return`${s}m ${l}s`}if(o<=0)return"0s";if(o<1)return"<1ms";if(o<1e3)return`${Math.round(o)}ms`;if(o<6e4)return`${(o/1e3).toFixed(1)}s`;const i=Math.floor(o/6e4),a=Math.floor(o%6e4/1e3);return a>0?`${i}m${a}s`:`${i}m`}function ire(e,t){const n=new Date(e),r=(a,s=2)=>String(a).padStart(s,"0"),o=`${n.getUTCFullYear()}-${r(n.getUTCMonth()+1)}-${r(n.getUTCDate())}`,i=`${r(n.getUTCHours())}:${r(n.getUTCMinutes())}:${r(n.getUTCSeconds())}`;return t!=null&&t.ms?`${o} ${i}.${r(n.getUTCMilliseconds(),3)} UTC`:`${o} ${i} UTC`}function are({ticks:e,totalMs:t,offsetMs:n=0}){return v.jsxs("div",{className:"relative h-5 overflow-hidden",children:[e.map(r=>r>=t||r/t>.85?null:v.jsx("div",{className:"absolute flex h-full items-center",style:{left:`${t>0?r/t*100:0}%`},children:v.jsx("span",{className:"whitespace-nowrap font-mono text-xs uppercase tracking-wider text-muted-foreground",children:Ro(r+n)})},r)),v.jsx("div",{className:"absolute right-0 z-10 flex h-full items-center",children:v.jsx("span",{className:"whitespace-nowrap rounded-sm bg-background px-1 font-mono text-xs uppercase tracking-wider text-muted-foreground",children:Ro(t+n)})})]})}const Mi={START_STEP_RUN:"hatchet.start_step_run",ENGINE_START_STEP_RUN:"hatchet.engine.start_step_run",ENGINE_QUEUED:"hatchet.engine.queued",ENGINE_WORKFLOW_RUN:"hatchet.engine.workflow_run",ENGINE_EVENT:"hatchet.engine.event",RUN_WORKFLOW:"hatchet.run_workflow",START_WORKFLOW:"hatchet.start_workflow"},ki={STEP_RUN_ID:"hatchet.step_run_id",STEP_NAME:"hatchet.step_name",SPAN_SOURCE:"hatchet.span_source",ACTION_ID:"hatchet.action_id",WORKFLOW_NAME:"hatchet.workflow_name",WORKFLOW_RUN_ID:"hatchet.workflow_run_id",INSTRUMENTOR:"instrumentor",CHILD_WORKFLOW_RUN_ID:"hatchet.child_workflow_run_id"};function Qu(e){var t;return(t=e.spanAttributes)==null?void 0:t[ki.STEP_RUN_ID]}function sre(e){var t;return((t=e.spanAttributes)==null?void 0:t[ki.SPAN_SOURCE])==="engine"}function Xy(e){return e.spanName===Mi.START_STEP_RUN||e.spanName===Mi.ENGINE_START_STEP_RUN}function xb(e,t){let n=0;for(let r=0;r0&&xb(e,n=>t.has(n.spanId))}function ure(e){const t=new Map;for(const n of e)n.parentSpanId&&t.set(n.parentSpanId,(t.get(n.parentSpanId)??0)+1);return t}function cre(e,t){let n=Date.now();for(const r of e){const o=new Date(r.createdAt).getTime();oa.spanId===i.spanId)||r.children.push(i);n.add(o.spanId)}lre(e,n);for(const r of e)fre(r.children)}function dre(e){const t=new Map;for(const n of e){const r=Qu(n);n.spanName===Mi.ENGINE_QUEUED&&r&&t.set(r,n)}if(t.size>0){const n=new Set;for(const r of e)if(Xy(r)){const o=Qu(r);o&&t.has(o)&&(r.queuedPhase=t.get(o),n.add(r.queuedPhase.spanId))}lre(e,n)}for(const n of e)dre(n.children)}function hre(e){var n,r;const t=new Map;for(const o of e)if(o.spanName===Mi.RUN_WORKFLOW){const i=(n=o.spanAttributes)==null?void 0:n[ki.CHILD_WORKFLOW_RUN_ID];i&&t.set(i,o)}if(t.size>0){const o=new Set;for(const i of e){if(i.spanName!==Mi.ENGINE_WORKFLOW_RUN)continue;const a=(r=i.spanAttributes)==null?void 0:r[ki.WORKFLOW_RUN_ID];if(!a)continue;const s=t.get(a);s&&(s.children.push(i),o.add(i.spanId))}o.size>0&&xb(e,i=>o.has(i.spanId))}for(const o of e)hre(o.children)}function pre(e){xb(e,t=>t.spanName===Mi.ENGINE_QUEUED);for(const t of e)pre(t.children)}function mre(e,t){const n=new Set;for(const i of e)if(Xy(i)){const a=Qu(i);a&&n.add(a)}const r=ure(e);let o=0;for(let i=0;i{const i=new Set;for(const a of o){if(!a.parentSpanId)continue;const s=Qu(a);if(!s)continue;const l=t.get(s);l&&l.spanId!==a.spanId&&!n.has(l.spanId)&&(l.children.push(a),i.add(a.spanId))}i.size>0&&xb(o,a=>i.has(a.spanId));for(const a of o)n.add(a.spanId),r(a.children),n.delete(a.spanId)};r(e)}function HDe(e,t){if(e.length<=1)return;const n=ure(e);xb(e,r=>{if(!r.parentSpanId||t.has(r.parentSpanId))return!1;const o=(n.get(r.parentSpanId)??0)<=1,i=r.spanName===Mi.RUN_WORKFLOW;return o||i})}function vre(e,t){for(const n of e){const r=Qu(n);r&&t.add(r),vre(n.children,t)}}function GDe(e,t){const n=new Set;for(const o of t)o.status==="RUNNING"&&n.add(o.externalId);if(n.size===0)return;const r=o=>{for(const i of o){if(Xy(i)&&sre(i)){const a=Qu(i);a&&n.has(a)&&(i.inProgress=!0)}r(i.children)}};r(e)}const KDe=new Date("2020-01-01").getTime();function YDe(e){return{[ki.SPAN_SOURCE]:"engine",[ki.STEP_RUN_ID]:e.externalId,[ki.STEP_NAME]:e.displayName}}function yre(e,t,n){const r=new Set;vre(e,r);for(const o of t){if(r.has(o.externalId)||o.status!=="QUEUED"&&o.status!=="RUNNING")continue;const i=new Date(o.createdAt).getTime();if(!i||i{const r=(t.queuedPhase??t).createdAt,o=(n.queuedPhase??n).createdAt;return ro?1:0});for(const t of e)t.children.length>1&&wre(t.children)}function pC(e,t){const n=new Date(t.createdAt).getTime();if(Number.isNaN(n))return;let r;if(t.startedAt){const i=new Date(t.startedAt).getTime();if(!Number.isNaN(i)&&i>=n)r=i;else{const a=new Date(e.createdAt).getTime();r=Number.isNaN(a)?Date.now():a}}else{const i=new Date(e.createdAt).getTime();r=Number.isNaN(i)?Date.now():i}const o=r-n;o<=0||(e.queuedPhase={spanId:"__synthetic_workflow_queued__",parentSpanId:e.spanId,spanName:Mi.ENGINE_QUEUED,statusCode:Lr.OK,durationNs:o*1e6,createdAt:t.createdAt,spanAttributes:{[ki.SPAN_SOURCE]:"engine"},children:[]})}function Xw(e){let t=!1,n=!1;for(const r of e.children)Xw(r)&&(n=!0),r.hasErrorInSubtree&&(t=!0);return e.hasErrorInSubtree=e.statusCode===Lr.ERROR||t,e.inProgress===!0||n}function XDe(e){const t=new Map;for(const r of e)t.set(r.spanId,{spanId:r.spanId,parentSpanId:r.parentSpanId,spanName:r.spanName,statusCode:r.statusCode,statusMessage:r.statusMessage,durationNs:r.durationNs,createdAt:r.createdAt,spanAttributes:r.spanAttributes,children:[]});const n=[];for(const r of e){const o=t.get(r.spanId);if(r.parentSpanId&&r.parentSpanId!==r.spanId){const i=t.get(r.parentSpanId);i?i.children.push(o):n.push(o)}else n.push(o)}return Cr(n.length>0),{rootSpans:n,spanMap:t}}function xre(e,t){if(e.length<=1){t&&e.length>0&&pC(e[0],t);for(const l of e)Xw(l)&&(l.inProgress=!0);return e}let n=1/0,r=-1/0;for(const l of e){const u=new Date(l.createdAt).getTime();ur&&(r=c)}const o=e.some(l=>l.statusCode===Lr.ERROR),i=e.map(l=>{var u;return(u=l.spanAttributes)==null?void 0:u[ki.ACTION_ID]}).find(l=>l==null?void 0:l.includes(":")),a=i?i.split(":")[0]:void 0,s=cre(e,{statusCode:o?Lr.ERROR:Lr.OK,durationNs:(r-n)*1e6,createdAt:new Date(n).toISOString(),spanAttributes:{[ki.INSTRUMENTOR]:"hatchet",...a&&{[ki.WORKFLOW_NAME]:a}}});return t&&pC(s,t),Xw(s)&&(s.inProgress=!0),[s]}function bA(e){return e.spanName===Mi.ENGINE_WORKFLOW_RUN||e.spanName===Mi.ENGINE_EVENT}function QDe(e){if(e.durationNs>0||e.children.length===0)return;const t=new Date(e.createdAt).getTime();let n=t;for(const r of e.children){if(r.durationNs<=0)continue;const i=new Date(r.createdAt).getTime()+r.durationNs/1e6;i>n&&(n=i)}n>t&&(e.durationNs=(n-t)*1e6)}function ZDe(e,t){if(e.some(bA)||e.length<=1){if(t&&e.length>0){const r=e.find(bA)??e[0];pC(r,t)}for(const r of e)bA(r)&&QDe(r),Xw(r)&&(r.inProgress=!0);return e}return xre(e,t)}function JDe(e,t){const n=[];if(e!=null&&e.length&&yre(n,e,void 0),n.length===0){if(t){const r=cre([],{createdAt:new Date().toISOString()});if(pC(r,t),r.queuedPhase)return Xw(r),[r]}return[]}return xre(n,t)}const dB=(e,t,n,r)=>{if(!e)return JDe(t,n);const o=(r==null?void 0:r.enableTraceInProgressSynthesis)??!0,{rootSpans:i,spanMap:a}=XDe(e);if(fre(i),dre(i),hre(i),o?mre(i,a):pre(i),WDe(i),HDe(i,a),t!=null&&t.length){const s=i.length===1?i[0].spanId:void 0,l=i.length===1?i[0].children:i;yre(l,t,s),GDe(l,t)}return wre(i),ZDe(i,n)};function bre(e,t){var n;for(const r of e){if(Qu(r)===t||r.spanName===Mi.ENGINE_WORKFLOW_RUN&&((n=r.spanAttributes)==null?void 0:n[ki.WORKFLOW_RUN_ID])===t)return r;const o=bre(r.children,t);if(o)return o}}function Yd(e){return e.hasErrorInSubtree!==void 0?e.hasErrorInSubtree:e.statusCode===Lr.ERROR?!0:e.children.some(Yd)}function bb(e){var t;return((t=e.spanAttributes)==null?void 0:t["hatchet.span_source"])==="engine"}function e5e(e){const t=[...e];let n=0,r=!1;for(;t.length>0;){const o=t.pop();if(t.push(...o.children),!o.spanId.startsWith("__synthetic_")){if(n++,!bb(o))return!1;o.statusCode===Lr.OK&&(r=!0)}}return n>0&&r}function js(e){return!e.spanId.startsWith("__synthetic_")||!e.queuedPhase?!1:!e.children.some(n=>n.inProgress)&&!e.inProgress}function Qw(e){return!!e.queuedPhase&&e.durationNs<=0&&!e.inProgress}function t5e(e){var t,n;return((t=e.spanAttributes)==null?void 0:t["hatchet.task_name"])??((n=e.spanAttributes)==null?void 0:n["hatchet.step_name"])}function $u(e){var t;return Xy(e)&&((t=e.spanAttributes)!=null&&t["hatchet.step_run_id"])?e.spanAttributes["hatchet.step_run_id"]:e.spanId}function L$(e){return e.inProgress||js(e)||Qw(e)?"bg-yellow-500":Yd(e)?"bg-red-500":"bg-green-500"}function n5e(e){return bb(e)&&e.spanName==="hatchet.engine.queued"}function Sre(e){switch(e){case Lr.OK:return"OK";case Lr.ERROR:return"Error";default:return"Unset"}}function r5e(e,t){return t?"Queued":e.inProgress?"In Progress":e.statusCode!==Lr.ERROR&&Yd(e)?"Error (child)":Sre(e.statusCode)}function o5e(e){return e.inProgress||js(e)||Qw(e)?"bg-yellow-500":bb(e)?e.statusCode===Lr.ERROR?"bg-red-500":"bg-green-500":Yd(e)?"bg-red-500":"bg-green-500"}const hB=5,i5e=20;function jD(e){return new Date(e.createdAt).getTime()}function pB(e,t){return jD(e)-jD(t)}function a5e(e){return e.matchesFilter??!0}function s5e(e){return e.isContextOnly??!1}const Qy=40,mC=12,ID=8,SA=50;function _re(e,t){if(e.length<=hB)return e.map(i=>({kind:"span",span:i}));const n=new Map;for(const i of e){const a=i.spanName;n.has(a)||n.set(a,[]),n.get(a).push(i)}const r=[],o=new Set;for(const i of e){const a=i.spanName,s=n.get(a);if(s.length<=hB)r.push({kind:"span",span:i});else if(!o.has(a)){o.add(a);const l=s.filter(p=>Yd(p)),u=s.filter(p=>!Yd(p));l.sort(pB),u.sort(pB);const c=[...l,...u];let d=1/0,h=-1/0;for(const p of c){const x=jD(p);d=Math.min(d,x),h=Math.max(h,x+p.durationNs/1e6)}r.push({kind:"group",group:{groupId:`__group_${t||"root"}_${a}`,groupName:a,spans:c,errorCount:l.length,totalCount:c.length,earliestStartMs:d,latestEndMs:h}})}}return r}function Ere(e,t,n,r=0,o=[],i){const a=[],s=_re(e,i);function l(u,c,d,h){const p=u.children.length>0,x=$u(u),y=t.has(x)&&p;a.push({kind:"span",rowKey:x,span:u,depth:c,isLastChild:d,connectorFlags:[...h],hasChildren:p,isExpanded:y,matchesFilter:a5e(u),isContextOnly:s5e(u)}),y&&a.push(...Ere(u.children,t,n,c+1,[...h,!d],u.spanId))}return s.forEach((u,c)=>{const d=c===s.length-1;if(u.kind==="span")l(u.span,r,d,o);else{const{group:h}=u,p=t.has(h.groupId);if(a.push({kind:"group",rowKey:h.groupId,group:h,depth:r,isLastChild:d,connectorFlags:[...o],isExpanded:p}),p){const x=n[h.groupId]??i5e,y=Math.min(x,h.spans.length),w=h.spans.slice(0,y),_=h.totalCount-y,C=[...o,!d];w.forEach((O,P)=>{const R=P===w.length-1&&_<=0;l(O,r+1,R,C)}),_>0&&a.push({kind:"show-more",rowKey:`${h.groupId}__show-more`,groupId:h.groupId,remaining:_,currentVisible:y,depth:r+1,connectorFlags:C})}}}),a}function l5e(e){const t=new Set;return(function n(r){for(const o of r)t.add(o.spanId),n(o.children)})(e.children),t}function $$({hovered:e,selected:t,childOfSelected:n}){return t?"bg-primary/10":e?"bg-muted/40":n?"bg-primary/5":""}function gC(e){if(e<=0)return{ticks:[0],maxTick:0};const t=[1,2,5,10,20,50,100,200,500,1e3,2e3,5e3,1e4,2e4,3e4,6e4,12e4,3e5,6e5],r=e/5;let o=t[t.length-1];for(const s of t)if(s>=r){o=s;break}const i=[];for(let s=0;s20));s+=o);const a=i[i.length-1]||0;return e-a>o*.3&&i.push(e),{ticks:i,maxTick:i[i.length-1]||e}}const u5e=30;function F$(e){const[t,n]=b.useState(Date.now);return b.useEffect(()=>{if(!e)return;n(Date.now());const r=setInterval(()=>n(Date.now()),u5e);return()=>clearInterval(r)},[e]),t}function c5e({activePct:e,totalMs:t}){return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/60",style:{left:`${e*100}%`}}),v.jsx("div",{className:"pointer-events-none absolute top-0.5 z-[7] whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",style:{left:`${e*100}%`,transform:e<.08?"none":e>.92?"translateX(-100%)":"translateX(-50%)"},children:Ro(t*e)})]})}function f5e({visibleRange:e,totalMs:t}){return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/70",style:{left:`${e.startPct*100}%`}}),v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/70",style:{left:`${e.endPct*100}%`}}),v.jsxs("div",{className:"pointer-events-none absolute z-[8] flex items-center",style:{left:`${e.startPct*100}%`,width:`${(e.endPct-e.startPct)*100}%`,top:"50%",transform:"translateY(-50%)"},children:[v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",children:Ro(t*e.startPct)}),v.jsxs("div",{className:"flex min-w-1 flex-1 items-center",children:[v.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",className:"shrink-0 fill-primary",children:v.jsx("path",{d:"M5 0L0 3L5 6Z"})}),v.jsx("div",{className:"h-px flex-1 bg-primary"})]}),v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-primary px-1.5 py-0.5 font-mono text-[10px] font-medium leading-tight text-primary-foreground",children:Ro(t*(e.endPct-e.startPct))}),v.jsxs("div",{className:"flex min-w-1 flex-1 items-center",children:[v.jsx("div",{className:"h-px flex-1 bg-primary"}),v.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",className:"shrink-0 fill-primary",children:v.jsx("path",{d:"M0 0L5 3L0 6Z"})})]}),v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",children:Ro(t*e.endPct)})]})]})}function d5e({marker:e,position:t}){return zs.createPortal(v.jsxs("div",{className:"z-50 overflow-hidden rounded-lg border border-border bg-popover py-1 shadow-lg",style:{position:"fixed",left:Math.min(t.x+12,window.innerWidth-220),top:t.y+16,minWidth:180,pointerEvents:"none"},children:[v.jsx("div",{className:"truncate px-3 py-1.5 font-mono text-xs text-foreground",children:e.spanName}),v.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[v.jsx("span",{className:je("size-2 shrink-0 rounded-full",L$(e.span))}),v.jsx("span",{className:"flex-1 font-mono text-xs text-muted-foreground",children:e.inProgress?"In Progress":e.hasErrorInTree?"Error":"OK"}),v.jsx("span",{className:"font-mono text-xs text-foreground",children:Ro(e.durationMs)})]})]}),document.body)}function h5e(e,t,n,r){const o=[],i=(a,s,l)=>{var p;if(js(a)||Qw(a))return;const u=new Date(a.createdAt).getTime(),c=n>0?(u-t)/n:0;o.push({pct:Math.max(0,Math.min(1,c)),statusCode:a.statusCode,hasErrorInTree:Yd(a),inProgress:!!a.inProgress,spanName:a.spanName,durationMs:a.durationNs/1e6,visible:s,span:a,ancestorSpanIds:l});const d=s&&(!r||r.has(a.spanId)),h=[...l,a.spanId];(p=a.children)==null||p.forEach(x=>i(x,d,h))};return e.forEach(a=>i(a,!0,[])),o.sort((a,s)=>a.pct-s.pct)}function DD(e,t){const n=t.getBoundingClientRect();return Math.max(0,Math.min(1,(e.clientX-n.left)/n.width))}function p5e({visibleRange:e,dragging:t,startDrag:n}){const r=e.startPct*100,o=e.endPct*100;return v.jsxs(v.Fragment,{children:[t!=="brush"&&v.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-[1] bg-background/70",style:{width:`${r}%`}}),t!=="brush"&&v.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-[1] bg-background/70",style:{width:`${100-o}%`}}),v.jsxs("div",{className:je("pointer-events-none absolute inset-y-0 z-[3] transition-opacity duration-150",t==="brush"?"opacity-0":t?"opacity-100":"opacity-0 group-hover:opacity-100"),style:{left:`${r}%`,right:`${100-o}%`},children:[v.jsx("div",{className:"pointer-events-auto absolute inset-y-[3px] left-0 flex w-[20px] items-center justify-center rounded-full border border-border/40 bg-muted",style:{cursor:"ew-resize"},onPointerDown:i=>n("left",i),children:v.jsx("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",className:"text-muted-foreground/80",children:v.jsx("path",{d:"M4 1L1 5L4 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v.jsx("div",{className:"pointer-events-auto absolute inset-y-[3px] right-0 flex w-[20px] items-center justify-center rounded-full border border-border/40 bg-muted",style:{cursor:"ew-resize"},onPointerDown:i=>n("right",i),children:v.jsx("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",className:"text-muted-foreground/80",children:v.jsx("path",{d:"M2 1L5 5L2 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}function m5e({markers:e,hoveredIdx:t,onHoveredIdxChange:n,onTooltipPosChange:r,onSpanSelect:o}){return v.jsx(v.Fragment,{children:e.map((i,a)=>v.jsx("div",{className:je("absolute inset-y-[6px] flex -translate-x-1/2 cursor-pointer flex-col justify-center transition-[transform,opacity]",i.hasErrorInTree?"z-[3]":"z-[2]",t===a&&"z-[5] scale-x-150",!i.visible&&"opacity-[0.01]"),style:{left:`${i.pct*100}%`,width:6},onPointerDown:s=>{o&&s.stopPropagation()},onClick:()=>{o==null||o(i.span,i.ancestorSpanIds)},onMouseEnter:s=>{n(a),r({x:s.clientX,y:s.clientY})},onMouseMove:s=>{r({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{n(null),r(null)},children:v.jsx("div",{className:je("flex-1 rounded-full",L$(i.span))})},a))})}const Qg=.05;function g5e(e,t,n){const[r,o]=b.useState(null),i=b.useRef(null),a=b.useCallback((u,c,d)=>{c.preventDefault(),c.stopPropagation(),o(u),i.current={mouseX:c.clientX,startPct:t.startPct,endPct:t.endPct,anchorPct:d}},[t]),s=b.useCallback(u=>{if(!e.current)return;const c=DD(u,e.current);n({startPct:c,endPct:Math.min(1,c+Qg)}),a("brush",u,c)},[e,a,n]),l=b.useCallback(()=>{n({startPct:0,endPct:1})},[n]);return b.useEffect(()=>{if(!r)return;const u=d=>{if(!i.current||!e.current)return;const h=e.current.getBoundingClientRect().width;if(h<=0)return;const{startPct:p,endPct:x}=i.current;if(r==="brush"){const w=i.current.anchorPct,_=DD(d,e.current);let C=Math.min(w,_),O=Math.max(w,_);O-C=w?O=Math.min(1,C+Qg):C=Math.max(0,O-Qg)),n({startPct:C,endPct:O});return}const y=(d.clientX-i.current.mouseX)/h;if(r==="left"){const w=Math.max(0,Math.min(x-Qg,p+y));n({startPct:w,endPct:x})}else if(r==="right"){const w=Math.min(1,Math.max(p+Qg,x+y));n({startPct:p,endPct:w})}},c=()=>{o(null),i.current=null};return document.addEventListener("pointermove",u),document.addEventListener("pointerup",c),()=>{document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",c)}},[r,e,n]),{dragging:r,startDrag:a,handleTrackDown:s,handleDoubleClick:l}}function Cre(e){return e.some(t=>t.inProgress||js(t)||Cre(t.children))}function v5e({spanTrees:e,minMs:t,maxMs:n,isRunning:r,visibleRange:o,onRangeChange:i,expandedSpanIds:a,onSpanSelect:s,externalHoverPct:l,onHoverPctChange:u}){const c=b.useRef(null),[d,h]=b.useState(null),[p,x]=b.useState(null),[y,w]=b.useState(null),_=b.useMemo(()=>Cre(e),[e]),C=F$(!!r&&_),P=(_?Math.max(n,C):n)-t,R=b.useMemo(()=>h5e(e,t,P,a),[e,t,P,a]),T=b.useMemo(()=>gC(P).ticks,[P]),{dragging:k,startDrag:M,handleTrackDown:j,handleDoubleClick:$}=g5e(c,o,i),L=d!==null?R[d]:null,V=k==="left"||k==="right"?"ew-resize":"crosshair",G=y??l??null;return v.jsxs("div",{children:[v.jsx(are,{ticks:T,totalMs:P}),v.jsxs("div",{ref:c,className:"group relative h-[43px] overflow-hidden rounded-lg border border-border/50 bg-muted/30",style:{cursor:V},onPointerDown:j,onDoubleClick:$,onMouseMove:D=>{if(!c.current)return;const H=DD(D,c.current);w(H),u==null||u(H)},onMouseLeave:()=>{w(null),u==null||u(null)},children:[v.jsx(m5e,{markers:R,hoveredIdx:d,onHoveredIdxChange:h,onTooltipPosChange:x,onSpanSelect:s}),v.jsx(p5e,{visibleRange:o,dragging:k,startDrag:M}),G!==null&&!k&&v.jsx(c5e,{activePct:G,totalMs:P}),k&&v.jsx(f5e,{visibleRange:o,totalMs:P}),v.jsx("div",{className:"pointer-events-none absolute inset-0 z-[4] rounded-[inherit] shadow-[inset_0px_7px_10px_0px_rgba(0,0,0,0.01),inset_0px_1px_3px_0px_rgba(0,0,0,0.01)]"}),L&&p&&!k&&v.jsx(d5e,{marker:L,position:p})]})]})}const y5e=b.memo(function({row:t,timelineMaxMs:n,visMinStart:r,hasAnyInProgress:o,hasAnyLiveQueued:i,isSelected:a,isHovered:s,onHover:l,onMouseMove:u,onGroupSelect:c,expandOnly:d}){const h=t.group.latestEndMs-t.group.earliestStartMs,p=n>0?(t.group.earliestStartMs-r)/n*100:0,x=n>0?h/n*100:0,y=t.group.errorCount>0,w=o||i;return v.jsx("div",{className:je("relative shrink-0 transition-colors",$$({hovered:s,selected:a})),style:{height:Qy},children:v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px]",!w&&"transition-all",y?"bg-red-500":"bg-green-500",a?"ring-2 ring-primary ring-offset-1 ring-offset-background":s?"ring-1 ring-foreground/20":""),style:{left:`${p}%`,width:`${Math.max(x,.3)}%`,minWidth:2},onMouseEnter:_=>l(t.rowKey,_),onMouseMove:u,onMouseLeave:()=>l(null),onClick:()=>{d(t.group.groupId),c==null||c(t.group)}})})}),w5e=b.memo(function({row:t,now:n,isRunning:r,timelineMaxMs:o,visMinStart:i,hasAnyInProgress:a,hasAnyLiveQueued:s,isSelected:l,isChildOfSelected:u,isHovered:c,onHover:d,onMouseMove:h,onSpanSelect:p,expandOnly:x}){const y=new Date(t.span.createdAt).getTime(),w=t.span.inProgress?Math.max(0,n-y):t.span.durationNs/1e6,_=js(t.span)&&w<=0,C=o>0?(y-i)/o*100:0,O=o>0?w/o*100:0,P=!t.matchesFilter,R=t.isContextOnly,T=a||s,k=t.span.queuedPhase;let M=0,j=0;if(k){const L=new Date(k.createdAt).getTime(),G=(r&&js(t.span)?n:y)-L;M=o>0?(L-i)/o*100:0,j=o>0?G/o*100:0}const $=()=>{t.hasChildren&&x(t.rowKey),p==null||p(t.span)};return v.jsxs("div",{className:je("relative shrink-0 transition-colors",$$({hovered:c,selected:l,childOfSelected:u}),P?"opacity-40":R&&"opacity-50"),style:{height:Qy},children:[k&&v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px] border border-dashed",!T&&"transition-all",(t.span.inProgress||js(t.span))&&"animate-pulse",t.span.inProgress||js(t.span)?"border-yellow-500 bg-yellow-500/10":Yd(t.span)?"border-red-500 bg-red-500/10":"border-green-500 bg-green-500/10"),style:{left:`${M}%`,width:`${Math.max(j,.3)}%`,minWidth:2},onMouseEnter:L=>d(t.rowKey,L),onMouseMove:h,onMouseLeave:()=>d(null),onClick:$}),!_&&v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px]",o5e(t.span),!T&&"transition-all",t.span.inProgress&&"animate-pulse",l?"ring-2 ring-primary ring-offset-1 ring-offset-background":c?"ring-1 ring-foreground/20":""),style:{left:`min(${C}%, calc(100% - 4px))`,width:`${Math.max(O,.3)}%`,minWidth:4},onMouseEnter:L=>d(t.rowKey,L),onMouseMove:h,onMouseLeave:()=>d(null),onClick:$})]})}),Ore=420,x5e=20,mB=Ore+x5e;function Rre({title:e,subtitle:t,style:n,children:r}){return v.jsxs("div",{className:"pointer-events-none z-50 overflow-hidden rounded-lg border border-border bg-popover shadow-lg",style:{maxWidth:Ore,...n},children:[v.jsxs("div",{className:"border-b border-border px-3 py-2",children:[v.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:e}),t&&v.jsx("div",{className:"mt-0.5 truncate font-mono text-xs text-muted-foreground",children:t})]}),v.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 px-3 py-2 text-xs",children:r})]})}function b5e({row:e,now:t,style:n}){const r=e.span,o=new Date(r.createdAt).getTime(),i=js(r)&&r.durationNs<=0,a=r.inProgress?Math.max(0,t-o):r.durationNs/1e6,s=r.spanName,l=ire(r.createdAt,{ms:!0}),u=r.queuedPhase;let c=0;if(u){const d=new Date(u.createdAt).getTime();c=i?Math.max(0,t-d):u.durationNs/1e6}return v.jsxs(Rre,{title:s,subtitle:s!==r.spanName?r.spanName:void 0,style:n,children:[u?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Queue Time"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(c,{precise:!0})}),v.jsx("span",{className:"text-muted-foreground",children:"Execution"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:i?"–":Ro(a,{precise:!0})}),v.jsx("span",{className:"text-muted-foreground",children:"Total"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:i?Ro(c,{precise:!0}):Ro(c+a,{precise:!0})})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:n5e(r)?"Queue Time":"Duration"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(a,{precise:!0})})]}),v.jsx("span",{className:"text-muted-foreground",children:"Status"}),v.jsxs("span",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:je("size-1.5 shrink-0 rounded-full",L$(r))}),v.jsx("span",{className:"font-mono text-foreground",children:r5e(r,i)})]}),v.jsx("span",{className:"text-muted-foreground",children:"Started"}),v.jsx("span",{className:"font-mono text-foreground",children:l}),bb(r)&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Source"}),v.jsx("span",{className:"font-mono text-foreground",children:"Engine"})]})]})}function S5e({group:e,style:t}){const n=e.latestEndMs-e.earliestStartMs;return v.jsxs(Rre,{title:e.groupName,subtitle:`${e.totalCount.toLocaleString()} spans`,style:t,children:[v.jsx("span",{className:"text-muted-foreground",children:"Time range"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(n,{precise:!0})}),e.errorCount>0&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Errors"}),v.jsx("span",{className:"font-mono font-medium text-red-500",children:e.errorCount.toLocaleString()})]})]})}function _5e(e,t,n){const[r,o]=b.useState(null),i=b.useRef(t);i.current=t;const a=b.useCallback(l=>{if(!e.current||!n)return;const u=e.current.getBoundingClientRect(),c=Math.max(0,Math.min(1,(l.clientX-u.left)/u.width)),d=p=>{if(!e.current)return;const x=e.current.getBoundingClientRect(),y=Math.max(0,Math.min(1,(p.clientX-x.left)/x.width)),w=Math.min(c,y),_=Math.max(c,y);_-w>.005&&o({lo:w,hi:_})},h=p=>{if(document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h),!e.current){o(null);return}const x=e.current.getBoundingClientRect(),y=Math.max(0,Math.min(1,(p.clientX-x.left)/x.width)),w=Math.min(c,y),_=Math.max(c,y);if(o(null),_-w>=.02){const C=i.current,O=C.visMinStart+C.timelineMaxMs*w,P=C.visMinStart+C.timelineMaxMs*_;n({startPct:Math.max(0,(O-C.traceMinStart)/C.traceTotalMs),endPct:Math.min(1,(P-C.traceMinStart)/C.traceTotalMs)})}};document.addEventListener("pointermove",d),document.addEventListener("pointerup",h)},[e,n]),s=b.useCallback(()=>{n==null||n({startPct:0,endPct:1})},[n]);return{brushRange:r,onPointerDown:a,onDoubleClick:s}}function E5e(e,t,n,r){const[o,i]=b.useState(null),a=b.useRef(t);a.current=t;const{visMinStart:s,timelineMaxMs:l,traceMinStart:u,traceTotalMs:c}=t,d=b.useMemo(()=>{if(o!==null)return o;if(n==null||l<=0)return null;const y=(u+n*c-s)/l;return y<0||y>1?null:y},[o,n,s,l,u,c]),h=b.useCallback(x=>{if(!e.current)return;const y=e.current.getBoundingClientRect(),w=Math.max(0,Math.min(1,(x.clientX-y.left)/y.width));if(i(w),r){const _=a.current,C=_.visMinStart+w*_.timelineMaxMs,O=_.traceTotalMs>0?(C-_.traceMinStart)/_.traceTotalMs:0;r(Math.max(0,Math.min(1,O)))}},[e,r]),p=b.useCallback(()=>{i(null),r==null||r(null)},[r]);return{effectiveCursorPct:d,onMouseMove:h,onMouseLeave:p}}const C5e=b.memo(function({flatRows:t,ticks:n,timelineMaxMs:r,visMinStart:o,visOffsetMs:i,traceMinStart:a,traceTotalMs:s,gridHeight:l,now:u,isRunning:c,hasAnyInProgress:d,hasAnyLiveQueued:h,selectedSpan:p,selectedGroupId:x,selectedDescendantIds:y,hoveredRowKey:w,onRowHover:_,onSpanSelect:C,onGroupSelect:O,expandOnly:P,onRangeChange:R,externalCursorPct:T,onCursorPctChange:k}){const M=b.useRef(null),j={visMinStart:o,timelineMaxMs:r,traceMinStart:a,traceTotalMs:s},{brushRange:$,onPointerDown:L,onDoubleClick:V}=_5e(M,j,R),{effectiveCursorPct:G,onMouseMove:D,onMouseLeave:H}=E5e(M,j,T,k),[U,Y]=b.useState(null),q=b.useCallback((z,X)=>{_(z),Y(X?{x:X.clientX,y:X.clientY}:null)},[_]),W=b.useCallback(z=>{Y({x:z.clientX,y:z.clientY})},[]),K=w?t.find(z=>z.rowKey===w):null;return v.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pr-10",children:[v.jsxs("div",{className:"relative",ref:M,style:{cursor:R?"crosshair":void 0},onMouseMove:D,onMouseLeave:H,onPointerDown:L,onDoubleClick:V,children:[n.map(z=>v.jsx("div",{className:"absolute top-0 w-px bg-border/40",style:{left:`${z/r*100}%`,height:l}},z)),t.map(z=>z.kind==="show-more"?v.jsx("div",{className:"relative shrink-0",style:{height:Qy}},z.rowKey):z.kind==="group"?v.jsx(y5e,{row:z,timelineMaxMs:r,visMinStart:o,hasAnyInProgress:d,hasAnyLiveQueued:h,isSelected:x===z.group.groupId,isHovered:w===z.rowKey,onHover:q,onMouseMove:W,onGroupSelect:O,expandOnly:P},z.rowKey):v.jsx(w5e,{row:z,now:u,isRunning:c,timelineMaxMs:r,visMinStart:o,hasAnyInProgress:d,hasAnyLiveQueued:h,isSelected:(p==null?void 0:p.spanId)===z.span.spanId,isChildOfSelected:y.has(z.span.spanId),isHovered:w===z.rowKey,onHover:q,onMouseMove:W,onSpanSelect:C,expandOnly:P},z.rowKey)),G!==null&&!$&&v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/40",style:{left:`${G*100}%`,height:l}}),$&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 border-x border-primary/30 bg-primary/10",style:{left:`${$.lo*100}%`,width:`${($.hi-$.lo)*100}%`,height:l}}),v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/70",style:{left:`${$.lo*100}%`,height:l}}),v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/70",style:{left:`${$.hi*100}%`,height:l}})]})]}),K&&U&&K.kind==="span"&&zs.createPortal(v.jsx(b5e,{row:K,now:u,style:{position:"fixed",left:Math.min(U.x+12,window.innerWidth-mB),top:U.y+16}}),document.body),K&&U&&K.kind==="group"&&zs.createPortal(v.jsx(S5e,{group:K.group,style:{position:"fixed",left:Math.min(U.x+12,window.innerWidth-mB),top:U.y+16}}),document.body)]})});function _A({depth:e,connectorFlags:t,isLastChild:n}){return v.jsx(v.Fragment,{children:Array.from({length:e}).map((r,o)=>{const i=o===e-1,a=n!==void 0&&i?t[o]||!n:t[o];return v.jsx("div",{className:"flex shrink-0 items-center justify-center",style:{width:mC,height:Qy},children:a&&v.jsx("div",{className:"h-full w-px bg-border"})},o)})})}function gB({isExpanded:e,hasChildren:t=!0,onToggle:n}){return t?v.jsx("button",{className:"flex shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",style:{width:mC+ID},onClick:r=>{r.stopPropagation(),n()},children:e?v.jsx(p1e,{className:"size-3"}):v.jsx(g1e,{className:"size-3"})}):v.jsx("div",{style:{width:mC+ID},className:"shrink-0"})}function EA({selected:e,childOfSelected:t,hovered:n,dimmed:r,contextOnly:o,onClick:i,onMouseEnter:a,onMouseLeave:s,children:l,"data-row-key":u}){return v.jsx("div",{className:je("flex shrink-0 items-center px-2",i&&"cursor-pointer transition-colors",$$({hovered:n,selected:e,childOfSelected:t}),r?"opacity-40":o&&"opacity-50"),style:{height:Qy},onClick:i,onMouseEnter:a,onMouseLeave:s,"data-row-key":u,children:l})}const O5e=b.memo(function({flatRows:t,selectedSpan:n,selectedGroupId:r,selectedDescendantIds:o,hoveredRowKey:i,onRowHover:a,onSpanSelect:s,onGroupSelect:l,onShowMore:u,toggleExpand:c,expandOnly:d}){return v.jsx(v.Fragment,{children:t.map(h=>{if(h.kind==="show-more")return v.jsxs(EA,{children:[v.jsx(_A,{depth:h.depth,connectorFlags:h.connectorFlags}),v.jsx("div",{style:{width:mC+ID},className:"shrink-0"}),v.jsxs(wt,{variant:"link",size:"xs",className:"truncate text-sm",onClick:()=>u(h.groupId,h.currentVisible+SA),children:["Show ",Math.min(h.remaining,SA)," more",h.remaining>SA&&` (${h.remaining.toLocaleString()} remaining)`]})]},h.rowKey);if(h.kind==="group"){const w=r===h.group.groupId;return v.jsxs(EA,{selected:w,hovered:i===h.rowKey,"data-row-key":h.rowKey,onClick:()=>{d(h.group.groupId),l==null||l(h.group)},onMouseEnter:()=>a(h.rowKey),onMouseLeave:()=>a(null),children:[v.jsx(_A,{depth:h.depth,connectorFlags:h.connectorFlags,isLastChild:h.isLastChild}),v.jsx(gB,{isExpanded:h.isExpanded,onToggle:()=>c(h.group.groupId)}),v.jsxs("span",{className:je("truncate text-sm leading-tight",w?"font-medium text-foreground":"text-muted-foreground"),title:`batch: ${h.group.groupName} (${h.group.totalCount.toLocaleString()} spans)`,children:["batch: ",h.group.groupName]}),v.jsx("span",{className:"ml-1.5 shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:h.group.totalCount.toLocaleString()}),h.group.errorCount>0&&v.jsxs("span",{className:"ml-1 flex shrink-0 items-center gap-0.5 rounded bg-red-500/10 px-1.5 py-0.5 font-mono text-xs text-red-500",children:[v.jsx(S1e,{className:"size-3"}),h.group.errorCount.toLocaleString()]})]},h.rowKey)}const p=(n==null?void 0:n.spanId)===h.span.spanId,x=h.span.spanName,y=t5e(h.span);return v.jsxs(EA,{selected:p,childOfSelected:o.has(h.span.spanId),hovered:i===h.rowKey,dimmed:!h.matchesFilter,contextOnly:h.isContextOnly,"data-row-key":h.rowKey,onClick:()=>{h.hasChildren&&d(h.rowKey),s==null||s(h.span)},onMouseEnter:()=>a(h.rowKey),onMouseLeave:()=>a(null),children:[v.jsx(_A,{depth:h.depth,connectorFlags:h.connectorFlags,isLastChild:h.isLastChild}),v.jsx(gB,{isExpanded:h.isExpanded,hasChildren:h.hasChildren,onToggle:()=>c(h.rowKey)}),v.jsx(Ll,{delayDuration:0,children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsx("span",{className:je("min-w-[4ch] shrink truncate text-sm leading-tight",p?"font-medium text-foreground":h.depth===0?"text-foreground":"text-muted-foreground"),children:x})}),v.jsx(Us,{children:x})]})}),y&&v.jsx(Ll,{delayDuration:0,children:v.jsxs($l,{children:[v.jsx(Fl,{asChild:!0,children:v.jsx("span",{className:"ml-1.5 truncate rounded bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground",children:y})}),v.jsx(Us,{children:y})]})}),bb(h.span)&&v.jsx("span",{className:"ml-1.5 shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground",children:"engine"})]},h.rowKey)})})}),mE=320;function R5e({spanTrees:e,isRunning:t,expandedSpanIds:n,onExpandChange:r,groupVisibleCounts:o,onShowMore:i,selectedSpan:a,selectedGroupId:s,onSpanSelect:l,onGroupSelect:u,visibleRange:c,onRangeChange:d,externalCursorPct:h,onCursorPctChange:p}){const x=b.useRef(null),y=b.useMemo(()=>(function U(Y){return Y.some(q=>q.inProgress||U(q.children))})(e),[e]),w=b.useMemo(()=>(function U(Y){return Y.some(q=>js(q)||U(q.children))})(e),[e]),C=F$(!!t&&(y||w)),O=b.useMemo(()=>Ere(e,n,o),[e,n,o]),{visMinStart:P,visOffsetMs:R,ticks:T,timelineMaxMs:k,traceMinStart:M,traceTotalMs:j}=b.useMemo(()=>{let U=1/0,Y=-1/0;const q=X=>{var fe;const ee=new Date(X.createdAt).getTime(),ae=X.inProgress?C:ee+X.durationNs/1e6;if(U=Math.min(U,ee),Y=Math.max(Y,ae),X.queuedPhase){const ie=new Date(X.queuedPhase.createdAt).getTime(),ge=t&&js(X)?C:ie+X.queuedPhase.durationNs/1e6;U=Math.min(U,ie),Y=Math.max(Y,ge)}(fe=X.children)==null||fe.forEach(q)};e.forEach(q);const W=Y-U;if(c&&(c.startPct>.001||c.endPct<.999)){const X=U+W*c.startPct,ae=U+W*c.endPct-X,{ticks:fe}=gC(ae);return{visMinStart:X,visOffsetMs:X-U,ticks:fe,timelineMaxMs:ae,traceMinStart:U,traceTotalMs:W}}const{ticks:z}=gC(W);return{visMinStart:U,visOffsetMs:0,ticks:z,timelineMaxMs:W,traceMinStart:U,traceTotalMs:W}},[e,c,C,t]),$=b.useCallback(U=>{const Y=new Set(n);Y.has(U)?Y.delete(U):Y.add(U),r(Y)},[n,r]),L=b.useCallback(U=>{if(!n.has(U)){const Y=new Set(n);Y.add(U),r(Y)}},[n,r]),V=O.length*Qy,[G,D]=b.useState(null),H=b.useMemo(()=>a?l5e(a):new Set,[a]);return v.jsxs("div",{className:"relative flex min-w-0 overflow-hidden",ref:x,children:[v.jsx("div",{className:"flex shrink-0 flex-col overflow-hidden",style:{width:mE},children:v.jsx(O5e,{flatRows:O,selectedSpan:a,selectedGroupId:s,selectedDescendantIds:H,hoveredRowKey:G,onRowHover:D,onSpanSelect:l,onGroupSelect:u,onShowMore:i,toggleExpand:$,expandOnly:L})}),v.jsx(C5e,{flatRows:O,ticks:T,timelineMaxMs:k,visMinStart:P,visOffsetMs:R,traceMinStart:M,traceTotalMs:j,gridHeight:V,now:C,isRunning:t,hasAnyInProgress:y,hasAnyLiveQueued:w,selectedSpan:a,selectedGroupId:s,selectedDescendantIds:H,hoveredRowKey:G,onRowHover:D,onSpanSelect:l,onGroupSelect:u,expandOnly:L,onRangeChange:d,externalCursorPct:h,onCursorPctChange:p})]})}const P5e=(e,t)=>{const{tenantId:n}=eR(),{data:r,isLoading:o,isFetching:i}=In({queryKey:["feature-flag",n,e,t],queryFn:async()=>n?(await rt.tenantFeatureFlagEvaluate(n,{featureFlagId:e,isEnabledIfNoPosthog:t})).data:{isEnabled:t},enabled:!!n,retry:2,staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return o||i?{isEnabled:void 0,isLoading:!0}:{isEnabled:(r==null?void 0:r.isEnabled)??t,isLoading:o||i}},vB="__context_expand_done__",T5e=e=>{let t=1/0,n=-1/0;const r=o=>{var s;const i=new Date(o.createdAt).getTime(),a=i+o.durationNs/1e6;if(t=Math.min(t,i),n=Math.max(n,a),o.queuedPhase){const l=new Date(o.queuedPhase.createdAt).getTime(),u=l+o.queuedPhase.durationNs/1e6;t=Math.min(t,l),n=Math.max(n,u)}(s=o.children)==null||s.forEach(r)};return e.forEach(r),{minStart:t,maxEnd:n}};function LD(e,t){for(const n of e){if(n.spanId===t)return n;const r=LD(n.children,t);if(r)return r}}function $D(e,t,n=[]){var r;for(const o of e){const i=$u(o);if(i===t||((r=o.spanAttributes)==null?void 0:r["hatchet.step_run_id"])===t)return{span:o,ancestorKeys:n};const a=$D(o.children,t,[...n,i]);if(a)return a}}function FD(e,t,n){const r=_re(e,n);for(const o of r)if(o.kind==="group"&&o.group.groupId===t)return o.group;for(const o of r)if(o.kind==="span"){const i=FD(o.span.children,t,o.span.spanId);if(i)return i}else if(o.kind==="group")for(const i of o.group.spans){const a=FD(i.children,t,i.spanId);if(a)return a}}function BD(e,t,n=[]){for(const r of e){if(r.spanId===t)return n;const o=BD(r.children,t,[...n,$u(r)]);if(o)return o}}function Pre(e){const t=[];for(const n of e)n.children.length>0&&(t.push($u(n)),t.push(...Pre(n.children)));return t}function Tre(e,t,n=0){if(n>=t)return[];const r=[];for(const o of e)o.children.length>0&&(r.push($u(o)),r.push(...Tre(o.children,t,n+1)));return r}function A5e({spanTrees:e,isRunning:t,contextTaskRunId:n,onClearFilters:r}){const{focusedTaskRunId:o,selectedSpanId:i,setSelectedSpanId:a,selectedGroupId:s,setSelectedGroupId:l}=v$(),{minStart:u,maxEnd:c}=b.useMemo(()=>T5e(e),[e]),[d,h]=b.useState(()=>{const he=new Set(Tre(e,2));if(i){const ue=LD(e,i);if(ue){const we=BD(e,i);if(we)for(const Ae of we)he.add(Ae);he.add($u(ue))}}return he}),p=b.useMemo(()=>Pre(e),[e]),x=p.length>0&&p.every(he=>d.has(he)),y=b.useCallback(()=>{h(he=>{const ue=new Set(he);for(const we of p)ue.add(we);return ue})},[p]),w=b.useCallback(()=>{h(new Set)},[]),[_,C]=b.useState({}),[O,P]=b.useState({startPct:0,endPct:1}),R=O.startPct>.001||O.endPct<.999,T=b.useMemo(()=>{if(!R)return null;const he=c-u,ue=he*O.startPct,we=he*(O.endPct-O.startPct),{ticks:Ae}=gC(we);return{ticks:Ae,visDurationMs:we,visOffsetMs:ue}},[R,u,c,O]),[k,M]=b.useState(null),[j,$]=b.useState(null),{isEnabled:L}=P5e(MX.TraceMinimapEnabled,!1),V=b.useRef(o);if(o&&o!==V.current){V.current=o;const he=$D(e,o);he&&(h(ue=>{const we=new Set(ue);for(const Ae of he.ancestorKeys)we.add(Ae);return we.add($u(he.span)),we}),a(he.span.spanId))}const G=b.useRef(null);if(n&&G.current!==vB){const he=$D(e,n);he&&(G.current=vB,h(ue=>{const we=new Set(ue);for(const Ae of he.ancestorKeys)we.add(Ae);return we.add($u(he.span)),we}))}const D=b.useMemo(()=>i?LD(e,i):void 0,[i,e]),H=b.useMemo(()=>s?FD(e,s):void 0,[s,e]),U=b.useCallback(he=>{const ue=BD(e,he.spanId);ue&&h(we=>{const Ae=new Set(we);for(const ye of ue)Ae.add(ye);return Ae.add($u(he)),Ae})},[e]),{open:Y,close:q,isOpen:W}=Pm(),K=b.useCallback(()=>{a(void 0),l(void 0),q()},[a,l,q]),z=b.useRef(W);b.useEffect(()=>{const he=z.current;z.current=W,he&&!W&&(a(void 0),l(void 0))},[W,a,l]);const X=b.useCallback(he=>{U(he);const ue=i===he.spanId;a(ue?void 0:he.spanId),ue?q():Y({type:"span-details",content:{span:he,onSpanSelect:we=>{U(we),a(we.spanId),Y({type:"span-details",content:{span:we,onClose:K}})},onClose:K}})},[U,i,a,Y,q,K]),ee=b.useCallback((he,ue)=>{U(he),a(he.spanId)},[U,a]),ae=b.useCallback(he=>{const ue=s===he.groupId;l(ue?void 0:he.groupId),ue?q():Y({type:"group-details",content:{group:he,onClose:K}})},[s,l,Y,q,K]),fe=b.useCallback((he,ue)=>{C(we=>({...we,[he]:ue}))},[]),ie=b.useCallback(()=>{a(void 0),l(void 0),P({startPct:0,endPct:1}),q(),r==null||r()},[a,l,q,r]);b.useEffect(()=>{const he=ue=>{if(ue.key!=="Escape")return;const we=ue.target;we.tagName==="INPUT"||we.tagName==="TEXTAREA"||ie()};return window.addEventListener("keydown",he),()=>window.removeEventListener("keydown",he)},[ie]);const ge=b.useRef(null);return b.useEffect(()=>{const he=D?$u(D):H==null?void 0:H.groupId;if(!he)return;let ue=!1;return requestAnimationFrame(()=>{ue||requestAnimationFrame(()=>{if(ue)return;const we=ge.current;if(!we)return;const Ae=we.querySelector(`[data-row-key="${he}"]`);Ae==null||Ae.scrollIntoView({block:"nearest",behavior:"smooth"})})}),()=>{ue=!0}},[D,H]),v.jsxs("div",{className:"my-4 flex min-w-0 select-none flex-col gap-y-2",children:[v.jsxs("div",{className:"shrink-0",children:[v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{style:{width:mE},children:v.jsxs(wt,{variant:"ghost",size:"xs",className:"gap-1 text-xs p-2",onClick:x?w:y,children:[x?v.jsx(y1e,{className:"size-3"}):v.jsx(x1e,{className:"size-3"}),x?"Collapse All":"Expand All"]})}),L&&v.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[v.jsx("div",{className:"flex justify-end pb-1",children:v.jsxs(wt,{variant:"ghost",size:"xs",className:`gap-1 text-xs ${R?"":"invisible"}`,onClick:()=>P({startPct:0,endPct:1}),tabIndex:R?void 0:-1,children:[v.jsx(XO,{className:"size-3"}),"clear zoom"]})}),v.jsx(v5e,{spanTrees:e,minMs:u,maxMs:c,isRunning:t,visibleRange:O,onRangeChange:P,expandedSpanIds:d,onSpanSelect:ee,externalHoverPct:j,onHoverPctChange:M})]})]}),L&&R&&v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{className:"shrink-0",style:{width:mE}}),v.jsx("div",{className:"min-w-0 flex-1 pr-10",children:v.jsxs("svg",{className:"h-5 w-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[v.jsx("line",{x1:O.startPct*100,y1:"0",x2:"0",y2:"100",className:"stroke-border",strokeWidth:"1",vectorEffect:"non-scaling-stroke"}),v.jsx("line",{x1:O.endPct*100,y1:"0",x2:"100",y2:"100",className:"stroke-border",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]})})]}),L&&T&&v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{className:"shrink-0",style:{width:mE}}),v.jsx("div",{className:"min-w-0 flex-1 pr-10",children:v.jsx(are,{ticks:T.ticks,totalMs:T.visDurationMs,offsetMs:T.visOffsetMs})})]})]}),v.jsx("div",{ref:ge,children:v.jsx(R5e,{spanTrees:e,isRunning:t,expandedSpanIds:d,onExpandChange:h,groupVisibleCounts:_,onShowMore:fe,selectedSpan:D,selectedGroupId:H==null?void 0:H.groupId,onSpanSelect:X,onGroupSelect:ae,visibleRange:O,onRangeChange:P,externalCursorPct:k,onCursorPctChange:$})})]})}const k5e={ok:Lr.OK,error:Lr.ERROR,unset:Lr.UNSET};function N5e(e,t){var n;if(t.status){const r=k5e[t.status];if(e.statusCode!==r)return!1}if(t.spanName&&!e.spanName.toLowerCase().includes(t.spanName.toLowerCase()))return!1;for(const[r,o]of t.attributes){const i=(n=e.spanAttributes)==null?void 0:n[r];if(i===void 0||i!==o)return!1}if(t.search){const r=t.search.toLowerCase(),o=e.spanName.toLowerCase().includes(r),i=Object.values(e.spanAttributes??{}).some(a=>a.toLowerCase().includes(r));if(!o&&!i)return!1}return!0}function Are(e,t){const n=[];for(const i of e.children){const a=Are(i,t);a&&n.push(a)}const r=N5e(e,t),o=n.length>0;return!r&&!o?null:{...e,matchesFilter:r,children:n}}function M5e(e){return!!(e.search||e.status||e.spanName||e.attributes.length>0)}function j5e(e,t){if(!M5e(t))return kre(e);const n=[];for(const r of e){const o=Are(r,t);o&&n.push(o)}return n}function kre(e){return e.map(t=>({...t,matchesFilter:!0,children:kre(t.children)}))}const Nre=["ok","error","unset"],I5e={ok:"bg-green-500",error:"bg-red-500",unset:"bg-slate-500"};function Mre(e){return"key"in e}const D5e=/(\S+?):(\S+)|(\S+)/g;function jre(e){const t=[];let n;for(;(n=D5e.exec(e))!==null;){const[,r,o,i]=n;r&&o!==void 0?t.push({key:r,value:o}):i&&t.push({text:i})}return t}function Ire(e,t,n){const o=e.trimEnd().split(" "),i=o.pop()||"";if(t.type==="value"){const a=i.slice(0,i.indexOf(":")+1);o.push(a+t.value)}else{const a=n.some(s=>s.value.startsWith(i.toLowerCase()));i&&a?o.push(t.value):o.push(i,t.value)}return o.filter(Boolean).join(" ")}function L5e(e){const t=[],n=[],r=[];let o,i;for(const a of jre(e))if(Mre(a)){const{key:s,value:l}=a,u=s.toLowerCase();if(u==="status"){const c=l.toLowerCase();Nre.includes(c)?o=c:t.push(`Invalid status: "${l}"`)}else u==="name"?i=l:r.push([s,l])}else n.push(a.text);return{search:n.length>0?n.join(" "):void 0,status:o,spanName:i,attributes:r,raw:e,isValid:t.length===0,errors:t}}const $5e={ok:"Successful spans",error:"Failed spans",unset:"Spans without explicit status"},vC={STATUS:"status",SPAN_NAME:"span-name"},B$=[{type:"key",label:"status",value:`${vC.STATUS}:`,description:"Filter by span status"},{type:"key",label:"span name",value:`${vC.SPAN_NAME}:`,description:"Filter by span name"}];function F5e(e){const t=e.attributeKeys.map(n=>({type:"key",label:n,value:`${n}:`,description:"Span attribute"}));return[...B$,...t]}function B5e(e,t){const n=F5e(t),r=e.trimEnd(),o=r.split(" ").pop()||"";if(e.endsWith(" ")&&!r.endsWith(":"))return{mode:"key",suggestions:n};if(r==="")return{mode:"key",suggestions:n};const i=`${vC.STATUS}:`,a=`${vC.SPAN_NAME}:`;if(o.startsWith(i)){const u=o.slice(i.length).toLowerCase();return{mode:"value",suggestions:Nre.filter(d=>d.startsWith(u)).map(d=>({type:"value",label:d,value:d,description:$5e[d],color:I5e[d]}))}}if(o.startsWith(a)){const u=o.slice(a.length).toLowerCase();return{mode:"value",suggestions:t.spanNames.filter(d=>d.toLowerCase().includes(u)).slice(0,20).map(d=>({type:"value",label:d,value:d,description:"Span name"}))}}const s=o.indexOf(":");if(s>0){const u=o.slice(0,s),c=o.slice(s+1).toLowerCase();return{mode:"value",suggestions:(t.attributeValues.get(u)??[]).filter(p=>p.toLowerCase().startsWith(c)).slice(0,20).map(p=>({type:"value",label:p,value:p,description:u}))}}const l=n.filter(u=>u.value.startsWith(o.toLowerCase())&&o.length>0);return l.length>0?{mode:"key",suggestions:l}:{mode:"none",suggestions:[]}}function z5e(e,t){return Ire(e,t,B$)}var yB=1,q5e=.9,U5e=.8,V5e=.17,CA=.1,OA=.999,W5e=.9999,H5e=.99,G5e=/[\\\/_+.#"@\[\(\{&]/,K5e=/[\\\/_+.#"@\[\(\{&]/g,Y5e=/[\s-]/,Dre=/[\s-]/g;function zD(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?yB:H5e;var s=`${o},${i}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(i),u=n.indexOf(l,o),c=0,d,h,p,x;u>=0;)d=zD(e,t,n,r,u+1,i+1,a),d>c&&(u===o?d*=yB:G5e.test(e.charAt(u-1))?(d*=U5e,p=e.slice(o,u-1).match(K5e),p&&o>0&&(d*=Math.pow(OA,p.length))):Y5e.test(e.charAt(u-1))?(d*=q5e,x=e.slice(o,u-1).match(Dre),x&&o>0&&(d*=Math.pow(OA,x.length))):(d*=V5e,o>0&&(d*=Math.pow(OA,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=W5e)),(dd&&(d=h*CA)),d>c&&(c=d),u=n.indexOf(l,u+1);return a[s]=c,c}function wB(e){return e.toLowerCase().replace(Dre," ")}function X5e(e,t){return zD(e,t,wB(e),wB(t),0,0,{})}function _v(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Q5e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Lre(...e){return t=>e.forEach(n=>Q5e(n,t))}function Sb(...e){return b.useCallback(Lre(...e),e)}function Z5e(e,t){const n=b.createContext(t);function r(i){const{children:a,...s}=i,l=b.useMemo(()=>s,Object.values(s));return b.createElement(n.Provider,{value:l},a)}function o(i){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function J5e(e,t=[]){let n=[];function r(i,a){const s=b.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:h,children:p,...x}=d,y=(h==null?void 0:h[e][l])||s,w=b.useMemo(()=>x,Object.values(x));return b.createElement(y.Provider,{value:w},p)}function c(d,h){const p=(h==null?void 0:h[e][l])||s,x=b.useContext(p);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(a=>b.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,e3e(o,...t)]}function e3e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const qD=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},t3e=NO.useId||(()=>{});let n3e=0;function RA(e){const[t,n]=b.useState(t3e());return qD(()=>{n(r=>r??String(n3e++))},[e]),e||(t?`radix-${t}`:"")}function um(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function r3e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=o3e({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=um(n),l=b.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function o3e({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,o=b.useRef(r),i=um(t);return b.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const z$=b.forwardRef((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),i=o.find(a3e);if(i){const a=i.props.children,s=o.map(l=>l===i?b.Children.count(a)>1?b.Children.only(null):b.isValidElement(a)?a.props.children:null:l);return b.createElement(UD,Ni({},r,{ref:t}),b.isValidElement(a)?b.cloneElement(a,void 0,s):null)}return b.createElement(UD,Ni({},r,{ref:t}),n)});z$.displayName="Slot";const UD=b.forwardRef((e,t)=>{const{children:n,...r}=e;return b.isValidElement(n)?b.cloneElement(n,{...s3e(r,n.props),ref:Lre(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});UD.displayName="SlotClone";const i3e=({children:e})=>b.createElement(b.Fragment,null,e);function a3e(e){return b.isValidElement(e)&&e.type===i3e}function s3e(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{i==null||i(...s),o==null||o(...s)}:r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const l3e=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],MR=l3e.reduce((e,t)=>{const n=b.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?z$:t;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(s,Ni({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function u3e(e,t){e&&zs.flushSync(()=>e.dispatchEvent(t))}function c3e(e){const t=um(e);b.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const VD="dismissableLayer.update",f3e="dismissableLayer.pointerDownOutside",d3e="dismissableLayer.focusOutside";let xB;const h3e=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p3e=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,u=b.useContext(h3e),[c,d]=b.useState(null),[,h]=b.useState({}),p=Sb(t,T=>d(T)),x=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(y),_=c?x.indexOf(c):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,O=_>=w,P=m3e(T=>{const k=T.target,M=[...u.branches].some(j=>j.contains(k));!O||M||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())}),R=g3e(T=>{const k=T.target;[...u.branches].some(j=>j.contains(k))||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())});return c3e(T=>{_===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))}),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xB=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),bB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=xB)}},[c,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),bB())},[c,u]),b.useEffect(()=>{const T=()=>h({});return document.addEventListener(VD,T),()=>document.removeEventListener(VD,T)},[]),b.createElement(MR.div,Ni({},l,{ref:p,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:_v(e.onFocusCapture,R.onFocusCapture),onBlurCapture:_v(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:_v(e.onPointerDownCapture,P.onPointerDownCapture)}))});function m3e(e){const t=um(e),n=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){$re(f3e,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=l,document.addEventListener("click",r.current,{once:!0})):l()}n.current=!1},i=window.setTimeout(()=>{document.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),document.removeEventListener("pointerdown",o),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function g3e(e){const t=um(e),n=b.useRef(!1);return b.useEffect(()=>{const r=o=>{o.target&&!n.current&&$re(d3e,t,{originalEvent:o},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bB(){const e=new CustomEvent(VD);document.dispatchEvent(e)}function $re(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?u3e(o,i):o.dispatchEvent(i)}const PA="focusScope.autoFocusOnMount",TA="focusScope.autoFocusOnUnmount",SB={bubbles:!1,cancelable:!0},v3e=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=b.useState(null),u=um(o),c=um(i),d=b.useRef(null),h=Sb(t,y=>l(y)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let y=function(_){if(p.paused||!s)return;const C=_.target;s.contains(C)?d.current=C:mp(d.current,{select:!0})},w=function(_){p.paused||!s||s.contains(_.relatedTarget)||mp(d.current,{select:!0})};return document.addEventListener("focusin",y),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w)}}},[r,s,p.paused]),b.useEffect(()=>{if(s){EB.add(p);const y=document.activeElement;if(!s.contains(y)){const _=new CustomEvent(PA,SB);s.addEventListener(PA,u),s.dispatchEvent(_),_.defaultPrevented||(y3e(_3e(Fre(s)),{select:!0}),document.activeElement===y&&mp(s))}return()=>{s.removeEventListener(PA,u),setTimeout(()=>{const _=new CustomEvent(TA,SB);s.addEventListener(TA,c),s.dispatchEvent(_),_.defaultPrevented||mp(y??document.body,{select:!0}),s.removeEventListener(TA,c),EB.remove(p)},0)}}},[s,u,c,p]);const x=b.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(w&&_){const C=y.currentTarget,[O,P]=w3e(C);O&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&mp(O,{select:!0})):y.shiftKey&&_===O&&(y.preventDefault(),n&&mp(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,p.paused]);return b.createElement(MR.div,Ni({tabIndex:-1},a,{ref:h,onKeyDown:x}))});function y3e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mp(r,{select:t}),document.activeElement!==n)return}function w3e(e){const t=Fre(e),n=_B(t,e),r=_B(t.reverse(),e);return[n,r]}function Fre(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _B(e,t){for(const n of e)if(!x3e(n,{upTo:t}))return n}function x3e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b3e(e){return e instanceof HTMLInputElement&&"select"in e}function mp(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&b3e(e)&&t&&e.select()}}const EB=S3e();function S3e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=CB(e,t),e.unshift(t)},remove(t){var n;e=CB(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function CB(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _3e(e){return e.filter(t=>t.tagName!=="A")}const E3e=b.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?_Y.createPortal(b.createElement(MR.div,Ni({},o,{ref:t})),r):null});function C3e(e,t){return b.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const jR=e=>{const{present:t,children:n}=e,r=O3e(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Sb(r.ref,o.ref);return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};jR.displayName="Presence";function O3e(e){const[t,n]=b.useState(),r=b.useRef({}),o=b.useRef(e),i=b.useRef("none"),a=e?"mounted":"unmounted",[s,l]=C3e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=T_(r.current);i.current=s==="mounted"?u:"none"},[s]),qD(()=>{const u=r.current,c=o.current;if(c!==e){const h=i.current,p=T_(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),qD(()=>{if(t){const u=d=>{const p=T_(r.current).includes(d.animationName);d.target===t&&p&&zs.flushSync(()=>l("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=T_(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:b.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function T_(e){return(e==null?void 0:e.animationName)||"none"}let AA=0;function R3e(){b.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:OB()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:OB()),AA++,()=>{AA===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),AA--}},[])}function OB(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Bre=aQ(),kA=function(){},IR=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:kA,onWheelCapture:kA,onTouchMoveCapture:kA}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,x=e.inert,y=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,C=yL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,P=iQ([n,t]),R=Pi(Pi({},C),o);return b.createElement(b.Fragment,null,c&&b.createElement(O,{sideCar:Bre,removeScrollBar:u,shards:d,noIsolation:p,inert:x,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?b.cloneElement(b.Children.only(s),Pi(Pi({},R),{ref:P})):b.createElement(_,Pi({},R,{className:l,ref:P}),s))});IR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};IR.classNames={fullWidth:hw,zeroRight:dw};var WD=!1;if(typeof window<"u")try{var A_=Object.defineProperty({},"passive",{get:function(){return WD=!0,!0}});window.addEventListener("test",A_,A_),window.removeEventListener("test",A_,A_)}catch{WD=!1}var Zg=WD?{passive:!1}:!1,P3e=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},T3e=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},RB=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=zre(e,n);if(r){var o=qre(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},A3e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},k3e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zre=function(e,t){return e==="v"?P3e(t):T3e(t)},qre=function(e,t){return e==="v"?A3e(t):k3e(t)},N3e=function(e,t){return e==="h"&&t==="rtl"?-1:1},M3e=function(e,t,n,r,o){var i=N3e(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,h=0;do{var p=qre(e,s),x=p[0],y=p[1],w=p[2],_=y-w-i*x;(x||_)&&zre(e,s)&&(d+=_,h+=x),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&d===0||!c&&h===0)&&(u=!0),u},k_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},PB=function(e){return[e.deltaX,e.deltaY]},TB=function(e){return e&&"current"in e?e.current:e},j3e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},I3e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},D3e=0,Jg=[];function L3e(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(D3e++)[0],i=b.useState(function(){return wL()})[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=oQ([e.lockRef.current],(e.shards||[]).map(TB),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(y,w){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var _=k_(y),C=n.current,O="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],R,T=y.target,k=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in y&&k==="h"&&T.type==="range")return!1;var M=RB(k,T);if(!M)return!0;if(M?R=k:(R=k==="v"?"h":"v",M=RB(k,T)),!M)return!1;if(!r.current&&"changedTouches"in y&&(O||P)&&(r.current=R),!R)return!0;var j=r.current||R;return M3e(j,w,y,j==="h"?O:P)},[]),l=b.useCallback(function(y){var w=y;if(!(!Jg.length||Jg[Jg.length-1]!==i)){var _="deltaY"in w?PB(w):k_(w),C=t.current.filter(function(R){return R.name===w.type&&R.target===w.target&&j3e(R.delta,_)})[0];if(C&&C.should){w.preventDefault();return}if(!C){var O=(a.current.shards||[]).map(TB).filter(Boolean).filter(function(R){return R.contains(w.target)}),P=O.length>0?s(w,O[0]):!a.current.noIsolation;P&&w.preventDefault()}}},[]),u=b.useCallback(function(y,w,_,C){var O={name:y,delta:w,target:_,should:C};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),c=b.useCallback(function(y){n.current=k_(y),r.current=void 0},[]),d=b.useCallback(function(y){u(y.type,PB(y),y.target,s(y,e.lockRef.current))},[]),h=b.useCallback(function(y){u(y.type,k_(y),y.target,s(y,e.lockRef.current))},[]);b.useEffect(function(){return Jg.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Zg),document.addEventListener("touchmove",l,Zg),document.addEventListener("touchstart",c,Zg),function(){Jg=Jg.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,Zg),document.removeEventListener("touchmove",l,Zg),document.removeEventListener("touchstart",c,Zg)}},[]);var p=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(i,{styles:I3e(o)}):null,p?b.createElement(cQ,{gapMode:"margin"}):null)}const $3e=lQ(Bre,L3e);var Ure=b.forwardRef(function(e,t){return b.createElement(IR,Pi({},e,{ref:t,sideCar:$3e}))});Ure.classNames=IR.classNames;const Vre="Dialog",[Wre]=J5e(Vre),[F3e,xm]=Wre(Vre),B3e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=b.useRef(null),l=b.useRef(null),[u=!1,c]=r3e({prop:r,defaultProp:o,onChange:i});return b.createElement(F3e,{scope:t,triggerRef:s,contentRef:l,contentId:RA(),titleId:RA(),descriptionId:RA(),open:u,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a},n)},Hre="DialogPortal",[z3e,Gre]=Wre(Hre,{forceMount:void 0}),q3e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=xm(Hre,t);return b.createElement(z3e,{scope:t,forceMount:n},b.Children.map(r,a=>b.createElement(jR,{present:n||i.open},b.createElement(E3e,{asChild:!0,container:o},a))))},HD="DialogOverlay",U3e=b.forwardRef((e,t)=>{const n=Gre(HD,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=xm(HD,e.__scopeDialog);return i.modal?b.createElement(jR,{present:r||i.open},b.createElement(V3e,Ni({},o,{ref:t}))):null}),V3e=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xm(HD,n);return b.createElement(Ure,{as:z$,allowPinchZoom:!0,shards:[o.contentRef]},b.createElement(MR.div,Ni({"data-state":Yre(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),ly="DialogContent",W3e=b.forwardRef((e,t)=>{const n=Gre(ly,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=xm(ly,e.__scopeDialog);return b.createElement(jR,{present:r||i.open},i.modal?b.createElement(H3e,Ni({},o,{ref:t})):b.createElement(G3e,Ni({},o,{ref:t})))}),H3e=b.forwardRef((e,t)=>{const n=xm(ly,e.__scopeDialog),r=b.useRef(null),o=Sb(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return tb(i)},[]),b.createElement(Kre,Ni({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_v(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_v(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:_v(e.onFocusOutside,i=>i.preventDefault())}))}),G3e=b.forwardRef((e,t)=>{const n=xm(ly,e.__scopeDialog),r=b.useRef(!1);return b.createElement(Kre,Ni({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(r.current=!0);const s=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),Kre=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=xm(ly,n),l=b.useRef(null),u=Sb(t,l);return R3e(),b.createElement(b.Fragment,null,b.createElement(v3e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},b.createElement(p3e,Ni({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Yre(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),K3e="DialogTitle";function Yre(e){return e?"open":"closed"}const Y3e="DialogTitleWarning";Z5e(Y3e,{contentName:ly,titleName:K3e,docsSlug:"dialog"});const X3e=B3e,Q3e=q3e,Z3e=U3e,J3e=W3e;var eLe='[cmdk-list-sizer=""]',I1='[cmdk-group=""]',NA='[cmdk-group-items=""]',tLe='[cmdk-group-heading=""]',q$='[cmdk-item=""]',AB=`${q$}:not([aria-disabled="true"])`,GD="cmdk-item-select",Vc="data-value",nLe=(e,t)=>X5e(e,t),Xre=b.createContext(void 0),_b=()=>b.useContext(Xre),Qre=b.createContext(void 0),U$=()=>b.useContext(Qre),Zre=b.createContext(void 0),Jre=b.forwardRef((e,t)=>{let n=b.useRef(null),r=lv(()=>{var K,z,X;return{search:"",value:(X=(z=e.value)!=null?z:(K=e.defaultValue)==null?void 0:K.toLowerCase())!=null?X:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=lv(()=>new Set),i=lv(()=>new Map),a=lv(()=>new Map),s=lv(()=>new Set),l=eoe(e),{label:u,children:c,value:d,onValueChange:h,filter:p,shouldFilter:x,vimBindings:y=!0,...w}=e,_=b.useId(),C=b.useId(),O=b.useId(),P=hLe();Zy(()=>{if(d!==void 0){let K=d.trim().toLowerCase();r.current.value=K,P(6,L),R.emit()}},[d]);let R=b.useMemo(()=>({subscribe:K=>(s.current.add(K),()=>s.current.delete(K)),snapshot:()=>r.current,setState:(K,z,X)=>{var ee,ae,fe;if(!Object.is(r.current[K],z)){if(r.current[K]=z,K==="search")$(),M(),P(1,j);else if(K==="value")if(((ee=l.current)==null?void 0:ee.value)!==void 0){let ie=z??"";(fe=(ae=l.current).onValueChange)==null||fe.call(ae,ie);return}else X||P(5,L);R.emit()}},emit:()=>{s.current.forEach(K=>K())}}),[]),T=b.useMemo(()=>({value:(K,z)=>{z!==a.current.get(K)&&(a.current.set(K,z),r.current.filtered.items.set(K,k(z)),P(2,()=>{M(),R.emit()}))},item:(K,z)=>(o.current.add(K),z&&(i.current.has(z)?i.current.get(z).add(K):i.current.set(z,new Set([K]))),P(3,()=>{$(),M(),r.current.value||j(),R.emit()}),()=>{a.current.delete(K),o.current.delete(K),r.current.filtered.items.delete(K);let X=V();P(4,()=>{$(),(X==null?void 0:X.getAttribute("id"))===K&&j(),R.emit()})}),group:K=>(i.current.has(K)||i.current.set(K,new Set),()=>{a.current.delete(K),i.current.delete(K)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],commandRef:n,listId:_,inputId:O,labelId:C}),[]);function k(K){var z,X;let ee=(X=(z=l.current)==null?void 0:z.filter)!=null?X:nLe;return K?ee(K,r.current.search):0}function M(){if(!n.current||!r.current.search||l.current.shouldFilter===!1)return;let K=r.current.filtered.items,z=[];r.current.filtered.groups.forEach(ee=>{let ae=i.current.get(ee),fe=0;ae.forEach(ie=>{let ge=K.get(ie);fe=Math.max(ge,fe)}),z.push([ee,fe])});let X=n.current.querySelector(eLe);G().sort((ee,ae)=>{var fe,ie;let ge=ee.getAttribute(Vc),he=ae.getAttribute(Vc);return((fe=K.get(he))!=null?fe:0)-((ie=K.get(ge))!=null?ie:0)}).forEach(ee=>{let ae=ee.closest(NA);ae?ae.appendChild(ee.parentElement===ae?ee:ee.closest(`${NA} > *`)):X.appendChild(ee.parentElement===X?ee:ee.closest(`${NA} > *`))}),z.sort((ee,ae)=>ae[1]-ee[1]).forEach(ee=>{let ae=n.current.querySelector(`${I1}[${Vc}="${ee[0]}"]`);ae==null||ae.parentElement.appendChild(ae)})}function j(){let K=G().find(X=>!X.ariaDisabled),z=K==null?void 0:K.getAttribute(Vc);R.setState("value",z||void 0)}function $(){if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let K=0;for(let z of o.current){let X=a.current.get(z),ee=k(X);r.current.filtered.items.set(z,ee),ee>0&&K++}for(let[z,X]of i.current)for(let ee of X)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(z);break}r.current.filtered.count=K}function L(){var K,z,X;let ee=V();ee&&(((K=ee.parentElement)==null?void 0:K.firstChild)===ee&&((X=(z=ee.closest(I1))==null?void 0:z.querySelector(tLe))==null||X.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function V(){var K;return(K=n.current)==null?void 0:K.querySelector(`${q$}[aria-selected="true"]`)}function G(){return Array.from(n.current.querySelectorAll(AB))}function D(K){let z=G()[K];z&&R.setState("value",z.getAttribute(Vc))}function H(K){var z;let X=V(),ee=G(),ae=ee.findIndex(ie=>ie===X),fe=ee[ae+K];(z=l.current)!=null&&z.loop&&(fe=ae+K<0?ee[ee.length-1]:ae+K===ee.length?ee[0]:ee[ae+K]),fe&&R.setState("value",fe.getAttribute(Vc))}function U(K){let z=V(),X=z==null?void 0:z.closest(I1),ee;for(;X&&!ee;)X=K>0?fLe(X,I1):dLe(X,I1),ee=X==null?void 0:X.querySelector(AB);ee?R.setState("value",ee.getAttribute(Vc)):H(K)}let Y=()=>D(G().length-1),q=K=>{K.preventDefault(),K.metaKey?Y():K.altKey?U(1):H(1)},W=K=>{K.preventDefault(),K.metaKey?D(0):K.altKey?U(-1):H(-1)};return b.createElement("div",{ref:Eb([n,t]),...w,"cmdk-root":"",onKeyDown:K=>{var z;if((z=w.onKeyDown)==null||z.call(w,K),!K.defaultPrevented)switch(K.key){case"n":case"j":{y&&K.ctrlKey&&q(K);break}case"ArrowDown":{q(K);break}case"p":case"k":{y&&K.ctrlKey&&W(K);break}case"ArrowUp":{W(K);break}case"Home":{K.preventDefault(),D(0);break}case"End":{K.preventDefault(),Y();break}case"Enter":if(!K.nativeEvent.isComposing){K.preventDefault();let X=V();if(X){let ee=new Event(GD);X.dispatchEvent(ee)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:pLe},u),b.createElement(Qre.Provider,{value:R},b.createElement(Xre.Provider,{value:T},c)))}),rLe=b.forwardRef((e,t)=>{var n,r;let o=b.useId(),i=b.useRef(null),a=b.useContext(Zre),s=_b(),l=eoe(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Zy(()=>s.item(o,a==null?void 0:a.id),[]);let c=toe(o,i,[e.value,e.children,i]),d=U$(),h=cm(R=>R.value&&R.value===c.current),p=cm(R=>u||s.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);b.useEffect(()=>{let R=i.current;if(!(!R||e.disabled))return R.addEventListener(GD,x),()=>R.removeEventListener(GD,x)},[p,e.onSelect,e.disabled]);function x(){var R,T;y(),(T=(R=l.current).onSelect)==null||T.call(R,c.current)}function y(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:w,value:_,onSelect:C,forceMount:O,...P}=e;return b.createElement("div",{ref:Eb([i,t]),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":w||void 0,"aria-selected":h||void 0,"data-disabled":w||void 0,"data-selected":h||void 0,onPointerMove:w?void 0:y,onClick:w?void 0:x},e.children)}),oLe=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=b.useId(),s=b.useRef(null),l=b.useRef(null),u=b.useId(),c=_b(),d=cm(x=>o||c.filter()===!1?!0:x.search?x.filtered.groups.has(a):!0);Zy(()=>c.group(a),[]),toe(a,s,[e.value,e.heading,l]);let h=b.useMemo(()=>({id:a,forceMount:o}),[o]),p=b.createElement(Zre.Provider,{value:h},r);return b.createElement("div",{ref:Eb([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&b.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},p))}),iLe=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=b.useRef(null),i=cm(a=>!a.search);return!n&&!i?null:b.createElement("div",{ref:Eb([o,t]),...r,"cmdk-separator":"",role:"separator"})}),aLe=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=U$(),a=cm(c=>c.search),s=cm(c=>c.value),l=_b(),u=b.useMemo(()=>{var c;let d=(c=l.commandRef.current)==null?void 0:c.querySelector(`${q$}[${Vc}="${s}"]`);return d==null?void 0:d.getAttribute("id")},[s,l.commandRef]);return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:o?e.value:a,onChange:c=>{o||i.setState("search",c.target.value),n==null||n(c.target.value)}})}),sLe=b.forwardRef((e,t)=>{let{children:n,...r}=e,o=b.useRef(null),i=b.useRef(null),a=_b();return b.useEffect(()=>{if(i.current&&o.current){let s=i.current,l=o.current,u,c=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let d=s.offsetHeight;l.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(u),c.unobserve(s)}}},[]),b.createElement("div",{ref:Eb([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},b.createElement("div",{ref:i,"cmdk-list-sizer":""},n))}),lLe=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...s}=e;return b.createElement(X3e,{open:n,onOpenChange:r},b.createElement(Q3e,{container:a},b.createElement(Z3e,{"cmdk-overlay":"",className:o}),b.createElement(J3e,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(Jre,{ref:t,...s}))))}),uLe=b.forwardRef((e,t)=>{let n=b.useRef(!0),r=cm(o=>o.filtered.count===0);return b.useEffect(()=>{n.current=!1},[]),n.current||!r?null:b.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),cLe=b.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return b.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},b.createElement("div",{"aria-hidden":!0},r))}),ja=Object.assign(Jre,{List:sLe,Item:rLe,Input:aLe,Group:oLe,Separator:iLe,Dialog:lLe,Empty:uLe,Loading:cLe});function fLe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dLe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function eoe(e){let t=b.useRef(e);return Zy(()=>{t.current=e}),t}var Zy=typeof window>"u"?b.useEffect:b.useLayoutEffect;function lv(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function Eb(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function cm(e){let t=U$(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function toe(e,t,n){let r=b.useRef(),o=_b();return Zy(()=>{var i;let a=(()=>{var s;for(let l of n){if(typeof l=="string")return l.trim().toLowerCase();if(typeof l=="object"&&"current"in l)return l.current?(s=l.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();o.value(e,a),(i=t.current)==null||i.setAttribute(Vc,a),r.current=a}),r}var hLe=()=>{let[e,t]=b.useState(),n=lv(()=>new Map);return Zy(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},pLe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const V$=b.forwardRef(({className:e,...t},n)=>v.jsx(ja,{ref:n,className:je("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));V$.displayName=ja.displayName;const noe=b.forwardRef(({className:e,...t},n)=>v.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[v.jsx($Q,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v.jsx(ja.Input,{ref:n,className:je("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));noe.displayName=ja.Input.displayName;const W$=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.List,{ref:n,className:je("max-h-[300px] overflow-y-auto overflow-x-hidden overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch]",e),...t}));W$.displayName=ja.List.displayName;const roe=b.forwardRef((e,t)=>v.jsx(ja.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));roe.displayName=ja.Empty.displayName;const yC=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Group,{ref:n,className:je("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));yC.displayName=ja.Group.displayName;const ooe=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Separator,{ref:n,className:je("-mx-1 h-px bg-border",e),...t}));ooe.displayName=ja.Separator.displayName;const wC=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Item,{ref:n,className:je("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));wC.displayName=ja.Item.displayName;const mLe="hsl(var(--brand))",gLe="color-mix(in srgb, hsl(var(--brand)) 70%, hsl(var(--foreground)))",vLe=(e,t)=>{if(!e)return[];const n=[],r=e.split(/(\s+)/);for(const o of r){if(/^\s+$/.test(o)){n.push({text:o,isFilter:!1});continue}const i=t.some(a=>o.toLowerCase().startsWith(a.key.toLowerCase()));n.push({text:o,isFilter:i})}return n};function ioe({value:e,onChange:t,onSubmit:n,getAutocomplete:r,applySuggestion:o,autocompleteContext:i,renderSuggestion:a,filterChips:s,placeholder:l="Search...",className:u,searchIcon:c,clearIcon:d,popoverClassName:h}){var q;const p=b.useRef(null),x=b.useRef(null),y=b.useRef(!1),[w,_]=b.useState(!1),[C,O]=b.useState(),[P,R]=b.useState(e),T=b.useRef([]),k=b.useRef(e),M=b.useRef(null),j=!!(s!=null&&s.length);b.useEffect(()=>{R(e)},[e]),b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const $=b.useMemo(()=>j?vLe(P,s):[],[P,s,j]);b.useEffect(()=>{const W=p.current;if(!W||!j)return;const K=()=>{M.current&&(M.current.style.transform=`translateX(-${W.scrollLeft}px)`)};return W.addEventListener("scroll",K),K(),()=>W.removeEventListener("scroll",K)},[P,j]);const{suggestions:L}=b.useMemo(()=>r(P,i),[r,P,i]);b.useEffect(()=>{(T.current.length!==L.length||T.current.some((K,z)=>{var X;return K.value!==((X=L[z])==null?void 0:X.value)}))&&(O(void 0),T.current=L)},[L]),b.useEffect(()=>{P.endsWith(" ")&&!k.current.endsWith(" ")&&P.length>k.current.length&&L.length>0&&_(!0),k.current=P},[P,L.length]);const V=b.useCallback(()=>{n?n(P):t(P)},[P,t,n]),G=b.useCallback(W=>{const K=L[W];if(K){const z=o(P,K);R(z),K.type==="value"&&(t(z),_(!1),y.current=!0),setTimeout(()=>{const X=p.current;X&&(X.focus(),X.setSelectionRange(z.length,z.length)),setTimeout(()=>{y.current=!1},50)},0)}},[P,L,o,t]),D=b.useCallback(W=>{if(W.key==="Enter"){if(W.preventDefault(),w&&L.length>0){const K=C!==void 0?C:0;L[K]&&G(K)}else V(),_(!1);return}if(!(!w||L.length===0)){if(W.key==="Escape")_(!1),O(void 0);else if(W.key==="ArrowDown")W.preventDefault(),O(K=>K===void 0?0:KK===void 0?L.length-1:K>0?K-1:L.length-1);else if(W.key==="Tab"){W.preventDefault();const K=C!==void 0?C:0;L[K]&&G(K)}}},[w,L,C,G,V]),H=b.useCallback((W,K)=>v.jsxs("div",{className:je("flex items-center justify-between w-full",K&&"text-accent-foreground"),children:[v.jsxs("div",{className:"flex items-center gap-2",children:[W.color&&v.jsx("div",{className:je(W.color,"h-[6px] w-[6px] rounded-full")}),W.type==="key"?v.jsxs("code",{className:"py-0.5 text-xs font-mono",children:[W.label,":"]}):v.jsx("span",{className:"py-0.5 font-mono text-xs",children:W.label})]}),W.description&&v.jsx("span",{className:"text-xs text-muted-foreground truncate ml-2",children:W.description})]}),[]),U=a||H,Y=b.useCallback(()=>{var W;R(""),t(""),(W=p.current)==null||W.focus(),_(!1)},[t]);return v.jsx("div",{className:je("space-y-2",u),children:v.jsxs(Wy,{open:w&&L.length>0,modal:!1,children:[v.jsx(Hy,{asChild:!0,children:v.jsxs("div",{className:"relative",children:[c||v.jsx($Q,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),v.jsx(ri,{ref:p,type:"text",value:P,onChange:W=>{const K=W.target.value;R(K),K.length>0&&_(!0)},onKeyDown:D,onFocus:()=>{x.current&&(clearTimeout(x.current),x.current=null),y.current||_(!0)},onBlur:()=>{x.current=setTimeout(()=>{_(!1),x.current=null},200)},placeholder:l,className:je("pl-9 pr-8",j&&"text-transparent"),style:j?{caretColor:"hsl(var(--foreground))"}:void 0,"data-cy":"search-bar-input"}),j&&P&&v.jsx("div",{className:"absolute inset-[1px] pointer-events-none overflow-hidden flex items-center pl-9 pr-8","aria-hidden":"true",children:v.jsx("div",{ref:M,className:"text-sm text-foreground whitespace-pre",children:$.map((W,K)=>{if(!W.isFilter)return v.jsx("span",{children:W.text},K);const z=W.text.indexOf(":"),X=W.text.slice(0,z+1),ee=W.text.slice(z+1);return v.jsxs("span",{children:[v.jsx("span",{style:{color:mLe},children:X}),ee&&v.jsx("span",{style:{color:gLe},children:ee})]},K)})})}),P&&v.jsx("button",{type:"button",onClick:Y,"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","data-cy":"search-bar-clear",children:d||v.jsx(Qv,{className:"h-4 w-4"})})]})}),v.jsx(wm,{className:je("w-[var(--radix-popover-trigger-width)] min-w-[320px] p-0 lg:max-w-[560px]",h),align:"start",onOpenAutoFocus:W=>W.preventDefault(),onCloseAutoFocus:W=>W.preventDefault(),children:L.length>0&&v.jsx(V$,{value:C!==void 0?(q=L[C])==null?void 0:q.value:void 0,children:v.jsx(W$,{className:"max-h-[300px] bg-muted/50","data-cy":"search-bar-suggestions",children:v.jsx(yC,{children:L.map((W,K)=>v.jsx(wC,{value:W.value,onSelect:()=>G(K),className:je("flex items-center justify-between aria-selected:bg-primary/5 text-primary/60",C!==void 0&&K===C&&"text-accent-foreground"),onMouseEnter:()=>O(K),"data-cy":`search-bar-suggestion-${K}`,children:U(W,C===K)},`${W.value}-${K}`))})})},L.map(W=>W.value).join(","))})]})})}function kB({value:e,onChange:t,autocompleteContext:n,placeholder:r="Filter spans...",className:o}){return v.jsx(ioe,{value:e,onChange:t,onSubmit:t,getAutocomplete:B5e,applySuggestion:z5e,autocompleteContext:n,placeholder:r,className:o,filterChips:B$.map(i=>({key:i.value,label:i.label,description:i.description}))})}const yw=({doc:e,label:t,queryParams:n,scrollTo:r,variant:o="button"})=>{const{open:i}=Pm(),a=()=>{i({type:"docs",content:e,queryParams:n,scrollTo:r})};switch(o){case"button":return v.jsx(wt,{onClick:a,leftIcon:v.jsx(u1e,{className:"size-4"}),variant:"outline",children:v.jsx("span",{children:t})});case"text":return v.jsx("span",{onClick:a,className:"underline hover:text-gray-900 dark:hover:text-gray-100 hover:cursor-pointer",children:t});default:const s=o;throw new Error(`Unhandled variant type: ${s}`)}},yLe=Ul("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-red-300 bg-red-50/50 text-red-700 dark:border-red-800 dark:bg-red-950/40 dark:text-red-300 [&>svg]:text-red-700 dark:[&>svg]:text-red-300",warn:"border-yellow-400 dark:border-yellow-800",info:"border-blue-200 bg-blue-50/50 dark:border-blue-900 dark:bg-blue-950/30"}},defaultVariants:{variant:"default"}}),xC=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,role:"alert",className:je(yLe({variant:t}),e),...n}));xC.displayName="Alert";const bC=b.forwardRef(({className:e,...t},n)=>v.jsx("h5",{ref:n,className:je("mb-1 font-medium leading-none tracking-tight",e),...t}));bC.displayName="AlertTitle";const SC=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("text-sm [&_p]:leading-relaxed",e),...t}));SC.displayName="AlertDescription";function wLe(e){const[t,n]=b.useState(()=>{if(!e)return!1;try{return localStorage.getItem(e)==="1"}catch{return!1}}),r=b.useCallback(()=>{if(e)try{localStorage.setItem(e,"1")}catch{}n(!0)},[e]);return{dismissed:t,dismiss:r}}function MA({title:e,description:t,icon:n,actions:r,dismissible:o=!1,dismissKey:i,variant:a="default",className:s}){const{dismissed:l,dismiss:u}=wLe(o?i:void 0);return l?null:v.jsxs(xC,{variant:a==="info"?"info":"default",className:je(a==="default"&&"border-border bg-card","[&>svg]:hidden",s),children:[o&&v.jsx(wt,{variant:"ghost",size:"icon",onClick:u,className:"absolute right-2 top-2 size-6 text-muted-foreground",children:v.jsx(XO,{className:"size-3.5"})}),v.jsxs("div",{className:"flex items-start gap-3",children:[n&&v.jsx("div",{className:"mt-0.5 shrink-0 text-muted-foreground",children:n}),v.jsxs("div",{className:je("flex flex-col gap-1",o&&"pr-6"),children:[v.jsx(bC,{className:"mb-0",children:e}),v.jsx(SC,{className:"text-xs leading-snug text-muted-foreground",children:t}),r&&v.jsx("div",{className:"mt-2 flex gap-2",children:r})]})]})]})}const ww={v1:{quickstart:{title:"Quickstart",href:"https://docs.hatchet.run/v1/quickstart"},workers:{title:"Workers",href:"https://docs.hatchet.run/v1/workers"},"scheduled-runs":{title:"Scheduled Runs",href:"https://docs.hatchet.run/v1/scheduled-runs"},"cron-runs":{title:"Cron Runs",href:"https://docs.hatchet.run/v1/cron-runs"},events:{title:"Events",href:"https://docs.hatchet.run/v1/events"},webhooks:{title:"Webhooks",href:"https://docs.hatchet.run/v1/webhooks"},"rate-limits":{title:"Rate Limits",href:"https://docs.hatchet.run/v1/rate-limits"},"advanced-assignment":{"worker-affinity":{title:"Worker Affinity",href:"https://docs.hatchet.run/v1/advanced-assignment/worker-affinity"}},logging:{title:"Logging",href:"https://docs.hatchet.run/v1/logging"},opentelemetry:{title:"OpenTelemetry",href:"https://docs.hatchet.run/v1/opentelemetry"},security:{"audit-logs":{title:"Audit Logs",href:"https://docs.hatchet.run/v1/security/audit-logs"}}},"self-hosting":{"configuration-options":{title:"Engine Configuration Options",href:"https://docs.hatchet.run/self-hosting/configuration-options"}}};function xLe(){const{isControlPlaneEnabled:e}=Iy(),t=In({queryKey:["metadata:get",e],queryFn:async()=>{try{return await(e?Mt.metadataGet():rt.metadataGet())}catch(r){return console.error("Failed to get API metadata",r),null}},retry:!1,staleTime:1e3*60});return{meta:b.useMemo(()=>{var r;return(r=t.data)==null?void 0:r.data},[t.data]),isLoading:!1}}function bLe(e){return e.length>0}function KD(e,t){t.add(e.spanId),e.children.forEach(n=>KD(n,t))}function YD(e,t,n=[]){for(const r of e){if(r.spanId===t)return n;const o=YD(r.children,t,[...n,r.spanId]);if(o)return o}}function aoe(e,t){var n;for(const r of e){if(r.spanName===Mi.ENGINE_WORKFLOW_RUN&&((n=r.spanAttributes)==null?void 0:n[ki.WORKFLOW_RUN_ID])===t)return r;const o=aoe(r.children,t);if(o)return o}}function soe(e,t){return e.map(n=>({...n,isContextOnly:!t.has(n.spanId),children:soe(n.children,t)}))}const SLe="0001-01-01T00:00:00Z",_Le=e=>({spanId:e.spanId,parentSpanId:e.parentSpanId,spanName:e.spanName,statusCode:e.statusCode,statusMessage:e.statusMessage,durationNs:e.durationNs,createdAt:e.createdAt,spanAttributes:e.spanAttributes});function ELe(e){const t=new Set,n=new Map,r=new Set;for(const i of e)if(i.spanName&&r.add(i.spanName),!!i.spanAttributes)for(const[a,s]of Object.entries(i.spanAttributes)){t.add(a);let l=n.get(a);l||(l=new Set,n.set(a,l)),l.add(s)}const o=new Map;for(const[i,a]of n)o.set(i,[...a].sort());return{attributeKeys:[...t].sort(),attributeValues:o,spanNames:[...r].sort()}}const CLe=e=>{const{isRunning:t,tasks:n,workflowRunCreatedAt:r,workflowRunStartedAt:o}=e,i=e.taskRunId??e.workflowRunExternalId,{tenant:a}=Hs({from:At.tenantRoute.to}),{isCloudEnabled:s}=z3(a),{meta:l}=xLe(),{queryString:u,setQueryString:c}=v$(),d=15e3,[h,p]=b.useState(!1);b.useEffect(()=>{if(t){p(!1);return}p(!0);const k=setTimeout(()=>p(!1),d);return()=>clearTimeout(k)},[t]);const x=In({queryKey:[a,i],queryFn:async()=>{var M,j;return(j=(M=(await rt.v1ObservabilityGetTrace(a,{run_external_id:i,limit:1e3})).data)==null?void 0:M.rows)==null?void 0:j.map(_Le)},refetchInterval:t||h?5e3:!1}),y=x.data,w=b.useMemo(()=>ELe(y??[]),[y]),_=b.useMemo(()=>{if(!r)return;const k=o&&o!==SLe&&!Number.isNaN(new Date(o).getTime())?o:void 0;return{createdAt:r,startedAt:k}},[r,o]),C=b.useMemo(()=>{let k=null;const M=!!(y&&bLe(y)),j=M?void 0:_,$={enableTraceInProgressSynthesis:!M};if(M)k=dB(y,n,j,$);else{const L=n==null?void 0:n.filter(V=>V.status==="QUEUED"||V.status==="RUNNING");L&&L.length>0&&(k=dB(void 0,L,j,$))}return!k||k.length===0?null:(k[0].inProgress=t&&!js(k[0]),k)},[y,_,t,n]),O=b.useMemo(()=>L5e(u),[u]),P=b.useMemo(()=>{if(C){if(e.taskRunId){const k=bre(C,e.taskRunId);if(k){const M=new Set;KD(k,M);const j=YD(C,k.spanId);return j&&j.forEach($=>M.add($)),M}}else if(e.workflowRunExternalId){const k=aoe(C,e.workflowRunExternalId);if(k){const M=new Set;KD(k,M);const j=YD(C,k.spanId);return j&&j.forEach($=>M.add($)),M}}}},[C,e.taskRunId,e.workflowRunExternalId]),R=b.useMemo(()=>{if(!C)return null;const k=j5e(C,O);return P?soe(k,P):k},[C,O,P]);if(!x.isFetched)return v.jsx(gb,{});if(!R||R.length===0)return v.jsxs("div",{className:"flex flex-col gap-4",children:[C&&v.jsx(kB,{value:u,onChange:c,autocompleteContext:w}),C?v.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"No spans match the current filter."}):!s&&!(l!=null&&l.observabilityEnabled)?v.jsx(MA,{icon:v.jsx(N2,{className:"size-4"}),title:"Enable Observability",description:v.jsxs(v.Fragment,{children:["Trace collection is not enabled on this instance. Set"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"SERVER_OBSERVABILITY_ENABLED=true"})," ","in your server configuration to start collecting traces."]}),actions:v.jsx(yw,{doc:ww["self-hosting"]["configuration-options"],label:"View setup guide",variant:"text"})}):v.jsx(MA,{icon:v.jsx(N2,{className:"size-4"}),title:"No traces found",description:v.jsxs(v.Fragment,{children:["To collect traces, use the"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"HatchetInstrumentor"})," ","in your SDK."]}),actions:v.jsx(yw,{doc:ww.v1.opentelemetry,label:"View instrumentation docs",variant:"text"})})]});const T=!t&&e5e(R);return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx(kB,{value:u,onChange:c,autocompleteContext:w}),T&&v.jsx(MA,{variant:"info",dismissible:!0,dismissKey:"hatchet:dismiss-traces-enrichment-hint",icon:v.jsx(N2,{className:"size-4"}),title:"Enrich your traces",description:v.jsxs(v.Fragment,{children:["These traces only contain engine-generated spans. Add the"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"HatchetInstrumentor"})," ","to your SDK to capture custom spans from your application code."]}),actions:v.jsx(yw,{doc:ww.v1.opentelemetry,label:"View instrumentation docs",variant:"text"})}),v.jsx(A5e,{spanTrees:R,isRunning:t,contextTaskRunId:e.taskRunId,onClearFilters:u?()=>c(""):void 0})]})},OLe=e=>{const{isLoading:t,data:n}=In({...io.v1Tasks.get(e.taskRunId)});if(t||!n)return null;const r=(n.status===qt.FAILED?n.errorMessage:JSON.stringify(n.output,null,2))||"";return v.jsx(cf,{className:"my-4",language:"json",code:r})},loe=["error","warn","info","debug"],ket={error:Xi.ERROR,warn:Xi.WARN,info:Xi.INFO,debug:Xi.DEBUG},RLe={error:"bg-red-500",warn:"bg-yellow-500",info:"bg-green-500",debug:"bg-slate-500"},PLe={error:"Error messages",warn:"Warning messages",info:"Informational messages",debug:"Debug messages"},Ev={LEVEL:"level",ATTEMPT:"attempt",WORKFLOW:"workflow"},xw=[{type:"key",label:"level",value:`${Ev.LEVEL}:`,description:"Filter by log level"},{type:"key",label:"attempt",value:`${Ev.ATTEMPT}:`,description:"Filter by attempt number"},{type:"key",label:"workflow",value:`${Ev.WORKFLOW}:`,description:"Filter by workflow name"}];function TLe(e,t){const{availableAttempts:n=[],workflowNames:r=[]}=t,o=e.trimEnd(),i=o.split(" ").pop()||"";if(e.endsWith(" ")&&!o.endsWith(":"))return{mode:"key",suggestions:xw};if(o==="")return{mode:"key",suggestions:xw};const a=`${Ev.LEVEL}:`,s=`${Ev.ATTEMPT}:`,l=`${Ev.WORKFLOW}:`;if(i.startsWith(a)){const c=i.slice(a.length).toLowerCase();return{mode:"value",suggestions:loe.filter(h=>h.startsWith(c)).map(h=>({type:"value",label:h,value:h,description:PLe[h],color:RLe[h]}))}}if(i.startsWith(s)){const c=i.slice(s.length);return{mode:"value",suggestions:(n??[1,2,3]).filter(p=>String(p).startsWith(c)).map(p=>({type:"value",label:String(p),value:String(p),description:`Attempt ${p}`}))}}if(i.startsWith(l)){const c=i.slice(l.length).toLowerCase();return{mode:"value",suggestions:[...r].sort((h,p)=>h.localeCompare(p)).filter(h=>h.toLowerCase().startsWith(c)).map(h=>({type:"value",label:h,value:h}))}}const u=xw.filter(c=>c.value.startsWith(i.toLowerCase())&&i.length>0);return u.length>0?{mode:"key",suggestions:u}:{mode:"none",suggestions:[]}}function ALe(e,t){return Ire(e,t,xw)}function kLe(e){const t=[],n=[];let r,o,i;for(const a of jre(e))if(Mre(a)){const{key:s,value:l}=a;if(s.toLowerCase()==="level"){const u=l.toLowerCase();loe.includes(u)?r=u:t.push(`Invalid log level: "${l}"`)}else if(s.toLowerCase()==="attempt"){const u=parseInt(l,10);!isNaN(u)&&u>0?o=u:t.push(`Invalid attempt number: "${l}"`)}else s.toLowerCase()==="workflow"?i=l:n.push(`${s}:${l}`)}else n.push(a.text);return{search:n.length>0?n.join(" "):void 0,level:r,attempt:o,workflow:i,raw:e,isValid:t.length===0,errors:t}}const jA=100,IA=e=>`${e.createdAt}-${e.message}`;function NLe({taskRun:e,resetTrigger:t}){var w;const n=ec(),r=b.useRef(void 0),o=b.useRef(!1),i=b.useRef(null),[a,s]=b.useState(""),[l,u]=b.useState(!0),c=b.useMemo(()=>kLe(a),[a]),d=(e==null?void 0:e.status)===qt.RUNNING;b.useEffect(()=>{e!=null&&e.metadata.id&&(n.resetQueries({queryKey:["v1Tasks","getLogs",e.metadata.id],exact:!1}),r.current=void 0)},[t,n,e==null?void 0:e.metadata.id,c.level,c.search,c.attempt]);const h=npe({queryKey:["v1Tasks","getLogs",e==null?void 0:e.metadata.id,c.level,c.search,c.attempt],queryFn:async({pageParam:_})=>{var T;const C={limit:jA,..._&&{since:_.since,until:_.until},...c.level&&{levels:[c.level.toUpperCase()]},...c.search&&{search:c.search},...c.attempt&&{attempt:c.attempt},order_by_direction:jX.DESC},O=await rt.v1LogLineList((e==null?void 0:e.metadata.id)||"",C),P=O.data.rows,R=(T=P==null?void 0:P[0])==null?void 0:T.createdAt;return d&&R&&(r.current=R),O.data},initialPageParam:{since:void 0,until:void 0},enabled:!!e,maxPages:0,refetchInterval:!1,staleTime:1/0,getNextPageParam:_=>{const C=_==null?void 0:_.rows;if(C&&C.length===jA){const O=C[C.length-1];return{since:void 0,until:O==null?void 0:O.createdAt}}}});b.useEffect(()=>{if(!d||!l||!(e!=null&&e.metadata.id))return;i.current&&clearTimeout(i.current),o.current=!1,i.current=null;const _=async()=>{var C;if(!o.current){o.current=!0;try{const O={limit:jA,...r.current&&{since:r.current},...c.level&&{levels:[c.level.toUpperCase()]},...c.search&&{search:c.search},...c.attempt&&{attempt:c.attempt}},R=(await rt.v1LogLineList(e.metadata.id,O)).data.rows;R&&R.length>0&&(r.current=(C=R[0])==null?void 0:C.createdAt,n.setQueryData(["v1Tasks","getLogs",e.metadata.id,c.level,c.search,c.attempt],T=>{if(!T)return T;const k=T.pages[0],M=(k==null?void 0:k.rows)||[],j=new Set(M.map(V=>IA(V))),$=R.filter(V=>!j.has(IA(V))),L={...k,rows:[...$,...M]};return{...T,pages:[L,...T.pages.slice(1)]}}))}catch(O){console.error("Failed to poll for new logs:",O)}finally{o.current=!1,i.current=setTimeout(_,1e3)}}};return _(),()=>{i.current&&clearTimeout(i.current),o.current=!1}},[d,l,e==null?void 0:e.metadata.id,c.level,c.search,c.attempt,n]);const p=b.useMemo(()=>{var C;if(!((C=h.data)!=null&&C.pages))return[];const _=new Map;return h.data.pages.forEach(O=>{var P;(P=O==null?void 0:O.rows)==null||P.forEach(R=>{const T=IA(R);_.has(T)||_.set(T,{timestamp:R.createdAt,line:R.message,instance:e==null?void 0:e.displayName,level:R.level,metadata:R.metadata,attempt:R.attempt})})}),Array.from(_.values())},[(w=h.data)==null?void 0:w.pages,e==null?void 0:e.displayName]),x=b.useMemo(()=>Array.from({length:((e==null?void 0:e.retryCount)??0)+1},(_,C)=>C+1),[e==null?void 0:e.retryCount]),y=b.useCallback(()=>{!h.isFetchingNextPage&&h.hasNextPage&&h.fetchNextPage()},[h]);return{logs:p,isLoading:h.isLoading,isFetchingMore:h.isFetchingNextPage,queryString:a,setQueryString:s,parsedQuery:c,fetchOlderLogs:y,setPollingEnabled:u,taskStatus:e==null?void 0:e.status,availableAttempts:x}}const uoe=b.createContext(null);function MLe({taskRun:e,resetTrigger:t,children:n}){const r=NLe({taskRun:e,resetTrigger:t});return v.jsx(uoe.Provider,{value:r,children:n})}function coe(){const e=b.useContext(uoe);if(!e)throw new Error("useLogsContext must be used within a LogsProvider");return e}function jLe({placeholder:e="Search logs...",className:t}){const{queryString:n,setQueryString:r,availableAttempts:o}=coe(),i=b.useMemo(()=>({availableAttempts:o}),[o]);return v.jsx(ioe,{value:n,onChange:r,onSubmit:r,getAutocomplete:TLe,applySuggestion:ALe,autocompleteContext:i,placeholder:e,className:t,filterChips:xw.map(a=>({key:a.value,label:a.label,description:a.description}))})}function ILe({taskRun:e,resetTrigger:t}){return v.jsx(MLe,{taskRun:e,resetTrigger:t,children:v.jsx(DLe,{})})}function DLe(){const{logs:e,fetchOlderLogs:t,setPollingEnabled:n,queryString:r,isLoading:o,taskStatus:i}=coe();return v.jsxs("div",{className:"my-4 flex flex-col gap-y-2 flex-1 min-h-0",children:[v.jsx(jLe,{}),v.jsx(tre,{logs:e,onScrollToBottom:t,onAtTopChange:n,isLoading:o,taskStatus:i},r)]})}function LLe({workflowConfig:e}){const[t,n]=b.useState(!1);return v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(e??{})),n(!0),setTimeout(()=>n(!1),2e3)},children:t?v.jsxs(v.Fragment,{children:[v.jsx(fL,{className:"mr-2 size-3"}),"Copied!"]}):v.jsxs(v.Fragment,{children:[v.jsx(N1e,{className:"mr-2 size-3"}),"Copy Config"]})})}const $Le=({workflowId:e})=>{const{tenantId:t}=Ma();return v.jsx(Bl,{to:At.tenantWorkflowRoute.to,params:{tenant:t,workflow:e},target:"_blank",rel:"noreferrer",children:v.jsx(wt,{size:"sm",variant:"outline",leftIcon:v.jsx(Nxe,{className:"size-4"}),children:"Workflow"})})};var H$=(e=>(e.Output="output",e.ChildWorkflowRuns="child-workflow-runs",e.Input="input",e.Logs="logs",e.Traces="traces",e.AdditionalMetadata="additional-metadata",e.Activity="activity",e))(H$||{});const DA=[qt.CANCELLED,qt.FAILED,qt.COMPLETED],FLe=({taskRun:e,showViewTaskRunButton:t})=>{const{tenant:n}=Hs({from:At.tenantRoute.to});return t?v.jsx(Bl,{to:At.tenantRunRoute.to,params:{tenant:n,run:e.metadata.id},children:v.jsx(wt,{size:"sm",variant:"outline",leftIcon:v.jsx(i7,{className:"size-4"}),children:"Expand"})}):e.workflowRunExternalId&&e.workflowRunExternalId!==vY&&e.workflowRunExternalId!==e.metadata.id?v.jsx(Bl,{to:At.tenantRunRoute.to,params:{tenant:n,run:e.workflowRunExternalId},children:v.jsx(wt,{size:"sm",variant:"outline",leftIcon:v.jsx(i7,{className:"size-4"}),children:"View DAG Run"})}):null},BLe=({taskRunId:e,defaultOpenTab:t="activity",showViewTaskRunButton:n})=>{const[r,o]=b.useState(0),i=v$(),{set:a}=i,s=i.tab??"overview",l=b.useCallback(()=>{a({focusedTaskRunId:e,tab:"traces"})},[e,a]),u=In({...io.v1Tasks.get(e),refetchInterval:h=>{var x;const p=(x=h.state.data)==null?void 0:x.status;return Lte(p)?5e3:300}}),{isSkipped:c}=m$({taskRunId:e}),d=u.data;return u.isLoading?v.jsx(gb,{}):d?v.jsxs("div",{className:"flex w-full flex-col gap-4 h-full",children:[v.jsx("div",{className:"flex flex-row items-center justify-between",children:v.jsx("div",{className:"flex w-full flex-row items-center justify-between",children:v.jsxs("div",{className:"flex flex-row items-center gap-4",children:[d.status&&v.jsx(_J,{status:d.status,isSkipped:c}),v.jsx("h3",{className:"flex flex-row items-center gap-4 font-mono text-lg font-semibold leading-tight tracking-tight text-foreground",children:d.displayName||"Task Run Detail"})]})})}),d.parentTaskExternalId&&v.jsx(qLe,{tenant:d.tenantId,parentTaskExternalId:d.parentTaskExternalId}),v.jsx("div",{className:"side-responsive-layout flex flex-col items-start justify-start gap-2",children:v.jsxs("div",{className:"side-responsive-inner flex w-full flex-col items-start gap-2",children:[v.jsx("div",{className:"flex flex-row items-center gap-2",children:v.jsxs(gD,{tableKey:"task-run-detail",children:[v.jsx(rC,{actionType:"replay",paramOverrides:{externalIds:[e]},disabled:!DA.includes(d.status),showModal:!1,showLabel:!0}),v.jsx(rC,{actionType:"cancel",paramOverrides:{externalIds:[e]},disabled:DA.includes(d.status),showModal:!1,showLabel:!0})]})}),v.jsxs("div",{className:"flex flex-row items-center gap-2",children:[v.jsx(FLe,{taskRun:d,showViewTaskRunButton:n||!1}),v.jsx($Le,{workflowId:d.workflowId}),v.jsx(LLe,{workflowConfig:d.workflowConfig})]})]})}),v.jsx("div",{className:"flex flex-row items-center gap-2",children:v.jsx(zLe,{taskRunId:e})}),v.jsxs(JE,{value:s,onValueChange:h=>{i.setTab(h),h==="logs"&&o(p=>p+1)},className:"flex flex-1 min-h-0 flex-col",children:[v.jsxs(Uw,{layout:"underlined",className:"mb-4",children:[v.jsx(Sa,{variant:"underlined",value:"overview",children:"Overview"}),v.jsx(Sa,{variant:"underlined",value:"traces",children:"Traces"}),v.jsx(Sa,{variant:"underlined",value:"logs",children:"Logs"})]}),v.jsxs(_a,{value:"overview",className:"flex min-h-0 flex-1 flex-col",children:[v.jsx("div",{className:"relative flex w-full bg-slate-100 dark:bg-slate-900",children:v.jsx(gDe,{onClick:l,taskRunId:e})}),v.jsx("div",{className:"h-4"}),v.jsxs(JE,{defaultValue:t,className:"flex min-h-0 flex-1 flex-col",children:[v.jsxs(Uw,{layout:"underlined",children:[v.jsx(Sa,{variant:"underlined",value:"activity",children:"Activity"}),v.jsx(Sa,{variant:"underlined",value:"output",children:"Output"}),d.numSpawnedChildren>0&&v.jsxs(Sa,{variant:"underlined",value:"child-workflow-runs",children:["Children (",d.numSpawnedChildren,")"]}),v.jsx(Sa,{variant:"underlined",value:"input",children:"Input"}),v.jsx(Sa,{variant:"underlined",value:"additional-metadata",className:"side-responsive-layout",children:v.jsxs("span",{className:"side-responsive-inner flex",children:[v.jsx("span",{className:"side-sm:hidden block",children:"Metadata"}),v.jsx("span",{className:"side-sm:block hidden",children:"Additional Metadata"})]})})]}),v.jsx(_a,{value:"output",className:"flex-1 min-h-0 overflow-y-auto",children:v.jsx(OLe,{taskRunId:e})}),v.jsx(_a,{value:"activity",className:"mt-4 flex-1 min-h-0 flex flex-col",children:v.jsx(jDe,{taskRunId:e,isDurable:d.isDurable})}),v.jsx(_a,{value:"child-workflow-runs",className:"mt-4",children:v.jsx("div",{className:"flex flex-col h-96",children:v.jsx(gD,{tableKey:`child-runs-${e}`,display:{hideCounts:!0,hideMetrics:!0,hideDateFilter:!0,hideTriggerRunButton:!0},runFilters:{parentTaskExternalId:e},children:v.jsx(lle,{})})})}),v.jsx(_a,{value:"input",className:"flex-1 min-h-0 overflow-y-auto",children:d.input&&v.jsx(cf,{className:"my-4",language:"json",code:JSON.stringify(d.input,null,2)})}),v.jsx(_a,{value:"additional-metadata",className:"flex-1 min-h-0 overflow-y-auto",children:v.jsx(cf,{className:"my-4",language:"json",code:JSON.stringify(d.additionalMetadata??{},null,2)})})]})]}),v.jsx(_a,{value:"traces",className:"min-h-0 flex-1 overflow-auto",children:v.jsx(CLe,{taskRunId:e,isRunning:!DA.includes(d.status),tasks:[{externalId:d.metadata.id,displayName:d.displayName,status:d.status,createdAt:d.metadata.createdAt,startedAt:d.startedAt}]})}),v.jsx(_a,{value:"logs",className:"min-h-0 flex-1 flex flex-col",children:v.jsx(ILe,{resetTrigger:r,taskRun:d})})]})]}):v.jsx("div",{children:"No events found"})},zLe=({taskRunId:e})=>{const t=In({...io.v1Tasks.get(e)}),{isSkipped:n}=m$({taskRunId:e}),r=[],o=t.data;if(t.isLoading||!o)return v.jsx(gb,{});o.startedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Started ",v.jsx(Ml,{date:o.startedAt})]},"created")),o.status===qt.FAILED&&o.finishedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Failed ",v.jsx(Ml,{date:o.finishedAt})]},"finished")),o.status===qt.COMPLETED&&o.finishedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:[n?"Skipped ":"Succeeded ",v.jsx(Ml,{date:o.finishedAt})]},"finished")),o.duration&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Run took ",gY(o.duration)]},"duration"));const i=[];return r.forEach((a,s)=>{i.push(a),s{const{decorative:n,orientation:r=NB,...o}=e,i=WLe(r)?r:NB,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(Dee.div,{"data-orientation":i,...s,...o,ref:t})});foe.displayName=ULe;function WLe(e){return VLe.includes(e)}var doe=foe;const qd=b.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,flush:r=!1,...o},i)=>v.jsx(doe,{ref:i,decorative:n,orientation:t,className:je("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r&&t==="horizontal"&&"relative left-1/2 right-1/2 -ml-[50cqw] -mr-[50cqw] w-[100cqw] max-w-[100cqw]",r&&t==="vertical"&&"relative top-1/2 bottom-1/2 -mt-[50cqh] -mb-[50cqh] h-[100cqh] max-h-[100cqh]",e),...o}));qd.displayName=doe.displayName;var Cb=e=>e.type==="checkbox",Ep=e=>e instanceof Date,Ea=e=>e==null;const hoe=e=>typeof e=="object";var oo=e=>!Ea(e)&&!Array.isArray(e)&&hoe(e)&&!Ep(e),poe=e=>oo(e)&&e.target?Cb(e.target)?e.target.checked:e.target.value:e,moe=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),HLe=e=>{const t=e.constructor&&e.constructor.prototype;return oo(t)&&t.hasOwnProperty("isPrototypeOf")},G$=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fo(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(G$&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(oo(e)&&HLe(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=fo(e[o]));return r}var DR=e=>/^\w*$/.test(e),kr=e=>e===void 0,K$=e=>Array.isArray(e)?e.filter(Boolean):[],Y$=e=>K$(e.replace(/["|']|\]/g,"").split(/\.|\[/)),lt=(e,t,n)=>{if(!t||!oo(e))return n;const r=(DR(t)?[t]:Y$(t)).reduce((o,i)=>Ea(o)?o:o[i],e);return kr(r)||r===e?kr(e[t])?n:e[t]:r},ns=e=>typeof e=="boolean",Ki=e=>typeof e=="function",ur=(e,t,n)=>{let r=-1;const o=DR(t)?[t]:Y$(t),i=o.length,a=i-1;for(;++rJ.useContext(voe);var yoe=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==Pl.all&&(t._proxyFormState[a]=!r||Pl.all),n&&(n[a]=!0),e[a]}});return o};const Q$=typeof window<"u"?J.useLayoutEffect:J.useEffect;function GLe(e){const t=X$(),{control:n=t,disabled:r,name:o,exact:i}=e||{},[a,s]=J.useState(n._formState),l=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Q$(()=>n._subscribe({name:o,formState:l.current,exact:i,callback:u=>{!r&&s({...n._formState,...u})}}),[o,r,i]),J.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),J.useMemo(()=>yoe(a,n,l.current,!1),[a,n])}var Yi=e=>typeof e=="string",XD=(e,t,n,r,o)=>Yi(e)?(r&&t.watch.add(e),lt(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),lt(n,i))):(r&&(t.watchAll=!0),n),QD=e=>Ea(e)||!hoe(e);function Tl(e,t,n=new WeakSet){if(QD(e)||QD(t))return Object.is(e,t);if(Ep(e)&&Ep(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const a=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Ep(a)&&Ep(s)||(oo(a)||Array.isArray(a))&&(oo(s)||Array.isArray(s))?!Tl(a,s,n):!Object.is(a,s))return!1}}return!0}function KLe(e){const t=X$(),{control:n=t,name:r,defaultValue:o,disabled:i,exact:a,compute:s}=e||{},l=J.useRef(o),u=J.useRef(s),c=J.useRef(void 0),d=J.useRef(n),h=J.useRef(r);u.current=s;const[p,x]=J.useState(()=>{const P=n._getWatch(r,l.current);return u.current?u.current(P):P}),y=J.useCallback(P=>{const R=XD(r,n._names,P||n._formValues,!1,l.current);return u.current?u.current(R):R},[n._formValues,n._names,r]),w=J.useCallback(P=>{if(!i){const R=XD(r,n._names,P||n._formValues,!1,l.current);if(u.current){const T=u.current(R);Tl(T,c.current)||(x(T),c.current=T)}else x(R)}},[n._formValues,n._names,i,r]);Q$(()=>((d.current!==n||!Tl(h.current,r))&&(d.current=n,h.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:P=>{w(P.values)}})),[n,a,r,w]),J.useEffect(()=>n._removeUnmounted());const _=d.current!==n,C=h.current,O=J.useMemo(()=>{if(i)return null;const P=!_&&!Tl(C,r);return _||P?y():null},[i,_,r,C,y]);return O!==null?O:p}function YLe(e){const t=X$(),{name:n,disabled:r,control:o=t,shouldUnregister:i,defaultValue:a,exact:s=!0}=e,l=moe(o._names.array,n),u=J.useMemo(()=>lt(o._formValues,n,lt(o._defaultValues,n,a)),[o,n,a]),c=KLe({control:o,name:n,defaultValue:u,exact:s}),d=GLe({control:o,name:n,exact:s}),h=J.useRef(e),p=J.useRef(void 0),x=J.useRef(o.register(n,{...e.rules,value:c,...ns(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const y=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!lt(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!lt(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!lt(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!lt(d.validatingFields,n)},error:{enumerable:!0,get:()=>lt(d.errors,n)}}),[d,n]),w=J.useCallback(P=>x.current.onChange({target:{value:poe(P),name:n},type:pd.CHANGE}),[n]),_=J.useCallback(()=>x.current.onBlur({target:{value:lt(o._formValues,n),name:n},type:pd.BLUR}),[n,o._formValues]),C=J.useCallback(P=>{const R=lt(o._fields,n);R&&R._f&&P&&(R._f.ref={focus:()=>Ki(P.focus)&&P.focus(),select:()=>Ki(P.select)&&P.select(),setCustomValidity:T=>Ki(P.setCustomValidity)&&P.setCustomValidity(T),reportValidity:()=>Ki(P.reportValidity)&&P.reportValidity()})},[o._fields,n]),O=J.useMemo(()=>({name:n,value:c,...ns(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:w,onBlur:_,ref:C}),[n,r,d.disabled,w,_,C,c]);return J.useEffect(()=>{const P=o._options.shouldUnregister||i,R=p.current;R&&R!==n&&!l&&o.unregister(R),o.register(n,{...h.current.rules,...ns(h.current.disabled)?{disabled:h.current.disabled}:{}});const T=(k,M)=>{const j=lt(o._fields,k);j&&j._f&&(j._f.mount=M)};if(T(n,!0),P){const k=fo(lt(o._options.defaultValues,n,h.current.defaultValue));ur(o._defaultValues,n,k),kr(lt(o._formValues,n))&&ur(o._formValues,n,k)}return!l&&o.register(n),p.current=n,()=>{(l?P&&!o._state.action:P)?o.unregister(n):T(n,!1)}},[n,o,l,i]),J.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),J.useMemo(()=>({field:O,formState:d,fieldState:y}),[O,d,y])}const Net=e=>e.render(YLe(e)),XLe=J.createContext(null);XLe.displayName="HookFormContext";var woe=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},bw=e=>Array.isArray(e)?e:[e],MB=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}};function xoe(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&oo(o)&&i){const a=xoe(o,i);oo(a)&&(n[r]=a)}else e[r]&&(n[r]=i)}return n}var Hi=e=>oo(e)&&!Object.keys(e).length,Z$=e=>e.type==="file",_C=e=>{if(!G$)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},boe=e=>e.type==="select-multiple",J$=e=>e.type==="radio",QLe=e=>J$(e)||Cb(e),$A=e=>_C(e)&&e.isConnected;function ZLe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{for(const t in e)if(Ki(e[t]))return!0;return!1};function Soe(e){return Array.isArray(e)||oo(e)&&!e$e(e)}function ZD(e,t={}){for(const n in e){const r=e[n];Soe(r)?(t[n]=Array.isArray(r)?[]:{},ZD(r,t[n])):kr(r)||(t[n]=!0)}return t}function nw(e,t,n){n||(n=ZD(t));for(const r in e){const o=e[r];if(Soe(o))kr(t)||QD(n[r])?n[r]=ZD(o,Array.isArray(o)?[]:{}):nw(o,Ea(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!Tl(o,i)}}return n}const jB={value:!1,isValid:!1},IB={value:!0,isValid:!0};var _oe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!kr(e[0].attributes.value)?kr(e[0].value)||e[0].value===""?IB:{value:e[0].value,isValid:!0}:IB:jB}return jB},Eoe=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>kr(e)?e:t?e===""?NaN:e&&+e:n&&Yi(e)?new Date(e):r?r(e):e;const DB={isValid:!1,value:null};var Coe=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,DB):DB;function LB(e){const t=e.ref;return Z$(t)?t.files:J$(t)?Coe(e.refs).value:boe(t)?[...t.selectedOptions].map(({value:n})=>n):Cb(t)?_oe(e.refs).value:Eoe(kr(t.value)?e.ref.value:t.value,e)}var t$e=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,n$e=(e,t,n,r)=>{const o={};for(const i of e){const a=lt(t,i);a&&ur(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},EC=e=>e instanceof RegExp,D1=e=>kr(e)?e:EC(e)?e.source:oo(e)?EC(e.value)?e.value.source:e.value:e,$B=e=>({isOnSubmit:!e||e===Pl.onSubmit,isOnBlur:e===Pl.onBlur,isOnChange:e===Pl.onChange,isOnAll:e===Pl.all,isOnTouch:e===Pl.onTouched});const FB="AsyncFunction";var r$e=e=>!!e&&!!e.validate&&!!(Ki(e.validate)&&e.validate.constructor.name===FB||oo(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===FB)),o$e=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),BB=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Sw=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=lt(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Sw(s,t))break}else if(oo(s)&&Sw(s,t))break}}};function zB(e,t,n){const r=lt(e,n);if(r||DR(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=lt(t,i),s=lt(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};o.pop()}return{name:n}}var i$e=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Hi(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||Pl.all))},a$e=(e,t,n)=>!e||!t||e===t||bw(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),s$e=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,l$e=(e,t)=>!K$(lt(e,t)).length&&ho(e,t),u$e=(e,t,n)=>{const r=bw(lt(e,n));return ur(r,goe,t[n]),ur(e,n,r),e};function qB(e,t,n="validate"){if(Yi(e)||Array.isArray(e)&&e.every(Yi)||ns(e)&&!e)return{type:n,message:Yi(e)?e:"",ref:t}}var ev=e=>oo(e)&&!EC(e)?e:{value:e,message:""},UB=async(e,t,n,r,o,i)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:d,max:h,pattern:p,validate:x,name:y,valueAsNumber:w,mount:_}=e._f,C=lt(n,y);if(!_||t.has(y))return{};const O=s?s[0]:a,P=V=>{o&&O.reportValidity&&(O.setCustomValidity(ns(V)?"":V||""),O.reportValidity())},R={},T=J$(a),k=Cb(a),M=T||k,j=(w||Z$(a))&&kr(a.value)&&kr(C)||_C(a)&&a.value===""||C===""||Array.isArray(C)&&!C.length,$=woe.bind(null,y,r,R),L=(V,G,D,H=bl.maxLength,U=bl.minLength)=>{const Y=V?G:D;R[y]={type:V?H:U,message:Y,ref:a,...$(V?H:U,Y)}};if(i?!Array.isArray(C)||!C.length:l&&(!M&&(j||Ea(C))||ns(C)&&!C||k&&!_oe(s).isValid||T&&!Coe(s).isValid)){const{value:V,message:G}=Yi(l)?{value:!!l,message:l}:ev(l);if(V&&(R[y]={type:bl.required,message:G,ref:O,...$(bl.required,G)},!r))return P(G),R}if(!j&&(!Ea(d)||!Ea(h))){let V,G;const D=ev(h),H=ev(d);if(!Ea(C)&&!isNaN(C)){const U=a.valueAsNumber||C&&+C;Ea(D.value)||(V=U>D.value),Ea(H.value)||(G=Unew Date(new Date().toDateString()+" "+K),q=a.type=="time",W=a.type=="week";Yi(D.value)&&C&&(V=q?Y(C)>Y(D.value):W?C>D.value:U>new Date(D.value)),Yi(H.value)&&C&&(G=q?Y(C)+V.value,H=!Ea(G.value)&&C.length<+G.value;if((D||H)&&(L(D,V.message,G.message),!r))return P(R[y].message),R}if(p&&!j&&Yi(C)){const{value:V,message:G}=ev(p);if(EC(V)&&!C.match(V)&&(R[y]={type:bl.pattern,message:G,ref:a,...$(bl.pattern,G)},!r))return P(G),R}if(x){if(Ki(x)){const V=await x(C,n),G=qB(V,O);if(G&&(R[y]={...G,...$(bl.validate,G.message)},!r))return P(G.message),R}else if(oo(x)){let V={};for(const G in x){if(!Hi(V)&&!r)break;const D=qB(await x[G](C,n),O,G);D&&(V={...D,...$(G,D.message)},P(D.message),r&&(R[y]=V))}if(!Hi(V)&&(R[y]={ref:O,...V},!r))return R}}return P(!0),R};const c$e={mode:Pl.onSubmit,reValidateMode:Pl.onChange,shouldFocusError:!0};function f$e(e={}){let t={...c$e,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ki(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=oo(t.defaultValues)||oo(t.values)?fo(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:fo(o),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...c};let h={...d};const p={array:MB(),state:MB()},x=t.criteriaMode===Pl.all,y=oe=>de=>{clearTimeout(u),u=setTimeout(oe,de)},w=async oe=>{if(!a.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||oe)){let de;t.resolver?(de=Hi((await j()).errors),_()):de=await V({fields:r,onlyCheckValid:!0,eventType:pd.VALID}),de!==n.isValid&&p.state.next({isValid:de})}},_=(oe,de)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((oe||Array.from(s.mount)).forEach(Se=>{Se&&(de?ur(n.validatingFields,Se,de):ho(n.validatingFields,Se))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Hi(n.validatingFields)}))},C=oe=>{const de=nw(o,i),Se=t$e(oe);ur(n.dirtyFields,Se,lt(de,Se))},O=(oe,de=[],Se,Ve,Ye=!0,He=!0)=>{if(Ve&&Se&&!t.disabled){if(a.action=!0,He&&Array.isArray(lt(r,oe))){const tt=Se(lt(r,oe),Ve.argA,Ve.argB);Ye&&ur(r,oe,tt)}if(He&&Array.isArray(lt(n.errors,oe))){const tt=Se(lt(n.errors,oe),Ve.argA,Ve.argB);Ye&&ur(n.errors,oe,tt),l$e(n.errors,oe)}if((d.touchedFields||h.touchedFields)&&He&&Array.isArray(lt(n.touchedFields,oe))){const tt=Se(lt(n.touchedFields,oe),Ve.argA,Ve.argB);Ye&&ur(n.touchedFields,oe,tt)}(d.dirtyFields||h.dirtyFields)&&C(oe),p.state.next({name:oe,isDirty:D(oe,de),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ur(i,oe,de)},P=(oe,de)=>{ur(n.errors,oe,de),p.state.next({errors:n.errors})},R=oe=>{n.errors=oe,p.state.next({errors:n.errors,isValid:!1})},T=(oe,de,Se,Ve)=>{const Ye=lt(r,oe);if(Ye){const He=lt(i,oe,kr(Se)?lt(o,oe):Se);kr(He)||Ve&&Ve.defaultChecked||de?ur(i,oe,de?He:LB(Ye._f)):Y(oe,He),a.mount&&!a.action&&w()}},k=(oe,de,Se,Ve,Ye)=>{let He=!1,tt=!1;const Tt={name:oe};if(!t.disabled){if(!Se||Ve){(d.isDirty||h.isDirty)&&(tt=n.isDirty,n.isDirty=Tt.isDirty=D(),He=tt!==Tt.isDirty);const Ot=Tl(lt(o,oe),de);tt=!!lt(n.dirtyFields,oe),Ot?ho(n.dirtyFields,oe):ur(n.dirtyFields,oe,!0),Tt.dirtyFields=n.dirtyFields,He=He||(d.dirtyFields||h.dirtyFields)&&tt!==!Ot}if(Se){const Ot=lt(n.touchedFields,oe);Ot||(ur(n.touchedFields,oe,Se),Tt.touchedFields=n.touchedFields,He=He||(d.touchedFields||h.touchedFields)&&Ot!==Se)}He&&Ye&&p.state.next(Tt)}return He?Tt:{}},M=(oe,de,Se,Ve)=>{const Ye=lt(n.errors,oe),He=(d.isValid||h.isValid)&&ns(de)&&n.isValid!==de;if(t.delayError&&Se?(l=y(()=>P(oe,Se)),l(t.delayError)):(clearTimeout(u),l=null,Se?ur(n.errors,oe,Se):ho(n.errors,oe)),(Se?!Tl(Ye,Se):Ye)||!Hi(Ve)||He){const tt={...Ve,...He&&ns(de)?{isValid:de}:{},errors:n.errors,name:oe};n={...n,...tt},p.state.next(tt)}},j=async oe=>(_(oe,!0),await t.resolver(i,t.context,n$e(oe||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),$=async oe=>{const{errors:de}=await j(oe);if(_(oe),oe)for(const Se of oe){const Ve=lt(de,Se);Ve?ur(n.errors,Se,Ve):ho(n.errors,Se)}else n.errors=de;return de},L=async({name:oe,eventType:de})=>{if(e.validate){const Se=await e.validate({formValues:i,formState:n,name:oe,eventType:de});if(oo(Se))for(const Ve in Se)Se[Ve]&&ie(`${LA}.${Ve}`,{message:Yi(Se.message)?Se.message:"",type:bl.validate});else Yi(Se)||!Se?ie(LA,{message:Se||"",type:bl.validate}):fe(LA);return Se}return!0},V=async({fields:oe,onlyCheckValid:de,name:Se,eventType:Ve,context:Ye={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ye.runRootValidation=!0,!await L({name:Se,eventType:Ve})&&(Ye.valid=!1,de)))return Ye.valid;for(const He in oe){const tt=oe[He];if(tt){const{_f:Tt,...Ot}=tt;if(Tt){const an=s.array.has(Tt.name),tr=tt._f&&r$e(tt._f);tr&&d.validatingFields&&_([Tt.name],!0);const $n=await UB(tt,s.disabled,i,x,t.shouldUseNativeValidation&&!de,an);if(tr&&d.validatingFields&&_([Tt.name]),$n[Tt.name]&&(Ye.valid=!1,de)||(!de&&(lt($n,Tt.name)?an?u$e(n.errors,$n,Tt.name):ur(n.errors,Tt.name,$n[Tt.name]):ho(n.errors,Tt.name)),e.shouldUseNativeValidation&&$n[Tt.name]))break}!Hi(Ot)&&await V({context:Ye,onlyCheckValid:de,fields:Ot,name:He,eventType:Ve})}}return Ye.valid},G=()=>{for(const oe of s.unMount){const de=lt(r,oe);de&&(de._f.refs?de._f.refs.every(Se=>!$A(Se)):!$A(de._f.ref))&&we(oe)}s.unMount=new Set},D=(oe,de)=>!t.disabled&&(oe&&de&&ur(i,oe,de),!Tl(ee(),o)),H=(oe,de,Se)=>XD(oe,s,{...a.mount?i:kr(de)?o:Yi(oe)?{[oe]:de}:de},Se,de),U=oe=>K$(lt(a.mount?i:o,oe,t.shouldUnregister?lt(o,oe,[]):[])),Y=(oe,de,Se={})=>{const Ve=lt(r,oe);let Ye=de;if(Ve){const He=Ve._f;He&&(!He.disabled&&ur(i,oe,Eoe(de,He)),Ye=_C(He.ref)&&Ea(de)?"":de,boe(He.ref)?[...He.ref.options].forEach(tt=>tt.selected=Ye.includes(tt.value)):He.refs?Cb(He.ref)?He.refs.forEach(tt=>{(!tt.defaultChecked||!tt.disabled)&&(Array.isArray(Ye)?tt.checked=!!Ye.find(Tt=>Tt===tt.value):tt.checked=Ye===tt.value||!!Ye)}):He.refs.forEach(tt=>tt.checked=tt.value===Ye):Z$(He.ref)?He.ref.value="":(He.ref.value=Ye,He.ref.type||p.state.next({name:oe,values:fo(i)})))}(Se.shouldDirty||Se.shouldTouch)&&k(oe,Ye,Se.shouldTouch,Se.shouldDirty,!0),Se.shouldValidate&&X(oe)},q=(oe,de,Se)=>{for(const Ve in de){if(!de.hasOwnProperty(Ve))return;const Ye=de[Ve],He=oe+"."+Ve,tt=lt(r,He);(s.array.has(oe)||oo(Ye)||tt&&!tt._f)&&!Ep(Ye)?q(He,Ye,Se):Y(He,Ye,Se)}},W=(oe,de,Se={})=>{const Ve=lt(r,oe),Ye=s.array.has(oe),He=fo(de);ur(i,oe,He),Ye?(p.array.next({name:oe,values:fo(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&Se.shouldDirty&&(C(oe),p.state.next({name:oe,dirtyFields:n.dirtyFields,isDirty:D(oe,He)}))):Ve&&!Ve._f&&!Ea(He)?q(oe,He,Se):Y(oe,He,Se),BB(oe,s)?p.state.next({...n,name:oe,values:fo(i)}):p.state.next({name:a.mount?oe:void 0,values:fo(i)})},K=async oe=>{a.mount=!0;const de=oe.target;let Se=de.name,Ve=!0;const Ye=lt(r,Se),He=Ot=>{Ve=Number.isNaN(Ot)||Ep(Ot)&&isNaN(Ot.getTime())||Tl(Ot,lt(i,Se,Ot))},tt=$B(t.mode),Tt=$B(t.reValidateMode);if(Ye){let Ot,an;const tr=de.type?LB(Ye._f):poe(oe),$n=oe.type===pd.BLUR||oe.type===pd.FOCUS_OUT,Mr=!o$e(Ye._f)&&!e.validate&&!t.resolver&&!lt(n.errors,Se)&&!Ye._f.deps||s$e($n,lt(n.touchedFields,Se),n.isSubmitted,Tt,tt),Ee=BB(Se,s,$n);ur(i,Se,tr),$n?(!de||!de.readOnly)&&(Ye._f.onBlur&&Ye._f.onBlur(oe),l&&l(0)):Ye._f.onChange&&Ye._f.onChange(oe);const Ce=k(Se,tr,$n),me=!Hi(Ce)||Ee;if(!$n&&p.state.next({name:Se,type:oe.type,values:fo(i)}),Mr)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?$n&&w():$n||w()),me&&p.state.next({name:Se,...Ee?{}:Ce});if(!t.resolver&&e.validate&&await L({name:Se,eventType:oe.type}),!$n&&Ee&&p.state.next({...n}),t.resolver){const{errors:Te}=await j([Se]);if(_([Se]),He(tr),Ve){const De=zB(n.errors,r,Se),Fe=zB(Te,r,De.name||Se);Ot=Fe.error,Se=Fe.name,an=Hi(Te)}}else _([Se],!0),Ot=(await UB(Ye,s.disabled,i,x,t.shouldUseNativeValidation))[Se],_([Se]),He(tr),Ve&&(Ot?an=!1:(d.isValid||h.isValid)&&(an=await V({fields:r,onlyCheckValid:!0,name:Se,eventType:oe.type})));Ve&&(Ye._f.deps&&(!Array.isArray(Ye._f.deps)||Ye._f.deps.length>0)&&X(Ye._f.deps),M(Se,an,Ot,Ce))}},z=(oe,de)=>{if(lt(n.errors,de)&&oe.focus)return oe.focus(),1},X=async(oe,de={})=>{let Se,Ve;const Ye=bw(oe);if(t.resolver){const He=await $(kr(oe)?oe:Ye);Se=Hi(He),Ve=oe?!Ye.some(tt=>lt(He,tt)):Se}else oe?(Ve=(await Promise.all(Ye.map(async He=>{const tt=lt(r,He);return await V({fields:tt&&tt._f?{[He]:tt}:tt,eventType:pd.TRIGGER})}))).every(Boolean),!(!Ve&&!n.isValid)&&w()):Ve=Se=await V({fields:r,name:oe,eventType:pd.TRIGGER});return p.state.next({...!Yi(oe)||(d.isValid||h.isValid)&&Se!==n.isValid?{}:{name:oe},...t.resolver||!oe?{isValid:Se}:{},errors:n.errors}),de.shouldFocus&&!Ve&&Sw(r,z,oe?Ye:s.mount),Ve},ee=(oe,de)=>{let Se={...a.mount?i:o};return de&&(Se=xoe(de.dirtyFields?n.dirtyFields:n.touchedFields,Se)),kr(oe)?Se:Yi(oe)?lt(Se,oe):oe.map(Ve=>lt(Se,Ve))},ae=(oe,de)=>({invalid:!!lt((de||n).errors,oe),isDirty:!!lt((de||n).dirtyFields,oe),error:lt((de||n).errors,oe),isValidating:!!lt(n.validatingFields,oe),isTouched:!!lt((de||n).touchedFields,oe)}),fe=oe=>{const de=oe?bw(oe):void 0;de==null||de.forEach(Se=>ho(n.errors,Se)),de?de.forEach(Se=>{p.state.next({name:Se,errors:n.errors})}):p.state.next({errors:{}})},ie=(oe,de,Se)=>{const Ve=(lt(r,oe,{_f:{}})._f||{}).ref,Ye=lt(n.errors,oe)||{},{ref:He,message:tt,type:Tt,...Ot}=Ye;ur(n.errors,oe,{...Ot,...de,ref:Ve}),p.state.next({name:oe,errors:n.errors,isValid:!1}),Se&&Se.shouldFocus&&Ve&&Ve.focus&&Ve.focus()},ge=(oe,de)=>Ki(oe)?p.state.subscribe({next:Se=>"values"in Se&&oe(H(void 0,de),Se)}):H(oe,de,!0),he=oe=>p.state.subscribe({next:de=>{a$e(oe.name,de.name,oe.exact)&&i$e(de,oe.formState||d,gn,oe.reRenderRoot)&&oe.callback({values:{...i},...n,...de,defaultValues:o})}}).unsubscribe,ue=oe=>(a.mount=!0,h={...h,...oe.formState},he({...oe,formState:{...c,...oe.formState}})),we=(oe,de={})=>{for(const Se of oe?bw(oe):s.mount)s.mount.delete(Se),s.array.delete(Se),de.keepValue||(ho(r,Se),ho(i,Se)),!de.keepError&&ho(n.errors,Se),!de.keepDirty&&ho(n.dirtyFields,Se),!de.keepTouched&&ho(n.touchedFields,Se),!de.keepIsValidating&&ho(n.validatingFields,Se),!t.shouldUnregister&&!de.keepDefaultValue&&ho(o,Se);p.state.next({values:fo(i)}),p.state.next({...n,...de.keepDirty?{isDirty:D()}:{}}),!de.keepIsValid&&w()},Ae=({disabled:oe,name:de})=>{if(ns(oe)&&a.mount||oe||s.disabled.has(de)){const Ye=s.disabled.has(de)!==!!oe;oe?s.disabled.add(de):s.disabled.delete(de),Ye&&a.mount&&!a.action&&w()}},ye=(oe,de={})=>{let Se=lt(r,oe);const Ve=ns(de.disabled)||ns(t.disabled),Ye=!s.registerName.has(oe)&&Se&&!Se._f.mount;return ur(r,oe,{...Se||{},_f:{...Se&&Se._f?Se._f:{ref:{name:oe}},name:oe,mount:!0,...de}}),s.mount.add(oe),Se&&!Ye?Ae({disabled:ns(de.disabled)?de.disabled:t.disabled,name:oe}):T(oe,!0,de.value),{...Ve?{disabled:de.disabled||t.disabled}:{},...t.progressive?{required:!!de.required,min:D1(de.min),max:D1(de.max),minLength:D1(de.minLength),maxLength:D1(de.maxLength),pattern:D1(de.pattern)}:{},name:oe,onChange:K,onBlur:K,ref:He=>{if(He){s.registerName.add(oe),ye(oe,de),s.registerName.delete(oe),Se=lt(r,oe);const tt=kr(He.value)&&He.querySelectorAll&&He.querySelectorAll("input,select,textarea")[0]||He,Tt=QLe(tt),Ot=Se._f.refs||[];if(Tt?Ot.find(an=>an===tt):tt===Se._f.ref)return;ur(r,oe,{_f:{...Se._f,...Tt?{refs:[...Ot.filter($A),tt,...Array.isArray(lt(o,oe))?[{}]:[]],ref:{type:tt.type,name:oe}}:{ref:tt}}}),T(oe,!1,void 0,tt)}else Se=lt(r,oe,{}),Se._f&&(Se._f.mount=!1),(t.shouldUnregister||de.shouldUnregister)&&!(moe(s.array,oe)&&a.action)&&s.unMount.add(oe)}}},Xe=()=>t.shouldFocusError&&Sw(r,z,s.mount),We=oe=>{ns(oe)&&(p.state.next({disabled:oe}),Sw(r,(de,Se)=>{const Ve=lt(r,Se);Ve&&(de.disabled=Ve._f.disabled||oe,Array.isArray(Ve._f.refs)&&Ve._f.refs.forEach(Ye=>{Ye.disabled=Ve._f.disabled||oe}))},0,!1))},et=(oe,de)=>async Se=>{let Ve;Se&&(Se.preventDefault&&Se.preventDefault(),Se.persist&&Se.persist());let Ye=fo(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:He,values:tt}=await j();_(),n.errors=He,Ye=fo(tt)}else await V({fields:r,eventType:pd.SUBMIT});if(s.disabled.size)for(const He of s.disabled)ho(Ye,He);if(ho(n.errors,goe),Hi(n.errors)){p.state.next({errors:{}});try{await oe(Ye,Se)}catch(He){Ve=He}}else de&&await de({...n.errors},Se),Xe(),setTimeout(Xe);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Hi(n.errors)&&!Ve,submitCount:n.submitCount+1,errors:n.errors}),Ve)throw Ve},ft=(oe,de={})=>{lt(r,oe)&&(kr(de.defaultValue)?W(oe,fo(lt(o,oe))):(W(oe,de.defaultValue),ur(o,oe,fo(de.defaultValue))),de.keepTouched||ho(n.touchedFields,oe),de.keepDirty||(ho(n.dirtyFields,oe),n.isDirty=de.defaultValue?D(oe,fo(lt(o,oe))):D()),de.keepError||(ho(n.errors,oe),d.isValid&&w()),p.state.next({...n}))},st=(oe,de={})=>{const Se=oe?fo(oe):o,Ve=fo(Se),Ye=Hi(oe),He=Ye?o:Ve;if(de.keepDefaultValues||(o=Se),!de.keepValues){if(de.keepDirtyValues){const tt=new Set([...s.mount,...Object.keys(nw(o,i))]);for(const Tt of Array.from(tt)){const Ot=lt(n.dirtyFields,Tt),an=lt(i,Tt),tr=lt(He,Tt);Ot&&!kr(an)?ur(He,Tt,an):!Ot&&!kr(tr)&&W(Tt,tr)}}else{if(G$&&kr(oe))for(const tt of s.mount){const Tt=lt(r,tt);if(Tt&&Tt._f){const Ot=Array.isArray(Tt._f.refs)?Tt._f.refs[0]:Tt._f.ref;if(_C(Ot)){const an=Ot.closest("form");if(an){an.reset();break}}}}if(de.keepFieldsRef)for(const tt of s.mount)W(tt,lt(He,tt));else r={}}i=t.shouldUnregister?de.keepDefaultValues?fo(o):{}:fo(He),p.array.next({values:{...He}}),p.state.next({values:{...He}})}s={mount:de.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!de.keepIsValid||!!de.keepDirtyValues||!t.shouldUnregister&&!Hi(He),a.watch=!!t.shouldUnregister,a.keepIsValid=!!de.keepIsValid,a.action=!1,de.keepErrors||(n.errors={}),p.state.next({submitCount:de.keepSubmitCount?n.submitCount:0,isDirty:Ye?!1:de.keepDirty?n.isDirty:!!(de.keepDefaultValues&&!Tl(oe,o)),isSubmitted:de.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ye?{}:de.keepDirtyValues?de.keepDefaultValues&&i?nw(o,i):n.dirtyFields:de.keepDefaultValues&&oe?nw(o,oe):de.keepDirty?n.dirtyFields:{},touchedFields:de.keepTouched?n.touchedFields:{},errors:de.keepErrors?n.errors:{},isSubmitSuccessful:de.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ge=(oe,de)=>st(Ki(oe)?oe(i):oe,{...t.resetOptions,...de}),Kt=(oe,de={})=>{const Se=lt(r,oe),Ve=Se&&Se._f;if(Ve){const Ye=Ve.refs?Ve.refs[0]:Ve.ref;Ye.focus&&setTimeout(()=>{Ye.focus(),de.shouldSelect&&Ki(Ye.select)&&Ye.select()})}},gn=oe=>{n={...n,...oe}},on={control:{register:ye,unregister:we,getFieldState:ae,handleSubmit:et,setError:ie,_subscribe:he,_runSchema:j,_updateIsValidating:_,_focusError:Xe,_getWatch:H,_getDirty:D,_setValid:w,_setFieldArray:O,_setDisabledField:Ae,_setErrors:R,_getFieldArray:U,_reset:st,_resetDefaultValues:()=>Ki(t.defaultValues)&&t.defaultValues().then(oe=>{Ge(oe,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:G,_disableForm:We,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(oe){a=oe},get _defaultValues(){return o},get _names(){return s},set _names(oe){s=oe},get _formState(){return n},get _options(){return t},set _options(oe){t={...t,...oe}}},subscribe:ue,trigger:X,register:ye,handleSubmit:et,watch:ge,setValue:W,getValues:ee,reset:Ge,resetField:ft,clearErrors:fe,unregister:we,setError:ie,setFocus:Kt,getFieldState:ae};return{...on,formControl:on}}function Ooe(e={}){const t=J.useRef(void 0),n=J.useRef(void 0),[r,o]=J.useState({isDirty:!1,isValidating:!1,isLoading:Ki(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ki(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Ki(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...s}=f$e(e);t.current={...s,formState:r}}const i=t.current.control;return i._options=e,Q$(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(s=>({...s,isReady:!0})),i._formState.isReady=!0,a},[i]),J.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),J.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),J.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),J.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),J.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),J.useEffect(()=>{var a;e.values&&!Tl(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((a=i._options.resetOptions)===null||a===void 0)&&a.keepIsValid||i._setValid(),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),J.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=J.useMemo(()=>yoe(r,i),[i,r]),t.current}const VB=(e,t,n)=>{if(e&&"reportValidity"in e){const r=lt(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Roe=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?VB(r.ref,n,e):r.refs&&r.refs.forEach(o=>VB(o,n,e))}},d$e=(e,t)=>{t.shouldUseNativeValidation&&Roe(e,t);const n={};for(const r in e){const o=lt(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(h$e(t.names||Object.keys(e),r)){const a=Object.assign({},lt(n,r));ur(a,"root",i),ur(n,r,a)}else ur(n,r,i)}return n},h$e=(e,t)=>e.some(n=>n.startsWith(t+"."));var p$e=function(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,u=l&&l[r.code];n[a]=woe(a,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n},Poe=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve((function(a,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&Roe({},i),{errors:{},values:n.raw?r:u}})}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l})(0,function(a){if((function(s){return Array.isArray(s==null?void 0:s.errors)})(a))return{values:{},errors:d$e(p$e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}},Toe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},WB=J.createContext&&J.createContext(Toe),m$e=["attr","size","title"];function g$e(e,t){if(e==null)return{};var n,r,o=v$e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;rJ.createElement(t.tag,OC({key:n},t.attr),Aoe(t.child)))}function Ia(e){return t=>J.createElement(b$e,CC({attr:OC({},e.attr)},t),Aoe(e.child))}function b$e(e){var t=n=>{var{attr:r,size:o,title:i}=e,a=g$e(e,m$e),s=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),J.createElement("svg",CC({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:OC(OC({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&J.createElement("title",null,i),e.children)};return WB!==void 0?J.createElement(WB.Consumer,null,n=>t(n)):t(Toe)}function GB(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"},child:[]}]})(e)}function Met(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16 2H8C4.691 2 2 4.691 2 8v13a1 1 0 0 0 1 1h13c3.309 0 6-2.691 6-6V8c0-3.309-2.691-6-6-6zm4 14c0 2.206-1.794 4-4 4H4V8c0-2.206 1.794-4 4-4h8c2.206 0 4 1.794 4 4v8z"},child:[]},{tag:"path",attr:{d:"M7 9h10v2H7zm0 4h7v2H7z"},child:[]}]})(e)}function jet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 6a3.939 3.939 0 0 0-3.934 3.934h2C10.066 8.867 10.934 8 12 8s1.934.867 1.934 1.934c0 .598-.481 1.032-1.216 1.626a9.208 9.208 0 0 0-.691.599c-.998.997-1.027 2.056-1.027 2.174V15h2l-.001-.633c.001-.016.033-.386.441-.793.15-.15.339-.3.535-.458.779-.631 1.958-1.584 1.958-3.182A3.937 3.937 0 0 0 12 6zm-1 10h2v2h-2z"},child:[]},{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"},child:[]}]})(e)}function Iet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21 15.344-2.121 2.121-3.172-3.172-1.414 1.414 3.172 3.172L15.344 21H21zM3 8.656l2.121-2.121 3.172 3.172 1.414-1.414-3.172-3.172L8.656 3H3zM21 3h-5.656l2.121 2.121-3.172 3.172 1.414 1.414 3.172-3.172L21 8.656zM3 21h5.656l-2.121-2.121 3.172-3.172-1.414-1.414-3.172 3.172L3 15.344z"},child:[]}]})(e)}function Det(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 4H8v4H4v2h6zM8 20h2v-6H4v2h4zm12-6h-6v6h2v-4h4zm0-6h-4V4h-2v6h6z"},child:[]}]})(e)}function S$e(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 1.993C6.486 1.994 2 6.48 2 11.994c0 5.513 4.486 9.999 10 10 5.514 0 10-4.486 10-10s-4.485-10-10-10.001zm0 18.001c-4.411-.001-8-3.59-8-8 0-4.411 3.589-8 8-8.001 4.411.001 8 3.59 8 8.001s-3.589 8-8 8z"},child:[]},{tag:"path",attr:{d:"M13 8h-2v4H7.991l4.005 4.005L16 12h-3z"},child:[]}]})(e)}function Let(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 10h4v4h-4zm0-6h4v4h-4zm0 12h4v4h-4z"},child:[]}]})(e)}function $et(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5 18v3.766l1.515-.909L11.277 18H16c1.103 0 2-.897 2-2V8c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h1zM4 8h12v8h-5.277L7 18.234V16H4V8z"},child:[]},{tag:"path",attr:{d:"M20 2H8c-1.103 0-2 .897-2 2h12c1.103 0 2 .897 2 2v8c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2z"},child:[]}]})(e)}function Fet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 11h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"},child:[]},{tag:"path",attr:{d:"M5 22h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2h-2V2h-2v2H9V2H7v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zM19 8l.001 12H5V8h14z"},child:[]}]})(e)}function Bet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 22h15v-2H6.012C5.55 19.988 5 19.805 5 19s.55-.988 1.012-1H21V4c0-1.103-.897-2-2-2H6c-1.206 0-3 .799-3 3v14c0 2.201 1.794 3 3 3zM5 8V5c0-.805.55-.988 1-1h13v12H5V8z"},child:[]},{tag:"path",attr:{d:"M8 6h9v2H8z"},child:[]}]})(e)}function zet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.24 3H4.76A1.76 1.76 0 0 0 3 4.76v14.48A1.76 1.76 0 0 0 4.76 21h14.48A1.76 1.76 0 0 0 21 19.24V4.76A1.76 1.76 0 0 0 19.24 3zm-5.8 10h-2.25v6.44H9.4V13H7.15v-1.46h6.29zm5.8 5.28a1.71 1.71 0 0 1-.67.74 3 3 0 0 1-1 .39 5.81 5.81 0 0 1-1.2.12 7 7 0 0 1-1.23-.11 4.52 4.52 0 0 1-1-.33v-1.71l-.06-.06h.06v.07a3.41 3.41 0 0 0 1 .54 3.06 3.06 0 0 0 1.13.2 2.58 2.58 0 0 0 .6-.06 1.47 1.47 0 0 0 .42-.17.75.75 0 0 0 .25-.25.69.69 0 0 0-.06-.74 1.24 1.24 0 0 0-.35-.33 3.12 3.12 0 0 0-.53-.3l-.67-.28a3.57 3.57 0 0 1-1.37-1 2 2 0 0 1-.46-1.33 2.16 2.16 0 0 1 .24-1.06 2.09 2.09 0 0 1 .66-.71 2.88 2.88 0 0 1 1-.42 5.11 5.11 0 0 1 1.19-.13 7 7 0 0 1 1.09.07 4.53 4.53 0 0 1 .88.23v1.65a2.42 2.42 0 0 0-.42-.24 3.58 3.58 0 0 0-.49-.17 3 3 0 0 0-.49-.1 2.45 2.45 0 0 0-.46 0 2.29 2.29 0 0 0-.56.06 1.54 1.54 0 0 0-.43.16.78.78 0 0 0-.26.25.63.63 0 0 0-.09.33.62.62 0 0 0 .1.35 1.19 1.19 0 0 0 .3.29 2.15 2.15 0 0 0 .46.28l.63.28a6.56 6.56 0 0 1 .84.42 2.65 2.65 0 0 1 .64.49 1.79 1.79 0 0 1 .42.63 2.48 2.48 0 0 1 .14.85 2.68 2.68 0 0 1-.25 1.08z"},child:[]}]})(e)}function qet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.585 11.692h4.328s2.432.039 2.432-2.35V5.391S16.714 3 11.936 3C7.362 3 7.647 4.983 7.647 4.983l.006 2.055h4.363v.617H5.92s-2.927-.332-2.927 4.282 2.555 4.45 2.555 4.45h1.524v-2.141s-.083-2.554 2.513-2.554zm-.056-5.74a.784.784 0 1 1 0-1.57.784.784 0 1 1 0 1.57z"},child:[]},{tag:"path",attr:{d:"M18.452 7.532h-1.524v2.141s.083 2.554-2.513 2.554h-4.328s-2.432-.04-2.432 2.35v3.951s-.369 2.391 4.409 2.391c4.573 0 4.288-1.983 4.288-1.983l-.006-2.054h-4.363v-.617h6.097s2.927.332 2.927-4.282-2.555-4.451-2.555-4.451zm-3.981 10.436a.784.784 0 1 1 0 1.57.784.784 0 1 1 0-1.57z"},child:[]}]})(e)}function Uet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.79 10.17a.18.18 0 0 0-.11 0l-.2.27H7a.15.15 0 0 0 .1-.06l.17-.26v-.05zm-1.47.89a.14.14 0 0 0-.11 0l-.2.26v.05h4.6a.09.09 0 0 0 .09-.06l.08-.23v-.06zM4.6 12a.13.13 0 0 0-.1.06l-.13.24v.06h2.15a.08.08 0 0 0 .07-.07v-.23s0-.07-.06-.07zm15.99-3.07a3.62 3.62 0 0 0-2.78-.5 4.09 4.09 0 0 0-2.72 1.63 4 4 0 0 0-.67 1.26h-3.14a.25.25 0 0 0-.24.16c-.14.25-.37.76-.5 1.06s0 .29.18.29h1.88a2.8 2.8 0 0 1-.26.36 1.81 1.81 0 0 1-1.65.65 1.53 1.53 0 0 1-1.32-1.53 2.07 2.07 0 0 1 1-1.85 1.71 1.71 0 0 1 1.77-.15 1.36 1.36 0 0 1 .45.37c.13.15.14.14.29.1l1.63-.43c.12 0 .16-.08.1-.16a3 3 0 0 0-1.13-1.38 3.35 3.35 0 0 0-2.58-.47A4.31 4.31 0 0 0 8.16 10a3.81 3.81 0 0 0-.82 2.85A3 3 0 0 0 8.57 15a3.46 3.46 0 0 0 2.62.65A4.06 4.06 0 0 0 14 14a4.33 4.33 0 0 0 .41-.69 3 3 0 0 0 1 1.55 3.68 3.68 0 0 0 2.38.86c.25 0 .51 0 .78-.09a4.51 4.51 0 0 0 2.33-1.25A3.72 3.72 0 0 0 22 11.1a3 3 0 0 0-1.41-2.17zm-1.78 4.73a1.81 1.81 0 0 1-1.59.06 1.61 1.61 0 0 1-.9-1.84A2.12 2.12 0 0 1 18 10.19a1.59 1.59 0 0 1 2 1.29 2.91 2.91 0 0 1 0 .32 2.11 2.11 0 0 1-1.19 1.86z"},child:[]}]})(e)}function Vet(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.82 4.26a10.14 10.14 0 0 0-.53 1.1 14.66 14.66 0 0 0-4.58 0 10.14 10.14 0 0 0-.53-1.1 16 16 0 0 0-4.13 1.3 17.33 17.33 0 0 0-3 11.59 16.6 16.6 0 0 0 5.07 2.59A12.89 12.89 0 0 0 8.23 18a9.65 9.65 0 0 1-1.71-.83 3.39 3.39 0 0 0 .42-.33 11.66 11.66 0 0 0 10.12 0q.21.18.42.33a10.84 10.84 0 0 1-1.71.84 12.41 12.41 0 0 0 1.08 1.78 16.44 16.44 0 0 0 5.06-2.59 17.22 17.22 0 0 0-3-11.59 16.09 16.09 0 0 0-4.09-1.35zM8.68 14.81a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.93 1.93 0 0 1 1.8 2 1.93 1.93 0 0 1-1.8 2zm6.64 0a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.92 1.92 0 0 1 1.8 2 1.92 1.92 0 0 1-1.8 2z"},child:[]}]})(e)}const _$e=Gy({key:Oo().min(1,"Key is required"),value:Oo().min(1,"Value is required")}),E$e=Gy({values:Oo().min(1,"At least one value is required")});function C$e({values:e=[],title:t,icon:n,type:r=Vn.Checkbox,options:o,setValues:i,onSearchChange:a,searchValue:s,emptyMessage:l}){var x;const{register:u,handleSubmit:c,reset:d}=Ooe({resolver:Poe(r===Vn.KeyValue?_$e:E$e),defaultValues:r===Vn.KeyValue?{key:"",value:""}:{values:""}}),h=y=>{"key"in y?e.push(`${y.key}:${y.value}`):y.values.split(",").forEach(w=>e.push(w.trim())),i(e),d()},p=y=>{const w=e.indexOf(y);w>-1&&e.splice(w,1),i(e)};return v.jsxs(Wy,{children:[v.jsx(Hy,{asChild:!0,children:v.jsxs(wt,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[n||v.jsx(NSe,{className:"mr-2 size-4"}),t,e.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(qd,{orientation:"vertical",className:"mx-2 h-4"}),v.jsx(Ti,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r==Vn.Radio?((x=o==null?void 0:o.find(({value:y})=>y==e[0]))==null?void 0:x.label)||e[0]:e.length}),v.jsx("div",{className:"hidden space-x-1 lg:flex",children:e.length>2?v.jsxs(Ti,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[e.length," selected"]}):e.map((y,w)=>{var _;return v.jsxs(Ti,{variant:"secondary",className:"flex items-center space-x-1 rounded-sm px-1 font-normal",children:[((_=o==null?void 0:o.find(({value:C})=>C==y))==null?void 0:_.label)||y,v.jsx(wt,{variant:"ghost",size:"xs",className:"ml-2",onClick:()=>p(y),children:v.jsx(GB,{className:"size-3"})})]},w)})})]})]})}),v.jsxs(wm,{className:"w-[300px] p-2",align:"start",children:[[Vn.Array,Vn.KeyValue].includes(r)&&v.jsxs("div",{children:[v.jsx("div",{className:"",children:e.map((y,w)=>v.jsxs(Ti,{variant:"secondary",className:"mb-2 mr-2 flex items-center space-x-1 rounded-sm px-1 pl-2 font-normal",children:[v.jsx("span",{className:"grow",children:y}),v.jsx(wt,{variant:"ghost",size:"icon",className:"ml-2 shrink-0",onClick:()=>p(y),children:v.jsx(GB,{className:"size-4"})})]},w))}),v.jsxs("form",{onSubmit:c(h),children:[r===Vn.KeyValue?v.jsxs("div",{className:"mb-2 flex items-center space-x-2",children:[v.jsx(ri,{type:"text",placeholder:"Key",...u("key"),className:"flex-1"}),v.jsx(ri,{type:"text",placeholder:"Value",...u("value"),className:"flex-1"})]}):v.jsx("div",{className:"mb-2",children:v.jsx(ri,{type:"text",placeholder:"Enter values (comma-separated)",...u("values"),className:"w-full"})}),v.jsxs(wt,{type:"submit",fullWidth:!0,size:"sm",children:["Add ",t," Filter"]}),e.length>0&&v.jsx(wt,{onClick:()=>i([]),className:"mt-2",size:"sm",variant:"ghost",fullWidth:!0,children:"Reset"})]})]}),[Vn.Checkbox,Vn.Radio].includes(r)&&v.jsxs(V$,{shouldFilter:!a,children:[v.jsx(noe,{placeholder:t,value:s,onValueChange:a}),v.jsxs(W$,{children:[v.jsx(roe,{className:"py-2 text-center text-sm text-muted-foreground",children:l||"No results found."}),v.jsx(yC,{children:o==null?void 0:o.map(y=>{const w=e.indexOf(y.value)!=-1;return v.jsxs(wC,{onSelect:()=>{if(w)e.splice(e.indexOf(y.value),1);else if(r===Vn.Radio){i([y.value]);return}else e.push(y.value);i(e)},children:[v.jsx("div",{className:je("mr-2 flex size-4 items-center justify-center rounded-sm border border-primary",w?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:v.jsx(iR,{className:je("size-4")})}),y.icon&&v.jsx(y.icon,{className:"mr-2 size-4 text-gray-700 dark:text-gray-300"}),v.jsx("span",{children:y.label})]},y.value)})}),e.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(ooe,{}),v.jsx(yC,{children:v.jsx(wC,{onSelect:()=>i([]),className:"justify-center text-center",children:"Reset"})})]})]})]})]})]})}function O$e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function YB(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function P$e(e,t){if(e==null)return{};var n=R$e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T$e(e,t){return A$e(e)||k$e(e,t)||N$e(e,t)||M$e()}function A$e(e){if(Array.isArray(e))return e}function k$e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function N$e(e,t){if(e){if(typeof e=="string")return XB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XB(e,t)}}function XB(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l1&&arguments[1]!==void 0?arguments[1]:{};N_.initial(e),N_.handler(t);var n={current:e},r=rw(G$e)(n,t),o=rw(H$e)(n),i=rw(N_.changes)(e),a=rw(W$e)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return N_.selector(u),u(n.current)}function l(u){I$e(r,o,i,a)(u)}return[s,l]}function W$e(e,t){return Zw(t)?t(e.current):t}function H$e(e,t){return e.current=ZB(ZB({},e.current),t),t}function G$e(e,t,n){return Zw(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var K$e={create:V$e},Y$e={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function X$e(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l{r.current=!1}:e,t)}var rs=b4e;function _w(){}function fv(e,t,n,r){return S4e(e,r)||_4e(e,t,n,r)}function S4e(e,t){return e.editor.getModel($oe(e,t))}function _4e(e,t,n,r){return e.editor.createModel(t,n,r?$oe(e,r):void 0)}function $oe(e,t){return e.Uri.parse(t)}function E4e({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:c="Loading...",options:d={},height:h="100%",width:p="100%",className:x,wrapperProps:y={},beforeMount:w=_w,onMount:_=_w}){let[C,O]=b.useState(!1),[P,R]=b.useState(!0),T=b.useRef(null),k=b.useRef(null),M=b.useRef(null),j=b.useRef(_),$=b.useRef(w),L=b.useRef(!1);Loe(()=>{let H=Ioe.init();return H.then(U=>(k.current=U)&&R(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>T.current?D():H.cancel()}),rs(()=>{if(T.current&&k.current){let H=T.current.getOriginalEditor(),U=fv(k.current,e||"",r||n||"text",i||"");U!==H.getModel()&&H.setModel(U)}},[i],C),rs(()=>{if(T.current&&k.current){let H=T.current.getModifiedEditor(),U=fv(k.current,t||"",o||n||"text",a||"");U!==H.getModel()&&H.setModel(U)}},[a],C),rs(()=>{let H=T.current.getModifiedEditor();H.getOption(k.current.editor.EditorOption.readOnly)?H.setValue(t||""):t!==H.getValue()&&(H.executeEdits("",[{range:H.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),H.pushUndoStop())},[t],C),rs(()=>{var H,U;(U=(H=T.current)==null?void 0:H.getModel())==null||U.original.setValue(e||"")},[e],C),rs(()=>{let{original:H,modified:U}=T.current.getModel();k.current.editor.setModelLanguage(H,r||n||"text"),k.current.editor.setModelLanguage(U,o||n||"text")},[n,r,o],C),rs(()=>{var H;(H=k.current)==null||H.editor.setTheme(u)},[u],C),rs(()=>{var H;(H=T.current)==null||H.updateOptions(d)},[d],C);let V=b.useCallback(()=>{var Y;if(!k.current)return;$.current(k.current);let H=fv(k.current,e||"",r||n||"text",i||""),U=fv(k.current,t||"",o||n||"text",a||"");(Y=T.current)==null||Y.setModel({original:H,modified:U})},[n,t,o,e,r,i,a]),G=b.useCallback(()=>{var H;!L.current&&M.current&&(T.current=k.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...d}),V(),(H=k.current)==null||H.editor.setTheme(u),O(!0),L.current=!0)},[d,u,V]);b.useEffect(()=>{C&&j.current(T.current,k.current)},[C]),b.useEffect(()=>{!P&&!C&&G()},[P,C,G]);function D(){var U,Y,q,W;let H=(U=T.current)==null?void 0:U.getModel();s||((Y=H==null?void 0:H.original)==null||Y.dispose()),l||((q=H==null?void 0:H.modified)==null||q.dispose()),(W=T.current)==null||W.dispose()}return J.createElement(Doe,{width:p,height:h,isEditorReady:C,loading:c,_ref:M,className:x,wrapperProps:y})}var C4e=E4e;b.memo(C4e);function O4e(e){let t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}var R4e=O4e,M_=new Map;function P4e({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:i,theme:a="light",line:s,loading:l="Loading...",options:u={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:h=!1,width:p="100%",height:x="100%",className:y,wrapperProps:w={},beforeMount:_=_w,onMount:C=_w,onChange:O,onValidate:P=_w}){let[R,T]=b.useState(!1),[k,M]=b.useState(!0),j=b.useRef(null),$=b.useRef(null),L=b.useRef(null),V=b.useRef(C),G=b.useRef(_),D=b.useRef(),H=b.useRef(r),U=R4e(i),Y=b.useRef(!1),q=b.useRef(!1);Loe(()=>{let z=Ioe.init();return z.then(X=>(j.current=X)&&M(!1)).catch(X=>(X==null?void 0:X.type)!=="cancelation"&&console.error("Monaco initialization: error:",X)),()=>$.current?K():z.cancel()}),rs(()=>{var X,ee,ae,fe;let z=fv(j.current,e||r||"",t||o||"",i||n||"");z!==((X=$.current)==null?void 0:X.getModel())&&(d&&M_.set(U,(ee=$.current)==null?void 0:ee.saveViewState()),(ae=$.current)==null||ae.setModel(z),d&&((fe=$.current)==null||fe.restoreViewState(M_.get(i))))},[i],R),rs(()=>{var z;(z=$.current)==null||z.updateOptions(u)},[u],R),rs(()=>{!$.current||r===void 0||($.current.getOption(j.current.editor.EditorOption.readOnly)?$.current.setValue(r):r!==$.current.getValue()&&(q.current=!0,$.current.executeEdits("",[{range:$.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),$.current.pushUndoStop(),q.current=!1))},[r],R),rs(()=>{var X,ee;let z=(X=$.current)==null?void 0:X.getModel();z&&o&&((ee=j.current)==null||ee.editor.setModelLanguage(z,o))},[o],R),rs(()=>{var z;s!==void 0&&((z=$.current)==null||z.revealLine(s))},[s],R),rs(()=>{var z;(z=j.current)==null||z.editor.setTheme(a)},[a],R);let W=b.useCallback(()=>{var z;if(!(!L.current||!j.current)&&!Y.current){G.current(j.current);let X=i||n,ee=fv(j.current,r||e||"",t||o||"",X||"");$.current=(z=j.current)==null?void 0:z.editor.create(L.current,{model:ee,automaticLayout:!0,...u},c),d&&$.current.restoreViewState(M_.get(X)),j.current.editor.setTheme(a),s!==void 0&&$.current.revealLine(s),T(!0),Y.current=!0}},[e,t,n,r,o,i,u,c,d,a,s]);b.useEffect(()=>{R&&V.current($.current,j.current)},[R]),b.useEffect(()=>{!k&&!R&&W()},[k,R,W]),H.current=r,b.useEffect(()=>{var z,X;R&&O&&((z=D.current)==null||z.dispose(),D.current=(X=$.current)==null?void 0:X.onDidChangeModelContent(ee=>{q.current||O($.current.getValue(),ee)}))},[R,O]),b.useEffect(()=>{if(R){let z=j.current.editor.onDidChangeMarkers(X=>{var ae;let ee=(ae=$.current.getModel())==null?void 0:ae.uri;if(ee&&X.find(fe=>fe.path===ee.path)){let fe=j.current.editor.getModelMarkers({resource:ee});P==null||P(fe)}});return()=>{z==null||z.dispose()}}return()=>{}},[R,P]);function K(){var z,X;(z=D.current)==null||z.dispose(),h?d&&M_.set(i,$.current.saveViewState()):(X=$.current.getModel())==null||X.dispose(),$.current.dispose()}return J.createElement(Doe,{width:p,height:x,isEditorReady:R,loading:l,_ref:L,className:y,wrapperProps:w})}var T4e=P4e,A4e=b.memo(T4e),k4e=A4e;function ez({code:e="",setCode:t,language:n,className:r,height:o,width:i,copy:a=!0,wrapLines:s=!0,lineNumbers:l=!1,jsonSchema:u}){const{theme:c}=vL(),d=b.useId(),h=`file:///editor-${d.replace(/:/g,"-")}.json`,p=b.useRef(null),x=(n==="json"&&u&&Object.keys(u).length>0)??!1,y=b.useCallback(O=>{if(n!=="json")return;const T=(O.languages.json.jsonDefaults.diagnosticsOptions.schemas||[]).filter(M=>{var j;return!((j=M.fileMatch)!=null&&j.includes(h))}),k=x?[...T,{uri:`http://hatchet/schema-${d}.json`,fileMatch:[h],schema:u}]:T;O.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:k})},[n,u,x,h,d]),w=O=>{O.editor.defineTheme("pastels-on-dark",N4e()),O.editor.setTheme("pastels-on-dark")},_=(O,P)=>{p.current=P,y(P)};b.useEffect(()=>{const O=p.current;O&&y(O)},[u,x,n,h,d,y]);const C=c==="dark"?"pastels-on-dark":"vs";return v.jsxs("div",{className:je(r,"relative h-fit w-full overflow-hidden rounded-lg","border border-border"),children:[v.jsx(k4e,{beforeMount:w,onMount:_,path:x?h:void 0,language:n,value:e||"",onChange:t,width:i||"100%",height:o||"400px",theme:C,options:{minimap:{enabled:!1},wordWrap:s?"on":"off",lineNumbers:l?function(O){return`${O}`}:"off",theme:C,autoDetectHighContrast:!0,readOnly:!t,scrollbar:{vertical:"hidden",horizontal:"hidden"},showFoldingControls:n=="json"?"always":"never",lineDecorationsWidth:0,overviewRulerBorder:!1,colorDecorators:!1,hideCursorInOverviewRuler:!0,contextmenu:!1,hover:{enabled:!1},quickSuggestions:x?{strings:!0,other:!0}:void 0,suggestOnTriggerCharacters:x?!0:void 0}}),a&&v.jsx(pJ,{className:"absolute right-2 top-2",text:(e==null?void 0:e.trim())||""})]})}const N4e=()=>({base:"vs-dark",inherit:!0,rules:[{background:"0D0D0D",token:""},{foreground:"473c45",token:"comment"},{foreground:"c0c5ce",token:"string"},{foreground:"a8885a",token:"constant"},{foreground:"4FB4D7",token:"variable.parameter"},{foreground:"596380",token:"variable.other"},{foreground:"728059",token:"keyword - keyword.operator"},{foreground:"728059",token:"keyword.operator.logical"},{foreground:"9ebf60",token:"storage"},{foreground:"6078bf",token:"entity"},{fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"8a4b66",token:"support"},{foreground:"893062",token:"support.type.exception"},{background:"5f0047",token:"invalid"},{background:"371d28",token:"meta.function.section"}],colors:{"editor.foreground":"#c0c5ce","editor.background":"#1e293b","editor.selectionBackground":"#40002F","editor.lineHighlightBackground":"#00000012","editorCursor.foreground":"#7F005D","editorWhitespace.foreground":"#BFBFBF"}});function Jw({className:e,...t}){return v.jsx("div",{className:je("animate-pulse rounded-md bg-primary/10",e),...t})}var qA={exports:{}},tz;function M4e(){return tz||(tz=1,(function(e,t){(function(r,o){e.exports=o()})(globalThis,()=>(()=>{var n={949:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CronParser=void 0;var u=l(515),c=(function(){function d(h,p,x){p===void 0&&(p=!0),x===void 0&&(x=!1),this.expression=h,this.dayOfWeekStartIndexZero=p,this.monthStartIndexZero=x}return d.prototype.parse=function(){var h,p,x=(h=this.expression)!==null&&h!==void 0?h:"";if(x==="@reboot")return p=["@reboot","","","","","",""],p;if(x.startsWith("@")){var y=this.parseSpecial(this.expression);p=this.extractParts(y)}else p=this.extractParts(this.expression);return this.normalize(p),this.validate(p),p},d.prototype.parseSpecial=function(h){var p={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},x=p[h];if(!x)throw new Error("Unknown special expression.");return x},d.prototype.extractParts=function(h){if(!this.expression)throw new Error("cron expression is empty");for(var p=h.trim().split(/[ ]+/),x=0;x7)throw new Error("Expression has ".concat(p.length," parts; too many!"));return p},d.prototype.normalize=function(h){var p=this;if(h[3]=h[3].replace("?","*"),h[5]=h[5].replace("?","*"),h[2]=h[2].replace("?","*"),h[0].indexOf("0/")==0&&(h[0]=h[0].replace("0/","*/")),h[1].indexOf("0/")==0&&(h[1]=h[1].replace("0/","*/")),h[2].indexOf("0/")==0&&(h[2]=h[2].replace("0/","*/")),h[3].indexOf("1/")==0&&(h[3]=h[3].replace("1/","*/")),h[4].indexOf("1/")==0&&(h[4]=h[4].replace("1/","*/")),h[6].indexOf("1/")==0&&(h[6]=h[6].replace("1/","*/")),h[5]=h[5].replace(/(^\d)|([^#/\s]\d)/g,function(R){var T=R.replace(/\D/,""),k=T;return p.dayOfWeekStartIndexZero?T=="7"&&(k="0"):k=(parseInt(T)-1).toString(),R.replace(T,k)}),h[5]=="L"&&(h[5]="6"),h[3]=="?"&&(h[3]="*"),h[3].indexOf("W")>-1&&(h[3].indexOf(",")>-1||h[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var x={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var y in x)h[5]=h[5].replace(new RegExp(y,"gi"),x[y].toString());h[4]=h[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(R){var T=R.replace(/\D/,""),k=T;return p.monthStartIndexZero&&(k=(parseInt(T)+1).toString()),R.replace(T,k)});var w={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var _ in w)h[4]=h[4].replace(new RegExp(_,"gi"),w[_].toString());h[0]=="0"&&(h[0]=""),!/\*|\-|\,|\//.test(h[2])&&(/\*|\//.test(h[1])||/\*|\//.test(h[0]))&&(h[2]+="-".concat(h[2]));for(var C=0;C-1&&!/^\*|\-|\,/.test(h[C])){var O=null;switch(C){case 4:O="12";break;case 5:O="6";break;case 6:O="9999";break;default:O=null;break}if(O!==null){var P=h[C].split("/");h[C]="".concat(P[0],"-").concat(O,"/").concat(P[1])}}},d.prototype.validate=function(h){var p="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(h[0],p),this.validateOnlyExpectedCharactersFound(h[1],p),this.validateOnlyExpectedCharactersFound(h[2],p),this.validateOnlyExpectedCharactersFound(h[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(h[4],p),this.validateOnlyExpectedCharactersFound(h[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(h[6],p),this.validateAnyRanges(h)},d.prototype.validateAnyRanges=function(h){u.default.secondRange(h[0]),u.default.minuteRange(h[1]),u.default.hourRange(h[2]),u.default.dayOfMonthRange(h[3]),u.default.monthRange(h[4],this.monthStartIndexZero),u.default.dayOfWeekRange(h[5],this.dayOfWeekStartIndexZero)},d.prototype.validateOnlyExpectedCharactersFound=function(h,p){var x=h.match(new RegExp("[^".concat(p,"]+"),"gi"));if(x&&x.length)throw new Error("Expression contains invalid values: '".concat(x.toString(),"'"))},d})();s.CronParser=c}),333:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExpressionDescriptor=void 0;var u=l(823),c=l(949),d=(function(){function h(p,x){if(this.expression=p,this.options=x,this.expressionParts=new Array(5),!this.options.locale&&h.defaultLocale&&(this.options.locale=h.defaultLocale),!h.locales[this.options.locale]){var y=Object.keys(h.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(y,"'.")),this.options.locale=y}this.i18n=h.locales[this.options.locale],x.use24HourTimeFormat===void 0&&(x.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return h.toString=function(p,x){var y=x===void 0?{}:x,w=y.throwExceptionOnParseError,_=w===void 0?!0:w,C=y.verbose,O=C===void 0?!1:C,P=y.dayOfWeekStartIndexZero,R=P===void 0?!0:P,T=y.monthStartIndexZero,k=T===void 0?!1:T,M=y.use24HourTimeFormat,j=y.locale,$=j===void 0?null:j,L={throwExceptionOnParseError:_,verbose:O,dayOfWeekStartIndexZero:R,monthStartIndexZero:k,use24HourTimeFormat:M,locale:$};L.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var V=new h(p,L);return V.getFullDescription()},h.initialize=function(p,x){x===void 0&&(x="en"),h.specialCharacters=["/","-",",","*"],h.defaultLocale=x,p.load(h.locales)},h.prototype.getFullDescription=function(){var p,x,y="";try{var w=new c.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=w.parse(),this.expressionParts[0]==="@reboot")return((x=(p=this.i18n).atReboot)===null||x===void 0?void 0:x.call(p))||"Run once, at startup";var _=this.getTimeOfDayDescription(),C=this.getDayOfMonthDescription(),O=this.getMonthDescription(),P=this.getDayOfWeekDescription(),R=this.getYearDescription();y+=_+C+P+O+R,y=this.transformVerbosity(y,!!this.options.verbose),y=y.charAt(0).toLocaleUpperCase()+y.substr(1)}catch(T){if(!this.options.throwExceptionOnParseError)y=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(T)}return y},h.prototype.getTimeOfDayDescription=function(){var p=this.expressionParts[0],x=this.expressionParts[1],y=this.expressionParts[2],w="";if(!u.StringUtilities.containsAny(x,h.specialCharacters)&&!u.StringUtilities.containsAny(y,h.specialCharacters)&&!u.StringUtilities.containsAny(p,h.specialCharacters))w+=this.i18n.atSpace()+this.formatTime(y,x,p);else if(!p&&x.indexOf("-")>-1&&!(x.indexOf(",")>-1)&&!(x.indexOf("/")>-1)&&!u.StringUtilities.containsAny(y,h.specialCharacters)){var _=x.split("-");w+=u.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(y,_[0],""),this.formatTime(y,_[1],""))}else if(!p&&y.indexOf(",")>-1&&y.indexOf("-")==-1&&y.indexOf("/")==-1&&!u.StringUtilities.containsAny(x,h.specialCharacters)){var C=y.split(",");w+=this.i18n.at();for(var O=0;O-1?C=w.substring(0,w.indexOf("#")):w.indexOf("L")>-1&&(C=C.replace("L",""));var O=parseInt(C),P=p.i18n.daysOfTheWeekInCase?p.i18n.daysOfTheWeekInCase(_)[O]:x[O];if(w.indexOf("#")>-1){var R=null,T=w.substring(w.indexOf("#")+1),k=w.substring(0,w.indexOf("#"));switch(T){case"1":R=p.i18n.first(k);break;case"2":R=p.i18n.second(k);break;case"3":R=p.i18n.third(k);break;case"4":R=p.i18n.fourth(k);break;case"5":R=p.i18n.fifth(k);break}P=R+" "+P}return P},function(w){return parseInt(w)==1?"":u.StringUtilities.format(p.i18n.commaEveryX0DaysOfTheWeek(w),w)},function(w){var _=w.substring(0,w.indexOf("-")),C=p.expressionParts[3]!="*";return C?p.i18n.commaAndX0ThroughX1(_):p.i18n.commaX0ThroughX1(_)},function(w){var _=null;if(w.indexOf("#")>-1){var C=w.substring(w.indexOf("#")+1),O=w.substring(0,w.indexOf("#"));_=p.i18n.commaOnThe(C,O).trim()+p.i18n.spaceX0OfTheMonth()}else if(w.indexOf("L")>-1)_=p.i18n.commaOnTheLastX0OfTheMonth(w.replace("L",""));else{var P=p.expressionParts[3]!="*";_=P?p.i18n.commaAndOnX0():p.i18n.commaOnlyOnX0(w)}return _}),y},h.prototype.getMonthDescription=function(){var p=this,x=this.i18n.monthsOfTheYear(),y=this.getSegmentDescription(this.expressionParts[4],"",function(w,_){return _&&p.i18n.monthsOfTheYearInCase?p.i18n.monthsOfTheYearInCase(_)[parseInt(w)-1]:x[parseInt(w)-1]},function(w){return parseInt(w)==1?"":u.StringUtilities.format(p.i18n.commaEveryX0Months(w),w)},function(w){return p.i18n.commaMonthX0ThroughMonthX1()||p.i18n.commaX0ThroughX1()},function(w){return p.i18n.commaOnlyInMonthX0?p.i18n.commaOnlyInMonthX0():p.i18n.commaOnlyInX0()});return y},h.prototype.getDayOfMonthDescription=function(){var p=this,x=null,y=this.expressionParts[3];switch(y){case"L":x=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":x=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var w=y.match(/(\d{1,2}W)|(W\d{1,2})/);if(w){var _=parseInt(w[0].replace("W","")),C=_==1?this.i18n.firstWeekday():u.StringUtilities.format(this.i18n.weekdayNearestDayX0(),_.toString());x=u.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),C);break}else{var O=y.match(/L-(\d{1,2})/);if(O){var P=O[1];x=u.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(P),P);break}else{if(y=="*"&&this.expressionParts[5]!="*")return"";x=this.getSegmentDescription(y,this.i18n.commaEveryDay(),function(R){return R=="L"?p.i18n.lastDay():p.i18n.dayX0?u.StringUtilities.format(p.i18n.dayX0(),R):R},function(R){return R=="1"?p.i18n.commaEveryDay():p.i18n.commaEveryX0Days(R)},function(R){return p.i18n.commaBetweenDayX0AndX1OfTheMonth(R)},function(R){return p.i18n.commaOnDayX0OfTheMonth(R)})}break}}return x},h.prototype.getYearDescription=function(){var p=this,x=this.getSegmentDescription(this.expressionParts[6],"",function(y){return/^\d+$/.test(y)?new Date(parseInt(y),1).getFullYear().toString():y},function(y){return u.StringUtilities.format(p.i18n.commaEveryX0Years(y),y)},function(y){return p.i18n.commaYearX0ThroughYearX1()||p.i18n.commaX0ThroughX1()},function(y){return p.i18n.commaOnlyInYearX0?p.i18n.commaOnlyInYearX0():p.i18n.commaOnlyInX0()});return x},h.prototype.getSegmentDescription=function(p,x,y,w,_,C){var O=null,P=p.indexOf("/")>-1,R=p.indexOf("-")>-1,T=p.indexOf(",")>-1;if(!p)O="";else if(p==="*")O=x;else if(!P&&!R&&!T)O=u.StringUtilities.format(C(p),y(p));else if(T){for(var k=p.split(","),M="",j=0;j0&&k.length>2&&(M+=",",j0&&k.length>1&&(j==k.length-1||k.length==2)&&(M+="".concat(this.i18n.spaceAnd()," ")),k[j].indexOf("/")>-1||k[j].indexOf("-")>-1){var $=k[j].indexOf("-")>-1&&k[j].indexOf("/")==-1,L=this.getSegmentDescription(k[j],x,y,w,$?this.i18n.commaX0ThroughX1:_,C);$&&(L=L.replace(", ","")),M+=L}else P?M+=this.getSegmentDescription(k[j],x,y,w,_,C):M+=y(k[j]);P?O=M:O=u.StringUtilities.format(C(p),M)}else if(P){var k=p.split("/");if(O=u.StringUtilities.format(w(k[1]),k[1]),k[0].indexOf("-")>-1){var V=this.generateRangeSegmentDescription(k[0],_,y);V.indexOf(", ")!=0&&(O+=", "),O+=V}else if(k[0].indexOf("*")==-1){var G=u.StringUtilities.format(C(k[0]),y(k[0]));G=G.replace(", ",""),O+=u.StringUtilities.format(this.i18n.commaStartingX0(),G)}}else R&&(O=this.generateRangeSegmentDescription(p,_,y));return O},h.prototype.generateRangeSegmentDescription=function(p,x,y){var w="",_=p.split("-"),C=y(_[0],1),O=y(_[1],2),P=x(p);return w+=u.StringUtilities.format(P,C,O),w},h.prototype.formatTime=function(p,x,y){var w=0,_=0,C=parseInt(p)+w,O=parseInt(x)+_;O>=60?(O-=60,C+=1):O<0&&(O+=60,C-=1),C>=24?C=C-24:C<0&&(C=24+C);var P="",R=!1;this.options.use24HourTimeFormat||(R=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),P=R?"".concat(this.getPeriod(C)," "):" ".concat(this.getPeriod(C)),C>12&&(C-=12),C===0&&(C=12));var T="";return y&&(T=":".concat(("00"+y).substring(y.length))),"".concat(R?P:"").concat(("00"+C.toString()).substring(C.toString().length),":").concat(("00"+O.toString()).substring(O.toString().length)).concat(T).concat(R?"":P)},h.prototype.transformVerbosity=function(p,x){if(!x&&(p=p.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),p=p.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),p=p.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),p=p.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var y=0,w=Object.entries(this.i18n.conciseVerbosityReplacements());y=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},h.locales={},h})();s.ExpressionDescriptor=d}),747:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.enLocaleLoader=void 0;var u=l(486),c=(function(){function d(){}return d.prototype.load=function(h){h.en=new u.en},d})();s.enLocaleLoader=c}),486:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.en=void 0;var l=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},u.prototype.everyMinute=function(){return"every minute"},u.prototype.everyHour=function(){return"every hour"},u.prototype.atSpace=function(){return"At "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},u.prototype.at=function(){return"At"},u.prototype.spaceAnd=function(){return" and"},u.prototype.everySecond=function(){return"every second"},u.prototype.everyX0Seconds=function(){return"every %s seconds"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},u.prototype.everyX0Minutes=function(){return"every %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},u.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},u.prototype.everyX0Hours=function(){return"every %s hours"},u.prototype.betweenX0AndX1=function(){return"between %s and %s"},u.prototype.atX0=function(){return"at %s"},u.prototype.commaEveryDay=function(){return", every day"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},u.prototype.commaX0ThroughX1=function(){return", %s through %s"},u.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},u.prototype.first=function(){return"first"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"third"},u.prototype.fourth=function(){return"fourth"},u.prototype.fifth=function(){return"fifth"},u.prototype.commaOnThe=function(){return", on the "},u.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},u.prototype.lastDay=function(){return"the last day"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},u.prototype.commaOnlyOnX0=function(){return", only on %s"},u.prototype.commaAndOnX0=function(){return", and on %s"},u.prototype.commaEveryX0Months=function(){return", every %s months"},u.prototype.commaOnlyInX0=function(){return", only in %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},u.prototype.firstWeekday=function(){return"first weekday"},u.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},u.prototype.commaEveryX0Days=function(){return", every %s days"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},u.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},u.prototype.commaEveryHour=function(){return", every hour"},u.prototype.commaEveryX0Years=function(){return", every %s years"},u.prototype.commaStartingX0=function(){return", starting %s"},u.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},u.prototype.atReboot=function(){return"Run once, at startup"},u})();s.en=l}),515:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0});function l(c,d){if(!c)throw new Error(d)}var u=(function(){function c(){}return c.secondRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=59,"seconds part must be >= 0 and <= 59")}},c.minuteRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=59,"minutes part must be >= 0 and <= 59")}},c.hourRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=23,"hours part must be >= 0 and <= 23")}},c.dayOfMonthRange=function(d){for(var h=d.split(","),p=0;p=1&&x<=31,"DOM part must be >= 1 and <= 31")}},c.monthRange=function(d,h){for(var p=d.split(","),x=0;x=1&&y<=12,h?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},c.dayOfWeekRange=function(d,h){for(var p=d.split(","),x=0;x=0&&y<=6,h?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},c})();s.default=u}),823:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.StringUtilities=void 0;var l=(function(){function u(){}return u.format=function(c){for(var d=[],h=1;h-1})},u})();s.StringUtilities=l})},r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return n[a](l,l.exports,o),l.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.toString=void 0;var s=o(333),l=o(747);s.ExpressionDescriptor.initialize(new l.enLocaleLoader),a.default=s.ExpressionDescriptor;var u=s.ExpressionDescriptor.toString;a.toString=u})(),i})())})(qA)),qA.exports}var j4e=M4e();const I4e=Ln(j4e),Wet=e=>{const t=e.match(/^CRON_TZ=([^\s]+)\s+/);return t?t[1]:"UTC"},D4e=e=>{const t=e.replace(/^CRON_TZ=([^\s]+)\s+/,"");return I4e.toString(t||"")};function L4e({defaultWorkflow:e,show:t,onClose:n,defaultTimingOption:r="now"}){var fe;const o=ec(),{tenantId:i}=Ma(),a=Vl(),[s,l]=b.useState("{}"),[u,c]=b.useState("{}"),[d,h]=b.useState([]),[p,x]=b.useState(r),[y,w]=b.useState(new Date),[_,C]=b.useState("* * * * *"),[O,P]=b.useState(""),[R,T]=b.useState(e==null?void 0:e.metadata.id),[k,M]=b.useState(""),[j,$]=b.useState(""),L=b.useMemo(()=>mD.debounce(ie=>$(ie),300),[]),V=In({...io.workflows.getVersion(R||""),enabled:!!R}),G=V.data,D=V.isLoading,H=b.useCallback(ie=>{M(ie),L(ie)},[L]);b.useEffect(()=>()=>{L.cancel()},[L]);const U=b.useCallback(()=>{n(),l("{}"),c("{}"),h([]),T(e==null?void 0:e.metadata.id),x(r),w(new Date),C("* * * * *"),P(""),M(""),$(""),L.cancel()},[n,e,r,L]),Y=b.useMemo(()=>{try{return{pretty:D4e(_)}}catch(ie){return console.error(ie),{error:ie}}},[_]),{handleApiError:q}=ZO({setErrors:h}),{data:W}=In({queryKey:["workflow:list",i,{limit:200,name:j||void 0}],queryFn:async()=>(await rt.workflowList(i,{limit:200,name:j||void 0})).data,refetchInterval:15e3}),K=G==null?void 0:G.inputJsonSchema,z=Ir({mutationKey:["workflow-run:create",G==null?void 0:G.metadata.id],mutationFn:async ie=>!G||!G.workflow?void 0:(await rt.v1WorkflowRunCreate(i,{workflowName:G.workflow.name,input:ie.input,additionalMetadata:ie.addlMeta,return_only_id:!0})).data,onMutate:()=>{h([])},onSuccess:ie=>{ie&&a({to:At.tenantRunRoute.to,params:{tenant:i,run:ie.run.metadata.id}})},onError:q}),X=Ir({mutationKey:["workflow-run:schedule",G==null?void 0:G.metadata.id],mutationFn:async ie=>!G||!G.workflow?void 0:(await rt.scheduledWorkflowRunCreate(i,G.workflow.name,{input:ie.input,additionalMetadata:ie.addlMeta,triggerAt:ie.scheduledAt})).data,onMutate:()=>{h([])},onSuccess:async ie=>{ie&&(U(),await o.invalidateQueries({queryKey:["scheduledRuns","list"]}),a({to:At.tenantScheduledRoute.to,params:{tenant:i}}))},onError:q}),ee=Ir({mutationKey:["workflow-run:cron",G==null?void 0:G.metadata.id],mutationFn:async ie=>!G||!G.workflow?void 0:(await rt.cronWorkflowTriggerCreate(i,G.workflow.name,{input:ie.input,additionalMetadata:ie.addlMeta,cronName:ie.cronName,cronExpression:ie.cron})).data,onMutate:()=>{h([])},onSuccess:async ie=>{ie&&(U(),await o.invalidateQueries({queryKey:["cronJobs","list"]}),a({to:At.tenantCronJobsRoute.to,params:{tenant:i}}))},onError:q}),ae=()=>{if(!G){h(["No workflow selected."]);return}const ie=JSON.parse(s||"{}"),ge=JSON.parse(u||"{}");if(p==="now")z.mutate({input:ie,addlMeta:ge});else if(p==="schedule"){if(!y){h(["Please select a date and time for scheduling."]);return}X.mutate({input:ie,addlMeta:ge,scheduledAt:y.toISOString()})}else if(p==="cron"){if(!_){h(["Please enter a valid cron expression."]);return}ee.mutate({input:ie,addlMeta:ge,cron:_,cronName:O})}};return v.jsx(nb,{open:t,onOpenChange:ie=>{ie||U()},children:v.jsxs(Uy,{className:"max-h-[90%] overflow-auto py-12 sm:max-w-[625px]",children:[v.jsxs(rb,{className:"gap-2",children:[v.jsx(Vy,{children:"Trigger Run"}),v.jsx(oR,{className:"text-muted-foreground",children:"Trigger a workflow to run now, at a scheduled time, or on a cron schedule."})]}),v.jsx("div",{className:"font-bold",children:"Workflow"}),v.jsx(C$e,{values:R?[R]:[],setValues:ie=>T(ie[0]),title:"Select Workflow",options:(fe=W==null?void 0:W.rows)==null?void 0:fe.map(ie=>({value:ie.metadata.id,label:ie.name})),type:Vn.Radio,icon:v.jsx(S$e,{className:"mr-2 h-5 w-5 text-gray-700 dark:text-gray-300"}),searchValue:k,onSearchChange:H,emptyMessage:j?`No workflows matching "${j}"`:"No workflows found"}),v.jsxs("div",{className:"font-bold",children:["Input",D&&v.jsx("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:"(Loading schema...)"})]}),D?v.jsx(Jw,{className:"h-[180px] w-full"}):v.jsx(ez,{code:s||"{}",setCode:l,language:"json",height:"180px",jsonSchema:K}),v.jsx("div",{className:"font-bold",children:"Additional Metadata"}),D?v.jsx(Jw,{className:"h-[90px] w-full"}):v.jsx(ez,{code:u||"{}",setCode:c,height:"90px",language:"json"}),v.jsxs("div",{children:[v.jsx("div",{className:"mb-2 font-bold",children:"Timing"}),v.jsxs(JE,{defaultValue:p,onValueChange:ie=>x(ie),children:[v.jsxs(Uw,{children:[v.jsx(Sa,{value:"now",children:"Now"}),v.jsx(Sa,{value:"schedule",children:"Schedule"}),v.jsx(Sa,{value:"cron",children:"Cron"})]}),v.jsx(_a,{value:"now"}),v.jsx(_a,{value:"schedule",children:v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"mb-2 font-bold",children:"Select Date and Time"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(uD,{date:y,setDate:w,label:"Trigger at"}),v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>w(new Date),children:"Now"})]}),v.jsxs("div",{className:"mt-2 flex gap-2",children:[v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setSeconds(ie.getSeconds()+15),w(ie)},children:"+15s"}),v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+1),w(ie)},children:"+1m"}),v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+5),w(ie)},children:"+5m"}),v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+15),w(ie)},children:"+15m"}),v.jsx(wt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+60),w(ie)},children:"+60m"})]})]})}),v.jsx(_a,{value:"cron",children:v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"mb-2 font-bold",children:"Cron Name"}),v.jsx(ri,{type:"text",value:O,onChange:ie=>P(ie.target.value),placeholder:"e.g., cron-name",className:"mb-2 w-full"}),v.jsx("div",{className:"mb-2 font-bold",children:"Cron Expression"}),v.jsx(ri,{type:"text",value:_,onChange:ie=>C(ie.target.value),placeholder:"e.g., 0 0 * * *",className:"w-full"}),v.jsx("div",{className:"text-sm text-gray-500",children:(Y==null?void 0:Y.error)||`(runs ${Y==null?void 0:Y.pretty})`})]})})]})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(wt,{disabled:z.isPending||X.isPending||ee.isPending||!G||D,onClick:ae,children:"Submit"})}),(d.length>0||z.error||X.error||ee.error)&&v.jsx("div",{className:"mt-4",children:d.map((ie,ge)=>v.jsx("div",{className:"text-sm text-red-500",children:ie},ge))})]})})}function $4e(e){switch(e){case qt.CANCELLED:return"Cancelled";case qt.COMPLETED:return"Succeeded";case qt.FAILED:return"Failed";case qt.QUEUED:return"Queued";case qt.RUNNING:return"Running";default:const t=e;throw new Error(`Unknown status: ${t}`)}}function F4e(e){switch(e){case qt.COMPLETED:return Exe;case qt.FAILED:return XO;case qt.CANCELLED:return s1e;case qt.RUNNING:return AX;case qt.QUEUED:return Axe;default:const t=e;throw new Error(`Unknown status: ${t}`)}}function L1({status:e,className:t}){const{filters:n,runStatusCounts:r}=rh(),o=b.useMemo(()=>n.apiFilters.statuses||[],[n.apiFilters.statuses]),i=o.includes(e),{setStatuses:a}=n,s=b.useCallback(h=>{const p=o.includes(h),x=Object.values(qt),y=o.length===x.length&&x.every(w=>o.includes(w));if(p)if(y)a([h]);else{const w=o.filter(_=>_!==h);w.length===0?a(x):a(w)}else a([...o,h])},[o,a]),l=r.find(h=>h.status===e);if(!l)return null;const u=F4e(e),c=$4e(e),d=l.count.toLocaleString("en-US");return v.jsx(Ti,{"data-is-selected":i,variant:i?"default":"outline",className:je("h-8 w-fit cursor-pointer px-3 py-1 text-sm data-[is-selected=false]:font-light",t),onClick:()=>s(e),children:v.jsxs("span",{className:"flex items-center gap-1",children:[v.jsx("span",{children:d}),v.jsx("span",{className:"cq-xl:inline hidden",children:c}),v.jsx(u,{className:"cq-xl:hidden size-4"})]})})}const B4e=()=>{const{display:{hideMetrics:e},actions:{setShowQueueMetrics:t}}=rh();return v.jsxs("div",{className:"flex flex-row justify-start gap-2",children:[v.jsx(L1,{status:qt.COMPLETED,className:"text-green-800 data-[is-selected=false]:border data-[is-selected=false]:border-green-500/20 data-[is-selected=true]:bg-green-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-green-500/20 hover:data-[is-selected=true]:bg-green-500/20 dark:text-green-300"}),v.jsx(L1,{status:qt.RUNNING,className:"text-yellow-800 data-[is-selected=false]:border data-[is-selected=false]:border-yellow-500/20 data-[is-selected=true]:bg-yellow-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-yellow-500/20 hover:data-[is-selected=true]:bg-yellow-500/20 dark:text-yellow-300"}),v.jsx(L1,{status:qt.FAILED,className:"text-red-800 data-[is-selected=false]:border data-[is-selected=false]:border-red-500/20 data-[is-selected=true]:bg-red-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-red-500/20 hover:data-[is-selected=true]:bg-red-500/20 dark:text-red-300"}),v.jsx(L1,{status:qt.CANCELLED,className:"text-orange-800 data-[is-selected=false]:border data-[is-selected=false]:border-orange-500/20 data-[is-selected=true]:bg-orange-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-orange-500/20 hover:data-[is-selected=true]:bg-orange-500/20 dark:text-orange-300"}),v.jsx(L1,{status:qt.QUEUED,className:"text-slate-800 data-[is-selected=false]:border data-[is-selected=false]:border-slate-500/20 data-[is-selected=true]:bg-slate-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-slate-500/20 hover:data-[is-selected=true]:bg-slate-500/20 dark:text-slate-300"}),!e&&v.jsxs(Ti,{variant:"outline",className:"h-8 w-fit cursor-pointer rounded-sm px-3 py-1 text-sm font-normal",onClick:()=>t(!0),children:[v.jsx("span",{className:"cq-xl:inline hidden",children:"Queue metrics"}),v.jsx(f1e,{className:"cq-xl:hidden size-4"})]})]})};var UA,nz;function Da(){if(nz)return UA;nz=1;var e=Array.isArray;return UA=e,UA}var VA,rz;function Foe(){if(rz)return VA;rz=1;var e=typeof Fu=="object"&&Fu&&Fu.Object===Object&&Fu;return VA=e,VA}var WA,oz;function oc(){if(oz)return WA;oz=1;var e=Foe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return WA=n,WA}var HA,iz;function Rb(){if(iz)return HA;iz=1;var e=oc(),t=e.Symbol;return HA=t,HA}var GA,az;function z4e(){if(az)return GA;az=1;var e=Rb(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=n.call(a,o),l=a[o];try{a[o]=void 0;var u=!0}catch{}var c=r.call(a);return u&&(s?a[o]=l:delete a[o]),c}return GA=i,GA}var KA,sz;function q4e(){if(sz)return KA;sz=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return KA=n,KA}var YA,lz;function wf(){if(lz)return YA;lz=1;var e=Rb(),t=z4e(),n=q4e(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:r:i&&i in Object(s)?t(s):n(s)}return YA=a,YA}var XA,uz;function xf(){if(uz)return XA;uz=1;function e(t){return t!=null&&typeof t=="object"}return XA=e,XA}var QA,cz;function Jy(){if(cz)return QA;cz=1;var e=wf(),t=xf(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return QA=r,QA}var ZA,fz;function e4(){if(fz)return ZA;fz=1;var e=Da(),t=Jy(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||a!=null&&i in Object(a)}return ZA=o,ZA}var JA,dz;function oh(){if(dz)return JA;dz=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return JA=e,JA}var ek,hz;function t4(){if(hz)return ek;hz=1;var e=wf(),t=oh(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==o||l==n||l==i}return ek=a,ek}var tk,pz;function U4e(){if(pz)return tk;pz=1;var e=oc(),t=e["__core-js_shared__"];return tk=t,tk}var nk,mz;function V4e(){if(mz)return nk;mz=1;var e=U4e(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return nk=n,nk}var rk,gz;function Boe(){if(gz)return rk;gz=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return rk=n,rk}var ok,vz;function W4e(){if(vz)return ok;vz=1;var e=t4(),t=V4e(),n=oh(),r=Boe(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(h){if(!n(h)||t(h))return!1;var p=e(h)?c:i;return p.test(r(h))}return ok=d,ok}var ik,yz;function H4e(){if(yz)return ik;yz=1;function e(t,n){return t==null?void 0:t[n]}return ik=e,ik}var ak,wz;function bm(){if(wz)return ak;wz=1;var e=W4e(),t=H4e();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return ak=n,ak}var sk,xz;function $R(){if(xz)return sk;xz=1;var e=bm(),t=e(Object,"create");return sk=t,sk}var lk,bz;function G4e(){if(bz)return lk;bz=1;var e=$R();function t(){this.__data__=e?e(null):{},this.size=0}return lk=t,lk}var uk,Sz;function K4e(){if(Sz)return uk;Sz=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return uk=e,uk}var ck,_z;function Y4e(){if(_z)return ck;_z=1;var e=$R(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return r.call(a,i)?a[i]:void 0}return ck=o,ck}var fk,Ez;function X4e(){if(Ez)return fk;Ez=1;var e=$R(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return fk=r,fk}var dk,Cz;function Q4e(){if(Cz)return dk;Cz=1;var e=$R(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return dk=n,dk}var hk,Oz;function Z4e(){if(Oz)return hk;Oz=1;var e=G4e(),t=K4e(),n=Y4e(),r=X4e(),o=Q4e();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s-1}return wk=t,wk}var xk,Mz;function r8e(){if(Mz)return xk;Mz=1;var e=FR();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return xk=t,xk}var bk,jz;function BR(){if(jz)return bk;jz=1;var e=J4e(),t=e8e(),n=t8e(),r=n8e(),o=r8e();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s0?1:-1},Cp=function(t){return fm(t)&&t.indexOf("%")===t.length-1},ot=function(t){return O8e(t)&&!t0(t)},R8e=function(t){return Rn(t)},Po=function(t){return ot(t)||fm(t)},P8e=0,n0=function(t){var n=++P8e;return"".concat(t||"").concat(n)},dm=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ot(t)&&!fm(t))return r;var i;if(Cp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return t0(i)&&(i=r),o&&i>n&&(i=n),i},yd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},T8e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function e5(e){"@babel/helpers - typeof";return e5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e5(e)}var lq={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},nf=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},uq=null,Gk=null,l4=function e(t){if(t===uq&&Array.isArray(Gk))return Gk;var n=[];return b.Children.forEach(t,function(r){Rn(r)||(S8e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Gk=n,uq=t,n};function Bs(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return nf(o)}):r=[nf(t)],l4(e).forEach(function(o){var i=Fs(o,"type.displayName")||Fs(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Ja(e,t){var n=Bs(e,t);return n&&n[0]}var cq=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!ot(r)||r<=0||!ot(o)||o<=0)},L8e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],$8e=function(t){return t&&t.type&&fm(t.type)&&L8e.indexOf(t.type)>=0},Hoe=function(t){return t&&e5(t)==="object"&&"clipDot"in t},F8e=function(t,n,r,o){var i,a=(i=Hk==null?void 0:Hk[o])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!pn(t)&&(o&&a.includes(n)||N8e.includes(n))||r&&s4.includes(n)},xn=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(b.isValidElement(t)&&(o=t.props),!e0(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;F8e((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},t5=function e(t,n){if(t===n)return!0;var r=b.Children.count(t);if(r!==b.Children.count(n))return!1;if(r===0)return!0;if(r===1)return fq(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function r5(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,u=U8e(e,q8e),c=o||{width:n,height:r,x:0,y:0},d=jn("recharts-surface",i);return J.createElement("svg",n5({},xn(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),J.createElement("title",null,s),J.createElement("desc",null,l),t)}var W8e=["children","className"];function o5(){return o5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Er=J.forwardRef(function(e,t){var n=e.children,r=e.className,o=H8e(e,W8e),i=jn("recharts-layer",r);return J.createElement("g",o5({className:i},xn(o,!0),{ref:t}),n)}),rf=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;ii?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(i);++o=i?n:e(n,r,o)}return Yk=t,Yk}var Xk,mq;function Goe(){if(mq)return Xk;mq=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function l(u){return s.test(u)}return Xk=l,Xk}var Qk,gq;function X8e(){if(gq)return Qk;gq=1;function e(t){return t.split("")}return Qk=e,Qk}var Zk,vq;function Q8e(){if(vq)return Zk;vq=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+l+")",c="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",x=u+"?",y="["+i+"]?",w="(?:"+p+"(?:"+[c,d,h].join("|")+")"+y+x+")*",_=y+x+w,C="(?:"+[c+s+"?",s,d,h,a].join("|")+")",O=RegExp(l+"(?="+l+")|"+C+_,"g");function P(R){return R.match(O)||[]}return Zk=P,Zk}var Jk,yq;function Z8e(){if(yq)return Jk;yq=1;var e=X8e(),t=Goe(),n=Q8e();function r(o){return t(o)?n(o):e(o)}return Jk=r,Jk}var eN,wq;function J8e(){if(wq)return eN;wq=1;var e=Y8e(),t=Goe(),n=Z8e(),r=qoe();function o(i){return function(a){a=r(a);var s=t(a)?n(a):void 0,l=s?s[0]:a.charAt(0),u=s?e(s,1).join(""):a.slice(1);return l[i]()+u}}return eN=o,eN}var tN,xq;function e6e(){if(xq)return tN;xq=1;var e=J8e(),t=e("toUpperCase");return tN=t,tN}var t6e=e6e();const UR=Ln(t6e);function _r(e){return function(){return e}}const Koe=Math.cos,kC=Math.sin,Gl=Math.sqrt,NC=Math.PI,VR=2*NC,i5=Math.PI,a5=2*i5,gp=1e-6,n6e=a5-gp;function Yoe(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Yoe;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;ogp)if(!(Math.abs(d*l-u*c)>gp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,x=o-s,y=l*l+u*u,w=p*p+x*x,_=Math.sqrt(y),C=Math.sqrt(h),O=i*Math.tan((i5-Math.acos((y+h-w)/(2*_*C)))/2),P=O/C,R=O/_;Math.abs(P-1)>gp&&this._append`L${t+P*c},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*p>c*x)},${this._x1=t+R*l},${this._y1=n+R*u}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),u=t+s,c=n+l,d=1^a,h=a?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>gp||Math.abs(this._y1-c)>gp)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%a5+a5),h>n6e?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=c}`:h>gp&&this._append`A${r},${r},0,${+(h>=i5)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function u4(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new o6e(t)}function c4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xoe(e){this._context=e}Xoe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function WR(e){return new Xoe(e)}function Qoe(e){return e[0]}function Zoe(e){return e[1]}function Joe(e,t){var n=_r(!0),r=null,o=WR,i=null,a=u4(s);e=typeof e=="function"?e:e===void 0?Qoe:_r(e),t=typeof t=="function"?t:t===void 0?Zoe:_r(t);function s(l){var u,c=(l=c4(l)).length,d,h=!1,p;for(r==null&&(i=o(p=a())),u=0;u<=c;++u)!(u=p;--x)s.point(O[x],P[x]);s.lineEnd(),s.areaEnd()}_&&(O[h]=+e(w,h,d),P[h]=+t(w,h,d),s.point(r?+r(w,h,d):O[h],n?+n(w,h,d):P[h]))}if(C)return s=null,C+""||null}function c(){return Joe().defined(o).curve(a).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:_r(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_r(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_r(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:_r(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_r(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_r(+d),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(d){return arguments.length?(o=typeof d=="function"?d:_r(!!d),u):o},u.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),u):a},u.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),u):i},u}class eie{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function i6e(e){return new eie(e,!0)}function a6e(e){return new eie(e,!1)}const f4={draw(e,t){const n=Gl(t/NC);e.moveTo(n,0),e.arc(0,0,n,0,VR)}},s6e={draw(e,t){const n=Gl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},tie=Gl(1/3),l6e=tie*2,u6e={draw(e,t){const n=Gl(t/l6e),r=n*tie;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},c6e={draw(e,t){const n=Gl(t),r=-n/2;e.rect(r,r,n,n)}},f6e=.8908130915292852,nie=kC(NC/10)/kC(7*NC/10),d6e=kC(VR/10)*nie,h6e=-Koe(VR/10)*nie,p6e={draw(e,t){const n=Gl(t*f6e),r=d6e*n,o=h6e*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=VR*i/5,s=Koe(a),l=kC(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},nN=Gl(3),m6e={draw(e,t){const n=-Gl(t/(nN*3));e.moveTo(0,n*2),e.lineTo(-nN*n,-n),e.lineTo(nN*n,-n),e.closePath()}},Cs=-.5,Os=Gl(3)/2,s5=1/Gl(12),g6e=(s5/2+1)*3,v6e={draw(e,t){const n=Gl(t/g6e),r=n/2,o=n*s5,i=r,a=n*s5+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Cs*r-Os*o,Os*r+Cs*o),e.lineTo(Cs*i-Os*a,Os*i+Cs*a),e.lineTo(Cs*s-Os*l,Os*s+Cs*l),e.lineTo(Cs*r+Os*o,Cs*o-Os*r),e.lineTo(Cs*i+Os*a,Cs*a-Os*i),e.lineTo(Cs*s+Os*l,Cs*l-Os*s),e.closePath()}};function y6e(e,t){let n=null,r=u4(o);e=typeof e=="function"?e:_r(e||f4),t=typeof t=="function"?t:_r(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:_r(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:_r(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function MC(){}function jC(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function rie(e){this._context=e}rie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:jC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:jC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w6e(e){return new rie(e)}function oie(e){this._context=e}oie.prototype={areaStart:MC,areaEnd:MC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:jC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x6e(e){return new oie(e)}function iie(e){this._context=e}iie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:jC(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b6e(e){return new iie(e)}function aie(e){this._context=e}aie.prototype={areaStart:MC,areaEnd:MC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function S6e(e){return new aie(e)}function bq(e){return e<0?-1:1}function Sq(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(bq(i)+bq(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function _q(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function rN(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function IC(e){this._context=e}IC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:rN(this,this._t0,_q(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,rN(this,_q(this,n=Sq(this,e,t)),n);break;default:rN(this,this._t0,n=Sq(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function sie(e){this._context=new lie(e)}(sie.prototype=Object.create(IC.prototype)).point=function(e,t){IC.prototype.point.call(this,t,e)};function lie(e){this._context=e}lie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function _6e(e){return new IC(e)}function E6e(e){return new sie(e)}function uie(e){this._context=e}uie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Eq(e),o=Eq(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function O6e(e){return new HR(e,.5)}function R6e(e){return new HR(e,0)}function P6e(e){return new HR(e,1)}function uy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function T6e(e,t){return e[t]}function A6e(e){const t=[];return t.key=e,t}function k6e(){var e=_r([]),t=l5,n=uy,r=T6e;function o(i){var a=Array.from(e.apply(this,arguments),A6e),s,l=a.length,u=-1,c;for(const d of i)for(s=0,++u;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var cie={symbolCircle:f4,symbolCross:s6e,symbolDiamond:u6e,symbolSquare:c6e,symbolStar:p6e,symbolTriangle:m6e,symbolWye:v6e},z6e=Math.PI/180,q6e=function(t){var n="symbol".concat(UR(t));return cie[n]||f4},U6e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*z6e;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},V6e=function(t,n){cie["symbol".concat(UR(t))]=n},d4=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=F6e(t,I6e),u=Oq(Oq({},l),{},{type:r,size:i,sizeType:s}),c=function(){var w=q6e(r),_=y6e().type(w).size(U6e(i,s,r));return _()},d=u.className,h=u.cx,p=u.cy,x=xn(u,!0);return h===+h&&p===+p&&i===+i?J.createElement("path",u5({},x,{className:jn("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};d4.registerSymbol=V6e;function cy(e){"@babel/helpers - typeof";return cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cy(e)}function c5(){return c5=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var C=p.inactive?u:p.color;return J.createElement("li",c5({className:w,style:d,key:"legend-item-".concat(x)},AC(r.props,p,x)),J.createElement(r5,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},y?y(_,p,x):_))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(b.PureComponent);tx(h4,"displayName","Legend");tx(h4,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var oN,Pq;function eFe(){if(Pq)return oN;Pq=1;var e=BR();function t(){this.__data__=new e,this.size=0}return oN=t,oN}var iN,Tq;function tFe(){if(Tq)return iN;Tq=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return iN=e,iN}var aN,Aq;function nFe(){if(Aq)return aN;Aq=1;function e(t){return this.__data__.get(t)}return aN=e,aN}var sN,kq;function rFe(){if(kq)return sN;kq=1;function e(t){return this.__data__.has(t)}return sN=e,sN}var lN,Nq;function oFe(){if(Nq)return lN;Nq=1;var e=BR(),t=r4(),n=o4(),r=200;function o(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.lengthp))return!1;var y=d.get(a),w=d.get(s);if(y&&w)return y==s&&w==a;var _=-1,C=!0,O=l&o?new e:void 0;for(d.set(a,s),d.set(s,a);++_-1&&r%1==0&&r-1&&n%1==0&&n<=e}return AN=t,AN}var kN,nU;function vFe(){if(nU)return kN;nU=1;var e=wf(),t=v4(),n=xf(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",d="[object Object]",h="[object RegExp]",p="[object Set]",x="[object String]",y="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",T="[object Int32Array]",k="[object Uint8Array]",M="[object Uint8ClampedArray]",j="[object Uint16Array]",$="[object Uint32Array]",L={};L[C]=L[O]=L[P]=L[R]=L[T]=L[k]=L[M]=L[j]=L[$]=!0,L[r]=L[o]=L[w]=L[i]=L[_]=L[a]=L[s]=L[l]=L[u]=L[c]=L[d]=L[h]=L[p]=L[x]=L[y]=!1;function V(G){return n(G)&&t(G.length)&&!!L[e(G)]}return kN=V,kN}var NN,rU;function xie(){if(rU)return NN;rU=1;function e(t){return function(n){return t(n)}}return NN=e,NN}var iw={exports:{}};iw.exports;var oU;function yFe(){return oU||(oU=1,(function(e,t){var n=Foe(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=(function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(iw,iw.exports)),iw.exports}var MN,iU;function bie(){if(iU)return MN;iU=1;var e=vFe(),t=xie(),n=yFe(),r=n&&n.isTypedArray,o=r?t(r):e;return MN=o,MN}var jN,aU;function wFe(){if(aU)return jN;aU=1;var e=pFe(),t=m4(),n=Da(),r=wie(),o=g4(),i=bie(),a=Object.prototype,s=a.hasOwnProperty;function l(u,c){var d=n(u),h=!d&&t(u),p=!d&&!h&&r(u),x=!d&&!h&&!p&&i(u),y=d||h||p||x,w=y?e(u.length,String):[],_=w.length;for(var C in u)(c||s.call(u,C))&&!(y&&(C=="length"||p&&(C=="offset"||C=="parent")||x&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,_)))&&w.push(C);return w}return jN=l,jN}var IN,sU;function xFe(){if(sU)return IN;sU=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return IN=t,IN}var DN,lU;function Sie(){if(lU)return DN;lU=1;function e(t,n){return function(r){return t(n(r))}}return DN=e,DN}var LN,uU;function bFe(){if(uU)return LN;uU=1;var e=Sie(),t=e(Object.keys,Object);return LN=t,LN}var $N,cU;function SFe(){if(cU)return $N;cU=1;var e=xFe(),t=bFe(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))r.call(i,s)&&s!="constructor"&&a.push(s);return a}return $N=o,$N}var FN,fU;function Pb(){if(fU)return FN;fU=1;var e=t4(),t=v4();function n(r){return r!=null&&t(r.length)&&!e(r)}return FN=n,FN}var BN,dU;function GR(){if(dU)return BN;dU=1;var e=wFe(),t=SFe(),n=Pb();function r(o){return n(o)?e(o):t(o)}return BN=r,BN}var zN,hU;function _Fe(){if(hU)return zN;hU=1;var e=cFe(),t=hFe(),n=GR();function r(o){return e(o,n,t)}return zN=r,zN}var qN,pU;function EFe(){if(pU)return qN;pU=1;var e=_Fe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,a,s,l,u,c){var d=s&t,h=e(i),p=h.length,x=e(a),y=x.length;if(p!=y&&!d)return!1;for(var w=p;w--;){var _=h[w];if(!(d?_ in a:r.call(a,_)))return!1}var C=c.get(i),O=c.get(a);if(C&&O)return C==a&&O==i;var P=!0;c.set(i,a),c.set(a,i);for(var R=d;++w-1}return pM=t,pM}var mM,zU;function VFe(){if(zU)return mM;zU=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o=a){var _=u?null:o(l);if(_)return i(_);x=!1,h=r,w=new e}else w=u?[]:y;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a7e(e){return e.value}function s7e(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=o7e(t,XFe);return J.createElement(h4,n)}var YU=1,Ov=(function(e){function t(){var n;QFe(this,t);for(var r=arguments.length,o=new Array(r),i=0;iYU||Math.abs(o.height-this.lastBoundingBox.height)>YU)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?zc({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,u=o.chartWidth,c=o.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var x=this.getBBoxSnapshot();h={top:((c||0)-x.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return zc(zc({},d),h)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,u=o.payloadUniqBy,c=o.payload,d=zc(zc({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return J.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},s7e(i,zc(zc({},this.props),{},{payload:Rie(c,u,a7e)})))}}],[{key:"getWithHeight",value:function(r,o){var i=zc(zc({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&ot(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])})(b.PureComponent);KR(Ov,"displayName","Legend");KR(Ov,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var xM,XU;function l7e(){if(XU)return xM;XU=1;var e=Rb(),t=m4(),n=Da(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return xM=o,xM}var bM,QU;function Aie(){if(QU)return bM;QU=1;var e=yie(),t=l7e();function n(r,o,i,a,s){var l=-1,u=r.length;for(i||(i=t),s||(s=[]);++l0&&i(c)?o>1?n(c,o-1,i,a,s):e(s,c):a||(s[s.length]=c)}return s}return bM=n,bM}var SM,ZU;function u7e(){if(ZU)return SM;ZU=1;function e(t){return function(n,r,o){for(var i=-1,a=Object(n),s=o(n),l=s.length;l--;){var u=s[t?l:++i];if(r(a[u],u,a)===!1)break}return n}}return SM=e,SM}var _M,JU;function c7e(){if(JU)return _M;JU=1;var e=u7e(),t=e();return _M=t,_M}var EM,eV;function kie(){if(eV)return EM;eV=1;var e=c7e(),t=GR();function n(r,o){return r&&e(r,o,t)}return EM=n,EM}var CM,tV;function f7e(){if(tV)return CM;tV=1;var e=Pb();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var a=o.length,s=r?a:-1,l=Object(o);(r?s--:++sr||s&&l&&c&&!u&&!d||i&&l&&c||!o&&c||!a)return 1;if(!i&&!s&&!d&&n=u)return c;var d=o[i];return c*(d=="desc"?-1:1)}}return n.index-r.index}return AM=t,AM}var kM,sV;function m7e(){if(sV)return kM;sV=1;var e=i4(),t=a4(),n=ih(),r=Nie(),o=d7e(),i=xie(),a=p7e(),s=r0(),l=Da();function u(c,d,h){d.length?d=e(d,function(y){return l(y)?function(w){return t(w,y.length===1?y[0]:y)}:y}):d=[s];var p=-1;d=e(d,i(n));var x=r(c,function(y,w,_){var C=e(d,function(O){return O(y)});return{criteria:C,index:++p,value:y}});return o(x,function(y,w){return a(y,w,h)})}return kM=u,kM}var NM,lV;function g7e(){if(lV)return NM;lV=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return NM=e,NM}var MM,uV;function v7e(){if(uV)return MM;uV=1;var e=g7e(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,s=-1,l=t(a.length-o,0),u=Array(l);++s0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return LM=r,LM}var $M,pV;function b7e(){if(pV)return $M;pV=1;var e=w7e(),t=x7e(),n=t(e);return $M=n,$M}var FM,mV;function S7e(){if(mV)return FM;mV=1;var e=r0(),t=v7e(),n=b7e();function r(o,i){return n(t(o,i,e),o+"")}return FM=r,FM}var BM,gV;function YR(){if(gV)return BM;gV=1;var e=n4(),t=Pb(),n=g4(),r=oh();function o(i,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],i):!1}return BM=o,BM}var zM,vV;function _7e(){if(vV)return zM;vV=1;var e=Aie(),t=m7e(),n=S7e(),r=YR(),o=n(function(i,a){if(i==null)return[];var s=a.length;return s>1&&r(i,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return zM=o,zM}var E7e=_7e();const x4=Ln(E7e);function nx(e){"@babel/helpers - typeof";return nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nx(e)}function h5(){return h5=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat($1,"-left"),ot(n)&&t&&ot(t.x)&&n=t.y),"".concat($1,"-top"),ot(r)&&t&&ot(t.y)&&ry?Math.max(c,l[r]):Math.max(d,l[r])}function F7e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function B7e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,d;return a.height>0&&a.width>0&&n?(c=xV({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=xV({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=F7e({translateX:c,translateY:d,useTranslate3d:s})):u=L7e,{cssProperties:u,cssClasses:$7e({translateX:c,translateY:d,coordinate:n})}}function dy(e){"@babel/helpers - typeof";return dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dy(e)}function bV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function SV(e){for(var t=1;t_V||Math.abs(r.height-this.state.lastBoundingBox.height)>_V)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,u=o.children,c=o.coordinate,d=o.hasPayload,h=o.isAnimationActive,p=o.offset,x=o.position,y=o.reverseDirection,w=o.useTranslate3d,_=o.viewBox,C=o.wrapperStyle,O=B7e({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:x,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:_}),P=O.cssClasses,R=O.cssProperties,T=SV(SV({transition:h&&i?"transform ".concat(s,"ms ").concat(l):void 0},R),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return J.createElement("div",{tabIndex:-1,className:P,style:T,ref:function(M){r.wrapperNode=M}},u)}}])})(b.PureComponent),X7e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Sm={isSsr:X7e()};function hy(e){"@babel/helpers - typeof";return hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hy(e)}function EV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function CV(e){for(var t=1;t0;return J.createElement(Y7e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:h,active:i,coordinate:c,hasPayload:T,offset:p,position:w,reverseDirection:_,useTranslate3d:C,viewBox:O,wrapperStyle:P},a9e(u,CV(CV({},this.props),{},{payload:R})))}}])})(b.PureComponent);b4(Mu,"displayName","Tooltip");b4(Mu,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Sm.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var UM,OV;function s9e(){if(OV)return UM;OV=1;var e=oc(),t=function(){return e.Date.now()};return UM=t,UM}var VM,RV;function l9e(){if(RV)return VM;RV=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return VM=t,VM}var WM,PV;function u9e(){if(PV)return WM;PV=1;var e=l9e(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return WM=n,WM}var HM,TV;function $ie(){if(TV)return HM;TV=1;var e=u9e(),t=oh(),n=Jy(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=i.test(u);return d||a.test(u)?s(u.slice(2),d?2:8):o.test(u)?r:+u}return HM=l,HM}var GM,AV;function c9e(){if(AV)return GM;AV=1;var e=oh(),t=s9e(),n=$ie(),r="Expected a function",o=Math.max,i=Math.min;function a(s,l,u){var c,d,h,p,x,y,w=0,_=!1,C=!1,O=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(u)&&(_=!!u.leading,C="maxWait"in u,h=C?o(n(u.maxWait)||0,l):h,O="trailing"in u?!!u.trailing:O);function P(G){var D=c,H=d;return c=d=void 0,w=G,p=s.apply(H,D),p}function R(G){return w=G,x=setTimeout(M,l),_?P(G):p}function T(G){var D=G-y,H=G-w,U=l-D;return C?i(U,h-H):U}function k(G){var D=G-y,H=G-w;return y===void 0||D>=l||D<0||C&&H>=h}function M(){var G=t();if(k(G))return j(G);x=setTimeout(M,T(G))}function j(G){return x=void 0,O&&c?P(G):(c=d=void 0,p)}function $(){x!==void 0&&clearTimeout(x),w=0,c=y=d=x=void 0}function L(){return x===void 0?p:j(t())}function V(){var G=t(),D=k(G);if(c=arguments,d=this,y=G,D){if(x===void 0)return R(y);if(C)return clearTimeout(x),x=setTimeout(M,l),P(y)}return x===void 0&&(x=setTimeout(M,l)),p}return V.cancel=$,V.flush=L,V}return GM=a,GM}var KM,kV;function f9e(){if(kV)return KM;kV=1;var e=c9e(),t=oh(),n="Expected a function";function r(o,i,a){var s=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return t(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),e(o,i,{leading:s,maxWait:i,trailing:l})}return KM=r,KM}var d9e=f9e();const Fie=Ln(d9e);function ox(e){"@babel/helpers - typeof";return ox=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ox(e)}function NV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D_(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(G=Fie(G,y,{trailing:!0,leading:!1}));var D=new ResizeObserver(G),H=R.current.getBoundingClientRect(),U=H.width,Y=H.height;return L(U,Y),D.observe(R.current),function(){D.disconnect()}},[L,y]);var V=b.useMemo(function(){var G=j.containerWidth,D=j.containerHeight;if(G<0||D<0)return null;rf(Cp(a)||Cp(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),rf(!n||n>0,"The aspect(%s) must be greater than zero.",n);var H=Cp(a)?G:a,U=Cp(l)?D:l;n&&n>0&&(H?U=H/n:U&&(H=U*n),h&&U>h&&(U=h)),rf(H>0||U>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,H,U,a,l,c,d,n);var Y=!Array.isArray(p)&&nf(p.type).endsWith("Chart");return J.Children.map(p,function(q){return J.isValidElement(q)?b.cloneElement(q,D_({width:H,height:U},Y?{style:D_({height:"100%",width:"100%",maxHeight:U,maxWidth:H},q.props.style)}:{})):q})},[n,p,l,h,d,c,j,a]);return J.createElement("div",{id:w?"".concat(w):void 0,className:jn("recharts-responsive-container",_),style:D_(D_({},P),{},{width:a,height:l,minWidth:c,minHeight:d,maxHeight:h}),ref:R},V)}),Bie=function(t){return null};Bie.displayName="Cell";function ix(e){"@babel/helpers - typeof";return ix=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ix(e)}function jV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function v5(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sm.isSsr)return{width:0,height:0};var r=O9e(n),o=JSON.stringify({text:t,copyStyle:r});if(tv.widthCache[o])return tv.widthCache[o];try{var i=document.getElementById(IV);i||(i=document.createElement("span"),i.setAttribute("id",IV),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=v5(v5({},C9e),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return tv.widthCache[o]=l,++tv.cacheCount>E9e&&(tv.cacheCount=0,tv.widthCache={}),l}catch{return{width:0,height:0}}},R9e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ax(e){"@babel/helpers - typeof";return ax=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ax(e)}function BC(e,t){return k9e(e)||A9e(e,t)||T9e(e,t)||P9e()}function P9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T9e(e,t){if(e){if(typeof e=="string")return DV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DV(e,t)}}function DV(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qV(e,t){return Y9e(e)||K9e(e,t)||G9e(e,t)||H9e()}function H9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G9e(e,t){if(e){if(typeof e=="string")return UV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UV(e,t)}}function UV(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(U,Y){var q=Y.word,W=Y.width,K=U[U.length-1];if(K&&(o==null||i||K.width+W+rY.width?U:Y})};if(!c)return p;for(var y="…",w=function(H){var U=d.slice(0,H),Y=Vie({breakAll:u,style:l,children:U+y}).wordsWithComputedWidth,q=h(Y),W=q.length>a||x(q).width>Number(o);return[W,q]},_=0,C=d.length-1,O=0,P;_<=C&&O<=d.length-1;){var R=Math.floor((_+C)/2),T=R-1,k=w(T),M=qV(k,2),j=M[0],$=M[1],L=w(R),V=qV(L,1),G=V[0];if(!j&&!G&&(_=R+1),j&&G&&(C=R-1),!j&&G){P=$;break}O++}return P||p},VV=function(t){var n=Rn(t)?[]:t.toString().split(Uie);return[{words:n}]},Q9e=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Sm.isSsr){var l,u,c=Vie({breakAll:a,children:o,style:i});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;l=d,u=h}else return VV(o);return X9e({breakAll:a,children:o,maxLines:s,style:i},l,u,n,r)}return VV(o)},WV="#808080",zC=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,x=t.verticalAnchor,y=x===void 0?"end":x,w=t.fill,_=w===void 0?WV:w,C=zV(t,U9e),O=b.useMemo(function(){return Q9e({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),P=C.dx,R=C.dy,T=C.angle,k=C.className,M=C.breakAll,j=zV(C,V9e);if(!Po(r)||!Po(i))return null;var $=r+(ot(P)?P:0),L=i+(ot(R)?R:0),V;switch(y){case"start":V=YM("calc(".concat(u,")"));break;case"middle":V=YM("calc(".concat((O.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:V=YM("calc(".concat(O.length-1," * -").concat(s,")"));break}var G=[];if(d){var D=O[0].width,H=C.width;G.push("scale(".concat((ot(H)?H/D:1)/D,")"))}return T&&G.push("rotate(".concat(T,", ").concat($,", ").concat(L,")")),G.length&&(j.transform=G.join(" ")),J.createElement("text",y5({},xn(j,!0),{x:$,y:L,className:jn("recharts-text",k),textAnchor:p,fill:_.includes("url")?WV:_}),O.map(function(U,Y){var q=U.words.join(M?"":" ");return J.createElement("tspan",{x:$,dy:Y===0?V:s,key:"".concat(q,"-").concat(Y)},q)}))};function Vd(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Z9e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function S4(e){let t,n,r;e.length!==2?(t=Vd,n=(s,l)=>Vd(e(s),l),r=(s,l)=>e(s)-l):(t=e===Vd||e===Z9e?e:J9e,n=e,r=e);function o(s,l,u=0,c=s.length){if(u>>1;n(s[d],l)<0?u=d+1:c=d}while(u>>1;n(s[d],l)<=0?u=d+1:c=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function J9e(){return 0}function Wie(e){return e===null?NaN:+e}function*eBe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const tBe=S4(Vd),Tb=tBe.right;S4(Wie).center;class HV extends Map{constructor(t,n=oBe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(GV(this,t))}has(t){return super.has(GV(this,t))}set(t,n){return super.set(nBe(this,t),n)}delete(t){return super.delete(rBe(this,t))}}function GV({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function nBe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function rBe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function oBe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function iBe(e=Vd){if(e===Vd)return Hie;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Hie(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}var w5=Math.sqrt(50),x5=Math.sqrt(10),b5=Math.sqrt(2);function S5(e,t,n){var r,o=-1,i,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t0){let l=Math.round(e/s),u=Math.round(t/s);for(l*st&&--u,a=new Array(i=u-l+1);++ot&&--u,a=new Array(i=u-l+1);++o=0?(i>=w5?10:i>=x5?5:i>=b5?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=w5?10:i>=x5?5:i>=b5?2:1)}function _5(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=w5?o*=10:i>=x5?o*=5:i>=b5&&(o*=2),t=r)&&(n=r);return n}function YV(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Kie(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?Hie:iBe(o);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*d/l+h)),x=Math.min(r,Math.floor(t+(l-u)*d/l+h));Kie(e,t,p,x,o)}const i=e[t];let a=n,s=r;for(F1(e,n,t),o(e[r],i)>0&&F1(e,n,r);a0;)--s}o(e[n],i)===0?F1(e,n,s):(++s,F1(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function F1(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function aBe(e,t,n){if(e=Float64Array.from(eBe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return YV(e);if(t>=1)return KV(e);var r,o=(r-1)*t,i=Math.floor(o),a=KV(Kie(e,i).subarray(0,i+1)),s=YV(e.subarray(i+1));return a+(s-a)*(o-i)}}function sBe(e,t,n=Wie){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function lBe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++rt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function fBe(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?dBe:fBe,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=s(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(o((u||(u=s(t,e.map(r),Cl)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,qC),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=S$,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Qi,c()):a!==Qi},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,o=p,c()}}function E4(){return QR()(Qi,Qi)}function hBe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function UC(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function py(e){return e=UC(Math.abs(e)),e?e[1]:NaN}function pBe(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function mBe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var gBe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lx(e){if(!(t=gBe.exec(e)))throw new Error("invalid format: "+e);var t;return new C4({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}lx.prototype=C4.prototype;function C4(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}C4.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function vBe(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Xie;function yBe(e,t){var n=UC(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Xie=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+UC(e,Math.max(0,t+i-1))[0]}function QV(e,t){var n=UC(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const ZV={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:hBe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>QV(e*100,t),r:QV,s:yBe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function JV(e){return e}var eW=Array.prototype.map,tW=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wBe(e){var t=e.grouping===void 0||e.thousands===void 0?JV:pBe(eW.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?JV:mBe(eW.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=lx(d);var h=d.fill,p=d.align,x=d.sign,y=d.symbol,w=d.zero,_=d.width,C=d.comma,O=d.precision,P=d.trim,R=d.type;R==="n"?(C=!0,R="g"):ZV[R]||(O===void 0&&(O=12),P=!0,R="g"),(w||h==="0"&&p==="=")&&(w=!0,h="0",p="=");var T=y==="$"?n:y==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():"",k=y==="$"?r:/[%p]/.test(R)?a:"",M=ZV[R],j=/[defgprs%]/.test(R);O=O===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function $(L){var V=T,G=k,D,H,U;if(R==="c")G=M(L)+G,L="";else{L=+L;var Y=L<0||1/L<0;if(L=isNaN(L)?l:M(Math.abs(L),O),P&&(L=vBe(L)),Y&&+L==0&&x!=="+"&&(Y=!1),V=(Y?x==="("?x:s:x==="-"||x==="("?"":x)+V,G=(R==="s"?tW[8+Xie/3]:"")+G+(Y&&x==="("?")":""),j){for(D=-1,H=L.length;++DU||U>57){G=(U===46?o+L.slice(D+1):L.slice(D))+G,L=L.slice(0,D);break}}}C&&!w&&(L=t(L,1/0));var q=V.length+L.length+G.length,W=q<_?new Array(_-q+1).join(h):"";switch(C&&w&&(L=t(W+L,W.length?_-G.length:1/0),W=""),p){case"<":L=V+L+G+W;break;case"=":L=V+W+L+G;break;case"^":L=W.slice(0,q=W.length>>1)+V+L+G+W.slice(q);break;default:L=W+V+L+G;break}return i(L)}return $.toString=function(){return d+""},$}function c(d,h){var p=u((d=lx(d),d.type="f",d)),x=Math.max(-8,Math.min(8,Math.floor(py(h)/3)))*3,y=Math.pow(10,-x),w=tW[8+x/3];return function(_){return p(y*_)+w}}return{format:u,formatPrefix:c}}var $_,O4,Qie;xBe({thousands:",",grouping:[3],currency:["$",""]});function xBe(e){return $_=wBe(e),O4=$_.format,Qie=$_.formatPrefix,$_}function bBe(e){return Math.max(0,-py(Math.abs(e)))}function SBe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(py(t)/3)))*3-py(Math.abs(e)))}function _Be(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,py(t)-py(e))+1}function Zie(e,t,n,r){var o=_5(e,t,n),i;switch(r=lx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=SBe(o,a))&&(r.precision=i),Qie(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=_Be(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=bBe(o))&&(r.precision=i-(r.type==="%")*2);break}}return O4(r)}function ah(e){var t=e.domain;return e.ticks=function(n){var r=t();return S5(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Zie(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,u,c=10;for(s0;){if(u=Gie(a,s,n),u===l)return r[o]=a,r[i]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function VC(){var e=E4();return e.copy=function(){return Ab(e,VC())},Ys.apply(e,arguments),ah(e)}function Jie(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,qC),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Jie(e).unknown(t)},e=arguments.length?Array.from(e,qC):[0,1],ah(n)}function eae(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function PBe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function oW(e){return(t,n)=>-e(-t,n)}function R4(e){const t=e(nW,rW),n=t.domain;let r=10,o,i;function a(){return o=PBe(r),i=RBe(r),n()[0]<0?(o=oW(o),i=oW(i),e(EBe,CBe)):e(nW,rW),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const d=c0){for(;h<=p;++h)for(x=1;xc)break;_.push(y)}}else for(;h<=p;++h)for(x=r-1;x>=1;--x)if(y=h>0?x/i(-h):x*i(h),!(yc)break;_.push(y)}_.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=lx(l)).precision==null&&(l.trim=!0),l=O4(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let d=c/i(Math.round(o(c)));return d*rn(eae(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function tae(){const e=R4(QR()).domain([1,10]);return e.copy=()=>Ab(e,tae()).base(e.base()),Ys.apply(e,arguments),e}function iW(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aW(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function P4(e){var t=1,n=e(iW(t),aW(t));return n.constant=function(r){return arguments.length?e(iW(t=+r),aW(t)):t},ah(n)}function nae(){var e=P4(QR());return e.copy=function(){return Ab(e,nae()).constant(e.constant())},Ys.apply(e,arguments)}function sW(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function TBe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ABe(e){return e<0?-e*e:e*e}function T4(e){var t=e(Qi,Qi),n=1;function r(){return n===1?e(Qi,Qi):n===.5?e(TBe,ABe):e(sW(n),sW(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},ah(t)}function A4(){var e=T4(QR());return e.copy=function(){return Ab(e,A4()).exponent(e.exponent())},Ys.apply(e,arguments),e}function kBe(){return A4.apply(null,arguments).exponent(.5)}function lW(e){return Math.sign(e)*e*e}function NBe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function rae(){var e=E4(),t=[0,1],n=!1,r;function o(i){var a=NBe(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(lW(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,qC)).map(lW)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return rae(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ys.apply(o,arguments),ah(o)}function oae(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return iae().domain([e,t]).range(o).unknown(i)},Ys.apply(ah(a),arguments)}function aae(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Tb(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return aae().domain(e).range(t).unknown(n)},Ys.apply(o,arguments)}const XM=new Date,QM=new Date;function Ao(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(uAo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(XM.setTime(+i),QM.setTime(+a),e(XM),e(QM),Math.floor(n(XM,QM))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const WC=Ao(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);WC.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ao(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):WC);WC.range;const Zc=1e3,Is=Zc*60,Jc=Is*60,pf=Jc*24,k4=pf*7,uW=pf*30,ZM=pf*365,Op=Ao(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Zc)},(e,t)=>(t-e)/Zc,e=>e.getUTCSeconds());Op.range;const N4=Ao(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zc)},(e,t)=>{e.setTime(+e+t*Is)},(e,t)=>(t-e)/Is,e=>e.getMinutes());N4.range;const M4=Ao(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Is)},(e,t)=>(t-e)/Is,e=>e.getUTCMinutes());M4.range;const j4=Ao(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zc-e.getMinutes()*Is)},(e,t)=>{e.setTime(+e+t*Jc)},(e,t)=>(t-e)/Jc,e=>e.getHours());j4.range;const I4=Ao(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Jc)},(e,t)=>(t-e)/Jc,e=>e.getUTCHours());I4.range;const kb=Ao(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Is)/pf,e=>e.getDate()-1);kb.range;const ZR=Ao(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pf,e=>e.getUTCDate()-1);ZR.range;const sae=Ao(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/pf,e=>Math.floor(e/pf));sae.range;function _m(e){return Ao(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Is)/k4)}const JR=_m(0),HC=_m(1),MBe=_m(2),jBe=_m(3),my=_m(4),IBe=_m(5),DBe=_m(6);JR.range;HC.range;MBe.range;jBe.range;my.range;IBe.range;DBe.range;function Em(e){return Ao(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/k4)}const eP=Em(0),GC=Em(1),LBe=Em(2),$Be=Em(3),gy=Em(4),FBe=Em(5),BBe=Em(6);eP.range;GC.range;LBe.range;$Be.range;gy.range;FBe.range;BBe.range;const D4=Ao(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());D4.range;const L4=Ao(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());L4.range;const mf=Ao(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());mf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ao(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});mf.range;const gf=Ao(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());gf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ao(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});gf.range;function lae(e,t,n,r,o,i){const a=[[Op,1,Zc],[Op,5,5*Zc],[Op,15,15*Zc],[Op,30,30*Zc],[i,1,Is],[i,5,5*Is],[i,15,15*Is],[i,30,30*Is],[o,1,Jc],[o,3,3*Jc],[o,6,6*Jc],[o,12,12*Jc],[r,1,pf],[r,2,2*pf],[n,1,k4],[t,1,uW],[t,3,3*uW],[e,1,ZM]];function s(u,c,d){const h=cw).right(a,h);if(p===a.length)return e.every(_5(u/ZM,c/ZM,d));if(p===0)return WC.every(Math.max(_5(u,c,d),1));const[x,y]=a[h/a[p-1][2]53)return null;"w"in ye||(ye.w=1),"Z"in ye?(We=ej(B1(ye.y,0,1)),et=We.getUTCDay(),We=et>4||et===0?GC.ceil(We):GC(We),We=ZR.offset(We,(ye.V-1)*7),ye.y=We.getUTCFullYear(),ye.m=We.getUTCMonth(),ye.d=We.getUTCDate()+(ye.w+6)%7):(We=JM(B1(ye.y,0,1)),et=We.getDay(),We=et>4||et===0?HC.ceil(We):HC(We),We=kb.offset(We,(ye.V-1)*7),ye.y=We.getFullYear(),ye.m=We.getMonth(),ye.d=We.getDate()+(ye.w+6)%7)}else("W"in ye||"U"in ye)&&("w"in ye||(ye.w="u"in ye?ye.u%7:"W"in ye?1:0),et="Z"in ye?ej(B1(ye.y,0,1)).getUTCDay():JM(B1(ye.y,0,1)).getDay(),ye.m=0,ye.d="W"in ye?(ye.w+6)%7+ye.W*7-(et+5)%7:ye.w+ye.U*7-(et+6)%7);return"Z"in ye?(ye.H+=ye.Z/100|0,ye.M+=ye.Z%100,ej(ye)):JM(ye)}}function M(ue,we,Ae,ye){for(var Xe=0,We=we.length,et=Ae.length,ft,st;Xe=et)return-1;if(ft=we.charCodeAt(Xe++),ft===37){if(ft=we.charAt(Xe++),st=R[ft in cW?we.charAt(Xe++):ft],!st||(ye=st(ue,Ae,ye))<0)return-1}else if(ft!=Ae.charCodeAt(ye++))return-1}return ye}function j(ue,we,Ae){var ye=u.exec(we.slice(Ae));return ye?(ue.p=c.get(ye[0].toLowerCase()),Ae+ye[0].length):-1}function $(ue,we,Ae){var ye=p.exec(we.slice(Ae));return ye?(ue.w=x.get(ye[0].toLowerCase()),Ae+ye[0].length):-1}function L(ue,we,Ae){var ye=d.exec(we.slice(Ae));return ye?(ue.w=h.get(ye[0].toLowerCase()),Ae+ye[0].length):-1}function V(ue,we,Ae){var ye=_.exec(we.slice(Ae));return ye?(ue.m=C.get(ye[0].toLowerCase()),Ae+ye[0].length):-1}function G(ue,we,Ae){var ye=y.exec(we.slice(Ae));return ye?(ue.m=w.get(ye[0].toLowerCase()),Ae+ye[0].length):-1}function D(ue,we,Ae){return M(ue,t,we,Ae)}function H(ue,we,Ae){return M(ue,n,we,Ae)}function U(ue,we,Ae){return M(ue,r,we,Ae)}function Y(ue){return a[ue.getDay()]}function q(ue){return i[ue.getDay()]}function W(ue){return l[ue.getMonth()]}function K(ue){return s[ue.getMonth()]}function z(ue){return o[+(ue.getHours()>=12)]}function X(ue){return 1+~~(ue.getMonth()/3)}function ee(ue){return a[ue.getUTCDay()]}function ae(ue){return i[ue.getUTCDay()]}function fe(ue){return l[ue.getUTCMonth()]}function ie(ue){return s[ue.getUTCMonth()]}function ge(ue){return o[+(ue.getUTCHours()>=12)]}function he(ue){return 1+~~(ue.getUTCMonth()/3)}return{format:function(ue){var we=T(ue+="",O);return we.toString=function(){return ue},we},parse:function(ue){var we=k(ue+="",!1);return we.toString=function(){return ue},we},utcFormat:function(ue){var we=T(ue+="",P);return we.toString=function(){return ue},we},utcParse:function(ue){var we=k(ue+="",!0);return we.toString=function(){return ue},we}}}var cW={"-":"",_:" ",0:"0"},Go=/^\s*\d+/,HBe=/^%/,GBe=/[\\^$*+?|[\]().{}]/g;function er(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function YBe(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function XBe(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QBe(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ZBe(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function JBe(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function fW(e,t,n){var r=Go.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function dW(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eze(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tze(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function hW(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rze(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pW(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ize(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function aze(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function sze(e,t,n){var r=Go.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lze(e,t,n){var r=HBe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uze(e,t,n){var r=Go.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function cze(e,t,n){var r=Go.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function mW(e,t){return er(e.getDate(),t,2)}function fze(e,t){return er(e.getHours(),t,2)}function dze(e,t){return er(e.getHours()%12||12,t,2)}function hze(e,t){return er(1+kb.count(mf(e),e),t,3)}function uae(e,t){return er(e.getMilliseconds(),t,3)}function pze(e,t){return uae(e,t)+"000"}function mze(e,t){return er(e.getMonth()+1,t,2)}function gze(e,t){return er(e.getMinutes(),t,2)}function vze(e,t){return er(e.getSeconds(),t,2)}function yze(e){var t=e.getDay();return t===0?7:t}function wze(e,t){return er(JR.count(mf(e)-1,e),t,2)}function cae(e){var t=e.getDay();return t>=4||t===0?my(e):my.ceil(e)}function xze(e,t){return e=cae(e),er(my.count(mf(e),e)+(mf(e).getDay()===4),t,2)}function bze(e){return e.getDay()}function Sze(e,t){return er(HC.count(mf(e)-1,e),t,2)}function _ze(e,t){return er(e.getFullYear()%100,t,2)}function Eze(e,t){return e=cae(e),er(e.getFullYear()%100,t,2)}function Cze(e,t){return er(e.getFullYear()%1e4,t,4)}function Oze(e,t){var n=e.getDay();return e=n>=4||n===0?my(e):my.ceil(e),er(e.getFullYear()%1e4,t,4)}function Rze(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+er(t/60|0,"0",2)+er(t%60,"0",2)}function gW(e,t){return er(e.getUTCDate(),t,2)}function Pze(e,t){return er(e.getUTCHours(),t,2)}function Tze(e,t){return er(e.getUTCHours()%12||12,t,2)}function Aze(e,t){return er(1+ZR.count(gf(e),e),t,3)}function fae(e,t){return er(e.getUTCMilliseconds(),t,3)}function kze(e,t){return fae(e,t)+"000"}function Nze(e,t){return er(e.getUTCMonth()+1,t,2)}function Mze(e,t){return er(e.getUTCMinutes(),t,2)}function jze(e,t){return er(e.getUTCSeconds(),t,2)}function Ize(e){var t=e.getUTCDay();return t===0?7:t}function Dze(e,t){return er(eP.count(gf(e)-1,e),t,2)}function dae(e){var t=e.getUTCDay();return t>=4||t===0?gy(e):gy.ceil(e)}function Lze(e,t){return e=dae(e),er(gy.count(gf(e),e)+(gf(e).getUTCDay()===4),t,2)}function $ze(e){return e.getUTCDay()}function Fze(e,t){return er(GC.count(gf(e)-1,e),t,2)}function Bze(e,t){return er(e.getUTCFullYear()%100,t,2)}function zze(e,t){return e=dae(e),er(e.getUTCFullYear()%100,t,2)}function qze(e,t){return er(e.getUTCFullYear()%1e4,t,4)}function Uze(e,t){var n=e.getUTCDay();return e=n>=4||n===0?gy(e):gy.ceil(e),er(e.getUTCFullYear()%1e4,t,4)}function Vze(){return"+0000"}function vW(){return"%"}function yW(e){return+e}function wW(e){return Math.floor(+e/1e3)}var nv,hae,pae;Wze({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Wze(e){return nv=WBe(e),hae=nv.format,nv.parse,pae=nv.utcFormat,nv.utcParse,nv}function Hze(e){return new Date(e)}function Gze(e){return e instanceof Date?+e:+new Date(+e)}function $4(e,t,n,r,o,i,a,s,l,u){var c=E4(),d=c.invert,h=c.domain,p=u(".%L"),x=u(":%S"),y=u("%I:%M"),w=u("%I %p"),_=u("%a %d"),C=u("%b %d"),O=u("%B"),P=u("%Y");function R(T){return(l(T)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>aBe(e,i/r))},n.copy=function(){return yae(t).domain(e)},bf.apply(n,arguments)}function nP(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,u=Qi,c,d=!1,h;function p(y){return isNaN(y=+y)?h:(y=.5+((y=+c(y))-i)*(r*yn}return nj=e,nj}var rj,_W;function Jze(){if(_W)return rj;_W=1;var e=Sae(),t=Zze(),n=r0();function r(o){return o&&o.length?e(o,n,t):void 0}return rj=r,rj}var eqe=Jze();const Md=Ln(eqe);var oj,EW;function tqe(){if(EW)return oj;EW=1;function e(t,n){return te.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};xt.decimalPlaces=xt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xt.dividedBy=xt.div=function(e){return of(this,new this.constructor(e))};xt.dividedToIntegerBy=xt.idiv=function(e){var t=this,n=t.constructor;return vr(of(t,new n(e),0,1),n.precision)};xt.equals=xt.eq=function(e){return!this.cmp(e)};xt.exponent=function(){return go(this)};xt.greaterThan=xt.gt=function(e){return this.cmp(e)>0};xt.greaterThanOrEqualTo=xt.gte=function(e){return this.cmp(e)>=0};xt.isInteger=xt.isint=function(){return this.e>this.d.length-2};xt.isNegative=xt.isneg=function(){return this.s<0};xt.isPositive=xt.ispos=function(){return this.s>0};xt.isZero=function(){return this.s===0};xt.lessThan=xt.lt=function(e){return this.cmp(e)<0};xt.lessThanOrEqualTo=xt.lte=function(e){return this.cmp(e)<1};xt.logarithm=xt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(as))throw Error(Ws+"NaN");if(n.s<1)throw Error(Ws+(n.s?"NaN":"-Infinity"));return n.eq(as)?new r(0):(Nr=!1,t=of(ux(n,i),ux(e,i),i),Nr=!0,vr(t,o))};xt.minus=xt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Oae(t,e):Eae(t,(e.s=-e.s,e))};xt.modulo=xt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(Ws+"NaN");return n.s?(Nr=!1,t=of(n,e,0,1).times(e),Nr=!0,n.minus(t)):vr(new r(n),o)};xt.naturalExponential=xt.exp=function(){return Cae(this)};xt.naturalLogarithm=xt.ln=function(){return ux(this)};xt.negated=xt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xt.plus=xt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Eae(t,e):Oae(t,(e.s=-e.s,e))};xt.precision=xt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wp+e);if(t=go(o)+1,r=o.d.length-1,n=r*Pr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xt.squareRoot=xt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ws+"NaN")}for(e=go(s),Nr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=zu(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=i0((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(of(s,i,a+2)).times(.5),zu(i.d).slice(0,a)===(t=zu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(vr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Nr=!0,vr(r,n)};xt.times=xt.mul=function(e){var t,n,r,o,i,a,s,l,u,c=this,d=c.constructor,h=c.d,p=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,l=h.length,u=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*h[o-r-1]+t,i[o--]=s%Ho|0,t=s/Ho|0;i[o]=(i[o]+t)%Ho|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Nr?vr(e,d.precision):e};xt.toDecimalPlaces=xt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Zu(e,0,o0),t===void 0?t=r.rounding:Zu(t,0,8),vr(n,e+go(n)+1,t))};xt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=hm(r,!0):(Zu(e,0,o0),t===void 0?t=o.rounding:Zu(t,0,8),r=vr(new o(r),e+1,t),n=hm(r,!0,e+1)),n};xt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?hm(o):(Zu(e,0,o0),t===void 0?t=i.rounding:Zu(t,0,8),r=vr(new i(o),e+go(o)+1,t),n=hm(r.abs(),!1,e+go(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};xt.toInteger=xt.toint=function(){var e=this,t=e.constructor;return vr(new t(e),go(e)+1,t.rounding)};xt.toNumber=function(){return+this};xt.toPower=xt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(as);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ws+"Infinity");return s}if(s.eq(as))return s;if(r=l.precision,e.eq(as))return vr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=c<0?-c:c)<=_ae){for(o=new l(as),t=Math.ceil(r/Pr+4),Nr=!1;n%2&&(o=o.times(s),AW(o.d,t)),n=i0(n/2),n!==0;)s=s.times(s),AW(s.d,t);return Nr=!0,e.s<0?new l(as).div(o):vr(o,r)}}else if(i<0)throw Error(Ws+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Nr=!1,o=e.times(ux(s,r+u)),Nr=!0,o=Cae(o),o.s=i,o};xt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=go(o),r=hm(o,n<=i.toExpNeg||n>=i.toExpPos)):(Zu(e,1,o0),t===void 0?t=i.rounding:Zu(t,0,8),o=vr(new i(o),e,t),n=go(o),r=hm(o,e<=n||n<=i.toExpNeg,e)),r};xt.toSignificantDigits=xt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Zu(e,1,o0),t===void 0?t=r.rounding:Zu(t,0,8)),vr(new r(n),e,t)};xt.toString=xt.valueOf=xt.val=xt.toJSON=xt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=go(e),n=e.constructor;return hm(e,t<=n.toExpNeg||t>=n.toExpPos)};function Eae(e,t){var n,r,o,i,a,s,l,u,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Nr?vr(t,d):t;if(l=e.d,u=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=u.length):(r=u,o=a,s=l.length),a=Math.ceil(d/Pr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,r=u,u=l,l=r),n=0;i;)n=(l[--i]=l[i]+u[i]+n)/Ho|0,l[i]%=Ho;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Nr?vr(t,d):t}function Zu(e,t,n){if(e!==~~e||en)throw Error(Wp+e)}function zu(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,u,c,d,h,p,x,y,w,_,C,O,P,R,T,k,M,j=r.constructor,$=r.s==o.s?1:-1,L=r.d,V=o.d;if(!r.s)return new j(r);if(!o.s)throw Error(Ws+"Division by zero");for(l=r.e-o.e,k=V.length,R=L.length,p=new j($),x=p.d=[],u=0;V[u]==(L[u]||0);)++u;if(V[u]>(L[u]||0)&&--l,i==null?C=i=j.precision:a?C=i+(go(r)-go(o))+1:C=i,C<0)return new j(0);if(C=C/Pr+2|0,u=0,k==1)for(c=0,V=V[0],C++;(u1&&(V=e(V,c),L=e(L,c),k=V.length,R=L.length),P=k,y=L.slice(0,k),w=y.length;w=Ho/2&&++T;do c=0,s=t(V,y,k,w),s<0?(_=y[0],k!=w&&(_=_*Ho+(y[1]||0)),c=_/T|0,c>1?(c>=Ho&&(c=Ho-1),d=e(V,c),h=d.length,w=y.length,s=t(d,y,h,w),s==1&&(c--,n(d,k16)throw Error(z4+go(e));if(!e.s)return new c(as);for(Nr=!1,s=d,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(vp(2,u))/Math.LN10*2+5|0,s+=r,n=o=i=new c(as),c.precision=s;;){if(o=vr(o.times(e),s),n=n.times(++l),a=i.plus(of(o,n,s)),zu(a.d).slice(0,s)===zu(i.d).slice(0,s)){for(;u--;)i=vr(i.times(i),s);return c.precision=d,t==null?(Nr=!0,vr(i,d)):i}i=a}}function go(e){for(var t=e.e*Pr,n=e.d[0];n>=10;n/=10)t++;return t}function uj(e,t,n){if(t>e.LN10.sd())throw Nr=!0,n&&(e.precision=n),Error(Ws+"LN10 precision limit exceeded");return vr(new e(e.LN10),t)}function md(e){for(var t="";e--;)t+="0";return t}function ux(e,t){var n,r,o,i,a,s,l,u,c,d=1,h=10,p=e,x=p.d,y=p.constructor,w=y.precision;if(p.s<1)throw Error(Ws+(p.s?"NaN":"-Infinity"));if(p.eq(as))return new y(0);if(t==null?(Nr=!1,u=w):u=t,p.eq(10))return t==null&&(Nr=!0),uj(y,u);if(u+=h,y.precision=u,n=zu(x),r=n.charAt(0),i=go(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=zu(p.d),r=n.charAt(0),d++;i=go(p),r>1?(p=new y("0."+n),i++):p=new y(r+"."+n.slice(1))}else return l=uj(y,u+2,w).times(i+""),p=ux(new y(r+"."+n.slice(1)),u-h).plus(l),y.precision=w,t==null?(Nr=!0,vr(p,w)):p;for(s=a=p=of(p.minus(as),p.plus(as),u),c=vr(p.times(p),u),o=3;;){if(a=vr(a.times(c),u),l=s.plus(of(a,new y(o),u)),zu(l.d).slice(0,u)===zu(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(uj(y,u+2,w).times(i+""))),s=of(s,new y(d),u),y.precision=w,t==null?(Nr=!0,vr(s,w)):s;s=l,o+=2}}function TW(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=i0(n/Pr),e.d=[],r=(n+1)%Pr,n<0&&(r+=Pr),rKC||e.e<-KC))throw Error(z4+n)}else e.s=0,e.e=0,e.d=[0];return e}function vr(e,t,n){var r,o,i,a,s,l,u,c,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Pr,o=t,u=d[c=0];else{if(c=Math.ceil((r+1)/Pr),i=d.length,c>=i)return e;for(u=i=d[c],a=1;i>=10;i/=10)a++;r%=Pr,o=r-Pr+a}if(n!==void 0&&(i=vp(10,a-o-1),s=u/i%10|0,l=t<0||d[c+1]!==void 0||u%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?u/vp(10,a-o):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=go(e),d.length=1,t=t-i-1,d[0]=vp(10,(Pr-t%Pr)%Pr),e.e=i0(-t/Pr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,i=1,c--):(d.length=c+1,i=vp(10,Pr-r),d[c]=o>0?(u/vp(10,a-o)%vp(10,o)|0)*i:0),l)for(;;)if(c==0){(d[0]+=i)==Ho&&(d[0]=1,++e.e);break}else{if(d[c]+=i,d[c]!=Ho)break;d[c--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Nr&&(e.e>KC||e.e<-KC))throw Error(z4+go(e));return e}function Oae(e,t){var n,r,o,i,a,s,l,u,c,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Nr?vr(t,p):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(c=a<0,c?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),o=Math.max(Math.ceil(p/Pr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,c=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+md(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+md(-o-1)+i,n&&(r=n-a)>0&&(i+=md(r))):o>=a?(i+=md(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+md(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=md(r))),e.s<0?"-"+i:i}function AW(e,t){if(e.length>t)return e.length=t,!0}function Rae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Wp+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return TW(a,i.toString())}else if(typeof i!="string")throw Error(Wp+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,fqe.test(i))TW(a,i);else throw Error(Wp+i)}if(o.prototype=xt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Rae,o.config=o.set=dqe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(Wp+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Wp+n+": "+r);return this}var q4=Rae(cqe);as=new q4(1);const mr=q4;function hqe(e){return vqe(e)||gqe(e)||mqe(e)||pqe()}function pqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mqe(e,t){if(e){if(typeof e=="string")return O5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O5(e,t)}}function gqe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function vqe(e){if(Array.isArray(e))return O5(e)}function O5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,kW(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function Nqe(e){if(Array.isArray(e))return e}function Nae(e){var t=cx(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function Mae(e,t,n){if(e.lte(0))return new mr(0);var r=iP.getDigitCount(e.toNumber()),o=new mr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new mr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new mr(Math.ceil(l))}function Mqe(e,t,n){var r=1,o=new mr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new mr(10).pow(iP.getDigitCount(e)-1),o=new mr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new mr(Math.floor(e)))}else e===0?o=new mr(Math.floor((t-1)/2)):n||(o=new mr(Math.floor(e)));var a=Math.floor((t-1)/2),s=bqe(xqe(function(l){return o.add(new mr(l-a).mul(r)).toNumber()}),R5);return s(0,t)}function jae(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new mr(0),tickMin:new mr(0),tickMax:new mr(0)};var i=Mae(new mr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new mr(0):(a=new mr(e).add(t).div(2),a=a.sub(new mr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new mr(t).sub(a).div(i).toNumber()),u=s+l+1;return u>n?jae(e,t,n,r,o+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:i,tickMin:a.sub(new mr(s).mul(i)),tickMax:a.add(new mr(l).mul(i))})}function jqe(e){var t=cx(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=Nae([n,r]),l=cx(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var d=c===1/0?[u].concat(T5(R5(0,o-1).map(function(){return 1/0}))):[].concat(T5(R5(0,o-1).map(function(){return-1/0})),[c]);return n>r?P5(d):d}if(u===c)return Mqe(u,o,i);var h=jae(u,c,a,i),p=h.step,x=h.tickMin,y=h.tickMax,w=iP.rangeStep(x,y.add(new mr(.1).mul(p)),p);return n>r?P5(w):w}function Iqe(e,t){var n=cx(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Nae([r,o]),s=cx(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,o];if(l===u)return[l];var c=Math.max(t,2),d=Mae(new mr(u).sub(l).div(c-1),i,0),h=[].concat(T5(iP.rangeStep(new mr(l),new mr(u).sub(new mr(.99).mul(d)),d)),[u]);return r>o?P5(h):h}var Dqe=Aae(jqe),Lqe=Aae(Iqe),$qe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function yy(e){"@babel/helpers - typeof";return yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yy(e)}function YC(){return YC=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gqe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u0?o[u-1].coordinate:o[s-1].coordinate,d=o[u].coordinate,h=u>=s-1?o[0].coordinate:o[u+1].coordinate,p=void 0;if(Nl(d-c)!==Nl(h-d)){var x=[];if(Nl(h-d)===Nl(l[1]-l[0])){p=h;var y=d+l[1]-l[0];x[0]=Math.min(y,(y+c)/2),x[1]=Math.max(y,(y+c)/2)}else{p=c;var w=h+l[1]-l[0];x[0]=Math.min(d,(w+d)/2),x[1]=Math.max(d,(w+d)/2)}var _=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>_[0]&&t<=_[1]||t>=x[0]&&t<=x[1]){a=o[u].index;break}}else{var C=Math.min(c,h),O=Math.max(c,h);if(t>(C+d)/2&&t<=(O+d)/2){a=o[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},U4=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Hr(Hr({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},cUe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,u=s.length;l=0});if(_&&_.length){var C=_[0].type.defaultProps,O=C!==void 0?Hr(Hr({},C),_[0].props):_[0].props,P=O.barSize,R=O[w];a[R]||(a[R]=[]);var T=Rn(P)?n:P;a[R].push({item:_[0],stackList:_.slice(1),barSize:Rn(T)?void 0:dm(T,r,0)})}}return a},fUe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var u=dm(n,o,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=o/l,x=a.reduce(function(P,R){return P+R.barSize||0},0);x+=(l-1)*u,x>=o&&(x-=(l-1)*u,u=0),x>=o&&p>0&&(h=!0,p*=.9,x=l*p);var y=(o-x)/2>>0,w={offset:y-u,size:0};c=a.reduce(function(P,R){var T={item:R.item,position:{offset:w.offset+w.size+u,size:h?p:R.barSize}},k=[].concat(jW(P),[T]);return w=k[k.length-1].position,R.stackList&&R.stackList.length&&R.stackList.forEach(function(M){k.push({item:M,position:w})}),k},d)}else{var _=dm(r,o,0,!0);o-2*_-(l-1)*u<=0&&(u=0);var C=(o-2*_-(l-1)*u)/l;C>1&&(C>>=0);var O=s===+s?Math.min(C,s):C;c=a.reduce(function(P,R,T){var k=[].concat(jW(P),[{item:R.item,position:{offset:_+(C+u)*T+(C-O)/2,size:O}}]);return R.stackList&&R.stackList.length&&R.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},d)}return c},dUe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),u=$ae({children:i,legendWidth:l});if(u){var c=o||{},d=c.width,h=c.height,p=u.align,x=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&x==="middle")&&p!=="center"&&ot(t[p]))return Hr(Hr({},t),{},Rv({},p,t[p]+(d||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&x!=="middle"&&ot(t[x]))return Hr(Hr({},t),{},Rv({},x,t[x]+(h||0)))}return t},hUe=function(t,n,r){return Rn(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Fae=function(t,n,r,o,i){var a=n.props.children,s=Bs(a,Nb).filter(function(u){return hUe(o,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var d=ea(c,r);if(Rn(d))return u;var h=Array.isArray(d)?[rP(d),Md(d)]:[d,d],p=l.reduce(function(x,y){var w=ea(c,y,0),_=h[0]-Math.abs(Array.isArray(w)?w[0]:w),C=h[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(_,x[0]),Math.max(C,x[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},pUe=function(t,n,r,o,i){var a=n.map(function(s){return Fae(t,s,r,i,o)}).filter(function(s){return!Rn(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Bae=function(t,n,r,o,i){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&Fae(t,l,u,o)||Ow(t,u,r,i)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,u){for(var c=0,d=u.length;c=2?Nl(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:o(h)+u,value:d,offset:u}});return c.filter(function(d){return!t0(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:o(d)+u,value:d,index:h,offset:u}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+u,value:d,offset:u}}):o.domain().map(function(d,h){return{coordinate:o(d)+u,value:i?i[d]:d,index:h,offset:u}})},cj=new WeakMap,F_=function(t,n){if(typeof n!="function")return t;cj.has(t)||cj.set(t,new WeakMap);var r=cj.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},mUe=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:sx(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:VC(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Cw(),realScaleType:"point"}:i==="category"?{scale:sx(),realScaleType:"band"}:{scale:VC(),realScaleType:"linear"};if(fm(o)){var l="scale".concat(UR(o));return{scale:(xW[l]||Cw)(),realScaleType:xW[l]?l:"point"}}return pn(o)?{scale:o}:{scale:Cw(),realScaleType:"point"}},DW=1e-4,gUe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-DW,a=Math.max(o[0],o[1])+DW,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},vUe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},xUe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},bUe={sign:wUe,expand:N6e,none:uy,silhouette:M6e,wiggle:j6e,positive:xUe},SUe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=bUe[r],a=k6e().keys(o).value(function(s,l){return+ea(s,l,0)}).order(l5).offset(i);return a(t)},_Ue=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},u=s.reduce(function(d,h){var p,x=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Hr(Hr({},h.type.defaultProps),h.props):h.props,y=x.stackId,w=x.hide;if(w)return d;var _=x[r],C=d[_]||{hasStack:!1,stackGroups:{}};if(Po(y)){var O=C.stackGroups[y]||{numericAxisId:r,cateAxisId:o,items:[]};O.items.push(h),C.hasStack=!0,C.stackGroups[y]=O}else C.stackGroups[n0("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[h]};return Hr(Hr({},d),{},Rv({},_,C))},l),c={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var x={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,w){var _=p.stackGroups[w];return Hr(Hr({},y),{},Rv({},w,{numericAxisId:r,cateAxisId:o,items:_.items,stackedData:SUe(t,_.items,i)}))},x)}return Hr(Hr({},d),{},Rv({},h,p))},c)},EUe=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=Dqe(u,i,s);return t.domain([rP(c),Md(c)]),{niceTicks:c}}if(i&&o==="number"){var d=t.domain(),h=Lqe(d,i,s);return{niceTicks:h}}return null};function QC(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Rn(o[t.dataKey])){var s=PC(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=ea(o,Rn(a)?t.dataKey:a);return Rn(l)?null:t.scale(l)}var LW=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=ea(a,n.dataKey,n.domain[s]);return Rn(l)?null:n.scale(l)-i/2+o},CUe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},OUe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Hr(Hr({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Po(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},RUe=function(t){return t.reduce(function(n,r){return[rP(r.concat([n[0]]).filter(ot)),Md(r.concat([n[1]]).filter(ot))]},[1/0,-1/0])},Uae=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(u,c){var d=RUe(c.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},$W=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,FW=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,M5=function(t,n,r){if(pn(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(ot(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if($W.test(t[0])){var i=+$W.exec(t[0])[1];o[0]=n[0]-i}else pn(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(ot(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(FW.test(t[1])){var a=+FW.exec(t[1])[1];o[1]=n[1]+a}else pn(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},ZC=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=x4(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;sa&&(u=2*Math.PI-u),{radius:s,angle:kUe(u),angleInRadian:u}},jUe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},IUe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},UW=function(t,n){var r=t.x,o=t.y,i=MUe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,u=n.outerRadius;if(au)return!1;if(a===0)return!0;var c=jUe(n),d=c.startAngle,h=c.endAngle,p=s,x;if(d<=h){for(;p>h;)p-=360;for(;p=d&&p<=h}else{for(;p>d;)p-=360;for(;p=h&&p<=d}return x?qW(qW({},n),{},{radius:a,angle:IUe(p,n)}):null};function px(e){"@babel/helpers - typeof";return px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},px(e)}var DUe=["offset"];function LUe(e){return zUe(e)||BUe(e)||FUe(e)||$Ue()}function $Ue(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FUe(e,t){if(e){if(typeof e=="string")return j5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j5(e,t)}}function BUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zUe(e){if(Array.isArray(e))return j5(e)}function j5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function VW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t=0?1:-1,O,P;o==="insideStart"?(O=p+C*a,P=y):o==="insideEnd"?(O=x-C*a,P=!y):o==="end"&&(O=x+C*a,P=y),P=_<=0?P:!P;var R=oi(u,c,w,O),T=oi(u,c,w,O+(P?1:-1)*359),k="M".concat(R.x,",").concat(R.y,` + A`).concat(w,",").concat(w,",0,1,").concat(P?0:1,`, + `).concat(T.x,",").concat(T.y),M=Rn(t.id)?n0("recharts-radial-line-"):t.id;return J.createElement("text",mx({},r,{dominantBaseline:"central",className:jn("recharts-radial-bar-label",s)}),J.createElement("defs",null,J.createElement("path",{id:M,d:k})),J.createElement("textPath",{xlinkHref:"#".concat(M)},n))},XUe=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,d=i.endAngle,h=(c+d)/2;if(o==="outside"){var p=oi(a,s,u+r,h),x=p.x,y=p.y;return{x,y,textAnchor:x>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var w=(l+u)/2,_=oi(a,s,w,h),C=_.x,O=_.y;return{x:C,y:O,textAnchor:"middle",verticalAnchor:"middle"}},QUe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,u=a.width,c=a.height,d=c>=0?1:-1,h=d*o,p=d>0?"end":"start",x=d>0?"start":"end",y=u>=0?1:-1,w=y*o,_=y>0?"end":"start",C=y>0?"start":"end";if(i==="top"){var O={x:s+u/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return Co(Co({},O),r?{height:Math.max(l-r.y,0),width:u}:{})}if(i==="bottom"){var P={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:x};return Co(Co({},P),r?{height:Math.max(r.y+r.height-(l+c),0),width:u}:{})}if(i==="left"){var R={x:s-w,y:l+c/2,textAnchor:_,verticalAnchor:"middle"};return Co(Co({},R),r?{width:Math.max(R.x-r.x,0),height:c}:{})}if(i==="right"){var T={x:s+u+w,y:l+c/2,textAnchor:C,verticalAnchor:"middle"};return Co(Co({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:c}:{})}var k=r?{width:u,height:c}:{};return i==="insideLeft"?Co({x:s+w,y:l+c/2,textAnchor:C,verticalAnchor:"middle"},k):i==="insideRight"?Co({x:s+u-w,y:l+c/2,textAnchor:_,verticalAnchor:"middle"},k):i==="insideTop"?Co({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:x},k):i==="insideBottom"?Co({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:p},k):i==="insideTopLeft"?Co({x:s+w,y:l+h,textAnchor:C,verticalAnchor:x},k):i==="insideTopRight"?Co({x:s+u-w,y:l+h,textAnchor:_,verticalAnchor:x},k):i==="insideBottomLeft"?Co({x:s+w,y:l+c-h,textAnchor:C,verticalAnchor:p},k):i==="insideBottomRight"?Co({x:s+u-w,y:l+c-h,textAnchor:_,verticalAnchor:p},k):e0(i)&&(ot(i.x)||Cp(i.x))&&(ot(i.y)||Cp(i.y))?Co({x:s+dm(i.x,u),y:l+dm(i.y,c),textAnchor:"end",verticalAnchor:"end"},k):Co({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},ZUe=function(t){return"cx"in t&&ot(t.cx)};function Ci(e){var t=e.offset,n=t===void 0?5:t,r=qUe(e,DUe),o=Co({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,u=o.content,c=o.className,d=c===void 0?"":c,h=o.textBreakAll;if(!i||Rn(s)&&Rn(l)&&!b.isValidElement(u)&&!pn(u))return null;if(b.isValidElement(u))return b.cloneElement(u,o);var p;if(pn(u)){if(p=b.createElement(u,o),b.isValidElement(p))return p}else p=GUe(o);var x=ZUe(i),y=xn(o,!0);if(x&&(a==="insideStart"||a==="insideEnd"||a==="end"))return YUe(o,p,y);var w=x?XUe(o):QUe(o);return J.createElement(zC,mx({className:jn("recharts-label",d)},y,w,{breakAll:h}),p)}Ci.displayName="Label";var Wae=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,p=t.top,x=t.left,y=t.width,w=t.height,_=t.clockWise,C=t.labelViewBox;if(C)return C;if(ot(y)&&ot(w)){if(ot(d)&&ot(h))return{x:d,y:h,width:y,height:w};if(ot(p)&&ot(x))return{x:p,y:x,width:y,height:w}}return ot(d)&&ot(h)?{x:d,y:h,width:0,height:0}:ot(n)&&ot(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:_}:t.viewBox?t.viewBox:{}},JUe=function(t,n){return t?t===!0?J.createElement(Ci,{key:"label-implicit",viewBox:n}):Po(t)?J.createElement(Ci,{key:"label-implicit",viewBox:n,value:t}):b.isValidElement(t)?t.type===Ci?b.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(Ci,{key:"label-implicit",content:t,viewBox:n}):pn(t)?J.createElement(Ci,{key:"label-implicit",content:t,viewBox:n}):e0(t)?J.createElement(Ci,mx({viewBox:n},t,{key:"label-implicit"})):null:null},eVe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=Wae(t),a=Bs(o,Ci).map(function(l,u){return b.cloneElement(l,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return a;var s=JUe(t.label,n||i);return[s].concat(LUe(a))};Ci.parseViewBox=Wae;Ci.renderCallByParent=eVe;var fj,WW;function tVe(){if(WW)return fj;WW=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return fj=e,fj}var nVe=tVe();const rVe=Ln(nVe);function gx(e){"@babel/helpers - typeof";return gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gx(e)}var oVe=["valueAccessor"],iVe=["data","dataKey","clockWise","id","textBreakAll"];function aVe(e){return cVe(e)||uVe(e)||lVe(e)||sVe()}function sVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lVe(e,t){if(e){if(typeof e=="string")return I5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I5(e,t)}}function uVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cVe(e){if(Array.isArray(e))return I5(e)}function I5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var mVe=function(t){return Array.isArray(t.value)?rVe(t.value):t.value};function af(e){var t=e.valueAccessor,n=t===void 0?mVe:t,r=KW(e,oVe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=KW(r,iVe);return!o||!o.length?null:J.createElement(Er,{className:"recharts-label-list"},o.map(function(c,d){var h=Rn(i)?n(c,d):ea(c&&c.payload,i),p=Rn(s)?{}:{id:"".concat(s,"-").concat(d)};return J.createElement(Ci,eO({},xn(c,!0),u,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:Ci.parseViewBox(Rn(a)?c:GW(GW({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}af.displayName="LabelList";function gVe(e,t){return e?e===!0?J.createElement(af,{key:"labelList-implicit",data:t}):J.isValidElement(e)||pn(e)?J.createElement(af,{key:"labelList-implicit",data:t,content:e}):e0(e)?J.createElement(af,eO({data:t},e,{key:"labelList-implicit"})):null:null}function vVe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=Bs(r,af).map(function(a,s){return b.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=gVe(e.label,t);return[i].concat(aVe(o))}af.renderCallByParent=vVe;function vx(e){"@babel/helpers - typeof";return vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vx(e)}function D5(){return D5=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, + `).concat(d.x,",").concat(d.y,` + `);if(o>0){var p=oi(n,r,o,a),x=oi(n,r,o,u);h+="L ".concat(x.x,",").concat(x.y,` + A `).concat(o,",").concat(o,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},SVe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,d=Nl(c-u),h=B_({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:a,cornerIsExternal:l}),p=h.circleTangency,x=h.lineTangency,y=h.theta,w=B_({cx:n,cy:r,radius:i,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:l}),_=w.circleTangency,C=w.lineTangency,O=w.theta,P=l?Math.abs(u-c):Math.abs(u-c)-y-O;if(P<0)return s?"M ".concat(x.x,",").concat(x.y,` + a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 + a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 + `):Hae({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:c});var R="M ".concat(x.x,",").concat(x.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` + A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` + `);if(o>0){var T=B_({cx:n,cy:r,radius:o,angle:u,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),k=T.circleTangency,M=T.lineTangency,j=T.theta,$=B_({cx:n,cy:r,radius:o,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),L=$.circleTangency,V=$.lineTangency,G=$.theta,D=l?Math.abs(u-c):Math.abs(u-c)-j-G;if(D<0&&a===0)return"".concat(R,"L").concat(n,",").concat(r,"Z");R+="L".concat(V.x,",").concat(V.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` + A`).concat(o,",").concat(o,",0,").concat(+(D>180),",").concat(+(d>0),",").concat(k.x,",").concat(k.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"Z")}else R+="L".concat(n,",").concat(r,"Z");return R},_Ve={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Gae=function(t){var n=XW(XW({},_Ve),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?w=SVe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(y,x/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}):w=Hae({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d}),J.createElement("path",D5({},xn(n,!0),{className:p,d:w,role:"img"}))};function yx(e){"@babel/helpers - typeof";return yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yx(e)}function L5(){return L5=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function zVe(e,t){return Cm(e.getTime(),t.getTime())}function qVe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function UVe(e,t){return e===t}function sH(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),a,s,l=0;(a=i.next())&&!a.done;){for(var u=t.entries(),c=!1,d=0;(s=u.next())&&!s.done;){if(o[d]){d++;continue}var h=a.value,p=s.value;if(n.equals(h[0],p[0],l,d,e,t,n)&&n.equals(h[1],p[1],h[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var VVe=Cm;function WVe(e,t,n){var r=aH(e),o=r.length;if(aH(t).length!==o)return!1;for(;o-- >0;)if(!Kae(e,t,n,r[o]))return!1;return!0}function W1(e,t,n){var r=oH(e),o=r.length;if(oH(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],!Kae(e,t,n,i)||(a=iH(e,i),s=iH(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function HVe(e,t){return Cm(e.valueOf(),t.valueOf())}function GVe(e,t){return e.source===t.source&&e.flags===t.flags}function lH(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),a,s;(a=i.next())&&!a.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!o[c]&&n.equals(a.value,s.value,a.value,s.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function KVe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function YVe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Kae(e,t,n,r){return(r===FVe||r===$Ve||r===LVe)&&(e.$$typeof||t.$$typeof)?!0:DVe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var XVe="[object Arguments]",QVe="[object Boolean]",ZVe="[object Date]",JVe="[object Error]",eWe="[object Map]",tWe="[object Number]",nWe="[object Object]",rWe="[object RegExp]",oWe="[object Set]",iWe="[object String]",aWe="[object URL]",sWe=Array.isArray,uH=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,cH=Object.assign,lWe=Object.prototype.toString.call.bind(Object.prototype.toString);function uWe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(x,y,w){if(x===y)return!0;if(x==null||y==null)return!1;var _=typeof x;if(_!==typeof y)return!1;if(_!=="object")return _==="number"?a(x,y,w):_==="function"?o(x,y,w):!1;var C=x.constructor;if(C!==y.constructor)return!1;if(C===Object)return s(x,y,w);if(sWe(x))return t(x,y,w);if(uH!=null&&uH(x))return d(x,y,w);if(C===Date)return n(x,y,w);if(C===RegExp)return u(x,y,w);if(C===Map)return i(x,y,w);if(C===Set)return c(x,y,w);var O=lWe(x);return O===ZVe?n(x,y,w):O===rWe?u(x,y,w):O===eWe?i(x,y,w):O===oWe?c(x,y,w):O===nWe?typeof x.then!="function"&&typeof y.then!="function"&&s(x,y,w):O===aWe?h(x,y,w):O===JVe?r(x,y,w):O===XVe?s(x,y,w):O===QVe||O===tWe||O===iWe?l(x,y,w):!1}}function cWe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?W1:BVe,areDatesEqual:zVe,areErrorsEqual:qVe,areFunctionsEqual:UVe,areMapsEqual:r?rH(sH,W1):sH,areNumbersEqual:VVe,areObjectsEqual:r?W1:WVe,arePrimitiveWrappersEqual:HVe,areRegExpsEqual:GVe,areSetsEqual:r?rH(lH,W1):lH,areTypedArraysEqual:r?W1:KVe,areUrlsEqual:YVe};if(n&&(o=cH({},o,n(o))),t){var i=q_(o.areArraysEqual),a=q_(o.areMapsEqual),s=q_(o.areObjectsEqual),l=q_(o.areSetsEqual);o=cH({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function fWe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function dWe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,u){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(l,u,{cache:h,equals:o,meta:p,strict:i})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,u){return n(l,u,a)}}var hWe=lh();lh({strict:!0});lh({circular:!0});lh({circular:!0,strict:!0});lh({createInternalComparator:function(){return Cm}});lh({strict:!0,createInternalComparator:function(){return Cm}});lh({circular:!0,createInternalComparator:function(){return Cm}});lh({circular:!0,createInternalComparator:function(){return Cm},strict:!0});function lh(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=cWe(e),l=uWe(s),u=r?r(l):fWe(l);return dWe({circular:n,comparator:l,createState:o,equals:u,strict:a})}function pWe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function fH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):pWe(o)};requestAnimationFrame(r)}function $5(e){"@babel/helpers - typeof";return $5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$5(e)}function mWe(e){return wWe(e)||yWe(e)||vWe(e)||gWe()}function gWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vWe(e,t){if(e){if(typeof e=="string")return dH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dH(e,t)}}function dH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:_<0?0:_},y=function(_){for(var C=_>1?1:_,O=C,P=0;P<8;++P){var R=d(O)-C,T=p(O);if(Math.abs(R-C)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(c,d,h){var p=-(c-d)*r,x=h*i,y=h+(p-x)*s/1e3,w=h*s/1e3+c;return Math.abs(w-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XWe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function mj(e){return eHe(e)||JWe(e)||ZWe(e)||QWe()}function QWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZWe(e,t){if(e){if(typeof e=="string")return U5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U5(e,t)}}function JWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eHe(e){if(Array.isArray(e))return U5(e)}function U5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rO(e){return rO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rO(e)}var Ju=(function(e){iHe(n,e);var t=aHe(n);function n(r,o){var i;tHe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,u=a.from,c=a.to,d=a.steps,h=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(H5(i)),i.changeStyle=i.changeStyle.bind(H5(i)),!s||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:c}),W5(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},W5(i);i.state={style:l?aw({},l,u):u}}else i.state={style:{}};return i}return rHe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,d=i.from,h=this.state.style;if(s){if(!a){var p={style:l?aw({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(p);return}if(!(hWe(o.to,c)&&o.canBegin&&o.isActive)){var x=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=x||u?d:o.to;if(this.state&&h){var w={style:l?aw({},l,y):y};(l&&h[l]!==y||!l&&h!==y)&&this.setState(w)}this.runAnimation(wl(wl({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,u=o.easing,c=o.begin,d=o.onAnimationEnd,h=o.onAnimationStart,p=GWe(a,s,DWe(u),l,this.changeStyle),x=function(){i.stopJSAnimation=p()};this.manager.start([h,c,x,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,u=a[0],c=u.style,d=u.duration,h=d===void 0?0:d,p=function(y,w,_){if(_===0)return y;var C=w.duration,O=w.easing,P=O===void 0?"ease":O,R=w.style,T=w.properties,k=w.onAnimationEnd,M=_>0?a[_-1]:w,j=T||Object.keys(R);if(typeof P=="function"||P==="spring")return[].concat(mj(y),[i.runJSAnimation.bind(i,{from:M.style,to:R,duration:C,easing:P}),C]);var $=mH(j,C,P),L=wl(wl(wl({},M.style),R),{},{transition:$});return[].concat(mj(y),[L,C,k]).filter(EWe)};return this.manager.start([l].concat(mj(a.reduce(p,[c,Math.max(h,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=xWe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,u=o.easing,c=o.onAnimationStart,d=o.onAnimationEnd,h=o.steps,p=o.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(o);return}if(h.length>1){this.runStepAnimation(o);return}var y=s?aw({},s,l):l,w=mH(Object.keys(y),a,u);x.start([c,i,wl(wl({},y),{},{transition:w}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=YWe(o,KWe),u=b.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||a<=0)return i;var d=function(p){var x=p.props,y=x.style,w=y===void 0?{}:y,_=x.className,C=b.cloneElement(p,wl(wl({},l),{},{style:wl(wl({},w),c),className:_}));return C};return u===1?d(b.Children.only(i)):J.createElement("div",null,b.Children.map(i,function(h){return d(h)}))}}]),n})(b.PureComponent);Ju.displayName="Animate";Ju.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ju.propTypes={from:lr.oneOfType([lr.object,lr.string]),to:lr.oneOfType([lr.object,lr.string]),attributeName:lr.string,duration:lr.number,begin:lr.number,easing:lr.oneOfType([lr.string,lr.func]),steps:lr.arrayOf(lr.shape({duration:lr.number.isRequired,style:lr.object.isRequired,easing:lr.oneOfType([lr.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),lr.func]),properties:lr.arrayOf("string"),onAnimationEnd:lr.func})),children:lr.oneOfType([lr.node,lr.func]),isActive:lr.bool,canBegin:lr.bool,onAnimationEnd:lr.func,shouldReAnimate:lr.bool,onAnimationStart:lr.func,onAnimationReStart:lr.func};function bx(e){"@babel/helpers - typeof";return bx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bx(e)}function oO(){return oO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=o>=0&&r>=0||o<0&&r<0?1:0,c;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,p=4;ha?a:i[h];c="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),c+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, + `).concat(t+r,",").concat(n+s*d[1])),c+="L ".concat(t+r,",").concat(n+o-s*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, + `).concat(t+r-l*d[2],",").concat(n+o)),c+="L ".concat(t+l*d[3],",").concat(n+o),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, + `).concat(t,",").concat(n+o-s*d[3])),c+="Z"}else if(a>0&&i===+i&&i>0){var x=Math.min(a,i);c="M ".concat(t,",").concat(n+s*x,` + A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+l*x,",").concat(n,` + L `).concat(t+r-l*x,",").concat(n,` + A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*x,` + L `).concat(t+r,",").concat(n+o-s*x,` + A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r-l*x,",").concat(n+o,` + L `).concat(t+l*x,",").concat(n+o,` + A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t,",").concat(n+o-s*x," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return c},gHe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),d=Math.min(a,a+l),h=Math.max(a,a+l);return r>=u&&r<=c&&o>=d&&o<=h}return!1},vHe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},V4=function(t){var n=_H(_H({},vHe),t),r=b.useRef(),o=b.useState(-1),i=lHe(o,2),a=i[0],s=i[1];b.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,u=n.y,c=n.width,d=n.height,h=n.radius,p=n.className,x=n.animationEasing,y=n.animationDuration,w=n.animationBegin,_=n.isAnimationActive,C=n.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||c===0||d===0)return null;var O=jn("recharts-rectangle",p);return C?J.createElement(Ju,{canBegin:a>0,from:{width:c,height:d,x:l,y:u},to:{width:c,height:d,x:l,y:u},duration:y,animationEasing:x,isActive:C},function(P){var R=P.width,T=P.height,k=P.x,M=P.y;return J.createElement(Ju,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,isActive:_,easing:x},J.createElement("path",oO({},xn(n,!0),{className:O,d:EH(k,M,R,T,h),ref:r})))}):J.createElement("path",oO({},xn(n,!0),{className:O,d:EH(l,u,c,d,h)}))};function G5(){return G5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var CHe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},OHe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,u=l===void 0?0:l,c=t.width,d=c===void 0?0:c,h=t.height,p=h===void 0?0:h,x=t.className,y=_He(t,yHe),w=wHe({x:r,y:i,top:s,left:u,width:d,height:p},y);return!ot(r)||!ot(i)||!ot(d)||!ot(p)||!ot(s)||!ot(u)?null:J.createElement("path",K5({},xn(w,!0),{className:jn("recharts-cross",x),d:CHe(r,i,d,p,s,u)}))},gj,OH;function RHe(){if(OH)return gj;OH=1;var e=Sie(),t=e(Object.getPrototypeOf,Object);return gj=t,gj}var vj,RH;function PHe(){if(RH)return vj;RH=1;var e=wf(),t=RHe(),n=xf(),r="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,l=a.call(Object);function u(c){if(!n(c)||e(c)!=r)return!1;var d=t(c);if(d===null)return!0;var h=s.call(d,"constructor")&&d.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==l}return vj=u,vj}var THe=PHe();const AHe=Ln(THe);var yj,PH;function kHe(){if(PH)return yj;PH=1;var e=wf(),t=xf(),n="[object Boolean]";function r(o){return o===!0||o===!1||t(o)&&e(o)==n}return yj=r,yj}var NHe=kHe();const MHe=Ln(NHe);function _x(e){"@babel/helpers - typeof";return _x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_x(e)}function iO(){return iO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:d,height:h,x:l,y:u},duration:y,animationEasing:x,isActive:_},function(O){var P=O.upperWidth,R=O.lowerWidth,T=O.height,k=O.x,M=O.y;return J.createElement(Ju,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,easing:x},J.createElement("path",iO({},xn(n,!0),{className:C,d:NH(k,M,P,R,T),ref:r})))}):J.createElement("g",null,J.createElement("path",iO({},xn(n,!0),{className:C,d:NH(l,u,c,d,h)})))},VHe=["option","shapeType","propTransformer","activeClassName","isActive"];function Ex(e){"@babel/helpers - typeof";return Ex=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ex(e)}function WHe(e,t){if(e==null)return{};var n=HHe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function aO(e){for(var t=1;t0&&r.handleDrag(o.changedTouches[0])}),Qa(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Qa(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Qa(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Qa(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Qa(r,"handleSlideDragStart",function(o){var i=UH(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return xGe(t,e),gGe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,d=Math.min(o,i),h=Math.max(o,i),p=t.getIndexInRange(a,d),x=t.getIndexInRange(a,h);return{startIndex:p-p%l,endIndex:x===c?c:x-x%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=ea(i[r],s,r);return pn(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,u=l.x,c=l.width,d=l.travellerWidth,h=l.startIndex,p=l.endIndex,x=l.onChange,y=r.pageX-i;y>0?y=Math.min(y,u+c-d-s,u+c-d-a):y<0&&(y=Math.max(y,u-a,u-s));var w=this.getIndex({startX:a+y,endX:s+y});(w.startIndex!==h||w.endIndex!==p)&&x&&x(w),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=UH(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,u=this.state[a],c=this.props,d=c.x,h=c.width,p=c.travellerWidth,x=c.onChange,y=c.gap,w=c.data,_={startX:this.state.startX,endX:this.state.endX},C=r.pageX-i;C>0?C=Math.min(C,d+h-p-u):C<0&&(C=Math.max(C,d-u)),_[a]=u+C;var O=this.getIndex(_),P=O.startIndex,R=O.endIndex,T=function(){var M=w.length-1;return a==="startX"&&(s>l?P%y===0:R%y===0)||sl?R%y===0:P%y===0)||s>l&&R===M};this.setState(Qa(Qa({},a,u+C),"brushMoveStartX",r.pageX),function(){x&&T()&&x(O)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,u=a.endX,c=this.state[o],d=s.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=s.length)){var p=s[h];o==="startX"&&p>=u||o==="endX"&&p<=l||this.setState(Qa({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,u=r.stroke;return J.createElement("rect",{stroke:u,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,u=r.children,c=r.padding,d=b.Children.only(u);return d?J.cloneElement(d,{x:o,y:i,width:a,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,u=l.y,c=l.travellerWidth,d=l.height,h=l.traveller,p=l.ariaLabel,x=l.data,y=l.startIndex,w=l.endIndex,_=Math.max(r,this.props.x),C=_j(_j({},xn(this.props,!1)),{},{x:_,y:u,width:c,height:d}),O=p||"Min value: ".concat((i=x[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=x[w])===null||a===void 0?void 0:a.name);return J.createElement(Er,{tabIndex:0,role:"slider","aria-label":O,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(R){["ArrowLeft","ArrowRight"].includes(R.key)&&(R.preventDefault(),R.stopPropagation(),s.handleTravellerMoveKeyboard(R.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,C))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(r,o)+u,d=Math.max(Math.abs(o-r)-u,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,c=this.state,d=c.startX,h=c.endX,p=5,x={pointerEvents:"none",fill:u};return J.createElement(Er,{className:"recharts-brush-texts"},J.createElement(zC,lO({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:a+s/2},x),this.getTextOfTick(o)),J.createElement(zC,lO({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+p,y:a+s/2},x),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,u=r.width,c=r.height,d=r.alwaysShowText,h=this.state,p=h.startX,x=h.endX,y=h.isTextActive,w=h.isSlideMoving,_=h.isTravellerMoving,C=h.isTravellerFocused;if(!o||!o.length||!ot(s)||!ot(l)||!ot(u)||!ot(c)||u<=0||c<=0)return null;var O=jn("recharts-brush",i),P=J.Children.count(a)===1,R=pGe("userSelect","none");return J.createElement(Er,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:R},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,x),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(x,"endX"),(y||w||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,u=Math.floor(i+s/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),J.createElement("line",{x1:o+1,y1:u,x2:o+a-1,y2:u,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:o+1,y1:u+2,x2:o+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return J.isValidElement(r)?i=J.cloneElement(r,o):pn(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,c=r.startIndex,d=r.endIndex;if(i!==o.prevData||u!==o.prevUpdateId)return _j({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a},i&&i.length?SGe({data:i,width:a,x:s,travellerWidth:l,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var h=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])})(b.PureComponent);Qa(by,"displayName","Brush");Qa(by,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Ej,VH;function _Ge(){if(VH)return Ej;VH=1;var e=w4();function t(n,r){var o;return e(n,function(i,a,s){return o=r(i,a,s),!o}),!!o}return Ej=t,Ej}var Cj,WH;function EGe(){if(WH)return Cj;WH=1;var e=mie(),t=ih(),n=_Ge(),r=Da(),o=YR();function i(a,s,l){var u=r(a)?e:n;return l&&o(a,s,l)&&(s=void 0),u(a,t(s,3))}return Cj=i,Cj}var CGe=EGe();const OGe=Ln(CGe);var Gu=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},Oj,HH;function RGe(){if(HH)return Oj;HH=1;var e=Mie();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Oj=t,Oj}var Rj,GH;function PGe(){if(GH)return Rj;GH=1;var e=RGe(),t=kie(),n=ih();function r(o,i){var a={};return i=n(i,3),t(o,function(s,l,u){e(a,l,i(s,l,u))}),a}return Rj=r,Rj}var TGe=PGe();const AGe=Ln(TGe);var Pj,KH;function kGe(){if(KH)return Pj;KH=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zGe(e,t){var n=e.x,r=e.y,o=FGe(e,IGe),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||o.height),c=parseInt(u,10),d="".concat(t.width||o.width),h=parseInt(d,10);return H1(H1(H1(H1(H1({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function ZH(e){return J.createElement(JHe,X5({shapeType:"rectangle",propTransformer:zGe,activeClassName:"recharts-active-bar"},e))}var qGe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=ot(r)||R8e(r);return i?t(r,o):(i||Cr(!1),n)}},UGe=["value","background"],ase;function Sy(e){"@babel/helpers - typeof";return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(e)}function VGe(e,t){if(e==null)return{};var n=WGe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cO(){return cO=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(H)0&&Math.abs(D)0&&(G=Math.min((ae||0)-(D[fe-1]||0),G))}),Number.isFinite(G)){var H=G/V,U=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(k=H*U/2),y.padding==="no-gap"){var Y=dm(t.barCategoryGap,H*U),q=H*U/2;k=q-Y-(q-Y)/U*Y}}}o==="xAxis"?M=[r.left+(O.left||0)+(k||0),r.left+r.width-(O.right||0)-(k||0)]:o==="yAxis"?M=l==="horizontal"?[r.top+r.height-(O.bottom||0),r.top+(O.top||0)]:[r.top+(O.top||0)+(k||0),r.top+r.height-(O.bottom||0)-(k||0)]:M=y.range,R&&(M=[M[1],M[0]]);var W=mUe(y,i,h),K=W.scale,z=W.realScaleType;K.domain(_).range(M),gUe(K);var X=EUe(K,_l(_l({},y),{},{realScaleType:z}));o==="xAxis"?(L=w==="top"&&!P||w==="bottom"&&P,j=r.left,$=d[T]-L*y.height):o==="yAxis"&&(L=w==="left"&&!P||w==="right"&&P,j=d[T]-L*y.width,$=r.top);var ee=_l(_l(_l({},y),X),{},{realScaleType:z,x:j,y:$,scale:K,width:o==="xAxis"?r.width:y.width,height:o==="yAxis"?r.height:y.height});return ee.bandSize=ZC(ee,X),!y.hide&&o==="xAxis"?d[T]+=(L?-1:1)*ee.height:y.hide||(d[T]+=(L?-1:1)*ee.width),_l(_l({},p),{},uP({},x,ee))},{})},cse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},nKe=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return cse({x:n,y:r},{x:o,y:i})},fse=(function(){function e(t){JGe(this,e),this.scale=t}return eKe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])})();uP(fse,"EPS",1e-4);var H4=function(t){var n=Object.keys(t).reduce(function(r,o){return _l(_l({},r),{},uP({},o,fse.create(t[o])))},{});return _l(_l({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return AGe(o,function(l,u){return n[u].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return ise(o,function(i,a){return n[a].isInRange(i)})}})};function rKe(e){return(e%180+180)%180}var oKe=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=rKe(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?l[u?i[c]:c]:void 0}}return kj=r,kj}var Nj,oG;function aKe(){if(oG)return Nj;oG=1;var e=tse();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return Nj=t,Nj}var Mj,iG;function sKe(){if(iG)return Mj;iG=1;var e=Oie(),t=ih(),n=aKe(),r=Math.max;function o(i,a,s){var l=i==null?0:i.length;if(!l)return-1;var u=s==null?0:n(s);return u<0&&(u=r(l+u,0)),e(i,t(a,3),u)}return Mj=o,Mj}var jj,aG;function lKe(){if(aG)return jj;aG=1;var e=iKe(),t=sKe(),n=e(t);return jj=n,jj}var uKe=lKe();const cKe=Ln(uKe);var fKe=zoe();const dKe=Ln(fKe);var hKe=dKe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),G4=b.createContext(void 0),K4=b.createContext(void 0),dse=b.createContext(void 0),hse=b.createContext({}),pse=b.createContext(void 0),mse=b.createContext(0),gse=b.createContext(0),sG=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,u=t.height,c=hKe(i);return J.createElement(G4.Provider,{value:r},J.createElement(K4.Provider,{value:o},J.createElement(hse.Provider,{value:i},J.createElement(dse.Provider,{value:c},J.createElement(pse.Provider,{value:a},J.createElement(mse.Provider,{value:u},J.createElement(gse.Provider,{value:l},s)))))))},pKe=function(){return b.useContext(pse)},vse=function(t){var n=b.useContext(G4);n==null&&Cr(!1);var r=n[t];return r==null&&Cr(!1),r},mKe=function(){var t=b.useContext(G4);return yd(t)},gKe=function(){var t=b.useContext(K4),n=cKe(t,function(r){return ise(r.domain,Number.isFinite)});return n||yd(t)},yse=function(t){var n=b.useContext(K4);n==null&&Cr(!1);var r=n[t];return r==null&&Cr(!1),r},vKe=function(){var t=b.useContext(dse);return t},yKe=function(){return b.useContext(hse)},Y4=function(){return b.useContext(gse)},X4=function(){return b.useContext(mse)};function _y(e){"@babel/helpers - typeof";return _y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_y(e)}function wKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xKe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function tYe(e,t){return Cse(e,t+1)}function nYe(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,c=a,d=function(){var x=r==null?void 0:r[l];if(x===void 0)return{v:Cse(r,u)};var y=l,w,_=function(){return w===void 0&&(w=n(x,y)),w},C=x.coordinate,O=l===0||mO(e,C,_,c,s);O||(l=0,c=a,u+=1),O&&(c=C+e*(_()/2+o),l+=u)},h;u<=i.length;)if(h=d(),h)return h.v;return[]}function Tx(e){"@babel/helpers - typeof";return Tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tx(e)}function mG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Si(e){for(var t=1;t0?p.coordinate-w*e:p.coordinate})}else i[h]=p=Si(Si({},p),{},{tickCoord:p.coordinate});var _=mO(e,p.tickCoord,y,s,l);_&&(l=p.tickCoord-e*(y()/2+o),i[h]=Si(Si({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)u(c);return i}function sYe(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(i){var c=r[s-1],d=n(c,s-1),h=e*(c.coordinate+e*d/2-u);a[s-1]=c=Si(Si({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=mO(e,c.tickCoord,function(){return d},l,u);p&&(u=c.tickCoord-e*(d/2+o),a[s-1]=Si(Si({},c),{},{isShow:!0}))}for(var x=i?s-1:s,y=function(C){var O=a[C],P,R=function(){return P===void 0&&(P=n(O,C)),P};if(C===0){var T=e*(O.coordinate-e*R()/2-l);a[C]=O=Si(Si({},O),{},{tickCoord:T<0?O.coordinate-T*e:O.coordinate})}else a[C]=O=Si(Si({},O),{},{tickCoord:O.coordinate});var k=mO(e,O.tickCoord,R,l,u);k&&(l=O.tickCoord+e*(R()/2+o),a[C]=Si(Si({},O),{},{isShow:!0}))},w=0;w=2?Nl(o[1].coordinate-o[0].coordinate):1,_=eYe(i,w,p);return l==="equidistantPreserveStart"?nYe(w,_,y,o,a):(l==="preserveStart"||l==="preserveStartEnd"?h=sYe(w,_,y,o,a,l==="preserveStartEnd"):h=aYe(w,_,y,o,a),h.filter(function(C){return C.isShow}))}var lYe=["viewBox"],uYe=["viewBox"],cYe=["ticks"];function Oy(e){"@babel/helpers - typeof";return Oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oy(e)}function hv(){return hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vG(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!x||!x.length?null:J.createElement(Er,{className:jn("recharts-cartesian-axis",u),ref:function(w){r.layerReference=w}},i&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),Ci.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a,s=jn(o.className,"recharts-cartesian-axis-tick-value");return J.isValidElement(r)?a=J.cloneElement(r,_o(_o({},o),{},{className:s})):pn(r)?a=r(_o(_o({},o),{},{className:s})):a=J.createElement(zC,hv({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])})(b.Component);e8(a0,"displayName","CartesianAxis");e8(a0,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var wYe=["x1","y1","x2","y2","key"],xYe=["offset"];function pm(e){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pm(e)}function yG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var CYe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return J.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Pse(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(pn(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=wG(t,wYe),u=xn(l,!1);u.offset;var c=wG(u,xYe);n=J.createElement("line",Rp({},c,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function OYe(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var u=Oi(Oi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Pse(o,u)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function RYe(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var u=Oi(Oi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Pse(o,u)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function PYe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var d=c.map(function(h,p){var x=!c[p+1],y=x?o+a-h:c[p+1]-h;if(y<=0)return null;var w=p%t.length;return J.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:y,width:i,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function TYe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var d=c.map(function(h,p){var x=!c[p+1],y=x?i+s-h:c[p+1]-h;if(y<=0)return null;var w=p%r.length;return J.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:y,height:l,stroke:"none",fill:r[w],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var AYe=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return qae(J4(Oi(Oi(Oi({},a0.defaultProps),r),{},{ticks:ef(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},kYe=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return qae(J4(Oi(Oi(Oi({},a0.defaultProps),r),{},{ticks:ef(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},rv={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function t8(e){var t,n,r,o,i,a,s=Y4(),l=X4(),u=yKe(),c=Oi(Oi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:rv.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:rv.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:rv.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:rv.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:rv.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:rv.verticalFill,x:ot(e.x)?e.x:u.left,y:ot(e.y)?e.y:u.top,width:ot(e.width)?e.width:u.width,height:ot(e.height)?e.height:u.height}),d=c.x,h=c.y,p=c.width,x=c.height,y=c.syncWithTicks,w=c.horizontalValues,_=c.verticalValues,C=mKe(),O=gKe();if(!ot(p)||p<=0||!ot(x)||x<=0||!ot(d)||d!==+d||!ot(h)||h!==+h)return null;var P=c.verticalCoordinatesGenerator||AYe,R=c.horizontalCoordinatesGenerator||kYe,T=c.horizontalPoints,k=c.verticalPoints;if((!T||!T.length)&&pn(R)){var M=w&&w.length,j=R({yAxis:O?Oi(Oi({},O),{},{ticks:M?w:O.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);rf(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(pm(j),"]")),Array.isArray(j)&&(T=j)}if((!k||!k.length)&&pn(P)){var $=_&&_.length,L=P({xAxis:C?Oi(Oi({},C),{},{ticks:$?_:C.ticks}):void 0,width:s,height:l,offset:u},$?!0:y);rf(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(pm(L),"]")),Array.isArray(L)&&(k=L)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(CYe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),J.createElement(OYe,Rp({},c,{offset:u,horizontalPoints:T,xAxis:C,yAxis:O})),J.createElement(RYe,Rp({},c,{offset:u,verticalPoints:k,xAxis:C,yAxis:O})),J.createElement(PYe,Rp({},c,{horizontalPoints:T})),J.createElement(TYe,Rp({},c,{verticalPoints:k})))}t8.displayName="CartesianGrid";var NYe=["type","layout","connectNulls","ref"],MYe=["key"];function Ry(e){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(e)}function xG(e,t){if(e==null)return{};var n=jYe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(ov(l.slice(0,x)),[d-y]);break}var w=p.length%2===0?[0,h]:[h];return[].concat(ov(t.repeat(l,c)),ov(p),w).map(function(_){return"".concat(_,"px")}).join(", ")}),El(n,"id",n0("recharts-line-")),El(n,"pathRef",function(a){n.mainCurve=a}),El(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),El(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return VYe(t,e),BYe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,d=Bs(c,Nb);if(!d)return null;var h=function(y,w){return{x:y.x,y:y.y,value:y.value,errorVal:ea(y.payload,w)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(Er,p,d.map(function(x){return J.cloneElement(x,{key:"bar-".concat(x.props.dataKey),data:a,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,d=xn(this.props,!1),h=xn(l,!0),p=u.map(function(y,w){var _=Xa(Xa(Xa({key:"dot-".concat(w),r:3},d),h),{},{index:w,cx:y.x,cy:y.y,value:y.value,dataKey:c,payload:y.payload,points:u});return t.renderDotItem(l,_)}),x={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(Er,Pw({className:"recharts-line-dots",key:"dots"},x),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var d=xG(s,NYe),h=Xa(Xa(Xa({},xn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:u,connectNulls:c});return J.createElement(Pv,Pw({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,u=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,p=a.animationId,x=a.animateNewValues,y=a.width,w=a.height,_=this.state,C=_.prevPoints,O=_.totalLength;return J.createElement(Ju,{begin:c,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var R=P.t;if(C){var T=C.length/s.length,k=s.map(function(V,G){var D=Math.floor(G*T);if(C[D]){var H=C[D],U=ni(H.x,V.x),Y=ni(H.y,V.y);return Xa(Xa({},V),{},{x:U(R),y:Y(R)})}if(x){var q=ni(y*2,V.x),W=ni(w/2,V.y);return Xa(Xa({},V),{},{x:q(R),y:W(R)})}return Xa(Xa({},V),{},{x:V.x,y:V.y})});return i.renderCurveStatically(k,r,o)}var M=ni(0,O),j=M(R),$;if(l){var L="".concat(l).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});$=i.getStrokeDasharray(j,O,L)}else $=i.generateSimpleStrokeDasharray(O,j);return i.renderCurveStatically(s,r,o,{strokeDasharray:$})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&a&&a.length&&(!u&&c>0||!vy(u,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,u=o.xAxis,c=o.yAxis,d=o.top,h=o.left,p=o.width,x=o.height,y=o.isAnimationActive,w=o.id;if(i||!s||!s.length)return null;var _=this.state.isAnimationFinished,C=s.length===1,O=jn("recharts-line",l),P=u&&u.allowDataOverflow,R=c&&c.allowDataOverflow,T=P||R,k=Rn(w)?this.id:w,M=(r=xn(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},j=M.r,$=j===void 0?3:j,L=M.strokeWidth,V=L===void 0?2:L,G=Hoe(a)?a:{},D=G.clipDot,H=D===void 0?!0:D,U=$*2+V;return J.createElement(Er,{className:O},P||R?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(k)},J.createElement("rect",{x:P?h:h-p/2,y:R?d:d-x/2,width:P?p:p*2,height:R?x:x*2})),!H&&J.createElement("clipPath",{id:"clipPath-dots-".concat(k)},J.createElement("rect",{x:h-U/2,y:d-U/2,width:p+U,height:x+U}))):null,!C&&this.renderCurve(T,k),this.renderErrorBar(T,k),(C||a)&&this.renderDots(T,H,k),(!y||_)&&af.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(ov(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!vy(c,a)||!vy(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,u=o.top,c=o.left,d=o.xAxis,h=o.yAxis,p=o.width,x=o.height,y=o.isAnimationActive,w=o.id;if(i||!s||!s.length)return null;var _=this.state.isAnimationFinished,C=s.length===1,O=jn("recharts-area",l),P=d&&d.allowDataOverflow,R=h&&h.allowDataOverflow,T=P||R,k=Rn(w)?this.id:w,M=(r=xn(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},j=M.r,$=j===void 0?3:j,L=M.strokeWidth,V=L===void 0?2:L,G=Hoe(a)?a:{},D=G.clipDot,H=D===void 0?!0:D,U=$*2+V;return J.createElement(Er,{className:O},P||R?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(k)},J.createElement("rect",{x:P?c:c-p/2,y:R?u:u-x/2,width:P?p:p*2,height:R?x:x*2})),!H&&J.createElement("clipPath",{id:"clipPath-dots-".concat(k)},J.createElement("rect",{x:c-U/2,y:u-U/2,width:p+U,height:x+U}))):null,C?null:this.renderArea(T,k),(a||C)&&this.renderDots(T,H,k),(!y||_)&&af.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(b.PureComponent);kse=uh;qu(uh,"displayName","Area");qu(uh,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Sm.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});qu(uh,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(ot(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});qu(uh,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,p=t.layout,x=u&&u.length,y=kse.getBaseValue(t,n,r,o),w=p==="horizontal",_=!1,C=d.map(function(P,R){var T;x?T=u[c+R]:(T=ea(P,l),Array.isArray(T)?_=!0:T=[y,T]);var k=T[1]==null||x&&ea(P,l)==null;return w?{x:QC({axis:r,ticks:i,bandSize:s,entry:P,index:R}),y:k?null:o.scale(T[1]),value:T,payload:P}:{x:k?null:r.scale(T[1]),y:QC({axis:o,ticks:a,bandSize:s,entry:P,index:R}),value:T,payload:P}}),O;return x||_?O=C.map(function(P){var R=Array.isArray(P.value)?P.value[0]:null;return w?{x:P.x,y:R!=null&&P.y!=null?o.scale(R):null}:{x:R!=null?r.scale(R):null,y:P.y}}):O=w?o.scale(y):r.scale(y),fd({points:C,baseLine:O,layout:p,isRange:_},h)});qu(uh,"renderDotItem",function(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(pn(e))n=e(t);else{var r=jn("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=Nse(t,GYe);n=J.createElement(aP,Pp({},i,{key:o,className:r}))}return n});function Ty(e){"@babel/helpers - typeof";return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ty(e)}function nXe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rXe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function WXe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HXe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ot(o)&&ot(i)?t.slice(o,i+1):[]};function Gse(e){return e==="number"?[0,"auto"]:void 0}var g3=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=hP(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,u){var c,d=(c=u.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;h=PC(p,a.dataKey,o)}else h=d&&d[r]||s[r];return h?[].concat(Ny(l),[Vae(u,h)]):l},[])},kG=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=oQe(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=uUe(a,s,u,l);if(c>=0&&u){var d=u[c]&&u[c].value,h=g3(t,n,c,d),p=iQe(r,s,c,i);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},aQe=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,p=zae(c,i);return r.reduce(function(x,y){var w,_=y.type.defaultProps!==void 0?Ie(Ie({},y.type.defaultProps),y.props):y.props,C=_.type,O=_.dataKey,P=_.allowDataOverflow,R=_.allowDuplicatedCategory,T=_.scale,k=_.ticks,M=_.includeHidden,j=_[a];if(x[j])return x;var $=hP(t.data,{graphicalItems:o.filter(function(X){var ee,ae=a in X.props?X.props[a]:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee[a];return ae===j}),dataStartIndex:l,dataEndIndex:u}),L=$.length,V,G,D;NXe(_.domain,P,C)&&(V=M5(_.domain,null,P),p&&(C==="number"||T!=="auto")&&(D=Ow($,O,"category")));var H=Gse(C);if(!V||V.length===0){var U,Y=(U=_.domain)!==null&&U!==void 0?U:H;if(O){if(V=Ow($,O,C),C==="category"&&p){var q=T8e(V);R&&q?(G=V,V=sO(0,L)):R||(V=BW(Y,V,y).reduce(function(X,ee){return X.indexOf(ee)>=0?X:[].concat(Ny(X),[ee])},[]))}else if(C==="category")R?V=V.filter(function(X){return X!==""&&!Rn(X)}):V=BW(Y,V,y).reduce(function(X,ee){return X.indexOf(ee)>=0||ee===""||Rn(ee)?X:[].concat(Ny(X),[ee])},[]);else if(C==="number"){var W=pUe($,o.filter(function(X){var ee,ae,fe=a in X.props?X.props[a]:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee[a],ie="hide"in X.props?X.props.hide:(ae=X.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return fe===j&&(M||!ie)}),O,i,c);W&&(V=W)}p&&(C==="number"||T!=="auto")&&(D=Ow($,O,"category"))}else p?V=sO(0,L):s&&s[j]&&s[j].hasStack&&C==="number"?V=h==="expand"?[0,1]:Uae(s[j].stackGroups,l,u):V=Bae($,o.filter(function(X){var ee=a in X.props?X.props[a]:X.type.defaultProps[a],ae="hide"in X.props?X.props.hide:X.type.defaultProps.hide;return ee===j&&(M||!ae)}),C,c,!0);if(C==="number")V=h3(d,V,j,i,k),Y&&(V=M5(Y,V,P));else if(C==="category"&&Y){var K=Y,z=V.every(function(X){return K.indexOf(X)>=0});z&&(V=K)}}return Ie(Ie({},x),{},en({},j,Ie(Ie({},_),{},{axisType:i,domain:V,categoricalDomain:D,duplicateDomain:G,originalDomain:(w=_.domain)!==null&&w!==void 0?w:H,isCategorical:p,layout:c})))},{})},sQe=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,h=hP(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),p=h.length,x=zae(c,i),y=-1;return r.reduce(function(w,_){var C=_.type.defaultProps!==void 0?Ie(Ie({},_.type.defaultProps),_.props):_.props,O=C[a],P=Gse("number");if(!w[O]){y++;var R;return x?R=sO(0,p):s&&s[O]&&s[O].hasStack?(R=Uae(s[O].stackGroups,l,u),R=h3(d,R,O,i)):(R=M5(P,Bae(h,r.filter(function(T){var k,M,j=a in T.props?T.props[a]:(k=T.type.defaultProps)===null||k===void 0?void 0:k[a],$="hide"in T.props?T.props.hide:(M=T.type.defaultProps)===null||M===void 0?void 0:M.hide;return j===O&&!$}),"number",c),o.defaultProps.allowDataOverflow),R=h3(d,R,O,i)),Ie(Ie({},w),{},en({},O,Ie(Ie({axisType:i},o.defaultProps),{},{hide:!0,orientation:Fs(nQe,"".concat(i,".").concat(y%2),null),domain:R,originalDomain:P,isCategorical:x,layout:c})))}return w},{})},lQe=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.children,d="".concat(o,"Id"),h=Bs(c,i),p={};return h&&h.length?p=aQe(t,{axes:h,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(p=sQe(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},uQe=function(t){var n=yd(t),r=ef(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:x4(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:ZC(n,r)}},NG=function(t){var n=t.children,r=t.defaultShowTooltip,o=Ja(n,by),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},cQe=function(t){return!t||!t.length?!1:t.some(function(n){var r=nf(n&&n.type);return r&&r.indexOf("Bar")>=0})},MG=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},fQe=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,c=r.height,d=r.children,h=r.margin||{},p=Ja(d,by),x=Ja(d,Ov),y=Object.keys(l).reduce(function(R,T){var k=l[T],M=k.orientation;return!k.mirror&&!k.hide?Ie(Ie({},R),{},en({},M,R[M]+k.width)):R},{left:h.left||0,right:h.right||0}),w=Object.keys(a).reduce(function(R,T){var k=a[T],M=k.orientation;return!k.mirror&&!k.hide?Ie(Ie({},R),{},en({},M,Fs(R,"".concat(M))+k.height)):R},{top:h.top||0,bottom:h.bottom||0}),_=Ie(Ie({},w),y),C=_.bottom;p&&(_.bottom+=p.props.height||by.defaultProps.height),x&&n&&(_=dUe(_,o,r,n));var O=u-_.left-_.right,P=c-_.top-_.bottom;return Ie(Ie({brushBottom:C},_),{},{width:Math.max(O,0),height:Math.max(P,0)})},dQe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},n8=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(_,C){var O=C.graphicalItems,P=C.stackGroups,R=C.offset,T=C.updateId,k=C.dataStartIndex,M=C.dataEndIndex,j=_.barSize,$=_.layout,L=_.barGap,V=_.barCategoryGap,G=_.maxBarSize,D=MG($),H=D.numericAxisName,U=D.cateAxisName,Y=cQe(O),q=[];return O.forEach(function(W,K){var z=hP(_.data,{graphicalItems:[W],dataStartIndex:k,dataEndIndex:M}),X=W.type.defaultProps!==void 0?Ie(Ie({},W.type.defaultProps),W.props):W.props,ee=X.dataKey,ae=X.maxBarSize,fe=X["".concat(H,"Id")],ie=X["".concat(U,"Id")],ge={},he=l.reduce(function(un,on){var oe=C["".concat(on.axisType,"Map")],de=X["".concat(on.axisType,"Id")];oe&&oe[de]||on.axisType==="zAxis"||Cr(!1);var Se=oe[de];return Ie(Ie({},un),{},en(en({},on.axisType,Se),"".concat(on.axisType,"Ticks"),ef(Se)))},ge),ue=he[U],we=he["".concat(U,"Ticks")],Ae=P&&P[fe]&&P[fe].hasStack&&OUe(W,P[fe].stackGroups),ye=nf(W.type).indexOf("Bar")>=0,Xe=ZC(ue,we),We=[],et=Y&&cUe({barSize:j,stackGroups:P,totalSize:dQe(he,U)});if(ye){var ft,st,Ge=Rn(ae)?G:ae,Kt=(ft=(st=ZC(ue,we,!0))!==null&&st!==void 0?st:Ge)!==null&&ft!==void 0?ft:0;We=fUe({barGap:L,barCategoryGap:V,bandSize:Kt!==Xe?Kt:Xe,sizeList:et[ie],maxBarSize:Ge}),Kt!==Xe&&(We=We.map(function(un){return Ie(Ie({},un),{},{position:Ie(Ie({},un.position),{},{offset:un.position.offset-Kt/2})})}))}var gn=W&&W.type&&W.type.getComposedData;gn&&q.push({props:Ie(Ie({},gn(Ie(Ie({},he),{},{displayedData:z,props:_,dataKey:ee,item:W,bandSize:Xe,barPosition:We,offset:R,stackedData:Ae,layout:$,dataStartIndex:k,dataEndIndex:M}))),{},en(en(en({key:W.key||"item-".concat(K)},H,he[H]),U,he[U]),"animationId",T)),childIndex:z8e(W,_.children),item:W})}),q},p=function(_,C){var O=_.props,P=_.dataStartIndex,R=_.dataEndIndex,T=_.updateId;if(!cq({props:O}))return null;var k=O.children,M=O.layout,j=O.stackOffset,$=O.data,L=O.reverseStackOrder,V=MG(M),G=V.numericAxisName,D=V.cateAxisName,H=Bs(k,r),U=_Ue($,H,"".concat(G,"Id"),"".concat(D,"Id"),j,L),Y=l.reduce(function(X,ee){var ae="".concat(ee.axisType,"Map");return Ie(Ie({},X),{},en({},ae,lQe(O,Ie(Ie({},ee),{},{graphicalItems:H,stackGroups:ee.axisType===G&&U,dataStartIndex:P,dataEndIndex:R}))))},{}),q=fQe(Ie(Ie({},Y),{},{props:O,graphicalItems:H}),C==null?void 0:C.legendBBox);Object.keys(Y).forEach(function(X){Y[X]=c(O,Y[X],q,X.replace("Map",""),n)});var W=Y["".concat(D,"Map")],K=uQe(W),z=h(O,Ie(Ie({},Y),{},{dataStartIndex:P,dataEndIndex:R,updateId:T,graphicalItems:H,stackGroups:U,offset:q}));return Ie(Ie({formattedGraphicalItems:z,graphicalItems:H,offset:q,stackGroups:U},K),Y)},x=(function(w){function _(C){var O,P,R;return WXe(this,_),R=KXe(this,_,[C]),en(R,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),en(R,"accessibilityManager",new kXe),en(R,"handleLegendBBoxUpdate",function(T){if(T){var k=R.state,M=k.dataStartIndex,j=k.dataEndIndex,$=k.updateId;R.setState(Ie({legendBBox:T},p({props:R.props,dataStartIndex:M,dataEndIndex:j,updateId:$},Ie(Ie({},R.state),{},{legendBBox:T}))))}}),en(R,"handleReceiveSyncEvent",function(T,k,M){if(R.props.syncId===T){if(M===R.eventEmitterSymbol&&typeof R.props.syncMethod!="function")return;R.applySyncEvent(k)}}),en(R,"handleBrushChange",function(T){var k=T.startIndex,M=T.endIndex;if(k!==R.state.dataStartIndex||M!==R.state.dataEndIndex){var j=R.state.updateId;R.setState(function(){return Ie({dataStartIndex:k,dataEndIndex:M},p({props:R.props,dataStartIndex:k,dataEndIndex:M,updateId:j},R.state))}),R.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),en(R,"handleMouseEnter",function(T){var k=R.getMouseInfo(T);if(k){var M=Ie(Ie({},k),{},{isTooltipActive:!0});R.setState(M),R.triggerSyncEvent(M);var j=R.props.onMouseEnter;pn(j)&&j(M,T)}}),en(R,"triggeredAfterMouseMove",function(T){var k=R.getMouseInfo(T),M=k?Ie(Ie({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};R.setState(M),R.triggerSyncEvent(M);var j=R.props.onMouseMove;pn(j)&&j(M,T)}),en(R,"handleItemMouseEnter",function(T){R.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),en(R,"handleItemMouseLeave",function(){R.setState(function(){return{isTooltipActive:!1}})}),en(R,"handleMouseMove",function(T){T.persist(),R.throttleTriggeredAfterMouseMove(T)}),en(R,"handleMouseLeave",function(T){R.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};R.setState(k),R.triggerSyncEvent(k);var M=R.props.onMouseLeave;pn(M)&&M(k,T)}),en(R,"handleOuterEvent",function(T){var k=B8e(T),M=Fs(R.props,"".concat(k));if(k&&pn(M)){var j,$;/.*touch.*/i.test(k)?$=R.getMouseInfo(T.changedTouches[0]):$=R.getMouseInfo(T),M((j=$)!==null&&j!==void 0?j:{},T)}}),en(R,"handleClick",function(T){var k=R.getMouseInfo(T);if(k){var M=Ie(Ie({},k),{},{isTooltipActive:!0});R.setState(M),R.triggerSyncEvent(M);var j=R.props.onClick;pn(j)&&j(M,T)}}),en(R,"handleMouseDown",function(T){var k=R.props.onMouseDown;if(pn(k)){var M=R.getMouseInfo(T);k(M,T)}}),en(R,"handleMouseUp",function(T){var k=R.props.onMouseUp;if(pn(k)){var M=R.getMouseInfo(T);k(M,T)}}),en(R,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),en(R,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.handleMouseDown(T.changedTouches[0])}),en(R,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.handleMouseUp(T.changedTouches[0])}),en(R,"handleDoubleClick",function(T){var k=R.props.onDoubleClick;if(pn(k)){var M=R.getMouseInfo(T);k(M,T)}}),en(R,"handleContextMenu",function(T){var k=R.props.onContextMenu;if(pn(k)){var M=R.getMouseInfo(T);k(M,T)}}),en(R,"triggerSyncEvent",function(T){R.props.syncId!==void 0&&Lj.emit($j,R.props.syncId,T,R.eventEmitterSymbol)}),en(R,"applySyncEvent",function(T){var k=R.props,M=k.layout,j=k.syncMethod,$=R.state.updateId,L=T.dataStartIndex,V=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)R.setState(Ie({dataStartIndex:L,dataEndIndex:V},p({props:R.props,dataStartIndex:L,dataEndIndex:V,updateId:$},R.state)));else if(T.activeTooltipIndex!==void 0){var G=T.chartX,D=T.chartY,H=T.activeTooltipIndex,U=R.state,Y=U.offset,q=U.tooltipTicks;if(!Y)return;if(typeof j=="function")H=j(q,T);else if(j==="value"){H=-1;for(var W=0;W=0){var Ae,ye;if(G.dataKey&&!G.allowDuplicatedCategory){var Xe=typeof G.dataKey=="function"?we:"payload.".concat(G.dataKey.toString());Ae=PC(W,Xe,H),ye=K&&z&&PC(z,Xe,H)}else Ae=W==null?void 0:W[D],ye=K&&z&&z[D];if(ie||fe){var We=T.props.activeIndex!==void 0?T.props.activeIndex:D;return[b.cloneElement(T,Ie(Ie(Ie({},j.props),he),{},{activeIndex:We})),null,null]}if(!Rn(Ae))return[ue].concat(Ny(R.renderActivePoints({item:j,activePoint:Ae,basePoint:ye,childIndex:D,isRange:K})))}else{var et,ft=(et=R.getItemByXY(R.state.activeCoordinate))!==null&&et!==void 0?et:{graphicalItem:ue},st=ft.graphicalItem,Ge=st.item,Kt=Ge===void 0?T:Ge,gn=st.childIndex,un=Ie(Ie(Ie({},j.props),he),{},{activeIndex:gn});return[b.cloneElement(Kt,un),null,null]}return K?[ue,null,null]:[ue,null]}),en(R,"renderCustomized",function(T,k,M){return b.cloneElement(T,Ie(Ie({key:"recharts-customized-".concat(M)},R.props),R.state))}),en(R,"renderMap",{CartesianGrid:{handler:V_,once:!0},ReferenceArea:{handler:R.renderReferenceElement},ReferenceLine:{handler:V_},ReferenceDot:{handler:R.renderReferenceElement},XAxis:{handler:V_},YAxis:{handler:V_},Brush:{handler:R.renderBrush,once:!0},Bar:{handler:R.renderGraphicChild},Line:{handler:R.renderGraphicChild},Area:{handler:R.renderGraphicChild},Radar:{handler:R.renderGraphicChild},RadialBar:{handler:R.renderGraphicChild},Scatter:{handler:R.renderGraphicChild},Pie:{handler:R.renderGraphicChild},Funnel:{handler:R.renderGraphicChild},Tooltip:{handler:R.renderCursor,once:!0},PolarGrid:{handler:R.renderPolarGrid,once:!0},PolarAngleAxis:{handler:R.renderPolarAxis},PolarRadiusAxis:{handler:R.renderPolarAxis},Customized:{handler:R.renderCustomized}}),R.clipPathId="".concat((O=C.id)!==null&&O!==void 0?O:n0("recharts"),"-clip"),R.throttleTriggeredAfterMouseMove=Fie(R.triggeredAfterMouseMove,(P=C.throttleDelay)!==null&&P!==void 0?P:1e3/60),R.state={},R}return QXe(_,w),GXe(_,[{key:"componentDidMount",value:function(){var O,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var O=this.props,P=O.children,R=O.data,T=O.height,k=O.layout,M=Ja(P,Mu);if(M){var j=M.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,L=g3(this.state,R,j,$),V=this.state.tooltipTicks[j].coordinate,G=(this.state.offset.top+T)/2,D=k==="horizontal",H=D?{x:V,y:G}:{y:V,x:G},U=this.state.formattedGraphicalItems.find(function(q){var W=q.item;return W.type.name==="Scatter"});U&&(H=Ie(Ie({},H),U.props.points[j].tooltipPosition),L=U.props.points[j].tooltipPayload);var Y={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:$,activePayload:L,activeCoordinate:H};this.setState(Y),this.renderCursor(M),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(O,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==O.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==O.margin){var R,T;this.accessibilityManager.setDetails({offset:{left:(R=this.props.margin.left)!==null&&R!==void 0?R:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(O){t5([Ja(O.children,Mu)],[Ja(this.props.children,Mu)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var O=Ja(this.props.children,Mu);if(O&&typeof O.props.shared=="boolean"){var P=O.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(O){if(!this.container)return null;var P=this.container,R=P.getBoundingClientRect(),T=R9e(R),k={chartX:Math.round(O.pageX-T.left),chartY:Math.round(O.pageY-T.top)},M=R.width/P.offsetWidth||1,j=this.inRange(k.chartX,k.chartY,M);if(!j)return null;var $=this.state,L=$.xAxisMap,V=$.yAxisMap,G=this.getTooltipEventType(),D=kG(this.state,this.props.data,this.props.layout,j);if(G!=="axis"&&L&&V){var H=yd(L).scale,U=yd(V).scale,Y=H&&H.invert?H.invert(k.chartX):null,q=U&&U.invert?U.invert(k.chartY):null;return Ie(Ie({},k),{},{xValue:Y,yValue:q},D)}return D?Ie(Ie({},k),D):null}},{key:"inRange",value:function(O,P){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,k=O/R,M=P/R;if(T==="horizontal"||T==="vertical"){var j=this.state.offset,$=k>=j.left&&k<=j.left+j.width&&M>=j.top&&M<=j.top+j.height;return $?{x:k,y:M}:null}var L=this.state,V=L.angleAxisMap,G=L.radiusAxisMap;if(V&&G){var D=yd(V);return UW({x:k,y:M},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var O=this.props.children,P=this.getTooltipEventType(),R=Ja(O,Mu),T={};R&&P==="axis"&&(R.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=TC(this.props,this.handleOuterEvent);return Ie(Ie({},k),T)}},{key:"addListener",value:function(){Lj.on($j,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Lj.removeListener($j,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(O,P,R){for(var T=this.state.formattedGraphicalItems,k=0,M=T.length;k");return e}const Xse=b.forwardRef(({id:e,className:t,children:n,config:r,...o},i)=>{const a=b.useId(),s=`chart-${e||a.replace(/:/g,"")}`;return v.jsx(Kse.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":s,ref:i,className:je("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[v.jsx(vQe,{id:s,config:r}),v.jsx(XR,{children:n})]})})});Xse.displayName="Chart";const vQe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?v.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(gQe).map(([r,o])=>` +${o} [data-chart=${e}] { +${n.map(([i,a])=>{var l;const s=((l=a.theme)==null?void 0:l[r])||a.color;return s?` --color-${i}: ${s};`:null}).join(` +`)} +} +`).join(` +`)}}):null},r8=Mu,pP=b.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:c,nameKey:d,labelKey:h},p)=>{const{config:x}=Yse(),y=b.useMemo(()=>{var R;if(o||!(t!=null&&t.length))return null;const[_]=t,C=`${h||_.dataKey||_.name||"value"}`,O=v3(x,_,C),P=!h&&typeof a=="string"?((R=x[a])==null?void 0:R.label)||a:O==null?void 0:O.label;return s?v.jsx("div",{className:je("font-medium",l),children:s(P,t)}):P?v.jsx("div",{className:je("font-medium",l),children:P}):null},[a,s,t,o,l,x,h]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return v.jsxs("div",{ref:p,className:je("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:y,v.jsx("div",{className:"grid gap-1.5",children:t.map((_,C)=>{const O=`${d||_.name||_.dataKey||"value"}`,P=v3(x,_,O),R=c||_.payload.fill||_.color;return v.jsx("div",{className:je("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:u&&(_==null?void 0:_.value)!==void 0&&_.name?u(_.value,_.name,_,C,_.payload):v.jsxs(v.Fragment,{children:[P!=null&&P.icon?v.jsx(P.icon,{}):!i&&v.jsx("div",{className:je("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),v.jsxs("div",{className:je("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[v.jsxs("div",{className:"grid gap-1.5",children:[w?y:null,v.jsx("span",{className:"text-muted-foreground",children:(P==null?void 0:P.label)||_.name})]}),_.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:_.value.toLocaleString()})]})]})},_.dataKey)})})]})});pP.displayName="ChartTooltip";const yQe=b.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:o},i)=>{const{config:a}=Yse();return n!=null&&n.length?v.jsx("div",{ref:i,className:je("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>{const l=`${o||s.dataKey||"value"}`,u=v3(a,s,l);return v.jsxs("div",{className:je("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!t?v.jsx(u.icon,{}):v.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),u==null?void 0:u.label]},s.value)})}):null});yQe.displayName="ChartLegend";function v3(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}const wQe=(e,t)=>{var r;const n=t.findIndex(o=>o.date===e);if(n===-1)return null;if(n===t.length-1){const o=new Date(t[n].date),i=new Date(t[n-1].date),a=o.getTime()-i.getTime();return new Date(o.getTime()+a).toISOString()}return((r=t[n+1])==null?void 0:r.date)||e},xQe=(e,t)=>{var r;const n=t.findIndex(o=>o.date===e);if(n===-1)return e;if(n===0){const o=new Date(t[n].date),a=new Date(t[n+1].date).getTime()-o.getTime();return new Date(o.getTime()-a).toISOString()}return((r=t[n-1])==null?void 0:r.date)||e};function bQe({data:e,colors:t,zoom:n,showYAxis:r=!0,kind:o="bar",className:i}){const[a,s]=b.useState(null),[l,u]=b.useState(null),[c,d]=b.useState(null),[h,p]=b.useState(null),[x,y]=b.useState(!1),w=b.useRef(null),_=b.useMemo(()=>{const j=Object.keys(e[0]||{}).filter($=>$!=="date");return j.reduce(($,L,V)=>{let G=`hsl(${V*360/j.length}, 70%, 50%)`;return t&&t[L]&&(G=t[L]),V<5&&(G=`hsl(var(--chart-${V+1}))`),$[L]={label:LO(L),color:(t==null?void 0:t[L])||G},$},{})},[e,t]),C=j=>{j.activeLabel&&(s(j.activeLabel),d(xQe(j.activeLabel,e)),y(!0))},O=j=>{x&&j.activeLabel&&(u(j.activeLabel),p(wQe(j.activeLabel,e)))},P=()=>{if(c&&h){const[j,$]=[c,h].sort();n==null||n(j,$)}s(null),d(null),u(null),p(null),y(!1)},R=new Date(Math.min(...e.map(j=>new Date(j.date).getTime()))),T=new Date(Math.max(...e.map(j=>new Date(j.date).getTime()))),k=j=>{const $=new Date(j),L=T.getTime()-R.getTime(),V=1440*60*1e3,G=7*V;return L>G?$.toLocaleDateString([],{month:"short",day:"numeric"}):L>V?`${$.toLocaleDateString([],{month:"short",day:"numeric"})} ${$.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:$.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},M=Object.keys(e[0]||{}).filter(j=>j!=="date");return v.jsx(Xse,{config:_,className:je("h-[200px] min-h-[200px] w-full",i),children:v.jsx("div",{className:"h-full",ref:w,style:{touchAction:"none"},children:SQe(o,{data:e,showYAxis:r,formatXAxis:k,handleMouseDown:C,handleMouseMove:O,handleMouseUp:P,refAreaLeft:a,refAreaRight:l,chartConfig:_,dataKeys:M})})})}function SQe(e,t){switch(e){case"bar":return v.jsx(_Qe,{...t});case"line":return v.jsx(EQe,{...t});case"area":return v.jsx(CQe,{...t})}}function _Qe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(XR,{width:"100%",height:"100%",children:v.jsxs(pQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(t8,{vertical:!1}),v.jsx(ch,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(fh,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(r8,{content:v.jsx(pP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(Om,{type:"monotone",dataKey:c,stroke:l[c].color,fillOpacity:1,fill:l[c].color,isAnimationActive:!1},c)),a&&s&&v.jsx(Rm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function EQe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(XR,{width:"100%",height:"100%",children:v.jsxs(hQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(t8,{vertical:!1}),v.jsx(ch,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(fh,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(r8,{content:v.jsx(pP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(Mb,{type:"monotone",dot:!1,dataKey:c,stroke:l[c].color,fillOpacity:1,fill:l[c].color,isAnimationActive:!1},c)),a&&s&&v.jsx(Rm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function CQe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(XR,{width:"100%",height:"100%",children:v.jsxs(mQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(ch,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:48,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(fh,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(r8,{content:v.jsx(pP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(uh,{type:"monotone",dot:!1,dataKey:c,stroke:l[c].color,fillOpacity:.6,fill:l[c].color,isAnimationActive:!1,stackId:"a"},c)),a&&s&&v.jsx(Rm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function OQe({table:e,onSetPageSize:t,showSelectedRows:n=!0}){const r=e.getState().pagination;return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400",children:n&&v.jsxs("div",{children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected."]})}),v.jsxs("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(o$,{className:"text-sm font-medium text-gray-600 dark:text-gray-400",htmlFor:"rows-per-page",id:"rows-per-page-label",children:"Rows per page"}),v.jsxs(h$,{value:`${r.pageSize}`,onValueChange:o=>{e.setPageSize(Number(o)),t&&t(Number(o))},children:[v.jsx(CR,{className:"h-8 w-[70px]",id:"rows-per-page","aria-labelledby":"rows-per-page-label",children:v.jsx(p$,{placeholder:r.pageSize})}),v.jsx(OR,{side:"top",children:[25,50,100].map(o=>v.jsx(gd,{value:`${o}`,children:o},o))})]})]}),v.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",r.pageIndex+1," of ",Math.max(e.getPageCount(),1)]}),v.jsxs("div",{className:"flex items-center space-x-1",children:[v.jsxs(wt,{variant:"outline",size:"sm",className:"hidden lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to first page"}),v.jsx(xSe,{className:"size-4"})]}),v.jsxs(wt,{variant:"outline",size:"sm",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to previous page"}),v.jsx(LQ,{className:"size-4"})]}),v.jsxs(wt,{variant:"outline",size:"sm",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to next page"}),v.jsx(EL,{className:"size-4"})]}),v.jsxs(wt,{variant:"outline",size:"sm",className:"hidden lg:flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to last page"}),v.jsx(SSe,{className:"size-4"})]})]})]})]})}const o8=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full",children:v.jsx("table",{ref:n,className:je("w-full caption-bottom text-sm",e),...t})}));o8.displayName="Table";const i8=b.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:je("border-b",e),...t}));i8.displayName="TableHeader";const a8=b.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:je(e),...t}));a8.displayName="TableBody";const RQe=b.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:je("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));RQe.displayName="TableFooter";const Tv=b.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:je("border-b last:border-b-0 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Tv.displayName="TableRow";const s8=b.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:je("h-10 px-2 text-left align-middle font-medium text-gray-700 dark:text-gray-300 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));s8.displayName="TableHead";const SO=b.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:je("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));SO.displayName="TableCell";const PQe=b.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:je("mt-4 text-sm text-gray-700 dark:text-gray-300",e),...t}));PQe.displayName="TableCaption";/** + * table-core + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Id(e,t){return typeof e=="function"?e(t):e}function cs(e,t){return n=>{t.setState(r=>({...r,[e]:Id(n,r[e])}))}}function mP(e){return e instanceof Function}function TQe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function AQe(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function Ht(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((c,d)=>r[d]!==c)))return o;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-u)*100)/100,h=d/16,p=(x,y)=>{for(x=String(x);x.length{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function kQe(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Ht(()=>[e,n,t,i],(a,s,l,u)=>({table:a,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Gt(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function NQe(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(o=(i=s.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=h=>{let p=h;for(const y of l.split(".")){var x;p=(x=p)==null?void 0:x[y]}return p}:c=h=>h[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Ht(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Gt(e.options,"debugColumns")),getLeafColumns:Ht(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=d.columns)!=null&&p.length){let x=d.columns.flatMap(y=>y.getLeafColumns());return h(x)}return[d]},Gt(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const xi="debugHeaders";function jG(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),a.push(l)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const MQe={createTable:e=>{e.getHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?i:[],l=(a=o==null?void 0:o.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return W_(t,[...s,...u,...l],e)},Gt(e.options,xi)),e.getCenterHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),W_(t,n,e,"center")),Gt(e.options,xi)),e.getLeftHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return W_(t,i,e,"left")},Gt(e.options,xi)),e.getRightHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return W_(t,i,e,"right")},Gt(e.options,xi)),e.getFooterGroups=Ht(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getLeftFooterGroups=Ht(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getCenterFooterGroups=Ht(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getRightFooterGroups=Ht(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getFlatHeaders=Ht(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getLeftFlatHeaders=Ht(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getCenterFlatHeaders=Ht(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getRightFlatHeaders=Ht(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getCenterLeafHeaders=Ht(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getLeftLeafHeaders=Ht(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getRightLeafHeaders=Ht(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getLeafHeaders=Ht(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,l,u;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},Gt(e.options,xi))}};function W_(e,t,n,r){var o,i;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(x=>x.getIsVisible()).forEach(x=>{var y;(y=x.columns)!=null&&y.length&&s(x.columns,p+1)},0)};s(e);let l=[];const u=(h,p)=>{const x={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},y=[];h.forEach(w=>{const _=[...y].reverse()[0],C=w.column.depth===x.depth;let O,P=!1;if(C&&w.column.parent?O=w.column.parent:(O=w.column,P=!0),_&&(_==null?void 0:_.column)===O)_.subHeaders.push(w);else{const R=jG(n,O,{id:[r,p,O.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${y.filter(T=>T.column===O).length}`:void 0,depth:p,index:y.length});R.subHeaders.push(w),y.push(R)}x.headers.push(w),w.headerGroup=x}),l.push(x),p>0&&u(y,p-1)},c=t.map((h,p)=>jG(n,h,{depth:a,index:p}));u(c,a-1),l.reverse();const d=h=>h.filter(x=>x.column.getIsVisible()).map(x=>{let y=0,w=0,_=[0];x.subHeaders&&x.subHeaders.length?(_=[],d(x.subHeaders).forEach(O=>{let{colSpan:P,rowSpan:R}=O;y+=P,_.push(R)})):y=1;const C=Math.min(..._);return w=w+C,x.colSpan=y,x.rowSpan=w,{colSpan:y,rowSpan:w}});return d((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const l8=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>AQe(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:Ht(()=>[e.getAllLeafColumns()],l=>l.map(u=>kQe(e,s,u,u.id)),Gt(e.options,"debugRows")),_getAllCellsByColumnId:Ht(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),Gt(e.options,"debugRows"))};for(let l=0;l{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Qse=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Qse.autoRemove=e=>jl(e);const Zse=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Zse.autoRemove=e=>jl(e);const Jse=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Jse.autoRemove=e=>jl(e);const ele=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};ele.autoRemove=e=>jl(e);const tle=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});tle.autoRemove=e=>jl(e)||!(e!=null&&e.length);const nle=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});nle.autoRemove=e=>jl(e)||!(e!=null&&e.length);const rle=(e,t,n)=>e.getValue(t)===n;rle.autoRemove=e=>jl(e);const ole=(e,t,n)=>e.getValue(t)==n;ole.autoRemove=e=>jl(e);const u8=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};u8.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]};u8.autoRemove=e=>jl(e)||jl(e[0])&&jl(e[1]);const Wc={includesString:Qse,includesStringSensitive:Zse,equalsString:Jse,arrIncludes:ele,arrIncludesAll:tle,arrIncludesSome:nle,equals:rle,weakEquals:ole,inNumberRange:u8};function jl(e){return e==null||e===""}const IQe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:cs("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Wc.includesString:typeof r=="number"?Wc.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Wc.equals:Array.isArray(r)?Wc.arrIncludes:Wc.weakEquals},e.getFilterFn=()=>{var n,r;return mP(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Wc[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(c=>c.id===e.id),a=Id(n,i?i.value:void 0);if(IG(o,a,e)){var s;return(s=r==null?void 0:r.filter(c=>c.id!==e.id))!=null?s:[]}const l={id:e.id,value:a};if(i){var u;return(u=r==null?void 0:r.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=Id(t,o))==null?void 0:i.filter(a=>{const s=n.find(l=>l.id===a.id);if(s){const l=s.getFilterFn();if(IG(l,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function IG(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const DQe=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),LQe=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},$Qe=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r=i)&&(r=i)}),r},FQe=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},zQe=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!TQe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},qQe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),UQe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,VQe=(e,t)=>t.length,Bj={sum:DQe,min:LQe,max:$Qe,extent:FQe,mean:BQe,median:zQe,unique:qQe,uniqueCount:UQe,count:VQe},WQe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:cs("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Bj.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Bj.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return mP(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Bj[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function HQe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const GQe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:cs("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ht(n=>[Tw(t,n)],n=>n.findIndex(r=>r.id===e.id),Gt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Tw(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Tw(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ht(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const l=a.shift(),u=s.findIndex(c=>c.id===l);u>-1&&i.push(s.splice(u,1)[0])}i=[...i,...s]}return HQe(i,n,r)},Gt(e.options,"debugTable"))}},zj=()=>({left:[],right:[]}),KQe={getInitialState:e=>({columnPinning:zj(),...e}),getDefaultOptions:e=>({onColumnPinningChange:cs("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,l;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,c;return{left:[...((u=o==null?void 0:o.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=o==null?void 0:o.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},Gt(t.options,"debugRows")),e.getLeftVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Gt(t.options,"debugRows")),e.getRightVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Gt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?zj():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:zj())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getRightLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getCenterLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Gt(e.options,"debugColumns"))}};function YQe(e){return e||(typeof document<"u"?document:null)}const H_={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},qj=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),XQe={getDefaultColumnDef:()=>H_,getInitialState:e=>({columnSizing:{},columnSizingInfo:qj(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:cs("columnSizing",e),onColumnSizingInfoChange:cs("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:H_.minSize,(r=i??e.columnDef.size)!=null?r:H_.size),(o=e.columnDef.maxSize)!=null?o:H_.maxSize)},e.getStart=Ht(n=>[n,Tw(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Gt(t.options,"debugColumns")),e.getAfter=Ht(n=>[n,Tw(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Gt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Uj(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[r.id,r.getSize()]],l=Uj(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(_,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(O=>{var P,R;const T=t.options.columnResizeDirection==="rtl"?-1:1,k=(C-((P=O==null?void 0:O.startOffset)!=null?P:0))*T,M=Math.max(k/((R=O==null?void 0:O.startSize)!=null?R:0),-.999999);return O.columnSizingStart.forEach(j=>{let[$,L]=j;u[$]=Math.round(Math.max(L+L*M,0)*100)/100}),{...O,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(O=>({...O,...u})))},d=_=>c("move",_),h=_=>{c("end",_),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=YQe(n),x={moveHandler:_=>d(_.clientX),upHandler:_=>{p==null||p.removeEventListener("mousemove",x.moveHandler),p==null||p.removeEventListener("mouseup",x.upHandler),h(_.clientX)}},y={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),d(_.touches[0].clientX),!1),upHandler:_=>{var C;p==null||p.removeEventListener("touchmove",y.moveHandler),p==null||p.removeEventListener("touchend",y.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),h((C=_.touches[0])==null?void 0:C.clientX)}},w=QQe()?{passive:!1}:!1;Uj(i)?(p==null||p.addEventListener("touchmove",y.moveHandler,w),p==null||p.addEventListener("touchend",y.upHandler,w)):(p==null||p.addEventListener("mousemove",x.moveHandler,w),p==null||p.addEventListener("mouseup",x.upHandler,w)),t.setColumnSizingInfo(_=>({..._,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?qj():(n=e.initialState.columnSizingInfo)!=null?n:qj())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let G_=null;function QQe(){if(typeof G_=="boolean")return G_;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return G_=e,G_}function Uj(e){return e.type==="touchstart"}const ZQe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:cs("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ht(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Gt(t.options,"debugRows")),e.getVisibleCells=Ht(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Gt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ht(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Gt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Tw(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const JQe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},eZe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:cs("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Wc.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return mP(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Wc[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},tZe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:cs("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...l}=a;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},y3=0,w3=10,Vj=()=>({pageIndex:y3,pageSize:w3}),nZe={getInitialState:e=>({...e,pagination:{...Vj(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:cs("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Id(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Vj():(o=e.initialState.pagination)!=null?o:Vj())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Id(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?y3:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:y3)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?w3:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:w3)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Id(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=Id(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Ht(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},Gt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Wj=()=>({top:[],bottom:[]}),rZe={getInitialState:e=>({rowPinning:Wj(),...e}),getDefaultOptions:e=>({onRowPinningChange:cs("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],a=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,h;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(y=>!(s!=null&&s.has(y))),bottom:[...((h=l==null?void 0:l.bottom)!=null?h:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)]}}if(n==="top"){var p,x;return{top:[...((p=l==null?void 0:l.top)!=null?p:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)],bottom:((x=l==null?void 0:l.bottom)!=null?x:[]).filter(y=>!(s!=null&&s.has(y)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(y=>!(s!=null&&s.has(y))),bottom:((c=l==null?void 0:l.bottom)!=null?c:[]).filter(y=>!(s!=null&&s.has(y)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Wj():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Wj())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Gt(e.options,"debugRows")),e.getBottomRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Gt(e.options,"debugRows")),e.getCenterRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Gt(e.options,"debugRows"))}},oZe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:cs("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{x3(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Hj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Hj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Hj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return x3(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return c8(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return b3(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return b3(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},x3=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>x3(e,s.id,n,r,o))};function Hj(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(l=>{var u;const c=c8(l,n);if(c&&(r.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:i(l.subRows)}),c)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function c8(e,t){var n;return(n=t[e.id])!=null?n:!1}function b3(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(c8(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=b3(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const S3=/([0-9]+)/gm,iZe=(e,t,n)=>ile(Xd(e.getValue(n)).toLowerCase(),Xd(t.getValue(n)).toLowerCase()),aZe=(e,t,n)=>ile(Xd(e.getValue(n)),Xd(t.getValue(n))),sZe=(e,t,n)=>f8(Xd(e.getValue(n)).toLowerCase(),Xd(t.getValue(n)).toLowerCase()),lZe=(e,t,n)=>f8(Xd(e.getValue(n)),Xd(t.getValue(n))),uZe=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rf8(e.getValue(n),t.getValue(n));function f8(e,t){return e===t?0:e>t?1:-1}function Xd(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ile(e,t){const n=e.split(S3).filter(Boolean),r=t.split(S3).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),l=[a,s].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const G1={alphanumeric:iZe,alphanumericCaseSensitive:aZe,text:sZe,textCaseSensitive:lZe,datetime:uZe,basic:cZe},fZe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:cs("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return G1.datetime;if(typeof i=="string"&&(r=!0,i.split(S3).length>1))return G1.alphanumeric}return r?G1.text:G1.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return mP(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:G1[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(p=>p.id===e.id),l=a==null?void 0:a.findIndex(p=>p.id===e.id);let u=[],c,d=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&l!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(i||o||(c="remove")),c==="add"){var h;u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=a.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=a.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},dZe=[MQe,ZQe,GQe,KQe,jQe,IQe,JQe,eZe,fZe,WQe,tZe,nZe,rZe,oZe,XQe];function hZe(e){var t,n;const r=[...dZe,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),a=h=>o.options.mergeOptions?o.options.mergeOptions(i,h):{...i,...h};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(h=>{var p;l=(p=h.getInitialState==null?void 0:h.getInitialState(l))!=null?p:l});const u=[];let c=!1;const d={_features:r,options:{...i,...e},initialState:l,_queue:h=>{u.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:h=>{const p=Id(h,o.options);o.options=a(p)},getState:()=>o.options.state,setState:h=>{o.options.onStateChange==null||o.options.onStateChange(h)},_getRowId:(h,p,x)=>{var y;return(y=o.options.getRowId==null?void 0:o.options.getRowId(h,p,x))!=null?y:`${x?[x.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(h,p)=>{let x=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[h];if(!x&&(x=o.getCoreRowModel().rowsById[h],!x))throw new Error;return x},_getDefaultColumnDef:Ht(()=>[o.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:x=>{const y=x.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:x=>{var y,w;return(y=(w=x.renderValue())==null||w.toString==null?void 0:w.toString())!=null?y:null},...o._features.reduce((x,y)=>Object.assign(x,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...h}},Gt(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Ht(()=>[o._getColumnDefs()],h=>{const p=function(x,y,w){return w===void 0&&(w=0),x.map(_=>{const C=NQe(o,_,w,y),O=_;return C.columns=O.columns?p(O.columns,C,w+1):[],C})};return p(h)},Gt(e,"debugColumns")),getAllFlatColumns:Ht(()=>[o.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Gt(e,"debugColumns")),_getAllFlatColumnsById:Ht(()=>[o.getAllFlatColumns()],h=>h.reduce((p,x)=>(p[x.id]=x,p),{}),Gt(e,"debugColumns")),getAllLeafColumns:Ht(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(h,p)=>{let x=h.flatMap(y=>y.getLeafColumns());return p(x)},Gt(e,"debugColumns")),getColumn:h=>o._getAllFlatColumnsById()[h]};Object.assign(o,d);for(let h=0;hHt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let u=0;ue._autoResetPageIndex()))}function mZe(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function ale(e,t,n){return n.options.filterFromLeafRows?gZe(e,t,n):vZe(e,t,n)}function gZe(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const c=[];for(let h=0;hHt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const i=[...r.map(s=>s.id).filter(s=>s!==t),o?"__global__":void 0].filter(Boolean),a=s=>{for(let l=0;lHt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let i=0;iHt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const x=e.getColumn(h.id);if(!x)return;const y=x.getFilterFn();y&&o.push({id:h.id,filterFn:y,resolvedValue:(p=y.resolveFilterValue==null?void 0:y.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&l.length&&(a.push("__global__"),l.forEach(h=>{var p;i.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,c;for(let h=0;h{p.columnFiltersMeta[y]=w})}if(i.length){for(let x=0;x{p.columnFiltersMeta[y]=w})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const d=h=>{for(let p=0;pe._autoResetPageIndex()))}function bZe(e){return t=>Ht(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:a,flatRows:s,rowsById:l}=r;const u=o*i,c=u+o;a=a.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:s,rowsById:l}:d=mZe({rows:a,flatRows:s,rowsById:l}),d.flatRows=[];const h=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return d.rows.forEach(h),d},Gt(t.options,"debugTable"))}function SZe(){return e=>Ht(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),a={};i.forEach(l=>{const u=e.getColumn(l.id);u&&(a[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=l=>{const u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p{var d;o.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},Gt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Gj(e,t){return e?_Ze(e)?b.createElement(e,t):e:null}function _Ze(e){return EZe(e)||typeof e=="function"||CZe(e)}function EZe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function CZe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function OZe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:hZe(t)})),[r,o]=b.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function sle({columns:e,error:t,data:n,filters:r=[],leftActions:o=[],rightActions:i=[],searchBar:a,sorting:s,setSorting:l,columnFilters:u,setColumnFilters:c,pagination:d,setPagination:h,pageCount:p,onSetPageSize:x,showSelectedRows:y=!0,showColumnToggle:w,columnVisibility:_,setColumnVisibility:C,rowSelection:O,setRowSelection:P,isLoading:R,getRowId:T,emptyState:k,manualSorting:M=!0,manualFiltering:j=!0,getSubRows:$,hiddenFilters:L=[],onResetFilters:V,columnKeyToName:G,refetchProps:D,tableActions:H}){var ae;const[U,Y]=b.useState({}),q=R&&!n.length,W=b.useMemo(()=>q?Array(10).fill({metadata:{}}):n,[q,n]),K=b.useMemo(()=>q?e.map(fe=>({...fe,cell:()=>v.jsx(Jw,{className:"h-4 w-[100px]"})})):e,[q,e]),z=OZe({data:W,columns:K,state:{sorting:s,columnVisibility:_,rowSelection:O||{},columnFilters:u,pagination:d,expanded:U},pageCount:p,enableRowSelection:!!O,onRowSelectionChange:P,onSortingChange:l,onColumnFiltersChange:c,onColumnVisibilityChange:C,onPaginationChange:h,getCoreRowModel:pZe(),getFilteredRowModel:xZe(),getPaginationRowModel:bZe(),getSortedRowModel:SZe(),getFacetedRowModel:yZe(),getFacetedUniqueValues:wZe(),getSubRows:$,onExpandedChange:Y,getRowCanExpand:fe=>fe.subRows.length>0,manualSorting:M,manualFiltering:j,manualPagination:!0,getRowId:T}),X=fe=>fe.original.getRow?fe.original.getRow():v.jsx(Tv,{"data-state":fe.getIsSelected()&&"selected",className:je(fe.original.isExpandable&&"cursor-pointer hover:bg-muted"),onClick:fe.original.onClick,children:fe.getVisibleCells().map(ie=>{var he;const ge=(he=ie.column.columnDef.meta)==null?void 0:he.truncate;return v.jsx(SO,{className:ge?"overflow-hidden":void 0,style:ge?{maxWidth:ie.column.getSize()}:void 0,children:ge?v.jsx("div",{className:"truncate",children:Gj(ie.column.columnDef.cell,ie.getContext())}):Gj(ie.column.columnDef.cell,ie.getContext())},ie.id)})},fe.id),ee=((ae=z.getRowModel().rows)==null?void 0:ae.length)>0;return t?v.jsx("div",{className:"p-4 text-center text-red-500",children:t.message||"An error occurred."}):v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx("div",{className:"shrink-0 min-h-10 flex flex-col w-full items-center pt-2 mb-2",children:v.jsxs("div",{className:"w-full",children:[(H==null?void 0:H.selectedActionType)&&v.jsx(RAe,{actionType:H.selectedActionType,params:H.actionModalParams,table:z,columnKeyToName:G,filters:r,hiddenFilters:[db],showColumnVisibility:!1}),(o||i||a||r.length>0)&&v.jsx(TAe,{table:z,filters:r,isLoading:R,leftActions:o,rightActions:i,searchBar:a,showColumnToggle:w,hiddenFilters:L,columnKeyToName:G,refetchProps:D,tableActions:H,onResetFilters:V})]})}),v.jsx("div",{className:"min-h-0 flex-1 overflow-auto relative",children:v.jsxs(o8,{className:"table-auto w-full relative z-10",children:[v.jsx(i8,{className:"sticky top-0 z-10 bg-background",children:z.getHeaderGroups().map(fe=>v.jsx(Tv,{children:fe.headers.map(ie=>v.jsx(s8,{colSpan:ie.colSpan,className:"border-b bg-background",children:ie.isPlaceholder?null:Gj(ie.column.columnDef.header,ie.getContext())},ie.id))},fe.id))}),v.jsx(a8,{className:"w-full",children:ee?z.getRowModel().rows.map(fe=>v.jsxs(b.Fragment,{children:[X(fe),fe.getIsExpanded()&&fe.subRows.map(ie=>X(ie))]},fe.id)):v.jsx(Tv,{className:"hover:bg-transparent",children:v.jsx(SO,{colSpan:e.length,className:"h-full",children:v.jsx("div",{className:"flex h-full w-full flex-col items-center justify-center pt-8",children:k||v.jsx("p",{className:"text-lg font-semibold",children:"No results."})})})})})]})}),v.jsx("div",{className:"shrink-0 h-10 flex items-center pt-2",children:v.jsx("div",{className:"w-full",children:v.jsx(OQe,{table:z,onSetPageSize:x,showSelectedRows:y})})})]})}const RZe=()=>{var a,s;const{tenantId:e}=Ma(),{refetchInterval:t}=vf(),{filters:{apiFilters:n,setCustomTimeRange:r}}=rh(),o=b.useCallback((l,u)=>{r({start:l,end:u})},[r]),i=In({...io.v1TaskRuns.pointMetrics(e,{createdAfter:n.since,finishedBefore:n.until}),placeholderData:l=>l,refetchInterval:t});return i.isLoading?v.jsx(Jw,{className:"h-24 w-full"}):v.jsx(bQe,{kind:"bar",data:((s=(a=i.data)==null?void 0:a.results)==null?void 0:s.map(l=>({date:l.time,SUCCEEDED:l.SUCCEEDED,FAILED:l.FAILED})))||[],colors:{SUCCEEDED:"rgb(34 197 94 / 0.5)",FAILED:"hsl(var(--destructive))"},zoom:o,showYAxis:!1,className:"h-24 min-h-24"})};function lle({leftLabel:e}){const{tenantId:t}=Ma(),n=Pm(),{setIsFrozen:r}=vf(),{filters:o,toolbarFilters:i,tableRows:a,numPages:s,isRunsLoading:l,isStatusCountsLoading:u,isQueueMetricsLoading:c,isRefetching:d,runStatusCounts:h,queueMetrics:p,actionModalParams:x,selectedActionType:y,pagination:w,columnVisibility:_,rowSelection:C,showTriggerWorkflow:O,showQueueMetrics:P,display:{hideMetrics:R,hideCounts:T,hideColumnToggle:k,hiddenFilters:M},actions:{refetchRuns:j,refetchMetrics:$,getRowId:L,setPageSize:V,setPagination:G,setColumnVisibility:D,setRowSelection:H,setShowTriggerWorkflow:U,setShowQueueMetrics:Y}}=rh(),[q,W]=b.useState(null),K=b.useCallback(ge=>{n.open({type:"task-run-details",content:{taskRunId:ge,defaultOpenTab:H$.Activity,showViewTaskRunButton:!0}})},[n]),z=b.useCallback((ge,he)=>{he?(W(ge),r(!0)):(W(null),r(!1))},[r]),X=b.useCallback(ge=>{o.setAdditionalMetadata(ge)},[o]),ee=b.useMemo(()=>lPe(t,q,X,K,z),[t,q,X,K,z]),ae=b.useCallback(()=>{j(),$()},[j,$]);b.useEffect(()=>{if(o.isCustomTimeRange)return;const ge=setInterval(()=>{o.updateCurrentTimeWindow()},60*1e3);return()=>clearInterval(ge)},[o,o.isCustomTimeRange,o.updateCurrentTimeWindow]);const fe=l||u,ie=[...T?[]:[v.jsx("div",{className:"mr-auto flex justify-start",children:h.length>0?v.jsx(B4e,{}):v.jsx(Jw,{className:"h-8 w-[40vw] max-w-[800px]"})},"metrics")],...e?[v.jsx("span",{className:"mr-auto flex justify-start font-medium",children:e},"left-label")]:[]];return v.jsxs("div",{className:"flex h-full flex-col gap-y-2 overflow-hidden",children:[v.jsx(uZ,{}),v.jsx(L4e,{defaultWorkflow:void 0,show:O,onClose:()=>U(!1)}),!R&&v.jsx(nb,{open:P,onOpenChange:Y,children:v.jsxs(Uy,{className:"w-fit min-w-[500px] max-w-[80%]",children:[v.jsx(rb,{children:v.jsx(Vy,{children:"Queue Metrics"})}),v.jsx(qd,{}),!p||c?v.jsx(gb,{}):v.jsx(cf,{language:"json",className:"max-h-[400px] overflow-y-auto",code:JSON.stringify(p||"{}",null,2)})]})}),!R&&v.jsx(RZe,{}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(sle,{emptyState:v.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[v.jsx("p",{className:"text-lg font-semibold",children:"No runs found"}),v.jsx("div",{className:"w-fit",children:v.jsx(yw,{doc:ww.v1.quickstart,label:"Learn more about tasks"})})]}),isLoading:fe,columns:ee,columnVisibility:_,setColumnVisibility:D,data:a,filters:i,leftActions:ie,columnFilters:o.columnFilters,setColumnFilters:ge=>{typeof ge=="function"?o.setColumnFilters(ge(o.columnFilters)):o.setColumnFilters(ge)},pagination:w,setPagination:G,onSetPageSize:V,rowSelection:C,setRowSelection:H,pageCount:s,showColumnToggle:!k,getSubRows:ge=>ge.children||[],getRowId:L,hiddenFilters:M,columnKeyToName:Ps,refetchProps:{isRefetching:d,onRefetch:ae},tableActions:{showTableActions:!0,onTriggerWorkflow:()=>U(!0),selectedActionType:y,actionModalParams:x},onResetFilters:o.resetFilters})})]})}const Gi={id:"Event ID",key:"Event",seenAt:"Seen at",workflowId:"Workflow",status:"Status",runs:"Runs",metadata:"Metadata",payload:"Payload",scope:"Scope"},_O="id",d8="key",PZe="seenAt",h8="workflowId",p8="status",TZe="runs",m8="metadata",AZe="payload",EO="scope",kZe=({onRowClick:e,openMetadataPopover:t,setOpenMetadataPopover:n,openPayloadPopover:r,setOpenPayloadPopover:o})=>[{accessorKey:_O,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.id}),cell:({row:i})=>v.jsx("div",{className:"w-full",children:v.jsx(wt,{className:"w-fit pl-0",variant:"link",onClick:()=>{e==null||e(i.original)},children:i.original.metadata.id})}),enableSorting:!1,enableHiding:!0},{accessorKey:d8,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.key}),cell:({row:i})=>v.jsx(wt,{className:"h-auto min-w-0 justify-start pl-0 text-left",variant:"link",onClick:()=>{e==null||e(i.original)},children:i.original.key}),size:220,meta:{truncate:!0},enableSorting:!1,enableHiding:!1},{accessorKey:PZe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.seenAt}),cell:({row:i})=>v.jsx("div",{children:v.jsx(Ml,{date:i.original.metadata.createdAt})}),enableSorting:!1},{accessorKey:h8,header:()=>v.jsx(v.Fragment,{}),cell:()=>v.jsx("div",{})},{accessorKey:p8,header:()=>v.jsx(v.Fragment,{}),cell:()=>v.jsx("div",{})},{accessorKey:TZe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.runs}),cell:({row:i})=>i.original.workflowRunSummary?v.jsx(NZe,{event:i.original}):v.jsx("div",{children:"None"}),enableSorting:!1},{accessorKey:m8,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.metadata}),cell:({row:i})=>i.original.additionalMetadata?v.jsx(XI,{metadata:i.original.additionalMetadata,isOpen:t===i.original.metadata.id,onOpenChange:a=>{n(a?i.original.metadata.id:null)},title:"Metadata",align:"end"}):v.jsx("div",{}),enableSorting:!1},{accessorKey:AZe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.payload}),cell:({row:i})=>i.original.payload?v.jsx(XI,{metadata:i.original.payload,isOpen:r===i.original.metadata.id,onOpenChange:a=>{o(a?i.original.metadata.id:null)},title:"Payload",align:"start"}):v.jsx("div",{}),enableSorting:!1,enableHiding:!0},{accessorKey:EO,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.scope}),cell:({row:i})=>v.jsx("div",{className:"w-full",children:i.original.scope}),enableSorting:!1,enableHiding:!0}];function NZe({event:e}){var s,l,u,c,d;const t=((s=e.workflowRunSummary)==null?void 0:s.failed)||0,n=((l=e.workflowRunSummary)==null?void 0:l.succeeded)||0,r=((u=e.workflowRunSummary)==null?void 0:u.running)||0,o=((c=e.workflowRunSummary)==null?void 0:c.cancelled)||0,i=((d=e.workflowRunSummary)==null?void 0:d.queued)||0,a=[{variant:"failed",count:t,label:"Failed"},{variant:"successful",count:n,label:"Succeeded"},{variant:"inProgress",count:r,label:"Running"},{variant:"cancelled",count:o,label:"Cancelled"},{variant:"queued",count:i,label:"Queued"}];return v.jsx("div",{className:"flex flex-row items-center justify-start gap-2",children:a.map(({variant:h,count:p,label:x})=>p>0&&v.jsxs(Ti,{variant:h,children:[p," ",x]},h))})}const MZe=Gy({k:Hc(Oo()).default([]),w:Hc(Oo()).default([]),s:Hc(Oo()).default([]),st:Hc(lD(qt)).default([]),m:Hc(Oo()).default([]),i:Hc(Oo()).default([])}).default({}),jZe=({key:e})=>{var U;const{tenantId:t}=Ma(),{refetchInterval:n}=vf(),r=`events-${e}`,{state:{k:o,w:i,s:a,st:s,m:l,i:u},columnFilters:c,setColumnFilters:d,resetFilters:h}=gee(MZe,r,{k:d8,w:h8,s:EO,st:p8,m:m8,i:_O}),{limit:p,offset:x,pagination:y,setPagination:w,setPageSize:_}=$L({key:e,resetPageOnChange:[o,i,a,s,l,u]}),{data:C,isLoading:O,refetch:P,error:R,isRefetching:T}=In({queryKey:["v1:events:list",t,{keys:o,workflows:i,offset:x,limit:p,statuses:s,additionalMetadata:l,eventIds:u,scopes:a}],queryFn:async()=>(await rt.v1EventList(t,{offset:x,limit:p,keys:o,since:void 0,until:void 0,eventIds:u,workflowRunStatuses:s,additionalMetadata:l,workflowIds:i,scopes:a})).data,refetchInterval:u!=null&&u.length?!1:n,placeholderData:Y=>Y}),k=(C==null?void 0:C.rows)??[],M=((U=C==null?void 0:C.pagination)==null?void 0:U.num_pages)??1,{data:j,error:$}=In({queryKey:["v1:events:listKeys",t],queryFn:async()=>(await rt.v1EventKeyList(t)).data,staleTime:300*1e3}),L=b.useMemo(()=>{var Y;return((Y=j==null?void 0:j.rows)==null?void 0:Y.map(q=>({value:q,label:q})))||[]},[j]),{data:V,isLoading:G,error:D}=In({...io.workflows.list(t,{limit:200})}),H=b.useMemo(()=>{var Y;return((Y=V==null?void 0:V.rows)==null?void 0:Y.map(q=>({value:q.metadata.id,label:q.name})))||[]},[V]);return{events:k,numEvents:M,isLoading:O||G,refetch:P,error:R||$||D,pagination:y,setPagination:w,setPageSize:_,columnFilters:c,setColumnFilters:d,selectedKeys:o,selectedWorkflowIds:i,selectedScopes:a,selectedStatuses:s,selectedMetadata:l,selectedEventIds:u,eventKeyFilters:L,workflowKeyFilters:H,workflowRunStatusFilters:Ite,isRefetching:T,resetFilters:h}};function _3({columns:e,data:t,rowKey:n}){return v.jsx("div",{className:"overflow-auto rounded-md border bg-background",children:v.jsxs(o8,{children:[v.jsx(i8,{children:v.jsx(Tv,{children:e.map(({columnLabel:r})=>v.jsx(s8,{className:"pr-8",children:r},r))})}),v.jsx(a8,{children:t.map((r,o)=>v.jsx(Tv,{children:e.map(({columnLabel:i,cellRenderer:a})=>v.jsx(SO,{className:"pr-8",children:a(r)},i))},n(r,o)))})]})})}function IZe(){const[e,t]=b.useState(null),[n,r]=b.useState(null),{open:o}=Pm(),{events:i,numEvents:a,isLoading:s,refetch:l,error:u,pagination:c,setPagination:d,setPageSize:h,columnFilters:p,setColumnFilters:x,eventKeyFilters:y,workflowKeyFilters:w,workflowRunStatusFilters:_,isRefetching:C,resetFilters:O}=jZe({key:"table"}),[P,R]=Xv("hatchet:columns:events",{[_O]:!1,[Gi.payload]:!1,[EO]:!1}),T=kZe({onRowClick:k=>{o({type:"event-details",content:{event:k}})},openMetadataPopover:e,setOpenMetadataPopover:t,openPayloadPopover:n,setOpenPayloadPopover:r});return v.jsx(v.Fragment,{children:v.jsx(sle,{error:u,isLoading:s,columns:T,data:i,filters:[{columnId:d8,title:Gi.key,options:y,type:Vn.Array},{columnId:h8,title:Gi.workflowId,options:w,type:Vn.Checkbox},{columnId:p8,title:Gi.status,options:_,type:Vn.Checkbox},{columnId:m8,title:Gi.metadata,type:Vn.KeyValue},{columnId:_O,title:Gi.id,type:Vn.Array},{columnId:EO,title:Gi.scope,type:Vn.Array}],showColumnToggle:!0,columnVisibility:P,setColumnVisibility:R,columnFilters:p,setColumnFilters:x,pagination:c,setPagination:d,onSetPageSize:h,pageCount:a,getRowId:k=>k.metadata.id,columnKeyToName:Gi,showSelectedRows:!1,refetchProps:{isRefetching:C,onRefetch:l},onResetFilters:O,emptyState:v.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-y-4 py-8 text-foreground",children:[v.jsx("p",{className:"text-lg font-semibold",children:"No events found"}),v.jsx("div",{className:"w-fit",children:v.jsx(yw,{doc:ww.v1.events,label:"Learn about pushing events to Hatchet"})})]})})})}function ule({event:e}){const t=!!(e.scope&&e.scope.length>0),{filters:n,workflowIdToName:r}=SJ({key:"events-table",scopeOverrides:e.scope?[e.scope]:void 0});return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col items-start justify-center gap-3 border-b pb-4 text-sm",children:[v.jsxs("div",{className:"flex w-full min-w-0 flex-row items-center gap-3",children:[v.jsx("span",{className:"shrink-0 font-medium text-muted-foreground",children:"Key"}),v.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto px-2 py-1",children:v.jsx("span",{className:"whitespace-nowrap",children:e.key})})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Seen"}),v.jsx("span",{className:"font-medium",children:v.jsx(Ml,{date:e.metadata.createdAt})})]})]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Payload"}),v.jsx(qd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(DZe,{event:e})})]}),t&&n&&n.length>0&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Filters"}),v.jsx(qd,{className:"mb-3"}),v.jsx(LZe,{filters:n,workflowIdToName:r})]}),v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Runs"}),v.jsx(qd,{className:"mb-3"}),v.jsx($Ze,{event:e})]})]})]})})}function DZe({event:e}){const t={id:e.metadata.id,seenAt:e.seenAt,key:e.key,additionalMetadata:e.additionalMetadata,scope:e.scope,payload:e.payload};return v.jsx(cf,{language:"json",className:"text-xs",code:JSON.stringify(t,null,2)})}function LZe({filters:e,workflowIdToName:t}){const n=b.useMemo(()=>[{columnLabel:"ID",cellRenderer:r=>v.jsx("div",{className:"w-full",children:v.jsx(wt,{className:"w-fit pl-0",variant:"link",children:r.metadata.id})})},{columnLabel:"Workflow",cellRenderer:r=>v.jsx("div",{className:"w-full",children:t[r.workflowId]})},{columnLabel:"Scope",cellRenderer:r=>v.jsx("div",{className:"w-full",children:r.scope})},{columnLabel:"Expression",cellRenderer:r=>v.jsx(cf,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:r.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"})},{columnLabel:"Is Declarative",cellRenderer:r=>r.isDeclarative?v.jsx(fL,{className:"size-4 text-green-600"}):null}],[t]);return v.jsx("div",{className:"w-full overflow-x-auto",children:v.jsx("div",{className:"min-w-[500px] [&_td:last-child]:w-[60px] [&_td:last-child]:min-w-[60px] [&_td:last-child]:max-w-[60px] [&_th:last-child]:w-[60px] [&_th:last-child]:min-w-[60px] [&_th:last-child]:max-w-[60px]",children:e.length>0?v.jsx(_3,{columns:n,data:e,rowKey:r=>r.metadata.id}):v.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No filters found for this event."})})})}function $Ze({event:e}){return v.jsx("div",{className:"w-full overflow-x-auto",children:v.jsx("div",{className:"min-w-[600px]",children:v.jsx(gD,{tableKey:`event-workflow-runs-${e.metadata.id}`,display:{hideMetrics:!0,hideCounts:!0,hideDateFilter:!0,hideTriggerRunButton:!0,hideCancelAndReplayButtons:!0},runFilters:{triggeringEventExternalId:e.metadata.id},children:v.jsx(lle,{})})})})}const FZe=Object.freeze(Object.defineProperty({__proto__:null,ExpandedEventContent:ule,default:IZe},Symbol.toStringTag,{value:"Module"})),Het=Gy({workflowId:Oo().min(36,"Workflow ID must be 36 characters").max(36,"Workflow ID must be 36 characters"),expression:Oo().min(1,"Expression is required"),scope:Oo().min(1,"Scope is required"),payload:Oo().default("")}),BZe=Gy({expression:Oo().min(1,"Expression is required").optional(),scope:Oo().min(1,"Scope is required").optional(),payload:Oo().optional()}),sw=b.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:je("flex min-h-9 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));sw.displayName="Textarea";function zZe({filterId:e}){const[t,n]=b.useState(!1),[r,o]=b.useState(!1),[i,a]=b.useState(null),{close:s}=Pm(),{filter:l,isLoading:u}=SCe(e),{workflowIdToName:c,mutations:d}=SJ({key:`detail-${l==null?void 0:l.metadata.id}`}),h=Ooe({resolver:Poe(BZe),defaultValues:{expression:l==null?void 0:l.expression,scope:l==null?void 0:l.scope,payload:JSON.stringify((l==null?void 0:l.payload)||{},null,2)}}),{register:p,handleSubmit:x,reset:y,formState:{errors:w}}=h,_=()=>{y({expression:l==null?void 0:l.expression,scope:l==null?void 0:l.scope,payload:JSON.stringify((l==null?void 0:l.payload)||{},null,2)}),a(null),n(!0)},C=b.useCallback(async R=>{if(l)try{let T;if(R.payload!==void 0)try{const k=R.payload.trim()||"{}";T=JSON.parse(k),a(null)}catch(k){if(k instanceof SyntaxError){a("The filter payload must be valid JSON");return}}await d.update.perform(l.metadata.id,{...R,payload:T}),n(!1)}catch(T){console.error("Failed to update filter:",T)}},[d.update,l]),O=()=>{n(!1),a(null),y()},P=async()=>{if(l)try{await d.delete.perform(l.metadata.id),o(!1),s()}catch(R){console.error("Failed to delete filter:",R)}};return!l||u?v.jsx("div",{children:"Loading..."}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex gap-2 pt-2",children:[t?v.jsxs(v.Fragment,{children:[v.jsx(wt,{variant:"outline",size:"sm",onClick:O,leftIcon:v.jsx(XO,{className:"size-4"}),children:"Cancel"}),v.jsx(wt,{size:"sm",onClick:x(C),disabled:d.update.isPending,leftIcon:v.jsx(K1e,{className:"size-4"}),children:d.update.isPending?"Saving...":"Save"})]}):v.jsx(wt,{variant:"outline",size:"sm",onClick:_,leftIcon:v.jsx(Z1e,{className:"size-4"}),children:"Edit"}),v.jsx(wt,{variant:"destructive",size:"sm",onClick:()=>o(!0),leftIcon:v.jsx(ewe,{className:"size-4"}),children:"Delete"})]})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"filter-id",children:"Filter ID"}),v.jsx(ri,{id:"filter-id",value:l.metadata.id,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"workflow",children:"Workflow"}),v.jsx(ri,{id:"workflow",value:c[l.workflowId]||l.workflowId,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"scope",children:"Scope"}),t?v.jsxs(v.Fragment,{children:[v.jsx(ri,{id:"scope",...p("scope"),placeholder:"Enter scope"}),w.scope&&v.jsx("p",{className:"text-sm text-red-600",children:w.scope.message})]}):v.jsx(ri,{id:"scope",value:l.scope,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"expression",children:"Expression"}),t?v.jsxs(v.Fragment,{children:[v.jsx(sw,{id:"expression",...p("expression"),placeholder:"Enter filter expression",className:"min-h-[100px] font-mono"}),w.expression&&v.jsx("p",{className:"text-sm text-red-600",children:w.expression.message})]}):v.jsx(sw,{id:"expression",value:l.expression,disabled:!0,className:"min-h-[100px] bg-muted font-mono disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"payload",children:"Payload (JSON)"}),t?v.jsxs(v.Fragment,{children:[v.jsx(sw,{id:"payload",...p("payload"),placeholder:'{"key": "value"} or leave empty for {}',className:"min-h-[120px] font-mono text-sm",onChange:R=>{p("payload").onChange(R),a(null)}}),i&&v.jsx("p",{className:"text-sm text-red-600",children:i})]}):v.jsx(sw,{id:"payload",value:JSON.stringify(l.payload||{},null,2),disabled:!0,className:"min-h-[120px] bg-muted font-mono text-sm disabled:cursor-text"})]})]})]}),v.jsx(nb,{open:r,onOpenChange:o,children:v.jsxs(Uy,{children:[v.jsxs(rb,{children:[v.jsx(Vy,{children:"Delete Filter"}),v.jsx(oR,{children:"Are you sure you want to delete this filter? This action cannot be undone."})]}),v.jsxs(DQ,{children:[v.jsx(wt,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),v.jsx(wt,{variant:"destructive",onClick:P,disabled:d.delete.isPending,children:d.delete.isPending?"Deleting...":"Delete"})]})]})})]})}function qZe({scheduledRun:e}){const{tenantId:t}=Ma();return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-3 border-b pb-4 text-sm",children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Workflow"}),v.jsx(Bl,{to:At.tenantWorkflowRoute.to,params:{tenant:t,workflow:e.workflowId},className:"truncate font-medium hover:underline",children:e.workflowName}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Trigger At"}),v.jsx("span",{className:"font-medium",children:v.jsx(Ml,{date:e.triggerAt})}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Status"}),v.jsx("div",{children:v.jsx(nOe,{status:e.workflowRunStatus||"SCHEDULED"})}),e.workflowRunId&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Workflow Run"}),v.jsx(Bl,{to:At.tenantRunRoute.to,params:{tenant:t,run:e.workflowRunId},className:"truncate font-medium hover:underline",children:e.workflowRunName||e.workflowRunId})]}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Created At"}),v.jsx("span",{className:"font-medium",children:v.jsx(Ml,{date:e.metadata.createdAt})})]}),v.jsxs("div",{className:"space-y-4",children:[e.input&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Payload"}),v.jsx(qd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(cf,{language:"json",className:"text-xs",code:JSON.stringify(e.input,null,2)})})]}),e.additionalMetadata&&Object.keys(e.additionalMetadata).length>0&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Metadata"}),v.jsx(qd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(cf,{language:"json",className:"text-xs",code:JSON.stringify(e.additionalMetadata,null,2)})})]})]})]})})}function UZe(e){return e===Lr.ERROR?"failed":e===Lr.OK?"successful":"queued"}function VZe(e){var r,o;const t=[],n=[...e.children];for(;n.length>0;){const i=n.pop();if(i.statusCode===Lr.ERROR&&i.statusMessage){const a=((r=i.spanAttributes)==null?void 0:r["hatchet.step_name"])??((o=i.spanAttributes)==null?void 0:o["hatchet.task_name"]);t.push({span:i,spanName:a??i.spanName,message:i.statusMessage})}n.push(...i.children)}return t.sort((i,a)=>new Date(i.span.createdAt).getTime()-new Date(a.span.createdAt).getTime()),t}const WZe="hatchet.";function HZe(e){const t=[],n=[];if(!e)return{hatchet:t,user:n};for(const[r,o]of Object.entries(e))r.startsWith(WZe)?t.push([r,o]):n.push([r,o]);return t.sort((r,o)=>r[0].localeCompare(o[0])),n.sort((r,o)=>r[0].localeCompare(o[0])),{hatchet:t,user:n}}const DG=[{columnLabel:"Key",cellRenderer:([e])=>v.jsx("span",{className:"whitespace-nowrap text-xs text-muted-foreground",children:e})},{columnLabel:"Value",cellRenderer:([,e])=>v.jsx("span",{className:"break-all text-xs",children:e})}];function GZe({span:e,onSpanSelect:t,onOpenTaskRun:n}){var w;const r=!!e.inProgress||Qw(e),o=F$(r),i=Qw(e),a=new Date(e.createdAt).getTime(),s=e.inProgress?Math.max(0,o-a)*1e6:e.durationNs,l=e.queuedPhase;let u=l?l.durationNs:0;if(l&&i){const _=new Date(l.createdAt).getTime();u=Math.max(0,o-_)*1e6}const c=i?{label:"Queued",variant:"queued"}:e.inProgress?{label:"In Progress",variant:"inProgress"}:{label:Sre(e.statusCode),variant:UZe(e.statusCode)},{hatchet:d,user:h}=HZe(e.spanAttributes),p=(w=e.spanAttributes)==null?void 0:w["hatchet.step_run_id"],x=b.useCallback(()=>{p&&(n==null||n(p))},[p,n]),y=b.useMemo(()=>e.statusCode!==Lr.ERROR||e.children.length===0?[]:VZe(e),[e]);return v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h3",{className:"truncate font-mono text-sm font-semibold text-foreground",children:e.spanName}),v.jsx("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:e.spanId})]}),p&&v.jsx(wt,{size:"sm",variant:"outline",onClick:x,leftIcon:v.jsx(q1e,{className:"size-4"}),children:"View Task Run"})]}),v.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-3",children:[l&&v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Queue Time"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(u,{unit:"ns",precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:i?"–":Ro(s,{unit:"ns",precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Status"}),v.jsx("div",{className:"mt-0.5",children:v.jsx(Ti,{variant:c.variant,children:c.label})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Started"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:ire(e.createdAt)})]})]})]}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",children:[e.statusCode===Lr.ERROR&&e.statusMessage&&v.jsxs(xC,{variant:"destructive",children:[v.jsx(bC,{children:"Error Message"}),v.jsx(SC,{children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs",children:e.statusMessage})})]}),y.length>0&&v.jsx("div",{className:"flex flex-col gap-2",children:y.map((_,C)=>v.jsx("button",{type:"button",className:"w-full text-left",onClick:()=>t==null?void 0:t(_.span),children:v.jsxs(xC,{variant:"destructive",className:"transition-colors hover:bg-red-100 dark:hover:bg-red-950/60",children:[v.jsx(bC,{children:_.spanName}),v.jsx(SC,{children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs",children:_.message})})]})},C))}),h.length>0&&v.jsxs("div",{children:[v.jsx("h4",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Attributes"}),v.jsx(_3,{columns:DG,data:h,rowKey:([_])=>_})]}),d.length>0&&v.jsxs("div",{children:[v.jsx("h4",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Hatchet Attributes"}),v.jsx(_3,{columns:DG,data:d,rowKey:([_])=>_})]})]})]})}function KZe({group:e}){const t=e.latestEndMs-e.earliestStartMs,n=e.spans.map(a=>a.durationNs/1e6),r=n.reduce((a,s)=>a+s,0)/n.length,o=Math.min(...n),i=Math.max(...n);return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h3",{className:"truncate font-mono text-sm font-semibold text-foreground",children:e.groupName}),v.jsxs("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.totalCount.toLocaleString()," spans",e.errorCount>0&&v.jsxs("span",{className:"text-red-500",children:[" ","· ",e.errorCount.toLocaleString()," errors"]})]})]}),v.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Time Range"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(t,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Avg Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(r,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Min Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:Ro(o,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Max Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:Ro(i,{precise:!0})})]})]})]})}function YZe(e){return v.jsx(MAe,{children:v.jsx(BLe,{...e})})}function XZe(e){const{open:t}=Pm();return v.jsx(GZe,{...e,onOpenTaskRun:n=>t({type:"task-run-details",content:{taskRunId:n,showViewTaskRunButton:!0}})})}function QZe(){const[e,t]=b.useState(!1),[n,r]=b.useState([]),[o,i]=b.useState(-1),a=By(),{theme:s}=vL(),l=["dark","light"].includes(s)?s:"dark",u=o>=0&&o{t(!1),r([]),i(-1)},[a.pathname]);const c=b.useMemo(()=>{if(!u)return null;const _=u.type;switch(_){case"task-run-details":return{isDocs:!1,component:v.jsx(YZe,{...u.content})};case"event-details":return{isDocs:!1,component:v.jsx(ule,{event:u.content.event})};case"filter-detail":return{isDocs:!1,component:v.jsx(zZe,{filterId:u.content.filter.metadata.id})};case"scheduled-run-details":return{isDocs:!1,component:v.jsx(qZe,{scheduledRun:u.content.scheduledRun})};case"span-details":return{isDocs:!1,component:v.jsx(XZe,{...u.content})};case"group-details":return{isDocs:!1,component:v.jsx(KZe,{...u.content})};case"docs":const C=u.queryParams??{};C.theme=l;const O=new URLSearchParams(C).toString(),P=`${u.content.href}?${O}`+(u.scrollTo?`#${u.scrollTo}`:"");return{isDocs:!0,component:v.jsx("div",{className:"size-full p-4",children:v.jsx("iframe",{src:P,className:"inset-0 size-full w-full rounded-md border border-slate-800",loading:"lazy"})})};default:const R=_;throw new Error(`Unhandled action type: ${R}`)}},[u,l]),d=b.useCallback(_=>{r(C=>{const O=C.slice(0,o+1);return O.push(_),O}),i(C=>C+1),t(!0)},[o]),h=b.useCallback(()=>{t(!1),r([]),i(-1)},[]),p=b.useCallback(()=>{o>0&&i(_=>_-1)},[o]),x=b.useCallback(()=>{o_+1)},[o,n.length]),y=o>0,w=ov.jsx(Kj,{children:v.jsx($xe,{...e})}),notFoundComponent:()=>v.jsx(Kj,{children:v.jsx(QO,{})})}),gP=pt({getParentRoute:()=>Sf,path:"auth",loader:async()=>{const e=await mn(()=>import("./no-auth-C6-sACqc.js"),[]);return e.loader?e.loader():null},component:()=>v.jsx("div",{className:"h-full w-full overflow-y-auto overflow-x-hidden",children:v.jsx(YO,{})})}),fle=pt({getParentRoute:()=>gP,path:"login",component:kn(()=>mn(()=>import("./index-maO15O3V.js"),__vite__mapDeps([0,1,2])),"default")}),dle=pt({getParentRoute:()=>gP,path:"register",component:kn(()=>mn(()=>import("./index-B8ZIkEyz.js"),__vite__mapDeps([3,1,2])),"default")}),hle=pt({getParentRoute:()=>Sf,path:"onboarding/verify-email",loader:async()=>{const e=await mn(()=>import("./index-Cbzx2tRp.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13]));return e.loader?e.loader({request:new Request(window.location.href),params:{}}):null},component:kn(()=>mn(()=>import("./index-Cbzx2tRp.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13])),"default")}),ple=pt({getParentRoute:()=>Kl,path:"redeem",component:kn(()=>mn(()=>import("./index--gDRExcs.js"),__vite__mapDeps([14,15,16,17,8,13,18,9])),"default")}),jb=pt({getParentRoute:()=>Kl,path:"organizations/$organization",component:kn(()=>mn(()=>import("./index-DoDygpS4.js"),__vite__mapDeps([19,17,20,12,21])),"default")}),mle=pt({getParentRoute:()=>jb,path:"/",component:kn(()=>mn(()=>import("./index-6bdxZZIJ.js"),__vite__mapDeps([22,23,24,17,7,8,25,20,26,27,28,29,30,31,32,33,18,9])),"default")}),gle=pt({getParentRoute:()=>jb,path:"billing",component:kn(()=>mn(()=>import("./billing-Cllt8jqB.js"),__vite__mapDeps([34,17,29,26,27,24,35,36,11])),"default")}),vle=pt({getParentRoute:()=>jb,path:"settings/billing",loader:({params:e})=>{throw Dn({to:At.organizationBillingRoute.to,params:e})}}),g8=pt({getParentRoute:()=>Kl,path:"tenants",component:kn(()=>mn(()=>import("./index-DoDygpS4.js"),__vite__mapDeps([19,17,20,12,21])),"default")}),yle=pt({getParentRoute:()=>g8,path:"/",component:kn(()=>mn(()=>import("./index-CFQLfotn.js"),__vite__mapDeps([37,23,24,17,7,8,25,20,26,27,28,29,30,31,32,33,18,9])),"default")}),wle=pt({getParentRoute:()=>Kl,path:"organizations/new",component:kn(()=>mn(()=>import("./index-DXK1Y_MW.js"),__vite__mapDeps([38,15,16,17,8,13,32])),"default")}),Kl=pt({getParentRoute:()=>Sf,path:"/",loader:async()=>(await mn(()=>import("./authenticated-Dx4rOWYX.js"),__vite__mapDeps([39,40,16,17,8,32,13,18,28,41,10,27,5,6,7,9,11,12,21,42]))).loader({request:new Request(window.location.href)}),component:kn(()=>mn(()=>import("./authenticated-Dx4rOWYX.js"),__vite__mapDeps([39,40,16,17,8,32,13,18,28,41,10,27,5,6,7,9,11,12,21,42])),"default"),notFoundComponent:()=>v.jsx(QO,{})}),xle=pt({getParentRoute:()=>Kl,path:"onboarding/create-tenant",component:kn(()=>mn(()=>import("./index-pi5SpzWM.js"),__vite__mapDeps([43,40,16,17,8,32,13,42,2])),"default"),loader:async()=>{const[{isCloudEnabled:e},{isControlPlaneEnabled:t}]=await Promise.all([Ds.fetchQuery(DO),IO()]);return Ds.fetchQuery(hL({isCloudEnabled:e,isCloudLoaded:!0,isControlPlaneEnabled:t}))}}),ble=pt({getParentRoute:()=>Kl,path:"onboarding/create-organization",component:kn(()=>mn(()=>import("./index-Bk1maSCV.js"),__vite__mapDeps([44,15,16,17,8,13,42,2])),"default")}),Sle=pt({getParentRoute:()=>Kl,path:"onboarding/no-tenants",component:kn(()=>mn(()=>import("./index-Cav1D8tQ.js"),__vite__mapDeps([45,6,7,8,9])),"default")}),_le=pt({getParentRoute:()=>Kl,path:"onboarding/invites",loader:async()=>{const e=await mn(()=>import("./index-CQOYucXO.js"),__vite__mapDeps([46,41,13,28,10]));return e.loader?e.loader({}):null},component:kn(()=>mn(()=>import("./index-CQOYucXO.js"),__vite__mapDeps([46,41,13,28,10])),"default")}),JZe=pt({getParentRoute:()=>Sf,path:"v1/*",loader:()=>{throw Dn({to:At.authenticatedRoute.to})}});async function v8(e){var o,i;const[{isCloudEnabled:t},{isControlPlaneEnabled:n}]=await Promise.all([Ds.fetchQuery(DO),IO()]);return t?((i=(o=(await Ds.fetchQuery(hL({isCloudEnabled:t,isCloudLoaded:!0,isControlPlaneEnabled:n}))).organizations)==null?void 0:o.find(a=>a.tenants.some(s=>s.id===e)))==null?void 0:i.metadata.id)??null:null}const rn=pt({getParentRoute:()=>Kl,path:"tenants/$tenant",loader:async({params:e})=>{var o;const{isControlPlaneEnabled:t}=await IO(),{data:n}=await(t?Mt.tenantMembershipsList():rt.tenantMembershipsList());if(!!!((o=n.rows)!=null&&o.some(i=>{var a;return((a=i.tenant)==null?void 0:a.metadata.id)===e.tenant})))throw new Response("Forbidden",{status:403,statusText:"Forbidden"});if(t){await Ds.fetchQuery(ZG(e.tenant,()=>Mt.exchangeTokenCreate(e.tenant).then(a=>a.data)));const i=(await rt.tenantGet(e.tenant,{xTenantId:e.tenant})).data;localStorage.setItem(ZK,JSON.stringify(i)),Ds.setQueryData(["tenant:get",e.tenant],i)}else await Ds.fetchQuery({queryKey:["tenant:get",e.tenant],queryFn:async()=>(await rt.tenantGet(e.tenant)).data,retry:!1});return null},component:kn(()=>mn(()=>import("./index-DoDygpS4.js"),__vite__mapDeps([19,17,20,12,21])),"default"),notFoundComponent:()=>v.jsx(QO,{})}),eJe=pt({getParentRoute:()=>rn,path:"/",loader:({params:e})=>{throw Dn({to:At.tenantRunsRoute.to,params:e})}}),Ele=pt({getParentRoute:()=>rn,path:"events",component:kn(()=>mn(()=>Promise.resolve().then(()=>FZe),void 0),"default")}),Cle=pt({getParentRoute:()=>rn,path:"logs",component:kn(()=>mn(()=>import("./index-Cv9GYExf.js"),[]),"default")}),Ole=pt({getParentRoute:()=>rn,path:"filters",component:kn(()=>mn(()=>import("./index-D5hDqXBK.js"),[]),"default")}),Rle=pt({getParentRoute:()=>rn,path:"webhooks",component:kn(()=>mn(()=>import("./index-BsmMkLz7.js"),__vite__mapDeps([47,31,26])),"default")}),Ple=pt({getParentRoute:()=>rn,path:"rate-limits",component:kn(()=>mn(()=>import("./index-BjeCcGOX.js"),__vite__mapDeps([48,36,11])),"default")}),Tle=pt({getParentRoute:()=>rn,path:"scheduled",component:kn(()=>mn(()=>import("./index-jG0QnzWT.js"),__vite__mapDeps([49,29])),"default")}),Ale=pt({getParentRoute:()=>rn,path:"cron-jobs",component:kn(()=>mn(()=>import("./index-BfCF55uu.js"),[]),"default")}),kle=pt({getParentRoute:()=>rn,path:"workflows",component:kn(()=>mn(()=>import("./index-CsdMB0IO.js"),[]),"default")}),Nle=pt({getParentRoute:()=>rn,path:"workflows/$workflow",component:kn(()=>mn(()=>import("./index-D3mkQrYj.js"),__vite__mapDeps([50,29,51])),"default")}),Mle=pt({getParentRoute:()=>rn,path:"overview",component:kn(()=>mn(()=>import("./index-BnRg_ecZ.js"),__vite__mapDeps([52,12,53,13])),"default")}),jle=pt({getParentRoute:()=>rn,path:"runs",component:kn(()=>mn(()=>import("./index-DM7I-Hm9.js"),[]),"default")}),Ile=pt({getParentRoute:()=>rn,path:"runs/$run",component:kn(()=>mn(()=>import("./index-CgbK7Qzb.js"),__vite__mapDeps([54,51,55])),"default")}),Dle=pt({getParentRoute:()=>rn,path:"task-runs/$run",loader:({params:e})=>{throw Dn({to:At.tenantRunRoute.to,params:e})}}),Lle=pt({getParentRoute:()=>rn,path:"workers",component:kn(()=>mn(()=>import("./index-DzA9wyrg.js"),[]),"default")}),$le=pt({getParentRoute:()=>rn,path:"workers/all",loader:({params:e})=>{throw Dn({to:At.tenantWorkersRoute.to,params:e})}}),Fle=pt({getParentRoute:()=>rn,path:"workers/$worker",component:kn(()=>mn(()=>import("./index-CxZ5d6ga.js"),__vite__mapDeps([56,51,57])),"default")}),Ble=pt({getParentRoute:()=>rn,path:"managed-workers",component:kn(()=>mn(()=>import("./index-DK4vQ8G3.js"),__vite__mapDeps([58,59,60,61,62,63])),"default")}),zle=pt({getParentRoute:()=>rn,path:"managed-workers/demo-template",component:kn(()=>mn(()=>import("./index-O5nwRdcL.js"),__vite__mapDeps([64,61,65,25,20,63,33])),"default")}),qle=pt({getParentRoute:()=>rn,path:"managed-workers/create",component:kn(()=>mn(()=>import("./index-Szwct97L.js"),__vite__mapDeps([66,59,60,61,67,25,20,65,9,57])),"default")}),Ule=pt({getParentRoute:()=>rn,path:"managed-workers/$managedWorker",component:kn(()=>mn(()=>import("./index-BhNMQvJK.js"),__vite__mapDeps([68,61,62,63,67,25,20,65,60,9,18,29,51])),"default")}),Vle=pt({getParentRoute:()=>rn,path:"organizations-and-tenants",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOrganizationRoute.to,params:e})}}),y8=pt({getParentRoute:()=>rn,path:"settings/organization",loader:async({params:e})=>{const t=await v8(e.tenant);throw Dn(t?{to:At.organizationsRoute.to,params:{organization:t}}:{to:At.tenantsRoute.to})}}),Wle=pt({getParentRoute:()=>rn,path:"settings",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOverviewRoute.to,params:e})}}),w8=pt({getParentRoute:()=>rn,path:"settings/overview",component:kn(()=>mn(()=>import("./index-CqFaS3ri.js"),__vite__mapDeps([69,24,26])),"default")}),x8=pt({getParentRoute:()=>rn,path:"settings/api-tokens",component:kn(()=>mn(()=>import("./index-CZayBdOE.js"),__vite__mapDeps([70,24,53])),"default")}),b8=pt({getParentRoute:()=>rn,path:"settings/github",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),S8=pt({getParentRoute:()=>rn,path:"settings/members",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOrganizationRoute.to,params:e})}}),_8=pt({getParentRoute:()=>rn,path:"settings/alerting",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),E8=pt({getParentRoute:()=>rn,path:"settings/billing-and-limits",loader:async({params:e})=>{const t=await v8(e.tenant);throw Dn(t?{to:At.organizationBillingRoute.to,params:{organization:t}}:{to:At.tenantSettingsOverviewRoute.to,params:e})}}),C8=pt({getParentRoute:()=>rn,path:"settings/ingestors",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),O8=pt({getParentRoute:()=>rn,path:"settings/integrations",component:kn(()=>mn(()=>import("./index-oGawEXJa.js"),__vite__mapDeps([71,26,24,30,29])),"default")}),tJe=pt({getParentRoute:()=>rn,path:"tenant-settings",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOverviewRoute.to,params:e})}}),nJe=pt({getParentRoute:()=>rn,path:"tenant-settings/overview",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOverviewRoute.to,params:e})}}),rJe=pt({getParentRoute:()=>rn,path:"tenant-settings/api-tokens",loader:({params:e})=>{throw Dn({to:At.tenantSettingsApiTokensRoute.to,params:e})}}),oJe=pt({getParentRoute:()=>rn,path:"tenant-settings/github",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),iJe=pt({getParentRoute:()=>rn,path:"tenant-settings/members",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOrganizationRoute.to,params:e})}}),aJe=pt({getParentRoute:()=>rn,path:"tenant-settings/alerting",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),sJe=pt({getParentRoute:()=>rn,path:"tenant-settings/billing-and-limits",loader:async({params:e})=>{const t=await v8(e.tenant);throw Dn(t?{to:At.organizationBillingRoute.to,params:{organization:t}}:{to:At.tenantSettingsOverviewRoute.to,params:e})}}),Hle=pt({getParentRoute:()=>rn,path:"settings/resource-limits",component:kn(()=>mn(()=>import("./index-liT-riRX.js"),__vite__mapDeps([72,24,35,36,11])),"default")}),lJe=pt({getParentRoute:()=>rn,path:"tenant-settings/ingestors",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),uJe=pt({getParentRoute:()=>rn,path:"tenant-settings/integrations",loader:({params:e})=>{throw Dn({to:At.tenantSettingsIntegrationsRoute.to,params:e})}}),cJe=pt({getParentRoute:()=>rn,path:"tenant-settings/organization",loader:({params:e})=>{throw Dn({to:At.tenantSettingsOrganizationRoute.to,params:e})}}),Gle=pt({getParentRoute:()=>rn,path:"workflow-runs",loader:({params:e})=>{throw Dn({to:At.tenantRunsRoute.to,params:e})}}),Kle=pt({getParentRoute:()=>rn,path:"workflow-runs/$run",loader:({params:e})=>{throw Dn({to:At.tenantRunsRoute.to,params:e})}}),Yle=pt({getParentRoute:()=>rn,path:"tasks",loader:({params:e})=>{throw Dn({to:At.tenantWorkflowsRoute.to,params:e})}}),Xle=pt({getParentRoute:()=>rn,path:"tasks/$workflow",loader:({params:e})=>{throw Dn({to:At.tenantWorkflowRoute.to,params:e})}}),Qle=pt({getParentRoute:()=>Sf,path:"workflow-runs/$run",loader:({location:e,params:t})=>{var o,i;const n=((o=e.search)==null?void 0:o.tenantId)||((i=e.search)==null?void 0:i.tenant),r=t==null?void 0:t.run;throw!n||!r||!QK(r)?Dn({to:At.authenticatedRoute.to}):Dn({to:At.tenantRunRoute.to,params:{tenant:n,run:r}})}}),fJe=pt({getParentRoute:()=>Sf,path:"tenant-settings",loader:({location:e})=>{var n,r;const t=((n=e.search)==null?void 0:n.tenantId)||((r=e.search)==null?void 0:r.tenant);throw Dn(t?{to:At.tenantSettingsOverviewRoute.to,params:{tenant:t}}:{to:At.authenticatedRoute.to})}}),dJe=pt({getParentRoute:()=>Sf,path:"tenant-settings/$",loader:({params:e,location:t})=>{var i,a;const n=((i=t.search)==null?void 0:i.tenantId)||((a=t.search)==null?void 0:a.tenant),r=(e==null?void 0:e._splat)||"",o=[_8.path,x8.path,E8.path,b8.path,C8.path,O8.path,S8.path,y8.path,w8.path].map(s=>s.split("/").pop());throw!n||!r||!o.includes(r)?Dn({to:At.authenticatedRoute.to}):Dn({to:`/tenants/${n}/settings/${r}`})}}),hJe=[Ele,Cle,Ole,Rle,Ple,Tle,Ale,kle,Nle,Mle,jle,Ile,Dle,Lle,$le,Fle,Ble,zle,qle,Ule,Vle,tJe,nJe,rJe,oJe,iJe,aJe,sJe,lJe,uJe,cJe,Wle,w8,x8,b8,S8,_8,E8,Hle,C8,O8,y8,Gle,Kle,Yle,Xle],pJe=Sf.addChildren([gP.addChildren([fle,dle]),hle,Kl.addChildren([xle,ble,Sle,_le,ple,jb.addChildren([mle,gle,vle]),wle,g8.addChildren([yle]),rn.addChildren([eJe,...hJe])]),JZe,Qle,fJe,dJe]),mJe=Y0e({routeTree:pJe,defaultPreload:"intent"}),At={rootRoute:Sf,authRoute:gP,authLoginRoute:fle,authRegisterRoute:dle,onboardingVerifyRoute:hle,redeemOffersRoute:ple,organizationsRoute:jb,organizationsIndexRoute:mle,organizationBillingRoute:gle,organizationSettingsBillingRoute:vle,organizationsNewRoute:wle,tenantsRoute:g8,tenantsIndexRoute:yle,authenticatedRoute:Kl,onboardingCreateTenantRoute:xle,onboardingCreateOrganizationRoute:ble,onboardingNoTenantsRoute:Sle,onboardingInvitesRoute:_le,tenantRoute:rn,tenantEventsRoute:Ele,tenantLogsRoute:Cle,tenantFiltersRoute:Ole,tenantWebhooksRoute:Rle,tenantRateLimitsRoute:Ple,tenantScheduledRoute:Tle,tenantCronJobsRoute:Ale,tenantWorkflowsRoute:kle,tenantWorkflowRoute:Nle,tenantOverviewRoute:Mle,tenantRunsRoute:jle,tenantRunRoute:Ile,tenantTaskRunsRoute:Dle,tenantWorkersRoute:Lle,tenantWorkersAllRoute:$le,tenantWorkerRoute:Fle,tenantManagedWorkersRoute:Ble,tenantManagedWorkersTemplateRoute:zle,tenantManagedWorkersCreateRoute:qle,tenantManagedWorkerRoute:Ule,tenantOrganizationsAndTenantsRoute:Vle,tenantSettingsIndexRoute:Wle,tenantSettingsOverviewRoute:w8,tenantSettingsApiTokensRoute:x8,tenantSettingsGithubRoute:b8,tenantSettingsMembersRoute:S8,tenantSettingsAlertingRoute:_8,tenantSettingsBillingRoute:E8,tenantSettingsResourceLimitsRoute:Hle,tenantSettingsIngestorsRoute:C8,tenantSettingsIntegrationsRoute:O8,tenantSettingsOrganizationRoute:y8,tenantWorkflowRunsRedirectRoute:Gle,tenantWorkflowRunRedirectRoute:Kle,tenantTasksRedirectRoute:Yle,tenantTasksWorkflowRedirectRoute:Xle,workflowRunRedirectRoute:Qle},gJe=()=>v.jsx(Z0e,{router:mJe});var K_={},LG;function vJe(){if(LG)return K_;LG=1;var e=SY();return K_.createRoot=e.createRoot,K_.hydrateRoot=e.hydrateRoot,K_}var yJe=vJe();const wJe=Ln(yJe),xJe=new URLSearchParams(window.location.search),$G=kfe(xJe.get(QG));$G&&localStorage.setItem(QG,$G);wJe.createRoot(document.getElementById("root")).render(v.jsx(Qhe,{client:Ds,children:v.jsx(gJe,{})}));export{Uy as $,xC as A,wt as B,xLe as C,lxe as D,sL as E,gb as F,ec as G,Kbe as H,ri as I,xxe as J,axe as K,is as L,mL as M,In as N,io as O,OJe as P,Cn as Q,J as R,Mte as S,bC as T,fxe as U,Exe as V,yY as W,wY as X,Jw as Y,xY as Z,nb as _,rt as a,wOe as a$,rb as a0,Vy as a1,Ti as a2,Gme as a3,Kme as a4,h$ as a5,CR as a6,p$ as a7,OR as a8,gd as a9,Pm as aA,Xv as aB,Qv as aC,ZJe as aD,QJe as aE,Hs as aF,iR as aG,Ml as aH,Ll as aI,$l as aJ,Fl as aK,Us as aL,o8 as aM,i8 as aN,Tv as aO,s8 as aP,a8 as aQ,SO as aR,HJe as aS,Aa as aT,gw as aU,Qt as aV,xOe as aW,qE as aX,UJ as aY,Eet as aZ,_et as a_,qd as aa,sw as ab,cxe as ac,RX as ad,z3 as ae,jet as af,$et as ag,LL as ah,_L as ai,DL as aj,dR as ak,mw as al,Bet as am,Vet as an,Fet as ao,hJ as ap,set as aq,xet as ar,iet as as,oet as at,aet as au,eQ as av,ret as aw,qxe as ax,EL as ay,LQ as az,At as b,CEe as b$,fb as b0,oOe as b1,Net as b2,lD as b3,mwe as b4,yxe as b5,yw as b6,ww as b7,cf as b8,Ret as b9,pxe as bA,eR as bB,kfe as bC,QG as bD,By as bE,VX as bF,ZK as bG,DO as bH,Sxe as bI,CJ as bJ,PJ as bK,iSe as bL,TJ as bM,AJ as bN,V$ as bO,W$ as bP,roe as bQ,wC as bR,Cr as bS,ooe as bT,NSe as bU,gwe as bV,hye as bW,Ai as bX,vL as bY,p1e as bZ,yet as b_,Pet as ba,s9 as bb,oR as bc,DQ as bd,fL as be,N1e as bf,cet as bg,fet as bh,XO as bi,_3 as bj,hxe as bk,pJ as bl,Oet as bm,uxe as bn,KX as bo,KJe as bp,dxe as bq,Oxe as br,JE as bs,Uw as bt,Sa as bu,_a as bv,wxe as bw,YJe as bx,qp as by,jPe as bz,Mt as c,D4e as c$,OEe as c0,B1e as c1,NEe as c2,het as c3,yC as c4,YX as c5,XX as c6,Ln as c7,Xse as c8,XR as c9,KI as cA,YI as cB,wet as cC,wwe as cD,xwe as cE,Ia as cF,met as cG,vwe as cH,ywe as cI,ySe as cJ,Z1e as cK,ewe as cL,nwe as cM,Dr as cN,LO as cO,gee as cP,FPe as cQ,$L as cR,hwe as cS,pwe as cT,nOe as cU,XI as cV,dwe as cW,fwe as cX,Hc as cY,cwe as cZ,L4e as c_,pQe as ca,t8 as cb,ch as cc,r8 as cd,pP as ce,Om as cf,Rm as cg,Ma as ch,vf as ci,kLe as cj,npe as ck,jX as cl,ket as cm,ioe as cn,ALe as co,TLe as cp,uD as cq,O1e as cr,xAe as cs,tre as ct,Het as cu,SJ as cv,xCe as cw,sle as cx,_1 as cy,Vn as cz,SC as d,kie as d$,Wet as d0,uwe as d1,LLe as d2,swe as d3,lwe as d4,net as d5,GJe as d6,gD as d7,JL as d8,lle as d9,Da as dA,wie as dB,Aie as dC,v7e as dD,b7e as dE,jAe as dF,uZ as dG,$Le as dH,rC as dI,DA as dJ,qt as dK,gY as dL,tet as dM,Det as dN,Iet as dO,H$ as dP,MA as dQ,r0 as dR,w4 as dS,fFe as dT,jFe as dU,SFe as dV,m4 as dW,bie as dX,LFe as dY,Goe as dZ,g8e as d_,Met as da,Sae as db,ih as dc,tqe as dd,RGe as de,n4 as df,GR as dg,oh as dh,xFe as di,wFe as dj,Pb as dk,oc as dl,hFe as dm,yie as dn,RHe as dp,dFe as dq,cFe as dr,sFe as ds,Rb as dt,PFe as du,xf as dv,xie as dw,yFe as dx,hie as dy,_Fe as dz,je as e,aR as e$,t4 as e0,S7e as e1,GFe as e2,i4 as e3,oqe as e4,y7e as e5,YR as e6,c7e as e7,PHe as e8,Uoe as e9,Aet as eA,zet as eB,qet as eC,Uet as eD,Let as eE,db as eF,bY as eG,get as eH,P7 as eI,lR as eJ,qs as eK,gZ as eL,Zt as eM,Bn as eN,vZ as eO,Ze as eP,uR as eQ,ji as eR,fs as eS,ree as eT,BY as eU,gSe as eV,mxe as eW,vxe as eX,det as eY,Pa as eZ,ii as e_,g4 as ea,qR as eb,a4 as ec,IFe as ed,qoe as ee,_7e as ef,uGe as eg,s9e as eh,nqe as ei,Jze as ej,PGe as ek,tVe as el,lKe as em,An as en,dC as eo,pDe as ep,hC as eq,ere as er,$t as es,Lte as et,gL as eu,Tet as ev,BLe as ew,v$ as ex,jDe as ey,CLe as ez,IO as f,$O as f0,TX as f1,NX as f2,D1e as f3,ub as f4,gCe as f5,vCe as f6,hCe as f7,mCe as f8,fCe as f9,Ul as fa,vet as fb,gxe as fc,Cet as fd,eet as fe,QX as ff,bQe as fg,S0e as fh,Dee as fi,Ji as fj,pet as fk,hSe as fl,JJe as fm,gQ as fn,Bl as g,Vl as h,A3 as i,v as j,b as k,ZO as l,JO as m,DX as n,Gy as o,Ir as p,Ds as q,Dn as r,Oo as s,Poe as t,Ooe as u,or as v,Zx as w,dL as x,Iy as y,bAe as z}; diff --git a/hatchetembed/dashboard/assets/index-zTXL414p.js b/hatchetembed/dashboard/assets/index-zTXL414p.js new file mode 100644 index 0000000000..a0cf48d666 --- /dev/null +++ b/hatchetembed/dashboard/assets/index-zTXL414p.js @@ -0,0 +1 @@ +import{k as n,eK as j,j as d,eM as m,eZ as A,eR as O,eP as S,eN as M,e_ as k,eS as L}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="74999dc1-3dbe-4e28-9e49-5231c5abbd9e",e._sentryDebugIdIdentifier="sentry-dbid-74999dc1-3dbe-4e28-9e49-5231c5abbd9e")}catch{}})();var f="Collapsible",[F,q]=L(f),[B,v]=F(f),I=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,open:s,defaultOpen:t,disabled:l,onOpenChange:i,...b}=e,[p,c]=j({prop:s,defaultProp:t??!1,onChange:i,caller:f});return d.jsx(B,{scope:r,disabled:l,contentId:A(),open:p,onOpenToggle:n.useCallback(()=>c(C=>!C),[c]),children:d.jsx(m.div,{"data-state":h(p),"data-disabled":l?"":void 0,...b,ref:o})})});I.displayName=f;var E="CollapsibleTrigger",T=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,...s}=e,t=v(E,r);return d.jsx(m.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":h(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...s,ref:o,onClick:S(e.onClick,t.onOpenToggle)})});T.displayName=E;var y="CollapsibleContent",D=n.forwardRef((e,o)=>{const{forceMount:r,...s}=e,t=v(y,e.__scopeCollapsible);return d.jsx(O,{present:r||t.open,children:({present:l})=>d.jsx(G,{...s,ref:o,present:l})})});D.displayName=y;var G=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,present:s,children:t,...l}=e,i=v(y,r),[b,p]=n.useState(s),c=n.useRef(null),C=M(o,c),R=n.useRef(0),x=R.current,_=n.useRef(0),N=_.current,g=i.open||b,P=n.useRef(g),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>P.current=!1);return()=>cancelAnimationFrame(a)},[]),k(()=>{const a=c.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const w=a.getBoundingClientRect();R.current=w.height,_.current=w.width,P.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(s)}},[i.open,s]),d.jsx(m.div,{"data-state":h(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...l,ref:C,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...e.style},children:g&&t})});function h(e){return e?"open":"closed"}var H=I,K=T,Z=D;export{D as C,H as R,K as T,Z as a,q as c}; diff --git a/hatchetembed/dashboard/assets/invite-modal-DH7a-93Y.js b/hatchetembed/dashboard/assets/invite-modal-DH7a-93Y.js new file mode 100644 index 0000000000..3a28d65b94 --- /dev/null +++ b/hatchetembed/dashboard/assets/invite-modal-DH7a-93Y.js @@ -0,0 +1 @@ +import{m as K,J as V,k as r,l as W,p as H,ar as X,j as e,_ as Z,$ as ee,a0 as Q,a1 as G,bc as q,aM as te,aN as ne,aO as U,aP as I,aQ as se,aR as g,a2 as J,A as ae,d as ce,B as b,aC as re,aG as ie}from"./index-wypz6hY5.js";import{u as oe}from"./use-analytics-BZxgE2Kk.js";import{u as le}from"./tenant-wrapper-DXQKBTdd.js";import{u as de}from"./use-pending-invites-DaP3hNjC.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new c.Error().stack;s&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[s]="654be77d-769a-4d90-9016-955f68f67fc4",c._sentryDebugIdIdentifier="sentry-dbid-654be77d-769a-4d90-9016-955f68f67fc4")}catch{}})();function ue({tenantInvites:c,organizationInvites:s,invalidatePendingInvites:a,onClose:x,onConfirmation:j}){const{invalidate:u}=K(),{acceptOrgInviteMutation:d,rejectOrgInviteMutation:v}=V(),{tenantInviteAcceptMutation:D,tenantInviteRejectMutation:z}=le(),{capture:m}=oe(),[E,o]=r.useState(),[S,T]=r.useState(new Set),[$,F]=r.useState([]),[O,N]=r.useState([]),{handleApiError:p}=W({setErrors:N}),w=r.useRef(new Set),h=r.useRef([]),f=r.useCallback((n,i)=>{c.filter(C=>!n.has(C.metadata.id)).length+s.filter(C=>!n.has(C.metadata.id)).length>0||(a(),i.length>0?j():x())},[c,s,a,x,j]),l=r.useCallback(n=>{const i=new Set([...w.current,n]);return w.current=i,T(i),i},[]),{mutationFn:B}=D(),{mutationFn:Y}=z(),_=H({mutationKey:["invite-modal:tenant:accept"],mutationFn:async n=>(await B({invite:n.inviteId}),{tenantId:n.tenantId,tenantName:n.tenantName}),onSuccess:async({tenantId:n,tenantName:i})=>{await u();const k=[...h.current,{id:n,name:i}];h.current=k,F(k)},onError:p}),A=H({mutationKey:["invite-modal:tenant:reject"],mutationFn:async n=>{await Y({invite:n.inviteId})},onError:p}),R=r.useCallback((n,i,k)=>{N([]),o(n),_.mutate({inviteId:n,tenantId:i,tenantName:k},{onSuccess:()=>{m("onboarding_tenant_invite_accepted",{invite_id:n,tenant_id:i});const C=l(n);a(),f(C,h.current)},onSettled:()=>o(void 0)})},[_,m,l,a,f]),t=r.useCallback(n=>{N([]),o(n),A.mutate({inviteId:n},{onSuccess:()=>{m("onboarding_tenant_invite_rejected",{invite_id:n});const i=l(n);a(),f(i,h.current)},onSettled:()=>o(void 0)})},[A,m,l,a,f]),y=r.useCallback(n=>{N([]),o(n),d.mutate({inviteId:n},{onSuccess:async()=>{await u(),m("onboarding_org_invite_accepted",{invite_id:n});const i=l(n);a(),f(i,h.current)},onError:p,onSettled:()=>o(void 0)})},[d,u,m,l,a,f,p]),L=r.useCallback(n=>{N([]),o(n),v.mutate({inviteId:n},{onSuccess:()=>{m("onboarding_org_invite_rejected",{invite_id:n});const i=l(n);a(),f(i,h.current)},onError:p,onSettled:()=>o(void 0)})},[v,m,l,a,f,p]),M=r.useCallback(()=>{w.current=new Set,h.current=[],o(void 0),T(new Set),F([]),N([])},[]);return{pendingId:E,processedIds:S,acceptedTenantInfos:$,errors:O,handleTenantAccept:R,handleTenantReject:t,handleOrgAccept:y,handleOrgReject:L,reset:M}}function ge({isOpen:c,onClose:s}){var _,A,R;const{pendingInvitesQuery:a,invalidate:x}=de(),{tenantMemberships:j}=K(),{setTenant:u}=X(),[d,v]=r.useState("invites"),D=((_=a.data)==null?void 0:_.tenantInvites)??[],z=((A=a.data)==null?void 0:A.organizationInvites)??[],m=((R=a.data)==null?void 0:R.inviteCount)??0,{pendingId:E,processedIds:o,acceptedTenantInfos:S,errors:T,handleTenantAccept:$,handleTenantReject:F,handleOrgAccept:O,handleOrgReject:N,reset:p}=ue({tenantInvites:D,organizationInvites:z,invalidatePendingInvites:x,onClose:s,onConfirmation:()=>v("confirmation")});r.useEffect(()=>{c||(x(),v("invites"),p())},[c,x,p]),r.useEffect(()=>{c&&d==="invites"&&a.isSuccess&&m===0&&o.size===0&&s()},[c,d,a.isSuccess,m,o.size,s]);const w=D.filter(t=>!o.has(t.metadata.id)),h=z.filter(t=>!o.has(t.metadata.id)),f=r.useMemo(()=>S.map(t=>{var y;return{info:t,tenant:(y=j==null?void 0:j.find(L=>{var M;return((M=L.tenant)==null?void 0:M.metadata.id)===t.id}))==null?void 0:y.tenant}}).filter(t=>!!t.tenant),[S,j]),l=w.length+h.length,B=l>1?`${l} pending invites`:w[0]?`Join ${w[0].tenantName??"a tenant"}`:h[0]?`Join ${h[0].organizationName??"an organization"}`:"Pending invite",Y=c&&d==="invites"&&a.isSuccess&&m===0&&o.size===0;return e.jsx(Z,{open:c,onOpenChange:t=>{t||s()},children:e.jsx(ee,{className:"max-w-2xl",onOpenAutoFocus:t=>t.preventDefault(),children:!Y&&e.jsxs(e.Fragment,{children:[d==="invites"?e.jsxs(e.Fragment,{children:[e.jsxs(Q,{children:[e.jsx(G,{children:B}),e.jsx(q,{children:l===1?"Accept or decline the invite below.":`You have ${l} pending invite${l!==1?"s":""}.`})]}),e.jsxs(te,{children:[e.jsx(ne,{children:e.jsxs(U,{children:[e.jsx(I,{className:"w-16",children:"Type"}),e.jsx(I,{children:"Name"}),e.jsx(I,{className:"w-24",children:"Role"}),e.jsx(I,{className:"w-44",children:"From"}),e.jsx(I,{className:"w-20 text-right"})]})}),e.jsxs(se,{children:[w.map(t=>e.jsxs(U,{children:[e.jsx(g,{children:e.jsx(J,{variant:"secondary",className:"text-xs font-normal",children:"Tenant"})}),e.jsx(g,{className:"font-medium",children:t.tenantName??"—"}),e.jsx(g,{className:"capitalize text-muted-foreground",children:t.role.toLowerCase()}),e.jsx(g,{className:"max-w-[176px] truncate text-xs text-muted-foreground",title:t.email,children:t.email}),e.jsx(g,{className:"text-right",children:e.jsx(P,{disabled:E===t.metadata.id,onAccept:()=>$(t.metadata.id,t.tenantId,t.tenantName??""),onDecline:()=>F(t.metadata.id)})})]},t.metadata.id)),h.map(t=>e.jsxs(U,{children:[e.jsx(g,{children:e.jsx(J,{variant:"secondary",className:"text-xs font-normal",children:"Org"})}),e.jsx(g,{className:"font-medium",children:t.organizationName??"—"}),e.jsx(g,{className:"capitalize text-muted-foreground",children:t.role.toLowerCase()}),e.jsx(g,{className:"max-w-[176px] truncate text-xs text-muted-foreground",title:t.inviterEmail,children:t.inviterEmail}),e.jsx(g,{className:"text-right",children:e.jsx(P,{disabled:E===t.metadata.id,onAccept:()=>O(t.metadata.id),onDecline:()=>N(t.metadata.id)})})]},t.metadata.id))]})]})]}):e.jsx(me,{acceptedTenantInfos:S,acceptedTenants:f,onSwitch:t=>{u(t),s()},onClose:s}),T.length>0&&e.jsx(ae,{variant:"destructive",children:e.jsx(ce,{children:T.map((t,y)=>e.jsx("p",{children:t},y))})})]})})})}function me({acceptedTenantInfos:c,acceptedTenants:s,onSwitch:a,onClose:x}){const j=c.length>0&&s.length===0,u=s.length>0;return e.jsxs(e.Fragment,{children:[e.jsxs(Q,{children:[e.jsx(G,{children:"You're all set!"}),e.jsx(q,{children:!u&&!j?"Your invites have been processed.":u&&s.length===1?`You joined ${s[0].info.name}. Switch to it now?`:u?`You joined ${s.length} new tenants. Select one to switch to.`:"Processing…"})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[!u&&!j&&e.jsx("div",{className:"flex justify-end",children:e.jsx(b,{onClick:x,children:"Done"})}),j&&e.jsxs(e.Fragment,{children:[c.map(d=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx(b,{size:"sm",disabled:!0,children:"Loading…"})]},d.id)),e.jsx("div",{className:"flex justify-end",children:e.jsx(b,{variant:"outline",onClick:x,children:"Maybe later"})})]}),u&&s.length===1&&e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(b,{variant:"outline",onClick:x,children:"Maybe later"}),e.jsxs(b,{onClick:()=>a(s[0].tenant),children:["Switch to ",s[0].info.name]})]}),u&&s.length>1&&e.jsxs(e.Fragment,{children:[s.map(({info:d,tenant:v})=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx(b,{size:"sm",onClick:()=>a(v),children:"Switch"})]},d.id)),e.jsx("div",{className:"flex justify-end",children:e.jsx(b,{variant:"outline",onClick:x,children:"Maybe later"})})]})]})]})}function P({disabled:c,onAccept:s,onDecline:a}){return e.jsxs("div",{className:"flex justify-end gap-1",children:[e.jsx(b,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",disabled:c,onClick:a,hoverText:"Decline","aria-label":"Decline",children:e.jsx(re,{className:"h-4 w-4"})}),e.jsx(b,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-green-500",disabled:c,onClick:s,hoverText:"Accept","aria-label":"Accept",children:e.jsx(ie,{className:"h-4 w-4"})})]})}export{ge as I}; diff --git a/hatchetembed/dashboard/assets/managed-compute-cM-46wXY.js b/hatchetembed/dashboard/assets/managed-compute-cM-46wXY.js new file mode 100644 index 0000000000..2702fcb748 --- /dev/null +++ b/hatchetembed/dashboard/assets/managed-compute-cM-46wXY.js @@ -0,0 +1 @@ +import{k as l}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7e5bfe25-ad4d-425c-bfb5-b9cf2b159333",e._sentryDebugIdIdentifier="sentry-dbid-7e5bfe25-ad4d-425c-bfb5-b9cf2b159333")}catch{}})();function E({title:e,titleId:r,...a},t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},a),e?l.createElement("title",{id:r},e):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"}))}const g=l.forwardRef(E);var n=(e=>(e.BILLING_REQUIRED="BILLING_REQUIRED",e.UPGRADE_REQUIRED="UPGRADE_REQUIRED",e))(n||{});const i={free:1,starter:2,growth:5,enterprise:5},s={free:2,starter:5,growth:20,enterprise:20},R={create:()=>e=>{var a,t;return((a=e.meta)==null?void 0:a.requireBillingForManagedCompute)&&!((t=e.billing)!=null&&t.hasPaymentMethods)?[!1,n.BILLING_REQUIRED]:[!0,void 0]},canCreateWorkerPool:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan;let t;switch(a){case"free":t=i.free;break;case"starter":t=i.starter;break;case"growth":t=i.growth;break;default:t=i.enterprise}return e>=t?[!1,n.UPGRADE_REQUIRED]:[!0,void 0]},maxReplicas:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan;let t;switch(a){case"free":t=s.free;break;case"starter":t=s.starter;break;case"growth":t=s.growth;break;default:t=s.enterprise}return e>t?[!1,n.UPGRADE_REQUIRED]:[!0,void 0]},canUseGpu:e=>r=>{if(!r.billing)return[!0,void 0];if(!e.gpuKind||!e.gpus||e.gpus===0)return[!0,void 0];switch(r.billing.plan){case"free":case"starter":return[!1,n.UPGRADE_REQUIRED];case"growth":return[!0,void 0];default:return[!0,void 0]}},selectCompute:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan,{cpuKind:t,cpus:o,memoryMb:u,gpuKind:f,gpus:d}=e;if(f||d){const[c,p]=R.canUseGpu({gpuKind:f,gpus:d})(r);if(!c)return[!1,p]}switch(a){case"free":if(t!=="shared")return[!1,n.UPGRADE_REQUIRED];if(o!==1)return[!1,n.UPGRADE_REQUIRED];if(u>1024)return[!1,n.UPGRADE_REQUIRED];break;case"starter":if(o>4)return[!1,n.UPGRADE_REQUIRED];if(u>4096)return[!1,n.UPGRADE_REQUIRED];break}return[!0,void 0]}};export{g as F,n as R,R as m}; diff --git a/hatchetembed/dashboard/assets/managed-workers-gate-DSQbhr0o.js b/hatchetembed/dashboard/assets/managed-workers-gate-DSQbhr0o.js new file mode 100644 index 0000000000..9e89a5f12b --- /dev/null +++ b/hatchetembed/dashboard/assets/managed-workers-gate-DSQbhr0o.js @@ -0,0 +1,16 @@ +import{v as s,aF as u,b as y,ae as b,j as e,f0 as i,B as t,f2 as d}from"./index-wypz6hY5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="c94ac337-b2ab-4002-ae1c-2d351b6290dc",a._sentryDebugIdIdentifier="sentry-dbid-c94ac337-b2ab-4002-ae1c-2d351b6290dc")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],h=s("cloud",f);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],p=s("life-buoy",m);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],x=s("mail",k);function w({children:a}){const n=u({from:y.tenantRoute.to}),{cloud:r,featureFlags:o,isCloudEnabled:c}=b(n.tenant),l=(o==null?void 0:o["managed-worker"])==="true";return c&&!r?null:l?e.jsx(e.Fragment,{children:a}):c?e.jsx(i,{icon:e.jsx(p,{className:"h-5 w-5"}),title:"Managed Workers not enabled",description:"Managed Workers aren't enabled for your tenant. Contact support for more information.",actions:e.jsxs(e.Fragment,{children:[e.jsx(t,{leftIcon:e.jsx(x,{className:"h-4 w-4"}),onClick:()=>window.open("mailto:support@hatchet.run","_blank"),children:"Contact us"}),e.jsx(t,{leftIcon:e.jsx(d,{className:"h-4 w-4"}),variant:"outline",onClick:()=>window.history.back(),children:"Go back"})]})}):e.jsx(i,{icon:e.jsx(h,{className:"h-5 w-5"}),title:"Managed Workers are not available",description:"Managed Workers are only available in Hatchet Cloud.",actions:e.jsx(t,{leftIcon:e.jsx(d,{className:"h-4 w-4"}),variant:"outline",onClick:()=>window.history.back(),children:"Go back"})})}export{w as M}; diff --git a/hatchetembed/dashboard/assets/new-organization-saver-form-Uz97g08A.js b/hatchetembed/dashboard/assets/new-organization-saver-form-Uz97g08A.js new file mode 100644 index 0000000000..0ea3f9fa66 --- /dev/null +++ b/hatchetembed/dashboard/assets/new-organization-saver-form-Uz97g08A.js @@ -0,0 +1 @@ +import{k as g,j as e,L as h,I as x,B as N,c3 as E,m as b,y as w,b5 as C,N as I,bS as F,l as O,p as _}from"./index-wypz6hY5.js";import{R as A,W as k,a as D,g as M}from"./welcome-modal-state-B1mOgpQO.js";import{s as R}from"./shard-deployment-key-CJfQX3l3.js";import{u as T}from"./use-analytics-BZxgE2Kk.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="341e542d-86ba-4a98-929c-43f4d8d955ad",n._sentryDebugIdIdentifier="sentry-dbid-341e542d-86ba-4a98-929c-43f4d8d955ad")}catch{}})();function L({defaultOrganizationName:n="",defaultTenantName:i="",onSubmit:l,isSaving:s,showRegionSelect:d=!1,availableShards:t=[],isShardsLoading:o=!1}){const[a,u]=g.useState(n),[r,p]=g.useState(i),[f,j]=g.useState(),y=g.useMemo(()=>t.map(R),[t]),c=f&&y.includes(f)?f:y[0],z=g.useCallback(m=>{m.preventDefault(),l({organizationName:a,tenantName:r,...d&&c?{region:c}:{}})},[a,r,l,d,c]),v=d&&(o||t.length===0||t.length>0&&!c);return e.jsxs("form",{onSubmit:z,className:"grid gap-6 max-w-lg w-full",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(h,{htmlFor:"organization-name",children:"Organization Name"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your company or team name. Used for billing and grouping your tenants together."}),e.jsx(x,{id:"organization-name",placeholder:"Acme Inc.",type:"text",autoCapitalize:"none",autoCorrect:"off",autoFocus:!0,spellCheck:!1,value:a,onChange:m=>u(m.target.value),disabled:s,required:!0})]}),d&&(o||t.length>0)&&e.jsx(A,{shards:t,value:c,onValueChange:j,isLoading:o}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(h,{htmlFor:"tenant-name",children:"Name of First Tenant"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["An isolated environment for your tasks, workflows, workers, and events.",e.jsx("br",{}),"Most teams start with development and add a tenant for each engineer, staging, or production environment later."]}),e.jsx(x,{id:"tenant-name",placeholder:"development",type:"text",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:r,onChange:m=>p(m.target.value),disabled:s,required:!0})]}),e.jsxs(N,{type:"submit",className:"w-full",disabled:s||v,children:[s?"Getting started...":"Get started",!s&&e.jsx(E,{className:"ml-2 size-4"})]})]})}const U=({afterSave:n})=>{const{invalidate:i}=b(),{isControlPlaneEnabled:l}=w(),{capture:s}=T(),{handleApiError:d}=O(),t=C();return _({mutationFn:async({organizationName:o,tenantName:a,region:u})=>{const r=await t.organizationCreateMutation().mutationFn({name:o}),p=await t.organizationCreateTenantMutation(r.metadata.id).mutationFn({name:a,slug:M(a),...l&&u?{region:u}:{}});return{organization:r,tenant:p}},onSuccess:async o=>{await i(),await new Promise(a=>setTimeout(a,0)),localStorage.setItem(k,D.OrganizationCreated),s("onboarding_tenant_created",{tenant_type:"cloud",is_cloud:!0}),n(o)},onError:d})};function Q({defaultOrganizationName:n,defaultTenantName:i,afterSave:l}){var r;const{isLoaded:s,isCloudEnabled:d}=b(),{isControlPlaneEnabled:t}=w(),o=C(),a=I({...o.sharedShardsQuery(),enabled:t}),u=U({afterSave:l});return s?(F(d),e.jsx(L,{defaultOrganizationName:n,defaultTenantName:i,isSaving:u.isPending,onSubmit:u.mutate,showRegionSelect:t,availableShards:(r=a.data)==null?void 0:r.rows,isShardsLoading:a.isLoading})):e.jsx(e.Fragment,{})}export{Q as N}; diff --git a/hatchetembed/dashboard/assets/new-tenant-saver-form-CeUxqioj.js b/hatchetembed/dashboard/assets/new-tenant-saver-form-CeUxqioj.js new file mode 100644 index 0000000000..1dc185e8bd --- /dev/null +++ b/hatchetembed/dashboard/assets/new-tenant-saver-form-CeUxqioj.js @@ -0,0 +1 @@ +import{k as f,j as e,L as C,I,a5 as R,a6 as _,a7 as k,a8 as z,a9 as L,B as D,bS as E,m as O,y as M,N as B,l as W,b5 as Q,p as Y,a as $,c as H}from"./index-wypz6hY5.js";import{R as J,W as X,a as Z,g as ee}from"./welcome-modal-state-B1mOgpQO.js";import{s as te}from"./shard-deployment-key-CJfQX3l3.js";import{F as ne}from"./XMarkIcon-BazlLPpF.js";import{u as ae}from"./use-analytics-BZxgE2Kk.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="62de3378-844b-4d55-bfae-150fc6835760",o._sentryDebugIdIdentifier="sentry-dbid-62de3378-844b-4d55-bfae-150fc6835760")}catch{}})();function se({organizations:o,organizationId:n,setOrganizationId:l,isSaving:c,shouldFocusOrganization:r}){return e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{htmlFor:"organization-select",children:"Organization"}),e.jsxs(R,{name:"organizationId",value:n,onValueChange:l,disabled:c,required:!0,children:[e.jsx(_,{id:"organization-select",autoFocus:r,children:e.jsx(k,{placeholder:"Select an organization"})}),e.jsx(z,{children:o.map(i=>e.jsx(L,{value:i.metadata.id,children:i.name},i.metadata.id))})]})]})}function A({defaultTenantName:o="",isSaving:n=!1,isCloudEnabled:l,organizations:c=null,organizationId:r,onOrganizationIdChange:i,onSubmit:h,showRegionSelect:s=!1,availableShards:a=[],isShardsLoading:u=!1,showTagsInput:m=!1,allTenantTags:d=[]}){const[p,P]=f.useState(o),[j,U]=f.useState(),[g,N]=f.useState([]),[y,T]=f.useState(""),S=f.useMemo(()=>a.map(te),[a]),b=j&&S.includes(j)?j:S[0],v=f.useCallback(t=>{const x=t.trim();x&&!g.includes(x)&&N(w=>[...w,x]),T("")},[g]),K=t=>N(x=>x.filter(w=>w!==t)),V=t=>{t.key==="Enter"&&(t.preventDefault(),v(y))},q=t=>{t.preventDefault(),l?(E(r),h({tenantName:p,organizationId:r,...s&&b?{region:b}:{},...m&&g.length>0?{tags:g}:{}})):h({tenantName:p})},F=l&&!r,G=s&&(u||a.length===0||a.length>0&&!b);return e.jsxs("form",{onSubmit:q,className:"grid gap-6 max-w-lg w-full",children:[l&&c&&e.jsx(se,{organizations:c,organizationId:r,setOrganizationId:i,isSaving:n,shouldFocusOrganization:F}),l&&s&&(u||a.length>0)&&e.jsx(J,{shards:a,value:b,onValueChange:U,isLoading:u}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{htmlFor:"tenant-name",children:"Tenant Name"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"An isolated environment for your workflows, workers, and events. Most teams start with dev and add staging or production later."}),e.jsx(I,{id:"tenant-name",placeholder:"production",type:"text",autoCapitalize:"none",autoCorrect:"off",autoFocus:!F,spellCheck:!1,value:p,onChange:t=>P(t.target.value),disabled:n,required:!0})]}),m&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{children:"Tags (optional)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Users in user groups which match these tags automatically get access to this tenant."}),g.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[t,e.jsx("button",{type:"button",onClick:()=>K(t),disabled:n,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${t}`,children:e.jsx(ne,{className:"size-3.5"})})]},t))}),d.filter(t=>!g.includes(t)).length>0&&e.jsxs(R,{onValueChange:v,disabled:n,value:"",children:[e.jsx(_,{children:e.jsx(k,{placeholder:"Add an existing tag…"})}),e.jsx(z,{children:d.filter(t=>!g.includes(t)).map(t=>e.jsx(L,{value:t,children:t},t))})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"tenant-tags",placeholder:"New tag...",type:"text",value:y,onChange:t=>T(t.target.value),onKeyDown:V,disabled:n,autoComplete:"off"}),e.jsx(D,{type:"button",variant:"outline",onClick:()=>v(y),disabled:n||!y.trim(),children:"Add"})]})]}),e.jsx(D,{type:"submit",className:"w-full",disabled:n||G,children:n?"Getting started...":"Get started"})]})}const oe=({afterSave:o})=>{const{isCloudEnabled:n,invalidate:l}=O(),{isControlPlaneEnabled:c}=M(),{capture:r}=ae(),{handleApiError:i}=W(),h=Q();return Y({mutationFn:async({tenantName:s,organizationId:a,region:u,tags:m})=>{const d=ee(s);if(n)return E(a),{type:"cloud",tenant:await h.organizationCreateTenantMutation(a).mutationFn({name:s,slug:d,...c&&u?{region:u}:{},...c&&m&&m.length>0?{tags:m}:{}}),organizationId:a};{const{data:p}=await $.tenantCreate({name:s,slug:d});return{type:"regular",tenant:p}}},onSuccess:async s=>{await l(),await new Promise(a=>setTimeout(a,0)),s.type==="cloud"&&localStorage.setItem(X,Z.TenantCreated),r("onboarding_tenant_created",{tenant_type:s.type,is_cloud:s.type==="cloud"}),o(s)},onError:i})};function ue({defaultTenantName:o,defaultOrganizationId:n,allTenantTags:l,afterSave:c}){var p;const{isCloudEnabled:r,organizations:i,isLoaded:h}=O(),{isControlPlaneEnabled:s}=M(),[a,u]=f.useState(n);f.useEffect(()=>{u(n)},[n]);const m=B({queryKey:["organization:available-shards",a??""],queryFn:async()=>(await H.organizationListAvailableShards(a)).data,enabled:!!(r&&s&&a)}),d=oe({afterSave:c});return h?(E(!r||i),r?e.jsx(A,{defaultTenantName:o,isSaving:d.isPending,isCloudEnabled:!0,organizations:i,organizationId:a,onOrganizationIdChange:u,showRegionSelect:s,showTagsInput:s,allTenantTags:l,availableShards:(p=m.data)==null?void 0:p.rows,isShardsLoading:m.isLoading,onSubmit:d.mutate}):e.jsx(A,{defaultTenantName:o,isSaving:d.isPending,isCloudEnabled:!1,onSubmit:d.mutate})):e.jsx(e.Fragment,{})}export{ue as N}; diff --git a/hatchetembed/dashboard/assets/no-auth-C6-sACqc.js b/hatchetembed/dashboard/assets/no-auth-C6-sACqc.js new file mode 100644 index 0000000000..d33a1957f7 --- /dev/null +++ b/hatchetembed/dashboard/assets/no-auth-C6-sACqc.js @@ -0,0 +1 @@ +import{f as a,q as s,c as n,a as o,r as i,b as u,i as f}from"./index-wypz6hY5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9938abb6-34d6-4faa-a400-052e4ff8399c",t._sentryDebugIdIdentifier="sentry-dbid-9938abb6-34d6-4faa-a400-052e4ff8399c")}catch{}})();const d=async()=>{var t;try{const{isControlPlaneEnabled:e}=await a();if(await s.fetchQuery({queryKey:["user:get"],queryFn:async()=>(await(e?n.cloudUserGetCurrent():o.userGetCurrent())).data}))throw i({to:u.authenticatedRoute.to})}catch(e){if(e instanceof Response)throw e;if(f(e)){if(((t=e.response)==null?void 0:t.status)===403)return;throw e}}};async function c(){return await d(),null}export{c as loader}; diff --git a/hatchetembed/dashboard/assets/organization-selector-BF1UJlxh.js b/hatchetembed/dashboard/assets/organization-selector-BF1UJlxh.js new file mode 100644 index 0000000000..c615533883 --- /dev/null +++ b/hatchetembed/dashboard/assets/organization-selector-BF1UJlxh.js @@ -0,0 +1 @@ +import{k as u,h as W,bE as Z,ar as P,J as A,j as e,aI as Q,bJ as q,bK as H,B as z,bI as $,bL as V,e as M,bN as X,bO as Y,bP as ee,bQ as ae,c4 as D,g as te,b as B,bR as R,c5 as ne,c6 as se,aJ as oe,aK as re,aL as ie,br as le,bS as de}from"./index-wypz6hY5.js";import{T as U,g as ce}from"./global-emitter-Y_aFw8Zc.js";import{F as _}from"./PlusIcon-Cn-pCVk3.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="91363239-a55d-4372-ad51-e2a072af12bc",n._sentryDebugIdIdentifier="sentry-dbid-91363239-a55d-4372-ad51-e2a072af12bc")}catch{}})();function ge({title:n,titleId:o,...f},h){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:h,"aria-labelledby":o},f),n?u.createElement("title",{id:o},n):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const me=u.forwardRef(ge);function F({organization:n,tenants:o,currentTenant:f,isExpanded:h,onToggleExpand:O,onTenantSelect:v,onClose:s,onNavigate:p}){const{setTenant:j}=P(),w=u.useMemo(()=>{var a;return(a=[...o].sort((i,l)=>{var d,c,g,b;return((b=(d=i.tenant)==null?void 0:d.name)==null?void 0:b.toLowerCase().localeCompare(((g=(c=l.tenant)==null?void 0:c.name)==null?void 0:g.toLowerCase())??""))??0}).find(i=>i.tenant))==null?void 0:a.tenant},[o]),T=a=>{a.preventDefault(),a.stopPropagation(),s(),w&&j(w,{navigate:!1}),p({to:B.organizationsIndexRoute.to,params:{organization:n.metadata.id}})},x=a=>{a.preventDefault(),a.stopPropagation(),s(),ce.emit("create-new-tenant",{defaultOrganizationId:n.metadata.id})};return e.jsxs(e.Fragment,{children:[e.jsx(R,{onSelect:O,value:`org-${n.metadata.id}`,className:"cursor-pointer text-sm hover:bg-accent focus:bg-accent",children:e.jsxs("div",{className:"flex w-full items-start justify-between",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-2",children:[e.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[h?e.jsx(ne,{className:"size-3"}):e.jsx(se,{className:"size-3"}),e.jsx($,{className:"size-4"})]}),e.jsx("span",{className:"break-words font-medium leading-tight",children:n.name})]}),n.isOwner&&e.jsxs("div",{className:"ml-2 flex flex-shrink-0 items-center gap-1",children:[e.jsx(z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-accent-foreground/10",onClick:x,title:"New Tenant",children:e.jsx(_,{className:"size-3"})}),e.jsx(z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-accent-foreground/10",onClick:T,title:"Settings",children:e.jsx(me,{className:"size-3"})})]})]})}),h&&o.sort((a,i)=>{var l,d,c,g;return((g=(l=a.tenant)==null?void 0:l.name)==null?void 0:g.toLowerCase().localeCompare(((c=(d=i.tenant)==null?void 0:d.name)==null?void 0:c.toLowerCase())??""))??0}).map(a=>{var i,l,d,c,g;return e.jsx(R,{value:`tenant-${(i=a.tenant)==null?void 0:i.metadata.id}`,onSelect:()=>{de(a.tenant),v(a.tenant),s()},className:"cursor-pointer pl-6 text-sm hover:bg-accent focus:bg-accent",children:e.jsxs("div",{className:"flex w-full min-w-0 items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"})}),e.jsxs(oe,{children:[e.jsx(re,{asChild:!0,children:e.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-muted-foreground",children:(l=a.tenant)==null?void 0:l.name})}),e.jsx(ie,{side:"right",className:"max-w-[min(24rem,calc(100vw-2rem))] break-words",children:(d=a.tenant)==null?void 0:d.name})]}),e.jsx(U,{region:(c=a.tenant)==null?void 0:c.region})]}),e.jsx(le,{className:M("size-4 shrink-0",(f==null?void 0:f.slug)===((g=a.tenant)==null?void 0:g.slug)?"opacity-100":"opacity-0")})]})},a.metadata.id)})]})}function he({className:n,memberships:o}){const f=W(),h=Z(),{setTenant:O,isUserUniverseLoaded:v,tenant:s}=P(),[p,j]=u.useState(!1),[w,T]=u.useState([]),{organizations:x,getOrganizationForTenant:a,isTenantArchivedInOrg:i,isUserUniverseLoaded:l}=A(),d=()=>j(!1),c=t=>{t.to&&(sessionStorage.setItem("orgSettingsPreviousPath",h.pathname),f({to:t.to,params:t.params,replace:!1}))},g=t=>{O(t)},b=t=>{T(r=>r.includes(t)?r.filter(k=>k!==t):[...r,t])},{currentOrgData:N,otherOrgsData:L}=u.useMemo(()=>{const t=new Map;o.forEach(m=>{var I;const C=((I=m.tenant)==null?void 0:I.metadata.id)||"";if(i(C))return;const S=a(C);if(S){const y=S.metadata.id;t.has(y)||t.set(y,[]),t.get(y).push(m)}});const r=s?a(s.metadata.id):null,k=r?t.get(r.metadata.id)||[]:[],K=x.filter(m=>m.metadata.id!==(r==null?void 0:r.metadata.id)).map(m=>({organization:m,tenants:t.get(m.metadata.id)||[]})).sort((m,C)=>m.organization.name.toLowerCase().localeCompare(C.organization.name.toLowerCase()));return{currentOrgData:r?{organization:r,tenants:k}:null,otherOrgsData:K}},[o,s,a,x,i]),E=o.length===0&&x.length>0,J=!v||!l||o.length===0&&x.length===0,G=E?x.length===1?x[0].name:"Select organization":(s==null?void 0:s.name)??"Loading tenant…";return e.jsx(Q,{delayDuration:200,children:e.jsxs(q,{open:p,onOpenChange:j,children:[e.jsx(H,{asChild:!0,children:e.jsxs(z,{variant:"outline",size:"sm",role:"combobox","aria-expanded":p,"aria-label":"Select a tenant",className:M("w-full min-w-0 justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",p&&"bg-muted/30",n),disabled:J,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx($,{className:"size-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:G}),!E&&e.jsx(U,{region:s==null?void 0:s.region})]}),(!v||!l)&&!p?e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground/70"}):e.jsx(V,{className:"size-4 shrink-0 opacity-50"})]})}),e.jsx(X,{side:"bottom",align:"start",sideOffset:8,className:"w-[287px] rounded-md border border-border p-0 shadow-md",children:e.jsx(Y,{className:"border-0",children:e.jsxs(ee,{children:[e.jsx(ae,{children:"No tenants found."}),!l&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground",children:[e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground/70"}),"Loading organizations…"]}),N&&e.jsxs(D,{heading:"Current Organization",children:[e.jsx(F,{organization:N.organization,tenants:N.tenants,currentTenant:s,isExpanded:w.includes(N.organization.metadata.id),onToggleExpand:()=>b(N.organization.metadata.id),onTenantSelect:g,onClose:d,onNavigate:c}),e.jsx("div",{className:"px-2 py-1",children:e.jsx(z,{variant:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(_,{className:"size-4"}),asChild:!0,children:e.jsx(te,{to:B.organizationsNewRoute.to,onClick:()=>j(!1),children:"Create Organization"})})})]}),L.length>0&&e.jsx(D,{heading:"Other Organizations",children:L.map(({organization:t,tenants:r})=>e.jsx(F,{organization:t,tenants:r,currentTenant:s,isExpanded:w.includes(t.metadata.id),onToggleExpand:()=>b(t.metadata.id),onTenantSelect:g,onClose:d,onNavigate:c},t.metadata.id))})]})})})]})})}export{he as O}; diff --git a/hatchetembed/dashboard/assets/outlet-C0gyZt4v.js b/hatchetembed/dashboard/assets/outlet-C0gyZt4v.js new file mode 100644 index 0000000000..3caa8b2356 --- /dev/null +++ b/hatchetembed/dashboard/assets/outlet-C0gyZt4v.js @@ -0,0 +1 @@ +import{aD as n}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2a3b87da-335f-43db-a512-d3a5c65ce19f",e._sentryDebugIdIdentifier="sentry-dbid-2a3b87da-335f-43db-a512-d3a5c65ce19f")}catch{}})();const o=e=>({...n(),...e});export{o as u}; diff --git a/hatchetembed/dashboard/assets/redirect-DImNvkP_.js b/hatchetembed/dashboard/assets/redirect-DImNvkP_.js new file mode 100644 index 0000000000..6e6c445116 --- /dev/null +++ b/hatchetembed/dashboard/assets/redirect-DImNvkP_.js @@ -0,0 +1 @@ +import{h as n,k as o}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0021e538-49bf-41bb-9dcc-cbe849c3465e",e._sentryDebugIdIdentifier="sentry-dbid-0021e538-49bf-41bb-9dcc-cbe849c3465e")}catch{}})();const r="hatchet:redirect_target";function c(){const e=n();return o.useCallback(t=>{const s=sessionStorage.getItem(r);s?(sessionStorage.removeItem(r),e({to:s,replace:!0})):e(t)},[e])}export{r as R,c as u}; diff --git a/hatchetembed/dashboard/assets/resource-limit-columns-7zhUq4Ly.js b/hatchetembed/dashboard/assets/resource-limit-columns-7zhUq4Ly.js new file mode 100644 index 0000000000..c803c92419 --- /dev/null +++ b/hatchetembed/dashboard/assets/resource-limit-columns-7zhUq4Ly.js @@ -0,0 +1 @@ +import{k as t,j as a,aH as u,e as d,bV as r}from"./index-wypz6hY5.js";import{g as c}from"./resource-limit-status-ynncxZIe.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0d001ef6-bc17-4eaf-8c71-4f2295630028",e._sentryDebugIdIdentifier="sentry-dbid-0d001ef6-bc17-4eaf-8c71-4f2295630028")}catch{}})();const i={[r.WORKER]:"Total Workers",[r.WORKER_SLOT]:"Concurrency Slots",[r.EVENT]:"Events",[r.TASK_RUN]:"Task Runs",[r.CRON]:"Cron Triggers",[r.SCHEDULE]:"Schedule Triggers",[r.INCOMING_WEBHOOK]:"Incoming Webhooks"},m={ok:"border-transparent rounded-full bg-green-500",warn:"border-transparent rounded-full bg-yellow-500",exhausted:"border-transparent rounded-full bg-red-500"};function f({value:e,alarmValue:n,limitValue:l}){const o=c({value:e,alarmValue:n,limitValue:l});return a.jsx("div",{className:d(m[o],"h-[6px] w-[6px] rounded-full")})}const s={"24h0m0s":"Daily","168h0m0s":"Weekly","720h0m0s":"Monthly"};function g(){return t.useMemo(()=>[{columnLabel:"Resource",cellRenderer:e=>a.jsxs("div",{className:"flex flex-row items-center gap-3",children:[a.jsx(f,{value:e.value,alarmValue:e.alarmValue,limitValue:e.limitValue}),a.jsx("span",{className:"font-medium text-foreground",children:i[e.resource]})]})},{columnLabel:"Current Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.value})},{columnLabel:"Limit Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.limitValue})},{columnLabel:"Alarm Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.alarmValue||"N/A"})},{columnLabel:"Meter Window",cellRenderer:e=>(e.window||"-")in s?s[e.window||"-"]:e.window},{columnLabel:"Last Refill",cellRenderer:e=>e.window?e.lastRefill&&a.jsx(u,{date:e.lastRefill}):"N/A"}],[])}export{f as L,g as u}; diff --git a/hatchetembed/dashboard/assets/resource-limit-status-ynncxZIe.js b/hatchetembed/dashboard/assets/resource-limit-status-ynncxZIe.js new file mode 100644 index 0000000000..46878fd85b --- /dev/null +++ b/hatchetembed/dashboard/assets/resource-limit-status-ynncxZIe.js @@ -0,0 +1 @@ +import"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a910bcb9-8ae5-4502-b7dc-535f0da90256",e._sentryDebugIdIdentifier="sentry-dbid-a910bcb9-8ae5-4502-b7dc-535f0da90256")}catch{}})();const r=({value:e,alarmValue:t,limitValue:n})=>e>=n?"exhausted":t&&e>=t?"warn":"ok";export{r as g}; diff --git a/hatchetembed/dashboard/assets/resource-not-found-C1NYDT14.js b/hatchetembed/dashboard/assets/resource-not-found-C1NYDT14.js new file mode 100644 index 0000000000..87baf4c0a9 --- /dev/null +++ b/hatchetembed/dashboard/assets/resource-not-found-C1NYDT14.js @@ -0,0 +1 @@ +import{h as l,bE as r,j as e,f0 as i,a2 as u,B as n,b as c,f1 as f,f2 as x,f3 as b}from"./index-wypz6hY5.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="a86f5b12-854f-4039-a0ad-2c49363f0b31",s._sentryDebugIdIdentifier="sentry-dbid-a86f5b12-854f-4039-a0ad-2c49363f0b31")}catch{}})();function g({resource:s,description:t,primaryAction:a}){const o=l(),d=r();return e.jsxs(i,{icon:e.jsx(b,{className:"h-5 w-5"}),title:`${s} not found`,description:t??`The ${s.toLowerCase()} you're looking for doesn’t exist.`,actions:e.jsxs(e.Fragment,{children:[e.jsx(n,{leftIcon:e.jsx(f,{className:"h-4 w-4"}),onClick:()=>o(a?{...a.navigate,replace:a.navigate.replace??!0}:{to:c.authenticatedRoute.to,replace:!0}),children:(a==null?void 0:a.label)??"Dashboard"}),e.jsx(n,{leftIcon:e.jsx(x,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"})]}),children:[e.jsx("div",{className:"flex justify-center",children:e.jsx(u,{variant:"secondary",className:"font-mono",children:"404"})}),e.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[e.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested path"}),e.jsx("div",{className:"break-all text-foreground/90",children:d.pathname})]})]})}export{g as R}; diff --git a/hatchetembed/dashboard/assets/secret-copier-BNLi8BbD.js b/hatchetembed/dashboard/assets/secret-copier-BNLi8BbD.js new file mode 100644 index 0000000000..e9fd1e2df2 --- /dev/null +++ b/hatchetembed/dashboard/assets/secret-copier-BNLi8BbD.js @@ -0,0 +1,4 @@ +import{bY as p,k as x,j as e,aj as g,ah as y,B as w,bL as v,ak as C,al as o,f4 as c,f5 as S,f6 as D,bl as u,e as M,f7 as k,f8 as I,f9 as L}from"./index-wypz6hY5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="fd8ffcdd-c4d9-4bbc-8161-324fb7a8846c",n._sentryDebugIdIdentifier="sentry-dbid-fd8ffcdd-c4d9-4bbc-8161-324fb7a8846c")}catch{}})();c.registerLanguage("typescript",k);c.registerLanguage("yaml",I);c.registerLanguage("json",L);function $({secrets:n,className:t,maxHeight:r,maxWidth:j,copy:b,onClick:l}){const{theme:m}=p(),f=x.useRef(null),[i,a]=x.useState("dotenv"),d=()=>{switch(i){case"json":return JSON.stringify(n,null,2);case"yaml":return E(n);case"table":return e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Env Var"}),e.jsx("th",{children:"Value"})]})}),e.jsx("tbody",{children:Object.entries(n).map(([s,h])=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx(u,{text:s})," ",s]}),e.jsxs("td",{children:[e.jsx(u,{text:h})," ",h]})]},s))})]});case"cli":return O(n);case"dotenv":default:return N(n)}};return e.jsxs("div",{className:M(t,"relative h-fit w-full"),children:[e.jsx("div",{className:"justify-right mb-2 flex flex-row items-center",children:e.jsxs(g,{children:[e.jsx(y,{asChild:!0,children:e.jsxs(w,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[e.jsx("span",{children:i}),e.jsx(v,{className:"ml-2 h-4 w-4"})]})}),e.jsxs(C,{align:"start",children:[e.jsx(o,{onClick:()=>a("dotenv"),children:"dotenv"}),e.jsx(o,{onClick:()=>a("cli"),children:"cli"}),e.jsx(o,{onClick:()=>a("json"),children:"json"}),e.jsx(o,{onClick:()=>a("yaml"),children:"yaml"}),e.jsx(o,{onClick:()=>a("table"),children:"table"})]})]})}),e.jsx("div",{role:"button",tabIndex:0,onKeyDown:()=>{var s;return(s=f.current)==null?void 0:s.focus()},onClick:()=>{var s;(s=f.current)==null||s.focus(),l&&l()},className:"relative flex rounded-lg bg-muted",children:i==="table"?d():e.jsx(c,{language:"text",style:m==="dark"?S:D,wrapLines:!1,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},customStyle:{cursor:"default",borderRadius:"0.5rem",maxHeight:r,maxWidth:j,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",fontSize:"0.75rem",lineHeight:"1rem",padding:"0.5rem",flex:"1",background:"transparent"},children:d()})}),b&&i!=="table"&&e.jsx(u,{text:d(),withText:!0,onCopy:()=>l&&l()})]})}function N(n){return Object.entries(n).map(([t,r])=>`${t}="${r}"`).join(` +`)}function O(n){return Object.entries(n).map(([t,r])=>`export ${t}="${r}"`).join(` +`)}function E(n){return Object.entries(n).map(([t,r])=>`${t}:"${r}"`).join(` +`)}export{$ as S}; diff --git a/hatchetembed/dashboard/assets/settings-page-header-Dal4BvfD.js b/hatchetembed/dashboard/assets/settings-page-header-Dal4BvfD.js new file mode 100644 index 0000000000..9812dfa34e --- /dev/null +++ b/hatchetembed/dashboard/assets/settings-page-header-Dal4BvfD.js @@ -0,0 +1 @@ +import{j as s}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="676c8891-99cd-419f-b4a2-db95cd393ede",e._sentryDebugIdIdentifier="sentry-dbid-676c8891-99cd-419f-b4a2-db95cd393ede")}catch{}})();function n({title:e,description:d,children:t}){return s.jsxs("div",{className:"mb-6 flex flex-col gap-4 border-b border-border/50 pb-6 md:flex-row md:items-start md:justify-between",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:e}),s.jsx("p",{className:"max-w-xl text-sm text-muted-foreground",children:d})]}),t]})}export{n as S}; diff --git a/hatchetembed/dashboard/assets/shard-deployment-key-CJfQX3l3.js b/hatchetembed/dashboard/assets/shard-deployment-key-CJfQX3l3.js new file mode 100644 index 0000000000..cefa2946de --- /dev/null +++ b/hatchetembed/dashboard/assets/shard-deployment-key-CJfQX3l3.js @@ -0,0 +1 @@ +import"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="85dcc49f-734c-41b8-9672-a0f94e62c529",e._sentryDebugIdIdentifier="sentry-dbid-85dcc49f-734c-41b8-9672-a0f94e62c529")}catch{}})();function i(e){if(e.provider){const n=`${e.provider}:${e.region}`;return e.shardName?`${n}:${e.shardName}`:n}return e.shardName?`${e.region}:${e.shardName}`:e.region}function f(e){if(!e)return;const n=e.split(":");if(n.length>=3){const t=n[1],r=n.slice(2).join(":");return`${t} / ${r}`}return n.length===2?n[1]:e}export{f,i as s}; diff --git a/hatchetembed/dashboard/assets/shield-check-lCThuR8D.js b/hatchetembed/dashboard/assets/shield-check-lCThuR8D.js new file mode 100644 index 0000000000..174787bc66 --- /dev/null +++ b/hatchetembed/dashboard/assets/shield-check-lCThuR8D.js @@ -0,0 +1,6 @@ +import{v as n}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="69a1029d-f488-46c1-91b8-71a0478c2196",e._sentryDebugIdIdentifier="sentry-dbid-69a1029d-f488-46c1-91b8-71a0478c2196")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],c=n("shield-check",o);export{c as S}; diff --git a/hatchetembed/dashboard/assets/steps-2xcvKVXE.js b/hatchetembed/dashboard/assets/steps-2xcvKVXE.js new file mode 100644 index 0000000000..a95e3887e1 --- /dev/null +++ b/hatchetembed/dashboard/assets/steps-2xcvKVXE.js @@ -0,0 +1 @@ +import{k as a,j as r,e as b,fa as c}from"./index-wypz6hY5.js";import{A as i,a as u,b as p,c as f}from"./accordion-CBy735bO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="33b8bbe2-ea68-4bb8-b97a-c2db14ebbce9",e._sentryDebugIdIdentifier="sentry-dbid-33b8bbe2-ea68-4bb8-b97a-c2db14ebbce9")}catch{}})();const m=c("ml-4 mb-12 border-l border-border pl-6 dark:border-border [counter-reset:step] flex flex-col gap-4"),y=({title:e,children:s,stepNumber:t,open:l=!0,setOpen:o=()=>{},disabled:n=!1})=>r.jsx(i,{type:"single",collapsible:!0,className:"relative w-full",value:l?"open":"closed",disabled:n,onValueChange:d=>o(d==="open"),children:r.jsxs(u,{value:"open",className:"border-none",children:[r.jsxs(p,{hideChevron:n,className:n?"cursor-default hover:no-underline":"",children:[r.jsx("div",{className:"absolute ml-[-41px] mt-[3px] h-[33px] w-[33px] rounded-full border-4 border-muted bg-muted text-center text-base font-normal text-foreground",children:t}),e&&r.jsx("h3",{className:"text-lg font-semibold hover:no-underline",children:e})]}),r.jsx(f,{children:s})]})}),x=a.forwardRef(({className:e,children:s,...t},l)=>r.jsx("div",{ref:l,className:b(m(),e),...t,children:a.Children.map(s,(o,n)=>a.isValidElement(o)?a.cloneElement(o,{stepNumber:n+1}):o)}));x.displayName="Steps";export{x as S,y as a}; diff --git a/hatchetembed/dashboard/assets/support-chat-CGvrRU-a.js b/hatchetembed/dashboard/assets/support-chat-CGvrRU-a.js new file mode 100644 index 0000000000..9f9381a53a --- /dev/null +++ b/hatchetembed/dashboard/assets/support-chat-CGvrRU-a.js @@ -0,0 +1 @@ +import{C as i,ar as a,k as r}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="8bef2f88-f5de-4ddd-b36f-f738543d71c4",e._sentryDebugIdIdentifier="sentry-dbid-8bef2f88-f5de-4ddd-b36f-f738543d71c4")}catch{}})();const u=()=>{const{meta:e}=i(),s=r.useCallback(()=>{window.Pylon("show")},[]);return e!=null&&e.pylonAppId?{enabled:!0,show:s}:{enabled:!1,show:()=>{}}},f=({user:e,children:s})=>{const{meta:t}=i(),{tenant:n}=a(),d=r.useMemo(()=>t!=null&&t.pylonAppId?t==null?void 0:t.pylonAppId:null,[t==null?void 0:t.pylonAppId]);return r.useEffect(()=>{if(!d)return;const o=`(function(){var e=window;var t=document;var n=function(){n.e(arguments)};n.q=[];n.e=function(e){n.q.push(e)};e.Pylon=n;var r=function(){var e=t.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("async","true");e.setAttribute("src","https://widget.usepylon.com/widget/${d}");var n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};if(t.readyState==="complete"){r()}else if(e.addEventListener){e.addEventListener("load",r,false)}})();`;document.body.appendChild(document.createElement("script")).innerHTML=o},[d]),r.useEffect(()=>{var o;!d||!e||(window.pylon={chat_settings:{app_id:d,email:e.email,name:e.name,email_hash:e.emailHash}},window.Pylon("hideChatBubble"),window.Pylon("setNewIssueCustomFields",{user_id:e.metadata.id,tenant_name:n==null?void 0:n.name,tenant_slug:n==null?void 0:n.slug,tenant_id:(o=n==null?void 0:n.metadata)==null?void 0:o.id}))},[e,d,n]),s};export{f as S,u}; diff --git a/hatchetembed/dashboard/assets/switch-C23Bp5tT.js b/hatchetembed/dashboard/assets/switch-C23Bp5tT.js new file mode 100644 index 0000000000..c48c9923bf --- /dev/null +++ b/hatchetembed/dashboard/assets/switch-C23Bp5tT.js @@ -0,0 +1 @@ +import{k as o,eN as x,eK as B,j as n,eM as C,eP as M,eT as D,eU as H,eS as U,e as S}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f3ee4221-73b1-4e3c-91ab-742099f95155",e._sentryDebugIdIdentifier="sentry-dbid-f3ee4221-73b1-4e3c-91ab-742099f95155")}catch{}})();var b="Switch",[A]=U(b),[q,z]=A(b),P=o.forwardRef((e,s)=>{const{__scopeSwitch:t,name:a,checked:r,defaultChecked:w,required:d,disabled:c,value:l="on",onCheckedChange:m,form:i,...g}=e,[u,f]=o.useState(null),v=x(s,h=>f(h)),y=o.useRef(!1),k=u?i||!!u.closest("form"):!0,[p,j]=B({prop:r,defaultProp:w??!1,onChange:m,caller:b});return n.jsxs(q,{scope:t,checked:p,disabled:c,children:[n.jsx(C.button,{type:"button",role:"switch","aria-checked":p,"aria-required":d,"data-state":R(p),"data-disabled":c?"":void 0,disabled:c,value:l,...g,ref:v,onClick:M(e.onClick,h=>{j(T=>!T),k&&(y.current=h.isPropagationStopped(),y.current||h.stopPropagation())})}),k&&n.jsx(N,{control:u,bubbles:!y.current,name:a,value:l,checked:p,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var _="SwitchThumb",E=o.forwardRef((e,s)=>{const{__scopeSwitch:t,...a}=e,r=z(_,t);return n.jsx(C.span,{"data-state":R(r.checked),"data-disabled":r.disabled?"":void 0,...a,ref:s})});E.displayName=_;var L="SwitchBubbleInput",N=o.forwardRef(({__scopeSwitch:e,control:s,checked:t,bubbles:a=!0,...r},w)=>{const d=o.useRef(null),c=x(d,w),l=D(t),m=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const g=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(g,"checked").set;if(l!==t&&f){const v=new Event("click",{bubbles:a});f.call(i,t),i.dispatchEvent(v)}},[l,t,a]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:c,style:{...r.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=L;function R(e){return e?"checked":"unchecked"}var I=P,O=E;const F=o.forwardRef(({className:e,...s},t)=>n.jsx(I,{className:S("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...s,ref:t,children:n.jsx(O,{className:S("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));F.displayName=I.displayName;export{F as S}; diff --git a/hatchetembed/dashboard/assets/tenant-resource-limits-table-xMx7u5rD.js b/hatchetembed/dashboard/assets/tenant-resource-limits-table-xMx7u5rD.js new file mode 100644 index 0000000000..169e17df19 --- /dev/null +++ b/hatchetembed/dashboard/assets/tenant-resource-limits-table-xMx7u5rD.js @@ -0,0 +1 @@ +import{ae as b,N as m,O as g,j as e,S as x,bj as h,b6 as y,b7 as j}from"./index-wypz6hY5.js";import{u as p}from"./resource-limit-columns-7zhUq4Ly.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="ceda196b-daf0-46f7-8299-1de91004b75c",s._sentryDebugIdIdentifier="sentry-dbid-ceda196b-daf0-46f7-8299-1de91004b75c")}catch{}})();const I=5e3;function _({tenantId:s,tenantName:n,limits:t,isLoading:l,showDocsOnEmpty:i=!1}){var a;const{isCloudEnabled:d}=b(),c=p(),u=d?I:!1,r=m({...g.tenantResourcePolicy.get(s),enabled:t===void 0,refetchInterval:u}),o=t??((a=r.data)==null?void 0:a.limits)??[];return l??r.isLoading?e.jsx("div",{className:"py-6",children:e.jsx(x,{})}):e.jsxs("section",{children:[n?e.jsx("h3",{className:"mb-4 text-base font-semibold text-foreground",children:n}):null,o.length>0?e.jsx(h,{columns:c,data:o,rowKey:f=>f.metadata.id}):e.jsxs("p",{className:"text-sm text-muted-foreground",children:["No resource limits configured for this tenant.",i?e.jsxs(e.Fragment,{children:[" ","Set ",e.jsx("code",{children:"SERVER_ENFORCE_LIMITS"})," to ",e.jsx("code",{children:"true"})," in your environment variables to enable resource limits."]}):null]}),i&&o.length===0?e.jsx("div",{className:"mt-4",children:e.jsx(y,{doc:j["self-hosting"]["configuration-options"],label:"Learn about engine configuration options"})}):null]})}export{_ as T}; diff --git a/hatchetembed/dashboard/assets/tenant-wrapper-DXQKBTdd.js b/hatchetembed/dashboard/assets/tenant-wrapper-DXQKBTdd.js new file mode 100644 index 0000000000..3944effc44 --- /dev/null +++ b/hatchetembed/dashboard/assets/tenant-wrapper-DXQKBTdd.js @@ -0,0 +1 @@ +import{y as r,k as u,c as a,a as i}from"./index-wypz6hY5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="e83986a8-97d7-4895-b13d-1b4397331c40",n._sentryDebugIdIdentifier="sentry-dbid-e83986a8-97d7-4895-b13d-1b4397331c40")}catch{}})();function y(){const{isControlPlaneEnabled:n}=r();return u.useMemo(()=>({tenantMembershipsListQuery:()=>({queryKey:["tenant-memberships:list"],queryFn:async()=>(await(n?a.tenantMembershipsList():i.tenantMembershipsList())).data}),userListTenantInvitesQuery:()=>({queryKey:["user:list:tenant-invites"],queryFn:async()=>(await(n?a.userListTenantInvites():i.userListTenantInvites())).data}),tenantMemberListQuery:t=>({queryKey:["tenant-member:list",t],queryFn:async()=>(await(n?a.tenantMemberList(t):i.tenantMemberList(t))).data}),tenantInviteListQuery:t=>({queryKey:["tenant-invite:list",t],queryFn:async()=>(await(n?a.tenantInviteList(t):i.tenantInviteList(t))).data}),tenantInviteRejectMutation:()=>({mutationKey:["tenant-invite:reject"],mutationFn:async t=>(await(n?a.tenantInviteReject(t):i.tenantInviteReject(t))).data}),tenantInviteAcceptMutation:()=>({mutationKey:["tenant-invite:accept"],mutationFn:async t=>(await(n?a.tenantInviteAccept(t):i.tenantInviteAccept(t))).data}),tenantMemberUpdateMutation:(t,e)=>({mutationKey:["tenant-member:update",t,e],mutationFn:async s=>(await(n?a.tenantMemberUpdate(t,e,s):i.tenantMemberUpdate(t,e,s))).data}),tenantMemberDeleteMutation:(t,e)=>({mutationKey:["tenant-member:delete",t,e],mutationFn:async()=>(await(n?a.tenantMemberDelete(t,e):i.tenantMemberDelete(t,e))).data}),tenantInviteCreateMutation:t=>({mutationKey:["tenant-invite:create",t],mutationFn:async e=>(await(n?a.tenantInviteCreate(t,e):i.tenantInviteCreate(t,e))).data}),tenantInviteUpdateMutation:(t,e)=>({mutationKey:["tenant-invite:update",t,e],mutationFn:async s=>(await(n?a.tenantInviteUpdate(t,e,s):i.tenantInviteUpdate(t,e,s))).data}),tenantInviteDeleteMutation:(t,e)=>({mutationKey:["tenant-invite:delete",t,e],mutationFn:async()=>(await(n?a.tenantInviteDelete(t,e):i.tenantInviteDelete(t,e))).data})}),[n])}export{y as u}; diff --git a/hatchetembed/dashboard/assets/top-nav-CUkIIMqx.js b/hatchetembed/dashboard/assets/top-nav-CUkIIMqx.js new file mode 100644 index 0000000000..d9e3f3e2da --- /dev/null +++ b/hatchetembed/dashboard/assets/top-nav-CUkIIMqx.js @@ -0,0 +1,26 @@ +import{v,C as ie,ar as K,R as I,J as le,j as e,B as k,bI as T,S as $,e as h,aI as ce,bJ as de,bK as ue,bL as me,bM as ge,bN as he,bO as fe,bP as D,bQ as xe,bR as B,aJ as be,aK as pe,aL as we,br as je,bS as ke,bT as ve,bU as Ne,k as b,m as z,N as C,O as L,b as w,bB as ye,bV as p,bn as Ce,h as q,aj as G,ah as J,ak as V,al as S,ay as Te,bW as Re,a as Le,bE as Se,bX as Ie,aF as Y,aq as ze,ad as Oe,ae as Pe,H as y,g as Me,bY as $e,bZ as De,ap as E,b_ as Be,b$ as Ee,c0 as We,be as _e,c1 as Ae,c2 as Ue}from"./index-wypz6hY5.js";import{O as W}from"./organization-selector-BF1UJlxh.js";import{T as _,g as X}from"./global-emitter-Y_aFw8Zc.js";import{u as He}from"./use-pending-invites-DaP3hNjC.js";import{g as Fe}from"./resource-limit-status-ynncxZIe.js";import{p as Qe}from"./index-C8__5p50.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="d6f77a4a-5a8f-4ee9-ad7a-17ca7570e741",n._sentryDebugIdIdentifier="sentry-dbid-d6f77a4a-5a8f-4ee9-ad7a-17ca7570e741")}catch{}})();/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ke=[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qe=v("circle-user-round",Ke);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ge=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Je=v("menu",Ge);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ve=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ye=v("monitor",Ve);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ze=v("moon",Xe);/** + * @license lucide-react v1.8.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const et=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],tt=v("sun",et);function A({className:n,memberships:t}){const{meta:a}=ie(),{setTenant:s,isUserUniverseLoaded:r,tenant:i}=K(),[l,c]=I.useState(!1),{hasOrganizations:u}=le();return i?e.jsx(ce,{delayDuration:200,children:e.jsxs(de,{open:l,onOpenChange:c,children:[e.jsx(ue,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm",role:"combobox","aria-expanded":l,"aria-label":"Select a tenant",className:h("min-w-0 justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",l&&"bg-muted/30",n),disabled:!r||t.length===0,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx(T,{className:"size-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:i.name}),e.jsx(_,{region:i.region})]}),r?e.jsx(me,{className:"size-4 shrink-0 opacity-50"}):e.jsx($,{className:"mr-0"})]})}),e.jsx(ge,{children:e.jsx(he,{side:"bottom",align:"start",sideOffset:8,className:"z-[200] w-[min(18rem,100vw)] max-w-[calc(100vw-2rem)] p-0",children:e.jsxs(fe,{className:"",children:[e.jsxs(D,{"data-cy":"tenant-switcher-list",children:[e.jsx(xe,{children:"No tenants found."}),t.map(o=>{var g,d,m,f,x,j;return e.jsxs(B,{onSelect:()=>{ke(o.tenant),s(o.tenant),c(!1)},value:(g=o.tenant)==null?void 0:g.slug,"data-cy":(d=o.tenant)!=null&&d.slug?`tenant-switcher-item-${o.tenant.slug}`:void 0,className:"cursor-pointer text-sm",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(T,{className:"size-4 shrink-0"}),e.jsxs(be,{children:[e.jsx(pe,{asChild:!0,children:e.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:(m=o.tenant)==null?void 0:m.name})}),e.jsx(we,{side:"right",className:"max-w-[min(24rem,calc(100vw-2rem))] break-words",children:(f=o.tenant)==null?void 0:f.name})]}),e.jsx(_,{region:(x=o.tenant)==null?void 0:x.region})]}),e.jsx(je,{className:h("ml-2 size-4 shrink-0",(i==null?void 0:i.slug)===((j=o.tenant)==null?void 0:j.slug)?"opacity-100":"opacity-0")})]},o.metadata.id)})]}),(a==null?void 0:a.allowCreateTenant)&&!u&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{}),e.jsx(D,{children:e.jsxs(B,{className:"cursor-pointer text-sm","data-cy":"new-tenant",onSelect:()=>{X.emit("create-new-tenant",{}),c(!1)},children:[e.jsx(Ne,{className:"mr-2 size-4"}),"New Tenant"]})})]})]})})})]})}):e.jsxs(k,{variant:"outline",size:"sm","aria-label":"Loading tenant",className:h("min-w-0 justify-between gap-2 bg-muted/20 shadow-none",n),disabled:!0,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx(T,{className:"size-4 shrink-0 opacity-60"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:"Loading tenant…"})]}),e.jsx($,{className:"mr-0"})]})}const nt=()=>{const{pendingInvitesQuery:n,isLoading:t}=He();return{notifications:b.useMemo(()=>{const s=n.data;if(!s||s.inviteCount===0)return[];const r=s.inviteCount,i=[...s.tenantInvites,...s.organizationInvites].map(l=>l.metadata.createdAt).filter(l=>!!l).reduce((l,c)=>c>l?c:l,"");return[{color:"green",shortTitle:r===1?"Invite":"Invites",title:r===1?s.tenantInvites[0]?`Invite to join ${s.tenantInvites[0].tenantName??"a tenant"}`:"Organization invite":`${r} pending invites`,message:`You have ${r} pending invite${r>1?"s":""} awaiting your response.`,timestamp:i,onClick:()=>X.emit("open-invite-modal",{})}]},[n.data]),isLoading:t}};function st(n){return n.length===1}const at=()=>{const{tenantMemberships:n}=z(),t=b.useMemo(()=>(n??[]).map(u=>u.tenant).filter(u=>u!=null),[n]),a=st(t),s=a?t[0].metadata.id:"",r=C({...L.workflows.list(s,{limit:1}),enabled:a}),i=C({...L.tokens.list(s),enabled:a}),l=r.isLoading||i.isLoading;return{notifications:b.useMemo(()=>{var g,d,m,f;if(!a||l)return[];const u=(((d=(g=r.data)==null?void 0:g.rows)==null?void 0:d.length)??0)>0,o=(((f=(m=i.data)==null?void 0:m.rows)==null?void 0:f.length)??0)>0;return u||o?[]:[{color:"blue",shortTitle:"Get started",title:"Get started with Hatchet",message:"Create an API token and run your first workflow",timestamp:new Date().toISOString(),url:w.tenantOverviewRoute.to.replace("$tenant",s)}]},[a,l,s,r.data,i.data]),isLoading:l}},rt=2*6e4,ot={[p.WORKER]:"Total Workers",[p.WORKER_SLOT]:"Concurrency Slots",[p.EVENT]:"Events",[p.TASK_RUN]:"Task Runs",[p.CRON]:"Cron Triggers",[p.SCHEDULE]:"Schedule Triggers",[p.INCOMING_WEBHOOK]:"Incoming Webhooks"},it={warn:"yellow",exhausted:"red"},lt=(n,t,a)=>{const s=Fe(n);if(s==="ok")return null;const r=ot[n.resource]??n.resource;return{color:it[s],shortTitle:s==="exhausted"?"Limit reached":"Approaching limit",title:s==="exhausted"?`${r} limit reached`:`Approaching ${r} limit`,message:`${a}: ${n.value} / ${n.limitValue} used`,timestamp:n.metadata.createdAt,url:w.tenantSettingsBillingRoute.to.replace("$tenant",t)}},ct=()=>{const{tenantId:n,tenant:t}=ye(),a=C({...L.tenantResourcePolicy.get(n??""),refetchInterval:rt,enabled:!!n});return{notifications:b.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.limits)??[]).map(i=>lt(i,n??"",(t==null?void 0:t.name)??n??"")).filter(i=>i!==null)},[n,t==null?void 0:t.name,a.data]),isLoading:a.isLoading}},dt=()=>{const n=ct(),t=nt(),a=at();return{notifications:b.useMemo(()=>[...n.notifications,...t.notifications,...a.notifications].sort((r,i)=>i.timestamp>r.timestamp?1:-1),[n.notifications,t.notifications,a.notifications]),isLoading:n.isLoading||t.isLoading||a.isLoading}},U={blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500"},H={blue:0,green:1,yellow:2,red:3},ut=n=>n.reduce((t,a)=>H[a.color]>H[t]?a.color:t,"green");function F(){const{notifications:n}=dt(),{currentUser:t}=Ce(),a=q(),s=n.length,r=s>0?ut(n):null,i=`${s} notification${s!==1?"s":""}`,l=t!=null&&t.email?`${i} for ${t.email}`:i,c=s>0?n[0].shortTitle:"Notifications";return s>0?e.jsxs(G,{children:[e.jsx(J,{asChild:!0,children:e.jsxs(k,{variant:"icon",title:l,"aria-label":l,"data-cy":"notifications-button",className:"relative gap-1.5 rounded-md border border-border px-2.5",size:"sm",children:[e.jsx(Qe,{className:"size-4"}),e.jsx("span",{className:"text-xs font-medium leading-none",children:c}),s>1&&e.jsx("span",{className:"text-xs font-medium leading-none text-muted-foreground",children:s}),r&&e.jsx("span",{className:h("absolute -top-0.5 -right-0.5 size-2.5 rounded-full border-2 border-background",U[r])})]})}),e.jsx(V,{className:"w-80",align:"end",children:n.map((o,g)=>e.jsxs(S,{variant:"interactive",className:"flex cursor-pointer items-start gap-2 px-3 py-2",onClick:()=>o.onClick?o.onClick():a({to:o.url}),children:[e.jsx("span",{className:h("mt-1.5 size-2 shrink-0 rounded-full",U[o.color])}),e.jsxs("div",{className:"min-w-0 flex-1",title:o.message,children:[e.jsx("p",{className:"truncate text-sm font-medium",children:o.title}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:o.message})]})]},`${o.title}-${o.timestamp}`))})]}):null}const Z=b.forwardRef(({...n},t)=>e.jsx("nav",{ref:t,"aria-label":"breadcrumb",...n}));Z.displayName="Breadcrumb";const ee=b.forwardRef(({className:n,...t},a)=>e.jsx("ol",{ref:a,className:h("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",n),...t}));ee.displayName="BreadcrumbList";const te=b.forwardRef(({className:n,...t},a)=>e.jsx("li",{ref:a,className:h("inline-flex items-center gap-1.5",n),...t}));te.displayName="BreadcrumbItem";const ne=b.forwardRef(({asChild:n,className:t,...a},s)=>{const r=n?Re:"a";return e.jsx(r,{ref:s,className:h("transition-colors hover:text-foreground",t),...a})});ne.displayName="BreadcrumbLink";const se=b.forwardRef(({className:n,...t},a)=>e.jsx("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:h("font-normal text-foreground",n),...t}));se.displayName="BreadcrumbPage";const ae=({children:n,className:t,...a})=>e.jsx("li",{role:"presentation","aria-hidden":"true",className:h("[&>svg]:size-3.5",t),...a,children:n??e.jsx(Te,{})});ae.displayName="BreadcrumbSeparator";function re(n){var s;const t=C({queryKey:["tenant-home-route",n],queryFn:async()=>{if(!n)return{hasWorkflows:!1};try{const r=await Le.workflowList(n,{limit:1});return{hasWorkflows:r.data.rows&&r.data.rows.length>0}}catch{return{hasWorkflows:!0}}},enabled:!!n,staleTime:6e4,retry:!1});return{homeRoute:((s=t.data)==null?void 0:s.hasWorkflows)??!0?w.tenantRunsRoute.to:w.tenantOverviewRoute.to,isLoading:t.isLoading}}const mt=(n,t)=>{switch(n){case"/tenants/:tenant/events":return"Events";case"/tenants/:tenant/filters":return"Filters";case"/tenants/:tenant/webhooks":return"Webhooks";case"/tenants/:tenant/rate-limits":return"Rate Limits";case"/tenants/:tenant/scheduled":return"Scheduled Runs";case"/tenants/:tenant/cron-jobs":return"Cron Jobs";case"/tenants/:tenant/tasks":return"Tasks";case"/tenants/:tenant/tasks/:workflow":return"Task Detail";case"/tenants/:tenant/runs":return"Runs";case"/tenants/:tenant/runs/:run":return"Run Detail";case"/tenants/:tenant/task-runs/:run":return"Task Run Detail";case"/tenants/:tenant/workers":return"Workers";case"/tenants/:tenant/workers/all":return"All Workers";case"/tenants/:tenant/workers/:worker":return"Worker Detail";case"/tenants/:tenant/managed-workers":return"Managed Workers";case"/tenants/:tenant/managed-workers/create":return"Create";case"/tenants/:tenant/managed-workers/demo-template":return"Demo Template";case"/tenants/:tenant/managed-workers/:managed-worker":return"Managed Worker Detail";case"/tenants/:tenant/settings/overview":return"General";case"/tenants/:tenant/settings/api-tokens":return"API Tokens";case"/tenants/:tenant/settings/github":return"GitHub";case"/tenants/:tenant/settings/members":return"Members";case"/tenants/:tenant/settings/alerting":return"Alerting";case"/tenants/:tenant/settings/billing-and-limits":return"Billing & Limits";case"/tenants/:tenant/settings/ingestors":return"Ingestors";case"/tenants/:tenant/settings/integrations":return"Integrations";case"/tenants/:tenant/settings/organization":return t?"Organization":"Tenants";case"/tenants/:tenant/workflow-runs":case"/tenants/:tenant/workflow-runs/:run":case"/tenants/:tenant/":case"/tenants/:tenant/workflows":case"/tenants/:tenant/workflows/:workflow":case"/tenants/:tenant/settings":return"";default:const a=n;throw new Error(`Unhandled tenanted path: ${a}`)}};function gt(n,t,a){const r=("/"+n.join("/")).replace(`/tenants/${t}`,"/tenants/:tenant");try{return mt(r,a)||null}catch{return null}}function ht(n,t,a){const s=`/tenants/${a}`;return t===0?s:s+"/"+n.slice(2,t+1).join("/")}function ft(n,t,a){const s=[];if(!n.startsWith("/tenants/")||n.includes("/auth")||n.includes("/onboarding"))return s;const r=t==null?void 0:t.tenant;if(!r)return s;s.push({label:"Home",href:`/tenants/${r}/runs`});const i=n.split("/").filter(Boolean),l=i.slice(2);for(let c=0;cx.charAt(0).toUpperCase()+x.slice(1)).join(" ");s.push({label:f,href:o?void 0:u,isCurrentPage:o})}}return s}function xt(){const n=Se(),t=Ie(),a=Y({strict:!1}),s=Object.entries(a).reduce((m,[f,x])=>(x!==void 0&&(m[f]=x),m),{}),{isCloudEnabled:r}=z(),i=s.tenant,{homeRoute:l}=re(i),c=t.matches.some(m=>m.routeId==="/tenants/$tenant"),o=n.pathname.split("/").filter(Boolean).length>2;if(c&&o&&t.matches.length===3)return[];const d=ft(n.pathname,s,r);return d.length>0&&d[0].label==="Home"&&i&&(d[0].href=l.replace(":tenant",i)),d}const R=[{value:"light",label:"Light",icon:tt},{value:"dark",label:"Dark",icon:Ze},{value:"system",label:"System",icon:Ye}];function Q({user:n}){const[t,a]=I.useState(!1),{logoutMutation:s}=z(),{theme:r,setTheme:i}=$e();if(!n)return null;const l=n.name||n.email,c=R.find(o=>o.value===r)??R[2],u=c.icon;return e.jsxs(G,{open:t,onOpenChange:a,children:[e.jsx(J,{asChild:!0,children:e.jsxs(k,{variant:"outline",size:"sm","aria-label":"Open account menu",className:h("justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",t&&"bg-muted/30"),children:[e.jsx(qe,{className:"size-4"}),e.jsx("span",{className:"max-w-32 truncate text-sm font-medium",children:l}),e.jsx(De,{className:"size-3.5 text-muted-foreground"})]})}),e.jsxs(V,{align:"end",className:"w-64",children:[e.jsxs("div",{className:"px-2 py-1.5",children:[e.jsx("p",{className:"truncate text-sm font-semibold",children:n.name||n.email}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.email})]}),e.jsx(E,{}),e.jsxs(Be,{children:[e.jsxs(Ee,{className:"cursor-pointer",children:[e.jsx(u,{className:"mr-2 size-4"}),"Theme: ",c.label]}),e.jsx(We,{children:R.map(o=>e.jsxs(S,{variant:"interactive",className:"cursor-pointer",onClick:()=>i(o.value),children:[e.jsx(o.icon,{className:"mr-2 size-4"}),o.label,r===o.value&&e.jsx(_e,{className:"ml-auto size-4"})]},o.value))})]}),e.jsx(E,{}),e.jsxs(S,{variant:"interactive",className:"cursor-pointer",onClick:()=>s.mutate(),disabled:s.isPending,children:[e.jsx(Ae,{className:"mr-2 size-4"}),s.isPending?"Logging out...":"Log out",e.jsx(Ue,{children:"⇧⌘Q"})]})]})]})}function Nt({user:n,tenantMemberships:t}){const{toggleSidebarOpen:a,isWide:s,sidebarWidth:r,collapsed:i,setCollapsed:l}=ze(),c=xt(),u=q(),o=Oe(),d=Y({strict:!1}).tenant,{homeRoute:m}=re(d),f=!!o({to:w.tenantRoute.to,params:d?{tenant:d}:void 0,fuzzy:!0}),x=()=>{if(f&&d){u({to:m,params:{tenant:d}});return}u({to:w.authenticatedRoute.to})},j=()=>{if(!s){x();return}l(!i)},{isCloudEnabled:O}=Pe(),{tenant:oe}=K(),P=!!n&&(t==null?void 0:t.length)>0&&!!oe;return e.jsxs("header",{className:"z-50 h-16 w-full bg-background",children:[e.jsxs("div",{className:"flex h-16 items-center px-4 md:hidden",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(k,{variant:"icon",onClick:()=>a(),"aria-label":"Toggle sidebar",size:"icon",children:e.jsx(Je,{className:"size-4"})}),e.jsx("button",{type:"button",onClick:x,"aria-label":"Go to Runs",className:"rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:e.jsx(y,{variant:"mark",className:"h-5 w-5"})})]}),e.jsxs("div",{className:"flex ml-auto items-center justify-end gap-2",children:[e.jsx(F,{}),P&&(O?e.jsx(W,{memberships:t}):e.jsx(A,{memberships:t})),e.jsx(Q,{user:n})]})]}),e.jsxs("div",{className:"hidden h-16 md:grid md:grid-cols-[var(--v1-sidebar-width)_minmax(0,1fr)_auto] md:items-center",style:r?{"--v1-sidebar-width":`${r}px`}:void 0,children:[e.jsx("div",{className:h("flex h-16 items-center",i?"justify-center":"pl-6"),children:i?e.jsx("button",{type:"button",onClick:j,"aria-label":"Expand sidebar",className:"rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:e.jsx(y,{variant:"mark",className:"h-5 w-5"})}):e.jsxs("button",{type:"button",onClick:j,"aria-label":"Collapse sidebar",className:"flex items-center gap-2 rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[e.jsx(y,{variant:"mark",className:"h-4 w-4"}),e.jsx(y,{variant:"wordmark",className:"h-4 w-auto"})]})}),e.jsx("div",{className:"min-w-0 px-8",children:c.length>0&&e.jsx(Z,{children:e.jsx(ee,{children:c.map((N,M)=>e.jsxs(I.Fragment,{children:[M>0&&e.jsx(ae,{}),e.jsx(te,{children:N.isCurrentPage?e.jsx(se,{children:N.label}):e.jsx(ne,{asChild:!0,children:e.jsx(Me,{to:N.href,children:N.label})})})]},M))})})}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pr-4",children:[e.jsx(F,{}),P&&(O?e.jsx(W,{memberships:t}):e.jsx(A,{memberships:t})),e.jsx(Q,{user:n})]})]})]})}export{Nt as T}; diff --git a/hatchetembed/dashboard/assets/upgrade-required-BNScyCLS.js b/hatchetembed/dashboard/assets/upgrade-required-BNScyCLS.js new file mode 100644 index 0000000000..ab1fd1e14f --- /dev/null +++ b/hatchetembed/dashboard/assets/upgrade-required-BNScyCLS.js @@ -0,0 +1 @@ +import{j as s}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="b841f268-d7c3-487e-bc74-8fa8c5c2294a",e._sentryDebugIdIdentifier="sentry-dbid-b841f268-d7c3-487e-bc74-8fa8c5c2294a")}catch{}})();function n({title:e,description:d,icon:r,action:l}){return s.jsx("div",{className:"h-full w-full flex-grow",children:s.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:s.jsx("div",{className:"rounded-lg border bg-card p-12 shadow-sm",children:s.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center text-center",children:[r&&s.jsx("div",{className:"mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10",children:r}),s.jsx("h3",{className:"mb-2 text-2xl font-semibold",children:e}),s.jsx("p",{className:"mb-6 text-muted-foreground",children:d}),l]})})})})}export{n as U}; diff --git a/hatchetembed/dashboard/assets/use-analytics-BZxgE2Kk.js b/hatchetembed/dashboard/assets/use-analytics-BZxgE2Kk.js new file mode 100644 index 0000000000..10013cf4bf --- /dev/null +++ b/hatchetembed/dashboard/assets/use-analytics-BZxgE2Kk.js @@ -0,0 +1,2 @@ +import{k as qe,R as it,ar as fa}from"./index-wypz6hY5.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="307c9372-4857-44ff-a3ba-aeff9c858fca",i._sentryDebugIdIdentifier="sentry-dbid-307c9372-4857-44ff-a3ba-aeff9c858fca")}catch{}})();var p=typeof window<"u"?window:void 0,K=typeof globalThis<"u"?globalThis:p;typeof self>"u"&&(K.self=K),typeof File>"u"&&(K.File=function(){});var ce=K==null?void 0:K.navigator,b=K==null?void 0:K.document,Q=K==null?void 0:K.location,Yi=K==null?void 0:K.fetch,Ji=K!=null&&K.XMLHttpRequest&&"withCredentials"in new K.XMLHttpRequest?K.XMLHttpRequest:void 0,Vs=K==null?void 0:K.AbortController,_a=K==null?void 0:K.CompressionStream,oe=ce==null?void 0:ce.userAgent,F=p??{},Bs="1.369.2",ne={DEBUG:!1,LIB_VERSION:Bs,LIB_NAME:"web",JS_SDK_VERSION:Bs};function Gs(i,e,t,s,r,n,a){try{var o=i[n](a),l=o.value}catch(c){return void t(c)}o.done?e(l):Promise.resolve(l).then(s,r)}function we(i){return function(){var e=this,t=arguments;return new Promise((function(s,r){var n=i.apply(e,t);function a(l){Gs(n,s,r,a,o,"next",l)}function o(l){Gs(n,s,r,a,o,"throw",l)}a(void 0)}))}}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var e=1;arguments.length>e;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i},y.apply(null,arguments)}function en(i,e){if(i==null)return{};var t={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(e.indexOf(s)!==-1)continue;t[s]=i[s]}return t}function tn(){return(tn=we((function*(i,e,t){e===void 0&&(e=!0);try{var s=new Blob([i],{type:"text/plain"}).stream().pipeThrough(new CompressionStream("gzip"));return yield new Response(s).blob()}catch(r){if(t!=null&&t.rethrow)throw r;return e&&console.error("Failed to gzip compress data",r),null}}))).apply(this,arguments)}var ma=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],ya=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ws=function(i,e){if(e===void 0&&(e=[]),!i)return!1;var t=i.toLowerCase();return ya.concat(e).some((s=>{var r=s.toLowerCase();return t.indexOf(r)!==-1}))};function M(i,e){return i.indexOf(e)!==-1}var yi=function(i){return i.trim()},Ki=function(i){return i.replace(/^\$/,"")},sn=Object.prototype,rn=sn.hasOwnProperty,bi=sn.toString,D=Array.isArray||function(i){return bi.call(i)==="[object Array]"},Ce=i=>typeof i=="function",J=i=>i===Object(i)&&!D(i),ot=i=>{if(J(i)){for(var e in i)if(rn.call(i,e))return!1;return!0}return!1},E=i=>i===void 0,W=i=>bi.call(i)=="[object String]",Zt=i=>W(i)&&i.trim().length===0,Oe=i=>i===null,L=i=>E(i)||Oe(i),xe=i=>bi.call(i)=="[object Number]"&&i==i,st=i=>xe(i)&&i>0,Pe=i=>bi.call(i)==="[object Boolean]",ba=i=>i instanceof FormData,wa=i=>M(ma,i);function nn(i){return i===null||typeof i!="object"}function ii(i,e){return{}.toString.call(i)==="[object "+e+"]"}function Fs(i){return typeof Event<"u"&&(function(e,t){try{return e instanceof t}catch{return!1}})(i,Event)}var Ea=[!0,"true",1,"1","yes"],Pi=i=>M(Ea,i),xa=[!1,"false",0,"0","no"];function Re(i,e,t,s,r){return e>t&&(s.warn("min cannot be greater than max."),e=t),xe(i)?i>t?(s.warn(" cannot be greater than max: "+t+". Using max value instead."),t):e>i?(s.warn(" cannot be less than min: "+e+". Using min value instead."),e):i:(s.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+r),Re(r||t,e,t,s))}class ka{constructor(e){this.Pt={},this.Dt=e.Dt,this.jt=Re(e.bucketSize,0,100,e.qt),this.$t=Re(e.refillRate,0,this.jt,e.qt),this.Vt=Re(e.refillInterval,0,864e5,e.qt)}Ht(e,t){var s=Math.floor((t-e.lastAccess)/this.Vt);s>0&&(e.tokens=Math.min(e.tokens+s*this.$t,this.jt),e.lastAccess=e.lastAccess+s*this.Vt)}consumeRateLimit(e){var t,s=Date.now(),r=String(e),n=this.Pt[r];return n?this.Ht(n,s):this.Pt[r]=n={tokens:this.jt,lastAccess:s},n.tokens===0||(n.tokens--,n.tokens===0&&((t=this.Dt)==null||t.call(this,e)),n.tokens===0)}stop(){this.Pt={}}}var Xt,Ys,Ri,he="Mobile",si="iOS",Te="Android",dt="Tablet",an=Te+" "+dt,on="iPad",ln="Apple",un=ln+" Watch",Tt="Safari",pt="BlackBerry",cn="Samsung",hn=cn+"Browser",dn=cn+" Internet",We="Chrome",Sa=We+" OS",pn=We+" "+si,Is="Internet Explorer",vn=Is+" "+he,$s="Opera",Pa=$s+" Mini",Cs="Edge",gn="Microsoft "+Cs,ct="Firefox",fn=ct+" "+si,Dt="Nintendo",Nt="PlayStation",ht="Xbox",_n=Te+" "+he,mn=he+" "+Tt,St="Windows",Zi=St+" Phone",Js="Nokia",Qi="Ouya",yn="Generic",Ra=yn+" "+he.toLowerCase(),bn=yn+" "+dt.toLowerCase(),es="Konqueror",re="(\\d+(\\.\\d+)?)",Fi=new RegExp("Version/"+re),Fa=new RegExp(ht,"i"),Ia=new RegExp(Nt+" \\w+","i"),$a=new RegExp(Dt+" \\w+","i"),Ts=new RegExp(pt+"|PlayBook|BB10","i"),Ca={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},wn=function(i,e){return e=e||"",M(i," OPR/")&&M(i,"Mini")?Pa:M(i," OPR/")?$s:Ts.test(i)?pt:M(i,"IE"+he)||M(i,"WPDesktop")?vn:M(i,hn)?dn:M(i,Cs)||M(i,"Edg/")?gn:M(i,"FBIOS")?"Facebook "+he:M(i,"UCWEB")||M(i,"UCBrowser")?"UC Browser":M(i,"CriOS")?pn:M(i,"CrMo")||M(i,We)?We:M(i,Te)&&M(i,Tt)?_n:M(i,"FxiOS")?fn:M(i.toLowerCase(),es.toLowerCase())?es:((t,s)=>s&&M(s,ln)||(function(r){return M(r,Tt)&&!M(r,We)&&!M(r,Te)})(t))(i,e)?M(i,he)?mn:Tt:M(i,ct)?ct:M(i,"MSIE")||M(i,"Trident/")?Is:M(i,"Gecko")?ct:""},Ta={[vn]:[new RegExp("rv:"+re)],[gn]:[new RegExp(Cs+"?\\/"+re)],[We]:[new RegExp("("+We+"|CrMo)\\/"+re)],[pn]:[new RegExp("CriOS\\/"+re)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+re)],[Tt]:[Fi],[mn]:[Fi],[$s]:[new RegExp("(Opera|OPR)\\/"+re)],[ct]:[new RegExp(ct+"\\/"+re)],[fn]:[new RegExp("FxiOS\\/"+re)],[es]:[new RegExp("Konqueror[:/]?"+re,"i")],[pt]:[new RegExp(pt+" "+re),Fi],[_n]:[new RegExp("android\\s"+re,"i")],[dn]:[new RegExp(hn+"\\/"+re)],[Is]:[new RegExp("(rv:|MSIE )"+re)],Mozilla:[new RegExp("rv:"+re)]},Oa=function(i,e){var t=wn(i,e),s=Ta[t];if(E(s))return null;for(var r=0;s.length>r;r++){var n=i.match(s[r]);if(n)return parseFloat(n[n.length-2])}return null},Ks=[[new RegExp(ht+"; "+ht+" (.*?)[);]","i"),i=>[ht,i&&i[1]||""]],[new RegExp(Dt,"i"),[Dt,""]],[new RegExp(Nt,"i"),[Nt,""]],[Ts,[pt,""]],[new RegExp(St,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Zi,""];if(new RegExp(he).test(e)&&!/IEMobile\b/.test(e))return[St+" "+he,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var s=Ca[t[1]]||"";return/arm/i.test(e)&&(s="RT"),[St,s]}return[St,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>i&&i[3]?[si,[i[3],i[4],i[5]||"0"].join(".")]:[si,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=E(i[2])?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+Te+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Te+")","i"),i=>i&&i[2]?[Te,[i[2],i[3],i[4]||"0"].join(".")]:[Te,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];return i&&i[1]&&(e[1]=[i[1],i[2],i[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Sa,""]],[/Linux|debian/i,["Linux",""]]],Zs=function(i){return $a.test(i)?Dt:Ia.test(i)?Nt:Fa.test(i)?ht:new RegExp(Qi,"i").test(i)?Qi:new RegExp("("+Zi+"|WPDesktop)","i").test(i)?Zi:/iPad/.test(i)?on:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?un:Ts.test(i)?pt:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(Js,"i").test(i)?Js:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?new RegExp(he).test(i)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)||/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?Te:an:new RegExp("(pda|"+he+")","i").test(i)?Ra:new RegExp(dt,"i").test(i)&&!new RegExp(dt+" pc","i").test(i)?bn:""},Ma=i=>i instanceof Error;function Aa(i){var e=globalThis._posthogChunkIds;if(e){var t=Object.keys(e);return Ri&&t.length===Ys||(Ys=t.length,Ri=t.reduce(((s,r)=>{Xt||(Xt={});var n=Xt[r];if(n)s[n[0]]=n[1];else for(var a=i(r),o=a.length-1;o>=0;o--){var l=a[o],c=l==null?void 0:l.filename,u=e[r];if(c&&u){s[c]=u,Xt[r]=[c,u];break}}return s}),{})),Ri}}class La{constructor(e,t,s){s===void 0&&(s=[]),this.coercers=e,this.stackParser=t,this.modifiers=s}buildFromUnknown(e,t){t===void 0&&(t={});var s=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(s,t,0).apply(e),n=this.buildParsingContext(t),a=this.parseStacktrace(r,n);return{$exception_list:this.convertToExceptionList(a,s),$exception_level:"error"}}modifyFrames(e){var t=this;return we((function*(){for(var s of e)s.stacktrace&&s.stacktrace.frames&&D(s.stacktrace.frames)&&(s.stacktrace.frames=yield t.applyModifiers(s.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)==null?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var s,r;return e.cause!=null&&(s=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),y({},e,{cause:s,stack:r})}applyChunkIds(e,t){return e.map((s=>(s.filename&&t&&(s.chunk_id=t[s.filename]),s)))}applyCoercers(e,t){for(var s of this.coercers)if(s.match(e))return s.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return we((function*(){var s=e;for(var r of t.modifiers)s=yield r(s);return s}))()}convertToExceptionList(e,t){var s,r,n,a={type:e.type,value:e.value,mechanism:{type:(s=t.type)!==null&&s!==void 0?s:"generic",handled:(r=t.handled)===null||r===void 0||r,synthetic:(n=e.synthetic)!==null&&n!==void 0&&n}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var o=[a];return e.cause!=null&&o.push(...this.convertToExceptionList(e.cause,y({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:Aa(this.stackParser),skipFirstLines:(t=e.skipFirstLines)!==null&&t!==void 0?t:1}}buildCoercingContext(e,t,s){s===void 0&&(s=0);var r=(n,a)=>{if(4>=a){var o=this.buildCoercingContext(e,t,a);return this.applyCoercers(n,o)}};return y({},t,{syntheticException:s==0?t.syntheticException:void 0,mechanism:e,apply:n=>r(n,s),next:n=>r(n,s+1)})}}var vt="?";function ts(i,e,t,s,r){var n={platform:i,filename:e,function:t===""?vt:t,in_app:!0};return E(s)||(n.lineno=s),E(r)||(n.colno=r),n}var En=(i,e)=>{var t=i.indexOf("safari-extension")!==-1,s=i.indexOf("safari-web-extension")!==-1;return t||s?[i.indexOf("@")!==-1?i.split("@")[0]:vt,t?"safari-extension:"+e:"safari-web-extension:"+e]:[i,e]},Da=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Na=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ha=/\((\S*)(?::(\d+))(?::(\d+))\)/,ja=(i,e)=>{var t=Da.exec(i);if(t){var[,s,r,n]=t;return ts(e,s,vt,+r,+n)}var a=Na.exec(i);if(a){if(a[2]&&a[2].indexOf("eval")===0){var o=Ha.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,c]=En(a[1]||vt,a[2]);return ts(e,c,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},qa=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ua=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,za=(i,e)=>{var t=qa.exec(i);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var s=Ua.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}var r=t[3],n=t[1]||vt;return[n,r]=En(n,r),ts(e,r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Qs=/\(error: (.*)\)/;class Xa{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var s=W(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:s?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ii(e,"DOMException")}isDOMError(e){return ii(e,"DOMError")}}class Va{match(e){return(t=>t instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var s=e.message;return String(s.error&&typeof s.error.message=="string"?s.error.message:s)}getStack(e){return e.stacktrace||e.stack||void 0}}class Ba{constructor(){}match(e){return ii(e,"ErrorEvent")&&e.error!=null}coerce(e,t){var s;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}var Ga=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Wa{match(e){return typeof e=="string"}coerce(e,t){var s,[r,n]=this.getInfos(e);return{type:r??"Error",value:n??e,stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}getInfos(e){var t="Error",s=e,r=e.match(Ga);return r&&(t=r[1],s=r[2]),[t,s]}}var Ya=["fatal","error","warning","log","info","debug"];function xn(i,e){e===void 0&&(e=40);var t=Object.keys(i);if(t.sort(),!t.length)return"[object has no keys]";for(var s=t.length;s>0;s--){var r=t.slice(0,s).join(", ");if(e>=r.length)return s===t.length?r:r.length>e?r.slice(0,e)+"...":r}return""}class Ja{match(e){return typeof e=="object"&&e!==null}coerce(e,t){var s,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(s=t.syntheticException)==null?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return Fs(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var t="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&typeof e.message=="string")return e.message;var s=this.getObjectClassName(e);return(s&&s!=="Object"?"'"+s+"'":"Object")+" captured as exception with keys: "+xn(e)}isSeverityLevel(e){return W(e)&&!Zt(e)&&Ya.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var s=e[t];if(Ma(s))return s}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}}class Ka{match(e){return Fs(e)}coerce(e,t){var s,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+xn(e),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class Za{match(e){return nn(e)}coerce(e,t){var s;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class Qa{match(e){return ii(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!Fs(e))return!1;try{var t=e.detail;return t!=null&&typeof t=="object"&&"reason"in t}catch{return!1}}coerce(e,t){var s,r=this.getUnhandledRejectionReason(e);return nn(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var kn=function(i,e){var{debugEnabled:t}=e===void 0?{}:e,s={C(r){if(p&&(ne.DEBUG||F.POSTHOG_DEBUG||t)&&!E(p.console)&&p.console){for(var n=("__rrweb_original__"in p.console[r])?p.console[r].__rrweb_original__:p.console[r],a=arguments.length,o=new Array(a>1?a-1:0),l=1;a>l;l++)o[l-1]=arguments[l];n(i,...o)}},info(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("log",...n)},warn(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("warn",...n)},error(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("error",...n)},critical(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];console.error(i,...n)},uninitializedWarning(r){s.error("You must initialize PostHog before calling "+r)},createLogger:(r,n)=>kn(i+" "+r,n)};return s},w=kn("[PostHog.js]"),z=w.createLogger,eo=z("[ExternalScriptsLoader]"),Ii=(i,e,t)=>{if(i.config.disable_external_dependency_loading)return eo.warn(e+" was requested but loading of external scripts is disabled."),t("Loading of external scripts is disabled");var s=b==null?void 0:b.querySelectorAll("script");if(s){for(var r,n=function(){if(s[a].src===e){var l=s[a];return l.__posthog_loading_callback_fired?{v:t()}:(l.addEventListener("load",(c=>{l.__posthog_loading_callback_fired=!0,t(void 0,c)})),l.onerror=c=>t(c),{v:void 0})}},a=0;s.length>a;a++)if(r=n())return r.v}var o=()=>{if(!b)return t("document not found");var l=b.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=h=>{l.__posthog_loading_callback_fired=!0,t(void 0,h)},l.onerror=h=>t(h),i.config.prepare_external_dependency_script&&(l=i.config.prepare_external_dependency_script(l)),!l)return t("prepare_external_dependency_script returned null");if(i.config.external_scripts_inject_target==="head")b.head.appendChild(l);else{var c,u=b.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):b.body.appendChild(l)}};b!=null&&b.body?o():b==null||b.addEventListener("DOMContentLoaded",o)};F.__PosthogExtensions__=F.__PosthogExtensions__||{},F.__PosthogExtensions__.loadExternalDependency=(i,e,t)=>{if(e!=="remote-config"){var s;if(i.config.__preview_external_dependency_versioned_paths)s=i.requestRouter.endpointFor("assets","/static/"+i.version+"/"+e+".js");else{var r="/static/"+e+".js?v="+i.version;if(e==="toolbar"){var n=3e5;r=r+"&t="+Math.floor(Date.now()/n)*n}s=i.requestRouter.endpointFor("assets",r)}Ii(i,s,t)}else{var a=i.requestRouter.endpointFor("assets","/array/"+i.config.token+"/config.js");Ii(i,a,t)}},F.__PosthogExtensions__.loadSiteApp=(i,e,t)=>{var s=i.requestRouter.endpointFor("api",e);Ii(i,s,t)};var Sn="$people_distinct_id",ri="$device_id",Pt="__alias",Rt="__timers",er="$autocapture_disabled_server_side",is="$heatmaps_enabled_server_side",tr="$exception_capture_enabled_server_side",ss="$error_tracking_suppression_rules",ir="$error_tracking_capture_extension_exceptions",sr="$web_vitals_enabled_server_side",Pn="$dead_clicks_enabled_server_side",rs="$product_tours_enabled_server_side",rr="$web_vitals_allowed_metrics",Ft="$session_recording_remote_config",ni="$sesid",Rn="$session_is_sampled",lt="$enabled_feature_flags",It="$early_access_features",ns="$feature_flag_details",as="$feature_flag_payloads",rt="$override_feature_flag_payloads",$t="$stored_person_properties",Ge="$stored_group_properties",os="$surveys",Fn="$surveys_activated",Qt="ph_product_tours",Ot="$flag_call_reported",ls="$flag_call_reported_session_id",us="$feature_flag_errors",ai="$feature_flag_evaluated_at",be="$user_state",cs="$client_session_props",hs="$capture_rate_limit",ds="$initial_campaign_params",ps="$initial_referrer_info",oi="$initial_person_info",li="$epp",In="__POSTHOG_TOOLBAR__",Vt="$posthog_cookieless",to=[Sn,Pt,"__cmpns",Rt,"$session_recording_enabled_server_side",is,ni,lt,ss,be,It,ns,Ge,$t,os,Ot,ls,us,ai,cs,hs,ds,ps,li,oi,Qt,"$product_tours_activated",rs,Fn,Ft,as,rt],Os="PostHog loadExternalDependency extension not found.",$e="on_reject",Ee="always",Ke="anonymous",Ze="identified",vs="identified_only",ui="visibilitychange",ci="beforeunload",nt="$pageview",$i="$pageleave",Ci="$identify",nr="$groupidentify";function Bt(i,e){D(i)&&i.forEach(e)}function q(i,e){if(!L(i))if(D(i))i.forEach(e);else if(ba(i))i.forEach(((s,r)=>e(s,r)));else for(var t in i)rn.call(i,t)&&e(i[t],t)}var B=function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;e>s;s++)t[s-1]=arguments[s];for(var r of t)for(var n in r)r[n]!==void 0&&(i[n]=r[n]);return i};function ei(i){for(var e=Object.keys(i),t=e.length,s=new Array(t);t--;)s[t]=[e[t],i[e[t]]];return s}var ar=function(i){try{return i()}catch{return}},io=function(i){return function(){try{for(var e=arguments.length,t=new Array(e),s=0;e>s;s++)t[s]=arguments[s];return i.apply(this,t)}catch(r){w.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),w.critical(r)}}},Ms=function(i){var e={};return q(i,(function(t,s){(W(t)&&t.length>0||xe(t))&&(e[s]=t)})),e},so=["herokuapp.com","vercel.app","netlify.app"];function ro(i){var e=i==null?void 0:i.hostname;if(!W(e))return!1;var t=e.split(".").slice(-2).join(".");for(var s of so)if(t===s)return!1;return!0}function G(i,e,t,s){var{capture:r=!1,passive:n=!0}=s??{};i==null||i.addEventListener(e,t,{capture:r,passive:n})}function $n(i){return i.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(i){return 0>i?Math.ceil(i):Math.floor(i)}),Number.isInteger||(Number.isInteger=function(i){return xe(i)&&isFinite(i)&&Math.floor(i)===i});class hi{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,s,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(s)||!Number.isInteger(r)||0>e||0>t||0>s||0>r||e>0xffffffffffff||t>4095||s>1073741823||r>4294967295)throw new RangeError("invalid field value");var n=new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/Math.pow(2,8),n[5]=e,n[6]=112|t>>>8,n[7]=t,n[8]=128|s>>>24,n[9]=s>>>16,n[10]=s>>>8,n[11]=s,n[12]=r>>>24,n[13]=r>>>16,n[14]=r>>>8,n[15]=r,new hi(n)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new hi(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;16>t;t++){var s=this.bytes[t]-e.bytes[t];if(s!==0)return Math.sign(s)}return 0}}class no{constructor(){this.I=0,this.S=0,this.k=new ao}generate(){var e=this.generateOrAbort();if(E(e)){this.I=0;var t=this.generateOrAbort();if(E(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.I)this.I=e,this.A();else{if(this.I>=e+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return hi.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var or,Cn=i=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;i.length>e;e++)i[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return i};p&&!E(p.crypto)&&crypto.getRandomValues&&(Cn=i=>crypto.getRandomValues(i));class ao{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(Cn(this.T),this.N=0),this.T[this.N++]}}var je=()=>oo().toString(),oo=()=>(or||(or=new no)).generate(),_t="",lo=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Se={Ut:()=>!!b,Yt(i){w.error("cookieStore error: "+i)},Gt(i){if(b){try{for(var e=i+"=",t=b.cookie.split(";").filter((n=>n.length)),s=0;t.length>s;s++){for(var r=t[s];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},Wt(i){var e;try{e=JSON.parse(Se.Gt(i))||{}}catch{}return e},Xt(i,e,t,s,r){if(b)try{var n="",a="",o=(function(u,h){if(h){var d=(function(g,f){if(f===void 0&&(f=b),_t)return _t;if(!f||["localhost","127.0.0.1"].includes(g))return"";for(var $=g.split("."),k=Math.min($.length,8),C="dmn_chk_"+je();!_t&&k--;){var R=$.slice(k).join("."),I=C+"=1;domain=."+R+";path=/";f.cookie=I+";max-age=3",f.cookie.includes(C)&&(f.cookie=I+";max-age=0",_t=R)}return _t})(u);if(!d){var v=(g=>{var f=g.match(lo);return f?f[0]:""})(u);v!==d&&w.info("Warning: cookie subdomain discovery mismatch",v,d),d=v}return d?"; domain=."+d:""}return""})(b.location.hostname,s);if(t){var l=new Date;l.setTime(l.getTime()+864e5*t),n="; expires="+l.toUTCString()}r&&(a="; secure");var c=i+"="+encodeURIComponent(JSON.stringify(e))+n+"; SameSite=Lax; path=/"+o+a;return c.length>3686.4&&w.warn("cookieStore warning: large cookie, len="+c.length),b.cookie=c,c}catch{return}},Jt(i,e){if(b!=null&&b.cookie)try{Se.Xt(i,"",-1,e)}catch{return}}},Ti=null,X={Ut(){if(!Oe(Ti))return Ti;var i=!0;if(E(p))i=!1;else try{var e="__mplssupport__";X.Xt(e,"xyz"),X.Gt(e)!=='"xyz"'&&(i=!1),X.Jt(e)}catch{i=!1}return i||w.error("localStorage unsupported; falling back to cookie store"),Ti=i,i},Yt(i){w.error("localStorage error: "+i)},Gt(i){try{return p==null?void 0:p.localStorage.getItem(i)}catch(e){X.Yt(e)}return null},Wt(i){try{return JSON.parse(X.Gt(i))||{}}catch{}return null},Xt(i,e){try{p==null||p.localStorage.setItem(i,JSON.stringify(e))}catch(t){X.Yt(t)}},Jt(i){try{p==null||p.localStorage.removeItem(i)}catch(e){X.Yt(e)}}},uo=[ri,"distinct_id",ni,Rn,li,oi,be],Gt={},co={Ut:()=>!0,Yt(i){w.error("memoryStorage error: "+i)},Gt:i=>Gt[i]||null,Wt:i=>Gt[i]||null,Xt(i,e){Gt[i]=e},Jt(i){delete Gt[i]}},Xe=null,ee={Ut(){if(!Oe(Xe))return Xe;if(Xe=!0,E(p))Xe=!1;else try{var i="__support__";ee.Xt(i,"xyz"),ee.Gt(i)!=='"xyz"'&&(Xe=!1),ee.Jt(i)}catch{Xe=!1}return Xe},Yt(i){w.error("sessionStorage error: ",i)},Gt(i){try{return p==null?void 0:p.sessionStorage.getItem(i)}catch(e){ee.Yt(e)}return null},Wt(i){try{return JSON.parse(ee.Gt(i))||null}catch{}return null},Xt(i,e){try{p==null||p.sessionStorage.setItem(i,JSON.stringify(e))}catch(t){ee.Yt(t)}},Jt(i){try{p==null||p.sessionStorage.removeItem(i)}catch(e){ee.Yt(e)}}};class ho{constructor(e){this._instance=e}get Rt(){return this._instance.config}get consent(){return this.Kt()?0:this.Qt}isOptedOut(){return this.Rt.cookieless_mode===Ee||this.consent===0||this.consent===-1&&(this.Rt.opt_out_capturing_by_default||this.Rt.cookieless_mode===$e)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}optInOut(e){this.ti.Xt(this.ei,e?1:0,this.Rt.cookie_expiration,this.Rt.cross_subdomain_cookie,this.Rt.secure_cookie)}reset(){this.ti.Jt(this.ei,this.Rt.cross_subdomain_cookie)}get ei(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:s}=this._instance.config;return s||(t?t+e:"__ph_opt_in_out_"+e)}get Qt(){var e=this.ti.Gt(this.ei);return Pi(e)?1:M(xa,e)?0:-1}get ti(){var e=this.Rt.opt_out_capturing_persistence_type,t=e==="localStorage"?X:Se;if(!this.ii||this.ii!==t){this.ii=t;var s=e==="localStorage"?Se:X;s.Gt(this.ei)&&(this.ii.Gt(this.ei)||this.optInOut(Pi(s.Gt(this.ei))),s.Jt(this.ei,this.Rt.cross_subdomain_cookie))}return this.ii}Kt(){return!!this.Rt.respect_dnt&&[ce==null?void 0:ce.doNotTrack,ce==null?void 0:ce.msDoNotTrack,F.doNotTrack].some((e=>Pi(e)))}}var Wt=z("[Dead Clicks]"),po=()=>!0,vo=i=>{var e,t=!((e=i.instance.persistence)==null||!e.get_property(Pn)),s=i.instance.config.capture_dead_clicks;return Pe(s)?s:!!J(s)||t};class lr{get lazyLoadedDeadClicksAutocapture(){return this.ri}constructor(e,t,s){this.instance=e,this.isEnabled=t,this.onCapture=s,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[Pn]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ni((()=>{this.si()})):this.stop()}ni(e){var t,s;(t=F.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture&&e(),(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?Wt.error("failed to load script",r):e()}))}si(){var e;if(b){if(!this.ri&&(e=F.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=J(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ri=F.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ri.start(b),Wt.info("starting...")}}else Wt.error("`document` not found. Cannot start.")}stop(){this.ri&&(this.ri.stop(),this.ri=void 0,Wt.info("stopping..."))}}var Oi=z("[SegmentIntegration]"),Tn="posthog-js";function On(i,e){var{organization:t,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=e===void 0?{}:e;return o=>{var l,c,u,h,d;if(n!=="*"&&!n.includes(o.level)||!i.__loaded)return o;o.tags||(o.tags={});var v=i.requestRouter.endpointFor("ui","/project/"+i.config.token+"/person/"+i.get_distinct_id());o.tags["PostHog Person URL"]=v,i.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=i.get_session_replay_url({withTimestamp:!0}));var g,f=((l=o.exception)==null?void 0:l.values)||[],$=f.map((C=>y({},C,{stacktrace:C.stacktrace?y({},C.stacktrace,{type:"raw",frames:(C.stacktrace.frames||[]).map((R=>y({},R,{platform:"web:javascript"})))}):void 0}))),k={$exception_message:((c=f[0])==null?void 0:c.value)||o.message,$exception_type:(u=f[0])==null?void 0:u.type,$exception_level:o.level,$exception_list:$,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:((h=f[0])==null?void 0:h.value)||o.message,$sentry_exception_type:(d=f[0])==null?void 0:d.type,$sentry_tags:o.tags};return t&&s&&(k.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+s+"&query="+o.event_id),a&&((g=i.exceptions)==null||g.sendExceptionEvent(k)),o}}class go{constructor(e,t,s,r,n,a){this.name=Tn,this.setupOnce=function(o){o(On(e,{organization:t,projectId:s,prefix:r,severityAllowList:n,sendExceptionsToPostHog:a==null||a}))}}}class ur{constructor(e){this.oi=(t,s,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength)&&(w.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:t,changeReason:r}),this.ai=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.li()}li(){var e;this.ui=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.oi)}destroy(){var e;(e=this.ui)==null||e.call(this),this.ui=void 0}doPageView(e,t){var s,r=this.hi(e,t);return this.ai={pathname:(s=p==null?void 0:p.location.pathname)!==null&&s!==void 0?s:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.hi(e,(t=this.ai)==null?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.ai)==null?void 0:e.pageViewId}}hi(e,t){var s=this.ai;if(!s)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:s.pageViewId},n=this._instance.scrollManager.getContext();if(n&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:o,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:h}=n;if(!(E(a)||E(o)||E(l)||E(c)||E(u)||E(h))){a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h);var d=a>1?Re(o/a,0,1,w):1,v=a>1?Re(l/a,0,1,w):1,g=c>1?Re(u/c,0,1,w):1,f=c>1?Re(h/c,0,1,w):1;r=B(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:f})}}return s.pathname&&(r.$prev_pageview_pathname=s.pathname),s.timestamp&&(r.$prev_pageview_duration=(e.getTime()-s.timestamp.getTime())/1e3),r}}var di=i=>{var e=b==null?void 0:b.createElement("a");return E(e)?null:(e.href=i,e)},pi=function(i,e){for(var t,s=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===e){t=n;break}}if(!D(t)||2>t.length)return"";var a=t[1];try{a=decodeURIComponent(a)}catch{w.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Ht=function(i,e,t){if(!i||!e||!e.length)return i;for(var s=i.split("#"),r=s[1],n=(s[0]||"").split("?"),a=n[1],o=n[0],l=(a||"").split("&"),c=[],u=0;l.length>u;u++){var h=l[u].split("=");D(h)&&(e.includes(h[0])?c.push(h[0]+"="+t):c.push(l[u]))}var d=o;return a!=null&&(d+="?"+c.join("&")),r!=null&&(d+="#"+r),d},vi=function(i,e){var t=i.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Yt="https?://(.*)",gt=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],fo=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...gt],jt="",_o=["li_fat_id"];function Mn(i,e,t){if(!b)return{};var s,r=e?[...gt,...t||[]]:[],n=An(Ht(b.URL,r,jt),i),a=(s={},q(_o,(function(o){var l=Se.Gt(o);s[o]=l||null})),s);return B(a,n)}function An(i,e){var t=fo.concat(e||[]),s={};return q(t,(function(r){var n=pi(i,r);s[r]=n||null})),s}function Ln(i){var e=(function(n){return n?n.search(Yt+"google.([^/?]*)")===0?"google":n.search(Yt+"bing.com")===0?"bing":n.search(Yt+"yahoo.com")===0?"yahoo":n.search(Yt+"duckduckgo.com")===0?"duckduckgo":null:null})(i),t=e!="yahoo"?"q":"p",s={};if(!Oe(e)){s.$search_engine=e;var r=b?pi(b.referrer,t):"";r.length&&(s.ph_keyword=r)}return s}function cr(){return navigator.language||navigator.userLanguage}var gi="$direct";function Dn(){return(b==null?void 0:b.referrer)||gi}function Nn(i,e){var t=i?[...gt,...e||[]]:[],s=Q==null?void 0:Q.href.substring(0,1e3);return{r:Dn().substring(0,1e3),u:s?Ht(s,t,jt):void 0}}function Hn(i){var e,{r:t,u:s}=i,r={$referrer:t,$referring_domain:t==null?void 0:t==gi?gi:(e=di(t))==null?void 0:e.host};if(s){r.$current_url=s;var n=di(s);r.$host=n==null?void 0:n.host,r.$pathname=n==null?void 0:n.pathname;var a=An(s);B(r,a)}if(t){var o=Ln(t);B(r,o)}return r}function jn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function mo(){try{return new Date().getTimezoneOffset()}catch{return}}var yo=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Mi{constructor(e,t){this.Rt=e,this.props={},this.ci=!1,this.di=(s=>{var r="";return s.token&&(r=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+r+"_posthog"})(e),this.ti=this.vi(e),this.load(),e.debug&&w.info("Persistence loaded",e.persistence,y({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.fi}vi(e){yo.indexOf(e.persistence.toLowerCase())===-1&&(w.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=(function(r){r===void 0&&(r=[]);var n=[...uo,...r];return y({},X,{Wt(a){try{var o={};try{o=Se.Wt(a)||{}}catch{}var l=B(o,JSON.parse(X.Gt(a)||"{}"));return X.Xt(a,l),l}catch{}return null},Xt(a,o,l,c,u,h){try{X.Xt(a,o,void 0,void 0,h);var d={};n.forEach((v=>{o[v]&&(d[v]=o[v])})),Object.keys(d).length&&Se.Xt(a,d,l,c,u,h)}catch(v){X.Yt(v)}},Jt(a,o){try{p==null||p.localStorage.removeItem(a),Se.Jt(a,o)}catch(l){X.Yt(l)}}})})(e.cookie_persisted_properties||[]),s=e.persistence.toLowerCase();return s==="localstorage"&&X.Ut()?X:s==="localstorage+cookie"&&t.Ut()?t:s==="sessionstorage"&&ee.Ut()?ee:s==="memory"?co:s==="cookie"?Se:t.Ut()?t:Se}pi(e){var t=e??this.Rt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var s=this.props[ai];return!s||typeof s!="number"||Date.now()-s>t}properties(){var e={};return q(this.props,((t,s)=>{if(s===lt&&J(t)){if(!this.pi())for(var r=Object.keys(t),n=0;r.length>n;n++)e["$feature/"+r[n]]=t[r[n]]}else to.indexOf(s)===-1&&(e[s]=t)})),e}load(){if(!this.fi){var e=this.ti.Wt(this.di);e&&(this.props=B({},e))}}save(){this.fi||this.ti.Xt(this.di,this.props,this.gi,this.mi,this.yi,this.Rt.debug)}remove(){this.ti.Jt(this.di,!1),this.ti.Jt(this.di,!0)}clear(){this.remove(),this.props={}}register_once(e,t,s){if(J(e)){E(t)&&(t="None"),this.gi=E(s)?this.bi:s;var r=!1;if(q(e,((n,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==t||(this.props[a]=n,r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(J(e)){this.gi=E(t)?this.bi:t;var s=!1;if(q(e,((r,n)=>{e.hasOwnProperty(n)&&this.props[n]!==r&&(this.props[n]=r,s=!0)})),s)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.ci){var e=Mn(this.Rt.custom_campaign_params,this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties);ot(Ms(e))||this.register(e),this.ci=!0}}update_search_keyword(){var e;this.register((e=b==null?void 0:b.referrer)?Ln(e):{})}update_referrer_info(){var e;this.register_once({$referrer:Dn(),$referring_domain:b!=null&&b.referrer&&((e=di(b.referrer))==null?void 0:e.host)||gi},void 0)}set_initial_person_info(){this.props[ds]||this.props[ps]||this.register_once({[oi]:Nn(this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};q([ps,ds],(a=>{var o=this.props[a];o&&q(o,(function(l,c){e["$initial_"+Ki(c)]=l}))}));var t,s,r=this.props[oi];if(r){var n=(t=Hn(r),s={},q(t,(function(a,o){s["$initial_"+Ki(o)]=a})),s);B(e,n)}return e}safe_merge(e){return q(this.props,(function(t,s){s in e||(e[s]=t)})),e}update_config(e,t,s){if(this.bi=this.gi=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!s),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((a,o)=>{if(a.length!==o.length)return!1;var l=[...a].sort(),c=[...o].sort();return l.every(((u,h)=>u===c[h]))})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.vi(e),n=this.props;this.clear(),this.ti=r,this.props=n,this.save()}}set_disabled(e){this.fi=e,this.fi?this.remove():this.save()}set_cross_subdomain(e){e!==this.mi&&(this.mi=e,this.remove(),this.save())}set_secure(e){e!==this.yi&&(this.yi=e,this.remove(),this.save())}set_event_timer(e,t){var s=this.props[Rt]||{};s[e]=t,this.props[Rt]=s,this.save()}remove_event_timer(e){var t=(this.props[Rt]||{})[e];return E(t)||(delete this.props[Rt][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var mt={Activation:"events",Cancellation:"cancelEvents"},Ai={Popover:"popover",API:"api",Widget:"widget"},Ct={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Li={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},gs={Popover:"popover",Inline:"inline"},bo={SHOWN:"product tour shown"},hr={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},dr=z("[RateLimiter]");class wo{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=t=>{var s=t.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach((r=>{dr.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void dr.warn('could not rate limit - continuing. Error: "'+(r==null?void 0:r.message)+'"',{text:s})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,s,r;e===void 0&&(e=!1);var{captureEventsBurstLimit:n,captureEventsPerSecond:a}=this,o=new Date().getTime(),l=(t=(s=this.instance.persistence)==null?void 0:s.get_property(hs))!==null&&t!==void 0?t:{tokens:n,last:o};l.tokens+=(o-l.last)/1e3*a,l.last=o,l.tokens>n&&(l.tokens=n);var c=1>l.tokens;return c||e||(l.tokens=Math.max(0,l.tokens-1)),!c||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+n+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(r=this.instance.persistence)==null||r.set_property(hs,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()e(this.remoteConfig))):e()}Ii(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return yt.info("Using preloaded remote config",this.remoteConfig),this.Ci(this.remoteConfig),void this.Si();if(this._instance.ki())return void yt.warn("Remote config is disabled. Falling back to local config.");this.wi((e=>{if(!e)return yt.info("No config found after loading remote JS config. Falling back to JSON."),void this.Ii((t=>{this.Ci(t),this.Si()}));this.Ci(e),this.Si()}))}catch(e){yt.error("Error loading remote config",e)}}stop(){this.xi&&(clearInterval(this.xi),this.xi=void 0)}refresh(){this._instance.ki()||(b==null?void 0:b.visibilityState)==="hidden"||this._instance.reloadFeatureFlags()}Si(){var e;if(!this.xi){var t=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;t!==0&&(this.xi=setInterval((()=>{this.refresh()}),t))}}Ci(e){var t;e||yt.error("Failed to fetch remote config from PostHog."),this._instance.Ci(e??{}),(e==null?void 0:e.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(t=this._instance.featureFlags)==null||t.ensureFlagsLoaded())}}var ke={GZipJS:"gzip-js",Base64:"base64"},fe=Uint8Array,le=Uint16Array,ft=Uint32Array,As=new fe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ls=new fe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pr=new fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Un=function(i,e){for(var t=new le(31),s=0;31>s;++s)t[s]=e+=1<s;++s)for(var n=t[s];t[s+1]>n;++n)r[n]=n-t[s]<<5|s;return[t,r]},zn=Un(As,2),fs=zn[1];zn[0][28]=258,fs[258]=28;for(var vr=Un(Ls,0)[1],Xn=new le(32768),U=0;32768>U;++U){var Qe=(43690&U)>>>1|(21845&U)<<1;Xn[U]=((65280&(Qe=(61680&(Qe=(52428&Qe)>>>2|(13107&Qe)<<2))>>>4|(3855&Qe)<<4))>>>8|(255&Qe)<<8)>>>1}var Mt=function(i,e,t){for(var s=i.length,r=0,n=new le(e);s>r;++r)++n[i[r]-1];var a,o=new le(e);for(r=0;e>r;++r)o[r]=o[r-1]+n[r-1]<<1;for(a=new le(s),r=0;s>r;++r)a[r]=Xn[o[i[r]-1]++]>>>15-i[r];return a},Ye=new fe(288);for(U=0;144>U;++U)Ye[U]=8;for(U=144;256>U;++U)Ye[U]=9;for(U=256;280>U;++U)Ye[U]=7;for(U=280;288>U;++U)Ye[U]=8;var fi=new fe(32);for(U=0;32>U;++U)fi[U]=5;var Eo=Mt(Ye,9),xo=Mt(fi,5),Vn=function(i){return(i/8>>0)+(7&i&&1)},Bn=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var s=new(i instanceof le?le:i instanceof ft?ft:fe)(t-e);return s.set(i.subarray(e,t)),s},Ie=function(i,e,t){var s=e/8>>0;i[s]|=t<<=7&e,i[s+1]|=t>>>8},bt=function(i,e,t){var s=e/8>>0;i[s]|=t<<=7&e,i[s+1]|=t>>>8,i[s+2]|=t>>>16},Di=function(i,e){for(var t=[],s=0;i.length>s;++s)i[s]&&t.push({s,f:i[s]});var r=t.length,n=t.slice();if(!r)return[new fe(0),0];if(r==1){var a=new fe(t[0].s+1);return a[t[0].s]=1,[a,1]}t.sort((function(_,S){return _.f-S.f})),t.push({s:-1,f:25001});var o=t[0],l=t[1],c=0,u=1,h=2;for(t[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=r-1;)o=t[t[h].f>t[c].f?c++:h++],l=t[c!=u&&t[h].f>t[c].f?c++:h++],t[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var v=new le(d+1),g=_s(t[u-1],v,0);if(g>e){s=0;var f=0,$=g-e,k=1<<$;for(n.sort((function(_,S){return v[S.s]-v[_.s]||_.f-S.f}));r>s;++s){var C=n[s].s;if(e>=v[C])break;f+=k-(1<>>=$;f>0;){var R=n[s].s;e>v[R]?f-=1<=0&&f;--s){var I=n[s].s;v[I]==e&&(--v[I],++f)}g=e}return[new fe(v),g]},_s=function(i,e,t){return i.s==-1?Math.max(_s(i.l,e,t+1),_s(i.r,e,t+1)):e[i.s]=t},gr=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new le(++e),s=0,r=i[0],n=1,a=function(l){t[s++]=l},o=1;e>=o;++o)if(i[o]==r&&o!=e)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=i[o]}return[t.subarray(0,s),e]},wt=function(i,e){for(var t=0,s=0;e.length>s;++s)t+=i[s]*e[s];return t},ms=function(i,e,t){var s=t.length,r=Vn(e+2);i[r]=255&s,i[r+1]=s>>>8,i[r+2]=255^i[r],i[r+3]=255^i[r+1];for(var n=0;s>n;++n)i[r+n+4]=t[n];return 8*(r+4+s)},fr=function(i,e,t,s,r,n,a,o,l,c,u){Ie(e,u++,t),++r[256];for(var h=Di(r,15),d=h[0],v=h[1],g=Di(n,15),f=g[0],$=g[1],k=gr(d),C=k[0],R=k[1],I=gr(f),_=I[0],S=I[1],x=new le(19),m=0;C.length>m;++m)x[31&C[m]]++;for(m=0;_.length>m;++m)x[31&_[m]]++;for(var P=Di(x,7),T=P[0],O=P[1],A=19;A>4&&!T[pr[A-1]];--A);var H,N,Y,Z,ae=c+5<<3,V=wt(r,Ye)+wt(n,fi)+a,ie=wt(r,d)+wt(n,f)+a+14+3*A+wt(x,T)+(2*x[16]+3*x[17]+7*x[18]);if(V>=ae&&ie>=ae)return ms(e,u,i.subarray(l,l+c));if(Ie(e,u,1+(V>ie)),u+=2,V>ie){H=Mt(d,v),N=d,Y=Mt(f,$),Z=f;var de=Mt(T,O);for(Ie(e,u,R-257),Ie(e,u+5,S-1),Ie(e,u+10,A-4),u+=14,m=0;A>m;++m)Ie(e,u+3*m,T[pr[m]]);u+=3*A;for(var pe=[C,_],Fe=0;2>Fe;++Fe){var ue=pe[Fe];for(m=0;ue.length>m;++m)Ie(e,u,de[_e=31&ue[m]]),u+=T[_e],_e>15&&(Ie(e,u,ue[m]>>>5&127),u+=ue[m]>>>12)}}else H=Eo,N=Ye,Y=xo,Z=fi;for(m=0;o>m;++m)if(s[m]>255){var _e;bt(e,u,H[257+(_e=s[m]>>>18&31)]),u+=N[_e+257],_e>7&&(Ie(e,u,s[m]>>>23&31),u+=As[_e]);var me=31&s[m];bt(e,u,Y[me]),u+=Z[me],me>3&&(bt(e,u,s[m]>>>5&8191),u+=Ls[me])}else bt(e,u,H[s[m]]),u+=N[s[m]];return bt(e,u,H[256]),u+N[256]},ko=new ft([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),So=(function(){for(var i=new ft(256),e=0;256>e;++e){for(var t=e,s=9;--s;)t=(1&t&&3988292384)^t>>>1;i[e]=t}return i})(),Ni=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function Po(i,e){e===void 0&&(e={});var t=(function(){var h=4294967295;return{p(d){for(var v=h,g=0;d.length>g;++g)v=So[255&v^d[g]]^v>>>8;h=v},d(){return 4294967295^h}}})(),s=i.length;t.p(i);var r,n,a,o,l,c=(o=10+((r=e).filename&&r.filename.length+1||0),l=8,(function(h,d,v,g,f,$){var k=h.length,C=new fe(g+k+5*(1+Math.floor(k/7e3))+f),R=C.subarray(g,C.length-f),I=0;if(!d||8>k)for(var _=0;k>=_;_+=65535){var S=_+65535;k>S?I=ms(R,I,h.subarray(_,S)):(R[_]=!0,I=ms(R,I,h.subarray(_,k)))}else{for(var x=ko[d-1],m=x>>>13,P=8191&x,T=(1<_;++_){var _e=Y(_),me=32767&_,Je=A[_e];if(O[me]=Je,A[_e]=me,_>=Fe){var Ut=k-_;if((ie>7e3||pe>24576)&&Ut>423){I=fr(h,R,0,Z,ae,V,de,pe,ue,_-ue,I),pe=ie=de=0,ue=_;for(var ye=0;286>ye;++ye)ae[ye]=0;for(ye=0;30>ye;++ye)V[ye]=0}var ze=2,zt=0,ha=P,Me=me-Je&32767;if(Ut>2&&_e==Y(_-Me))for(var da=Math.min(m,Ut)-1,pa=Math.min(32767,_),va=Math.min(258,Ut);pa>=Me&&--ha&&me!=Je;){if(h[_+ze]==h[_+ze-Me]){for(var Ae=0;va>Ae&&h[_+Ae]==h[_+Ae-Me];++Ae);if(Ae>ze){if(ze=Ae,zt=Me,Ae>da)break;var ga=Math.min(Me,Ae-2),qs=0;for(ye=0;ga>ye;++ye){var ki=_-Me+ye+32768&32767,Us=ki-O[ki]+32768&32767;Us>qs&&(qs=Us,Je=ki)}}}Me+=(me=Je)-(Je=O[me])+32768&32767}if(zt){Z[pe++]=268435456|fs[ze]<<18|vr[zt];var zs=31&fs[ze],Xs=31&vr[zt];de+=As[zs]+Ls[Xs],++ae[257+zs],++V[Xs],Fe=_+ze,++ie}else Z[pe++]=h[_],++ae[h[_]]}}I=fr(h,R,!0,Z,ae,V,de,pe,ue,_-ue,I)}return Bn(C,0,g+Vn(I)+f)})(n=i,(a=e).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+a.mem,o,l)),u=c.length;return(function(h,d){var v=d.filename;if(h[0]=31,h[1]=139,h[2]=8,h[8]=2>d.level?4:d.level==9?2:0,h[9]=3,d.mtime!=0&&Ni(h,4,Math.floor(new Date(d.mtime||Date.now())/1e3)),v){h[3]=8;for(var g=0;v.length>=g;++g)h[g+10]=v.charCodeAt(g)}})(c,e),Ni(c,u-8,t.d()),Ni(c,u-4,s),c}var Ro=!!Ji||!!Yi,Gn="text/plain",_r=!1,wi=function(i,e,t){var s;t===void 0&&(t=!0);var[r,n]=i.split("?"),a=y({},e),o=(s=n==null?void 0:n.split("&").map((c=>{var u,[h,d]=c.split("="),v=t&&(u=a[h])!==null&&u!==void 0?u:d;return delete a[h],h+"="+v})))!==null&&s!==void 0?s:[],l=(function(c,u){var h,d;u===void 0&&(u="&");var v=[];return q(c,(function(g,f){E(g)||E(f)||f==="undefined"||(h=encodeURIComponent(($=>$ instanceof File)(g)?g.name:g.toString()),d=encodeURIComponent(f),v[v.length]=d+"="+h)})),v.join(u)})(a);return l&&o.push(l),r+"?"+o.join("&")},ut=(i,e)=>JSON.stringify(i,((t,s)=>typeof s=="bigint"?s.toString():s),e),Hi=i=>{if(i.zt)return i.zt;var{data:e,compression:t}=i;if(e){if(t===ke.GZipJS){var s=Po((function(o,l){var c=o.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(o);for(var u=new fe(o.length+(o.length>>>1)),h=0,d=function($){u[h++]=$},v=0;c>v;++v){if(h+5>u.length){var g=new fe(h+8+(c-v<<1));g.set(u),u=g}var f=o.charCodeAt(v);128>f?d(f):2048>f?(d(192|f>>>6),d(128|63&f)):f>55295&&57344>f?(d(240|(f=65536+(1047552&f)|1023&o.charCodeAt(++v))>>>18),d(128|f>>>12&63),d(128|f>>>6&63),d(128|63&f)):(d(224|f>>>12),d(128|f>>>6&63),d(128|63&f))}return Bn(u,0,h)})(ut(e)),{mtime:0});return{contentType:Gn,body:s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength),estimatedSize:s.byteLength}}if(t===ke.Base64){var r=(function(o){return o&&btoa(encodeURIComponent(o).replace(/%([0-9A-F]{2})/g,((l,c)=>String.fromCharCode(parseInt(c,16)))))})(ut(e)),n=(o=>"data="+encodeURIComponent(typeof o=="string"?o:ut(o)))(r);return{contentType:"application/x-www-form-urlencoded",body:n,estimatedSize:new Blob([n]).size}}var a=ut(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Fo=(function(){var i=we((function*(e){var t=ut(e.data),s=yield(function(n,a,o){return tn.apply(this,arguments)})(t,ne.DEBUG,{rethrow:!0});if(!s)return e;var r=yield s.arrayBuffer();return y({},e,{zt:{contentType:Gn,body:r,estimatedSize:r.byteLength}})}));return function(e){return i.apply(this,arguments)}})(),mr=(i,e)=>wi(i,{_:new Date().getTime().toString(),ver:ne.JS_SDK_VERSION,compression:e}),ti=[];Yi&&ti.push({transport:"fetch",method(i){var e,t,{contentType:s,body:r,estimatedSize:n}=(e=Hi(i))!==null&&e!==void 0?e:{},a=new Headers;q(i.headers,(function(u,h){a.append(h,u)})),s&&a.append("Content-Type",s);var o=i.url,l=null;if(Vs){var c=new Vs;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),i.timeout)}}Yi(o,y({method:(i==null?void 0:i.method)||"GET",headers:a,keepalive:i.method==="POST"&&52428.8>(n||0),body:r,signal:(t=l)==null?void 0:t.signal},i.fetchOptions)).then((u=>u.text().then((h=>{var d={statusCode:u.status,text:h};if(u.status===200)try{d.json=JSON.parse(h)}catch(v){w.error(v)}i.callback==null||i.callback(d)})))).catch((u=>{w.error(u),i.callback==null||i.callback({statusCode:0,error:u})})).finally((()=>l?clearTimeout(l.timeout):null))}}),Ji&&ti.push({transport:"XHR",method(i){var e,t=new Ji;t.open(i.method||"GET",i.url,!0);var{contentType:s,body:r}=(e=Hi(i))!==null&&e!==void 0?e:{};q(i.headers,(function(n,a){t.setRequestHeader(a,n)})),s&&t.setRequestHeader("Content-Type",s),i.timeout&&(t.timeout=i.timeout),i.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(t.readyState===4){var n={statusCode:t.status,text:t.responseText};if(t.status===200)try{n.json=JSON.parse(t.responseText)}catch{}i.callback==null||i.callback(n)}},t.send(r)}}),ce!=null&&ce.sendBeacon&&ti.push({transport:"sendBeacon",method(i){var e=wi(i.url,{beacon:"1"});try{var t,{contentType:s,body:r}=(t=Hi(i))!==null&&t!==void 0?t:{};if(!r)return;var n=r instanceof Blob?r:new Blob([r],{type:s});ce.sendBeacon(e,n)}catch{}}});var ys=3e3;class Io{constructor(e,t){this.Ti=!0,this.Ai=[],this.Ei=Re((t==null?void 0:t.flush_interval_ms)||ys,250,5e3,w.createLogger("flush interval"),ys),this.Ri=e}enqueue(e){this.Ai.push(e),this.Ni||this.Mi()}unload(){this.Fi();var e=this.Ai.length>0?this.Oi():{},t=Object.values(e);[...t.filter((s=>s.url.indexOf("/e")===0)),...t.filter((s=>s.url.indexOf("/e")!==0))].map((s=>{this.Ri(y({},s,{transport:"sendBeacon"}))}))}enable(){this.Ti=!1,this.Mi()}Mi(){var e=this;this.Ti||(this.Ni=setTimeout((()=>{if(this.Fi(),this.Ai.length>0){var t=this.Oi(),s=function(){var n=t[r],a=new Date().getTime();n.data&&D(n.data)&&q(n.data,(o=>{o.offset=Math.abs(o.timestamp-a),delete o.timestamp})),e.Ri(n)};for(var r in t)s()}}),this.Ei))}Fi(){clearTimeout(this.Ni),this.Ni=void 0}Oi(){var e={};return q(this.Ai,(t=>{var s,r=t,n=(r?r.batchKey:null)||r.url;E(e[n])&&(e[n]=y({},r,{data:[]})),(s=e[n].data)==null||s.push(r.data)})),this.Ai=[],e}}var $o=["retriesPerformedSoFar"];class Co{constructor(e){this.Pi=!1,this.Li=3e3,this.Ai=[],this._instance=e,this.Ai=[],this.Di=!0,!E(p)&&"onLine"in p.navigator&&(this.Di=p.navigator.onLine,this.Bi=()=>{this.Di=!0,this.ji()},this.qi=()=>{this.Di=!1},G(p,"online",this.Bi),G(p,"offline",this.qi))}get length(){return this.Ai.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,s=en(e,$o);st(t)&&(s.url=wi(s.url,{retry_count:t})),this._instance._send_request(y({},s,{callback:r=>{r.statusCode===200||r.statusCode>=400&&500>r.statusCode||(t??0)>=10?s.callback==null||s.callback(r):this.Zi(y({retriesPerformedSoFar:t},s))}}))}Zi(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var s=(function(a){var o=3e3*Math.pow(2,a),l=o/2,c=Math.min(18e5,o),u=Math.random()-.5;return Math.ceil(c+u*(c-l))})(t),r=Date.now()+s;this.Ai.push({retryAt:r,requestOptions:e});var n="Enqueued failed request for retry in "+s;navigator.onLine||(n+=" (Browser is offline)"),w.warn(n),this.Pi||(this.Pi=!0,this.$i())}$i(){if(this.Vi&&clearTimeout(this.Vi),this.Ai.length===0)return this.Pi=!1,void(this.Vi=void 0);this.Vi=setTimeout((()=>{this.Di&&this.Ai.length>0&&this.ji(),this.$i()}),this.Li)}ji(){var e=Date.now(),t=[],s=this.Ai.filter((n=>e>n.retryAt||(t.push(n),!1)));if(this.Ai=t,s.length>0)for(var{requestOptions:r}of s)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Vi&&(clearTimeout(this.Vi),this.Vi=void 0),this.Pi=!1,E(p)||(this.Bi&&(p.removeEventListener("online",this.Bi),this.Bi=void 0),this.qi&&(p.removeEventListener("offline",this.qi),this.qi=void 0)),this.Ai))try{this._instance._send_request(y({},e,{transport:"sendBeacon"}))}catch(t){w.error(t)}this.Ai=[]}}class To{constructor(e){this.Hi=()=>{var t,s,r,n;this.zi||(this.zi={});var a=this.scrollElement(),o=this.scrollY(),l=a?Math.max(0,a.scrollHeight-a.clientHeight):0,c=o+((a==null?void 0:a.clientHeight)||0),u=(a==null?void 0:a.scrollHeight)||0;this.zi.lastScrollY=Math.ceil(o),this.zi.maxScrollY=Math.max(o,(t=this.zi.maxScrollY)!==null&&t!==void 0?t:0),this.zi.maxScrollHeight=Math.max(l,(s=this.zi.maxScrollHeight)!==null&&s!==void 0?s:0),this.zi.lastContentY=c,this.zi.maxContentY=Math.max(c,(r=this.zi.maxContentY)!==null&&r!==void 0?r:0),this.zi.maxContentHeight=Math.max(u,(n=this.zi.maxContentHeight)!==null&&n!==void 0?n:0)},this._instance=e}get Ui(){return this._instance.config.scroll_root_selector}getContext(){return this.zi}resetContext(){var e=this.zi;return setTimeout(this.Hi,0),e}startMeasuringScrollPosition(){G(p,"scroll",this.Hi,{capture:!0}),G(p,"scrollend",this.Hi,{capture:!0}),G(p,"resize",this.Hi)}scrollElement(){if(!this.Ui)return p==null?void 0:p.document.documentElement;var e=D(this.Ui)?this.Ui:[this.Ui];for(var t of e){var s=p==null?void 0:p.document.querySelector(t);if(s)return s}}scrollY(){if(this.Ui){var e=this.scrollElement();return e&&e.scrollTop||0}return p&&(p.scrollY||p.pageYOffset||p.document.documentElement.scrollTop)||0}scrollX(){if(this.Ui){var e=this.scrollElement();return e&&e.scrollLeft||0}return p&&(p.scrollX||p.pageXOffset||p.document.documentElement.scrollLeft)||0}}var Oo=i=>Nn(i==null?void 0:i.config.mask_personal_data_properties,i==null?void 0:i.config.custom_personal_data_properties);class yr{constructor(e,t,s,r){this.Yi=n=>{var a=this.Gi();if(!a||a.sessionId!==n){var o={sessionId:n,props:this.Wi(this._instance)};this.Xi.register({[cs]:o})}},this._instance=e,this.Ji=t,this.Xi=s,this.Wi=r||Oo,this.Ji.onSessionId(this.Yi)}Gi(){return this.Xi.props[cs]}getSetOnceProps(){var e,t=(e=this.Gi())==null?void 0:e.props;return t?"r"in t?Hn(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return q(Ms(this.getSetOnceProps()),((t,s)=>{s==="$current_url"&&(s="url"),e["$session_entry_"+Ki(s)]=t})),e}}class Ds{constructor(){this.Ki={}}on(e,t){return this.Ki[e]||(this.Ki[e]=[]),this.Ki[e].push(t),()=>{this.Ki[e]=this.Ki[e].filter((s=>s!==t))}}emit(e,t){for(var s of this.Ki[e]||[])s(t);for(var r of this.Ki["*"]||[])r(e,t)}}var ji=z("[SessionId]");class br{on(e,t){return this.Qi.on(e,t)}constructor(e,t,s){var r;if(this.tr=[],this.er=void 0,this.Qi=new Ds,this.ir=(c,u)=>!(!st(c)||!st(u))&&Math.abs(c-u)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Ee)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Rt=e.config,this.Xi=e.persistence,this.rr=void 0,this.nr=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.sr=t||je,this.ar=s||je;var n=this.Rt.persistence_name||this.Rt.token;if(this._sessionTimeoutMs=1e3*Re(this.Rt.session_idle_timeout_seconds||1800,60,36e3,ji.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.lr(),this.ur="ph_"+n+"_window_id",this.hr="ph_"+n+"_primary_window_exists",this.cr()){var a=ee.Wt(this.ur),o=ee.Wt(this.hr);a&&!o?this.rr=a:ee.Jt(this.ur),ee.Xt(this.hr,!0)}if((r=this.Rt.bootstrap)!=null&&r.sessionID)try{var l=(c=>{var u=this.Rt.bootstrap.sessionID.replace(/-/g,"");if(u.length!==32)throw new Error("Not a valid UUID");if(u[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(u.substring(0,12),16)})();this.dr(this.Rt.bootstrap.sessionID,new Date().getTime(),l)}catch(c){ji.error("Invalid sessionID in bootstrap",c)}this.vr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return E(this.tr)&&(this.tr=[]),this.tr.push(e),this.nr&&e(this.nr,this.rr),()=>{this.tr=this.tr.filter((t=>t!==e))}}cr(){return this.Rt.persistence!=="memory"&&!this.Xi.fi&&ee.Ut()}pr(e){e!==this.rr&&(this.rr=e,this.cr()&&ee.Xt(this.ur,e))}gr(){return this.rr?this.rr:this.cr()?ee.Wt(this.ur):null}dr(e,t,s){e===this.nr&&t===this._sessionActivityTimestamp&&s===this._sessionStartTimestamp||(this._sessionStartTimestamp=s,this._sessionActivityTimestamp=t,this.nr=e,this.Xi.register({[ni]:[t,e,s]}))}mr(){var e=this.Xi.props[ni];return D(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.dr(null,null,null)}destroy(){clearTimeout(this.yr),this.yr=void 0,this.er&&p&&(p.removeEventListener(ci,this.er,{capture:!1}),this.er=void 0),this.tr=[]}vr(){this.er=()=>{this.cr()&&ee.Jt(this.hr)},G(p,ci,this.er,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.Rt.cookieless_mode===Ee)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s=t||new Date().getTime(),[r,n,a]=this.mr(),o=this.gr(),l=st(a)&&Math.abs(s-a)>864e5,c=!1,u=!n,h=!u&&!e&&this.ir(s,r);u||h||l?(n=this.sr(),o=this.ar(),ji.info("new session ID generated",{sessionId:n,windowId:o,changeReason:{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}}),a=s,c=!0):o||(o=this.ar(),c=!0);var d=st(r)&&e&&!l?r:s,v=st(a)?a:new Date().getTime();return this.pr(o),this.dr(n,d,v),e||this.lr(),c&&this.tr.forEach((g=>g(n,o,c?{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}:void 0))),{sessionId:n,windowId:o,sessionStartTimestamp:v,changeReason:c?{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:r}}lr(){clearTimeout(this.yr),this.yr=setTimeout((()=>{var[e]=this.mr();if(this.ir(new Date().getTime(),e)){var t=this.nr;this.resetSessionId(),this.Qi.emit("forcedIdleReset",{idleSessionId:t})}}),1.1*this.sessionTimeoutMs)}}var Wn=function(i,e){if(!i)return!1;var t=i.userAgent;if(t&&Ws(t,e))return!0;try{var s=i==null?void 0:i.userAgentData;if(s!=null&&s.brands&&s.brands.some((r=>Ws(r==null?void 0:r.brand,e))))return!0}catch{}return!!i.webdriver},_i=function(i,e){if(!(function(t){try{new RegExp(t)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(i)}catch{return!1}};function wr(i,e,t){return ut({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}var Yn={exact:(i,e)=>e.some((t=>i.some((s=>t===s)))),is_not:(i,e)=>e.every((t=>i.every((s=>t!==s)))),regex:(i,e)=>e.some((t=>i.some((s=>_i(t,s))))),not_regex:(i,e)=>e.every((t=>i.every((s=>!_i(t,s))))),icontains:(i,e)=>e.map(Jt).some((t=>i.map(Jt).some((s=>t.includes(s))))),not_icontains:(i,e)=>e.map(Jt).every((t=>i.map(Jt).every((s=>!t.includes(s))))),gt:(i,e)=>e.some((t=>{var s=parseFloat(t);return!isNaN(s)&&i.some((r=>s>parseFloat(r)))})),lt:(i,e)=>e.some((t=>{var s=parseFloat(t);return!isNaN(s)&&i.some((r=>si.toLowerCase();function Jn(i,e){return!i||Object.entries(i).every((t=>{var[s,r]=t,n=e==null?void 0:e[s];if(E(n)||Oe(n))return!1;var a=[String(n)],o=Yn[r.operator];return!!o&&o(r.values,a)}))}var bs="custom",Er="i.posthog.com",Mo=/^\/static\//;class Ao{constructor(e){this.br={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Er,".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this.br[this.apiHost]||(this.br[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":bs),this.br[this.apiHost]}wr(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof t=="string"&&Mo.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(t===void 0&&(t=""),t&&(t=t[0]==="/"?t:"/"+t),e==="ui")return this.uiHost+t;if(e==="flags")return this.flagsApiHost+t;if(e==="assets"){var s=this.wr(t);if(s)return""+s+t}if(this.region===bs)return this.apiHost+t;var r=Er+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var j=z("[Surveys]"),ws="seenSurvey_",Lo=(i,e)=>{var t="$survey_"+e+"/"+i.id;return i.current_iteration&&i.current_iteration>0&&(t="$survey_"+e+"/"+i.id+"/"+i.current_iteration),t},xr=i=>((e,t)=>{var s=""+ws+t.id;return t.current_iteration&&t.current_iteration>0&&(s=""+ws+t.id+"_"+t.current_iteration),s})(0,i),Do=[Ai.Popover,Ai.Widget,Ai.API],No={ignoreConditions:!1,ignoreDelay:!1,displayType:gs.Popover},Ho=z("[PostHog ExternalIntegrations]"),jo={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class qo{constructor(e){this._instance=e}ni(e,t){var s;(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,e,(r=>{if(r)return Ho.error("failed to load script",r);t()}))}startIfEnabledOrStop(){var e=this,t=function(a){var o,l,c;!r||(o=F.__PosthogExtensions__)!=null&&(o=o.integrations)!=null&&o[a]||e.ni(jo[a],(()=>{var u;(u=F.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[a])==null||u.start(e._instance)})),!r&&(l=F.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[a]&&((c=F.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[a])==null||c.stop())};for(var[s,r]of Object.entries((n=this._instance.config.integrations)!==null&&n!==void 0?n:{})){var n;t(s)}}}var et,At={},qi=0,Es=()=>{},kr='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Et="Surveys module not available",Sr="sanitize_properties is deprecated. Use before_send instead",Kn="Invalid value for property_denylist config: ",at="posthog",Zn=!Ro&&(oe==null?void 0:oe.indexOf("MSIE"))===-1&&(oe==null?void 0:oe.indexOf("Mozilla"))===-1,Pr=i=>{var e;return y({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ro(b==null?void 0:b.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Es,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:i??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Q&&W(Q==null?void 0:Q.search)&&Q.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(p==null||(e=p.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(t){w.error("Bad HTTP status: "+t.statusCode+" "+t.text)},get_device_id:t=>t,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:vs,before_send:void 0,request_queue_config:{flush_interval_ms:ys},error_tracking:{},_onCapture:Es,__preview_eager_load_replay:!1},(t=>({rageclick:!t||"2025-11-30">t||{content_ignorelist:!0},capture_pageview:!t||"2025-05-24">t||"history_change",session_recording:t&&t>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:t&&t>="2026-01-30"?"head":"body",internal_or_test_user_hostname:t&&t>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(i))},Uo=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Rr=i=>{var e={};for(var[t,s]of Uo)E(i[t])||(e[s]=i[t]);var r=B({},e,i);return D(i.property_blacklist)&&(E(i.property_denylist)?r.property_denylist=i.property_blacklist:D(i.property_denylist)?r.property_denylist=[...i.property_blacklist,...i.property_denylist]:w.error(Kn+i.property_denylist)),r};class zo{constructor(){this.__forceAllowLocalhost=!1}get _r(){return this.__forceAllowLocalhost}set _r(e){w.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class ge{Ir(e,t){if(e){var s=this.Cr.indexOf(e);s!==-1&&this.Cr.splice(s,1)}return this.Cr.push(t),t.initialize==null||t.initialize(),t}get decideEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new zo,this.Sr=!1,this.version=ne.LIB_VERSION,this.kr=new Ds,this.Cr=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Pr(),this.SentryIntegration=go,this.sentryIntegration=s=>(function(r,n){var a=On(r,n);return{name:Tn,processEvent:o=>a(o)}})(this,s),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Tr=!1,this.Ar=null,this.Er=null,this.Rr=null,this.scrollManager=new To(this),this.pageViewManager=new ur(this),this.rateLimiter=new wo(this),this.requestRouter=new Ao(this),this.consent=new ho(this),this.externalIntegrations=new qo(this);var t=(e=ge.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(s,r,n)=>{var a=W(s)?{[s]:r}:s;this.setPersonProperties(a),n==null||n({})},set_once:(s,r,n)=>{var a=W(s)?{[s]:r}:s;this.setPersonProperties(void 0,a),n==null||n({})}},this.on("eventCaptured",(s=>w.info('send "'+(s==null?void 0:s.event)+'"',s)))}init(e,t,s){if(s&&s!==at){var r,n=(r=At[s])!==null&&r!==void 0?r:new ge;return n._init(e,t,s),At[s]=n,At[at][s]=n,n}return this._init(e,t,s)}_init(e,t,s){var r,n;if(t===void 0&&(t={}),E(e)||Zt(e))return w.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Nr(t.debug),this.Mr=t,this.Fr=[],t.person_profiles?this.Er=t.person_profiles:t.process_person&&(this.Er=t.process_person),this.set_config(B({},Pr(t.defaults),Rr(t),{name:s,token:e})),this.config.on_xhr_error&&w.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:ke.GZipJS;var a=this.Or();this.persistence=new Mi(this.config,a),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Mi(y({},this.config,{persistence:"sessionStorage"}),a);var o=y({},this.persistence.props),l=y({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Pr=new Io(($=>this.Lr($)),this.config.request_queue_config),this.Dr=new Co(this),this.__request_queue=[];var c=this.config.cookieless_mode===Ee||this.config.cookieless_mode===$e&&this.consent.isExplicitlyOptedOut();if(c||(this.sessionManager=new br(this),this.sessionPropsManager=new yr(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(w.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Br(c)}),0)):(w.info("Initializing extensions synchronously"),this.Br(c)),ne.DEBUG=ne.DEBUG||this.config.debug,ne.DEBUG&&w.info("Starting in debug mode",{this:this,config:t,thisC:y({},this.config),p:o,s:l}),!this.config.identity_distinct_id||(r=t.bootstrap)!=null&&r.distinctID||(t.bootstrap=y({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((n=t.bootstrap)==null?void 0:n.distinctID)!==void 0){var u=t.bootstrap.distinctID,h=this.get_distinct_id(),d=this.persistence.get_property(be);if(t.bootstrap.isIdentifiedID&&h!=null&&h!==u&&d===Ke)this.identify(u);else if(t.bootstrap.isIdentifiedID&&h!=null&&h!==u&&d===Ze)w.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(je()),g=t.bootstrap.isIdentifiedID?v:u;this.persistence.set_property(be,t.bootstrap.isIdentifiedID?Ze:Ke),this.register({distinct_id:u,$device_id:g})}}if(c)this.register_once({distinct_id:Vt,$device_id:null},"");else if(!this.get_distinct_id()){var f=this.config.get_device_id(je());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(be,Ke)}return G(p,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?(function($,k){var C=$.config.segment;if(!C)return k();(function(R,I){var _=R.config.segment;if(!_)return I();var S=m=>{var P=()=>m.anonymousId()||je();R.config.get_device_id=P,m.id()&&(R.register({distinct_id:m.id(),$device_id:P()}),R.persistence.set_property(be,Ze)),I()},x=_.user();"then"in x&&Ce(x.then)?x.then(S):S(x)})($,(()=>{C.register((R=>{Promise&&Promise.resolve||Oi.warn("This browser does not have Promise support, and can not use the segment integration");var I=(_,S)=>{if(!S)return _;_.event.userId||_.event.anonymousId===R.get_distinct_id()||(Oi.info("No userId set, resetting PostHog"),R.reset()),_.event.userId&&_.event.userId!==R.get_distinct_id()&&(Oi.info("UserId set, identifying with PostHog"),R.identify(_.event.userId));var x=R.calculateEventProperties(S,_.event.properties);return _.event.properties=Object.assign({},x,_.event.properties),_};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:_=>I(_,_.event.event),page:_=>I(_,nt),identify:_=>I(_,Ci),screen:_=>I(_,"$screen")}})($)).then((()=>{k()}))}))})(this,(()=>this.jr())):this.jr(),Ce(this.config._onCapture)&&this.config._onCapture!==Es&&(w.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",($=>this.config._onCapture($.event,$)))),this.config.ip&&w.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Br(e){var t,s,r,n,a,o,l,c=performance.now(),u=y({},ge.__defaultExtensionClasses,this.config.__extensionClasses),h=[];u.featureFlags&&this.Cr.push(this.featureFlags=(t=this.featureFlags)!==null&&t!==void 0?t:new u.featureFlags(this)),u.exceptions&&this.Cr.push(this.exceptions=(s=this.exceptions)!==null&&s!==void 0?s:new u.exceptions(this)),u.historyAutocapture&&this.Cr.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Cr.push(new u.tracingHeaders(this)),u.siteApps&&this.Cr.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Cr.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||h.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),u.autocapture&&this.Cr.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Cr.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new u.surveys(this)),u.logs&&this.Cr.push(this.logs=(n=this.logs)!==null&&n!==void 0?n:new u.logs(this)),u.conversations&&this.Cr.push(this.conversations=(a=this.conversations)!==null&&a!==void 0?a:new u.conversations(this)),u.productTours&&this.Cr.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Cr.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Cr.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Cr.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Cr.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,vo)),u.toolbar&&this.Cr.push(this.toolbar=(o=this.toolbar)!==null&&o!==void 0?o:new u.toolbar(this)),u.experiments&&this.Cr.push(this.experiments=(l=this.experiments)!==null&&l!==void 0?l:new u.experiments(this)),this.Cr.forEach((d=>{d.initialize&&h.push((()=>{d.initialize==null||d.initialize()}))})),h.push((()=>{if(this.qr){var d=this.qr;this.qr=void 0,this.Ci(d)}})),this.Zr(h,c)}Zr(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.Zr(e,t)}),0);var s=e.shift();if(s)try{s()}catch(n){w.error("Error initializing extension:",n)}}var r=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:r}),this.config.__preview_deferred_init_extensions&&w.info("PostHog extensions initialized ("+r+"ms)")}Ci(e){var t;if(!b||!b.body)return w.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ci(e)}),500);this.config.__preview_deferred_init_extensions&&(this.qr=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=M(e.supportedCompression,ke.GZipJS)?ke.GZipJS:M(e.supportedCompression,ke.Base64)?ke.Base64:void 0),(t=e.analytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Er?this.Er:vs}),this.Cr.forEach((s=>s.onRemoteConfig==null?void 0:s.onRemoteConfig(e)))}jr(){try{this.config.loaded(this)}catch(s){w.critical("`loaded` function failed",s)}if(this.$r(),this.config.internal_or_test_user_hostname&&Q!=null&&Q.hostname){var e=Q.hostname,t=this.config.internal_or_test_user_hostname;(typeof t=="string"?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode===Ee)&&this.Vr()}),1),this.Hr=new qn(this),this.Hr.load()}$r(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Pr)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Bt(this.__request_queue,(e=>this.Lr(e))),this.__request_queue=[],this.$r()}_handle_unload(){var e,t,s,r;(e=this.surveys)==null||e.handlePageUnload(),this.config.request_batching?(this.zr()&&this.capture($i),(t=this.logs)==null||t.flushLogs("sendBeacon"),(s=this.Pr)==null||s.unload(),(r=this.Dr)==null||r.unload()):this.zr()&&this.capture($i,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(Zn?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=wi(e.url,{ip:this.config.ip?1:0}),e.headers=y({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(t=>{var s,r,n,a=y({},t);a.timeout=a.timeout||6e4,a.url=mr(a.url,a.compression);var o=(s=a.transport)!==null&&s!==void 0?s:"fetch",l=ti.filter((u=>!a.disableTransport||!u.transport||!a.disableTransport.includes(u.transport))),c=(r=(n=(function(u,h){for(var d=0;u.length>d;d++)if(u[d].transport===o)return u[d]})(l))==null?void 0:n.method)!==null&&r!==void 0?r:l[0].method;if(!c)throw new Error("No available transport method");o!=="sendBeacon"&&a.data&&a.compression===ke.GZipJS&&_a&&!_r?Fo(a).then((u=>{c(u)})).catch((u=>{if((h=>!(!h||typeof h!="object")&&("name"in h?String(h.name):"")==="NotReadableError")(u))return _r=!0,void c(y({},a,{compression:void 0,url:mr(t.url,void 0)}));c(a)})):c(a)})(y({},e,{callback:t=>{var s,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||(s=(r=this.config).on_request_error)==null||s.call(r,t),e.callback==null||e.callback(t)}}))))}Lr(e){this.Dr?this.Dr.retriableRequest(e):this._send_request(e)}_execute_array(e){qi++;try{var t,s=[],r=[],n=[];Bt(e,(o=>{o&&(D(t=o[0])?n.push(o):Ce(o)?o.call(this):D(o)&&t==="alias"?s.push(o):D(o)&&t.indexOf("capture")!==-1&&Ce(this[t])?n.push(o):r.push(o))}));var a=function(o,l){Bt(o,(function(c){if(D(c[0])){var u=l;q(c,(function(h){u=u[h[0]].apply(u,h.slice(1))}))}else l[c[0]].apply(l,c.slice(1))}))};a(s,this),a(r,this),a(n,this)}finally{qi--}}push(e){if(qi>0&&D(e)&&W(e[0])){var t=ge.prototype[e[0]];Ce(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,s){var r,n,a,o,l;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Pr){if(this.is_capturing())if(!E(e)&&W(e)){var c=!this.config.opt_out_useragent_filter&&this._is_bot();if(!c||this.config.__preview_capture_bot_pageviews){var u=s!=null&&s.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(u==null||!u.isRateLimited){t!=null&&t.$current_url&&!W(t==null?void 0:t.$current_url)&&(w.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!=="$exception"||s!=null&&s.Ur||w.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var h=new Date,d=(s==null?void 0:s.timestamp)||h,v=je(),g={uuid:v,event:e,properties:this.calculateEventProperties(e,t||{},d,v)};e===nt&&this.config.__preview_capture_bot_pageviews&&c&&(g.event="$bot_pageview",g.properties.$browser_type="bot"),u&&(g.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),s!=null&&s.$set&&(g.$set=s==null?void 0:s.$set);var f,$=this.Yr(s==null?void 0:s.$set_once,e!==nr,e===Ci);if($&&(g.$set_once=$),s!=null&&s._noTruncate||(n=this.config.properties_string_max_length,a=g,o=x=>W(x)?x.slice(0,n):x,l=new Set,g=(function x(m,P){return m!==Object(m)?o?o(m):m:l.has(m)?void 0:(l.add(m),D(m)?(T=[],Bt(m,(O=>{T.push(x(O))}))):(T={},q(m,((O,A)=>{l.has(O)||(T[A]=x(O))}))),T);var T})(a)),g.timestamp=d,E(s==null?void 0:s.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=h),e===Ct.DISMISSED||e===Ct.SENT){var k=t==null?void 0:t[Li.SURVEY_ID],C=t==null?void 0:t[Li.SURVEY_ITERATION];f={id:k,current_iteration:C},localStorage.getItem(xr(f))||localStorage.setItem(xr(f),"true"),g.$set=y({},g.$set,{[Lo({id:k,current_iteration:C},e===Ct.SENT?"responded":"dismissed")]:!0})}else e===Ct.SHOWN&&(g.$set=y({},g.$set,{[Li.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===bo.SHOWN){var R=t==null?void 0:t[hr.TOUR_TYPE];R&&(g.$set=y({},g.$set,{[hr.TOUR_LAST_SEEN_DATE+"/"+R]:new Date().toISOString()}))}var I=y({},g.properties.$set,g.$set);if(ot(I)||this.setPersonPropertiesForFlags(I),!L(this.config.before_send)){var _=this.Gr(g);if(!_)return;g=_}this.kr.emit("eventCaptured",g);var S={method:"POST",url:(r=s==null?void 0:s._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:g,compression:"best-available",batchKey:s==null?void 0:s._batchKey};return!this.config.request_batching||s&&(s==null||!s._batchKey)||s!=null&&s.send_instantly?this.Lr(S):this.Pr.enqueue(S),g}w.critical("This capture call is ignored due to client rate limiting.")}}else w.error("No event name provided to posthog.capture")}else w.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(t=>e(t.event,t)))}calculateEventProperties(e,t,s,r,n){if(s=s||new Date,!this.persistence||!this.sessionPersistence)return t;var a=n?void 0:this.persistence.remove_event_timer(e),o=y({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,(this.config.cookieless_mode==Ee||this.config.cookieless_mode==$e&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),e==="$snapshot"){var l=y({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!W(o.distinct_id)&&!xe(o.distinct_id)||Zt(o.distinct_id))&&w.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var c,u=(function(k,C){var R,I,_,S;if(!oe)return{};var x,m,P,T,O,A,H,N,Y=k?[...gt,...C||[]]:[],[Z,ae]=(function(V){for(var ie=0;Ks.length>ie;ie++){var[de,pe]=Ks[ie],Fe=de.exec(V),ue=Fe&&(Ce(pe)?pe(Fe,V):pe);if(ue)return ue}return["",""]})(oe);return B(Ms({$os:Z,$os_version:ae,$browser:wn(oe,navigator.vendor),$device:Zs(oe),$device_type:(m=oe,P={userAgentDataPlatform:(R=navigator)==null||(R=R.userAgentData)==null?void 0:R.platform,maxTouchPoints:(I=navigator)==null?void 0:I.maxTouchPoints,screenWidth:p==null||(_=p.screen)==null?void 0:_.width,screenHeight:p==null||(S=p.screen)==null?void 0:S.height,devicePixelRatio:p==null?void 0:p.devicePixelRatio},N=Zs(m),N===on||N===an||N==="Kobo"||N==="Kindle Fire"||N===bn?dt:N===Dt||N===ht||N===Nt||N===Qi?"Console":N===un?"Wearable":N?he:(P==null?void 0:P.userAgentDataPlatform)==="Android"&&((T=P==null?void 0:P.maxTouchPoints)!==null&&T!==void 0?T:0)>0?600>Math.min((O=P==null?void 0:P.screenWidth)!==null&&O!==void 0?O:0,(A=P==null?void 0:P.screenHeight)!==null&&A!==void 0?A:0)/((H=P==null?void 0:P.devicePixelRatio)!==null&&H!==void 0?H:1)?he:dt:"Desktop"),$timezone:jn(),$timezone_offset:mo()}),{$current_url:Ht(Q==null?void 0:Q.href,Y,jt),$host:Q==null?void 0:Q.host,$pathname:Q==null?void 0:Q.pathname,$raw_user_agent:oe.length>1e3?oe.substring(0,997)+"...":oe,$browser_version:Oa(oe,navigator.vendor),$browser_language:cr(),$browser_language_prefix:(x=cr(),typeof x=="string"?x.split("-")[0]:void 0),$screen_height:p==null?void 0:p.screen.height,$screen_width:p==null?void 0:p.screen.width,$viewport_height:p==null?void 0:p.innerHeight,$viewport_width:p==null?void 0:p.innerWidth,$lib:ne.LIB_NAME,$lib_version:ne.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(n,s.getTime());o.$session_id=h,o.$window_id=d}this.sessionPropsManager&&B(o,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&B(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=(v=this.Dr)==null?void 0:v.length}catch(k){o.$sdk_debug_error_capturing_properties=String(k)}if(this.requestRouter.region===bs&&(o.$lib_custom_api_host=this.config.api_host),c=e!==nt||n?e!==$i||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(s):this.pageViewManager.doPageView(s,r),o=B(o,c),e===nt&&b&&(o.title=b.title),!E(a)){var g=s.getTime()-a;o.$duration=parseFloat((g/1e3).toFixed(3))}oe&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=B({},u,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),D(this.config.property_denylist)?q(this.config.property_denylist,(function(k){delete o[k]})):w.error(Kn+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(w.error(Sr),o=f(o,e));var $=this.Wr();return o.$process_person_profile=$,$&&!n&&this.Xr("_calculate_event_properties"),o}Yr(e,t,s){var r;if(t===void 0&&(t=!0),s===void 0&&(s=!1),!this.persistence||!this.Wr()||this.Sr&&!s)return e;var n=this.persistence.get_initial_props(),a=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),o=B({},n,a||{},e||{}),l=this.config.sanitize_properties;return l&&(w.error(Sr),o=l(o,"$set_once")),t&&(this.Sr=!0),ot(o)?void 0:o}register(e,t){var s;(s=this.persistence)==null||s.register(e,t)}register_once(e,t,s){var r;(r=this.persistence)==null||r.register_once(e,t,s)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}Jr(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return(t=this.featureFlags)==null?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var s;return(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,s){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,s)}updateEarlyAccessFeatureEnrollment(e,t,s){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,s)}getEarlyAccessFeatures(e,t,s){var r;return t===void 0&&(t=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(e,t,s)}on(e,t){return this.kr.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Et}),()=>{})}onSessionId(e){var t,s;return(t=(s=this.sessionManager)==null?void 0:s.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:Et})}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:Et})}renderSurvey(e,t){var s;(s=this.surveys)==null||s.renderSurvey(e,t)}displaySurvey(e,t){var s;t===void 0&&(t=No),(s=this.surveys)==null||s.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,s;return(t=(s=this.surveys)==null?void 0:s.canRenderSurvey(e))!==null&&t!==void 0?t:{visible:!1,disabledReason:Et}}canRenderSurveyAsync(e,t){var s,r;return t===void 0&&(t=!1),(s=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(e,t))!==null&&s!==void 0?s:Promise.resolve({visible:!1,disabledReason:Et})}Kr(e){return!e||Zt(e)?(w.critical("Unique user id has not been set in posthog.identify"),!1):e===Vt?(w.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(w.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,s){if(!this.__loaded||!this.persistence)return w.uninitializedWarning("posthog.identify");if(xe(e)&&(e=e.toString(),w.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Kr(e)&&this.Xr("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(ri)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(Pt)&&(this.unregister(Pt),this.register({distinct_id:e}));var n,a=(this.persistence.get_property(be)||Ke)===Ke;e!==r&&a?(this.persistence.set_property(be,Ze),this.setPersonPropertiesForFlags({$set:t||{},$set_once:s||{}},!1),this.capture(Ci,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:s||{}}),this.Rr=wr(e,t,s),(n=this.featureFlags)==null||n.setAnonymousDistinctId(r)):(t||s)&&this.setPersonProperties(t,s),e!==r&&(this.reloadFeatureFlags(),this.unregister(Ot))}}setPersonProperties(e,t){if((e||t)&&this.Xr("posthog.setPersonProperties")){var s=wr(this.get_distinct_id(),e,t);this.Rr!==s?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Rr=s):w.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,s){if(e&&t){var r=this.getGroups(),n=r[e]!==t;if(n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:y({},r,{[e]:t})}),n||s){var a={$group_type:e,$group_key:t};s&&(a.$group_set=s),this.capture(nr,a)}s&&this.setGroupPropertiesForFlags({[e]:s}),n&&!s&&this.reloadFeatureFlags()}else w.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var s;t===void 0&&(t=!0),(s=this.featureFlags)==null||s.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;(e=this.featureFlags)==null||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var s;t===void 0&&(t=!0),this.Xr("posthog.setGroupPropertiesForFlags")&&((s=this.featureFlags)==null||s.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){var t,s,r,n,a,o,l,c;if(w.info("reset"),!this.__loaded)return w.uninitializedWarning("posthog.reset");var u=this.get_property(ri);if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(s=this.sessionPersistence)==null||s.clear(),(r=this.surveys)==null||r.reset(),(n=this.Hr)==null||n.stop(),(a=this.featureFlags)==null||a.reset(),(o=this.conversations)==null||o.reset(),(l=this.persistence)==null||l.set_property(be,Ke),(c=this.sessionManager)==null||c.resetSessionId(),this.Rr=null,this.config.cookieless_mode===Ee)this.register_once({distinct_id:Vt,$device_id:null},"");else{var h=this.config.get_device_id(je());this.register_once({distinct_id:h,$device_id:e?h:u},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var s;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(s=this.conversations)==null||s.Qr()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)==null?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:s}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(e!=null&&e.withTimestamp&&s){var n,a=(n=e.timestampLookBack)!==null&&n!==void 0?n:10;if(!s)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-s)/1e3)-a,0)}return r}alias(e,t){return e===this.get_property(Sn)?(w.critical("Attempting to create alias for existing People user - aborting."),-2):this.Xr("posthog.alias")?(E(t)&&(t=this.get_distinct_id()),e!==t?(this.Jr(Pt,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(w.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=y({},this.config);if(J(e)){var s,r,n,a,o,l,c,u,h;B(this.config,Rr(e));var d=this.Or();(s=this.persistence)==null||s.update_config(this.config,t,d),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Mi(y({},this.config,{persistence:"sessionStorage"}),d);var v=this.Nr(this.config.debug);Pe(v)&&(this.config.debug=v),Pe(this.config.debug)&&(this.config.debug?(ne.DEBUG=!0,X.Ut()&&X.Xt("ph_debug",!0),w.info("set_config",{config:e,oldConfig:t,newConfig:y({},this.config)})):(ne.DEBUG=!1,X.Ut()&&X.Jt("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),(a=this.autocapture)==null||a.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(c=this.deadClicksAutocapture)==null||c.startIfEnabledOrStop(),(u=this.surveys)==null||u.loadIfEnabled(),this.en(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){ne.LIB_NAME=e,ne.LIB_VERSION=t}startSessionRecording(e){var t,s,r,n,a,o=e===!0,l={sampling:o||!(e==null||!e.sampling),linked_flag:o||!(e==null||!e.linked_flag),url_trigger:o||!(e==null||!e.url_trigger),event_trigger:o||!(e==null||!e.event_trigger)};Object.values(l).some(Boolean)&&((t=this.sessionManager)==null||t.checkAndGetSessionAndWindowId(),l.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),l.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),l.url_trigger&&((n=this.sessionRecording)==null||n.overrideTrigger("url")),l.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){if(this.exceptions){var s=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:s});return this.exceptions.sendExceptionEvent(y({},r,t))}}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){var e,t;return(e=(t=this.logs)==null?void 0:t.logger)!==null&&e!==void 0?e:ge.rn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,s;return(t=(s=this.toolbar)==null?void 0:s.loadToolbar(e))!==null&&t!==void 0&&t}get_property(e){var t;return(t=this.persistence)==null?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)==null?void 0:t.props[e]}toString(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:at;return t!==at&&(t=at+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)==null?void 0:e.get_property(be))===Ze||((t=this.sessionPersistence)==null?void 0:t.get_property(be))===Ze}Wr(){var e,t;return!(this.config.person_profiles==="never"||this.config.person_profiles===vs&&!this._isIdentified()&&ot(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Pt])&&((t=this.persistence)==null||(t=t.props)==null||!t[li]))}zr(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Wr()||this.Xr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Xr("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Xr(e){return this.config.person_profiles==="never"?(w.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Jr(li,!0),!0)}Or(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==$e)}en(){var e,t,s,r,n=this.Or();return((e=this.persistence)==null?void 0:e.fi)!==n&&((s=this.persistence)==null||s.set_disabled(n)),((t=this.sessionPersistence)==null?void 0:t.fi)!==n&&((r=this.sessionPersistence)==null||r.set_disabled(n)),n}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==Ee){if(this.config.cookieless_mode===$e&&this.consent.isExplicitlyOptedOut()){var s,r,n,a,o;this.reset(!0),(s=this.sessionManager)==null||s.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new br(this),this.pageViewManager=new ur(this),this.persistence&&(this.sessionPropsManager=new yr(this,this.sessionManager,this.persistence));var l=(n=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&n!==void 0?n:(o=ge.__defaultExtensionClasses)==null?void 0:o.sessionRecording;l&&(this.sessionRecording=this.Ir(this.sessionRecording,new l(this)))}var c,u;this.consent.optInOut(!0),this.en(),this.$r(),(t=this.sessionRecording)==null||t.startIfEnabledOrStop(),this.config.cookieless_mode==$e&&((c=this.surveys)==null||c.loadIfEnabled()),(E(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((u=e==null?void 0:e.captureEventName)!==null&&u!==void 0?u:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vr()}else w.warn(kr)}opt_out_capturing(){var e,t,s;this.config.cookieless_mode!==Ee?(this.config.cookieless_mode===$e&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.en(),this.config.cookieless_mode===$e&&(this.register({distinct_id:Vt,$device_id:null}),(e=this.sessionManager)==null||e.destroy(),(t=this.pageViewManager)==null||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(s=this.sessionRecording)==null||s.stopRecording(),this.sessionRecording=void 0,this.Vr())):w.warn(kr)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Ee||(this.config.cookieless_mode===$e?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.en()}_is_bot(){return ce?Wn(ce,this.config.custom_blocked_useragents):void 0}Vr(){b&&(b.visibilityState==="visible"?this.Tr||(this.Tr=!0,this.capture(nt,{title:b.title},{send_instantly:!0}),this.Ar&&(b.removeEventListener(ui,this.Ar),this.Ar=null)):this.Ar||(this.Ar=this.Vr.bind(this),G(b,ui,this.Ar)))}debug(e){e===!1?(p==null||p.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(p==null||p.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}ki(){var e,t,s,r,n,a,o=this.Mr||{};return"advanced_disable_flags"in o?!!o.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(w.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(s="advanced_disable_decide",r=w,n=(t="advanced_disable_flags")in(e=o)&&!L(e[t]),a=s in e&&!L(e[s]),n?e[t]:!!a&&(r&&r.warn("Config field '"+s+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[s]))}Gr(e){if(L(this.config.before_send))return e;var t=D(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var r of t){if(s=r(s),L(s)){var n="Event '"+e.event+"' was rejected in beforeSend function";return wa(e.event)?w.warn(n+". This can cause unexpected behavior."):w.info(n),null}s.properties&&!ot(s.properties)||w.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return s}getPageViewId(){var e;return(e=this.pageViewManager.ai)==null?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,s){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(s)})}Nr(e){var t=Pe(e)&&!e,s=X.Ut()&&X.Gt("ph_debug")==="true";return!t&&(!!s||e)}}function Fr(i){return i instanceof Element&&(i.id===In||!(i.closest==null||!i.closest(".toolbar-global-fade-container")))}function Ei(i){return!!i&&i.nodeType===1}function Ue(i,e){return!!i&&!!i.tagName&&i.tagName.toLowerCase()===e.toLowerCase()}function Qn(i){return!!i&&i.nodeType===3}function ea(i){return!!i&&i.nodeType===11}function Ns(i){return i?yi(i).split(/\s+/):[]}function Ir(i){var e=p==null?void 0:p.location.href;return!!(e&&i&&i.some((t=>e.match(t))))}function mi(i){var e="";switch(typeof i.className){case"string":e=i.className;break;case"object":e=(i.className&&"baseVal"in i.className?i.className.baseVal:null)||i.getAttribute("class")||"";break;default:e=""}return Ns(e)}function ta(i){return L(i)?null:yi(i).split(/(\s+)/).filter((e=>Lt(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function qt(i){var e="";return ks(i)&&!sa(i)&&i.childNodes&&i.childNodes.length&&q(i.childNodes,(function(t){var s;Qn(t)&&t.textContent&&(e+=(s=ta(t.textContent))!==null&&s!==void 0?s:"")})),yi(e)}function $r(i){return E(i.target)?i.srcElement||null:(e=i.target)!=null&&e.shadowRoot?i.composedPath()[0]||null:i.target||null;var e}ge.__defaultExtensionClasses={},ge.rn={trace:et=()=>{},debug:et,info:et,warn:et,error:et,fatal:et},(function(i,e){for(var t=0;e.length>t;t++)i.prototype[e[t]]=io(i.prototype[e[t]])})(ge,["identify"]);var Hs=["a","button","form","input","select","textarea","label"];function Cr(i,e){if(E(e))return!0;var t,s=function(n){if(e.some((a=>n.matches(a))))return{v:!0}};for(var r of i)if(t=s(r))return t.v;return!1}function ia(i){var e=i.parentNode;return!(!e||!Ei(e))&&e}var Xo=["next","previous","prev",">","<"],Tr=[".ph-no-rageclick",".ph-no-capture"],xs=i=>!i||Ue(i,"html")||!Ei(i),Or=(i,e)=>{if(!p||xs(i))return{parentIsUsefulElement:!1,targetElementList:[]};for(var t=!1,s=[i],r=i;r.parentNode&&!Ue(r,"body");)if(ea(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var n=ia(r);if(!n)break;if(e||Hs.indexOf(n.tagName.toLowerCase())>-1)t=!0;else{var a=p.getComputedStyle(n);a&&a.getPropertyValue("cursor")==="pointer"&&(t=!0)}s.push(n),r=n}return{parentIsUsefulElement:t,targetElementList:s}};function ks(i){for(var e=i;e.parentNode&&!Ue(e,"body");e=e.parentNode){var t=mi(e);if(M(t,"ph-sensitive")||M(t,"ph-no-capture"))return!1}if(M(mi(i),"ph-include"))return!0;var s=i.type||"";if(W(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=i.name||i.id||"";return!W(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function sa(i){return!!(Ue(i,"input")&&!["button","checkbox","submit","reset"].includes(i.type)||Ue(i,"select")||Ue(i,"textarea")||i.getAttribute("contenteditable")==="true")}var ra="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Vo=new RegExp("^(?:"+ra+")$"),Bo=new RegExp(ra),na="\\d{3}-?\\d{2}-?\\d{4}",Go=new RegExp("^("+na+")$"),Wo=new RegExp("("+na+")");function Lt(i,e){return e===void 0&&(e=!0),!(L(i)||W(i)&&(i=yi(i),(e?Vo:Bo).test((i||"").replace(/[- ]/g,""))||(e?Go:Wo).test(i)))}function Mr(i){var e=qt(i);return Lt(e=(e+" "+aa(i)).trim())?e:""}function aa(i){var e="";return i&&i.childNodes&&i.childNodes.length&&q(i.childNodes,(function(t){var s;if(t&&((s=t.tagName)==null?void 0:s.toLowerCase())==="span")try{var r=qt(t);e=(e+" "+r).trim(),t.childNodes&&t.childNodes.length&&(e=(e+" "+aa(t)).trim())}catch(n){w.error("[AutoCapture]",n)}})),e}function Ar(i){return i.replace(/"|\\"/g,'\\"')}function Yo(i){var e=i.attr__class;return e?D(e)?e:Ns(e):void 0}class Lr{constructor(e){this.disabled=e===!1;var t=J(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,s){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)s-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:s}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:s}];return!1}}var Ui="$copy_autocapture",Dr=z("[AutoCapture]");function zi(i,e){return e.length>i?e.slice(0,i)+"...":e}function Jo(i){if(i.previousElementSibling)return i.previousElementSibling;var e=i;do e=e.previousSibling;while(e&&!Ei(e));return e}function Ko(i,e){for(var t,s,{e:r,maskAllElementAttributes:n,maskAllText:a,elementAttributeIgnoreList:o,elementsChainAsString:l}=e,c=[i],u=i;u.parentNode&&!Ue(u,"body");)ea(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var h,d,v=[],g={},f=!1,$=!1;if(q(c,(_=>{var S=ks(_);_.tagName.toLowerCase()==="a"&&(f=_.getAttribute("href"),f=S&&f&&Lt(f)&&f),M(mi(_),"ph-no-capture")&&($=!0),v.push((function(m,P,T,O){var A=m.tagName.toLowerCase(),H={tag_name:A};Hs.indexOf(A)>-1&&!T&&(H.$el_text=A.toLowerCase()==="a"||A.toLowerCase()==="button"?zi(1024,Mr(m)):zi(1024,qt(m)));var N=mi(m);N.length>0&&(H.classes=N.filter((function(V){return V!==""}))),q(m.attributes,(function(V){var ie;if((!sa(m)||["name","id","class","aria-label"].indexOf(V.name)!==-1)&&(O==null||!O.includes(V.name))&&!P&&Lt(V.value)&&(!W(ie=V.name)||ie.substring(0,10)!=="_ngcontent"&&ie.substring(0,7)!=="_nghost")){var de=V.value;V.name==="class"&&(de=Ns(de).join(" ")),H["attr__"+V.name]=zi(1024,de)}}));for(var Y=1,Z=1,ae=m;ae=Jo(ae);)Y++,ae.tagName===m.tagName&&Z++;return H.nth_child=Y,H.nth_of_type=Z,H})(_,n,a,o));var x=(function(m){if(!ks(m))return{};var P={};return q(m.attributes,(function(T){if(T.name&&T.name.indexOf("data-ph-capture-attribute")===0){var O=T.name.replace("data-ph-capture-attribute-",""),A=T.value;O&&A&&Lt(A)&&(P[O]=A)}})),P})(_);B(g,x)})),$)return{props:{},explicitNoCapture:$};if(a||(v[0].$el_text=i.tagName.toLowerCase()==="a"||i.tagName.toLowerCase()==="button"?Mr(i):qt(i)),f){var k,C;v[0].attr__href=f;var R=(k=di(f))==null?void 0:k.host,I=p==null||(C=p.location)==null?void 0:C.host;R&&I&&R!==I&&(h=f)}return{props:B({$event_type:r.type,$ce_version:1},l?{}:{$elements:v},{$elements_chain:(d=v,(function(_){return _.map((S=>{var x,m,P="";if(S.tag_name&&(P+=S.tag_name),S.attr_class)for(var T of(S.attr_class.sort(),S.attr_class))P+="."+T.replace(/"/g,"");var O=y({},S.text?{text:S.text}:{},{"nth-child":(x=S.nth_child)!==null&&x!==void 0?x:0,"nth-of-type":(m=S.nth_of_type)!==null&&m!==void 0?m:0},S.href?{href:S.href}:{},S.attr_id?{attr_id:S.attr_id}:{},S.attributes),A={};return ei(O).sort(((H,N)=>{var[Y]=H,[Z]=N;return Y.localeCompare(Z)})).forEach((H=>{var[N,Y]=H;return A[Ar(N.toString())]=Ar(Y.toString())})),(P+=":")+ei(A).map((H=>{var[N,Y]=H;return N+'="'+Y+'"'})).join("")})).join(";")})((function(_){return _.map((S=>{var x,m,P={text:(x=S.$el_text)==null?void 0:x.slice(0,400),tag_name:S.tag_name,href:(m=S.attr__href)==null?void 0:m.slice(0,2048),attr_class:Yo(S),attr_id:S.attr__id,nth_child:S.nth_child,nth_of_type:S.nth_of_type,attributes:{}};return ei(S).filter((T=>{var[O]=T;return O.indexOf("attr__")===0})).forEach((T=>{var[O,A]=T;return P.attributes[O]=A})),P}))})(d)))},(t=v[0])!=null&&t.$el_text?{$el_text:(s=v[0])==null?void 0:s.$el_text}:{},h&&r.type==="click"?{$external_click_url:h}:{},g)}}var xt=z("[ExceptionAutocapture]");function Nr(i,e,t){try{if(!(e in i))return()=>{};var s=i[e],r=t(s);return Ce(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),i[e]=r,()=>{i[e]=s}}catch{return()=>{}}}var Zo=z("[TracingHeaders]"),Le=z("[Web Vitals]"),Hr=9e5,jr="disabled",qr="lazy_loading",kt="awaiting_config",Kt="missing_config";z("[SessionRecording]"),z("[SessionRecording]");var Ss="[SessionRecording]",De=z(Ss),Qo=z("[Heatmaps]");function Ur(i){return J(i)&&"clientX"in i&&"clientY"in i&&xe(i.clientX)&&xe(i.clientY)}var zr=z("[Product Tours]"),el=["$set_once","$set"],Ne=z("[SiteApps]"),Xr="Error while initializing PostHog app with config id ";function tt(i,e,t){if(L(i))return!1;switch(t){case"exact":return i===e;case"contains":var s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(s,"i").test(i);case"regex":try{return new RegExp(e).test(i)}catch{return!1}default:return!1}}class tl{constructor(e){this.nn=new Ds,this.sn=(t,s)=>this.an(t,s)&&this.ln(t,s)&&this.un(t,s)&&this.hn(t,s),this.an=(t,s)=>s==null||!s.event||(t==null?void 0:t.event)===(s==null?void 0:s.event),this._instance=e,this.cn=new Set,this.dn=new Set}init(){var e,t;E((e=this._instance)==null?void 0:e._addCaptureHook)||(t=this._instance)==null||t._addCaptureHook(((s,r)=>{this.on(s,r)}))}register(e){var t,s;if(!E((t=this._instance)==null?void 0:t._addCaptureHook)&&(e.forEach((a=>{var o,l;(o=this.dn)==null||o.add(a),(l=a.steps)==null||l.forEach((c=>{var u;(u=this.cn)==null||u.add((c==null?void 0:c.event)||"")}))})),(s=this._instance)!=null&&s.autocapture)){var r,n=new Set;e.forEach((a=>{var o;(o=a.steps)==null||o.forEach((l=>{l!=null&&l.selector&&n.add(l==null?void 0:l.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(n)}}on(e,t){var s;t!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(t==null?void 0:t.event))&&this.dn&&((s=this.dn)==null?void 0:s.size)>0&&this.dn.forEach((r=>{this.vn(t,r)&&this.nn.emit("actionCaptured",r.name)}))}fn(e){this.onAction("actionCaptured",(t=>e(t)))}vn(e,t){if((t==null?void 0:t.steps)==null)return!1;for(var s of t.steps)if(this.sn(e,s))return!0;return!1}onAction(e,t){return this.nn.on(e,t)}ln(e,t){if(t!=null&&t.url){var s,r=e==null||(s=e.properties)==null?void 0:s.$current_url;if(!r||typeof r!="string"||!tt(r,t.url,t.url_matching||"contains"))return!1}return!0}un(e,t){return!!this.pn(e,t)&&!!this.gn(e,t)&&!!this.mn(e,t)}pn(e,t){var s;if(t==null||!t.href)return!0;var r=this.yn(e);if(r.length>0)return r.some((o=>tt(o.href,t.href,t.href_matching||"exact")));var n,a=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";return!!a&&tt((n=a.match(/(?::|")href="(.*?)"/))?n[1]:"",t.href,t.href_matching||"exact")}gn(e,t){var s;if(t==null||!t.text)return!0;var r=this.yn(e);if(r.length>0)return r.some((c=>tt(c.text,t.text,t.text_matching||"exact")||tt(c.$el_text,t.text,t.text_matching||"exact")));var n,a,o,l=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";return!!l&&(n=(function(c){for(var u,h=[],d=/(?::|")text="(.*?)"/g;!L(u=d.exec(c));)h.includes(u[1])||h.push(u[1]);return h})(l),a=t.text,o=t.text_matching||"exact",n.some((c=>tt(c,a,o))))}mn(e,t){var s,r;if(t==null||!t.selector)return!0;var n=e==null||(s=e.properties)==null?void 0:s.$element_selectors;if(n!=null&&n.includes(t.selector))return!0;var a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch{return!1}return!1}yn(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e==null?void 0:e.properties.$elements}hn(e,t){return t==null||!t.properties||t.properties.length===0||Jn(t.properties.reduce(((s,r)=>{var n=D(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return s[r.key]={values:n,operator:r.operator||"exact"},s}),{}),e==null?void 0:e.properties)}}class il{constructor(e){this._instance=e,this.bn=new Map,this.wn=new Map,this._n=new Map}In(e,t){return!!e&&Jn(e.propertyFilters,t==null?void 0:t.properties)}Cn(e,t){var s=new Map;return e.forEach((r=>{var n;(n=r.conditions)==null||(n=n[t])==null||(n=n.values)==null||n.forEach((a=>{if(a!=null&&a.name){var o=s.get(a.name)||[];o.push(r.id),s.set(a.name,o)}}))})),s}Sn(e,t,s){var r=(s===mt.Activation?this.bn:this.wn).get(e),n=[];return this.kn((a=>{n=a.filter((o=>r==null?void 0:r.includes(o.id)))})),n.filter((a=>{var o,l=(o=a.conditions)==null||(o=o[s])==null||(o=o.values)==null?void 0:o.find((c=>c.name===e));return this.In(l,t)}))}register(e){var t;E((t=this._instance)==null?void 0:t._addCaptureHook)||(this.xn(e),this.Tn(e))}Tn(e){var t=e.filter((s=>{var r,n;return((r=s.conditions)==null?void 0:r.actions)&&((n=s.conditions)==null||(n=n.actions)==null||(n=n.values)==null?void 0:n.length)>0}));t.length!==0&&(this.An==null&&(this.An=new tl(this._instance),this.An.init(),this.An.fn((s=>{this.onAction(s)}))),t.forEach((s=>{var r,n,a,o,l;s.conditions&&(r=s.conditions)!=null&&r.actions&&(n=s.conditions)!=null&&(n=n.actions)!=null&&n.values&&((a=s.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((o=this.An)==null||o.register(s.conditions.actions.values),(l=s.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((c=>{if(c&&c.name){var u=this._n.get(c.name);u&&u.push(s.id),this._n.set(c.name,u||[s.id])}})))})))}xn(e){var t,s=e.filter((n=>{var a,o;return((a=n.conditions)==null?void 0:a.events)&&((o=n.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})),r=e.filter((n=>{var a,o;return((a=n.conditions)==null?void 0:a.cancelEvents)&&((o=n.conditions)==null||(o=o.cancelEvents)==null||(o=o.values)==null?void 0:o.length)>0}));s.length===0&&r.length===0||((t=this._instance)==null||t._addCaptureHook(((n,a)=>{this.onEvent(n,a)})),this.bn=this.Cn(e,mt.Activation),this.wn=this.Cn(e,mt.Cancellation))}onEvent(e,t){var s,r=this.re(),n=this.En(),a=this.Rn(),o=((s=this._instance)==null||(s=s.persistence)==null?void 0:s.props[n])||[];if(a===e&&t&&o.length>0){var l,c;r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var u=(t==null||(l=t.properties)==null?void 0:l.$survey_id)||(t==null||(c=t.properties)==null?void 0:c.$product_tour_id);if(u){var h=o.indexOf(u);0>h||(o.splice(h,1),this.Nn(o))}}else{if(this.wn.has(e)){var d=this.Sn(e,t,mt.Cancellation);d.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map((g=>g.id))}),d.forEach((g=>{var f=o.indexOf(g.id);0>f||o.splice(f,1),this.Mn(g.id)})),this.Nn(o))}if(this.bn.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.bn.get(e)});var v=this.Sn(e,t,mt.Activation);this.Nn(o.concat(v.map((g=>g.id))||[]))}}}onAction(e){var t,s=this.En(),r=((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[s])||[];this._n.has(e)&&this.Nn(r.concat(this._n.get(e)||[]))}Nn(e){var t,s=this.re(),r=this.En(),n=[...new Set(e)].filter((a=>!this.Fn(a)));s.info("updating activated items",{activatedItems:n}),(t=this._instance)==null||(t=t.persistence)==null||t.register({[r]:n})}getActivatedIds(){var e,t=this.En();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}getEventToItemsMap(){return this.bn}On(){return this.An}}class sl extends il{constructor(e){super(e)}En(){return Fn}Rn(){return Ct.SHOWN}kn(e){var t;(t=this._instance)==null||t.getSurveys(e)}Mn(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}re(){return j}Fn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Xi="SDK is not enabled or survey functionality is not yet loaded",Vr="Disabled. Not loading surveys.",rl=p!=null&&p.location?vi(p.location.hash,"__posthog")||vi(location.hash,"state"):null,Br="_postHogToolbarParams",Gr=z("[Toolbar]"),se=z("[FeatureFlags]"),Ve=z("[FeatureFlags]",{debugEnabled:!0}),Vi=`" failed. Feature flags didn't load in time.`,Bi="$active_feature_flags",He="$override_feature_flags",Wr="$feature_flag_request_id",Yr=i=>{for(var e={},t=0;i.length>t;t++)e[i[t]]=!0;return e},Jr=i=>{var e={};for(var[t,s]of ei(i||{}))s&&(e[t]=s);return e},Gi=z("[Error tracking]"),Kr="Refusing to render web experiment since the viewer is a likely bot",nl={icontains:(i,e)=>!!p&&e.href.toLowerCase().indexOf(i.toLowerCase())>-1,not_icontains:(i,e)=>!!p&&e.href.toLowerCase().indexOf(i.toLowerCase())===-1,regex:(i,e)=>!!p&&_i(e.href,i),not_regex:(i,e)=>!!p&&!_i(e.href,i),exact:(i,e)=>e.href===i,is_not:(i,e)=>e.href!==i};class te{get Rt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(s){s===void 0&&(s=!1),t.getWebExperiments((r=>{te.Pn("retrieved web experiments from the server"),t.Ln=new Map,r.forEach((n=>{if(n.feature_flag_key){var a;t.Ln&&(te.Pn("setting flag key ",n.feature_flag_key," to web experiment ",n),(a=t.Ln)==null||a.set(n.feature_flag_key,n));var o=t._instance.getFeatureFlag(n.feature_flag_key);W(o)&&n.variants[o]&&t.Dn(n.name,o,n.variants[o].transforms)}else if(n.variants)for(var l in n.variants){var c=n.variants[l];te.Bn(c)&&t.Dn(n.name,l,c.transforms)}}))}),s)},this._instance=e,this._instance.onFeatureFlags((s=>{this.onFeatureFlags(s)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())te.Pn(Kr);else if(!this.Rt.disable_web_experiments){if(L(this.Ln))return this.Ln=new Map,this.loadIfEnabled(),void this.previewWebExperiment();te.Pn("applying feature flags",e),e.forEach((t=>{var s;if(this.Ln&&(s=this.Ln)!=null&&s.has(t)){var r,n=this._instance.getFeatureFlag(t),a=(r=this.Ln)==null?void 0:r.get(t);n&&a!=null&&a.variants[n]&&this.Dn(a.name,n,a.variants[n].transforms)}}))}}previewWebExperiment(){var e=te.getWindowLocation();if(e!=null&&e.search){var t=pi(e==null?void 0:e.search,"__experiment_id"),s=pi(e==null?void 0:e.search,"__experiment_variant");t&&s&&(te.Pn("previewing web experiments "+t+" && "+s),this.getWebExperiments((r=>{this.jn(parseInt(t),s,r)}),!1,!0))}}loadIfEnabled(){this.Rt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,s){if(this.Rt.disable_web_experiments&&!s)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Rt.token),method:"GET",callback:n=>e(n.statusCode===200&&n.json&&n.json.experiments||[])})}jn(e,t,s){var r=s.filter((n=>n.id===e));r&&r.length>0&&(te.Pn("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Dn(r[0].name,t,r[0].variants[t].transforms))}static Bn(e){return!L(e.conditions)&&te.qn(e)&&te.Zn(e)}static qn(e){var t;if(L(e.conditions)||L((t=e.conditions)==null?void 0:t.url))return!0;var s,r,n,a=te.getWindowLocation();return!!a&&((s=e.conditions)==null||!s.url||nl[(r=(n=e.conditions)==null?void 0:n.urlMatchType)!==null&&r!==void 0?r:"icontains"](e.conditions.url,a))}static getWindowLocation(){return p==null?void 0:p.location}static Zn(e){var t;if(L(e.conditions)||L((t=e.conditions)==null?void 0:t.utm))return!0;var s=Mn();if(s.utm_source){var r,n,a,o,l,c,u,h,d=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((n=e.conditions)==null||(n=n.utm)==null?void 0:n.utm_campaign)==s.utm_campaign,v=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_source||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_source)==s.utm_source,g=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==s.utm_medium,f=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_term||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_term)==s.utm_term;return d&&g&&f&&v}return!1}static Pn(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;t>r;r++)s[r-1]=arguments[r];w.info("[WebExperiments] "+e,s)}Dn(e,t,s){this._is_bot()?te.Pn(Kr):t!=="control"?s.forEach((r=>{if(r.selector){var n;te.Pn("applying transform of variant "+t+" for experiment "+e+" ",r);var a=(n=document)==null?void 0:n.querySelectorAll(r.selector);a==null||a.forEach((o=>{var l=o;r.html&&(l.innerHTML=r.html),r.css&&l.setAttribute("style",r.css)}))}})):te.Pn("Control variants leave the page unmodified.")}_is_bot(){return ce&&this._instance?Wn(ce,this.Rt.custom_blocked_useragents):void 0}}var ve=z("[Conversations]"),Be="Conversations not available yet.",oa={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},al=oa.info;function la(i){if(Pe(i))return{boolValue:i};if(xe(i))return Number.isInteger(i)?{intValue:i}:{doubleValue:i};if(typeof i=="string")return{stringValue:i};if(D(i))return{arrayValue:{values:i.map((e=>la(e)))}};try{return{stringValue:JSON.stringify(i)}}catch{return{stringValue:String(i)}}}function Zr(i){var e=[];for(var t in i){var s=i[t];Oe(s)||E(s)||e.push({key:t,value:la(s)})}return e}var xi={featureFlags:class{constructor(i){this.$n=!1,this.Vn=!1,this.Hn=!1,this.zn=!1,this.Un=!1,this.Yn=!1,this.Gn=!1,this.Wn=!1,this._instance=i,this.featureFlagEventHandlers=[]}get Rt(){return this._instance.config}get Xi(){return this._instance.persistence}Xn(i){return this._instance.get_property(i)}Jn(){var i,e;return(i=(e=this.Xi)==null?void 0:e.pi(this.Rt.feature_flag_cache_ttl_ms))!==null&&i!==void 0&&i}Kn(){return!!this.Jn()&&(this.Wn||this.Hn||(this.Wn=!0,se.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Qn(){var i,e=(i=this.Rt.evaluation_contexts)!==null&&i!==void 0?i:this.Rt.evaluation_environments;return!this.Rt.evaluation_environments||this.Rt.evaluation_contexts||this.Gn||(se.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Gn=!0),e!=null&&e.length?e.filter((t=>{var s=t&&typeof t=="string"&&t.trim().length>0;return s||se.error("Invalid evaluation context found:",t,"Expected non-empty string"),s})):[]}ts(){return this.Qn().length>0}initialize(){var i,e,{config:t}=this._instance,s=(i=(e=t.bootstrap)==null?void 0:e.featureFlags)!==null&&i!==void 0?i:{};if(Object.keys(s).length){var r,n,a=(r=(n=t.bootstrap)==null?void 0:n.featureFlagPayloads)!==null&&r!==void 0?r:{},o=Object.keys(s).filter((c=>!!s[c])).reduce(((c,u)=>(c[u]=s[u]||!1,c)),{}),l=Object.keys(a).filter((c=>o[c])).reduce(((c,u)=>(a[u]&&(c[u]=a[u]),c)),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:l})}}updateFlags(i,e,t){var s=t!=null&&t.merge?this.getFlagVariants():{},r=t!=null&&t.merge?this.getFlagPayloads():{},n=y({},s,i),a=y({},r,e),o={};for(var[l,c]of Object.entries(n)){var u=typeof c=="string";o[l]={key:l,enabled:!!u||!!c,variant:u?c:void 0,reason:void 0,metadata:E(a==null?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.receivedFeatureFlags({flags:o})}get hasLoadedFlags(){return this.Vn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var i=this.Xn(ns),e=this.Xn(He),t=this.Xn(rt);if(!t&&!e)return i||{};var s=B({},i||{}),r=[...new Set([...Object.keys(t||{}),...Object.keys(e||{})])];for(var n of r){var a,o,l=s[n],c=e==null?void 0:e[n],u=E(c)?(a=l==null?void 0:l.enabled)!==null&&a!==void 0&&a:!!c,h=E(c)?l.variant:typeof c=="string"?c:void 0,d=t==null?void 0:t[n],v=y({},l,{enabled:u,variant:u?h??(l==null?void 0:l.variant):void 0});u!==(l==null?void 0:l.enabled)&&(v.original_enabled=l==null?void 0:l.enabled),h!==(l==null?void 0:l.variant)&&(v.original_variant=l==null?void 0:l.variant),d&&(v.metadata=y({},l==null?void 0:l.metadata,{payload:d,original_payload:l==null||(o=l.metadata)==null?void 0:o.payload})),s[n]=v}return this.$n||(se.warn(" Overriding feature flag details!",{flagDetails:i,overriddenPayloads:t,finalDetails:s}),this.$n=!0),s}getFlagVariants(){var i=this.Xn(lt),e=this.Xn(He);if(!e)return i||{};for(var t=B({},i),s=Object.keys(e),r=0;s.length>r;r++)t[s[r]]=e[s[r]];return this.$n||(se.warn(" Overriding feature flags!",{enabledFlags:i,overriddenFlags:e,finalFlags:t}),this.$n=!0),t}getFlagPayloads(){var i=this.Xn(as),e=this.Xn(rt);if(!e)return i||{};for(var t=B({},i||{}),s=Object.keys(e),r=0;s.length>r;r++)t[s[r]]=e[s[r]];return this.$n||(se.warn(" Overriding feature flag payloads!",{flagPayloads:i,overriddenPayloads:e,finalPayloads:t}),this.$n=!0),t}reloadFeatureFlags(){this.zn||this.Rt.advanced_disable_feature_flags||this.es||(this._instance.kr.emit("featureFlagsReloading",!0),this.es=setTimeout((()=>{this.rs()}),5))}ns(){clearTimeout(this.es),this.es=void 0}ensureFlagsLoaded(){this.Vn||this.Hn||this.es||this.reloadFeatureFlags()}setAnonymousDistinctId(i){this.$anon_distinct_id=i}setReloadingPaused(i){this.zn=i}rs(i){var e;if(this.ns(),!this._instance.ki())if(this.Hn)this.Un=!0;else{var t=this.Rt.token,s=this.Xn(ri),r={token:t,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:y({},((e=this.Xi)==null?void 0:e.get_initial_props())||{},this.Xn($t)||{}),group_properties:this.Xn(Ge),timezone:jn()};Oe(s)||E(s)||(r.$device_id=s),(i!=null&&i.disableFlags||this.Rt.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.ts()&&(r.evaluation_contexts=this.Qn());var n=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Rt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Hn=!0,this._instance._send_request({method:"POST",url:n,data:r,compression:this.Rt.disable_compression?void 0:ke.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback:a=>{var o,l,c,u=!0;if(a.statusCode===200&&(this.Un||(this.$anon_distinct_id=void 0),u=!1),this.Hn=!1,!r.disable_flags||this.Un){this.Yn=!u;var h=[];a.error?a.error instanceof Error?h.push(a.error.name==="AbortError"?"timeout":"connection_error"):h.push("unknown_error"):a.statusCode!==200&&h.push("api_error_"+a.statusCode),(o=a.json)!=null&&o.errorsWhileComputingFlags&&h.push("errors_while_computing_flags");var d,v=!((l=a.json)==null||(l=l.quotaLimited)==null||!l.includes("feature_flags"));v&&h.push("quota_limited"),(c=this.Xi)==null||c.register({[us]:h}),v?se.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags((d=a.json)!==null&&d!==void 0?d:{},u,{partialResponse:!!this.Rt.advanced_only_evaluate_survey_feature_flags}),this.Un&&(this.Un=!1,this.rs()))}}})}}getFeatureFlag(i,e){var t;if(e===void 0&&(e={}),!e.fresh||this.Yn)if(this.Vn||this.getFlags()&&this.getFlags().length>0){if(!this.Kn()){var s=this.getFeatureFlagResult(i,e);return(t=s==null?void 0:s.variant)!==null&&t!==void 0?t:s==null?void 0:s.enabled}}else se.warn('getFeatureFlag for key "'+i+Vi)}getFeatureFlagDetails(i){return this.getFlagsWithDetails()[i]}getFeatureFlagPayload(i){var e=this.getFeatureFlagResult(i,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(i,e){if(e===void 0&&(e={}),!e.fresh||this.Yn)if(this.Vn||this.getFlags()&&this.getFlags().length>0){if(!this.Kn()){var t=this.getFlagVariants(),s=i in t,r=t[i],n=this.getFlagPayloads()[i],a=String(r),o=this.Xn(Wr)||void 0,l=this.Xn(ai)||void 0,c=this.Xn(Ot)||{};if(this.Rt.advanced_feature_flags_dedup_per_session){var u,h=this._instance.get_session_id(),d=this.Xn(ls);h&&h!==d&&(c={},(u=this.Xi)==null||u.register({[Ot]:c,[ls]:h}))}if((e.send_event||!("send_event"in e))&&(!(i in c)||!c[i].includes(a))){var v,g,f,$,k,C,R,I,_,S;D(c[i])?c[i].push(a):c[i]=[a],(v=this.Xi)==null||v.register({[Ot]:c});var x=this.getFeatureFlagDetails(i),m=[...(g=this.Xn(us))!==null&&g!==void 0?g:[]];E(r)&&m.push("flag_missing");var P={$feature_flag:i,$feature_flag_response:r,$feature_flag_payload:n||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:((f=this.Rt.bootstrap)==null||(f=f.featureFlags)==null?void 0:f[i])||null,$feature_flag_bootstrapped_payload:(($=this.Rt.bootstrap)==null||($=$.featureFlagPayloads)==null?void 0:$[i])||null,$used_bootstrap_value:!this.Yn};E(x==null||(k=x.metadata)==null?void 0:k.version)||(P.$feature_flag_version=x.metadata.version);var T,O=(C=x==null||(R=x.reason)==null?void 0:R.description)!==null&&C!==void 0?C:x==null||(I=x.reason)==null?void 0:I.code;O&&(P.$feature_flag_reason=O),x!=null&&(_=x.metadata)!=null&&_.id&&(P.$feature_flag_id=x.metadata.id),E(x==null?void 0:x.original_variant)&&E(x==null?void 0:x.original_enabled)||(P.$feature_flag_original_response=E(x.original_variant)?x.original_enabled:x.original_variant),x!=null&&(S=x.metadata)!=null&&S.original_payload&&(P.$feature_flag_original_payload=x==null||(T=x.metadata)==null?void 0:T.original_payload),m.length&&(P.$feature_flag_error=m.join(",")),this._instance.capture("$feature_flag_called",P)}if(s){var A=n;if(!E(n))try{A=JSON.parse(n)}catch{}return{key:i,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:A}}}}else se.warn('getFeatureFlagResult for key "'+i+Vi)}getRemoteConfigPayload(i,e){var t=this.Rt.token,s={distinct_id:this._instance.get_distinct_id(),token:t};this.ts()&&(s.evaluation_contexts=this.Qn()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this.Rt.disable_compression?void 0:ke.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback(r){var n,a=(n=r.json)==null?void 0:n.featureFlagPayloads;e((a==null?void 0:a[i])||void 0)}})}isFeatureEnabled(i,e){if(e===void 0&&(e={}),!e.fresh||this.Yn){if(this.Vn||this.getFlags()&&this.getFlags().length>0){var t=this.getFeatureFlag(i,e);return E(t)?void 0:!!t}se.warn('isFeatureEnabled for key "'+i+Vi)}}addFeatureFlagsHandler(i){this.featureFlagEventHandlers.push(i)}removeFeatureFlagsHandler(i){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==i))}receivedFeatureFlags(i,e,t){if(this.Xi){this.Vn=!0;var s=this.getFlagVariants(),r=this.getFlagPayloads(),n=this.getFlagsWithDetails();(function(a,o,l,c,u,h){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var d=(m=>{var P=m.flags;return P?(m.featureFlags=Object.fromEntries(Object.keys(P).map((T=>{var O;return[T,(O=P[T].variant)!==null&&O!==void 0?O:P[T].enabled]}))),m.featureFlagPayloads=Object.fromEntries(Object.keys(P).filter((T=>P[T].enabled)).filter((T=>{var O;return(O=P[T].metadata)==null?void 0:O.payload})).map((T=>{var O;return[T,(O=P[T].metadata)==null?void 0:O.payload]})))):se.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),m})(a),v=d.flags,g=d.featureFlags,f=d.featureFlagPayloads;if(g){var $=a.requestId,k=a.evaluatedAt;if(D(g)){se.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var C={};if(g)for(var R=0;g.length>R;R++)C[g[R]]=!0;o&&o.register({[Bi]:g,[lt]:C})}else{var I=g,_=f,S=v;if(h!=null&&h.partialResponse)I=y({},l,I),_=y({},c,_),S=y({},u,S);else if(a.errorsWhileComputingFlags)if(v){var x=new Set(Object.keys(v).filter((m=>{var P;return!((P=v[m])!=null&&P.failed)})));I=y({},l,Object.fromEntries(Object.entries(I).filter((m=>{var[P]=m;return x.has(P)})))),_=y({},c,Object.fromEntries(Object.entries(_||{}).filter((m=>{var[P]=m;return x.has(P)})))),S=y({},u,Object.fromEntries(Object.entries(S||{}).filter((m=>{var[P]=m;return x.has(P)}))))}else I=y({},l,I),_=y({},c,_),S=y({},u,S);o&&o.register(y({[Bi]:Object.keys(Jr(I)),[lt]:I||{},[as]:_||{},[ns]:S||{}},$?{[Wr]:$}:{},k?{[ai]:k}:{}))}}})(i,this.Xi,s,r,n,t),e||(this.Wn=!1),this.ss(e)}}override(i,e){e===void 0&&(e=!1),se.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:i,suppressWarning:e})}overrideFeatureFlags(i){if(!this._instance.__loaded||!this.Xi)return se.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(i===!1)return this.Xi.unregister(He),this.Xi.unregister(rt),this.ss(),Ve.info("All overrides cleared");if(D(i)){var e=Yr(i);return this.Xi.register({[He]:e}),this.ss(),Ve.info("Flag overrides set",{flags:i})}if(i&&typeof i=="object"&&("flags"in i||"payloads"in i)){var t,s=i;if(this.$n=!!((t=s.suppressWarning)!==null&&t!==void 0&&t),"flags"in s){if(s.flags===!1)this.Xi.unregister(He),Ve.info("Flag overrides cleared");else if(s.flags){if(D(s.flags)){var r=Yr(s.flags);this.Xi.register({[He]:r})}else this.Xi.register({[He]:s.flags});Ve.info("Flag overrides set",{flags:s.flags})}}return"payloads"in s&&(s.payloads===!1?(this.Xi.unregister(rt),Ve.info("Payload overrides cleared")):s.payloads&&(this.Xi.register({[rt]:s.payloads}),Ve.info("Payload overrides set",{payloads:s.payloads}))),void this.ss()}if(i&&typeof i=="object")return this.Xi.register({[He]:i}),this.ss(),Ve.info("Flag overrides set",{flags:i});se.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:i})}onFeatureFlags(i){if(this.addFeatureFlagsHandler(i),this.Vn){var{flags:e,flagVariants:t}=this.os();i(e,t)}return()=>this.removeFeatureFlagsHandler(i)}updateEarlyAccessFeatureEnrollment(i,e,t){var s,r=(this.Xn(It)||[]).find((l=>l.flagKey===i)),n={["$feature_enrollment/"+i]:e},a={$feature_flag:i,$feature_enrollment:e,$set:n};r&&(a.$early_access_feature_name=r.name),t&&(a.$feature_enrollment_stage=t),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=y({},this.getFlagVariants(),{[i]:e});(s=this.Xi)==null||s.register({[Bi]:Object.keys(Jr(o)),[lt]:o}),this.ss()}getEarlyAccessFeatures(i,e,t){e===void 0&&(e=!1);var s=this.Xn(It),r=t?"&"+t.map((n=>"stage="+n)).join("&"):"";if(s&&!e)return i(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Rt.token+r),method:"GET",callback:n=>{var a,o;if(n.json){var l=n.json.earlyAccessFeatures;return(a=this.Xi)==null||a.unregister(It),(o=this.Xi)==null||o.register({[It]:l}),i(l)}}})}os(){var i=this.getFlags(),e=this.getFlagVariants();return{flags:i.filter((t=>e[t])),flagVariants:Object.keys(e).filter((t=>e[t])).reduce(((t,s)=>(t[s]=e[s],t)),{})}}ss(i){var{flags:e,flagVariants:t}=this.os();this.featureFlagEventHandlers.forEach((s=>s(e,t,{errorsLoading:i})))}setPersonPropertiesForFlags(i,e){e===void 0&&(e=!0);var t=this.Xn($t)||{},s=(i==null?void 0:i.$set)||(i!=null&&i.$set_once?{}:i),r=i==null?void 0:i.$set_once,n={};if(r)for(var a in r)({}).hasOwnProperty.call(r,a)&&(a in t||(n[a]=r[a]));this._instance.register({[$t]:y({},t,n,s)}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister($t)}setGroupPropertiesForFlags(i,e){e===void 0&&(e=!0);var t=this.Xn(Ge)||{};Object.keys(t).length!==0&&Object.keys(t).forEach((s=>{t[s]=y({},t[s],i[s]),delete i[s]})),this._instance.register({[Ge]:y({},t,i)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(i){if(i){var e=this.Xn(Ge)||{};this._instance.register({[Ge]:y({},e,{[i]:{}})})}else this._instance.unregister(Ge)}reset(){this.Vn=!1,this.Hn=!1,this.zn=!1,this.Un=!1,this.Yn=!1,this.$anon_distinct_id=void 0,this.ns(),this.$n=!1}}},ol={sessionRecording:class{get Rt(){return this._instance.config}get Xi(){return this._instance.persistence}get started(){var i;return!((i=this.ls)==null||!i.isStarted)}get status(){var i,e;return this.us===kt||this.us===Kt?this.us:(i=(e=this.ls)==null?void 0:e.status)!==null&&i!==void 0?i:this.us}constructor(i){if(this._forceAllowLocalhostNetworkCapture=!1,this.us=jr,this.hs=void 0,this._instance=i,!this._instance.sessionManager)throw De.error("started without valid sessionManager"),new Error(Ss+" started without valid sessionManager. This is a bug.");if(this.Rt.cookieless_mode===Ee)throw new Error(Ss+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get cs(){var i,e=!((i=this._instance.get_property(Ft))==null||!i.enabled),t=!this.Rt.disable_session_recording,s=this.Rt.disable_session_recording||this._instance.consent.isOptedOut();return p&&e&&t&&!s}startIfEnabledOrStop(i){var e;if(!this.cs||(e=this.ls)==null||!e.isStarted){var t=!E(Object.assign)&&!E(Array.from);this.cs&&t?(this.ds(i),De.info("starting")):(this.us=jr,this.stopRecording())}}ds(i){var e,t,s;this.cs&&(this.us!==kt&&this.us!==Kt&&(this.us=qr),F!=null&&(e=F.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(t=F.__PosthogExtensions__)!=null&&t.initSessionRecording?this.vs(i):(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,this.fs,(r=>{if(r)return De.error("could not load recorder",r);this.vs(i)})))}stopRecording(){var i,e;(i=this.hs)==null||i.call(this),this.hs=void 0,(e=this.ls)==null||e.stop()}ps(){var i,e;(i=this.hs)==null||i.call(this),this.hs=void 0,(e=this.ls)==null||e.discard()}gs(){var i;(i=this.Xi)==null||i.unregister(Rn)}ys(i,e){if(L(i))return null;var t,s=xe(i)?i:parseFloat(i);return typeof(t=s)!="number"||!Number.isFinite(t)||0>t||t>1?(De.warn(e+" must be between 0 and 1. Ignoring invalid value:",i),null):s}bs(i){if(this.Xi){var e,t,s=this.Xi,r=()=>{var n,a=i.sessionRecording===!1?void 0:i.sessionRecording,o=this.ys((n=this.Rt.session_recording)==null?void 0:n.sampleRate,"session_recording.sampleRate"),l=this.ys(a==null?void 0:a.sampleRate,"remote config sampleRate"),c=o??l;L(c)&&this.gs();var u=a==null?void 0:a.minimumDurationMilliseconds;s.register({[Ft]:y({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:y({capturePerformance:i.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:c,minimumDurationMilliseconds:E(u)?null:u,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};r(),(e=this.hs)==null||e.call(this),this.hs=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(r)}}onRemoteConfig(i){return"sessionRecording"in i?i.sessionRecording===!1?(this.bs(i),void this.ps()):(this.bs(i),void this.startIfEnabledOrStop()):(this.us===kt&&(this.us=Kt,De.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(i,e){var t;e===void 0&&(e="log"),(t=this.ls)!=null&&t.log?this.ls.log(i,e):De.warn("log called before recorder was ready")}get fs(){var i,e,t=(i=this._instance)==null||(i=i.persistence)==null?void 0:i.get_property(Ft);return(t==null||(e=t.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}ws(){var i,e=this._instance.get_property(Ft);if(!e)return!1;var t=(i=(typeof e=="object"?e:JSON.parse(e)).cache_timestamp)!==null&&i!==void 0?i:Date.now();return 36e5>=Date.now()-t}vs(i){var e,t;if((e=F.__PosthogExtensions__)==null||!e.initSessionRecording)return De.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0});if(this.ls||(this.ls=(t=F.__PosthogExtensions__)==null?void 0:t.initSessionRecording(this._instance),this.ls._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ws())return this.us===Kt||this.us===kt?void 0:(this.us=kt,De.info("persisted remote config is stale, requesting fresh config before starting"),void new qn(this._instance).load());this.us=qr,this.ls.start(i)}onRRwebEmit(i){var e;(e=this.ls)==null||e.onRRwebEmit==null||e.onRRwebEmit(i)}overrideLinkedFlag(){var i,e;this.ls||(e=this.Xi)==null||e.register({$replay_override_linked_flag:!0}),(i=this.ls)==null||i.overrideLinkedFlag()}overrideSampling(){var i,e;this.ls||(e=this.Xi)==null||e.register({$replay_override_sampling:!0}),(i=this.ls)==null||i.overrideSampling()}overrideTrigger(i){var e,t;this.ls||(t=this.Xi)==null||t.register({[i==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(e=this.ls)==null||e.overrideTrigger(i)}get sdkDebugProperties(){var i;return((i=this.ls)==null?void 0:i.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(i,e){var t;return!((t=this.ls)==null||!t.tryAddCustomEvent(i,e))}}},ll={autocapture:class{constructor(i){this._s=!1,this.Is=null,this.Cs=!1,this.instance=i,this.rageclicks=new Lr(i.config.rageclick),this.Ss=null}initialize(){this.startIfEnabled()}get Rt(){var i,e,t=J(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=(i=t.url_allowlist)==null?void 0:i.map((s=>new RegExp(s))),t.url_ignorelist=(e=t.url_ignorelist)==null?void 0:e.map((s=>new RegExp(s))),t}ks(){if(this.isBrowserSupported()){if(p&&b){var i=t=>{t=t||(p==null?void 0:p.event);try{this.xs(t)}catch(s){Dr.error("Failed to capture event",s)}};if(G(b,"submit",i,{capture:!0}),G(b,"change",i,{capture:!0}),G(b,"click",i,{capture:!0}),this.Rt.capture_copied_text){var e=t=>{this.xs(t=t||(p==null?void 0:p.event),Ui)};G(b,"copy",e,{capture:!0}),G(b,"cut",e,{capture:!0})}}}else Dr.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this._s&&(this.ks(),this._s=!0)}onRemoteConfig(i){i.elementsChainAsString&&(this.Cs=i.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[er]:!!i.autocapture_opt_out}),this.Is=!!i.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(i){this.Ss=i}getElementSelectors(i){var e,t=[];return(e=this.Ss)==null||e.forEach((s=>{var r=b==null?void 0:b.querySelectorAll(s);r==null||r.forEach((n=>{i===n&&t.push(s)}))})),t}get isEnabled(){var i,e,t=(i=this.instance.persistence)==null?void 0:i.props[er];if(Oe(this.Is)&&!Pe(t)&&!this.instance.ki())return!1;var s=(e=this.Is)!==null&&e!==void 0?e:!!t;return!!this.instance.config.autocapture&&!s}xs(i,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var t,s=$r(i);Qn(s)&&(s=s.parentNode||null),e==="$autocapture"&&i.type==="click"&&i instanceof MouseEvent&&this.instance.config.rageclick&&(t=this.rageclicks)!=null&&t.isRageClick(i.clientX,i.clientY,i.timeStamp||new Date().getTime())&&(function(h,d){if(!p||xs(h))return!1;var v,g,f;if(Pe(d)?(v=!!d&&Tr,g=void 0):(v=(f=d==null?void 0:d.css_selector_ignorelist)!==null&&f!==void 0?f:Tr,g=d==null?void 0:d.content_ignorelist),v===!1)return!1;var{targetElementList:$}=Or(h,!1);return!(function(k,C){if(k===!1||E(k))return!1;var R;if(k===!0)R=Xo;else{if(!D(k))return!1;if(k.length>10)return w.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;R=k.map((I=>I.toLowerCase()))}return C.some((I=>{var{safeText:_,ariaLabel:S}=I;return R.some((x=>_.includes(x)||S.includes(x)))}))})(g,$.map((k=>{var C;return{safeText:qt(k).toLowerCase(),ariaLabel:((C=k.getAttribute("aria-label"))==null?void 0:C.toLowerCase().trim())||""}})))&&!Cr($,v)})(s,this.instance.config.rageclick)&&this.xs(i,"$rageclick");var r=e===Ui;if(s&&(function(h,d,v,g,f){var $,k,C,R;if(v===void 0&&(v=void 0),!p||xs(h)||($=v)!=null&&$.url_allowlist&&!Ir(v.url_allowlist)||(k=v)!=null&&k.url_ignorelist&&Ir(v.url_ignorelist))return!1;if((C=v)!=null&&C.dom_event_allowlist){var I=v.dom_event_allowlist;if(I&&!I.some((P=>d.type===P)))return!1}var{parentIsUsefulElement:_,targetElementList:S}=Or(h,g);if(!(function(P,T){var O=T==null?void 0:T.element_allowlist;if(E(O))return!0;var A,H=function(Y){if(O.some((Z=>Y.tagName.toLowerCase()===Z)))return{v:!0}};for(var N of P)if(A=H(N))return A.v;return!1})(S,v)||!Cr(S,(R=v)==null?void 0:R.css_selector_allowlist))return!1;var x=p.getComputedStyle(h);if(x&&x.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var m=h.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return(f||["submit"]).indexOf(d.type)>=0;case"input":case"select":case"textarea":return(f||["change","click"]).indexOf(d.type)>=0;default:return _?(f||["click"]).indexOf(d.type)>=0:(f||["click"]).indexOf(d.type)>=0&&(Hs.indexOf(m)>-1||h.getAttribute("contenteditable")==="true")}})(s,i,this.Rt,r,r?["copy","cut"]:void 0)){var{props:n,explicitNoCapture:a}=Ko(s,{e:i,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Rt.element_attribute_ignorelist,elementsChainAsString:this.Cs});if(a)return!1;var o=this.getElementSelectors(s);if(o&&o.length>0&&(n.$element_selectors=o),e===Ui){var l,c=ta(p==null||(l=p.getSelection())==null?void 0:l.toString()),u=i.type||"clipboard";if(!c)return!1;n.$selected_content=c,n.$copy_type=u}return this.instance.capture(e,n),!0}}}isBrowserSupported(){return Ce(b==null?void 0:b.querySelectorAll)}},historyAutocapture:class{constructor(i){var e;this._instance=i,this.Ts=(p==null||(e=p.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(w.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.As&&this.As(),this.As=void 0,w.info("History API monitoring stopped")}monitorHistoryChanges(){var i,e;if(p&&p.history){var t=this;(i=p.history.pushState)!=null&&i.__posthog_wrapped__||Nr(p.history,"pushState",(s=>function(r,n,a){s.call(this,r,n,a),t.Es("pushState")})),(e=p.history.replaceState)!=null&&e.__posthog_wrapped__||Nr(p.history,"replaceState",(s=>function(r,n,a){s.call(this,r,n,a),t.Es("replaceState")})),this.Rs()}}Es(i){try{var e,t=p==null||(e=p.location)==null?void 0:e.pathname;if(!t)return;t!==this.Ts&&this.isEnabled&&this._instance.capture(nt,{navigation_type:i}),this.Ts=t}catch(s){w.error("Error capturing "+i+" pageview",s)}}Rs(){if(!this.As){var i=()=>{this.Es("popstate")};G(p,"popstate",i),this.As=()=>{p&&p.removeEventListener("popstate",i)}}}},heatmaps:class{get Rt(){return this.instance.config}constructor(i){var e;this.Ns=!1,this._s=!1,this.Ms=null,this.instance=i,this.Ns=!((e=this.instance.persistence)==null||!e.props[is]),this.rageclicks=new Lr(i.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var i=5e3;return J(this.Rt.capture_heatmaps)&&this.Rt.capture_heatmaps.flush_interval_milliseconds&&(i=this.Rt.capture_heatmaps.flush_interval_milliseconds),i}get isEnabled(){return L(this.Rt.capture_heatmaps)?L(this.Rt.enable_heatmaps)?this.Ns:this.Rt.enable_heatmaps:this.Rt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this._s)return;Qo.info("starting..."),this.Fs(),this.Tt()}else{var i;clearInterval((i=this.Ms)!==null&&i!==void 0?i:void 0),this.Os(),this.getAndClearBuffer()}}onRemoteConfig(i){if("heatmaps"in i){var e=!!i.heatmaps;this.instance.persistence&&this.instance.persistence.register({[is]:e}),this.Ns=e,this.startIfEnabled()}}getAndClearBuffer(){var i=this.T;return this.T=void 0,i}Ps(i){this.wt(i.originalEvent,"deadclick")}Tt(){this.Ms&&clearInterval(this.Ms),this.Ms=(b==null?void 0:b.visibilityState)==="visible"?setInterval(this.ji.bind(this),this.flushIntervalMilliseconds):null}Fs(){p&&b&&(this.Ls=this.ji.bind(this),G(p,ci,this.Ls),this.Ds=i=>this.wt(i||(p==null?void 0:p.event)),G(b,"click",this.Ds,{capture:!0}),this.Bs=i=>this.js(i||(p==null?void 0:p.event)),G(b,"mousemove",this.Bs,{capture:!0}),this.qs=new lr(this.instance,po,this.Ps.bind(this)),this.qs.startIfEnabledOrStop(),this.Zs=this.Tt.bind(this),G(b,ui,this.Zs),this._s=!0)}Os(){var i;p&&b&&(this.Ls&&p.removeEventListener(ci,this.Ls),this.Ds&&b.removeEventListener("click",this.Ds,{capture:!0}),this.Bs&&b.removeEventListener("mousemove",this.Bs,{capture:!0}),this.Zs&&b.removeEventListener(ui,this.Zs),clearTimeout(this.$s),(i=this.qs)==null||i.stop(),this._s=!1)}Vs(i,e){var t=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),n=(function(a,o,l){for(var c=a;c&&Ei(c)&&!Ue(c,"body");){if(c===l)return!1;if(M(o,p==null?void 0:p.getComputedStyle(c).position))return!0;c=ia(c)}return!1})($r(i),["fixed","sticky"],r);return{x:i.clientX+(n?0:s),y:i.clientY+(n?0:t),target_fixed:n,type:e}}wt(i,e){var t;if(e===void 0&&(e="click"),!Fr(i.target)&&Ur(i)){var s=this.Vs(i,e);(t=this.rageclicks)!=null&&t.isRageClick(i.clientX,i.clientY,new Date().getTime())&&this.Hs(y({},s,{type:"rageclick"})),this.Hs(s)}}js(i){!Fr(i.target)&&Ur(i)&&(clearTimeout(this.$s),this.$s=setTimeout((()=>{this.Hs(this.Vs(i,"mousemove"))}),500))}Hs(i){if(p){var e=p.location.href,t=this.Rt.custom_personal_data_properties,s=this.Rt.mask_personal_data_properties?[...gt,...t||[]]:[],r=Ht(e,s,jt);this.T=this.T||{},this.T[r]||(this.T[r]=[]),this.T[r].push(i)}}ji(){this.T&&!ot(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:lr,webVitalsAutocapture:class{constructor(i){var e;this.Ns=!1,this._s=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.zs=()=>{clearTimeout(this.Us),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((t,s)=>y({},t,{["$web_vitals_"+s.name+"_event"]:y({},s),["$web_vitals_"+s.name+"_value"]:s.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.nt=t=>{var s,r=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0);if(E(r))Le.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this.Ys();E(n)||(L(t==null?void 0:t.name)||L(t==null?void 0:t.value)?Le.error("Invalid metric received",t):!this.Gs||this.Gs>t.value?(this.T.url!==n&&(this.zs(),this.Us=setTimeout(this.zs,this.flushToCaptureTimeoutMs)),E(this.T.url)&&(this.T.url=n),this.T.firstMetricTimestamp=E(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,t.attribution&&t.attribution.interactionTargetElement&&(t.attribution.interactionTargetElement=void 0),this.T.metrics.push(y({},t,{$current_url:n,$session_id:r.sessionId,$window_id:r.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.zs()):Le.error("Ignoring metric with value >= "+this.Gs,t))}},this.Ws=()=>{if(!this._s){var t,s,r,n,a=F.__PosthogExtensions__;E(a)||E(a.postHogWebVitalsCallbacks)||({onLCP:t,onCLS:s,onFCP:r,onINP:n}=a.postHogWebVitalsCallbacks),t&&s&&r&&n?(this.allowedMetrics.indexOf("LCP")>-1&&t(this.nt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.nt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.nt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&n(this.nt.bind(this)),this._s=!0):Le.error("web vitals callbacks not loaded - not starting")}},this._instance=i,this.Ns=!((e=this._instance.persistence)==null||!e.props[sr]),this.startIfEnabled()}get Xs(){return this._instance.config.capture_performance}get allowedMetrics(){var i,e,t=J(this.Xs)?(i=this.Xs)==null?void 0:i.web_vitals_allowed_metrics:void 0;return L(t)?((e=this._instance.persistence)==null?void 0:e.props[rr])||["CLS","FCP","INP","LCP"]:t}get flushToCaptureTimeoutMs(){return(J(this.Xs)?this.Xs.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var i=J(this.Xs)?this.Xs.web_vitals_attribution:void 0;return i!=null&&i}get Gs(){var i=J(this.Xs)&&xe(this.Xs.__web_vitals_max_value)?this.Xs.__web_vitals_max_value:Hr;return i>0&&6e4>=i?Hr:i}get isEnabled(){var i=Q==null?void 0:Q.protocol;if(i!=="http:"&&i!=="https:")return Le.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=J(this.Xs)?this.Xs.web_vitals:Pe(this.Xs)?this.Xs:void 0;return Pe(e)?e:this.Ns}startIfEnabled(){this.isEnabled&&!this._s&&(Le.info("enabled, starting..."),this.ni(this.Ws))}onRemoteConfig(i){if("capturePerformance"in i){var e=J(i.capturePerformance)&&!!i.capturePerformance.web_vitals,t=J(i.capturePerformance)?i.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[sr]:e}),this._instance.persistence.register({[rr]:t})),this.Ns=e,this.startIfEnabled()}}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?i():(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(s=>{s?Le.error("failed to load script",s):i()}))}Ys(){var i=p?p.location.href:void 0;if(i){var e=this._instance.config.custom_personal_data_properties,t=this._instance.config.mask_personal_data_properties?[...gt,...e||[]]:[];return Ht(i,t,jt)}Le.error("Could not determine current URL")}}},ul={exceptionObserver:class{constructor(i){var e,t,s;this.Ws=()=>{var r;if(p&&this.isEnabled&&(r=F.__PosthogExtensions__)!=null&&r.errorWrappingFunctions){var n=F.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=F.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,o=F.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Js&&this.Rt.capture_unhandled_errors&&(this.Js=n(this.captureException.bind(this))),!this.Ks&&this.Rt.capture_unhandled_rejections&&(this.Ks=a(this.captureException.bind(this))),!this.Qs&&this.Rt.capture_console_errors&&(this.Qs=o(this.captureException.bind(this)))}catch(l){xt.error("failed to start",l),this.eo()}}},this._instance=i,this.io=!((e=this._instance.persistence)==null||!e.props[tr]),this.ro=new ka({refillRate:(t=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&t!==void 0?t:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4,qt:xt}),this.Rt=this.no(),this.startIfEnabledOrStop()}no(){var i=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return J(i)?e=y({},e,i):(E(i)?this.io:i)&&(e=y({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Rt.capture_console_errors||this.Rt.capture_unhandled_errors||this.Rt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(xt.info("enabled"),this.eo(),this.ni(this.Ws)):this.eo()}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.errorWrappingFunctions&&i(),(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"exception-autocapture",(s=>{if(s)return xt.error("failed to load script",s);i()}))}eo(){var i,e,t;(i=this.Js)==null||i.call(this),this.Js=void 0,(e=this.Ks)==null||e.call(this),this.Ks=void 0,(t=this.Qs)==null||t.call(this),this.Qs=void 0}onRemoteConfig(i){"autocaptureExceptions"in i&&(this.io=!!i.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[tr]:this.io}),this.Rt=this.no(),this.startIfEnabledOrStop())}onConfigChange(){this.Rt=this.no()}captureException(i){var e,t,s,r=(e=i==null||(t=i.$exception_list)==null||(t=t[0])==null?void 0:t.type)!==null&&e!==void 0?e:"Exception";this.ro.consumeRateLimit(r)?xt.info("Skipping exception capture because of client rate limiting.",{exception:r}):(s=this._instance.exceptions)==null||s.sendExceptionEvent(i)}},exceptions:class{constructor(i){var e,t;this.so=[],this.oo=new La([new Xa,new Qa,new Ba,new Va,new Ka,new Ja,new Wa,new Za],(function(s){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;r>a;a++)n[a-1]=arguments[a];return function(o,l){l===void 0&&(l=0);for(var c=[],u=o.split(` +`),h=l;u.length>h;h++){var d=u[h];if(1024>=d.length){var v=Qs.test(d)?d.replace(Qs,"$1"):d;if(!v.match(/\S*Error: /)){for(var g of n){var f=g(v,s);if(f){c.push(f);break}}if(c.length>=50)break}}}return(function($){if(!$.length)return[];var k=Array.from($);return k.reverse(),k.slice(0,50).map((C=>{return y({},C,{filename:C.filename||(R=k,R[R.length-1]||{}).filename,function:C.function||vt});var R}))})(c)}})("web:javascript",ja,za)),this._instance=i,this.so=(e=(t=this._instance.persistence)==null?void 0:t.get_property(ss))!==null&&e!==void 0?e:[]}onRemoteConfig(i){var e,t,s;if("errorTracking"in i){var r=(e=(t=i.errorTracking)==null?void 0:t.suppressionRules)!==null&&e!==void 0?e:[],n=(s=i.errorTracking)==null?void 0:s.captureExtensionExceptions;this.so=r,this._instance.persistence&&this._instance.persistence.register({[ss]:this.so,[ir]:n})}}get ao(){var i,e=!!this._instance.get_property(ir),t=this._instance.config.error_tracking.captureExtensionExceptions;return(i=t??e)!==null&&i!==void 0&&i}buildProperties(i,e){return this.oo.buildFromUnknown(i,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}sendExceptionEvent(i){var e=i.$exception_list;if(this.lo(e)){if(this.uo(e))return void Gi.info("Skipping exception capture because a suppression rule matched");if(!this.ao&&this.ho(e))return void Gi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.co(e))return void Gi.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",Ur:!0})}uo(i){if(i.length===0)return!1;var e=i.reduce(((t,s)=>{var{type:r,value:n}=s;return W(r)&&r.length>0&&t.$exception_types.push(r),W(n)&&n.length>0&&t.$exception_values.push(n),t}),{$exception_types:[],$exception_values:[]});return this.so.some((t=>{var s=t.values.map((r=>{var n,a=Yn[r.operator],o=D(r.value)?r.value:[r.value],l=(n=e[r.key])!==null&&n!==void 0?n:[];return o.length>0&&a(o,l)}));return t.type==="OR"?s.some(Boolean):s.every(Boolean)}))}ho(i){return i.flatMap((e=>{var t,s;return(t=(s=e.stacktrace)==null?void 0:s.frames)!==null&&t!==void 0?t:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}co(i){if(i.length>0){var e,t,s,r,n=(e=(t=i[0].stacktrace)==null?void 0:t.frames)!==null&&e!==void 0?e:[],a=n[n.length-1];return(s=a==null||(r=a.filename)==null?void 0:r.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}lo(i){return!L(i)&&D(i)}}},cl=y({productTours:class{get Xi(){return this._instance.persistence}constructor(i){this.do=null,this.vo=null,this._instance=i}initialize(){this.loadIfEnabled()}onRemoteConfig(i){"productTours"in i&&(this.Xi&&this.Xi.register({[rs]:!!i.productTours}),this.loadIfEnabled())}loadIfEnabled(){var i,e;this.do||(i=this._instance).config.disable_product_tours||(e=i.persistence)==null||!e.get_property(rs)||this.ni((()=>this.fo()))}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.generateProductTours?i():(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"product-tours",(s=>{s?zr.error("Could not load product tours script",s):i()}))}fo(){var i;!this.do&&(i=F.__PosthogExtensions__)!=null&&i.generateProductTours&&(this.do=F.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(i,e){if(e===void 0&&(e=!1),!D(this.vo)||e){var t=this.Xi;if(t){var s=t.props[Qt];if(D(s)&&!e)return this.vo=s,void i(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:r=>{var n=r.statusCode;if(n!==200||!r.json){var a="Product Tours API could not be loaded, status: "+n;return zr.error(a),void i([],{isLoaded:!1,error:a})}var o=D(r.json.product_tours)?r.json.product_tours:[];this.vo=o,t&&t.register({[Qt]:o}),i(o,{isLoaded:!0})}})}else i(this.vo,{isLoaded:!0})}getActiveProductTours(i){L(this.do)?i([],{isLoaded:!1,error:"Product tours not loaded"}):this.do.getActiveProductTours(i)}showProductTour(i){var e;(e=this.do)==null||e.showTourById(i)}previewTour(i){this.do?this.do.previewTour(i):this.ni((()=>{var e;this.fo(),(e=this.do)==null||e.previewTour(i)}))}dismissProductTour(){var i;(i=this.do)==null||i.dismissTour("user_clicked_skip")}nextStep(){var i;(i=this.do)==null||i.nextStep()}previousStep(){var i;(i=this.do)==null||i.previousStep()}clearCache(){var i;this.vo=null,(i=this.Xi)==null||i.unregister(Qt)}resetTour(i){var e;(e=this.do)==null||e.resetTour(i)}resetAllTours(){var i;(i=this.do)==null||i.resetAllTours()}cancelPendingTour(i){var e;(e=this.do)==null||e.cancelPendingTour(i)}}},xi),hl={siteApps:class{constructor(i){this._instance=i,this.po=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}mo(i,e){if(e){var t=this.globalsForEvent(e);this.po.push(t),this.po.length>1e3&&(this.po=this.po.slice(10))}}get siteAppLoaders(){var i;return(i=F._POSTHOG_REMOTE_CONFIG)==null||(i=i[this._instance.config.token])==null?void 0:i.siteApps}initialize(){if(this.isEnabled){var i=this._instance._addCaptureHook(this.mo.bind(this));this.yo=()=>{i(),this.po=[],this.yo=void 0}}}globalsForEvent(i){var e,t,s,r,n,a,o;if(!i)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[h,d]of Object.entries(u))l[h]={id:c[h],type:h,properties:d};var{$set_once:v,$set:g}=i;return{event:y({},en(i,el),{properties:y({},i.properties,g?{$set:y({},(e=(t=i.properties)==null?void 0:t.$set)!==null&&e!==void 0?e:{},g)}:{},v?{$set_once:y({},(s=(r=i.properties)==null?void 0:r.$set_once)!==null&&s!==void 0?s:{},v)}:{}),elements_chain:(n=(a=i.properties)==null?void 0:a.$elements_chain)!==null&&n!==void 0?n:"",distinct_id:(o=i.properties)==null?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(i){var e=this.apps[i.id],t=()=>{var a;!e.errored&&this.po.length&&(Ne.info("Processing "+this.po.length+" events for site app with id "+i.id),this.po.forEach((o=>e.processEvent==null?void 0:e.processEvent(o))),e.processedBuffer=!0),Object.values(this.apps).every((o=>o.processedBuffer||o.errored))&&((a=this.yo)==null||a.call(this))},s=!1,r=a=>{e.errored=!a,e.loaded=!0,Ne.info("Site app with id "+i.id+" "+(a?"loaded":"errored")),s&&t()};try{var{processEvent:n}=i.init({posthog:this._instance,callback(a){r(a)}});n&&(e.processEvent=n),s=!0}catch(a){Ne.error(Xr+i.id,a),r(!1)}if(s&&e.loaded)try{t()}catch(a){Ne.error("Error while processing buffered events PostHog app with config id "+i.id,a),e.errored=!0}}bo(){var i=this.siteAppLoaders||[];for(var e of i)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var t of i)this.setupSiteApp(t)}wo(i){if(Object.keys(this.apps).length!==0){var e=this.globalsForEvent(i);for(var t of Object.values(this.apps))try{t.processEvent==null||t.processEvent(e)}catch(s){Ne.error("Error while processing event "+i.event+" for site app "+t.id,s)}}}onRemoteConfig(i){var e,t,s,r=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.bo(),void this._instance.on("eventCaptured",(l=>this.wo(l)))):void Ne.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((t=this.yo)==null||t.call(this),(s=i.siteApps)!=null&&s.length)if(this.isEnabled){var n=function(l){var c;F["__$$ph_site_app_"+l]=r._instance,(c=F.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(r._instance,o,(u=>{if(u)return Ne.error(Xr+l,u)}))};for(var{id:a,url:o}of i.siteApps)n(a)}else Ne.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},dl={tracingHeaders:class{constructor(i){this._o=void 0,this.Io=void 0,this.Ws=()=>{var e,t;E(this._o)&&((e=F.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),E(this.Io)&&((t=F.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=i}initialize(){this.startIfEnabledOrStop()}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns&&i(),(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"tracing-headers",(s=>{if(s)return Zo.error("failed to load script",s);i()}))}startIfEnabledOrStop(){var i,e;this._instance.config.__add_tracing_headers?this.ni(this.Ws):((i=this._o)==null||i.call(this),(e=this.Io)==null||e.call(this),this._o=void 0,this.Io=void 0)}}},pl=y({surveys:class{get Rt(){return this._instance.config}constructor(i){this.Co=void 0,this._surveyManager=null,this.So=!1,this.ko=[],this.xo=null,this._instance=i,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(i){if(!this.Rt.disable_surveys){var e=i.surveys;if(L(e))return j.warn("Flags not loaded yet. Not loading surveys.");var t=D(e);this.Co=t?e.length>0:e,j.info("flags response received, isSurveysEnabled: "+this.Co),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var i=[],e=0;elocalStorage.removeItem(s)))}loadIfEnabled(){if(!this._surveyManager)if(this.So)j.info("Already initializing surveys, skipping...");else if(this.Rt.disable_surveys)j.info(Vr);else if(this.Rt.cookieless_mode&&this._instance.consent.isOptedOut())j.info("Not loading surveys in cookieless mode without consent.");else{var i=F==null?void 0:F.__PosthogExtensions__;if(i){if(!E(this.Co)||this.Rt.advanced_enable_surveys){var e=this.Co||this.Rt.advanced_enable_surveys;this.So=!0;try{var t=i.generateSurveys;if(t)return void this.To(t,e);var s=i.loadExternalDependency;if(!s)return void this.Ao(Os);s(this._instance,"surveys",(r=>{r||!i.generateSurveys?this.Ao("Could not load surveys script",r):this.To(i.generateSurveys,e)}))}catch(r){throw this.Ao("Error initializing surveys",r),r}finally{this.So=!1}}}else j.error("PostHog Extensions not found.")}}To(i,e){this._surveyManager=i(this._instance,e),this._surveyEventReceiver=new sl(this._instance),j.info("Surveys loaded successfully"),this.Eo({isLoaded:!0})}Ao(i,e){j.error(i,e),this.Eo({isLoaded:!1,error:i})}onSurveysLoaded(i){return this.ko.push(i),this._surveyManager&&this.Eo({isLoaded:!0}),()=>{this.ko=this.ko.filter((e=>e!==i))}}getSurveys(i,e){if(e===void 0&&(e=!1),this.Rt.disable_surveys)return j.info(Vr),i([]);var t,s=this._instance.get_property(os);if(s&&!e)return i(s,{isLoaded:!0});typeof Promise<"u"&&this.xo?this.xo.then((r=>{var{surveys:n,context:a}=r;return i(n,a)})):(typeof Promise<"u"&&(this.xo=new Promise((r=>{t=r}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Rt.token),method:"GET",timeout:this.Rt.surveys_request_timeout_ms,callback:r=>{var n;this.xo=null;var a=r.statusCode;if(a!==200||!r.json){var o="Surveys API could not be loaded, status: "+a;j.error(o);var l={isLoaded:!1,error:o};return i([],l),void(t==null||t({surveys:[],context:l}))}var c,u=r.json.surveys||[],h=u.filter((v=>(function(g){return!(!g.start_date||g.end_date)})(v)&&((function(g){var f;return!((f=g.conditions)==null||(f=f.events)==null||(f=f.values)==null||!f.length)})(v)||(function(g){var f;return!((f=g.conditions)==null||(f=f.actions)==null||(f=f.values)==null||!f.length)})(v))));h.length>0&&((c=this._surveyEventReceiver)==null||c.register(h)),(n=this._instance.persistence)==null||n.register({[os]:u});var d={isLoaded:!0};i(u,d),t==null||t({surveys:u,context:d})}}))}Eo(i){for(var e of this.ko)try{if(!i.isLoaded)return e([],i);this.getSurveys(e)}catch(t){j.error("Error in survey callback",t)}}getActiveMatchingSurveys(i,e){if(e===void 0&&(e=!1),!L(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(i,e);j.warn("init was not called")}Ro(i){var e=null;return this.getSurveys((t=>{var s;e=(s=t.find((r=>r.id===i)))!==null&&s!==void 0?s:null})),e}No(i){if(L(this._surveyManager))return{eligible:!1,reason:Xi};var e=typeof i=="string"?this.Ro(i):i;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(i){if(L(this._surveyManager))return j.warn("init was not called"),{visible:!1,disabledReason:Xi};var e=this.No(i);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(i,e){return L(this._surveyManager)?(j.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Xi})):new Promise((t=>{this.getSurveys((s=>{var r,n=(r=s.find((o=>o.id===i)))!==null&&r!==void 0?r:null;if(n){var a=this.No(n);t({visible:a.eligible,disabledReason:a.reason})}else t({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(i,e,t){var s;if(L(this._surveyManager))j.warn("init was not called");else{var r=typeof i=="string"?this.Ro(i):i;if(r!=null&&r.id)if(Do.includes(r.type)){var n=b==null?void 0:b.querySelector(e);if(n)return(s=r.appearance)!=null&&s.surveyPopupDelaySeconds?(j.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,o;j.info("Rendering survey "+r.id+" with delay of "+((a=r.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(o=this._surveyManager)==null||o.renderSurvey(r,n,t),j.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n,t);j.warn("Survey element not found")}else j.warn("Surveys of type "+r.type+" cannot be rendered in the app");else j.warn("Survey not found")}}displaySurvey(i,e){var t;if(L(this._surveyManager))j.warn("init was not called");else{var s=this.Ro(i);if(s){var r=s;if((t=s.appearance)!=null&&t.surveyPopupDelaySeconds&&e.ignoreDelay&&(r=y({},s,{appearance:y({},s.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==gs.Popover&&e.initialResponses&&j.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var n=this.canRenderSurvey(s);if(!n.visible)return void j.warn("Survey is not eligible to be displayed: ",n.disabledReason)}e.displayType!==gs.Inline?this._surveyManager.handlePopoverSurvey(r,e):this.renderSurvey(r,e.selector,e.properties)}else j.warn("Survey not found")}}cancelPendingSurvey(i){L(this._surveyManager)?j.warn("init was not called"):this._surveyManager.cancelSurvey(i)}handlePageUnload(){var i;(i=this._surveyManager)==null||i.handlePageUnload()}}},xi),vl={toolbar:class{constructor(i){this.instance=i}Mo(i){F.ph_toolbar_state=i}Fo(){var i;return(i=F.ph_toolbar_state)!==null&&i!==void 0?i:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(i,e,t){if(i===void 0&&(i=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),$n(this.instance.config)||!p||!b)return!1;i=i??p.location,t=t??p.history;try{if(!e){try{p.localStorage.setItem("test","test"),p.localStorage.removeItem("test")}catch{return!1}e=p==null?void 0:p.localStorage}var s,r=rl||vi(i.hash,"__posthog")||vi(i.hash,"state"),n=r?ar((()=>JSON.parse(atob(decodeURIComponent(r)))))||ar((()=>JSON.parse(decodeURIComponent(r)))):null;return n&&n.action==="ph_authorize"?((s=n).source="url",s&&Object.keys(s).length>0&&(n.desiredHash?i.hash=n.desiredHash:t?t.replaceState(t.state,"",i.pathname+i.search):i.hash="")):((s=JSON.parse(e.getItem(Br)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch{return!1}}Oo(i){var e=F.ph_load_toolbar||F.ph_load_editor;!L(e)&&Ce(e)?e(i,this.instance):Gr.warn("No toolbar load function found")}loadToolbar(i){var e=!(b==null||!b.getElementById(In));if(!p||e)return!1;var t=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=y({token:this.instance.config.token},i,{apiURL:this.instance.requestRouter.endpointFor("ui")},t?{instrument:!1}:{});if(p.localStorage.setItem(Br,JSON.stringify(y({},s,{source:void 0}))),this.Fo()===2)this.Oo(s);else if(this.Fo()===0){var r;this.Mo(1),(r=F.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"toolbar",(n=>{if(n)return Gr.error("[Toolbar] Failed to load",n),void this.Mo(0);this.Mo(2),this.Oo(s)})),G(p,"turbolinks:load",(()=>{this.Mo(0),this.loadToolbar(s)}))}return!0}Po(i){return this.loadToolbar(i)}maybeLoadEditor(i,e,t){return i===void 0&&(i=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),this.maybeLoadToolbar(i,e,t)}}},gl=y({experiments:te},xi),fl={conversations:class{constructor(i){this.Lo=void 0,this._conversationsManager=null,this.Do=!1,this.Bo=null,this._instance=i}initialize(){this.loadIfEnabled()}onRemoteConfig(i){if(!this._instance.config.disable_conversations){var e=i.conversations;L(e)||(Pe(e)?this.Lo=e:(this.Lo=e.enabled,this.Bo=e),this.loadIfEnabled())}}reset(){var i;(i=this._conversationsManager)==null||i.reset(),this._conversationsManager=null,this.Lo=void 0,this.Bo=null}loadIfEnabled(){if(!(this._conversationsManager||this.Do||this._instance.config.disable_conversations||$n(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var i=F==null?void 0:F.__PosthogExtensions__;if(i&&!E(this.Lo)&&this.Lo)if(this.Bo&&this.Bo.token){this.Do=!0;try{var e=i.initConversations;if(e)return this.jo(e),void(this.Do=!1);var t=i.loadExternalDependency;if(!t)return void this.qo(Os);t(this._instance,"conversations",(s=>{s||!i.initConversations?this.qo("Could not load conversations script",s):this.jo(i.initConversations),this.Do=!1}))}catch(s){this.qo("Error initializing conversations",s),this.Do=!1}}else ve.error("Conversations enabled but missing token in remote config.")}}jo(i){if(this.Bo)try{this._conversationsManager=i(this.Bo,this._instance),ve.info("Conversations loaded successfully")}catch(e){this.qo("Error completing conversations initialization",e)}else ve.error("Cannot complete initialization: remote config is null")}qo(i,e){ve.error(i,e),this._conversationsManager=null,this.Do=!1}show(){this._conversationsManager?this._conversationsManager.show():ve.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Lo===!0&&!Oe(this._conversationsManager)}isVisible(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&i!==void 0&&i}sendMessage(i,e,t){var s=this;return we((function*(){return s._conversationsManager?s._conversationsManager.sendMessage(i,e,t):(ve.warn(Be),null)}))()}getMessages(i,e){var t=this;return we((function*(){return t._conversationsManager?t._conversationsManager.getMessages(i,e):(ve.warn(Be),null)}))()}markAsRead(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(i):(ve.warn(Be),null)}))()}getTickets(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.getTickets(i):(ve.warn(Be),null)}))()}requestRestoreLink(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(i):(ve.warn(Be),null)}))()}restoreFromToken(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(i):(ve.warn(Be),null)}))()}restoreFromUrlToken(){var i=this;return we((function*(){return i._conversationsManager?i._conversationsManager.restoreFromUrlToken():(ve.warn(Be),null)}))()}getCurrentTicketId(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&i!==void 0?i:null}getWidgetSessionId(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&i!==void 0?i:null}Qr(){var i;(i=this._conversationsManager)==null||i.setIdentity()}tn(){var i;(i=this._conversationsManager)==null||i.clearIdentity()}}},_l={logs:class{constructor(i){var e;this.Zo=!1,this.$o=!1,this.qt=z("[logs]"),this.Vo=[],this.Ho=0,this.zo=0,this.Uo=!1,this._instance=i,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.Zo=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(i){var e,t=(e=i.logs)==null?void 0:e.captureConsoleLogs;!L(t)&&t&&(this.Zo=!0,this.loadIfEnabled())}reset(){this.Vo=[],this.Ni&&(clearTimeout(this.Ni),this.Ni=void 0),this.Ho=0,this.zo=0,this.Uo=!1}loadIfEnabled(){if(this.Zo&&!this.$o){var i=F==null?void 0:F.__PosthogExtensions__;if(i){var e=i.loadExternalDependency;e?e(this._instance,"logs",(t=>{var s;t||(s=i.logs)==null||!s.initializeLogs?this.qt.error("Could not load logs script",t):(i.logs.initializeLogs(this._instance),this.$o=!0)})):this.qt.error(Os)}else this.qt.error("PostHog Extensions not found.")}}captureLog(i){var e,t,s,r,n,a;if(this._instance.is_capturing())if(i&&i.body){var o=(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3,l=(s=(r=this._instance.config.logs)==null?void 0:r.maxLogsPerInterval)!==null&&s!==void 0?s:1e3,c=Date.now();if(o>c-this.zo||(this.zo=c,this.Ho=0,this.Uo=!1),l>this.Ho){this.Ho++;var u=(function(h,d){var v=h.level||"info",{text:g,number:f}=oa[v]||al,$=String(Date.now())+"000000",k={};d.distinctId&&(k.posthogDistinctId=d.distinctId),d.sessionId&&(k.sessionId=d.sessionId),d.currentUrl&&(k["url.full"]=d.currentUrl),d.activeFeatureFlags&&d.activeFeatureFlags.length>0&&(k.feature_flags=d.activeFeatureFlags);var C=y({},k,h.attributes||{}),R={timeUnixNano:$,observedTimeUnixNano:$,severityNumber:f,severityText:g,body:{stringValue:h.body},attributes:Zr(C)};return h.trace_id&&(R.traceId=h.trace_id),h.span_id&&(R.spanId=h.span_id),E(h.trace_flags)||(R.flags=h.trace_flags),R})(i,this.Yo());this.Vo.push({record:u}),((n=(a=this._instance.config.logs)==null?void 0:a.maxBufferSize)!==null&&n!==void 0?n:100)>this.Vo.length?this.Go():this.flushLogs()}else this.Uo||(this.qt.warn("captureLog dropping logs: exceeded "+l+" logs per "+o+"ms"),this.Uo=!0)}else this.qt.warn("captureLog requires a body")}get logger(){return this.Wo||(this.Wo={trace:(i,e)=>this.captureLog({body:i,level:"trace",attributes:e}),debug:(i,e)=>this.captureLog({body:i,level:"debug",attributes:e}),info:(i,e)=>this.captureLog({body:i,level:"info",attributes:e}),warn:(i,e)=>this.captureLog({body:i,level:"warn",attributes:e}),error:(i,e)=>this.captureLog({body:i,level:"error",attributes:e}),fatal:(i,e)=>this.captureLog({body:i,level:"fatal",attributes:e})}),this.Wo}flushLogs(i){if(this.Ni&&(clearTimeout(this.Ni),this.Ni=void 0),this.Vo.length!==0){var e=this.Vo;this.Vo=[];var t=this._instance.config.logs,s=y({"service.name":(t==null?void 0:t.serviceName)||"unknown_service"},(t==null?void 0:t.environment)&&{"deployment.environment":t.environment},(t==null?void 0:t.serviceVersion)&&{"service.version":t.serviceVersion},t==null?void 0:t.resourceAttributes),r=(function(a,o){return{resourceLogs:[{resource:{attributes:Zr(o)},scopeLogs:[{scope:{name:ne.LIB_NAME},logRecords:a}]}]}})(e.map((a=>a.record)),s),n=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Lr({method:"POST",url:n,data:r,compression:"best-available",batchKey:"logs",transport:i})}}Go(){var i,e;this.Ni||(this.Ni=setTimeout((()=>{this.Ni=void 0,this.flushLogs()}),(i=(e=this._instance.config.logs)==null?void 0:e.flushIntervalMs)!==null&&i!==void 0?i:3e3))}Yo(){var i,e={lib:ne.LIB_NAME};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:t}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=t}if(F!=null&&(i=F.location)!=null&&i.href&&(e.currentUrl=F.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(e.activeFeatureFlags=s)}return e}}},ml=y({},xi,ol,ll,ul,cl,hl,pl,dl,vl,gl,fl,_l);ge.__defaultExtensionClasses=y({},ml);var Qr,yl=(Qr=At[at]=new ge,(function(){function i(){i.done||(i.done=!0,Zn=!1,q(At,(function(e){e._dom_loaded()})))}b!=null&&b.addEventListener?b.readyState==="complete"?i():G(b,"DOMContentLoaded",i,{capture:!1}):p&&w.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),Qr),ua;function bl(i){ua=i}function Ps(){return ua}var js=qe.createContext({get client(){return Ps()},bootstrap:void 0});function ca(i,e,t){if(t===void 0&&(t=new WeakMap),i===e)return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;if(t.has(i)&&t.get(i)===e)return!0;t.set(i,e);var s=Object.keys(i),r=Object.keys(e);if(s.length!==r.length)return!1;for(var n=0,a=s;n!!i&&(!e||!e.analyticsOptOut),[i,e]),s=qe.useCallback((n,a)=>{if(t())try{i.capture(n,a)}catch(o){console.warn("Analytics capture failed:",o)}},[i,t]),r=qe.useCallback((n,a,o)=>{if(t())try{i.identify(n,a,o)}catch(l){console.warn("Analytics identify failed:",l)}},[i,t]);return{capture:s,identify:r,isAvailable:t()}}export{Pl as P,wl as a,yl as c,Rl as u}; diff --git a/hatchetembed/dashboard/assets/use-pending-invites-DaP3hNjC.js b/hatchetembed/dashboard/assets/use-pending-invites-DaP3hNjC.js new file mode 100644 index 0000000000..f17fbdef46 --- /dev/null +++ b/hatchetembed/dashboard/assets/use-pending-invites-DaP3hNjC.js @@ -0,0 +1 @@ +import{ae as b,y as g,G as v,N as y,k as l,c as d,a as I,Q as C}from"./index-wypz6hY5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8ebb417f-047b-4fe1-beb2-69f6e705bce0",e._sentryDebugIdIdentifier="sentry-dbid-8ebb417f-047b-4fe1-beb2-69f6e705bce0")}catch{}})();const h=(e,n)=>({queryKey:["pending-invites",e,n],queryFn:async()=>{const[t,a]=await Promise.allSettled([n?d.userListTenantInvites():I.userListTenantInvites(),e||n?n?d.userListOrganizationInvites():C.userListOrganizationInvites():Promise.resolve({data:{rows:[]}})]),i=t.status==="fulfilled"?t.value.data.rows||[]:[],r=a.status==="fulfilled"?a.value.data.rows||[]:[],o=i.length,s=r.length;return{inviteCount:o+s,tenantInvites:i,organizationInvites:r}},refetchInterval:6e4}),L=e=>{const{isCloudEnabled:n,isCloudLoading:t}=b(),{isControlPlaneEnabled:a}=g(),i=v(),r=(e==null?void 0:e.isCloudEnabled)??n,o=(e==null?void 0:e.isControlPlaneEnabled)??a,s=y(h(r,o)),c=l.useCallback(()=>{i.invalidateQueries({queryKey:["pending-invites"]})},[i]),f=l.useCallback(()=>s.refetch({cancelRefetch:!1}).then(u=>{if(u.isSuccess)return u.data;throw u.error}),[s]);return{pendingInvitesQuery:s,isLoading:t||s.isLoading,isLoaded:s.isSuccess,invalidate:c,get:f}};export{h as p,L as u}; diff --git a/hatchetembed/dashboard/assets/welcome-modal-state-B1mOgpQO.js b/hatchetembed/dashboard/assets/welcome-modal-state-B1mOgpQO.js new file mode 100644 index 0000000000..54910acd27 --- /dev/null +++ b/hatchetembed/dashboard/assets/welcome-modal-state-B1mOgpQO.js @@ -0,0 +1 @@ +import{j as t,L as h,a5 as f,a6 as p,a7 as m,a8 as y,a9 as b,B as x}from"./index-wypz6hY5.js";import{u as j}from"./support-chat-CGvrRU-a.js";import{s as C,f as S}from"./shard-deployment-key-CJfQX3l3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="24823b44-4ada-4356-a261-940a5ae4b2a0",e._sentryDebugIdIdentifier="sentry-dbid-24823b44-4ada-4356-a261-940a5ae4b2a0")}catch{}})();function D(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")+"-"+Math.random().toString(36).substring(2,7)}const _="https://hatchet.run/office-hours";function I({shards:e,value:n,onValueChange:o,isLoading:s,disabled:c=!1,id:l="deployment-region"}){const i=j(),u=c||s||e.length<=1;return t.jsxs("div",{className:"grid gap-2",children:[t.jsx(h,{htmlFor:l,children:"Region"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose where this tenant's control plane and data are deployed."}),t.jsxs(f,{value:n,onValueChange:o,disabled:u,children:[t.jsx(p,{id:l,children:t.jsx(m,{placeholder:s?"Loading regions…":"Select a region"})}),t.jsx(y,{children:e.map(d=>{const a=C(d),g=S(a)??d.region;return t.jsx(b,{value:a,children:g},a)})})]}),t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Don't see your region? Reach out via"," ",i.enabled?t.jsxs(t.Fragment,{children:[t.jsx(x,{type:"button",variant:"link",className:"h-auto p-0 text-sm font-normal",onClick:()=>i.show(),children:"Open support chat"}),", or"," "]}):null,t.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"Schedule office hours"}),"."]})]})}const O="hatchet:show-welcome",r={OrganizationCreated:"organization_created",TenantCreated:"tenant_created"};function T(e){return e==="1"?r.OrganizationCreated:e===r.OrganizationCreated||e===r.TenantCreated?e:null}export{I as R,O as W,r as a,D as g,T as r}; diff --git a/hatchetembed/dashboard/favicon.svg b/hatchetembed/dashboard/favicon.svg new file mode 100644 index 0000000000..26cf2bef37 --- /dev/null +++ b/hatchetembed/dashboard/favicon.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/hatchetembed/dashboard/index.html b/hatchetembed/dashboard/index.html new file mode 100644 index 0000000000..8ba3231202 --- /dev/null +++ b/hatchetembed/dashboard/index.html @@ -0,0 +1,24 @@ + + + + + Hatchet + + + + + + Hatchet + + + + +
+ + diff --git a/hatchetembed/dashboard/noise.png b/hatchetembed/dashboard/noise.png new file mode 100644 index 0000000000000000000000000000000000000000..0892047599d8925efb44c0541b04bf0053f35184 GIT binary patch literal 663717 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
  • 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%0A0jKcN}^{qt$Guul|41~j+SX_KL zbON2RFhwx@u8u!z2Uvwf3P%1#}8` z;^a-y%4fx@NvLDPpeiLc`pxH;>^`w9C2}44M7Vw-07*cESO1GwD@#ks3Z?+OZh&qe zBE_t(mjCNifPIoD0HCplj59BYUMS02o$-9FlwAX}iYV>q^4iLb2+C0i*Q)MrMIg7% zuW-Fzj(ux+m|6Q)!p=4)Vr^nf>7nzBFq=l?f5`QvuRwl7%H|3K09d3ER7@+Qz=3u* zZ`q#~$WGJHFy$9Y;0Z|qtB-;=(%yuE{|w6%{I+>N+3ShS)e>O_TE{v%HZN|LC|6dc zBD}sX~O*0f6CM+%#*j#*fbu0?bYHE*q2RIXfn{Ouc2TuJ|Rx8`_3zR`W11 zV}&@#sco~|zlqric1v;=lL^qmDYF7An(=OQBzH|tjCG9lrqH;^PVDS#EYC@dB&+W2 zSY-h4;xh|E)n*iL$cK(AtH-6*$1#(_5Q;xaY>Wgi1yQ=CT5(VSrY&<2pfLgTN<~wJ zSuFMP$;q6AArXmutrnyR@H62=jN)Pd0B`}!L>~kO8Slbd@9m~F3t#ZR0N^`Y_8R~! zu3q^hRLi4BpZxZxEX-tH?Mpl#`J{{@fI84NSL&p_;Vx+Ol2D~JO7a$)M$5t0cAGMi z*5JgSzk2z-Irgi(@Pc#!@c)M)1byd;Cyot_uo%Ng@b_{IURS58{Vtq{2pNH)rNce| zU@b|&8X4EHnn_?uO~ziS8&M#QcJB$MOD0Yo`R;eW_0G@TxOMa0>({SKVR=yzjJL&$ zH}713aNBl~{1XHLlt)m(NKSU61ap4)kpr`*4t6ZAUg6Luau}g-#jj3|!Y@5R3noES z)}rE*qvM1Cw%SPHFkz8GEU+)Qfzlcr1=?6RvF+e`noe_%Up}&a<>sy5$Ny(uWYEgl zOe?aDW(<5fXQT29C}%b0W%2xKke%Tfu{|RxBrf3|OYb4Z2LN!nveoHw`2fi>E1BYO zfuvk`gLRlm52dmA4Wa4+PJVjKk&K`g+roy0#ko|?ePQ7qYDBd8I4i|(D=0vb0@a;Q zZ|&=?=kZ})JO-Yq>6Ga{23eb~ps@4&`R}p2HgEU)BAg1=tel@*Q=tbeAkJs4m{l-H zF<=q!SSP9mrrhH}4r7q;XSTl_I8KrRfmDM-+a#pk-9x{~LA{qGGJ_sC&b+?~wyc^e)xNy9cJWT;gE~6)K>r>+ONIs41e2fAv@I&atCN_(F0*Bv84&?!7|<}07GbiJ zy~to$Wnuy$fR_~`G-K%n1ua1rOe-?bSPJuN2*Lxk+f)FY!{2sw;MdFXP@g zVZi+q;L8Aj&f=bx=ytJ|;O6(32OK>M$~kBOoD0{jVr-{Dm>mknUJvD9K&R&X@wKaU z5`@PlHE0EJte5;jx`L|Z6^>tg7G*^M04~7OjB_{u@G=0{t^^!3L}_DsIsNje^7HKe6lZ_?yh)?%gJm2iDPCO>%^eIHN?H zCbmibybh*X0zXuDp}7wI^V;D9^Z^bouC8@-Y!Xu{s~SS0aW@`ShoCQ0P0IzVO?CB{ zIMw1HyW3nOuY_qzM-bppnOxDs7tnLZ&?+}ukM#2NnW<3%07r4uMVC<)NtrEPK#qJ! zH4kzQmyxa=0N~+s(aB3is&?O(?6k5wAeHmOWm09_NQt(8PGAhhA| zfmv+M`L=y*G0PH(1Im$tlq2y`)C63G^*7b&A&n@fn?Bgv(%ajybNi|ethcjkG@F{H z&mg>l-Gf+raV5RVFcbGTuhxV#e6*;7;loP-fV>se<>WspX{;DX&W8YDra5czdKCbG zZh&K%TvWpyRtn9;`*UQ1^+=DRE{CY*BxiU(-~V?6Fl{M7$DYL}0RZ}c#Q)P*;K%Wn z6dl_7ORMat#KUjk5L&*h>2eT|-FerpLHvo8hgXe2U+=kB(dW2Jyr5?5IY0AN5k*y-$~ zQZj%@DyfkQb1t`PEQEVK%G_Y{jZwcH9IUP;O#}fXv{1BhX#2|L)m@za^8gU)i&|ZA z_`wzekz@!E@C0x&?MGvM z&RPLLNrcgogqeP{tjMMj`GGbb1Bx(NR#{4m(*VHjR*nE!pg;f+g*(}VXen*=^yCaS zIS~OwmPExRB!d8C3h_Lk#Y@*eboA!!eSPI=>^7q>|t2*LuIHt+a#4iE2%;N%{_Q7imoN(T6qB*zn_M;Fdj)97JFs-;B|AdvWia-F*1rcRwKkpge|`%fe)ihMl4(&H{(+!uhBB4~u5?>JpPY zAOT3Kssexn0*UOGlb8ll7IV+eBC5D&=lTbc8<79s{LeEE0Nim(qgG%Lyxe<+EU@;{ zLx`Y8#II-<@xLk9Em_h-cNSO1^0sU#AHYUQi-Z6nJnqQB^N;rRwUWH8TDq|*uSrWS z@{w1t841*qtJifbE>E-w0J^G(Bvg^nWWJ1|`O+ft|D~wYEL>DtU*1(lwTe%nr_nMV zo2KKv;q;={#>bPQ@Gy(wChok2Np`J)0Ih3Ud*bl3+URnX;lPWp9AUupG#V3!8b;I` z#z_=Fi0dO!H^?fAZ7~3#Q%9K)0HDYgtf~CZws5F2@f721oX+ZlyfeuaYwi>v2@8!# zKm|T41ux>*=HI}}N~95+g_SDvG>!F)7-De#B3D>j-WWh9d}1)DIup8+@<$Ati2P5>19-#79^ssQ|5tC@Io!QvzNB2|%e^fA!L z002Utc_zEEsg~`RAOLza)Pa)o0f2y$OBydBSA&Ob$^gitVb9b38#4qT)D{3V8UQrf zUOE|tMF7C%Wyt>kG7$&(exaK_YHH8rXP=$L|ErBV0VjmOy`?@UDh)z{sxr)gQO+uJ zFEN=w6#*#$LgB2I|8J@-XCuEpEYI5sQOJY(I zE`0F?fH<={Yx2loR7DjtJzVET?@4gEFyf%I2Ljd5+K(@|$=d7?4MMQF&Lgkr`k5sqE zQh+d*90olW#4jfM$JTLu7OhxRyTw6(hNMvg04@cr8{i^-_;6c$>%`KH#U@G(B5H`m zIFTgD%F(J4uq02I0G7~qP4_GmAY>^(iSF(tK5t>sy6XC=Z0emtP-Dpm0(7{G0^yC2 z0#h=>qs|rzNbX+#fLh*8aa=psJ&?qnd-jz#Pak;&Lm=Sv>DN)2I(lfjZWM`q#li{z zL}Vd)Q(d#Wdnpn0+l`n=!!RxC?AKLrm_1m{M z@93>(Mj*=LkE*0_P|8AP6a$Uh7-~eYdno`G-1f%zAOMIU_CEkXza4BM>3}UsE|hSU zt+6UDHG>tG)3`_*NRuc4T8#;p=UHZ`NhJnw3Uysa>}CxP#Qyst*+u|hJN|FI`dUMP z`uchQ=PuJoAxB<){P26Tvj@y3$Dw3hSask+D+z!Qu}NEARQtyC1oK9(?m65#i~rM3RDp0Yp$OKob8giHMw@ZZv4#Le zA;~zW0`g+)u{Q-?gEK&CZO}ygJC>eb&G2)xN7xN=5+wQ)q7=K2NzN&+}5 zGU$HhCJIATAJ(X)F9s@sj#9qqp-|q1shVaDbx*eL-Tw~&k8Qm)c<$ycdh`ebzdT(R zumdJ|@arct{f5psJV&(vg~bp?Y^4H69_<^NR|)|DucT1V>Rr!0fBE^Z!w%lQn1yxI zTlVjG`2(g5uHSxQ>dX`X&^1yPZpA;nQjlC|S);^YSUZI5pwF324{%r`BM`>*o*xfI%cgcPhOIZ@Hmy|HLvu2gHIl{0&!O_3-XAOT+&otLBt zw?9PFK--RLgE z3V<7-1*sYfvIu~*J}D6ECc8ie?~!rlhq0Y|_Uu`_SmDT?o!ci``9{*P4zfzaS*7YB zB4u(rVlZMZHECpic9&BJh+?;$<6caKv zIX^L0!+~u*2rapG?YRrT`t@IZ<>LCq$ENSx zIdkRA{;fM+ehpQ=?<)m(;>-w|4i*6Dbk|!l6&&F&odq?#L`LV5k+BEF?BIH@?jx+? zN)I+uX~6^mYzrhBQZG#O%ur4aa`d$uC==yc$;=yOF{Bj}d2n2ZmA2n#m;|geuzm`*%!tWpmB4NfX3{cFe*k9;pcSu*XLLQ-tp-r4t0Wobf2m zDv?}mwQQqPo-pCT<_%#;8%`jei9EiZKQ2pBP4vdao>8vNQWg^B_W03Th za?*BVL;#iptYLkp%Hx=ob;>02np)7-x|bmElTQvE8ti2mi@H_I7PF$Jsgar>(H)~C zFg_drP_kndOnP({%w|^E7YrN7|r2pMO$$3Us z#IRli?TP@kQD4dV!;dfug~WM zaV(7}FUgdCL!wLC#*aJ+4@YV8gC}>7y)Erb>3#I*u5q#}P$ z=)9pyIedCSaVifqbV`oOvq+YLb zcF0!)0I>p1!`4P$K>^q#zNiSAPJ9;v61J6#Jf9~tQ`p0O5JhXZLG>s7d=*XSv z>FJN2_@{47pE=XD6fCUl#c7$@)7(i&4!sdu}g+0000>& zpX?H~-<(8lwJk}6Qez6`(O$JrQiUL1>s`8>5T3Pt!irc$~I50#Q00Hc*5%-J`Kv)%5QX}_I zPS(G|?leb-+s&s@al-0EB~hLbnV>E#P)=Gq5b(3Won3vBipi{SGyuDc)CZumjB|t< ziCH6;E|LMl)3%AdssMfR2|KU{*NNO-y^dD)U~dzift$jDm!!9G9F6?(B{M~*`5b_U z;;W_(sr(-qLn)G{V)%di#*G}?H0}~o>eQDlZ(->}OJb6eRXuh#Z?4lHL`}_biho7z zXu_~QsF;J82A5?OH+#uPU4%dXJa(FO#5-SJCK3=`$g1Hd{=;vlSF2ICii%}|E$ z_5-ad`Hd;@m%$+%8ba(8;JDN^5^xCk#)4+9n$Av`_0eVFvDA4Y+!VXGf-wbs+aJ4r z{U%03?$(2!KSR?=C7^ubRK8k`59YtBLFu#+>009WGQoh)g9~8x6j~S-^nZQPFv(W{ zfLrqOp>Mr-_Vdp_{=u=Wj6Ls>DERf)UY1Qy*QK4!4iB1@w}KR1ao{K&vFQ$zk_|2v zMJL&OUnGT5&VMB|-qpviJ&*VQ-p}5+yW`l$8V~V9N~(Ts;~_ z1&7$p^FdJoY7YKu@lvw0e;jfreT7ip>OSNe77GA+dnx?zb9GZ`j^z0s(6etfXA>79 z9f)?0f0dxEd}m{g9Ot$uL#e9fPrL{?Qca$iJ22U|v}ohfiJ>KNajTgNSbnJ-9HWlL zYY^}7Q0i}rj-ojn5K6o6@@)pAA~PS643BYv*$I)7OOh9hWF4M~d|rXV*6zu01TYL2_oU}IH?9< zAjt?rszfwcD6x72o$WMNB$tlXP$P{^tDUd0z0p}_wEk#hnWhfewh896Pn`a_-~aZz z`=0t>#}jP9?^wsq9>7*zt=gunN{re!SHjv!L1oA<6C|A3U(5lA`%FQZ5e1oc_aUKO zQ(*qzhm8r}?0s)%vNoiHm>gr645TD38fmREa`$tK52qZ1;M)FCEgbDtOXm)2h zRa4BwFlr3|YMU43Rl*N(ETFAVYgf~O+c5kH2ykjQA|UIxx3-S4ftNT(08p&PJj5FY z3AO(`Zb_l^Lj#mx6#0-oC6Fv_2jun;D~ zUwZIPiYykzYDXP5i8^!hV`3u6037ef0q*UWGE)R#an)A=;O)0w{DVLE{6`A@SQfguF)>Jv{)Pknf2WCs4y{|Nvbvk^?hiURMk&GRHCNoI-xv_m4vVTa7R}RaVh}-y|sA%V!m(Mm{+O&&nC%b3^d2T1%T3IFwJ<6_0D+{^W{tt zT{Tc5o_jKSp!9kUv@Yc|8JZhUE$BJ8ZTHSW3Bj74UYx`8F(!o#L7EVoOl2MQ7t%9n zzPi^|b^gmZN2$@|>3vD=iTnl}gVA3=(q9EG4krxC~nA#8_*qo*V5Z zYc_R{h=7!31OWMPlIWZps7^LsYyjYiPHmsq`_3=@{-@XPZhi^?5CUM!H(%PaWe~7!Vay;arw)qV zJXOQQhA@x!o~YxO%79`Do4MxM!Xk63>%~m0**C=6!oG|B_&B8a7jr?w1<$9B45ez4ah`J^f&jy z7XSb@4YfiDB0SuZFzP2GW%}(njKTA}5PqAKar?N3_`iPMw63|cK_EmRZEU)r1Xc)U z^?Tc9MmiV*XN#*AmA-8GQy<(t$DYTd?-B+)wsi_=M@3K4zyt#Hw5>5iTs(=wvzr`1 z5Rjo%HU#W-M)YJ}EO`FIx2DhjKLOz9pLy#KK34$n(g&ZgRBr3?TQ_h2(-Tkp=M#hg zJGOo_J#d8yhQL{Whyvhy0Km&j&B1(@2QNxVNHPiBJOCtA<`N#EjXi$q^`HG3?thyX zI~EI!5CH^30Nj7%?8llnArDr40*_EtnqIYdlHi+;s?vp=dNI29up1I%(-ORaSTLic z-NYKWBbNvO76Smwnksp2fK{Sd{8T0pQ~DQ{BAdj#brj-wrj*oZF^vY(gA5#n85M1Z zFB~|~I<&5T)v39j;UVfe9liBcX(HIrwe~sPZVMrFg*Aa8K}?KWV&`f`aukZr=+au& z-AD^6f?(qwXVT5?{DcU1nM0Dn{a07Cbvx}$4R97M0{{?FpJ*jGB-bU zye5+5Ai#XJNFUJ%f;Keea3e$?0RU>yRp(rR9+~Xzd1heOO5}5a4r>39eq-#yr5>s>Qwa z3<1N=fizP1KTl|lTOA; zgd^ULuBAJ&Vq-P&7^+%bQ`5b|04vIv5?1*A4TBa9%uC>T@YiHX(h$vSbX_s3b{k>Q zF=qK~eb1o@Ft_RycHrE&gL zgt8?G<#$fP5I>*P@&7oV0@6OF&b8~H7_I`jEdJjC01Rmw-Ac&KwT(z%CV`r8_nIV)TOp*!L)M(_O-!&5K!Z*piC420O1N*W1%l9%ide5HvM=VqGt$W zchDr39(m`TcfLjt*m39(QkWosa;!ba;4OCUFa)TlEiq6Rt3WEa+0P-cNHCp&5k$$nI0bmLN+Uq*9MZ9d4GrLlNKJU)>1+^e%2~ot?XQWcSJC zTaOLQgtNAS@pP=G=L9r#EvsSn18h4CBFf$51|EO&Y(C!q-ukyAl7L{u z0XqGl{qSqKs+oSWhZ`$E0sj1(`TR)M9ju52=aPm=W9E7CHn>PDt^pOiLmpa7Wp2Vfhc3E{&7&}8Ef?&2kY9r#z0 zq~}VAK2fIZf*!dBooo`j_TcRp4(ON}_=`{4|Add>UT7NM2oN=kK~z4;3mir&m{X(b z{?QRZlf!BXG^R#rkbR67H+Y}|1D742iYM(<)G}6mqo8Aw8^H-3qgF5g6;Jro429h6 zOVlXPAteHz8{xw^z_|?kz_utFWD`y^7ZcTDKKsO_lhN>MH03R1 z94-Gc*V*i&ljlvhz4FhAJV{;kW&ZNCF&kJ2Q`FR)XlCf&&LQ{TncB^uU;tjE-&*~a{Q7`X=#F*Jvy z(v}P{Eg!2YB})h9cNPVZ6iNl#Qf-qw^puN}TKpUOF#NQ7V3L64jG)WtCy zkM8nRHDzCWe~Z%|B_oHq?{Ve{kK)vtQ74ydQ6nztZo7gbu;1L zfoh8bFbZG{+V9bxnGu+3VJN&ukx~*hOfAq%-m1UG zq%M-3L><3OIrGiG!TmozVEgVM^|0-@exHo&azN{Q!gA-Xob0f9%KllxL++0w>*R-- z;eFO+<$iak8O4jx@Em!rn2k|?8iV-vr;|?dFIO^9IlT3kN z^^_C`0%mqnzu5iO5$4?NEa~bHw)YNI95)3M4AvLMFCzZ|fW)A;Et^be8m*63)L_wZ zo9hP62cLZdPYMz8&QfSFQ}9Uoe#A-kJoL`SFqGQ1vv@MFM4XeI2^hAnMwLfJE>+~` z86v|~)6>9DLoHEJ7;d&pqh+I<5yGeG3{h$!0qDS2q1KlL(vC_PQ10c*e}`!wbDx!l zeb0w500a<3WvEHYrP~Tf@|n<$Z^z>-t2aAFTwIAxxDMPZD@ex2m;b z9HyD1^cN$ll8;n@2qc7-Zc2@4(VgY0SDy1L5*6o5(FN7QGu2qz^Htmi{U)l^R(Ll=`Xx*;`&;w(iIyIH<#9sp>z2# zL$A92?!m*y__gU0YLa#@9La%|B=Ne2>aZ4S5;e^Iwbcz@o%|}00f;b<;(-S021i5r zh3+51<(Z@EG*OZtB_?Xqv)n_6NUblw_iBpM8TO6;>1YCi6?06HEgzx~F<+Q-~ zqNxJ_X^VaN25fUDkbIuwKcF}sfb($Fg}J&vB83M0ui#1Fw*^Rl_z!jIZ@ry6`d{9| zvvj}AhBZ%rzIDE~SBzDcDd z7C@HNRA3IY>GR!L7aX$Pm9dboo;3JfAh@qum!o=2gc81JBwHh>{1LTQ=719$48X8wUMt7R&Hfqs{b+om zFC3IXCrur>hmjVBO5mhE9lMSkM)(_jO91zqO=U3{d2$mv0mNw`U~HcoZ?* z+-X{*P>Gd9SZ<-f+rH-E&idM(b`~f6!!Tr>R1Wx2zJ#7vp9u79#+ts2Mnv@wyj(pa zBBh4QLpw;&GlL1C`7;nrsGLHFWGKIxL8UTOoqM_C&N24vzO87kRS7q|EF`G#E$9W8 zPFBZQc$^vQuCZ3J7!&M%{6a~t12`4wA=ns!g?Gb8yaBvUW+rXmN*imHhRnZRF@;~cvYr;iDwVxa=t>H%->xKET~{QC zliB;6yy^SEhzce0rrg2O(D#n;56c=7Zkl8bU?`U{hcf5 z^?G5ztEFi$+&IpemCipWieYq`zjQxCu*_gDUlAbW_2V}j`hm{=E11kv!wPkSu8%k8 z2mFSZEmYHI=w&4sQC&x4>o4h1rHJ3Y_QWuI3hNT?RiW##HdE>(RuhzV$r&YFgae{V zf^;6!SY|3uW)+-<(PPVG%-bP7T?(*3eco=tTuGktKCF{34n& z{u4JY`@=A6tK6Xo4Z+_YZ%F;qeLWKUvHP*CsSgmaY!enfX zOH4Wf?~dq!8|swX>zf%W16m5NCqqRbp>>I;}%iQ%nlD@paZTqxqgh z`qd!4ytAAiUNM_I!@^D_Onba5noB6Ga(G_;`5O?l{27T$O#vO$u*=-CBd?YW0N>a@ zV^>%)nR+|mT7V#?Uc|%2J)B;OiTs-579Q4ZTTK@O)o9wq7SCYN@Fi{O>9EUX(gl`lb!eY3R^Nf%nzu0mM2ZxL>S$i>{6p{v_3nx^aq~0 zueH*0l+ktn&z9R`4bYPT^7CuAYo5PGIYDNohElN|b=;S;>w?w}#cwK}Pc3TWdln}L z?D4l6@RdS#Q-2QZ^ue}1qzbEm1TkNwq7KAe$~u`_Sn6? zSQe<`~()gDy)2 zR;@T)@5j^8eoI>fM=`v>cuY{u9crO4B#bsookts871bjp?UcTqucfmb66LI}aBZYm zpzs&d<$u5d0zBaG6I2kl_s%0LgD`_qe@D_WbR{LD6oJ2eE4?Ww3H{2u<{Ht5lJb5? z@nx*|ydmsgi~Craej7f*cI^Xv%HYIT=Y)|bxGym(uvzXY3fYRmQo9?d=swHr7+=8C z!d=O$0#WQsMf_`{>o$9~xWg`=BC{VRLXjc>wUnCW(Idt_m8WiYsJ+!9ORmLJ;e_OJ zHhwf90SdUPEBPpa6wUtUbnZjW!CmGD3!~vWewAfR0stExk1#Z-&yaC4(N}JQqcF0q zlMXq?r&0Zxff7>0J3^TFciXQ)#e5mTlk(BOh6nLg%dqzq8b`G2Fd`zpv&1kgcQvH^ z#T{v?etm1M_Gr-HMpleLM~a)RC9vPd()f~1U{#{fFP$V!h>tthsgguL%IMvN#M+JD zgBW1rVoW2#jKdYnJh#q0XlLsqP?)g^-$%!hO+YY#8a1gr#qysErb!302D9LxnW=`n zLXfu(A$RM^_VY$N#!o{z)Vw+b@%xEW?tp?99!r|B1SaUb{$uTiGo7?fl?KL=)$K$Y zzBguI$lYNK0jQsa+~2I;VqUS~BLsmPShojym0 z3ec9QA;PTQ(IZ)}`xE+27x?RK{@(LbG>Y3%i;Yyyh=D*nwKI@f^UIk$WaScytw3wSCMB{G?`mrrz*@7Ei@Vkat1BLir zo4E2;yo0kpN+hhk)R$7)3@RxXF$(p$F z{&R_knLe~W69%)!%3+dm=QWlVa~ZukW&y}UWyp0P25SXcIImi#Y<3q|Kvs`!tW7qM z+UZR@%|`4v5{Dww!^jk$C&Zl=147NziyAA=s@T0#gDC~$Bt^EvG;*o-2*cU`sJ(Mm zW~@-jjtEm^ltp|V75qh7EO{|QNF-xrymEZl-i|7i-UJf^@I1ovf5P+sXCY&6F0u3% zTyV|GBaL3k9-+pR}YZJ+O+IoMJA$>Cn%~&1JE-keV1gSfDxc+2UBhhkE zOxH7EBjjm?2l9<^&Mu&)o_!|lepPa4vG=WjhVpPb>2#3qR%V%Eq|-xD$8i7v757P( zKb6|iCh+j{4}3mkx?k*NEL=1mQtF1@hU%)$VuE#;u<2e-A@&G?(xS; z%7@TqWKldjZ~^oPLdKiTN(K9p5{8~W#Yyx1rH;e*{D9%2n`DB$&KU)xO<}7qFrrrS zsG>m$3@Mc+D&>7p0J&HdQ$9;G0pW$FgGq)!;A8)JGju&3~F=5I*ldy$eL!| zCVc&)8WJwFlG1K3XFPalVtbx(dAYnKZb9)vrSTEnhVau3S*B3m+&?l{%{Lyb5xugx zCOjiDguwE!V2Lr0V~kFd>u*DN;Kvi5W7U}yCDPq#y&NSaW+9CLic3CIt>qIdLdbCo ztC=4uP;uud)Zhf`JImf&iu~)zcQkc1l9Td?HCqn_z*TFtJ3DY~`hIUXJ4iy6hEsiG zXZ8oWw7RU*!~VQ(1OXG0bm~#P#SD~a&c!W`Sp28b7>|p7U$*O_&8~|r_F{S&`_uJs zhf7sGjSvSNR)#`PQR((_CDvTXZ~h;7Iu=x3sdsTyURb|?+%m7e=y5${Uoj&6*B3c7=kbLa;JNMT>#mE97=E0A_R?_4GoTlMMeNuhWgT4CL=Fp9 zksw=F_uNg0(kA`-<8`re$elBKkz}pS?Y+3vl#`S2%^N8UKs*T( zZyJPy`g4o?-KDz*Vm;6Q`3MI1K7<_kRN#es4XJH@-@hgG^LL^pz)?gCjAdpvT1vOJ z>9mwiE`Hy(gD9}hafOg?V*T|`Fq)9Kg|<p zxlrSZNcb3qDw)>SGLmS2qIz#OhRtt)20}i}ShCipJ8$k;brR|39)F@*H6LfWqNC_# znU$vMr2dQuGYXHUPTc&aNP+>xFyu2-x-#zb7i*>NQkkE|zW%WGVf&5%;A@V4hGG3j zpbTRTuQ$iHk|3-WC`yG`A=}=}X{Mm9i@|tzfnRU-ID(&3bloxUOTBPA4m)e#f#jjk z%TQid#%tQj96rYv+o!Odg45xKu!hs9-i_%dgrNp%`+oo4#tVz9f>TWtWucVOf-~u9#;G{lViBGbsImSw?v)7# zyEFNftQ3AE`yNjjm5osX-3Y&?VNDw6MB7SLUwy2Y387-Jz6SKG_;}0As*E&Qi55u( zku{)(xXGv8;=<=te_S>@@9pXjCOYM#8Z1zfb;w0gfrhmdtpxSzn zjl$vRiaJ8g8@ogCSb;UIDa8_B@f%5qn`FV+YWnZ=r@?n)QsPxMztok2JtBtbUOlzl z&$?M71p=waK%(=aTYUl098UY7U|VM%#AyKCyS1oYIfFS4Ss z2F1ZUMs$qnV8BG#9_ckL`(!rJ*#ZKvc&`|1tIGBEt@F$Brmh>VF?2Un1O_?q8B+ru zBcD}#FlCq<$dj{6f}Fq=9Whm~X&G5-Mye?v#vn-BRb`d1@=(gi*o$E|E73$&qiD_) z<}3;28KbMupi;TgxWE)nEv$n+-Z#)~JON29IHPDTl#^dI<5rV9sFt`lsEKkF> zt7jePs|VphJ&#=$>yKu&pl~&%g3(&YJ!=QW zz~fDROdS|z)glnKPaEwZ>Lxr8L8D^9MKX;&kBGh)7&m}vuqwot0$UI!GkM?qq z=K9$NIF7)Hzi?}b_(;-$s_;pJIXr#wHHi9Yp2JGyQhsYBbS0<`d|cpmfG*gA77@q` z&vHLn?eD(&J9D}u0(o%t*kbe4(Eu*MnP170mh}7q2tiEpLNI{O6OVw+4_Xh_xd`%n z-0u-14B=}Fi3tT_-{Gg?|II-hb6r%k zZaI_%3rdMr+kRHGjyObOdJ>V52lpUrl{ zoJ?*SNtztjUpOky4*$voOKexy_N;%02SxsEG?bp28TD@kAOjnUO~%4d!$sPnb5YMQ zDS(4{(%e{?VSeww0PMRJLIJN1{n7mUd@-{PytPV>?jOSl7j^`>6Ne1Xzdq+ef4npc zF}f`d7!{|H13$i$cH86s`SRtk4p-fIdsZAuWd!q`w7^SfrS0F}!gkd<2@y@Oisk~k z0G7`p-%>v@fr^Z5086Ug+BpXW1d5NcX_>R^tp>s?d8t-}AnfR(A&BlxcLfUJfWY^rEmYFjND>|JbgIDixtyuZEQIa84J4aN?tFz8@jQN> zIL-7>d6CfjZEG}7Q@5Qkt^!67HTY;tPfnw}O)Bchrs0@RydVEq(FeTb+W+QZ$wL8d z0Zxv+tm=*N>myb?T%R#ahCJ_A66gU)G#m__J{f);rV)$-H7)`1xAw)5!xzjR@jIz+ ze7}sE%zXk-ocZsXn9z*PNh6I1g>%0t&;wu{yq-EU_g!oN$i%&D9WYLX^U$=B=8XJr`VmA1obqswQhD|MDlxYY^LC1okCt)0f=!;C(ar zR=P=&KS4I__C#;~*f7&YKeTa>oJ+&Y$!V<3k}}m*=wX~z;)Ai*_TOnb#CJx%yt9t$ zQrr5`YrW)IVjQc9eFIdZPM$ZJU|9>RsxA zn4pqgn4k^-p4m>3#Hcv>4wZkhTC+Oo;E=4&(lMS102orDPUCcT1Y*f;C5anhpyO`w zXv_b6vEAe0?5KwPul2S!ArwsAlv+FZmIGDrh9q+)0lCzOc^HD1Wu$z)1_e; z_BRYzqbVfYIRo5&9Xm(ph{+6QB3@`!Hd{Vhj0M3BRbCK$jSpqE?DEda&UQ5@WKIsP z5spl)1xC~P(=;80NRnx2<%caPRLZPx!0+mib{O{wr*hd45W1ZGUN<8+=CgnS0uqbo zOSEK@U@ZQkf8gK<$V$JMR1vF-2Iog@L)YYmCMMabUFa&w_TZ&6aRB(Nt+T_j`9QAF znlU#~!WWaLUTS-b=MV%WQw){feiJUX(qG2O_@lT(;!g+R=#?CEIcx5 zYCa?|#k0{k%3FTf?YS+tur#>FPT7%`u?ORq>jLgkVkTd^D6it#r{ND_r(+-UFXSQ~ z>rxR5iKR$CtM*<4xT4u8a^nqvtv4pUl`Mg@4Sqa(92Zm6f=$ z-vZ4IiUtT~Vf3|Mp@6*Oybs>Mw1kKaxCagBLETk>2O*Og)Tw0k1P%GV-XL9G3d#L; z7K(Y7ILS@moIBzz@R($t52B1cLnExPHYF%hW=G zVy8M7;@eh1lg;JT+j{fwyx8e?j~pu{(hq57v@AMP-H{?g#V(D8T3sN18|}!Wj!T3R zE($@Ty`!nr+D)o#N$MrqU0F`9Xo&WjDeiNt)xy30ho4|J{qy|iL;X?VaS#x4D?A24 z0WeFoj+~T&0gC-qV$s+#Rax{yhAbQy7)l`LBXE>w8f#hA#v2YyV1g*)lHzXHB{4(z zA)(zX`6q)H&=AGEZR|Zi6YkQQ^PA%rw88K)F-*x7c7v31U$(5U3T&RS0$9<-g87a{ zw~HQhPFdLs9DCD8YCTaFC1nEO5dk;^kA-YVzGl6jw_ z>3Q7B$~XWZLz^88bb3ct0zeRFN2I|c_aOd%GSVV%_>;TW_d9zb`Gp=$(^XsRVuylQ zL=4AyO~skGV;LCeZtl-Z6Wg!s$IkTZ?8VHt{;&YI5(s$VF+Ktr9{6QDSDY|!_!O7> zG&TprtzwEJp@Y#e6(9sAX)&yrMy&nF(4lEN0kyRUI7D%TL%a?q0$)zj=apu;?Fng* z_nNBoJ&GwEHaH{JXq0oCl>hlmy|-g>k_=fahnM?wUkY5lM?ZA@e%l}O@W1HFmyiog_Z3KFe^{}&(r&6QFof&mV7E)7^0d7BON#tPuV~ip@ ze+mzqr=M}5LMktxc&a@~e91yj=5BUa0zp9fnCmoTJ*rGJMM$0&$KKUiLgm)%Fx3B5 zwEb0+8PwqyeliS6Co5*s|$PcHBy zl@$K?_aZ|yps50$7!!TLN?%u+Q{O}8qMC%S13J|g-t^Zd6N!n)2a)%wXhs183m73X2%*8PIt>9H~)YS$mZ;Vye3d@<`d(}D^ldZ_wkFbVs&tk`l9(N|%) z%s!mkFFEXfBkXoYGsLW-=&YiO5X&v_Yn~`YRXn34EG)o2#{|@D&=DjYuG~^Ji2U5k z1&kEVllh;!vaa~9(E-s9R~t{Z`M>GQETimEAW&FHy?jygVf4M+1#h~j%l^DC)zfC& zW%s6+V~dE0K#-^`r|-YK-1t4qZ_*e5WDWC&Gr;4xjKp=@SAQuepq4x;DB-45^D=(5 zF!Na-FIRt5ed7bvrhMD*&!8Qy_LDrFIG_}C(=_aD@Qf>)Ay)!NwWRu~#L?&Jpq<4r zQzjb=S?n@3aCmqcMVW?QM*4Y4&~gr@1H+7q)*3HBtcOMpN;F}J5q`Vyx9ckU`+%SP z_e!WgFxJEYTd&?EK#?5Q)!F6i?V2(%?>ck@O)~f>m?btV<_Ms&$fndb^u7MCdF#i& zQTNpOY3H#DXK>!M8oRTvEA76Sz325J?FRa=iO*Es-K^@6cWfMU*XtnBj>F}$vzzC? zjC!q%n&4r0_Wo%N7y^&-R9{dZH+^0NCfzT0;~!sQMU;ouTMBe%Pw(`Dc=TBvIgYRf zd9JXS*bq1jqMFKXbR^E9`tf%#1ligXb%V9azX;#m{6aP~#Ar;oi#VKv?s_@?tSsdD z$n+Swo7|eDZ286uQ0YSzz?eV*YI=&duMDs%@W3ZF5Tr~qy)_wX|IJHF0o?223>Zb< z)0^*pb{B6&Nbd`?C%p5#YswyvxLkdl4StxD*Az={8NrU!7}4;_l^$$7>|EO%`>f)9aiiTo>mQxn%Hrcy9PNA{q}4{$LBUyY`|&c?;bRc zx9!y#0Hj7P*TxYM?&S+2-jbLO3~1g{$AUzRhLn?x(^W4@;JUwus^I6>+M16iTq`AM zAx-Z`Y7<#2v>ws(0-*F=smriVJ#pu zow>wp7m4*|8gpF`^-5Ki-Q|6whXT{2CQGt=Y}ws%#}RbbnQ38fMsRmE?DWkxqgyzW z*4*mfbtRz(C3gPyw;V$LTC0^*0*g5^k7dO~yKtzqMyxu{FDH`85`@3Cq0x2>((DCl7{ff^5KOoUWH&2=PC#eU8jqa=Y29Rrf(bZG~y@K zgOWXgrlU@zldN;gI@Gvg3>>WbhGGF+#qtLnHC#aA}H_mrB?^aNaw72&vL z+<8_dgGc2O_YWM5y*&j1bW7r|WW%*eEri?Vx|}~_@!lK(NbA{FSnCHDRfyxE#@y^D zJFT!EVO{Tx;N$~jPHx}iNV1?)<82pz3?DCDe94St!EIuXhSaqBYA3- zfD~bcGjh)sJk~)d*@Jk7RnK(zuF-;%l9$Qhp!KTl)&U;-jM(xIt@(>7Iyas&?5ZZz zXSOk*$zBq{{JcZ&tx4~@WvS4ZT3;!d8e3?MPy ziud|I_e3^@S92L*xW%@$A3V=`e!Bj$&R!^ONGJPpnY^`(s#Ast?Dq6bdXF;kNtH!Q zJSYt;B9FSmBNBatX=-5qEG{~Hw<=ahG^jtC{(%diJ=}dqyFn@5)1Gcne)B(@kBJHk z`?vHMSdMF-E@IlnQPh(RZDf}Z1DgJr8YzA)91AH426ah}Gjd7(vn6@inQdBV#EdW+ zj`&0v`EUY9*~dC7;#qsUo55u}pWzd0J0fl5o+d7wZHMtm6OG*9>nv*>He)*8Z+RHB zOgi8z7Dx~QsPM9UNH3mdc-EWiZ#c1V(7tZsXf}%PGk71yaec2PfzNc=BmbRiD!9Q; zJKu|Y44~*7y>Xs8srM~Jhi4QJ6-5=%#}GNTrMG`nA6E@{97qi3=-!W%${^BK;i^Ys zJw4Ds{8#@xaR@dDVQi1@4FZCM0azE8K+nq-thUyktIqG6n352;%p*sO8HNjVJOK?W z(^1!$L0fV~Gry5BGEw8UbG7|E_CuXKw$8kKBxYLGJS;p|U|bM|TpK(sE9ubHk@1>} zl12_ufZjJK>&6)IPE9g2NhONm_nRFY*%|q-g^co}Vf5kf%X5Z44I<>z&6JU|MDgJ1&mS z@n8YdITa*EdT5ndrLK4)-jA%M-x#H!_%;P|C;j@k$@8P$C*Jqi(Ln1TskpQp7)W?a z3Ny{`n0S3nJAf4pMkmyI5pRvXGZRWSP+z8TB^;Pl;hdu+|72IcXtVg`+h*riHQ^__ zMMdisCX@@<8ima<1qJinZO)Iu`KXMhs?HX7yzObQ5l=6(t^Ky82)kzaUFc!G6?(`44?xFD zhWFMUccoFvBe+?EddUqWY)7Dq5yhe>1Deb65r$}xi;-z|wjXn?CGS&Ag6K6a4ZcSouOf#rhtOBlMG6+D0oa>}k4NFF1QNG*3Sk_9&j zu2rMZ-IafIDOQa3E7xSN7m*N`bAp=?zJA&i9^5mm5UC`MwbtdpB~;nTIy61f*v<0GdtTsqguS=6|W2!Ao8pQ zj}*!@{j=6KC$uqw4CSinz=yn9O#qfFl~P%Ma7ndFzp!|dZE(ohW84-5UT;uPdm*~@ zx71z79G)JW*cOZ@Kvq1YGnbY`|1F=iDYD=EM&l_ZnalhO4PkUl1Auh*Sv2U@!wr8# zr$%Zf#)}1gqISYAtO`)mab1s7#BHeGQd^`LLDP=?b-eG<`ok|I~^J#qm+_lw z3x)}*G3_-KtqtFZJ1Xnv!}29+gpVCzxm`2(Q74~Vfx=wwhOUp^|KiMHP+k1#Kb#8O z3rDdK2bUkHalZkGp4uHok>t|-Uk?r3BaFeKV(Q)V4F!j`y>$|g9<+6~4%5d1mU1sZ zmT0*i!8#q~OyIaMp96cUFg-Sm2#~b%E54(i)jijp4D_g%gz5;BSD9-f)+;;kdm$-gcsegWxlcp7x9+jcx>!D1o|JuBe8tMl=slws5Kf_fkdn#O$Th@F&ezDz14$&wM0N22ba?45dQV2S{%p?<>#f~) zMI+#E+uZ;sK_{4|Uf)eb-~0Gq#kX#=Ma&`=euAZtUl*Ej>-{Ekf$Nl8h`5hFp)7`;(kOQ`9DKyzwsI1YM*&;bWs&=F7oR5n1*ms2>>c0$YL^i z+oB7m0+1DK6JlysM!47V&m|9Rm>G5Q#wwZ<_MMg3<3lgWfxGRFc`nlFvDT9%75t{) z;Jw=`!==@%@;2opbmGlmGFB8D{GM4F6h)0;BnT7kx$iKBpE!HEqoF-I9c-RP0|xi- z95he?HMxx#`p{Ts0?KIcYMA?(&TGP^4QTA_#Nn$~c9J~Yg~iAS6~b$zbfX9oKPQli z{sgO}5;G7M5FcujS%3A(Q~p&j#BVoeHxyk0kW#aRh^v{la!{Y>2Aqj6*zm5)m&;b3 zKmAphCLpOT|dZ_ZtddS`;fV2FyHObtq#5)Gp+E+);0ePTU7UZWD5b zA_r24@Rg>Cj*kyB)u2~=oeJ$67i>bKdC~4E*xLR4@`40R>!5OYczmAQxnAUAOtzwR zkQ88`PP2vT-az_!A>f;(yjUerhHTbT?hS>0_mC zthGut4egQCjT17Gt7~9k+!WP*OeaUe*q{Bfgxq(#n(<9O@{0eN#AMwZb1O#Ly0869 zp5>F8BY8zk-}%)k@xp*U^rph{^gNhW8_m=O=xKB;hYHezo~T*OIwUlS zBQ7z$yd+dETb$b7_ui%omz(4Y+s0Bqdr-SFNA7TD)Xh75$%LfI~7#*K_O?VAT5y%Lmu^)`C&87?t5} z1qRKtj3Hvhm@ZS=-*{Y3iadB7)7KGZ!zF6II5u4MYYhKNAZVt@Dv@D#CAx!`vf#sk z+UVZ-D@QMM*gz1Fg;zPid|}0nmd`B<6L|Rf?&IT8`wakWp*f*^BMJgX{!=a0M$+|d zQ42;*eqpW7D<@+2r}d1mrjFUi!UpX_p&2^qGX~XF!nQtNlw!;=mn_9rZwmcn&VENk zS~Qmg&9(6#LzQggR>AbB!4aw6EXwJm4yW%7a}$uwpr8VF0-X zIT@rRng0~T*b+4I;P`HKM*(_|iW{7cEEJ0O_sb7Cx3&F`FB09)EoRTuko#3 zgo2WUrRn2ApLHcj3gm6c>dIam4T#hA1`J#nVVFsfz%=Zg zpSKT~FFe(}H}g-oM5&dz@>|hPiaR1xnpE+6IWoM#ayzS9>LagWvw`ED8q^Hs8INnY zc5B_P=YQpM{`MJhHsg0G&^5cfO;Ou&!6V^iZ0{`LG~!!dWmu?w-8{4k@J=? zbU17ClpHAC-dInj8186As!Q6_NRshMXA*dXfXDx^0ZdMCxV%#G(SHobiK9{TG7{&l zM&E1%s{wcG_7*9A(FHh_5v0jDpr>NFf=nIQ<`7Iot!6=rR6=?Aqx+MYq_qRYM;kqB zJ4O~HmIPTvCP6yma>{XZoZ?lB?Fo4cT{iU%z&9%WXE-Kcv;-qyY(3>ft2z1b!{yGzRC*!;OIhe|>j&SaRN*tX zQfW^J5k5OBu>Eg^IDRSUXK1MmY|r~srN`=%?5E1NSY1T2hb3{WC@d#L2c84H*Pkyz z;i-~^(zP1FJfoj2Zn)ARzyuD>2m0OJXmmEw=2An>L6#rKDi8nXT$(jiAX*YRW}B>3 zNDC$5ZGvW?e*U=Hqm&)~pOZa}W+;yw4u>XHHgeeUl_qrS!dlA=+RJ%-6q@h zrs|N5v4#Oyz#-=>11fl&yaxvGv==Y;-~+;o@D63x2@^%PL*;tN0Tud_Ug?pbsp>sZ z`YL&}-@!Vy8M=B}DWo4-B17I0WFKbwNEklV2A+Zjn#7ReC`PI2k@8d`ybMp_Pt>39 zeM}HMC5t{a<}@AR9IdFlPWuT$gxW_=8WiN7x;M>jT2V$b!%G1=^@=Yp++YOff2?*o zE#xXnr%vaot0s)uQv{~>o21N{UBN4rZ^c5|s4SZgi@N@oP%h~xNM@42EeIGm;roUF z1(?o8jpw-?$~|`urr%h+ePtB3sG1(2fRg>#b|q(DvnPK%P@IUOms~#$q49lJ@v?~x@%E|rjMy}1>GnOopd{j?5kgY2JNZ_K zfOO(YoO6x;@^!q%@F;8Z9_C=MZB%$D8|ug4htkO|4x4QG)`a+T%JE8c>1wqeS=)K0 z74F=xDXu1lR%6ET!-8M2Asi3qEvqXl-LJHcaoM_iV;4fTM+cUlybm*{&T^$>47H>& zu)SrFfu6urWkitZZ)X5Z*=cgX?3LKTm%Co|{bpajLPIzLxfTn3Y)lna6wCGE6hS`_ z8QFebB8T}G#z!S+4HCnWDl)}jS?Zk%@XohqH(e;MAa zqoKxKsh1azi)kX?v*nfvKDKj5FgI_=Km}BMsTs3UF@Z?D@@HR46BTo56 zu>s5RL4{&$XgIrL?)G{n#$eBu5@X z9@bImweWYA_Vi1GR&(R5s7l@?drr&Q!LG38YdM$8qE?5ksyw~qK>U%Y?i_n*@PDZ- zrL+P@roDkx2Xpxj7i-P<5p@aLL7hmcBZu}nR9-btZHZIv7g}y&Lh)qzgqosRn%Mdg zB+Gx8LwMd4PGAnKg$umx8|~LPeNbI%F&L6{zr!zbO{GJ_d`BB!(cnvAlc*a&C$R;3 zs#-@048caR`|GRoy%XT#%Io5zxYV%2VCo>{2{8a8Yg zlE_*_SAY4huo=kfungw3GqQjdgX|0-+DlR91d2_u+MD^0!Xrz zVq?VC@tkO*`EjQ9jRTJ*_H`)b(v2IAqLY@{?>2Kv@cZSdhn|6@w7of+>)mUGBrEj; zL}`zo=C>4WD3Bk#^^8RkwbMbpkiPR>r-H`3+PT|CDGV@6Z#-9TVBtCY10F%KY9R|$NV@v4wzqJFHdH&Ua^ z#CfiGkiIN-)Z4l~w>kLUgci9IsKF#H);olmW#S1Se5+zYIaz4=%SCU zdo9{%aK+W0N!IjVyppa0E0M|(jpr0CurHyX@YM~0Lu!0HrX8#HoHT2 zM^+qiwLxyZB9N;B>e%6xwbpe>XY9U<2@6D_orwoE@^!V={MHj7);rpt3p8N}?txlS?vbT|=lBdqR?Apxk8;VhuZw|K9LjLuD67u?oE|JtomWjFA%V z6Ff>03Jk|RR{GfAF_QzolJTd41vBGZjE%RNnO-=+BSRE0ntXm$B<*-~@_m>aee7`l z=^$(%m72LN7lzjO8tE3Dhr6VsNbT36mEbZJy@yTx2fOO&b6OBeco53E%nAg&Xm1Hc z(`GUD$8&Zk4$5#K>+>G)b*|x`nNUxU5shky2X@%!x*scFu<0GcK9b6<<_Pkj%EOxz zOT(aS^yQ<>%F)B>yXh$zN|gp2obYS@@#Po*ImpA(2Dm`zwYk51QsRx67uNK^m~(OS z6BZts-LoVRt8E`vM;TyjNYNEK7h0%cGk@cCFu;oNT!>xvkMdgUL3P=679f~+4J=P) z!`HjDA{X-Bw|;DEY3?9Cs{&oV&Zo~RntQ6lF@ zgXvA(6KXaHh+t%8U^AcboZ1)W7JMc;8$}9~U;9*Mq?s321JhbDzpS%tJB{V={)@i3vBqUj1!B{3Y z6r#dZn6IiUFUfs)4mYMsC1G|gT*zla{~fe&Q^#L!Kv-DXTsx4N441pE_DJk~yb)s1 zd0JJy_A<0Ht(eV{u^UDI$bXKQ4YSd3Sfw}KEj4`r12D$H!v0*vfUg`m?QupG`);)c z+tqZykz*D*ThLMJ`K+qyw>F@>9sc8Aq;X&nJ<> z+rM|20q0Nk1VT}NIIE)0Zia=x*Cd1iPAB9y>^hGLIHJ-$Nh#e8y83icQ zpdE&tU_Jd=C_N9#nVI+&kN%#jfN#ufcB$_*e1`jIyI7BBa;6IxeWV2E<$0|O0b0gGr5dmQ!mE!4>VOQq~ zFC?aTh!gy5oqL$z7>v2ZBlJ|fbmQ3#bM_OX5updRuo<))Qr@q1C)dBYZ3e|zEL#Ro z#De_v^~#}j5MmXBW=v@jL8@fv8R{mV7ROSo1QoS8Gkwp{3)DlsmQLpXeQ>MLRR#XA z*7G`PCNOXO!z^4kR4rAc_ICSl1^>nVu8Z3J1U^-Ab46okp=>(<_DLARETAn2t+KGi zKLl?Ra}?Q0i8mnn+i^E#SjDiyQ%+xkklO@z; zr4fuKtm&j=a573!iv=VSCh1yJ6$~Nm(kOG0{i!-zB$4mfOl0H^R5Mb^opcs5`xOh; zK`!8{1{;FNBz4eWX3&rDV#5~ZBzjrmwY6#N*IsNhJ zi$^(x)3Nm%wa%>NY5(;BQXj@>V*T>rc}WG&KQ1-j)5C=umu6$P2wU&{x4q17G&kk; z2s?#Y2T`O0QSgz{Iu#HJcyIhMQ09~B@gYPnQl_?iNWs=*rhB2IB=C8CBRn~|^WjF* zU5lol4^p2Ls9EI`W`~5BkboXOtnYcz>BWLze_HvtcDuA|_rMBPntPbMC*X0Taw6Sam@)Ai8Z^t?3-0i?kF%@-i7=N&Ypew!%|pw%5>o>r-oLir zjw|j1)97a*jaV>}e_K22DOHf+(rKxUxcir)`$uhP_-561u5m;q+5aZr`u>NbCE5M& zTL%KlZOcbjC--l}sDzh9JmPC-7Xj<<^i#jkb}2JkDO6P@MQg2%I=)ehhFu;(#i@Jj zCiS(uCU-OCw`vg}t90G^@;v8J&QBsSzHb0Iohj8(-WN`2-rsv5vi1hQop4h*jiNAf zMkwD7v^-R}xH~mQg)H7D{g99;Mr(mZ&0P-uI(p2%Ib$3?qu!s5nqp^D@N{lZC}RWZ zw9o+aFM!My=V^7^V7_$y_LNWPht%z*djOKsCGN<@MI0ahqKd+c6inW%UX0iih_ zVbk5LPpeaDydIa+{MldZuTXUI0|Vs^@B?&|Q%vl7RyNG7UWm$0THy#uN12Tp;Qfe6{aH&l!A*}N?ICb!GtL0}kK8=d|s^@+Bzs$!oE@Aq*nu>g1uLDoCqEA-IO z#NCDshQBfEi|0Y|7O6wsVrqNOPUgAUZAs)B<0bbE{QUwCO-VHJE4URlbN5MADhk|A zOB!T;@_-07x?;mIdDzcEE^Bi|Vr4hyUaxPd_B>+51mz;8FFIMB1!?8<#xn!LZzO^e zCSYrj-(jhuT3palqRwwFT0=|zbZ6=zuE21BEDZ?=-C>}oQHq9J??jGyv>kLQ%RrGn zNLbH=1JHyuBlWlF$d4Y6S8%$`!BcK~w6qBC(RRdc zvXabX3}fP>Z`C23#508k8WW+l{2JV;MWMtetmC@&Bl#4$alERs{O1hZpWk$brAB0Y zndP{qsK6hKLY?N4&4M>lV2dkF6&v(h4WB)ykqX1j14kluKdSnJ?OXLO<#=ZZHB=~ui+#sNx^Ot zz8adMH(0<28X&Yz%tpcz{9wu|E>=iBxrHPCj+F6V+N`tLk68lJB6BrkZyz?w7F$<+ zTi=Iqj>%4rf4^@X7XDQ9RNB?(;6pS7&k5h#$*h*QvHj6Wul<{B?~4t?&ilD@CE@oY zT9czmZp9y*FjS&TnP6$IctSKjmbJu)-3gBZq^UHCcXbi(oX#D=AwYq5veN) z5~0+MAzz8Uc7JQ8lGHJ1YH_+*UHIR6mcQ|Vp)o`4-=smPktB5QT>)NE=BFf|Ve~W@ z0{2t2Rd`*($c)198ek|<=7WMtE?m@zfW!iLuA;rPrJ4ZA2#Pr6(SVOhaJX>YVZn0P zXEZ^W)m#d$4%UnTTW1XgiNeM8KaU)1DuykBU zvdL1>h1;t;FITZ_PC1whI|mT?^Z_LhAqlUb6F+Li+jjlKd{VT(zfq|F?)Ot<5^Px+ zmu-#9(neKt2+h0FcMCfo7WFsbsgp9(5)T+#YN6k7`=;hm1VN(hTL4pUk3W zFT^(TD#j=a{Xbly-y3D5n;7SGH@Pj0=-cAsoCH}%@|JUZI5YJ>{_I^pLvpl~LpTJGW z;Zi%_mxmsBQ;Yf(3AZoUMiT|WNZmYL&*N>`9w#$}ZIA`k+RM zgial+S23`_`UG+=uJwzVA+R4dXLIei)>^FMk`NK#Y!N|}cBm3abUnQR%( z#XJmv=Z9z8=5wFhhJXCnVoC1k+mfXA{=5TR;KWvsVdNX59yxof#Xzl~zHvdh(a&+?fBt$t(1*P3gm*Xa~A z`1e3%qo;8hphTl;qhjHUTqnHZJQJXvZj&0x+E-a-2nFG*>3`d@MpM89EF%eR*5l4Yu8HWNERUuI8@xBGIvfs?*9T z5m+KwOgO$Ar~ShoqD!m(r=|XK%*bneD~-X_R1<#JFOx#67F}X0Vs}`!j$=*sqwtF( z6kwDDFZP+lu}NA7T-Ng=Iv%?`tL8+0PFO|RW+7Hjlc()Gs|(U|b|P^5MtJ$YH%4%+ z^B%rRtD3oXtFSz(BnWG4JgKjw{}KL8ghW?>uUFC3fRx3ZeOx8UM)QmLy-_uc(M;2g z?62<>ba-U$z|YUl!A@2LFbr82Z@vrDuixD^e2m!COevL(KQF_!pDW;`FAqZOqO?{9 z#)CHoV@0sUMq1j+dMLKV{xE7kp9=}iE2VAFbUjyB?r%@&i(OJwnlDaT?ClE-&HV6~ zxrSqd6$7$ zBY+y2!tN>6bdCmmrRk7>(9SEV1d)6-5&2?)xKDdYe`=Z7jAqJK@5QRrM!)wrSrL?_7Kg``xb52 zYU5wR;~iCqLZHVEk;a6Y8JaSRwJCg->(*GnD~G4jEp@4}oyrpnJ1l?t_7WT`b9MFv zbjQ1b(+?hKYg!-wfmygf&&FDk$|y{uNThD%S7pW`xdOGI%kgdpHC$jSs9`0bG&xq- z^x@A;8RjT366QW1tMLsMz6Ra5jiz-q^|-!?e%dp{E4wk>OO7a z@S^A3)K0+rNgm@K&XhjkhG2B^^7t0=Ftc{0Y{MIG;+i}|0iEJ9{S2DV^CmIZ;?&13 zI*HS+6s&YhtGfSTWOY1y^ABwNdObC3IS_7)cGwgkVouDIsB8womiO%S-qvU&pUBY{ z*O9w-K9svKRwwGTe!0*54P3`+xri$KF^Qj#1JjJtp(oU5_>oM=@iOR$lfKM^C15vx zzLHqTH1k&auH;VHmHwbC#ro@Ed~Tqw4RXW|=BIJdBE2uiYU%T@ za5tt%s5q1PHcma0?-Frv=C8k?-#q}SlYGw<>ARTN?o)yWtP^cQe;2^>?-h0$1e+jf z8IK*{(Ou>n?gBu1i3+N>mtEJS(dGccS{p7Zwc0otlwCqV`9edbLA2M{)pc#trswWR zlJReijW-g&{`=L>a3~=1?req!e3l#Xah3rY#HQk4@vO-d0|B=`s~%TlQ&at1HN4Xb z+I4N$vY7`y$P$6FV4gC_Dzxj|B-Wj=9DCQoy_6*?+Gy!Pf$`%UKpT(Dy$-L#yXrVZ!01W^Kti>UtCzY>{(%D8gbf zE`Ijg&GopTWlpVSYu0h}{ZFlV+b^|BZA=P3H#>v-WRG=Ssm|WfMYZpasg9d@)#L;& zy}AS%Fd8?$cEpEp4mafgfn`53Y{TFaba)gJeCJ!+vRdoEwr*J^qT(YM)ckbRGo$DV zw%Ab#`tMO#BXP8X60BArNv{@rs0A|v4{%#Ss zRW~sY03)#SH{=K`0l;wm&E0~+T$it| zB0l=uYvD_`4a zp+j5s>1U-Sx$CqjJ~_=8UIk_v<>~D3>DfHYu1{G@V2XMqX&4RB-ZHM$SzvM0jM{r4 zO)*xQenk5jA+F8$b9ln7M!a1UxxAW+k<_W{giQJW+?HbQI|$3uOYpkPjmbIqG>}y{ z*`CVT4e^MWzS*c$qgJ9oJq(8%G^VtRJ6~1 zYJ-%6#IZangR8pNAJk0iw($5++RvPzWS)9w)PAh+iWx?&nxplxwhydAr2iIcB;fyp z7OWVe+G6ekfHw#NBn?#qx)P&~<7^A=6c=&Z%iHQ; z6DjG1m(w0SMzd-)lkK#*Ms(5$or-KuiA7z>-j4N9|@kPhS zUu%=R1SlCFn7&WIA9zLd#{3poig%e9@K^{dze?6cXBvrH;(sMco>aapGi}aS8Y5cx zP%#IXSQVUH#sq0Il~fik0bijPiN-;Wy(J5T5#h{g_G;CgtHl z;=HYZ$K6rIh+e82uSS7Au{Z9ju?^CHVIC%I@BlY9pYclE5eJ}56O0r^;i{Lq?|mPK zUb~!tjZ%Ur(4U-b3Xek?j5v^KbCSaKUrdyK%injDgaCS828#JE^VW+<*5Oh}?q+fX zG(}_8W<7hhT)z5sd`V0W-so6$ME?o=19fOiKwrC;JQbg^eKR z!k2yy%OG*u(9g=CkAS{Cz8oL#)e0w<_2!Fwe%gr(Z_ zs<=$&E<={1S4hM|m*+Ii!MpuxVIEN26f5&MiOw*0j2;}N!k){^DWDKUC5f=vwLG;l z>WKJuI=$G9*F6I>ApV$T!0WOtgja&tv$FiBi1_aW1q08oIgD^Wc4&Yl$1TW~U-7R1 zObIz?s@@#*)qk${s(TN@0hYblL!-9TQ%9$y3uDSHZMW#jU9|<@yc#~;1s)DIZ#UYw z?^V`9cACRWTav3z(VpM4oA0pG$J%G}0f4pBm1gDk4;a%!yWJ%unaWTS-|9}zYm8jg zWwg+;yQL}tUT7D{NpG(UGu2i%whUD-M7kgPC6IGbsl)*F%Q-~cuN}RBe8Lxs2yqAj zSj!V+xF~&r1t@>^JaYje{flX6SY!#WCPwsQeLs^*QO8%L3d+u1myTzPpT}(muY7f& z6e>f7t_!}xQDa~o&Np@~;3{b=;>&#k|NUE({I@80f7V@3rFkpDv*=}{%^KsK{h}Pu~6^YHI`S605 z4yS&eQJ%l$kt1q31-d+f5*sYv&DXs0RJJ;v8L&wACBpp|GJm#;`h&? z$f9rB!z|n4GdKLtTMN3sj#*NZR)TeM2{2L(QM1T$5xi*cC|oL|FOon_qDEJ$`*Oi1 z6qhn*o3meG37YWR6&BCNP(~qG?O!vZ24V%B=1Qw;Q-_5{Ym!fTbxNlrscSX9+f8GV zT8di(Sr4Sm#((N5lpB#`g7seUj+)pgKzD!JdJtC8O-?{ldZY0$n4oZcPL&t*J-;X`{C!D#9cD}Aq zsdk<0wI2v|V35cEPrUZm?&Oy^ypCOm$svI)yhu42$NikASq z%q!{K=riA{5Kh>Fdfj%_3c1Ms8hocbLN|SLATBEEeu0l)wVX#ob_?Rw z2|gxM(doF^ivAVuE%+ly2pAc&CrBnG{bc-iz_KjK0)oqM-pD}bYKYQwj45cD2pxB% zBCbbIa8w#XGZCHFKDM>h8zD_j0BzC~eSeMZrEqUB^z zP^%*Me+c+PTNDg?9J|3%#ziR$3Woe{bPd-<5+}-2lN@8zyy)FyfFCcga8YYmr0;C) z@UgPcSQG;*e5n)oBX@A8vlkfE499V;^fGyd}>vnE=7qVDAGD_s75_}R3 zh_A;68|Zw3&lYU@by06sd7f);8}ZiVxe{shU&5_=lYE^}m?j(!1ewnYe~>#knRS{MRs`#cLA$z`uv9 zbB?F_b?9)zg;A-mQD&8FzgAn$f-{1uwzQ-AZNcz;z)jfWvI9-%{ivhKkcjYgI4RI# z!|Rmh()()Tc5rpHqm|P?k5qARI3;_z&6fqk4@YUu9PlF+8hV@QKOdBC>TLcscobb2 zXiclu%omg~zv~A17fDTLQgv*Gd15j^8Vqjn5xSEN20$kZq@H`V@P=P%?x$5u^0tv^ zJ@VABb1k<{5TKk!0Rf)($dQyYuV&{D$4;GClCeuG13u9vx9#iSrc}TJ57$}|{YadaV2QZo zt0i7u+YRg*o{WTe1V^x$5V@axhMdttZ6*yzK~EO?H{}f6?+Whg@ld1NddWKi^l(aFy2?0Ji_gOS zS$B(i9%)np(snK1599HZ7**{w;8-EQ2jmdxxR5>Ou-J3%Zg(X3mwDzI7u+YtWG8Fa z>{jdoZww?>^c>2LoIL1j&$JQ|9NqKiI1rw-Zo2-%tC2?Guh>W{QG_F_kyT=bm_xSP zf~(e~U|+egyK+ZeS;T_XoTa`Q+Q!d$?I6T%=gW#NcApOe-59oN`*OYB=YH;~6jXq7 z#`I~XS`Qu=hMKtty4|qmB?ICb5VALJ)7&=S$7yh&H7jBD;=+SbnYwj_p=FH@>bEMt zt|h*a1R`nH9p0!gGb821dj?|nsH?mAiU~sN!{A&7_B$9|%T~LRsK1fA{e5*Ldj$Q8 zz*+$sQ`Jg-mim!HmbOQ^yyUgNP|@gVe9q0+e0Ddqp@&LQ&I%)a!I$9sP2aZ<_=2}= zpQoV5EK=wLG!g-y{r<HVvC5=^r41 zy>Y?I!f5i^)6$`#=XpbQr_Zgr2^4mw71YE1E2sTdx{nU+{Lp?An!63dDi-7XnuZn? z<7uwRThtecmoLz67N(sZp#~|;m;0%yU3!>5$V4m-9|H4r2c`JwDj5!mE~O>dU{ky* z%s^6)%_^d5kVhY_4G&1HL9Fr@8 zUfb7dYp}uDs&ORr(yz$CuNxgehUDFVC>93zNQWsaLtZWVY2Z01i01o#dg%k^Ar)w{ z)3KKGAZhOk2>*JJ7J4H2x{p6qt%u*E2Z{DiGa|NYx-!5m+Kw>)O>Nc<`Ra@#ufjKA zh86JXV12kQdvK8fT8DIVAh8xbPiaC-Q9MOH2kx-6#0Z=2tcf3oxr9gyW@W7R!S>Ih zyoE4>UdQ#3To>35e059eO94C`xVZ zl7ZO*+wx<<;C{0rTkC*zSlJ~L!9^fL$J^Xgm^#-JPW$312Sw=e)8i!w3HFV|bP0D( z!q%Mn1wu_*X?NdtPXAaSfoKT0U6v4M!OPzfrqf&yNI91KX-T!!MLb_jJzu14UpbYq zKX%HjXlSPwe>Me+f!_b5D*UvprdaA*rhr30jV17vDMRO1x@hM|T+rHTk0TXOk1!5) zVPQ=+NM#IjVQpcXP<7@PXJo){dNCOHRGs>n+O-fFP3FAW95GF?%_#W%FkOBN-EsqV zCv@u_mvBuxT_*P(5jDzI$nXQDN1MTDd1eU%i;@?YV_ejUtIeZZsCe4(4*Ql%aQqap z-!VZIwnk!!Y7f3pz-7Vq<8UltGe*4m>B8hj;`-0Rj}6G>GCGO!qqM0V(n#Mx9ahp?dvxZ~r}s6(^xE%dbC zzY!e%^qhK)Stk9|f;F9;NQni=@W=GR4H)hs&ocb5>P;p8sg3t{c2IbKA*J&n#uq%B z?fpgvT=l@)#Y9C%8;1!00`u4nPB0ZAcpZ#gJoJc4B|@a4(Gp>YMGA@K6oXVas39BnD$d5E~VaOT2HmR%|*1VjMkOSH5zi5t}~W!aOIM1}n(NXAc}CMoKF1o>$P zeT9Jc*M~08JJ7&1P_g8%mr)g_I3Q;(8@pq(fjRteln3cA0>rEk5y} zpA04SUj@!=xa>DyCV+JfU(RX88~q{eeoC=1A*1YVn!ZvphnOQ}BK$4ezM`$LFccl& zSgS7t*5cK~{KpLs)k)lPDm%Z#Lu370iir$X}@RWTw0_T=`J zkloqcM@**UgZ*tnP>KCR8*HY}ehQP6rj5L<+CDD`zx6Bmeq2kFwm&{7$pEM%7ShN0 zhn-*-4+1v<$JZ8VX*BkXnqcCIpE^bgp)v1D(&m*gNuD0bKjOBJjF*$*I3}~)PgwyY zHKL=vL%QjPmP$nMpa8W;IB7M}qG@hS z0wM@VuG}906xn1LDaQa2na{%>JfA;pH(J?oVgTpZg(LWBbCK9)C9ynqm&dPmF0LnY zyik6n_CEy?w3vI{rL&pRYz`j=T5u5T*w*v{tE?NG^>f-$7&C+eYh0x_&7x-o;x)3= zV}Z}6^BdSHl%DQ>DM(iX#uvN*dLh4t2&B7YSk}tQN0xGaP_vH7{yqM0@IKH@Tr33c zpY;7`7zFtZx+zv>w7B!l?MEjowtkNqUg^@jnYsTql2z|#2urcFlO{!Wk3l)@{kR!B zWU3i^oWAS@x8CMLV_t2bA8BA39REgyB~)s8bUb<+Hq~=n46l9qfbP5?tS%thBr@~V zsra%WOdg5E#!HKoER{K0G^ryuSm2pUlGJ>B77(M|qfTALn#UQ;$$%kIK;CA3AU5%F zff|M8Qe)1dY1&1N3pXIvQM48Ev;KreHUGX10OMkG7v@7U7B*A2#{sJJA>|BhFRLL) zD{1c@7xOHF&kVbOeMd_my#nudvVfc7^TW&zAMEF3>)iku7AusJRPFpPH5mmb7HSJ~_%S@^BoV+rykFUTh^6i@Y+b=+5<{<6J zgdUlGrdHvSfbB*Ok)lf3Z?f;L?!f`qsN}pDUfexl^oPqG%iltjw5fO~y7YvK_UDDo zm%%P@1gY2CHvFacUC(BR+b?JM2qHV*r`64mmG|O{Uwd(;ho~{c!gZc*6p#kT+D4@C#xvS}3dn;*dw0-^ZZ7=FU zOZ+p!Ei!meiRaUT48c-J%3j`*l2~QNghl-0zcUa=Z$qIXD#+P-z?#B`Fr?=E{j+oQG`J0F= zB5_wJDRzzfx;LFsuQ4lvf73A-`8`$;I+v(J7X#*(qTJdOO|f)5X&6=fyJ!UP=OmB? z7^K8I*7#(`RXDX%27KlHM>x9}&#<7N-}O=C`Q?KSSbJWvM%!%ebR9T&9_8mVn#b*7 z+2@KkKVxIyj%E=|%9x_H&|#Er5PSPeEi)H~Lz7(P*F!DGW$q#s1t(Ev&CXHhx5*mv zO;%Ls?|GnuE_8L6?LU$m7(lD4RQBr@qg8u2zwLil0z2ed|0-t`5Dyov2!IvrHB_u; z1c@P_-Wo29UED8H#GDSOamyD2!s*w&XU!S4m6#gk$WTgdSQ-EY+rP(M(TS}lN1(1t^}s?P{LNJF8e2j5pp3^2Ransk9{5Xo>TZJy-KRZr_HSdQ7`f7@wU&3@Wx>U_}MY`u+>j(znD z;Ar($AOgB4E{g0Lf6P;16S}Iv;C%wR@gSC72&X8&<7ogI@WTbA+BV&YJZC?5ZTt5L zKw9gp6qkPeDKm?X=y^#=|4~G6KlRjSW>wLA2rZ4wSRBrdccfs$8}1Jev=;A5P9sj_ zvcz621mLXpQu_=~1T&{e_DGIOS?1M|w>K2VH#;v*WVS6#tT(6y4VJp#$vv=AfKKY` zt6-ogVIB!RjjgATr|cx<7+L@_JvRI%P3Z&0z}~W zjgVQ^1fmg_nq4jbzV1CFOOi#XP)Xy^Yf#k@`h*pVVlQCG68t?0?hO_}K!K!uny5b$ zSJ(fC-IB&SruB0)KVMeBQO^-h)vv(u@g6YZB!mY3LtW`a(nOpomU`#!i0lY2d15K3 zQ01hYC;Ne=vw>d&O)gJFgb+td25SUNDZsGW46GzQeba=__ay+1j*_ue3x&See(nLq zwbz=>q{W|c8SaAL{0|@6^&f*l{bh6o5Y>@f@bY65=N!tbYcdMz)>3xT`oFUGamwtPtJQ3AKqFX?ZQ zu}gW4*mRinXGsycRvz*sQP-MIzh11GlA)1K*q4h;Q&Sg&5D!Dszv_`mq3cr~DFg#l z{X+#zy*OjGSy2TFL#gujYPN09$^66mK6innzBkj-*>78cF~aWGQInmo=XPGNx?T6@ zhOdFrA6u`NA3b)Rtgdeq7=8%X*dQ+-VC&+Yq2bTGBv4}6$@}mIuVe}bST9aar4E{9 zq3!=RI7Y*gaUc3~kaZ761#n=Rzi~C}qQpyMYRn2!mXphgb(QB(6?b&V!1@TP3?tcOe)sSmMP0OT@r8pVnEPy#EPDb07X5Z&tRYXRRygt9tpr zd$Q%-S~D&Qz$R$!LdAu``LG46rJgo@il*E2FNgMO@fJs^Q%`5MU7w0ed zlIX~+oQxMvzmwo;jVh#pwuX|9xDcKII$lQ@E8!cHPRmbb_MQv&o~*36V)Kjk@)yYD`aeM8jy1|H4@qRtP33swV)+rkI-f1)Z zwcB4l_{v{e>o|UMn|A|QFDB-(=MAIFDs_yo#}nOXCtAvzVl`Gx@?f}znK>N(W^`sy z#)k6s2RN4M60MD&;Z~Q01fpUsF?2qr}d``wz+d5oBoB_)ea(5s%}pbxFHmN zd7h+&dVAX~_kFzf-1L6517BBz?+v@|qq<%ibT7dW+2!yR&34_voF^7qfl_4yPb4Bq zbZeGjaRy-t9*R-$OK<8@gyB$N- z#=~*UB<7CtH<_vUWR#!do5Ug#RzL@m0K_yftB@=khPun`{=;IsMBzVp_8F(Ie61Pj z9?W!6?9Dy6n|%{a)EU zjNdo{{`!9*5_nfnbU;p9J`56?X3Bk!09K?diTTBc z)44?8RB8!&awlb;g?bzf@hPM=fDiZ~N6z;j807aT^wy^2`_?mi3BHo{eTV2i)!>Jy zE|0g5!LE-?$PwkijmbkPNS64VH-+DU5^Y5mnubc@w;j|M`1$i{wGj9Ym!$nLi$5BJ z*XhFzLq+!#d6rJpW*$Z)vhOHN(jcP(ABZHh`)?A>oOd4mv?=+wxUjplBdw1HFI0Ld zf#zFn>^&|>#GvqY@cNYYK9^B1fWMDz(QM?$8i@pJU8ar6xeR6|GVMGo>TkNY=il?C zFb%Q3Td#z`ULr%`C-*3PlAPe@i4)$8Z^$O*%s*+eQ3*{IxPT8PrngrjmSc4EU%;7%U0cdnF)>ZBY&~ zlG{puNgA%<)?$c&EGpX`J0Wgb$JO}zb$wpG^pREF*EXC9!TYpo-@|v7_UpHKj!a1i z8BzfwLmyf(R9QoZ{Ta^8eImIg$ zMh)2ql*P(Dp7q`&Zv@X*J^}VG98qkZST8>t|Is@2Z@fSHo|Arju=u>pX1_nV39Axb zbr^y#9)0f~!B=SDD?9L4<1PNpr-AH`tLjeh-O^B<^$rw3Qn`U8&${Ne$?>X*1bA4E z|7S}|!t3)iZRq>*pf+gB`5*u&`}+e`2XyWfi-~ebvjjB#9J-FNj!eMOg8j#>)jzWZ zkEtD*GvPqv-pQI;>;30;Vp!z?QfCIt3IrqM-tmeyn|=ZpiF$uZK`af!ROMT^quvF& zZrsv^m&lbpsrAnNisOoStE;4B*2HA(h3*t6V1mfMvMW>@8*5#8lQ*e~sln#q1_~Ip zco6x6@v(1m#X^OqitT*GoNXkv>M5^JZPb7g5+UZ~J0ADm_4Z_qS1jPA!g*Ib0;ZFw z$d-$GD9UvELm>nJBtCmZ4g8C?x2I{1pG31AeAgPG?fX))XSLc{@?i)4`VF zP~e!>F1)pBeJYh#_QHPfHTX$dUbG#PQQ0Xp0XsyI0ZzDg&i5JJzr=s}HNE%X_l(*3B+{DH!qbIMb;0w;-Qk>@j@5p_?Mp^K9D?8W0luu{++Q z_{|1&<}2z^tkQMj^B3pHOJb!@K^u6T%oX>>dLHdduB*yJJHK*wMxVnq>@9;vKvrB$ z`kK1LR8_eSQ2&7>5KPkRk${r?@(8Z#Dso%@WR0bE1mJ0*3w&2B{QivQ^T_iL#^ZJR z@?*fQ^R`L&CBzqe+6B4qURFupuM*H86XT{gII1=-!g`30;N3r6P{}wF_F^3^CL#?L z&RHtCldIkI>}ne~I#V~Y@j?~imhnT(MFR2~;U`D3^pX)pu>xf4)CZAko>2tt^U5XH zs2RGx0->31DV$ zf3{r~E*knCf4n|FC+nt0Wal#Pn?K+Rz8v|(XF;R^wV1AGL9fZu2L8jU5V*PZ={XWH zoj^@4dB^YydYZP609Zm0Zy{M+-8TfkWDz<9_)n7j2{hGVx~cG5-2=7wn26r?+0Ntc z^F-@X8?DfQq(WXZZ7<9z0DR2j7&LLO)F^UyPD_Qe=zSfcgT1Ro0Oj!#uj>cW1{}S0 z!2xej*NG_5en#_&&(?0^dWth$?XL7??oYmzmWz9!f6#!4c3Tu^hO+?^VBS&{Csh(p zf5fRm1L>h`B}U0sL^y=ayExs^0vp7uEFag9?9l&D0J}EqseeIF1D6Doz zz+WbG!1r%{n9@?}EPG|O>E?O%bAwygE#al_<1ubFDG3Z{;wPzuv<`k}6~<6WqJCet z8LL6$PJIY=H-QtDuwpS&{IFA`PCNn|Q)+tnnj_Kw7&-@sI{P?^KR2&h_M4Y&+gx@n zEZbPEZmm_zwr#t`W!tXBW%IuGZ+M=c&i9^vmL``Ab*50Q1 zJAI|XS23f4_ewjjy6g5V0K)$c`GMa3A_80vLI;17#vefMS7eYK*{#R>7U+%`0Kpf9 zJPna`d0D(j&s2RUq|I*kYf)zJ!-fZ?CZFjpH^81;US6WP1Vuj>>Xu9Yv6wcIUa5PI zeG-MCzaHkAe7^eA`)Z8IP7j`oO<8x*k5$J66cw=N>65<<1R8PNveI)YVTX(DIgXbY zYSPu%Z(jq)%uf#QL(HmpL)!b7>U#d)Tf|#e8#0<68cV*ucyd63v_Jc& zk;I8B0DH$VXWd!LTmO8zqqqxWVQ?MwYrP=vFLW?n*UySAEO`&znSjar_&@}i@MYf* zpyz8%AP}>4GpsClIB6sZt1dIQoz92f-z2@k6-W5pr6kjIZaAB`u0183mNv5Kv`Wh7 z!$e>IW88Z4{w>^5T~T4I6Bm$h2A~8%V1NY>m%31A zL8Zs4qlh+GV7ySqfj!Cq2?M1*y1(YZUpQuqTW-A7r7)y2S65i}P+V44QnE@5=0#8( z>;ha~j@f9LRD%mtH*hXtDbvH+XAwRP30{tH94=n+3jN5vuWO`8uH>@>El<{y3YWHz{j4643C?vEgG1|6?Ff{ zkJ8m#;=)|+fJqEulrTJp{lxQ)xIa!oL*bhf&tcx ztJEO?N(|YBpm(5W&(RLa&`ZX1GD{JMMu?g|YaAM74)<`v&yz8!YC9hK4}b)KqB3{; z+Jj^>hFY97IU@c!$nvpA0m0a+*?R61(XVY8HA9WcUHbv|2IcHtgO6|k5=nfg*vGQ} z0303scwidHF&xwjzak%XS5t^}OOZg9dgS~2@Zz|_U(iI%E*M+FU@u@~!;XjZIp+e3 z*c{gr>TJqft4Ua;`H_YSC<%TZhLucHiAr9B?utU*QmzG6{4V4W~_-0g}P*H7Prz5yQaO@RVRaL}X;1fRb>CuhH0du{Q)oa1kH3H0H8SakTbUMz{(!hNit zAxn;MSpl*<6w#R^#khhh4um_mNP)gKH<>;+BM<53Omz;dIwZA7J#2HQd~HT5qUy=G zBY2BrkcFr65zB?m@RbZa`yMos?`JiT-4fB4m8pQstBWqkjO<0gb%*FH1yb%;$i*G! zX3X2apJgtMS<=p zDvk_TU=+aKqK#8pH7Ik2bpemRPnfS^M_|Ew4qff+IHFmBi zl(o
  • ); } diff --git a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx index 0e9b92a5d7..3cf1d813fb 100644 --- a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx +++ b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx @@ -1,8 +1,8 @@ import { Callout } from "nextra/components"; -# Auth-disabled (dev) images +# Auth-disabled dev images -Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or minting your own API token. +Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or creating your own API token. The dev images are for local development and testing only. @@ -16,10 +16,10 @@ Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `h ## Workers still use an API token -The gRPC engine is unchanged - workers and SDK clients still authenticate with an API token. The dev images embed a fixed keyset and mint a default token signed by it, so you don't have to create one: +The gRPC engine is unchanged - workers and SDK clients still authenticate with an API token. The dev images embed a fixed keyset and creates a default token signed by it: - The keyset is embedded (via `go:embed`) only in dev builds. The regular images never compile it in, so the default token is inert against any normal deployment. -- The token is scoped to the seed default tenant. +- The token is scoped to the seeded default tenant. Point your worker at it via `HATCHET_CLIENT_TOKEN`. @@ -33,7 +33,7 @@ hatchet server start --disable-auth To run it yourself, follow the [Hatchet Lite](/self-hosting/hatchet-lite) guide but swap the image for `ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest`. The dev image still needs an external Postgres and the usual server configuration - the only difference is that authentication is compiled out. -On startup the container mints the default worker token, prints it, and writes it to the config volume. Grab it from the logs or the volume: +On startup the container creates the default worker token, prints it, and writes it to the config volume. Grab it from the logs or the volume: ```sh docker logs # printed under "authdisabled build: worker API token" From 89882df88c83a2170782485650c00b663a9119e4 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Mon, 6 Jul 2026 10:13:42 +0200 Subject: [PATCH 26/48] UI changes for no auth mode --- api/v1/server/authz/middleware.go | 7 ++- .../app/src/components/v1/nav/top-nav.tsx | 28 ++++++----- .../app/src/hooks/notifications/onboarding.ts | 18 ++++++- frontend/app/src/hooks/use-auth-disabled.ts | 8 +++ frontend/app/src/pages/main/v1/index.tsx | 5 +- .../components/learn-workflow-section.tsx | 49 ++++++++++++++++++- .../app/src/pages/main/v1/overview/index.tsx | 47 ++++++++++-------- .../app/src/pages/main/v1/side-nav-items.tsx | 27 ++++++---- .../v1/tenant-settings/api-tokens/index.tsx | 20 ++++++++ 9 files changed, 161 insertions(+), 48 deletions(-) create mode 100644 frontend/app/src/hooks/use-auth-disabled.ts diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 42c0a38875..efb3889206 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -88,7 +88,9 @@ func (a *AuthZ) handleCookieAuth(c echo.Context, r *middleware.RouteInfo) error return nil } -// identity/membership mutations blocked in authdisabled builds (on top of the Allow* runtime flags) +// identity/membership mutations and API token management are blocked in authdisabled builds +// (on top of the Allow* runtime flags). The only token in an authdisabled instance is the +// embedded-keyset worker token minted at boot; users cannot create, list, or revoke tokens. var authDisabledDeniedOperations = []string{ "TenantInviteAccept", "TenantInviteReject", @@ -96,6 +98,9 @@ var authDisabledDeniedOperations = []string{ "TenantInviteDelete", "TenantMemberUpdate", "TenantMemberDelete", + "ApiTokenCreate", + "ApiTokenList", + "ApiTokenUpdateRevoke", } var restrictedWithBearerToken = []string{ diff --git a/frontend/app/src/components/v1/nav/top-nav.tsx b/frontend/app/src/components/v1/nav/top-nav.tsx index 36e765b808..7534b6bf02 100644 --- a/frontend/app/src/components/v1/nav/top-nav.tsx +++ b/frontend/app/src/components/v1/nav/top-nav.tsx @@ -24,6 +24,7 @@ import { DropdownMenuTrigger, } from '@/components/v1/ui/dropdown-menu'; import { HatchetLogo } from '@/components/v1/ui/hatchet-logo'; +import useAuthDisabled from '@/hooks/use-auth-disabled'; import { useBreadcrumbs } from '@/hooks/use-breadcrumbs'; import useCloud from '@/hooks/use-cloud'; import { useTenantDetails } from '@/hooks/use-tenant'; @@ -65,6 +66,7 @@ function AccountDropdown({ user }: { user?: User }) { const [open, setOpen] = React.useState(false); const { logoutMutation } = useUserUniverse(); const { theme, setTheme } = useTheme(); + const authDisabled = useAuthDisabled(); if (!user) { return null; @@ -122,17 +124,21 @@ function AccountDropdown({ user }: { user?: User }) { ))} - - logoutMutation.mutate()} - disabled={logoutMutation.isPending} - > - - {logoutMutation.isPending ? 'Logging out...' : 'Log out'} - ⇧⌘Q - + {!authDisabled && ( + <> + + logoutMutation.mutate()} + disabled={logoutMutation.isPending} + > + + {logoutMutation.isPending ? 'Logging out...' : 'Log out'} + ⇧⌘Q + + + )} ); diff --git a/frontend/app/src/hooks/notifications/onboarding.ts b/frontend/app/src/hooks/notifications/onboarding.ts index bc354acb24..17c5eb001d 100644 --- a/frontend/app/src/hooks/notifications/onboarding.ts +++ b/frontend/app/src/hooks/notifications/onboarding.ts @@ -1,4 +1,5 @@ import { Notification } from './types'; +import useAuthDisabled from '@/hooks/use-auth-disabled'; import { queries } from '@/lib/api'; import { useUserUniverse } from '@/providers/user-universe'; import { appRoutes } from '@/router'; @@ -11,6 +12,7 @@ function exactlyOneElement(array: T[]): array is [T] { export const useOnboardingNotifications = () => { const { tenantMemberships } = useUserUniverse(); + const authDisabled = useAuthDisabled(); const tenants = useMemo( () => @@ -30,7 +32,7 @@ export const useOnboardingNotifications = () => { const tokenQuery = useQuery({ ...queries.tokens.list(tenantId), - enabled: hasOneTenant, + enabled: hasOneTenant && !authDisabled, }); const isLoading = workflowQuery.isLoading || tokenQuery.isLoading; @@ -41,6 +43,11 @@ export const useOnboardingNotifications = () => { return []; } + // Auth-disabled instances have no API-token onboarding step + if (authDisabled) { + return []; + } + const hasWorkflows = (workflowQuery.data?.rows?.length ?? 0) > 0; const hasTokens = (tokenQuery.data?.rows?.length ?? 0) > 0; @@ -58,7 +65,14 @@ export const useOnboardingNotifications = () => { url: appRoutes.tenantOverviewRoute.to.replace('$tenant', tenantId), }, ]; - }, [hasOneTenant, isLoading, tenantId, workflowQuery.data, tokenQuery.data]); + }, [ + hasOneTenant, + isLoading, + tenantId, + workflowQuery.data, + tokenQuery.data, + authDisabled, + ]); return { notifications, diff --git a/frontend/app/src/hooks/use-auth-disabled.ts b/frontend/app/src/hooks/use-auth-disabled.ts new file mode 100644 index 0000000000..0f7893d39c --- /dev/null +++ b/frontend/app/src/hooks/use-auth-disabled.ts @@ -0,0 +1,8 @@ +import useApiMeta from '@/pages/auth/hooks/use-api-meta'; + +// True when the instance is an authdisabled build. authDisabled only exists on APIMeta +// (not APIControlPlaneMetadata), so narrow before reading it. +export default function useAuthDisabled(): boolean { + const { meta } = useApiMeta(); + return Boolean(meta && 'authDisabled' in meta && meta.authDisabled); +} diff --git a/frontend/app/src/pages/main/v1/index.tsx b/frontend/app/src/pages/main/v1/index.tsx index 574bd5f89f..bf9df5c68a 100644 --- a/frontend/app/src/pages/main/v1/index.tsx +++ b/frontend/app/src/pages/main/v1/index.tsx @@ -3,6 +3,7 @@ import { sideNavItems } from './side-nav-items'; import { ThreeColumnLayout } from '@/components/layout/three-column-layout'; import { SidePanel } from '@/components/v1/nav/side-panel'; import { Loading } from '@/components/v1/ui/loading'; +import useAuthDisabled from '@/hooks/use-auth-disabled'; import useCloud from '@/hooks/use-cloud'; import { useOrganizations } from '@/hooks/use-organizations'; import { useTenantDetails } from '@/hooks/use-tenant'; @@ -23,6 +24,7 @@ export function MainShell({ children }: { children?: ReactNode }) { const { cloud, featureFlags, isCloudEnabled } = useCloud(tenantId); const managedWorkerEnabled = featureFlags?.['managed-worker'] === 'true'; const { getOrganizationIdForTenant } = useOrganizations(); + const authDisabled = useAuthDisabled(); const queryClient = useQueryClient(); const orgId = isCloudEnabled ? tenantId @@ -47,8 +49,9 @@ export function MainShell({ children }: { children?: ReactNode }) { managedWorkerEnabled, isCloudEnabled, orgId, + authDisabled, }), - [cloud?.canBill, managedWorkerEnabled, isCloudEnabled, orgId], + [cloud?.canBill, managedWorkerEnabled, isCloudEnabled, orgId, authDisabled], ); const childCtx = useContextFromParent({ diff --git a/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx b/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx index 2b12458741..413f94353f 100644 --- a/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx +++ b/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx @@ -9,7 +9,11 @@ import { TabsTrigger, } from '@/components/v1/ui/tabs'; import { TriggerWorkflowForm } from '@/pages/main/v1/workflows/$workflow/components/trigger-workflow-form'; -import { CheckIcon, ChevronRightIcon } from '@radix-ui/react-icons'; +import { + CheckIcon, + ChevronRightIcon, + ExternalLinkIcon, +} from '@radix-ui/react-icons'; import { useEffect, useState, type ReactNode } from 'react'; export const workflowStepOptions = { @@ -50,6 +54,7 @@ export function LearnWorkflowSection({ onFinish, installMethod, onInstallMethodChange, + authDisabled, }: { tenantName?: string; selectedTab: WorkflowStepKey; @@ -69,6 +74,7 @@ export function LearnWorkflowSection({ onFinish: () => void; installMethod: InstallMethod; onInstallMethodChange: (installMethod: InstallMethod) => void; + authDisabled?: boolean; }) { const profileName = tenantName?.trim() || 'local'; const escapeForDoubleQuotes = (value: string) => @@ -167,7 +173,46 @@ export function LearnWorkflowSection({ }, { ...workflowStepOptions.profile, - content: ( + content: authDisabled ? ( + <> +

    + Authentication is disabled, but workers still authenticate over gRPC + with an API token. +

    +

    + Use the default token printed when the server started (also written + to the config volume), then add it to a CLI profile: +

    + "`} + language="shell" + copy + /> +
    + How to retrieve the token + + + + + ) : ( <>

    Add a Hatchet CLI profile using an API token. diff --git a/frontend/app/src/pages/main/v1/overview/index.tsx b/frontend/app/src/pages/main/v1/overview/index.tsx index dcec1bbef9..2b05634b52 100644 --- a/frontend/app/src/pages/main/v1/overview/index.tsx +++ b/frontend/app/src/pages/main/v1/overview/index.tsx @@ -11,6 +11,7 @@ import { import { SupportSection } from './components/support-section'; import { TokenSuccessDialog } from './components/token-success-dialog'; import { useAnalytics } from '@/hooks/use-analytics'; +import useAuthDisabled from '@/hooks/use-auth-disabled'; import { useCurrentUser } from '@/hooks/use-current-user'; import { useTenantDetails } from '@/hooks/use-tenant'; import api, { CreateAPITokenRequest, queries } from '@/lib/api'; @@ -28,6 +29,7 @@ const EXPIRES_IN_OPTIONS = { export default function Overview() { const { tenant, tenantId } = useTenantDetails(); const { currentUser } = useCurrentUser(); + const authDisabled = useAuthDisabled(); const navigate = useNavigate(); const { capture } = useAnalytics(); const [tokenName, setTokenName] = useState(''); @@ -189,6 +191,7 @@ export default function Overview() { onLanguageChange={setLanguage} installMethod={installMethod} onInstallMethodChange={setInstallMethod} + authDisabled={authDisabled} profileToken={profileToken} isGeneratingProfileToken={createProfileTokenMutation.isPending} profileTokenError={profileTokenError} @@ -220,27 +223,29 @@ export default function Overview() { }} /> - { - setHasEditedTokenName(true); - setTokenName(value); - setFieldErrors({}); - }} - expiresIn={expiresIn} - expiresInOptions={EXPIRES_IN_OPTIONS} - onExpiresInChange={setExpiresIn} - onExpiresInSelected={(label) => { - capture('onboarding_token_expiration_selected', { - tenant_id: tenantId, - user_email: currentUser?.email, - expiration: label, - }); - }} - fieldErrors={fieldErrors} - isGenerating={createTokenMutation.isPending} - onGenerateToken={handleGenerateToken} - /> + {!authDisabled && ( + { + setHasEditedTokenName(true); + setTokenName(value); + setFieldErrors({}); + }} + expiresIn={expiresIn} + expiresInOptions={EXPIRES_IN_OPTIONS} + onExpiresInChange={setExpiresIn} + onExpiresInSelected={(label) => { + capture('onboarding_token_expiration_selected', { + tenant_id: tenantId, + user_email: currentUser?.email, + expiration: label, + }); + }} + fieldErrors={fieldErrors} + isGenerating={createTokenMutation.isPending} + onGenerateToken={handleGenerateToken} + /> + )} diff --git a/frontend/app/src/pages/main/v1/side-nav-items.tsx b/frontend/app/src/pages/main/v1/side-nav-items.tsx index 070f8554a6..a2084cf21b 100644 --- a/frontend/app/src/pages/main/v1/side-nav-items.tsx +++ b/frontend/app/src/pages/main/v1/side-nav-items.tsx @@ -24,6 +24,7 @@ export function sideNavItems(opts: { managedWorkerEnabled?: boolean; isCloudEnabled?: boolean; orgId?: string; + authDisabled?: boolean; }): SideNavSection[] { return [ { @@ -279,16 +280,22 @@ export function sideNavItems(opts: { /> ), }, - { - key: 'settings-api-tokens', - name: 'API Tokens', - to: appRoutes.tenantSettingsApiTokensRoute.to, - icon: ({ collapsed }: { collapsed: boolean }) => ( - - ), - }, + // API tokens are unavailable in authdisabled instances (the only token is the + // embedded-keyset worker token minted at boot). + ...(opts.authDisabled + ? [] + : [ + { + key: 'settings-api-tokens', + name: 'API Tokens', + to: appRoutes.tenantSettingsApiTokensRoute.to, + icon: ({ collapsed }: { collapsed: boolean }) => ( + + ), + }, + ]), ...(opts.canBill && opts.orgId ? [ { diff --git a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx index cdfed3beec..99def18308 100644 --- a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx +++ b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx @@ -7,6 +7,7 @@ import RelativeDate from '@/components/v1/molecules/relative-date'; import { SimpleTable } from '@/components/v1/molecules/simple-table/simple-table'; import { Button } from '@/components/v1/ui/button'; import { Dialog } from '@/components/v1/ui/dialog'; +import useAuthDisabled from '@/hooks/use-auth-disabled'; import { useCurrentTenantId } from '@/hooks/use-tenant'; import api, { APIToken, CreateAPITokenRequest, queries } from '@/lib/api'; import { useApiError } from '@/lib/hooks'; @@ -15,11 +16,13 @@ import { useState, useMemo } from 'react'; export default function APITokens() { const { tenantId } = useCurrentTenantId(); + const authDisabled = useAuthDisabled(); const [showTokenDialog, setShowTokenDialog] = useState(false); const [revokeToken, setRevokeToken] = useState(null); const listTokensQuery = useQuery({ ...queries.tokens.list(tenantId), + enabled: !authDisabled, }); const tokenColumns = useMemo( @@ -55,6 +58,23 @@ export default function APITokens() { [], ); + if (authDisabled) { + return ( +

    +
    + + +
    +
    + ); + } + return (
    From e3da4feebb009c689c0103a9af7ad69581590089 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Mon, 6 Jul 2026 16:29:12 +0200 Subject: [PATCH 27/48] embed the JWT itself for auth disabled mode --- .../openapi/components/schemas/metadata.yaml | 4 + api/v1/server/handlers/metadata/get.go | 6 + api/v1/server/oas/gen/openapi.gen.go | 730 +++++++++--------- cmd/hatchet-admin/cli/seed/seed.go | 40 + cmd/hatchet-admin/cli/token.go | 13 +- .../layout/auth-disabled-banner.tsx | 43 +- .../src/lib/api/generated/data-contracts.ts | 5 + .../components/learn-workflow-section.tsx | 23 +- .../app/src/pages/main/v1/overview/index.tsx | 5 + .../self-hosting/auth-disabled-images.mdx | 9 +- .../token/token_embedded_authdisabled_test.go | 34 + pkg/authmode/authdisabled.go | 5 + pkg/authmode/default.go | 2 + pkg/authmode/keyset/gen/main.go | 71 ++ pkg/authmode/keyset/token.jwt | 1 + pkg/authmode/token.go | 12 + pkg/client/rest/gen.go | 3 + pkg/config/loader/loader.go | 19 +- 18 files changed, 626 insertions(+), 399 deletions(-) create mode 100644 pkg/auth/token/token_embedded_authdisabled_test.go create mode 100644 pkg/authmode/keyset/gen/main.go create mode 100644 pkg/authmode/keyset/token.jwt create mode 100644 pkg/authmode/token.go diff --git a/api-contracts/openapi/components/schemas/metadata.yaml b/api-contracts/openapi/components/schemas/metadata.yaml index 4fb4be77dd..b932aca9df 100644 --- a/api-contracts/openapi/components/schemas/metadata.yaml +++ b/api-contracts/openapi/components/schemas/metadata.yaml @@ -37,6 +37,10 @@ APIMeta: type: boolean description: whether or not authentication is disabled (authdisabled build) on this instance example: false + authDisabledToken: + type: string + description: the embedded worker API token, only set on authdisabled builds + example: eyJhbGciOiJFUzI1NiIs... APIMetaAuth: type: object diff --git a/api/v1/server/handlers/metadata/get.go b/api/v1/server/handlers/metadata/get.go index 41f0942f66..f5ec6431e9 100644 --- a/api/v1/server/handlers/metadata/get.go +++ b/api/v1/server/handlers/metadata/get.go @@ -54,5 +54,11 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR AuthDisabled: &authDisabled, } + if authDisabled { + if embeddedToken := authmode.EmbeddedToken(); embeddedToken != "" { + meta.AuthDisabledToken = &embeddedToken + } + } + return gen.MetadataGet200JSONResponse(meta), nil } diff --git a/api/v1/server/oas/gen/openapi.gen.go b/api/v1/server/oas/gen/openapi.gen.go index 60483f9059..33708b3013 100644 --- a/api/v1/server/oas/gen/openapi.gen.go +++ b/api/v1/server/oas/gen/openapi.gen.go @@ -428,6 +428,9 @@ type APIMeta struct { // AuthDisabled whether or not authentication is disabled (authdisabled build) on this instance AuthDisabled *bool `json:"authDisabled,omitempty"` + // AuthDisabledToken the embedded worker API token, only set on authdisabled builds + AuthDisabledToken *string `json:"authDisabledToken,omitempty"` + // ObservabilityEnabled whether or not observability (trace collection) is enabled on this instance ObservabilityEnabled *bool `json:"observabilityEnabled,omitempty"` Posthog *APIMetaPosthog `json:"posthog,omitempty"` @@ -17542,369 +17545,370 @@ func (sh *strictHandler) WorkflowVersionGet(ctx echo.Context, workflow openapi_t // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "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", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/cmd/hatchet-admin/cli/seed/seed.go b/cmd/hatchet-admin/cli/seed/seed.go index 1a3fd59a1c..67ef5723e8 100644 --- a/cmd/hatchet-admin/cli/seed/seed.go +++ b/cmd/hatchet-admin/cli/seed/seed.go @@ -4,10 +4,12 @@ import ( "context" "errors" "fmt" + "time" "github.com/google/uuid" "github.com/jackc/pgx/v5" + "github.com/hatchet-dev/hatchet/pkg/authmode" "github.com/hatchet-dev/hatchet/pkg/config/database" v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/validator" @@ -100,5 +102,43 @@ func SeedDatabase(dc *database.Layer) error { } } + if authmode.Disabled { + if err := seedAuthDisabledToken(dc); err != nil { + return err + } + } + return nil } + +// seedAuthDisabledToken registers the embedded token's row so it passes the DB check in +// ValidateTenantToken. Idempotent. +func seedAuthDisabledToken(dc *database.Layer) error { + ctx := context.Background() + + tokenID, err := uuid.Parse(authmode.EmbeddedTokenID) + if err != nil { + return fmt.Errorf("invalid embedded token ID: %w", err) + } + + if _, getErr := dc.V1.APIToken().GetAPITokenById(ctx, tokenID); getErr == nil { + return nil + } + + tenantID, err := uuid.Parse(authmode.EmbeddedTokenTenantID) + if err != nil { + return fmt.Errorf("invalid embedded token tenant ID: %w", err) + } + + name := "authdisabled-default" + + _, err = dc.V1.APIToken().CreateAPIToken(ctx, &v1.CreateAPITokenOpts{ + ID: tokenID, + ExpiresAt: time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC), + TenantId: &tenantID, + Name: &name, + Internal: true, + }) + + return err +} diff --git a/cmd/hatchet-admin/cli/token.go b/cmd/hatchet-admin/cli/token.go index 660e38f564..5d48cc0f08 100644 --- a/cmd/hatchet-admin/cli/token.go +++ b/cmd/hatchet-admin/cli/token.go @@ -68,6 +68,12 @@ func init() { } func runCreateAPIToken(expiresIn time.Duration) error { + // authdisabled builds don't mint tokens; print the single embedded one. + if authmode.Disabled { + fmt.Println(authmode.EmbeddedToken()) + return nil + } + // read in the local config configLoader := loader.NewConfigLoader(configDirectory) @@ -94,13 +100,6 @@ func runCreateAPIToken(expiresIn time.Duration) error { return err } - if authmode.Disabled { - tenantId, err = uuid.Parse(srv.Seed.DefaultTenantID) - if err != nil { - return err - } - } - defaultTok, err := srv.Auth.JWTManager.GenerateTenantToken(context.Background(), tenantId, tokenName, false, &expiresAt) if err != nil { diff --git a/frontend/app/src/components/layout/auth-disabled-banner.tsx b/frontend/app/src/components/layout/auth-disabled-banner.tsx index 04549b5a1f..e477960fdd 100644 --- a/frontend/app/src/components/layout/auth-disabled-banner.tsx +++ b/frontend/app/src/components/layout/auth-disabled-banner.tsx @@ -1,13 +1,52 @@ +import { Button } from '@/components/v1/ui/button'; +import { CodeHighlighter } from '@/components/v1/ui/code-highlighter'; +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, + DialogTrigger, +} from '@/components/v1/ui/dialog'; +import useApiMeta from '@/pages/auth/hooks/use-api-meta'; import { ExclamationTriangleIcon } from '@heroicons/react/24/outline'; export function AuthDisabledBanner() { + const { meta } = useApiMeta(); + const token = + meta && 'authDisabledToken' in meta ? meta.authDisabledToken : undefined; + return (
    - You are using an authentication-disabled instance of Hatchet. + You are using an auth-disabled instance of Hatchet. + {token && ( + + + + + + + Worker API token + + Workers authenticate over gRPC with this built-in token, scoped + to the default tenant. It is the same on every auth-disabled + instance. + + + + + + )}
    ); } diff --git a/frontend/app/src/lib/api/generated/data-contracts.ts b/frontend/app/src/lib/api/generated/data-contracts.ts index 2c83899581..afcd1a57eb 100644 --- a/frontend/app/src/lib/api/generated/data-contracts.ts +++ b/frontend/app/src/lib/api/generated/data-contracts.ts @@ -1310,6 +1310,11 @@ export interface APIMeta { * @example false */ authDisabled?: boolean; + /** + * the embedded worker API token, only set on authdisabled builds + * @example "eyJhbGciOiJFUzI1NiIs..." + */ + authDisabledToken?: string; } export interface APIMetaIntegration { diff --git a/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx b/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx index 413f94353f..cd71a28162 100644 --- a/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx +++ b/frontend/app/src/pages/main/v1/overview/components/learn-workflow-section.tsx @@ -9,11 +9,7 @@ import { TabsTrigger, } from '@/components/v1/ui/tabs'; import { TriggerWorkflowForm } from '@/pages/main/v1/workflows/$workflow/components/trigger-workflow-form'; -import { - CheckIcon, - ChevronRightIcon, - ExternalLinkIcon, -} from '@radix-ui/react-icons'; +import { CheckIcon, ChevronRightIcon } from '@radix-ui/react-icons'; import { useEffect, useState, type ReactNode } from 'react'; export const workflowStepOptions = { @@ -55,6 +51,7 @@ export function LearnWorkflowSection({ installMethod, onInstallMethodChange, authDisabled, + authDisabledToken, }: { tenantName?: string; selectedTab: WorkflowStepKey; @@ -75,6 +72,7 @@ export function LearnWorkflowSection({ installMethod: InstallMethod; onInstallMethodChange: (installMethod: InstallMethod) => void; authDisabled?: boolean; + authDisabledToken?: string; }) { const profileName = tenantName?.trim() || 'local'; const escapeForDoubleQuotes = (value: string) => @@ -180,26 +178,17 @@ export function LearnWorkflowSection({ with an API token.

    - Use the default token printed when the server started (also written - to the config volume), then add it to a CLI profile: + This instance ships with a built-in token for the default tenant. + Add it to a CLI profile:

    "`} + )}" --token "${authDisabledToken ?? ''}"`} language="shell" copy /> - - How to retrieve the token - - - - - - Worker API token - - Workers authenticate over gRPC with this built-in token, scoped - to the default tenant. It is the same on every auth-disabled - instance. - - - - - + {tenantId && ( + )} +
    ); } diff --git a/frontend/app/src/pages/authenticated.tsx b/frontend/app/src/pages/authenticated.tsx index d045922d33..823688376a 100644 --- a/frontend/app/src/pages/authenticated.tsx +++ b/frontend/app/src/pages/authenticated.tsx @@ -91,6 +91,13 @@ function AuthenticatedInner() { isLoading: isUserLoading, } = useCurrentUser(); const [lastTenant, setLastTenant] = useAtom(lastTenantAtom); + const [authBannerDismissed, setAuthBannerDismissed] = useState(() => { + try { + return localStorage.getItem('auth-disabled-banner-dismissed') === 'true'; + } catch { + return false; + } + }); const [newTenantModalOpen, setNewTenantModalOpen] = useState(false); const [defaultOrganizationId, setDefaultOrganizationId] = useState< string | undefined @@ -558,8 +565,23 @@ function AuthenticatedInner() { + meta && + 'authDisabled' in meta && + meta.authDisabled && + !authBannerDismissed ? ( + { + try { + localStorage.setItem( + 'auth-disabled-banner-dismissed', + 'true', + ); + } catch { + /* empty */ + } + setAuthBannerDismissed(true); + }} + /> ) : undefined } header={ diff --git a/frontend/app/src/pages/main/v1/index.tsx b/frontend/app/src/pages/main/v1/index.tsx index bf9df5c68a..574bd5f89f 100644 --- a/frontend/app/src/pages/main/v1/index.tsx +++ b/frontend/app/src/pages/main/v1/index.tsx @@ -3,7 +3,6 @@ import { sideNavItems } from './side-nav-items'; import { ThreeColumnLayout } from '@/components/layout/three-column-layout'; import { SidePanel } from '@/components/v1/nav/side-panel'; import { Loading } from '@/components/v1/ui/loading'; -import useAuthDisabled from '@/hooks/use-auth-disabled'; import useCloud from '@/hooks/use-cloud'; import { useOrganizations } from '@/hooks/use-organizations'; import { useTenantDetails } from '@/hooks/use-tenant'; @@ -24,7 +23,6 @@ export function MainShell({ children }: { children?: ReactNode }) { const { cloud, featureFlags, isCloudEnabled } = useCloud(tenantId); const managedWorkerEnabled = featureFlags?.['managed-worker'] === 'true'; const { getOrganizationIdForTenant } = useOrganizations(); - const authDisabled = useAuthDisabled(); const queryClient = useQueryClient(); const orgId = isCloudEnabled ? tenantId @@ -49,9 +47,8 @@ export function MainShell({ children }: { children?: ReactNode }) { managedWorkerEnabled, isCloudEnabled, orgId, - authDisabled, }), - [cloud?.canBill, managedWorkerEnabled, isCloudEnabled, orgId, authDisabled], + [cloud?.canBill, managedWorkerEnabled, isCloudEnabled, orgId], ); const childCtx = useContextFromParent({ diff --git a/frontend/app/src/pages/main/v1/side-nav-items.tsx b/frontend/app/src/pages/main/v1/side-nav-items.tsx index a2084cf21b..070f8554a6 100644 --- a/frontend/app/src/pages/main/v1/side-nav-items.tsx +++ b/frontend/app/src/pages/main/v1/side-nav-items.tsx @@ -24,7 +24,6 @@ export function sideNavItems(opts: { managedWorkerEnabled?: boolean; isCloudEnabled?: boolean; orgId?: string; - authDisabled?: boolean; }): SideNavSection[] { return [ { @@ -280,22 +279,16 @@ export function sideNavItems(opts: { /> ), }, - // API tokens are unavailable in authdisabled instances (the only token is the - // embedded-keyset worker token minted at boot). - ...(opts.authDisabled - ? [] - : [ - { - key: 'settings-api-tokens', - name: 'API Tokens', - to: appRoutes.tenantSettingsApiTokensRoute.to, - icon: ({ collapsed }: { collapsed: boolean }) => ( - - ), - }, - ]), + { + key: 'settings-api-tokens', + name: 'API Tokens', + to: appRoutes.tenantSettingsApiTokensRoute.to, + icon: ({ collapsed }: { collapsed: boolean }) => ( + + ), + }, ...(opts.canBill && opts.orgId ? [ { diff --git a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx index 99def18308..af193456c0 100644 --- a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx +++ b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx @@ -6,17 +6,22 @@ import { EmptyState } from '@/components/v1/molecules/empty-state/empty-state'; import RelativeDate from '@/components/v1/molecules/relative-date'; import { SimpleTable } from '@/components/v1/molecules/simple-table/simple-table'; import { Button } from '@/components/v1/ui/button'; +import { CodeHighlighter } from '@/components/v1/ui/code-highlighter'; import { Dialog } from '@/components/v1/ui/dialog'; import useAuthDisabled from '@/hooks/use-auth-disabled'; import { useCurrentTenantId } from '@/hooks/use-tenant'; import api, { APIToken, CreateAPITokenRequest, queries } from '@/lib/api'; import { useApiError } from '@/lib/hooks'; +import useApiMeta from '@/pages/auth/hooks/use-api-meta'; import { useMutation, useQuery } from '@tanstack/react-query'; import { useState, useMemo } from 'react'; export default function APITokens() { const { tenantId } = useCurrentTenantId(); const authDisabled = useAuthDisabled(); + const { meta } = useApiMeta(); + const authDisabledToken = + meta && 'authDisabledToken' in meta ? meta.authDisabledToken : undefined; const [showTokenDialog, setShowTokenDialog] = useState(false); const [revokeToken, setRevokeToken] = useState(null); @@ -64,12 +69,16 @@ export default function APITokens() {
    - + {authDisabledToken ? ( + + ) : ( + + )}
    ); From c0ad591e965ff82ddfd8fe19eb8290f5a4c0355d Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Tue, 7 Jul 2026 19:23:54 +0200 Subject: [PATCH 30/48] test for noauth --- .github/workflows/build.yml | 16 --------- .github/workflows/test.yml | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9aa287b3b3..c8037e2395 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,22 +77,6 @@ jobs: run: docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=api --build-arg GO_BUILD_TAGS=authdisabled - name: Build engine (authdisabled) run: docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=engine --build-arg GO_BUILD_TAGS=authdisabled - - name: Assert normal admin build has auth ENABLED - run: | - docker build -f ./build/package/servers.dockerfile -t hatchet-admin:auth-guard-normal --build-arg SERVER_TARGET=admin . - if docker run --rm --entrypoint /hatchet/hatchet-admin hatchet-admin:auth-guard-normal authdisabled; then - echo "::error::normal hatchet-admin build reports auth DISABLED — GO_BUILD_TAGS is misconfigured" - exit 1 - fi - echo "normal admin build has auth enabled ✓" - - name: Assert authdisabled admin build has auth DISABLED - run: | - docker build -f ./build/package/servers.dockerfile -t hatchet-admin:auth-guard-dev --build-arg SERVER_TARGET=admin --build-arg GO_BUILD_TAGS=authdisabled . - if ! docker run --rm --entrypoint /hatchet/hatchet-admin hatchet-admin:auth-guard-dev authdisabled; then - echo "::error::authdisabled hatchet-admin build does not report auth disabled" - exit 1 - fi - echo "authdisabled admin build has auth disabled ✓" admin: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62138a35c0..2f5a65c10a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -738,3 +738,68 @@ jobs: TESTING_MATRIX_RABBITMQ_ENABLED: ${{ matrix.rabbitmq-enabled }} TESTING_MATRIX_PG_VERSION: ${{ matrix.pg-version }} RAMP_UP_DURATION_TIMEOUT: 30s + + auth-enabled: + runs-on: ubicloud-standard-8 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: '3.14' + - name: Generate docs snippets and examples + working-directory: frontend/snippets + run: python3 generate.py + - name: Build non-dev lite image + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=lite --platform linux/amd64 -t hatchet-lite-tmp:amd64 . & + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=admin --platform linux/amd64 -t hatchet-admin-tmp:amd64 . & + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=migrate --platform linux/amd64 -t hatchet-migrate-tmp:amd64 . & + wait + DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ + --build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:amd64 \ + --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \ + --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ + --platform linux/amd64 -t hatchet-lite:ci . + - name: Assert non-dev lite has auth ENABLED + run: | + set -uo pipefail + docker network create hatchet-smoke + docker run -d --name hatchet-smoke-pg --network hatchet-smoke \ + -e POSTGRES_USER=hatchet -e POSTGRES_PASSWORD=hatchet -e POSTGRES_DB=hatchet \ + postgres:15.6 + for i in $(seq 1 30); do + docker exec hatchet-smoke-pg pg_isready -U hatchet >/dev/null 2>&1 && break + sleep 2 + done + docker run -d --name hatchet-smoke-lite --network hatchet-smoke \ + -e DATABASE_URL="postgresql://hatchet:hatchet@hatchet-smoke-pg:5432/hatchet?sslmode=disable" \ + -e SERVER_GRPC_BIND_ADDRESS=0.0.0.0 \ + -e SERVER_GRPC_BROADCAST_ADDRESS=localhost:7070 \ + -e SERVER_GRPC_INSECURE=true \ + -e SERVER_AUTH_COOKIE_INSECURE=true \ + -e SERVER_AUTH_COOKIE_DOMAIN=localhost \ + -p 8888:8888 \ + hatchet-lite:ci + for i in $(seq 1 60); do + curl -fsS http://localhost:8888/api/live >/dev/null 2>&1 && break + sleep 2 + done + if ! curl -fsS http://localhost:8888/api/live >/dev/null 2>&1; then + echo "::error::non-dev lite never became ready"; exit 1 + fi + META=$(curl -fsS http://localhost:8888/api/v1/meta) + echo "$META" + if ! echo "$META" | python3 -c "import sys,json; sys.exit(0 if json.load(sys.stdin).get('authDisabled') is not True else 1)"; then + echo "::error::non-dev lite reports authDisabled=true - GO_BUILD_TAGS is misconfigured"; exit 1 + fi + CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8888/api/v1/tenants/00000000-0000-0000-0000-000000000000/workers) + if [ "$CODE" != "401" ] && [ "$CODE" != "403" ]; then + echo "::error::unauthenticated tenant request returned $CODE (expected 401/403) - auth is not enforced"; exit 1 + fi + echo "non-dev lite has auth enabled (authDisabled=false, unauthenticated request rejected with $CODE)" + - name: Dump lite logs on failure + if: failure() + run: docker logs hatchet-smoke-lite 2>&1 | tail -100 || true From f5dfd4e80f60dfa41e969f136a9ee96b839a9c2a Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Tue, 7 Jul 2026 21:02:26 +0200 Subject: [PATCH 31/48] auth disabled test --- .github/workflows/test.yml | 46 ++------------- hack/ci/assert-auth-enabled.sh | 90 ++++++++++++++++++++++++++++++ pkg/authmode/keyset/.gitattributes | 1 + 3 files changed, 96 insertions(+), 41 deletions(-) create mode 100755 hack/ci/assert-auth-enabled.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f5a65c10a..291857b60b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -749,7 +749,7 @@ jobs: - name: Generate docs snippets and examples working-directory: frontend/snippets run: python3 generate.py - - name: Build non-dev lite image + - name: Build non-dev images run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ --build-arg SERVER_TARGET=lite --platform linux/amd64 -t hatchet-lite-tmp:amd64 . & @@ -757,49 +757,13 @@ jobs: --build-arg SERVER_TARGET=admin --platform linux/amd64 -t hatchet-admin-tmp:amd64 . & DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ --build-arg SERVER_TARGET=migrate --platform linux/amd64 -t hatchet-migrate-tmp:amd64 . & + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=api --platform linux/amd64 -t hatchet-api:ci . & wait DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ --build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:amd64 \ --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \ --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ --platform linux/amd64 -t hatchet-lite:ci . - - name: Assert non-dev lite has auth ENABLED - run: | - set -uo pipefail - docker network create hatchet-smoke - docker run -d --name hatchet-smoke-pg --network hatchet-smoke \ - -e POSTGRES_USER=hatchet -e POSTGRES_PASSWORD=hatchet -e POSTGRES_DB=hatchet \ - postgres:15.6 - for i in $(seq 1 30); do - docker exec hatchet-smoke-pg pg_isready -U hatchet >/dev/null 2>&1 && break - sleep 2 - done - docker run -d --name hatchet-smoke-lite --network hatchet-smoke \ - -e DATABASE_URL="postgresql://hatchet:hatchet@hatchet-smoke-pg:5432/hatchet?sslmode=disable" \ - -e SERVER_GRPC_BIND_ADDRESS=0.0.0.0 \ - -e SERVER_GRPC_BROADCAST_ADDRESS=localhost:7070 \ - -e SERVER_GRPC_INSECURE=true \ - -e SERVER_AUTH_COOKIE_INSECURE=true \ - -e SERVER_AUTH_COOKIE_DOMAIN=localhost \ - -p 8888:8888 \ - hatchet-lite:ci - for i in $(seq 1 60); do - curl -fsS http://localhost:8888/api/live >/dev/null 2>&1 && break - sleep 2 - done - if ! curl -fsS http://localhost:8888/api/live >/dev/null 2>&1; then - echo "::error::non-dev lite never became ready"; exit 1 - fi - META=$(curl -fsS http://localhost:8888/api/v1/meta) - echo "$META" - if ! echo "$META" | python3 -c "import sys,json; sys.exit(0 if json.load(sys.stdin).get('authDisabled') is not True else 1)"; then - echo "::error::non-dev lite reports authDisabled=true - GO_BUILD_TAGS is misconfigured"; exit 1 - fi - CODE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8888/api/v1/tenants/00000000-0000-0000-0000-000000000000/workers) - if [ "$CODE" != "401" ] && [ "$CODE" != "403" ]; then - echo "::error::unauthenticated tenant request returned $CODE (expected 401/403) - auth is not enforced"; exit 1 - fi - echo "non-dev lite has auth enabled (authDisabled=false, unauthenticated request rejected with $CODE)" - - name: Dump lite logs on failure - if: failure() - run: docker logs hatchet-smoke-lite 2>&1 | tail -100 || true + - name: Assert non-dev api and lite have auth ENABLED + run: bash hack/ci/assert-auth-enabled.sh diff --git a/hack/ci/assert-auth-enabled.sh b/hack/ci/assert-auth-enabled.sh new file mode 100755 index 0000000000..8792736025 --- /dev/null +++ b/hack/ci/assert-auth-enabled.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash +# Boots the non-dev api and lite images against Postgres and asserts authentication is ENABLED, +# i.e. the images were not accidentally compiled with the "authdisabled" build tag. +set -uo pipefail + +API_IMAGE="${API_IMAGE:-hatchet-api:ci}" +LITE_IMAGE="${LITE_IMAGE:-hatchet-lite:ci}" +ADMIN_IMAGE="${ADMIN_IMAGE:-hatchet-admin-tmp:amd64}" +MIGRATE_IMAGE="${MIGRATE_IMAGE:-hatchet-migrate-tmp:amd64}" +API_PORT="${API_PORT:-8890}" +LITE_PORT="${LITE_PORT:-8888}" + +NET=hatchet-authcheck +fail=0 + +cleanup() { + docker rm -f authcheck-api authcheck-lite authcheck-pg-api authcheck-pg-lite >/dev/null 2>&1 || true + docker volume rm authcheck-cfg >/dev/null 2>&1 || true + docker network rm "$NET" >/dev/null 2>&1 || true +} +cleanup +trap cleanup EXIT + +wait_for_url() { + for _ in $(seq 1 60); do curl -fsS "$1" >/dev/null 2>&1 && return 0; sleep 2; done + return 1 +} + +wait_for_pg() { + for _ in $(seq 1 30); do docker exec "$1" pg_isready -U hatchet >/dev/null 2>&1 && return 0; sleep 2; done + return 1 +} + +assert_auth_enabled() { + local name="$1" base="$2" meta code + meta=$(curl -fsS "$base/api/v1/meta") || { echo "::error::$name: could not fetch /api/v1/meta"; return 1; } + echo "$meta" + if ! echo "$meta" | python3 -c "import sys,json; sys.exit(0 if json.load(sys.stdin).get('authDisabled') is not True else 1)"; then + echo "::error::$name: /api/v1/meta reports authDisabled=true — a non-dev image was built with GO_BUILD_TAGS=authdisabled" + return 1 + fi + code=$(curl -s -o /dev/null -w "%{http_code}" "$base/api/v1/tenants/00000000-0000-0000-0000-000000000000/workers") + if [ "$code" != "401" ] && [ "$code" != "403" ]; then + echo "::error::$name: unauthenticated tenant request returned $code (expected 401/403) — auth is not enforced" + return 1 + fi + echo "$name: auth enabled (authDisabled=false, unauthenticated request rejected with $code)" +} + +docker network create "$NET" >/dev/null + +echo "::group::api" +docker volume create authcheck-cfg >/dev/null +docker run -d --name authcheck-pg-api --network "$NET" \ + -e POSTGRES_USER=hatchet -e POSTGRES_PASSWORD=hatchet -e POSTGRES_DB=hatchet postgres:15.6 >/dev/null +wait_for_pg authcheck-pg-api || { echo "::error::api postgres not ready"; exit 1; } +DBURL_API="postgresql://hatchet:hatchet@authcheck-pg-api:5432/hatchet?sslmode=disable" +docker run --rm --network "$NET" -e DATABASE_URL="$DBURL_API" "$MIGRATE_IMAGE" /hatchet/hatchet-migrate \ + || { echo "::error::api migrate failed"; exit 1; } +docker run --rm --network "$NET" -e DATABASE_URL="$DBURL_API" -v authcheck-cfg:/hatchet/config \ + "$ADMIN_IMAGE" /hatchet/hatchet-admin quickstart --skip certs --generated-config-dir /hatchet/config --overwrite=false \ + || { echo "::error::api quickstart failed"; exit 1; } +docker run -d --name authcheck-api --network "$NET" -e DATABASE_URL="$DBURL_API" \ + -e SERVER_MSGQUEUE_KIND=postgres -e SERVER_GRPC_INSECURE=true \ + -e SERVER_AUTH_COOKIE_INSECURE=true -e SERVER_AUTH_COOKIE_DOMAIN=localhost \ + -v authcheck-cfg:/hatchet/config -p "$API_PORT":8080 \ + "$API_IMAGE" /hatchet/hatchet-api --config /hatchet/config >/dev/null +if ! wait_for_url "http://localhost:$API_PORT/api/live"; then + echo "::error::api never became ready"; docker logs authcheck-api 2>&1 | tail -60; exit 1 +fi +assert_auth_enabled api "http://localhost:$API_PORT" || fail=1 +echo "::endgroup::" + +echo "::group::lite" +docker run -d --name authcheck-pg-lite --network "$NET" \ + -e POSTGRES_USER=hatchet -e POSTGRES_PASSWORD=hatchet -e POSTGRES_DB=hatchet postgres:15.6 >/dev/null +wait_for_pg authcheck-pg-lite || { echo "::error::lite postgres not ready"; exit 1; } +docker run -d --name authcheck-lite --network "$NET" \ + -e DATABASE_URL="postgresql://hatchet:hatchet@authcheck-pg-lite:5432/hatchet?sslmode=disable" \ + -e SERVER_GRPC_BIND_ADDRESS=0.0.0.0 -e SERVER_GRPC_BROADCAST_ADDRESS=localhost:7070 \ + -e SERVER_GRPC_INSECURE=true -e SERVER_AUTH_COOKIE_INSECURE=true -e SERVER_AUTH_COOKIE_DOMAIN=localhost \ + -p "$LITE_PORT":8888 \ + "$LITE_IMAGE" >/dev/null +if ! wait_for_url "http://localhost:$LITE_PORT/api/live"; then + echo "::error::lite never became ready"; docker logs authcheck-lite 2>&1 | tail -60; exit 1 +fi +assert_auth_enabled lite "http://localhost:$LITE_PORT" || fail=1 +echo "::endgroup::" + +exit $fail diff --git a/pkg/authmode/keyset/.gitattributes b/pkg/authmode/keyset/.gitattributes index 65fcd050fd..c20768114b 100644 --- a/pkg/authmode/keyset/.gitattributes +++ b/pkg/authmode/keyset/.gitattributes @@ -1 +1,2 @@ *.key -text +*.jwt -text From afa0eadcf3a6fa22f95bc1ebb412a9827c148b0f Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 8 Jul 2026 13:11:00 +0200 Subject: [PATCH 32/48] PR comments --- .github/workflows/pre-release.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 29 ----------------------------- api/v1/server/authn/authdisabled.go | 6 ++---- api/v1/server/authz/authdisabled.go | 19 ++----------------- api/v1/server/authz/middleware.go | 6 +++--- api/v1/server/authz/rbac.yaml | 2 ++ cmd/hatchet-admin/cli/seed/seed.go | 6 ++++++ pkg/authmode/keyset/gen/main.go | 3 +-- pkg/authmode/keyset/token.jwt | 2 +- 9 files changed, 45 insertions(+), 56 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index b5da893c9b..3ab67a0c83 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -60,6 +60,7 @@ jobs: needs: - build-push-hatchet-api-amd - build-push-hatchet-api-arm + - auth-enabled steps: - name: Get tag name id: tag_name @@ -728,12 +729,39 @@ jobs: . - name: Push to GHCR run: docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 + auth-enabled: + name: Verify auth enabled (non-dev) + runs-on: ubuntu-latest + needs: + - build-push-hatchet-api-amd + - build-push-hatchet-admin-amd + - build-push-hatchet-migrate-amd + - build-push-hatchet-lite-amd + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Assert non-dev api and lite have auth ENABLED + env: + API_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 + LITE_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 + ADMIN_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 + MIGRATE_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}}-amd64 + run: bash hack/ci/assert-auth-enabled.sh combine-hatchet-lite: name: Combine hatchet-lite runs-on: ubuntu-latest needs: - build-push-hatchet-lite-amd - build-push-hatchet-lite-arm + - auth-enabled steps: - name: Get tag name id: tag_name diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 291857b60b..62138a35c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -738,32 +738,3 @@ jobs: TESTING_MATRIX_RABBITMQ_ENABLED: ${{ matrix.rabbitmq-enabled }} TESTING_MATRIX_PG_VERSION: ${{ matrix.pg-version }} RAMP_UP_DURATION_TIMEOUT: 30s - - auth-enabled: - runs-on: ubicloud-standard-8 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.14' - - name: Generate docs snippets and examples - working-directory: frontend/snippets - run: python3 generate.py - - name: Build non-dev images - run: | - DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=lite --platform linux/amd64 -t hatchet-lite-tmp:amd64 . & - DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=admin --platform linux/amd64 -t hatchet-admin-tmp:amd64 . & - DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=migrate --platform linux/amd64 -t hatchet-migrate-tmp:amd64 . & - DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ - --build-arg SERVER_TARGET=api --platform linux/amd64 -t hatchet-api:ci . & - wait - DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \ - --build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:amd64 \ - --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \ - --build-arg HATCHET_MIGRATE_IMAGE=hatchet-migrate-tmp:amd64 \ - --platform linux/amd64 -t hatchet-lite:ci . - - name: Assert non-dev api and lite have auth ENABLED - run: bash hack/ci/assert-auth-enabled.sh diff --git a/api/v1/server/authn/authdisabled.go b/api/v1/server/authn/authdisabled.go index 5ab9965fd6..073a573973 100644 --- a/api/v1/server/authn/authdisabled.go +++ b/api/v1/server/authn/authdisabled.go @@ -9,16 +9,14 @@ import ( ) func (a *AuthN) authPreflight(c echo.Context) (handled bool, err error) { - forbidden := echo.NewHTTPError(http.StatusForbidden, "Please provide valid credentials") - ctx := c.Request().Context() user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Seed.AdminEmail) if err != nil { - a.l.Error().Ctx(ctx).Err(err).Msg("authdisabled: could not resolve default user") + a.l.Error().Ctx(ctx).Err(err).Msg("authdisabled: could not resolve the seeded admin user") - return true, forbidden + return true, echo.NewHTTPError(http.StatusInternalServerError, "authdisabled: could not resolve the seeded admin user; ensure the database was seeded (ADMIN_EMAIL/ADMIN_PASSWORD)") } c.Set("user", user) diff --git a/api/v1/server/authz/authdisabled.go b/api/v1/server/authz/authdisabled.go index 1a47bcd300..2744120b5d 100644 --- a/api/v1/server/authz/authdisabled.go +++ b/api/v1/server/authz/authdisabled.go @@ -3,30 +3,15 @@ package authz import ( - "net/http" - "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/middleware" - "github.com/hatchet-dev/hatchet/pkg/auth/rbac" ) func (a *AuthZ) authPreflight(c echo.Context, r *middleware.RouteInfo) (handled bool, err error) { - if rbac.OperationIn(r.OperationID, authDisabledDeniedOperations) { - return true, echo.NewHTTPError(http.StatusForbidden, "This operation is disabled while authentication is disabled") + if err := a.authorizeTenantOperations("NOAUTH", r); err != nil { + return true, err } return true, a.validateUserTenantPermissions(c, r) } - -var authDisabledDeniedOperations = []string{ - "TenantInviteAccept", - "TenantInviteReject", - "TenantInviteUpdate", - "TenantInviteDelete", - "TenantMemberUpdate", - "TenantMemberDelete", - "ApiTokenCreate", - "ApiTokenList", - "ApiTokenUpdateRevoke", -} diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 0c91e8485d..1a634d3b67 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -186,7 +186,7 @@ func (a *AuthZ) validateUserTenantPermissions(c echo.Context, r *middleware.Rout c.Set("tenant-member", tenantMember) // authorize tenant operations - if err := a.authorizeTenantOperations(tenantMember.Role, r); err != nil { + if err := a.authorizeTenantOperations(string(tenantMember.Role), r); err != nil { a.l.Debug().Ctx(ctx).Err(err).Msgf("error authorizing tenant operations") return unauthorized @@ -196,14 +196,14 @@ func (a *AuthZ) validateUserTenantPermissions(c echo.Context, r *middleware.Rout return nil } -func (a *AuthZ) authorizeTenantOperations(tenantMemberRole sqlcv1.TenantMemberRole, r *middleware.RouteInfo) error { +func (a *AuthZ) authorizeTenantOperations(roleName string, r *middleware.RouteInfo) error { // if the operation is in the allowed operations, skip the RBAC check this is needed for extensions if rbac.OperationIn(r.OperationID, a.config.Auth.AllowedOperations) { return nil } // at the moment, tenant members are only restricted from creating other tenant users. - if !a.rbac.IsAuthorized(string(tenantMemberRole), r.OperationID) { + if !a.rbac.IsAuthorized(roleName, r.OperationID) { return echo.NewHTTPError(http.StatusUnauthorized, "Not authorized to perform this operation") } diff --git a/api/v1/server/authz/rbac.yaml b/api/v1/server/authz/rbac.yaml index 7313ba0973..481af2e7fb 100644 --- a/api/v1/server/authz/rbac.yaml +++ b/api/v1/server/authz/rbac.yaml @@ -1,6 +1,8 @@ roles: OWNER: inherits: [ADMIN] + NOAUTH: + inherits: [MEMBER] ADMIN: inherits: [MEMBER] permissions: diff --git a/cmd/hatchet-admin/cli/seed/seed.go b/cmd/hatchet-admin/cli/seed/seed.go index bc7cec906e..ccc73c67d5 100644 --- a/cmd/hatchet-admin/cli/seed/seed.go +++ b/cmd/hatchet-admin/cli/seed/seed.go @@ -114,6 +114,10 @@ func SeedDatabase(dc *database.Layer) error { func seedAuthDisabledToken(dc *database.Layer) error { ctx := context.Background() + if dc.Seed.DefaultTenantID != authmode.EmbeddedTokenTenantID { + return fmt.Errorf("authdisabled mode requires the default tenant ID (%s) to match the embedded token tenant (%s)", dc.Seed.DefaultTenantID, authmode.EmbeddedTokenTenantID) + } + tokenID, err := uuid.Parse(authmode.EmbeddedTokenID) if err != nil { return fmt.Errorf("invalid embedded token ID: %w", err) @@ -121,6 +125,8 @@ func seedAuthDisabledToken(dc *database.Layer) error { if _, getErr := dc.V1.APIToken().GetAPITokenById(ctx, tokenID); getErr == nil { return nil + } else if !errors.Is(getErr, pgx.ErrNoRows) { + return fmt.Errorf("checking for embedded token: %w", getErr) } tenantID, err := uuid.Parse(authmode.EmbeddedTokenTenantID) diff --git a/pkg/authmode/keyset/gen/main.go b/pkg/authmode/keyset/gen/main.go index 4bbe2d621f..b30ba2106f 100644 --- a/pkg/authmode/keyset/gen/main.go +++ b/pkg/authmode/keyset/gen/main.go @@ -34,8 +34,7 @@ func main() { fatal(err) } - issuedAt := time.Now().UTC() - // far enough out to be effectively never for a local dev token; the validator requires an exp + issuedAt := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC) expiresAt := time.Date(2100, 1, 1, 0, 0, 0, 0, time.UTC) audience := authmode.EmbeddedTokenAudience issuer := authmode.EmbeddedTokenIssuer diff --git a/pkg/authmode/keyset/token.jwt b/pkg/authmode/keyset/token.jwt index 18dc0dff64..54188e28a5 100644 --- a/pkg/authmode/keyset/token.jwt +++ b/pkg/authmode/keyset/token.jwt @@ -1 +1 @@ -eyJhbGciOiJFUzI1NiIsICJraWQiOiJMR2NRSFEifQ.eyJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojg4ODgiLCAiZXhwIjo0MTAyNDQ0ODAwLCAiZ3JwY19icm9hZGNhc3RfYWRkcmVzcyI6ImxvY2FsaG9zdDo3MDc3IiwgImlhdCI6MTc4MzM3MTgxNCwgImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODg4OCIsICJzZXJ2ZXJfdXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4ODg4IiwgInN1YiI6IjcwN2QwODU1LTgwYWItNGUxZi1hMTU2LWYxYzQ1NDZjYmY1MiIsICJ0b2tlbl9pZCI6IjBhMGEwYTBhLTAwMDAtNDAwMC04MDAwLTAwMDAwMDAwMDAwMSJ9.hjwvWnmZjj_k9Nzpz5y1Y5apaVfWJKWcgz6CkjRWnsEoxqIlzytUWQfnJJaONFsc5OFMjK0TGrWQcT6XYUAybQ \ No newline at end of file +eyJhbGciOiJFUzI1NiIsICJraWQiOiJMR2NRSFEifQ.eyJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojg4ODgiLCAiZXhwIjo0MTAyNDQ0ODAwLCAiZ3JwY19icm9hZGNhc3RfYWRkcmVzcyI6ImxvY2FsaG9zdDo3MDc3IiwgImlhdCI6MTcwNDA2NzIwMCwgImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODg4OCIsICJzZXJ2ZXJfdXJsIjoiaHR0cDovL2xvY2FsaG9zdDo4ODg4IiwgInN1YiI6IjcwN2QwODU1LTgwYWItNGUxZi1hMTU2LWYxYzQ1NDZjYmY1MiIsICJ0b2tlbl9pZCI6IjBhMGEwYTBhLTAwMDAtNDAwMC04MDAwLTAwMDAwMDAwMDAwMSJ9.FUKNYefFd5YX7fasi1rPH5f2b36KW6D5qB-u-jNpQFdZTm3cgQTpCbo_4TvcJ11LdAktJdR56fcSzsiENlkMxQ \ No newline at end of file From f3f18cfa893ce3e0e20b4c7d7e4b942d2ad9fb68 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 8 Jul 2026 13:15:16 +0200 Subject: [PATCH 33/48] ignore noauth keysets and jwt for gitguardian --- .gitguardian.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitguardian.yaml b/.gitguardian.yaml index d9d8d076a3..4c42272761 100644 --- a/.gitguardian.yaml +++ b/.gitguardian.yaml @@ -3,3 +3,4 @@ version: 2 secret: ignored_paths: - 'frontend/app/cypress/e2e/**' + - 'pkg/authmode/keyset/**' From 305d70988167f6a6f01bf82eb149c3b65a32adf0 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Wed, 8 Jul 2026 17:14:05 +0200 Subject: [PATCH 34/48] resolve PR comments --- api/v1/server/authn/middleware.go | 3 +++ api/v1/server/authz/middleware.go | 3 +++ api/v1/server/handlers/metadata/get.go | 2 +- cmd/hatchet-admin/cli/authdisabled.go | 2 +- cmd/hatchet-admin/cli/seed/seed.go | 2 +- cmd/hatchet-admin/cli/token.go | 2 +- .../app/src/components/layout/auth-disabled-banner.tsx | 8 +++++--- .../pages/main/v1/tenant-settings/api-tokens/index.tsx | 2 +- pkg/auth/token/token_authdisabled_test.go | 2 +- pkg/authmode/authdisabled.go | 2 +- pkg/authmode/default.go | 2 +- pkg/config/loader/loader.go | 4 ++-- 12 files changed, 21 insertions(+), 13 deletions(-) diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index 8496ccf626..15e52145c6 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -60,6 +60,9 @@ func (a *AuthN) authenticate(c echo.Context, r *middleware.RouteInfo) error { return a.handleNoAuth(c) } + // authPreflight only returns handled=true in authdisabled builds, where it resolves the + // request as the seeded admin and short-circuits the strategies below. In normal builds it + // is a no-op (returns false), so authentication always proceeds. Do not invert this check. if handled, err := a.authPreflight(c); handled { return err } diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 1a634d3b67..1d2604eded 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -48,6 +48,9 @@ func (a *AuthZ) authorize(c echo.Context, r *middleware.RouteInfo) error { return nil } + // authPreflight only returns handled=true in authdisabled builds, where it authorizes the + // request against the NOAUTH role and short-circuits the strategy switch below. In normal + // builds it is a no-op (returns false), so authorization always proceeds. Do not invert this. if handled, err := a.authPreflight(c, r); handled { return err } diff --git a/api/v1/server/handlers/metadata/get.go b/api/v1/server/handlers/metadata/get.go index f5ec6431e9..97c770763e 100644 --- a/api/v1/server/handlers/metadata/get.go +++ b/api/v1/server/handlers/metadata/get.go @@ -37,7 +37,7 @@ func (u *MetadataService) MetadataGet(ctx echo.Context, request gen.MetadataGetR prometheusServerEnabled := u.config.Prometheus.PrometheusServerURL != "" - authDisabled := authmode.Disabled + authDisabled := authmode.IsDisabled meta := gen.APIMeta{ Auth: &gen.APIMetaAuth{ diff --git a/cmd/hatchet-admin/cli/authdisabled.go b/cmd/hatchet-admin/cli/authdisabled.go index 5caedc9128..e64de7ef4c 100644 --- a/cmd/hatchet-admin/cli/authdisabled.go +++ b/cmd/hatchet-admin/cli/authdisabled.go @@ -13,7 +13,7 @@ var authDisabledCmd = &cobra.Command{ Short: "exit 0 if this is an authdisabled build, 1 otherwise", Hidden: true, Run: func(cmd *cobra.Command, args []string) { - if !authmode.Disabled { + if !authmode.IsDisabled { os.Exit(1) } }, diff --git a/cmd/hatchet-admin/cli/seed/seed.go b/cmd/hatchet-admin/cli/seed/seed.go index ccc73c67d5..3923378704 100644 --- a/cmd/hatchet-admin/cli/seed/seed.go +++ b/cmd/hatchet-admin/cli/seed/seed.go @@ -102,7 +102,7 @@ func SeedDatabase(dc *database.Layer) error { } } - if authmode.Disabled { + if authmode.IsDisabled { if err := seedAuthDisabledToken(dc); err != nil { return err } diff --git a/cmd/hatchet-admin/cli/token.go b/cmd/hatchet-admin/cli/token.go index 5d48cc0f08..c30c73a59a 100644 --- a/cmd/hatchet-admin/cli/token.go +++ b/cmd/hatchet-admin/cli/token.go @@ -69,7 +69,7 @@ func init() { func runCreateAPIToken(expiresIn time.Duration) error { // authdisabled builds don't mint tokens; print the single embedded one. - if authmode.Disabled { + if authmode.IsDisabled { fmt.Println(authmode.EmbeddedToken()) return nil } diff --git a/frontend/app/src/components/layout/auth-disabled-banner.tsx b/frontend/app/src/components/layout/auth-disabled-banner.tsx index f877febb07..78331b5bdb 100644 --- a/frontend/app/src/components/layout/auth-disabled-banner.tsx +++ b/frontend/app/src/components/layout/auth-disabled-banner.tsx @@ -32,14 +32,16 @@ export function AuthDisabledBanner({ onDismiss }: { onDismiss: () => void }) { )} - +
    ); } diff --git a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx index af193456c0..1a99b923e1 100644 --- a/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx +++ b/frontend/app/src/pages/main/v1/tenant-settings/api-tokens/index.tsx @@ -69,7 +69,7 @@ export default function APITokens() {
    {authDisabledToken ? ( diff --git a/pkg/auth/token/token_authdisabled_test.go b/pkg/auth/token/token_authdisabled_test.go index 13f75ce012..1c58429dff 100644 --- a/pkg/auth/token/token_authdisabled_test.go +++ b/pkg/auth/token/token_authdisabled_test.go @@ -48,7 +48,7 @@ func (s *stubAPITokenRepository) DeleteAPIToken(ctx context.Context, tenantId, i // TestAuthDisabledKeysetIsolation is the security invariant behind authdisabled mode: the main // (production) JWT manager can never validate a token signed by the embedded authdisabled keyset, // and vice versa. The embedded token is only accepted via the separate authdisabled manager, which -// is only wired up (in the gRPC middleware) behind the compile-time authmode.Disabled constant. +// is only wired up (in the gRPC middleware) behind the compile-time authmode.IsDisabled constant. func TestAuthDisabledKeysetIsolation(t *testing.T) { master, mainPriv, mainPub, _, err := encryption.GenerateLocalKeys() require.NoError(t, err) diff --git a/pkg/authmode/authdisabled.go b/pkg/authmode/authdisabled.go index 92359bda10..a8ffd96ed1 100644 --- a/pkg/authmode/authdisabled.go +++ b/pkg/authmode/authdisabled.go @@ -7,7 +7,7 @@ import ( _ "embed" ) -const Disabled = true +const IsDisabled = true //go:embed keyset/private_ec256.key var privateKeyset []byte diff --git a/pkg/authmode/default.go b/pkg/authmode/default.go index 5f4936f029..aa1bbdaf24 100644 --- a/pkg/authmode/default.go +++ b/pkg/authmode/default.go @@ -2,7 +2,7 @@ package authmode -const Disabled = false +const IsDisabled = false func EmbeddedPrivateKeyset() []byte { return nil } diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 813ac5cdad..96f079eb79 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -656,7 +656,7 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers ConfigFile: cf.Auth, } - if authmode.Disabled { + if authmode.IsDisabled { l.Warn().Msg("This is an authdisabled build: dashboard/REST authentication is DISABLED and runs as the seed admin user. Never use this in production.") applyAuthDisabledOverrides(&cf.Runtime) @@ -713,7 +713,7 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers ServerURL: cf.Runtime.ServerURL, } - if authmode.Disabled { + if authmode.IsDisabled { jwtEncryptionSvc, err = encryption.NewInsecureJWTEncryption(authmode.EmbeddedPrivateKeyset(), authmode.EmbeddedPublicKeyset()) if err != nil { From 54b76a47e399c1d52b9a0482e95876765e9070ef Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 9 Jul 2026 16:07:04 +0530 Subject: [PATCH 35/48] chore: make sure we are only building stripped go binaries for Docker containers (#4382) --- build/package/frontend.dockerfile | 2 +- build/package/loadtest.dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/package/frontend.dockerfile b/build/package/frontend.dockerfile index 0b54079f17..abdec1acfe 100644 --- a/build/package/frontend.dockerfile +++ b/build/package/frontend.dockerfile @@ -20,7 +20,7 @@ ENV CGO_ENABLED=0 COPY go.mod go.sum ./ COPY ./cmd/hatchet-staticfileserver/ ./cmd/hatchet-staticfileserver/ -RUN go build -o hatchet-staticfileserver ./cmd/hatchet-staticfileserver/main.go +RUN go build -ldflags="-w -s" -a -o hatchet-staticfileserver ./cmd/hatchet-staticfileserver/main.go RUN chmod +x ./hatchet-staticfileserver # Stage 3: Run the static fileserver diff --git a/build/package/loadtest.dockerfile b/build/package/loadtest.dockerfile index e6a5cb0a08..af75b8ff0f 100644 --- a/build/package/loadtest.dockerfile +++ b/build/package/loadtest.dockerfile @@ -18,7 +18,7 @@ COPY /cmd/hatchet-loadtest ./cli # -------------------- FROM base AS build-go -RUN go build -a -o ./bin/hatchet-load-test ./cli +RUN go build -ldflags="-w -s" -a -o ./bin/hatchet-load-test ./cli # Deployment environment # ---------------------- From 07c38526812c4185c612fa12cb274107d0d092d2 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 9 Jul 2026 13:49:49 +0200 Subject: [PATCH 36/48] update docs --- .../reference/cli/running-hatchet-locally.mdx | 12 +++++ frontend/docs/pages/self-hosting/_meta.js | 1 - .../self-hosting/auth-disabled-images.mdx | 51 ------------------- .../docs/pages/self-hosting/hatchet-lite.mdx | 9 ++++ 4 files changed, 21 insertions(+), 52 deletions(-) delete mode 100644 frontend/docs/pages/self-hosting/auth-disabled-images.mdx diff --git a/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx b/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx index e20b54e3bd..a10e1ad80e 100644 --- a/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx +++ b/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx @@ -47,7 +47,11 @@ Examples: # Start server with custom profile name hatchet server start --profile my-local + # Start server with authentication disabled (local development only) + hatchet server start --disable-auth + Flags: + --disable-auth Disable authentication by running the hatchet-lite-dev image (local development only) -d, --dashboard-port int Port for the Hatchet dashboard (default: auto-detect starting at 8888) -g, --grpc-port int Port for the Hatchet gRPC server (default: auto-detect starting at 7077) -h, --help help for start @@ -58,6 +62,14 @@ Global Flags: -v, --version The version of the hatchet cli. ``` +#### Running without authentication + +`hatchet server start --disable-auth` runs the `hatchet-lite-dev` image, a variant built with authentication compiled out. Everything runs as the seeded admin against the default tenant, so tenant creation, signup and invites are disabled. + +Workers and SDK clients still authenticate with the gRPC engine using an API token. The dev image ships a single fixed worker token (the same on every auth-disabled instance, scoped to the default tenant, non-expiring). You can view this token from the **API Tokens** section in **Settings**. + +Dev variants exist for the other server images too: `hatchet-api-dev`, `hatchet-engine-dev` and `hatchet-admin-dev` (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). They are for local development and testing only - the regular images never compile the embedded token in, so it is inert against any normal deployment. + #### `hatchet server stop` ```txt diff --git a/frontend/docs/pages/self-hosting/_meta.js b/frontend/docs/pages/self-hosting/_meta.js index f34c77d759..8dc8b9053e 100644 --- a/frontend/docs/pages/self-hosting/_meta.js +++ b/frontend/docs/pages/self-hosting/_meta.js @@ -6,7 +6,6 @@ export default { }, "hatchet-lite": "Hatchet Lite", "docker-compose": "Docker Compose", - "auth-disabled-images": "Auth-Disabled Dev Images", "-- Kubernetes": { type: "separator", title: "Kubernetes", diff --git a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx b/frontend/docs/pages/self-hosting/auth-disabled-images.mdx deleted file mode 100644 index 9db53cb920..0000000000 --- a/frontend/docs/pages/self-hosting/auth-disabled-images.mdx +++ /dev/null @@ -1,51 +0,0 @@ -import { Callout } from "nextra/components"; - -# Auth-disabled dev images - -Hatchet publishes a set of dev images (`hatchet-lite-dev`, `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev`) built with authentication compiled out, so you can run a local instance without signing in to the dashboard or creating your own API token. - - - The dev images are for local development and testing only. - - -## What the dev images do - -- **Dashboard** loads without a login screen; requests run as the seeded admin user (`ADMIN_EMAIL`, default `admin@example.com`). -- **REST API** calls succeed without a bearer token or session cookie. -- **Single tenant.** Everything runs against the seed default tenant, so tenant creation, signup and invites are disabled (and hidden in the dashboard). - -## Workers still use an API token - -The gRPC engine is unchanged - workers and SDK clients still authenticate with an API token. The dev images ship a single, fixed token that is the same on every auth-disabled instance: - -- The token (and the keyset that signs it) is embedded (via `go:embed`) only in dev builds. The regular images never compile it in, so the token is inert against any normal deployment. -- It is scoped to the seed default tenant and does not expire. -- View it in the dashboard (the red banner has a **View worker token** button, and it is prefilled in the onboarding "Set your profile" step), or fetch it from the running container. - -Point your worker at it via `HATCHET_CLIENT_TOKEN`. - -## Running it - -The easiest way is the Hatchet CLI's `--disable-auth` flag, which starts a Postgres container and the `hatchet-lite-dev` image for you: - -```sh -hatchet server start --disable-auth -``` - -To run it yourself, follow the [Hatchet Lite](/self-hosting/hatchet-lite) guide but swap the image for `ghcr.io/hatchet-dev/hatchet/hatchet-lite-dev:latest`. The dev image still needs an external Postgres and the usual server configuration - the only difference is that authentication is compiled out. - -On startup the container prints the embedded worker token and writes it to the config volume. Grab it from the logs or the volume: - -```sh -docker logs # printed under "authdisabled build: worker API token" -# or -docker exec cat ./config/authdisabled-token -``` - -Then point your worker at it: - -```sh -export HATCHET_CLIENT_TOKEN="" -``` - -The `hatchet-api`, `hatchet-engine` and `hatchet-admin` images have dev variants too (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). diff --git a/frontend/docs/pages/self-hosting/hatchet-lite.mdx b/frontend/docs/pages/self-hosting/hatchet-lite.mdx index 460dc441c1..50b96bffb1 100644 --- a/frontend/docs/pages/self-hosting/hatchet-lite.mdx +++ b/frontend/docs/pages/self-hosting/hatchet-lite.mdx @@ -22,6 +22,15 @@ The easiest way to get Hatchet Lite running is via the Hatchet CLI. Simply run t hatchet server start ``` + + For local development you can add `--disable-auth` to run the + `hatchet-lite-dev` image, which has authentication compiled out. Workers still + authenticate over gRPC with the fixed worker token the dev image ships + (viewable from the dashboard banner). See [Running Hatchet + Locally](/reference/cli/running-hatchet-locally#running-without-authentication) + for details. + + From d5c467e5bd32cb934a7baf90659b30663184773b Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 9 Jul 2026 14:31:31 +0200 Subject: [PATCH 37/48] update docs and build dashboard-dev images as well --- .github/workflows/pre-release.yaml | 110 +++++++++++++++++- .github/workflows/release.yaml | 2 +- .../reference/cli/running-hatchet-locally.mdx | 2 +- .../pages/self-hosting/docker-compose.mdx | 24 ++++ hack/ci/assert-auth-enabled.sh | 21 +++- 5 files changed, 153 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 5611753c0a..397e169861 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -737,6 +737,7 @@ jobs: - build-push-hatchet-admin-amd - build-push-hatchet-migrate-amd - build-push-hatchet-lite-amd + - build-push-hatchet-dashboard-amd steps: - name: Get tag name id: tag_name @@ -748,9 +749,10 @@ jobs: - name: Login to GHCR id: login-ghcr run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - name: Assert non-dev api and lite have auth ENABLED + - name: Assert non-dev api, dashboard and lite have auth ENABLED env: API_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}}-amd64 + DASHBOARD_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64 LITE_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 ADMIN_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}}-amd64 MIGRATE_IMAGE: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}}-amd64 @@ -1014,6 +1016,7 @@ jobs: needs: - build-push-hatchet-dashboard-amd - build-push-hatchet-dashboard-arm + - auth-enabled steps: - name: Get tag name id: tag_name @@ -1035,6 +1038,111 @@ jobs: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-amd64 \ ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}}-arm64 docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:${{steps.tag_name.outputs.tag}} + build-push-hatchet-dashboard-dev-amd: + name: hatchet-dashboard-dev-amd + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: '3.14' + - name: Generate docs snippets and examples + working-directory: frontend/snippets + run: python3 generate.py + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Set up QEMU + uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 + - name: Build dev image + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=api \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/amd64 \ + -t hatchet-api-dev-tmp:amd64 \ + . + + DOCKER_BUILDKIT=1 docker build -f ./build/package/dashboard.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + --platform linux/amd64 \ + --build-arg HATCHET_API_IMAGE=hatchet-api-dev-tmp:amd64 \ + . + - name: Push to GHCR + run: docker push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-amd64 + build-push-hatchet-dashboard-dev-arm: + name: hatchet-dashboard-dev-arm + runs-on: hatchet-arm64-2 + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: '3.14' + - name: Generate docs snippets and examples + working-directory: frontend/snippets + run: python3 generate.py + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Set up QEMU + uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 + - name: Build dev image + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \ + --build-arg SERVER_TARGET=api \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg GO_BUILD_TAGS=authdisabled \ + --platform linux/arm64 \ + -t hatchet-api-dev-tmp:arm64 \ + . + + DOCKER_BUILDKIT=1 docker build -f ./build/package/dashboard.dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-arm64 \ + --platform linux/arm64 \ + --build-arg HATCHET_API_IMAGE=hatchet-api-dev-tmp:arm64 \ + . + - name: Push to GHCR + run: docker push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-arm64 + combine-hatchet-dashboard-dev: + name: Combine hatchet-dashboard-dev + runs-on: ubuntu-latest + needs: + - build-push-hatchet-dashboard-dev-amd + - build-push-hatchet-dashboard-dev-arm + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Combine dev image + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-amd64 + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}} \ + ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-amd64 \ + ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}}-arm64 + docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:${{steps.tag_name.outputs.tag}} build-push-hatchet-loadtest-amd: name: hatchet-loadtest runs-on: ubuntu-latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1e1ad5bb4a..de3f5ac09a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -152,7 +152,7 @@ jobs: docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest - name: Pull and push dev images run: | - for img in hatchet-api hatchet-engine hatchet-admin hatchet-lite; do + for img in hatchet-api hatchet-engine hatchet-admin hatchet-lite hatchet-dashboard; do docker pull ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-arm64 docker pull ghcr.io/hatchet-dev/hatchet/$img-dev:${{steps.tag_name.outputs.tag}}-amd64 diff --git a/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx b/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx index a10e1ad80e..f9babf74d3 100644 --- a/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx +++ b/frontend/docs/pages/reference/cli/running-hatchet-locally.mdx @@ -68,7 +68,7 @@ Global Flags: Workers and SDK clients still authenticate with the gRPC engine using an API token. The dev image ships a single fixed worker token (the same on every auth-disabled instance, scoped to the default tenant, non-expiring). You can view this token from the **API Tokens** section in **Settings**. -Dev variants exist for the other server images too: `hatchet-api-dev`, `hatchet-engine-dev` and `hatchet-admin-dev` (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). They are for local development and testing only - the regular images never compile the embedded token in, so it is inert against any normal deployment. +Dev variants exist for the other server images too: `hatchet-api-dev`, `hatchet-engine-dev`, `hatchet-admin-dev` and `hatchet-dashboard-dev` (`ghcr.io/hatchet-dev/hatchet/hatchet--dev`). They are for local development and testing only - the regular images never compile the embedded token in, so it is inert against any normal deployment. #### `hatchet server stop` diff --git a/frontend/docs/pages/self-hosting/docker-compose.mdx b/frontend/docs/pages/self-hosting/docker-compose.mdx index ff4959a532..cbd744b1d8 100644 --- a/frontend/docs/pages/self-hosting/docker-compose.mdx +++ b/frontend/docs/pages/self-hosting/docker-compose.mdx @@ -246,3 +246,27 @@ services: start_period: 10s # ... ``` + +## Running without authentication + + + Auth-disabled mode is for local development only. + + +The compose stack above is fully authenticated. To run it without a login screen, swap the `setup-config`, `hatchet-engine` and `hatchet-dashboard` services to their `-dev` variants, which are built with authentication compiled out: + +```yaml filename="docker-compose.yml" +setup-config: + image: ghcr.io/hatchet-dev/hatchet/hatchet-admin-dev:latest + # ... rest of the service unchanged +hatchet-engine: + image: ghcr.io/hatchet-dev/hatchet/hatchet-engine-dev:latest + # ... rest of the service unchanged +hatchet-dashboard: + image: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard-dev:latest + # ... rest of the service unchanged +``` + +Workers still authenticate over gRPC with the fixed worker token the dev images ship which you can view under **Settings → API Tokens** in the dashboard. + +If you only want a single-container local instance, `hatchet server start --disable-auth` runs the all-in-one `hatchet-lite-dev` image instead. See [Running Hatchet Locally](/reference/cli/running-hatchet-locally#running-without-authentication) for details. diff --git a/hack/ci/assert-auth-enabled.sh b/hack/ci/assert-auth-enabled.sh index 8792736025..8f4f0c9ce3 100755 --- a/hack/ci/assert-auth-enabled.sh +++ b/hack/ci/assert-auth-enabled.sh @@ -1,20 +1,22 @@ #!/usr/bin/env bash -# Boots the non-dev api and lite images against Postgres and asserts authentication is ENABLED, -# i.e. the images were not accidentally compiled with the "authdisabled" build tag. +# Boots the non-dev api, dashboard and lite images against Postgres and asserts authentication is +# ENABLED, i.e. the images were not accidentally compiled with the "authdisabled" build tag. set -uo pipefail API_IMAGE="${API_IMAGE:-hatchet-api:ci}" +DASHBOARD_IMAGE="${DASHBOARD_IMAGE:-hatchet-dashboard:ci}" LITE_IMAGE="${LITE_IMAGE:-hatchet-lite:ci}" ADMIN_IMAGE="${ADMIN_IMAGE:-hatchet-admin-tmp:amd64}" MIGRATE_IMAGE="${MIGRATE_IMAGE:-hatchet-migrate-tmp:amd64}" API_PORT="${API_PORT:-8890}" +DASHBOARD_PORT="${DASHBOARD_PORT:-8891}" LITE_PORT="${LITE_PORT:-8888}" NET=hatchet-authcheck fail=0 cleanup() { - docker rm -f authcheck-api authcheck-lite authcheck-pg-api authcheck-pg-lite >/dev/null 2>&1 || true + docker rm -f authcheck-api authcheck-dashboard authcheck-lite authcheck-pg-api authcheck-pg-lite >/dev/null 2>&1 || true docker volume rm authcheck-cfg >/dev/null 2>&1 || true docker network rm "$NET" >/dev/null 2>&1 || true } @@ -71,6 +73,19 @@ fi assert_auth_enabled api "http://localhost:$API_PORT" || fail=1 echo "::endgroup::" +echo "::group::dashboard" +# The dashboard bundles the api binary behind nginx (port 80); reuse the api's DB + config. +docker run -d --name authcheck-dashboard --network "$NET" -e DATABASE_URL="$DBURL_API" \ + -e SERVER_MSGQUEUE_KIND=postgres -e SERVER_GRPC_INSECURE=true \ + -e SERVER_AUTH_COOKIE_INSECURE=true -e SERVER_AUTH_COOKIE_DOMAIN=localhost \ + -v authcheck-cfg:/hatchet/config -p "$DASHBOARD_PORT":80 \ + "$DASHBOARD_IMAGE" sh ./entrypoint.sh --config /hatchet/config >/dev/null +if ! wait_for_url "http://localhost:$DASHBOARD_PORT/api/live"; then + echo "::error::dashboard never became ready"; docker logs authcheck-dashboard 2>&1 | tail -60; exit 1 +fi +assert_auth_enabled dashboard "http://localhost:$DASHBOARD_PORT" || fail=1 +echo "::endgroup::" + echo "::group::lite" docker run -d --name authcheck-pg-lite --network "$NET" \ -e POSTGRES_USER=hatchet -e POSTGRES_PASSWORD=hatchet -e POSTGRES_DB=hatchet postgres:15.6 >/dev/null From c455ba294290bdb1e90bf5149adff2d484a6b730 Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Thu, 9 Jul 2026 17:10:21 +0200 Subject: [PATCH 38/48] call it embed --- .github/workflows/pre-release.yaml | 33 ++ .pre-commit-config.yaml | 6 - Taskfile.yaml | 28 +- api/v1/server/authn/authdisabled.go | 21 +- api/v1/server/authn/authdisabled_preflight.go | 4 - api/v1/server/authn/default.go | 4 + api/v1/server/authz/authdisabled.go | 6 +- api/v1/server/authz/authdisabled_preflight.go | 4 - api/v1/server/authz/default.go | 4 + embed/dashboard.go | 194 ++++++ .../hatchetembed.go => embed/embed.go | 86 +-- {hatchetembed => embed}/options.go | 33 +- hack/ci/check-version-matches-tag.sh | 2 +- hatchetembed/.gitattributes | 6 - hatchetembed/dashboard.go | 48 -- .../assets/ArrowPathIcon-DJaZk0M1.js | 1 - .../ExclamationTriangleIcon-Okie-gQE.js | 1 - .../dashboard/assets/KeyIcon-szjQ8KFq.js | 1 - .../dashboard/assets/PlusIcon-ChBf4T_m.js | 1 - .../assets/ServerStackIcon-CTxTfpKw.js | 1 - .../dashboard/assets/XMarkIcon-q_Tj_COY.js | 1 - .../dashboard/assets/auth-layout-BYNreqC4.js | 16 - .../dashboard/assets/auth-page-BRjt0-kC.js | 11 - .../assets/authenticated-CYpLJHv6.js | 1 - .../dashboard/assets/billing-WBONcYPA.js | 1 - .../assets/billing-required-D8JPVUCq.js | 1 - .../assets/confirm-dialog-Bv8agSqW.js | 1 - .../assets/create-worker-form-BqgLk5vw.js | 2 - .../assets/data-contracts-C0lcHVTf.js | 1 - .../dashboard/assets/docs-button-Mn8SLZkH.js | 6 - .../assets/github-button-DalgP0Fz.js | 1 - .../assets/global-emitter-kjRqhIKI.js | 1 - .../dashboard/assets/hatchet-5-DSjVfcvf.svg | 554 ------------------ .../dashboard/assets/index-2ncWJHmk.js | 1 - .../dashboard/assets/index-B-gmUf6P.js | 38 -- .../dashboard/assets/index-BEyCp5-u.js | 1 - .../dashboard/assets/index-BG4bj_5y.js | 1 - .../dashboard/assets/index-BKaLm0fk.js | 14 - .../dashboard/assets/index-BavpRR8e.js | 1 - .../dashboard/assets/index-Bfpllom8.js | 1 - .../dashboard/assets/index-BkqnLZBk.js | 1 - .../dashboard/assets/index-BoqiiIh4.js | 1 - .../dashboard/assets/index-Bwjif3lq.js | 1 - .../dashboard/assets/index-C6BCNBHG.js | 6 - .../dashboard/assets/index-C6dA5MvO.js | 1 - .../dashboard/assets/index-CGgjE1le.js | 26 - .../dashboard/assets/index-CIa_u54h.js | 1 - .../dashboard/assets/index-CKvkkIkH.js | 1 - .../dashboard/assets/index-CQU71MwM.js | 1 - .../dashboard/assets/index-CY7bg9j1.js | 1 - .../dashboard/assets/index-CYYxHnXB.js | 1 - .../dashboard/assets/index-Cd6hBVRN.js | 1 - .../dashboard/assets/index-CgoYnKU8.js | 1 - .../dashboard/assets/index-CgrU27uR.js | 8 - .../dashboard/assets/index-D46ZK8zA.js | 1 - .../dashboard/assets/index-D4LBFMbY.js | 1 - .../dashboard/assets/index-D7XvoUmw.js | 1 - .../dashboard/assets/index-DGszS3I6.js | 1 - .../dashboard/assets/index-DOf3AD-4.js | 1 - .../dashboard/assets/index-DQrE5gCH.js | 1 - .../dashboard/assets/index-DSRJ3V8B.js | 1 - .../dashboard/assets/index-Df3PCeRG.js | 57 -- .../dashboard/assets/index-DjIt7K6k.js | 1 - .../dashboard/assets/index-Dq1G0ZP8.js | 1 - .../dashboard/assets/index-Fd0xVSp_.css | 1 - .../dashboard/assets/index-NcPpBRAY.js | 481 --------------- .../dashboard/assets/index-U7cfLZjk.js | 6 - .../dashboard/assets/index-VOVOHhA6.js | 1 - .../dashboard/assets/index-Y2aiVoiY.js | 1 - .../dashboard/assets/index-ckRpuEyy.js | 1 - .../dashboard/assets/index-jA2UlkYY.js | 1 - .../dashboard/assets/index-k398qAe_.js | 6 - .../dashboard/assets/index-nFgZ20bE.css | 1 - .../dashboard/assets/inline-error-BRPaHH6l.js | 1 - .../dashboard/assets/invite-modal-CIZIW_VD.js | 1 - .../assets/managed-compute-Dhtcalwt.js | 1 - .../assets/managed-workers-gate-C-OegMsp.js | 16 - .../assets/member-primitives-r9nHLQI3.js | 1 - .../new-organization-saver-form-B3Ag7ruu.js | 1 - .../assets/new-tenant-saver-form-DYNtrUbW.js | 1 - .../dashboard/assets/no-auth-Pb4ETRB1.js | 1 - .../assets/organization-selector-CCw2_tjm.js | 1 - .../dashboard/assets/outlet-BQs_XxR1.js | 1 - .../dashboard/assets/redirect-BMRF0kLa.js | 1 - .../assets/resource-limit-columns-CvplayQs.js | 1 - .../assets/resource-limit-status-BK8AB43u.js | 1 - .../assets/resource-not-found-DGbig0ge.js | 1 - .../assets/secret-copier-68gzWNRB.js | 4 - .../dashboard/assets/sections-Dml0nEEJ.js | 1 - .../assets/settings-layout-C9ou3Eyd.js | 1 - .../assets/settings-page-header-CkCZd3CN.js | 1 - .../dashboard/assets/settings-row-D2iLPMr6.js | 1 - .../assets/shard-deployment-key-in4ZPoWA.js | 1 - .../dashboard/assets/shield-check-jS3YzcEA.js | 6 - .../dashboard/assets/steps-CZ8cuefp.js | 1 - .../dashboard/assets/switch-C9IBAXBS.js | 1 - .../assets/tenant-region-badge-C-bbxnQA.js | 1 - .../assets/tenant-switcher-DKarkPe5.js | 1 - .../assets/tenant-wrapper-CsXNqzkl.js | 1 - .../dashboard/assets/top-nav-DUjg_srB.js | 26 - .../assets/use-analytics-Jv1fF8RR.js | 2 - .../assets/use-auth-disabled-3jxVUpNe.js | 1 - .../assets/use-pending-invites-DdxsIf8r.js | 1 - .../assets/welcome-modal-state-YrY6roPC.js | 1 - hatchetembed/dashboard/favicon.svg | 16 - hatchetembed/dashboard/index.html | 24 - hatchetembed/dashboard/noise.png | Bin 663717 -> 0 bytes pkg/config/server/server.go | 8 +- pkg/version/version.go | 11 +- sdks/go/examples/embedded/main.go | 20 +- 110 files changed, 292 insertions(+), 1621 deletions(-) create mode 100644 embed/dashboard.go rename hatchetembed/hatchetembed.go => embed/embed.go (63%) rename {hatchetembed => embed}/options.go (54%) delete mode 100644 hatchetembed/.gitattributes delete mode 100644 hatchetembed/dashboard.go delete mode 100644 hatchetembed/dashboard/assets/ArrowPathIcon-DJaZk0M1.js delete mode 100644 hatchetembed/dashboard/assets/ExclamationTriangleIcon-Okie-gQE.js delete mode 100644 hatchetembed/dashboard/assets/KeyIcon-szjQ8KFq.js delete mode 100644 hatchetembed/dashboard/assets/PlusIcon-ChBf4T_m.js delete mode 100644 hatchetembed/dashboard/assets/ServerStackIcon-CTxTfpKw.js delete mode 100644 hatchetembed/dashboard/assets/XMarkIcon-q_Tj_COY.js delete mode 100644 hatchetembed/dashboard/assets/auth-layout-BYNreqC4.js delete mode 100644 hatchetembed/dashboard/assets/auth-page-BRjt0-kC.js delete mode 100644 hatchetembed/dashboard/assets/authenticated-CYpLJHv6.js delete mode 100644 hatchetembed/dashboard/assets/billing-WBONcYPA.js delete mode 100644 hatchetembed/dashboard/assets/billing-required-D8JPVUCq.js delete mode 100644 hatchetembed/dashboard/assets/confirm-dialog-Bv8agSqW.js delete mode 100644 hatchetembed/dashboard/assets/create-worker-form-BqgLk5vw.js delete mode 100644 hatchetembed/dashboard/assets/data-contracts-C0lcHVTf.js delete mode 100644 hatchetembed/dashboard/assets/docs-button-Mn8SLZkH.js delete mode 100644 hatchetembed/dashboard/assets/github-button-DalgP0Fz.js delete mode 100644 hatchetembed/dashboard/assets/global-emitter-kjRqhIKI.js delete mode 100644 hatchetembed/dashboard/assets/hatchet-5-DSjVfcvf.svg delete mode 100644 hatchetembed/dashboard/assets/index-2ncWJHmk.js delete mode 100644 hatchetembed/dashboard/assets/index-B-gmUf6P.js delete mode 100644 hatchetembed/dashboard/assets/index-BEyCp5-u.js delete mode 100644 hatchetembed/dashboard/assets/index-BG4bj_5y.js delete mode 100644 hatchetembed/dashboard/assets/index-BKaLm0fk.js delete mode 100644 hatchetembed/dashboard/assets/index-BavpRR8e.js delete mode 100644 hatchetembed/dashboard/assets/index-Bfpllom8.js delete mode 100644 hatchetembed/dashboard/assets/index-BkqnLZBk.js delete mode 100644 hatchetembed/dashboard/assets/index-BoqiiIh4.js delete mode 100644 hatchetembed/dashboard/assets/index-Bwjif3lq.js delete mode 100644 hatchetembed/dashboard/assets/index-C6BCNBHG.js delete mode 100644 hatchetembed/dashboard/assets/index-C6dA5MvO.js delete mode 100644 hatchetembed/dashboard/assets/index-CGgjE1le.js delete mode 100644 hatchetembed/dashboard/assets/index-CIa_u54h.js delete mode 100644 hatchetembed/dashboard/assets/index-CKvkkIkH.js delete mode 100644 hatchetembed/dashboard/assets/index-CQU71MwM.js delete mode 100644 hatchetembed/dashboard/assets/index-CY7bg9j1.js delete mode 100644 hatchetembed/dashboard/assets/index-CYYxHnXB.js delete mode 100644 hatchetembed/dashboard/assets/index-Cd6hBVRN.js delete mode 100644 hatchetembed/dashboard/assets/index-CgoYnKU8.js delete mode 100644 hatchetembed/dashboard/assets/index-CgrU27uR.js delete mode 100644 hatchetembed/dashboard/assets/index-D46ZK8zA.js delete mode 100644 hatchetembed/dashboard/assets/index-D4LBFMbY.js delete mode 100644 hatchetembed/dashboard/assets/index-D7XvoUmw.js delete mode 100644 hatchetembed/dashboard/assets/index-DGszS3I6.js delete mode 100644 hatchetembed/dashboard/assets/index-DOf3AD-4.js delete mode 100644 hatchetembed/dashboard/assets/index-DQrE5gCH.js delete mode 100644 hatchetembed/dashboard/assets/index-DSRJ3V8B.js delete mode 100644 hatchetembed/dashboard/assets/index-Df3PCeRG.js delete mode 100644 hatchetembed/dashboard/assets/index-DjIt7K6k.js delete mode 100644 hatchetembed/dashboard/assets/index-Dq1G0ZP8.js delete mode 100644 hatchetembed/dashboard/assets/index-Fd0xVSp_.css delete mode 100644 hatchetembed/dashboard/assets/index-NcPpBRAY.js delete mode 100644 hatchetembed/dashboard/assets/index-U7cfLZjk.js delete mode 100644 hatchetembed/dashboard/assets/index-VOVOHhA6.js delete mode 100644 hatchetembed/dashboard/assets/index-Y2aiVoiY.js delete mode 100644 hatchetembed/dashboard/assets/index-ckRpuEyy.js delete mode 100644 hatchetembed/dashboard/assets/index-jA2UlkYY.js delete mode 100644 hatchetembed/dashboard/assets/index-k398qAe_.js delete mode 100644 hatchetembed/dashboard/assets/index-nFgZ20bE.css delete mode 100644 hatchetembed/dashboard/assets/inline-error-BRPaHH6l.js delete mode 100644 hatchetembed/dashboard/assets/invite-modal-CIZIW_VD.js delete mode 100644 hatchetembed/dashboard/assets/managed-compute-Dhtcalwt.js delete mode 100644 hatchetembed/dashboard/assets/managed-workers-gate-C-OegMsp.js delete mode 100644 hatchetembed/dashboard/assets/member-primitives-r9nHLQI3.js delete mode 100644 hatchetembed/dashboard/assets/new-organization-saver-form-B3Ag7ruu.js delete mode 100644 hatchetembed/dashboard/assets/new-tenant-saver-form-DYNtrUbW.js delete mode 100644 hatchetembed/dashboard/assets/no-auth-Pb4ETRB1.js delete mode 100644 hatchetembed/dashboard/assets/organization-selector-CCw2_tjm.js delete mode 100644 hatchetembed/dashboard/assets/outlet-BQs_XxR1.js delete mode 100644 hatchetembed/dashboard/assets/redirect-BMRF0kLa.js delete mode 100644 hatchetembed/dashboard/assets/resource-limit-columns-CvplayQs.js delete mode 100644 hatchetembed/dashboard/assets/resource-limit-status-BK8AB43u.js delete mode 100644 hatchetembed/dashboard/assets/resource-not-found-DGbig0ge.js delete mode 100644 hatchetembed/dashboard/assets/secret-copier-68gzWNRB.js delete mode 100644 hatchetembed/dashboard/assets/sections-Dml0nEEJ.js delete mode 100644 hatchetembed/dashboard/assets/settings-layout-C9ou3Eyd.js delete mode 100644 hatchetembed/dashboard/assets/settings-page-header-CkCZd3CN.js delete mode 100644 hatchetembed/dashboard/assets/settings-row-D2iLPMr6.js delete mode 100644 hatchetembed/dashboard/assets/shard-deployment-key-in4ZPoWA.js delete mode 100644 hatchetembed/dashboard/assets/shield-check-jS3YzcEA.js delete mode 100644 hatchetembed/dashboard/assets/steps-CZ8cuefp.js delete mode 100644 hatchetembed/dashboard/assets/switch-C9IBAXBS.js delete mode 100644 hatchetembed/dashboard/assets/tenant-region-badge-C-bbxnQA.js delete mode 100644 hatchetembed/dashboard/assets/tenant-switcher-DKarkPe5.js delete mode 100644 hatchetembed/dashboard/assets/tenant-wrapper-CsXNqzkl.js delete mode 100644 hatchetembed/dashboard/assets/top-nav-DUjg_srB.js delete mode 100644 hatchetembed/dashboard/assets/use-analytics-Jv1fF8RR.js delete mode 100644 hatchetembed/dashboard/assets/use-auth-disabled-3jxVUpNe.js delete mode 100644 hatchetembed/dashboard/assets/use-pending-invites-DdxsIf8r.js delete mode 100644 hatchetembed/dashboard/assets/welcome-modal-state-YrY6roPC.js delete mode 100644 hatchetembed/dashboard/favicon.svg delete mode 100644 hatchetembed/dashboard/index.html delete mode 100644 hatchetembed/dashboard/noise.png diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index b654e68410..c2c09a51f3 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -17,6 +17,39 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Verify pkg/version matches the tag run: ./hack/ci/check-version-matches-tag.sh ${{ steps.tag_name.outputs.tag }} + publish-dashboard-bundle: + name: publish dashboard bundle + needs: check-version + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Install pnpm + run: npm install -g pnpm@10.16.1 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: "24.x" + - name: Setup task + uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0 + - name: Install frontend dependencies + run: pnpm --dir frontend/app install --frozen-lockfile + - name: Build dashboard bundle + run: task dashboard:bundle + - name: Attach bundle to release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ steps.tag_name.outputs.tag }} + run: | + gh release create "$TAG" --title "$TAG" --generate-notes --prerelease --verify-tag || true + gh release upload "$TAG" \ + "bin/dashboard-${TAG}.tar.gz" \ + "bin/dashboard-${TAG}.tar.gz.sha256" \ + --clobber build-push-hatchet-api-amd: name: hatchet-api needs: check-version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a996d87a8e..88f260e892 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,12 +19,6 @@ repos: language: system pass_filenames: false files: ^sdks/ruby/src/CHANGELOG\.md$ - - id: embed-dashboard - name: rebuild and embed dashboard into hatchetembed - entry: task dashboard:embed - language: system - pass_filenames: false - files: ^frontend/app/ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: diff --git a/Taskfile.yaml b/Taskfile.yaml index 612f16b7fe..9c00ba2c10 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -10,26 +10,16 @@ tasks: - task: generate-docs - task: set-env-all - task: seed-dev - dashboard:embed: - desc: Build the frontend and embed it into the hatchetembed package (github.com/hatchet-dev/hatchet/hatchetembed). - # Only rebuilds when a frontend source file has actually changed (checksum fingerprint). - method: checksum - sources: - - frontend/app/src/**/* - - frontend/app/public/**/* - - frontend/app/index.html - - frontend/app/package.json - - frontend/app/vite.config.ts - - frontend/app/tsconfig*.json - - frontend/app/tailwind.config.js - - frontend/app/postcss.config.js - generates: - - hatchetembed/dashboard/**/* + dashboard:bundle: + desc: Build the frontend dashboard and package it as a release tarball (bin/dashboard-.tar.gz + .sha256) for the embed runtime fetcher. The version comes from pkg/version. + vars: + VERSION: + sh: sed -n 's/^const Version = "\(.*\)".*/\1/p' pkg/version/version.go cmds: - pnpm --dir frontend/app exec vite build --sourcemap false - - rm -rf hatchetembed/dashboard - - mkdir -p hatchetembed/dashboard - - cp -R frontend/app/dist/. hatchetembed/dashboard/ + - mkdir -p bin + - tar -czf bin/dashboard-{{.VERSION}}.tar.gz -C frontend/app/dist . + - cd bin && shasum -a 256 dashboard-{{.VERSION}}.tar.gz > dashboard-{{.VERSION}}.tar.gz.sha256 set-env-db: cmds: - | @@ -364,7 +354,7 @@ tasks: - sh: ./hack/ci/release-notes-cli.sh {{.TAG}} msg: "CHANGELOG.md must contain an entry for {{.TAG}}." - sh: ./hack/ci/check-version-matches-tag.sh {{.TAG}} - msg: "pkg/version/version.go must be bumped to {{.TAG}} (the engine reports it to SDKs and hatchetembed embeds it)." + msg: "pkg/version/version.go must be bumped to {{.TAG}} (the engine reports it to SDKs and embed embeds it)." prompt: Create new release for tag {{.TAG}}? cmds: # cleanup=verbatim: markdown header hashes are otherwise stripped as comments. diff --git a/api/v1/server/authn/authdisabled.go b/api/v1/server/authn/authdisabled.go index 073a573973..f2dca99d26 100644 --- a/api/v1/server/authn/authdisabled.go +++ b/api/v1/server/authn/authdisabled.go @@ -2,25 +2,8 @@ package authn -import ( - "net/http" - - "github.com/labstack/echo/v4" -) +import "github.com/labstack/echo/v4" func (a *AuthN) authPreflight(c echo.Context) (handled bool, err error) { - ctx := c.Request().Context() - - user, err := a.config.V1.User().GetUserByEmail(ctx, a.config.Seed.AdminEmail) - - if err != nil { - a.l.Error().Ctx(ctx).Err(err).Msg("authdisabled: could not resolve the seeded admin user") - - return true, echo.NewHTTPError(http.StatusInternalServerError, "authdisabled: could not resolve the seeded admin user; ensure the database was seeded (ADMIN_EMAIL/ADMIN_PASSWORD)") - } - - c.Set("user", user) - c.Set("auth_strategy", "authdisabled") - - return true, nil + return a.resolveAuthDisabled(c) } diff --git a/api/v1/server/authn/authdisabled_preflight.go b/api/v1/server/authn/authdisabled_preflight.go index b009e88bd1..b65cc31439 100644 --- a/api/v1/server/authn/authdisabled_preflight.go +++ b/api/v1/server/authn/authdisabled_preflight.go @@ -6,10 +6,6 @@ import ( "github.com/labstack/echo/v4" ) -// resolveAuthDisabled resolves the request as the seeded admin user and marks the auth strategy as -// "authdisabled". It backs both the authdisabled build tag and the runtime IsAuthDisabled config -// used by embedded/library mode (github.com/hatchet-dev/hatchet/hatchetembed). It always reports -// handled=true so the caller short-circuits the normal auth strategies. func (a *AuthN) resolveAuthDisabled(c echo.Context) (bool, error) { ctx := c.Request().Context() diff --git a/api/v1/server/authn/default.go b/api/v1/server/authn/default.go index e0f5d4e18c..59160b915b 100644 --- a/api/v1/server/authn/default.go +++ b/api/v1/server/authn/default.go @@ -5,5 +5,9 @@ package authn import "github.com/labstack/echo/v4" func (a *AuthN) authPreflight(c echo.Context) (handled bool, err error) { + if a.config.Runtime.IsAuthDisabled { + return a.resolveAuthDisabled(c) + } + return false, nil } diff --git a/api/v1/server/authz/authdisabled.go b/api/v1/server/authz/authdisabled.go index 2744120b5d..e47318a151 100644 --- a/api/v1/server/authz/authdisabled.go +++ b/api/v1/server/authz/authdisabled.go @@ -9,9 +9,5 @@ import ( ) func (a *AuthZ) authPreflight(c echo.Context, r *middleware.RouteInfo) (handled bool, err error) { - if err := a.authorizeTenantOperations("NOAUTH", r); err != nil { - return true, err - } - - return true, a.validateUserTenantPermissions(c, r) + return a.authorizeAuthDisabled(c, r) } diff --git a/api/v1/server/authz/authdisabled_preflight.go b/api/v1/server/authz/authdisabled_preflight.go index 578c022457..3880f66a99 100644 --- a/api/v1/server/authz/authdisabled_preflight.go +++ b/api/v1/server/authz/authdisabled_preflight.go @@ -6,10 +6,6 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" ) -// authorizeAuthDisabled authorizes the request against the NOAUTH role and validates tenant -// membership. It backs both the authdisabled build tag and the runtime IsAuthDisabled config used by -// embedded/library mode (github.com/hatchet-dev/hatchet/hatchetembed). It always reports -// handled=true so the caller short-circuits the normal authorization strategies. func (a *AuthZ) authorizeAuthDisabled(c echo.Context, r *middleware.RouteInfo) (bool, error) { if err := a.authorizeTenantOperations("NOAUTH", r); err != nil { return true, err diff --git a/api/v1/server/authz/default.go b/api/v1/server/authz/default.go index 1da37bde82..3875da5f8f 100644 --- a/api/v1/server/authz/default.go +++ b/api/v1/server/authz/default.go @@ -9,5 +9,9 @@ import ( ) func (a *AuthZ) authPreflight(c echo.Context, r *middleware.RouteInfo) (handled bool, err error) { + if a.config.Runtime.IsAuthDisabled { + return a.authorizeAuthDisabled(c, r) + } + return false, nil } diff --git a/embed/dashboard.go b/embed/dashboard.go new file mode 100644 index 0000000000..3bf2ce8a15 --- /dev/null +++ b/embed/dashboard.go @@ -0,0 +1,194 @@ +package embed + +import ( + "archive/tar" + "bytes" + "compress/gzip" + "context" + "crypto/sha256" + "encoding/hex" + "fmt" + "io" + "io/fs" + "net/http" + "os" + "path" + "path/filepath" + "strings" + "time" + + "github.com/hatchet-dev/hatchet/pkg/version" +) + +const dashboardReleaseBaseURL = "https://github.com/hatchet-dev/hatchet/releases/download" + +const maxDashboardBundleBytes = 128 << 20 + +func dashboardTarballURL() string { + if u := os.Getenv("HATCHET_EMBEDDED_DASHBOARD_URL"); u != "" { + return u + } + + v := version.Version + return fmt.Sprintf("%s/%s/dashboard-%s.tar.gz", dashboardReleaseBaseURL, v, v) +} + +func ensureDashboardAssets(ctx context.Context) (string, error) { + cacheRoot, err := os.UserCacheDir() + if err != nil { + return "", fmt.Errorf("could not resolve user cache dir: %w", err) + } + + dir := filepath.Join(cacheRoot, "hatchet", "embedded-dashboard", version.Version) + if _, statErr := os.Stat(filepath.Join(dir, "index.html")); statErr == nil { + return dir, nil + } + + url := dashboardTarballURL() + + tarball, err := downloadBytes(ctx, url) + if err != nil { + return "", fmt.Errorf("download dashboard bundle %s: %w", url, err) + } + + if sum, sumErr := downloadBytes(ctx, url+".sha256"); sumErr == nil { + if err := verifySHA256(tarball, sum); err != nil { + return "", err + } + } + + if err := extractTarGz(tarball, dir); err != nil { + return "", fmt.Errorf("extract dashboard bundle: %w", err) + } + + return dir, nil +} + +func downloadBytes(ctx context.Context, url string) ([]byte, error) { + reqCtx, cancel := context.WithTimeout(ctx, 60*time.Second) + defer cancel() + + req, err := http.NewRequestWithContext(reqCtx, http.MethodGet, url, nil) + if err != nil { + return nil, err + } + + resp, err := http.DefaultClient.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() //nolint:errcheck + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("unexpected status %s", resp.Status) + } + + return io.ReadAll(io.LimitReader(resp.Body, maxDashboardBundleBytes)) +} + +func verifySHA256(data, sumFile []byte) error { + want := strings.TrimSpace(string(sumFile)) + if i := strings.IndexAny(want, " \t"); i >= 0 { + want = want[:i] + } + + got := sha256.Sum256(data) + if !strings.EqualFold(want, hex.EncodeToString(got[:])) { + return fmt.Errorf("dashboard bundle checksum mismatch: got %s, want %s", hex.EncodeToString(got[:]), want) + } + + return nil +} + +func extractTarGz(data []byte, destDir string) error { + if err := os.MkdirAll(filepath.Dir(destDir), 0o755); err != nil { + return err + } + + tmp, err := os.MkdirTemp(filepath.Dir(destDir), ".download-*") + if err != nil { + return err + } + defer os.RemoveAll(tmp) //nolint:errcheck + + gz, err := gzip.NewReader(bytes.NewReader(data)) + if err != nil { + return err + } + defer gz.Close() //nolint:errcheck + + tr := tar.NewReader(io.LimitReader(gz, maxDashboardBundleBytes)) + for { + hdr, err := tr.Next() + if err == io.EOF { + break + } + if err != nil { + return err + } + + name := path.Clean(strings.TrimPrefix(hdr.Name, "./")) + if name == "." || name == "" { + continue + } + if strings.HasPrefix(name, "..") || strings.Contains(name, "../") || filepath.IsAbs(name) { + return fmt.Errorf("unsafe path in dashboard bundle: %q", hdr.Name) + } + + target := filepath.Join(tmp, filepath.FromSlash(name)) + + switch hdr.Typeflag { + case tar.TypeDir: + if err := os.MkdirAll(target, 0o755); err != nil { + return err + } + case tar.TypeReg: + if err := os.MkdirAll(filepath.Dir(target), 0o755); err != nil { + return err + } + f, err := os.OpenFile(target, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644) + if err != nil { + return err + } + if _, err := io.Copy(f, io.LimitReader(tr, maxDashboardBundleBytes)); err != nil { + _ = f.Close() + return err + } + if err := f.Close(); err != nil { + return err + } + } + } + + if err := os.Rename(tmp, destDir); err != nil { + if _, statErr := os.Stat(filepath.Join(destDir, "index.html")); statErr == nil { + return nil + } + return err + } + + return nil +} + +func dashboardHandler(fsys fs.FS) (http.Handler, error) { + indexBytes, err := fs.ReadFile(fsys, "index.html") + if err != nil { + return nil, fmt.Errorf("dashboard assets are missing index.html: %w", err) + } + + fileServer := http.FileServer(http.FS(fsys)) + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + reqPath := strings.TrimPrefix(path.Clean(r.URL.Path), "/") + + if reqPath != "" { + if _, statErr := fs.Stat(fsys, reqPath); statErr == nil { + fileServer.ServeHTTP(w, r) + return + } + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + _, _ = w.Write(indexBytes) + }), nil +} diff --git a/hatchetembed/hatchetembed.go b/embed/embed.go similarity index 63% rename from hatchetembed/hatchetembed.go rename to embed/embed.go index 9b15107779..6108a37dc3 100644 --- a/hatchetembed/hatchetembed.go +++ b/embed/embed.go @@ -1,33 +1,12 @@ -// Package hatchetembed runs a full, in-process Hatchet instance (engine, REST API, and the bundled -// dashboard) in no-auth mode, so a Go program can import Hatchet and get a ready-to-use client -// without running the hatchet-lite binary or docker-compose. -// -// It brings up the same services as hatchet-lite against a Postgres database you supply, seeds a -// default tenant and admin user, mints a local token, serves the dashboard (embedded in this -// package), and returns a wired SDK client. -// -// # Basic usage -// -// inst, err := hatchetembed.Start(ctx, hatchetembed.WithPostgres("postgres://hatchet:hatchet@localhost:5431/hatchet")) -// if err != nil { -// log.Fatal(err) -// } -// defer inst.Shutdown(context.Background()) -// -// client := inst.Client() -// // register workers, trigger workflows, etc. -// // open inst.DashboardURL() in a browser to view runs. -// -// The message queue is backed by the same Postgres database by default; call WithRabbitMQ to use an -// external broker instead. Authentication is always disabled in embedded mode — never expose an -// embedded instance publicly. -package hatchetembed +// Package embed runs a full in-process Hatchet instance (engine, REST API, dashboard) in no-auth mode. +package embed import ( "context" "crypto/rand" "encoding/hex" "fmt" + "io/fs" "net/http" "net/http/httputil" "net/url" @@ -47,7 +26,6 @@ import ( hatchet "github.com/hatchet-dev/hatchet/sdks/go" ) -// Instance is a running embedded Hatchet instance. type Instance struct { client *hatchet.Client token string @@ -61,25 +39,18 @@ type Instance struct { httpServers []*http.Server } -// Client returns an SDK client wired to this embedded instance. func (i *Instance) Client() *hatchet.Client { return i.client } -// Token returns the API token minted for the default tenant. func (i *Instance) Token() string { return i.token } -// TenantID returns the default tenant's ID. func (i *Instance) TenantID() string { return i.tenantID } -// APIURL returns the base URL of the REST API. func (i *Instance) APIURL() string { return i.apiURL } -// GRPCAddress returns the host:port of the gRPC engine. func (i *Instance) GRPCAddress() string { return i.grpcAddress } -// DashboardURL returns the URL of the bundled dashboard, or "" when the dashboard is disabled. func (i *Instance) DashboardURL() string { return i.dashboardURL } -// Shutdown gracefully stops the embedded instance. func (i *Instance) Shutdown(ctx context.Context) error { if i.cancel != nil { i.cancel() @@ -99,8 +70,6 @@ func (i *Instance) Shutdown(ctx context.Context) error { return firstErr } -// Start brings up a full embedded Hatchet instance and returns a handle once it is ready to accept -// work. Call Instance.Shutdown to stop it. func Start(ctx context.Context, opts ...Option) (*Instance, error) { cfg := defaultConfig() for _, opt := range opts { @@ -111,8 +80,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { return nil, err } - // The database connection and seed configuration live on the database config file, which has no - // programmatic override hook, so we supply them via the env vars the loader already honors. if err := os.Setenv("DATABASE_URL", cfg.postgresURL); err != nil { return nil, fmt.Errorf("could not set DATABASE_URL: %w", err) } @@ -123,12 +90,10 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { _ = os.Setenv("ADMIN_PASSWORD", cfg.adminPassword) } - // Run migrations against the supplied database. if cfg.runMigrations { migrate.RunMigrations(ctx) } - // Generate ephemeral local keysets so the instance is self-contained (no key management). masterKey, privateJWT, publicJWT, _, err := encryption.GenerateLocalKeys() if err != nil { return nil, fmt.Errorf("could not generate local keysets: %w", err) @@ -137,7 +102,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { grpcBroadcast := fmt.Sprintf("127.0.0.1:%d", cfg.grpcPort) apiURL := fmt.Sprintf("http://localhost:%d", cfg.apiPort) - // Cookie secrets for the (unused in no-auth, but always constructed) session store. hashKey, err := randomHex(32) if err != nil { return nil, fmt.Errorf("could not generate cookie secret: %w", err) @@ -148,11 +112,8 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { } override := func(scf *server.ServerConfigFile) { - // no-auth (embedded) mode — only settable programmatically, never via config. scf.Runtime.IsAuthDisabled = true - // The session store is always constructed; give it a valid local cookie config even though - // no-auth mode never issues cookies. scf.Auth.Cookie.Domain = "localhost" scf.Auth.Cookie.Insecure = true scf.Auth.Cookie.Secrets = hashKey + " " + blockKey @@ -164,7 +125,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { scf.Runtime.GRPCBroadcastAddress = grpcBroadcast scf.Runtime.GRPCInsecure = true - // disable the phone-home security check for local runs. scf.SecurityCheck.Enabled = false if cfg.usePostgresMQ() { @@ -181,7 +141,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { cf := loader.NewConfigLoader("") - // Seed the default tenant + admin user (no-auth requests resolve to this user). dc, err := cf.InitDataLayer() if err != nil { return nil, fmt.Errorf("could not init data layer: %w", err) @@ -192,7 +151,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { } tenantID := dc.Seed.DefaultTenantID - // Mint a token for the default tenant using a fully-built server config. tokenCleanup, sc, err := cf.CreateServerFromConfig(cfg.version, override) if err != nil { _ = dc.Disconnect() @@ -210,7 +168,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { expiresAt := time.Now().UTC().Add(90 * 24 * time.Hour) tok, err := sc.Auth.JWTManager.GenerateTenantToken(ctx, parsedTenantID, "embedded", false, &expiresAt) - // release the config used purely for seeding/token minting; the API and engine build their own. _ = tokenCleanup() _ = sc.Disconnect() _ = dc.Disconnect() @@ -219,19 +176,18 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { return nil, fmt.Errorf("could not mint token: %w", err) } - // Start the API and engine in-process. interruptCh := make(chan interface{}) engineCtx, cancel := context.WithCancel(ctx) go func() { if startErr := api.Start(cf, interruptCh, cfg.version, override); startErr != nil { - fmt.Fprintf(os.Stderr, "hatchetembed: api exited: %v\n", startErr) + fmt.Fprintf(os.Stderr, "embed: api exited: %v\n", startErr) } }() go func() { if runErr := engine.Run(engineCtx, cf, cfg.version, override); runErr != nil { - fmt.Fprintf(os.Stderr, "hatchetembed: engine exited: %v\n", runErr) + fmt.Fprintf(os.Stderr, "embed: engine exited: %v\n", runErr) } }() @@ -244,17 +200,26 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { cancel: cancel, } - // Serve the bundled dashboard behind a reverse proxy, mirroring hatchet-lite. if cfg.dashboardEnabled { - if dashErr := inst.startDashboard(cfg, apiURL); dashErr != nil { - _ = inst.Shutdown(context.Background()) - return nil, dashErr + assetDir := cfg.dashboardDir + if assetDir == "" { + fetched, fetchErr := ensureDashboardAssets(ctx) + if fetchErr != nil { + fmt.Fprintf(os.Stderr, "embed: dashboard unavailable, continuing without it: %v\n", fetchErr) + } else { + assetDir = fetched + } + } + + if assetDir != "" { + if dashErr := inst.startDashboard(cfg, apiURL, os.DirFS(assetDir)); dashErr != nil { + _ = inst.Shutdown(context.Background()) + return nil, dashErr + } + inst.dashboardURL = fmt.Sprintf("http://localhost:%d", cfg.dashboardPort) } - inst.dashboardURL = fmt.Sprintf("http://localhost:%d", cfg.dashboardPort) } - // Wire a client to the local engine via the standard HATCHET_CLIENT_* env vars. The token also - // carries the gRPC/server addresses; the engine is insecure locally, so disable client TLS. _ = os.Setenv("HATCHET_CLIENT_TOKEN", tok.Token) _ = os.Setenv("HATCHET_CLIENT_HOST_PORT", grpcBroadcast) _ = os.Setenv("HATCHET_CLIENT_TENANT_ID", tenantID) @@ -274,7 +239,6 @@ func Start(ctx context.Context, opts ...Option) (*Instance, error) { return inst, nil } -// randomHex returns a hex-encoded string of n random bytes (2*n characters). func randomHex(n int) (string, error) { b := make([]byte, n) if _, err := rand.Read(b); err != nil { @@ -283,15 +247,13 @@ func randomHex(n int) (string, error) { return hex.EncodeToString(b), nil } -// startDashboard serves the embedded dashboard SPA and reverse-proxies /api to the REST API, all on -// a single port (cfg.dashboardPort). -func (i *Instance) startDashboard(cfg *Config, apiURL string) error { +func (i *Instance) startDashboard(cfg *Config, apiURL string, assets fs.FS) error { apiTarget, err := url.Parse(apiURL) if err != nil { return fmt.Errorf("could not parse api url: %w", err) } - spa, err := dashboardHandler() + spa, err := dashboardHandler(assets) if err != nil { return err } @@ -319,7 +281,7 @@ func (i *Instance) startDashboard(cfg *Config, apiURL string) error { go func() { if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed { - fmt.Fprintf(os.Stderr, "hatchetembed: dashboard server exited: %v\n", err) + fmt.Fprintf(os.Stderr, "embed: dashboard server exited: %v\n", err) } }() diff --git a/hatchetembed/options.go b/embed/options.go similarity index 54% rename from hatchetembed/options.go rename to embed/options.go index d4782b35fb..7981b3c119 100644 --- a/hatchetembed/options.go +++ b/embed/options.go @@ -1,4 +1,4 @@ -package hatchetembed +package embed import ( "fmt" @@ -7,8 +7,6 @@ import ( "github.com/hatchet-dev/hatchet/pkg/version" ) -// Config holds the resolved configuration for an embedded Hatchet instance. It is populated by the -// Option functions passed to Start. type Config struct { postgresURL string rabbitMQURL string @@ -16,6 +14,7 @@ type Config struct { adminPassword string version string logLevel string + dashboardDir string apiPort int grpcPort int dashboardPort int @@ -23,14 +22,8 @@ type Config struct { dashboardEnabled bool } -// Option configures an embedded Hatchet instance. type Option func(*Config) -// defaultEngineVersion is the Hatchet engine version reported by the embedded engine. It comes from -// the canonical pkg/version constant (the single source of truth kept in sync with the release -// tag), so the SDK client sees a real semver and doesn't fall back to legacy worker registration. -const defaultEngineVersion = version.Version - func defaultConfig() *Config { return &Config{ runMigrations: true, @@ -38,51 +31,43 @@ func defaultConfig() *Config { grpcPort: 7070, dashboardPort: 8082, dashboardEnabled: true, - version: defaultEngineVersion, + version: version.Version, logLevel: "warn", } } -// WithPostgres sets the Postgres connection string Hatchet runs against. This is required. Unless -// WithRabbitMQ is also provided, this same database backs the message queue. func WithPostgres(url string) Option { return func(c *Config) { c.postgresURL = url } } -// WithRabbitMQ switches the message queue to RabbitMQ at the given AMQP URL. When omitted, the -// message queue is backed by the Postgres database supplied to WithPostgres. func WithRabbitMQ(url string) Option { return func(c *Config) { c.rabbitMQURL = url } } -// WithoutMigrations disables running database migrations on startup. Use this when migrations are -// managed externally. func WithoutMigrations() Option { return func(c *Config) { c.runMigrations = false } } -// WithAPIPort sets the port the REST API listens on. Defaults to 8080. func WithAPIPort(port int) Option { return func(c *Config) { c.apiPort = port } } -// WithGRPCPort sets the port the gRPC engine listens on. Defaults to 7070. func WithGRPCPort(port int) Option { return func(c *Config) { c.grpcPort = port } } -// WithDashboardPort sets the port the bundled dashboard is served on. Defaults to 8082. func WithDashboardPort(port int) Option { return func(c *Config) { c.dashboardPort = port } } -// WithoutDashboard disables serving the bundled dashboard, exposing only the API and engine. func WithoutDashboard() Option { return func(c *Config) { c.dashboardEnabled = false } } -// WithAdminUser overrides the seeded admin user email/password. In no-auth mode all dashboard/REST -// requests resolve to this user. +func WithDashboardDir(dir string) Option { + return func(c *Config) { c.dashboardDir = dir } +} + func WithAdminUser(email, password string) Option { return func(c *Config) { c.adminEmail = email @@ -90,12 +75,10 @@ func WithAdminUser(email, password string) Option { } } -// WithVersion sets the version string reported by the engine and API. func WithVersion(version string) Option { return func(c *Config) { c.version = version } } -// WithLogLevel sets the log level for the returned client. func WithLogLevel(level string) Option { return func(c *Config) { c.logLevel = level } } @@ -116,8 +99,6 @@ func (c *Config) validate() error { return nil } -// usePostgresMQ reports whether the message queue should be backed by Postgres (the default when no -// RabbitMQ URL is provided). func (c *Config) usePostgresMQ() bool { return strings.TrimSpace(c.rabbitMQURL) == "" } diff --git a/hack/ci/check-version-matches-tag.sh b/hack/ci/check-version-matches-tag.sh index b264f57135..ada6b6e9df 100755 --- a/hack/ci/check-version-matches-tag.sh +++ b/hack/ci/check-version-matches-tag.sh @@ -2,7 +2,7 @@ # Fails if the canonical pkg/version constant does not match the release tag. # # The engine reports pkg/version.Version to SDK clients, and library consumers such as -# github.com/hatchet-dev/hatchet/hatchetembed read it directly (no ldflag), so it must equal the tag +# github.com/hatchet-dev/hatchet/embed read it directly (no ldflag), so it must equal the tag # being released. Run this from the release pipeline with the tag as the first argument, e.g. # # ./hack/ci/check-version-matches-tag.sh v0.83.4 diff --git a/hatchetembed/.gitattributes b/hatchetembed/.gitattributes deleted file mode 100644 index 2011e1f262..0000000000 --- a/hatchetembed/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -# The dashboard/ directory holds the built frontend, generated by `task dashboard:embed` from -# frontend/app and embedded into this package via go:embed. It is generated output, not source — -# mark it so reviews collapse the diffs, language stats ignore it, and merges don't conflict on it. -dashboard/** linguist-generated=true -dashboard/** -diff -dashboard/** -merge diff --git a/hatchetembed/dashboard.go b/hatchetembed/dashboard.go deleted file mode 100644 index d75dddaab0..0000000000 --- a/hatchetembed/dashboard.go +++ /dev/null @@ -1,48 +0,0 @@ -package hatchetembed - -import ( - "embed" - "fmt" - "io/fs" - "net/http" - "path" - "strings" -) - -// dashboardFS holds the built frontend dashboard, embedded into the binary. The contents of the -// dashboard/ directory are generated from frontend/app by `task dashboard:embed`; a placeholder -// index.html is committed so the package always compiles. -// -//go:embed all:dashboard -var dashboardFS embed.FS - -// dashboardHandler returns an http.Handler serving the embedded dashboard single-page app. Requests -// for paths that don't map to a real asset fall back to index.html so client-side routes resolve. -func dashboardHandler() (http.Handler, error) { - sub, err := fs.Sub(dashboardFS, "dashboard") - if err != nil { - return nil, fmt.Errorf("could not open embedded dashboard: %w", err) - } - - indexBytes, err := fs.ReadFile(sub, "index.html") - if err != nil { - return nil, fmt.Errorf("embedded dashboard is missing index.html (build it with `task dashboard:embed`): %w", err) - } - - fileServer := http.FileServer(http.FS(sub)) - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - reqPath := strings.TrimPrefix(path.Clean(r.URL.Path), "/") - - if reqPath != "" { - if _, statErr := fs.Stat(sub, reqPath); statErr == nil { - fileServer.ServeHTTP(w, r) - return - } - } - - // SPA fallback for the index and client-side routes. - w.Header().Set("Content-Type", "text/html; charset=utf-8") - _, _ = w.Write(indexBytes) - }), nil -} diff --git a/hatchetembed/dashboard/assets/ArrowPathIcon-DJaZk0M1.js b/hatchetembed/dashboard/assets/ArrowPathIcon-DJaZk0M1.js deleted file mode 100644 index dce2db8cc8..0000000000 --- a/hatchetembed/dashboard/assets/ArrowPathIcon-DJaZk0M1.js +++ /dev/null @@ -1 +0,0 @@ -import{k as n}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3f37a688-a59e-41c4-a0c6-4300f6468796",e._sentryDebugIdIdentifier="sentry-dbid-3f37a688-a59e-41c4-a0c6-4300f6468796")}catch{}})();function a({title:e,titleId:r,...t},o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const s=n.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/ExclamationTriangleIcon-Okie-gQE.js b/hatchetembed/dashboard/assets/ExclamationTriangleIcon-Okie-gQE.js deleted file mode 100644 index 9325f374be..0000000000 --- a/hatchetembed/dashboard/assets/ExclamationTriangleIcon-Okie-gQE.js +++ /dev/null @@ -1 +0,0 @@ -import{k as r}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b4628f1d-f7f8-47a7-95e1-4b959afae7b8",e._sentryDebugIdIdentifier="sentry-dbid-b4628f1d-f7f8-47a7-95e1-4b959afae7b8")}catch{}})();function a({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const f=r.forwardRef(a);export{f as F}; diff --git a/hatchetembed/dashboard/assets/KeyIcon-szjQ8KFq.js b/hatchetembed/dashboard/assets/KeyIcon-szjQ8KFq.js deleted file mode 100644 index 266057012f..0000000000 --- a/hatchetembed/dashboard/assets/KeyIcon-szjQ8KFq.js +++ /dev/null @@ -1 +0,0 @@ -import{k as r}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5328728a-2b08-4027-859e-83d9e2500057",e._sentryDebugIdIdentifier="sentry-dbid-5328728a-2b08-4027-859e-83d9e2500057")}catch{}})();function a({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))}const s=r.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/PlusIcon-ChBf4T_m.js b/hatchetembed/dashboard/assets/PlusIcon-ChBf4T_m.js deleted file mode 100644 index 3dc5bc14f6..0000000000 --- a/hatchetembed/dashboard/assets/PlusIcon-ChBf4T_m.js +++ /dev/null @@ -1 +0,0 @@ -import{k as r}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46e058a9-e886-4427-a38d-134901ddb530",e._sentryDebugIdIdentifier="sentry-dbid-46e058a9-e886-4427-a38d-134901ddb530")}catch{}})();function d({title:e,titleId:n,...t},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},t),e?r.createElement("title",{id:n},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const s=r.forwardRef(d);export{s as F}; diff --git a/hatchetembed/dashboard/assets/ServerStackIcon-CTxTfpKw.js b/hatchetembed/dashboard/assets/ServerStackIcon-CTxTfpKw.js deleted file mode 100644 index 7cae5e8778..0000000000 --- a/hatchetembed/dashboard/assets/ServerStackIcon-CTxTfpKw.js +++ /dev/null @@ -1 +0,0 @@ -import{k as n}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c282605c-3217-4bf5-988a-691f7f04ed6f",e._sentryDebugIdIdentifier="sentry-dbid-c282605c-3217-4bf5-988a-691f7f04ed6f")}catch{}})();function o({title:e,titleId:r,...t},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"}))}const f=n.forwardRef(o);export{f as F}; diff --git a/hatchetembed/dashboard/assets/XMarkIcon-q_Tj_COY.js b/hatchetembed/dashboard/assets/XMarkIcon-q_Tj_COY.js deleted file mode 100644 index 0026825926..0000000000 --- a/hatchetembed/dashboard/assets/XMarkIcon-q_Tj_COY.js +++ /dev/null @@ -1 +0,0 @@ -import{k as n}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f3b26164-20ca-47d0-a60e-3b158bb9e9cb",e._sentryDebugIdIdentifier="sentry-dbid-f3b26164-20ca-47d0-a60e-3b158bb9e9cb")}catch{}})();function a({title:e,titleId:r,...t},o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?n.createElement("title",{id:r},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const s=n.forwardRef(a);export{s as F}; diff --git a/hatchetembed/dashboard/assets/auth-layout-BYNreqC4.js b/hatchetembed/dashboard/assets/auth-layout-BYNreqC4.js deleted file mode 100644 index 0f1c1fd05a..0000000000 --- a/hatchetembed/dashboard/assets/auth-layout-BYNreqC4.js +++ /dev/null @@ -1,16 +0,0 @@ -import{j as e,H as t}from"./index-NcPpBRAY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="ee11c078-ae54-40fb-81b5-501c14d0763e",a._sentryDebugIdIdentifier="sentry-dbid-ee11c078-ae54-40fb-81b5-501c14d0763e")}catch{}})();function l(){return e.jsxs("div",{className:"relative flex h-full w-full flex-col justify-between",children:[e.jsx("div",{className:"relative",children:e.jsx(t,{className:"h-6 w-auto"})}),e.jsx("div",{className:"relative flex z-4 isolate w-full justify-end pb-10 lg:pb-12",children:e.jsxs("div",{className:"max-w-2xl text-right",children:[e.jsx("h1",{className:"text-5xl font-semibold tracking-[-0.02em] dark:text-[#b8d9ff] text-[#000000] lg:text-6xl [text-wrap:balance]",children:"The last orchestrator you’ll ever need"}),e.jsx("p",{className:"mt-4 text-base text-balance dark:text-[#b8d9ff77] dark:mix-blend-plus-lighter",children:"Run fast and reliable workflows for background jobs and agents."})]})})]})}function s({children:a}){const r={"--noise-url":'url("/noise.png")'};return e.jsxs("div",{className:"min-h-screen w-full lg:grid lg:grid-cols-[1fr_round(nearest,50%,24px)]",children:[e.jsxs("div",{className:"relative hidden overflow-hidden bg-muted/30 px-10 py-12 lg:flex",children:[e.jsx("div",{className:` - [--color1:color-mix(in_srgb,_hsl(287_69%_57%)_calc(100%_*_1),_transparent)] - [--color2:color-mix(in_srgb,_hsl(212_100%_60%)_calc(100%_*_.56),_transparent)] - [--direction:bottom] [--scale:5] [--gridSize:24px] [--n:6] [--t:1px] [--g:2px] [--c:#fff7_25%,#0000_0] - - pointer-events-none absolute left-0 bottom-0 w-full overflow-clip - [height:clamp(50rlh,30vh,50rlh)] - [background-color:#b8d9ff14] - [mask-image:linear-gradient(to_var(--direction),transparent_50%,white_100%),var(--noise-url),conic-gradient(at_var(--g)_var(--t),var(--c)),conic-gradient(from_180deg_at_var(--t)_var(--g),var(--c))] - [mask-position:0_0,0%_0%,calc((var(--gridSize)_/_var(--n)_-_var(--g)_+_var(--t))_/_2)_0,round(up,100%,calc(var(--g)*2))_calc((var(--gridSize)_/_var(--n)_-_var(--g)_+_var(--t))_/_2)] - [mask-size:100%,calc(300%*var(--scale))_calc(300%*var(--scale)),calc(var(--gridSize)_/_var(--n))_var(--gridSize),var(--gridSize)_calc(var(--gridSize)_/_var(--n))] - [mask-composite:intersect,add,add,subtract] - - before:absolute before:left-0 before:top-0 before:h-full before:w-full before:opacity-0 before:content-[''] before:bg-[repeating-radial-gradient(circle_at_50%_50%,transparent_0%,var(--color1)_20%,var(--color2)_25%,transparent_32%)] before:animate-[heroPulse_7s_linear_infinite] before:[animation-delay:3.5s] - - after:absolute after:left-0 after:top-0 after:h-full after:w-full after:opacity-0 after:content-[''] after:bg-[repeating-radial-gradient(circle_at_50%_50%,transparent_0%,var(--color2)_9%,var(--color1)_14%,transparent_21%)] after:animate-[heroPulse_6s_linear_infinite]`,style:r}),e.jsx(l,{})]}),e.jsx("div",{className:"w-full overflow-y-auto",children:e.jsx("div",{className:"flex min-h-screen w-full items-center justify-center px-4 py-10 lg:justify-start lg:px-12 lg:py-12",children:e.jsx("div",{className:"w-full max-w-lg",children:e.jsx("div",{className:"flex w-full flex-col justify-center space-y-6",children:a})})})})]})}export{s as A}; diff --git a/hatchetembed/dashboard/assets/auth-page-BRjt0-kC.js b/hatchetembed/dashboard/assets/auth-page-BRjt0-kC.js deleted file mode 100644 index 997e0552fd..0000000000 --- a/hatchetembed/dashboard/assets/auth-page-BRjt0-kC.js +++ /dev/null @@ -1,11 +0,0 @@ -import{v as b,w as v,x as N,k as d,j as e,y as w,B as u,z as x,C as k,H as P,R as C}from"./index-NcPpBRAY.js";import{A as E}from"./auth-layout-BYNreqC4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="2431313d-4770-464f-a607-1831e2a72945",t._sentryDebugIdIdentifier="sentry-dbid-2431313d-4770-464f-a607-1831e2a72945")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],S=b("arrow-left",I);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],_=b("lock-open",A);function B(){const[t,r]=v(),{toast:a}=N();d.useEffect(()=>{if(t.get("error")&&t.get("error")!==""){a({title:"Error",description:t.get("error")||"",duration:5e3});const s=new URLSearchParams(t);s.delete("error"),r(s)}},[t,r,a])}function z(){return e.jsxs("p",{"data-cy":"auth-legal",className:"w-full text-left text-sm text-gray-500 dark:text-gray-500",children:["By continuing, you agree to our"," ",e.jsx("a",{href:"https://hatchet.run/policies/terms",className:"underline underline-offset-4 hover:text-primary",children:"Terms of Service"}),","," ",e.jsx("a",{href:"https://hatchet.run/policies/cookie",className:"underline underline-offset-4 hover:text-primary",children:"Cookie"}),", and"," ",e.jsx("a",{href:"https://hatchet.run/policies/privacy",className:"underline underline-offset-4 hover:text-primary",children:"Privacy Policies"}),"."]})}const L={google:{href:"users/google/start",label:"Google",icon:e.jsx(x.google,{className:"size-4"})},github:{href:"users/github/start",label:"GitHub",icon:e.jsx(x.gitHub,{className:"size-4"})},sso:{href:"users/sso/start",label:"SSO",icon:e.jsx(_,{className:"size-4"})}};function R(){return e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-muted-foreground/20"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or continue with"})})]})}function D({provider:t,ssoExpanded:r,setSsoExpanded:a}){const s=L[t],{isControlPlaneEnabled:i}=w(),[n,o]=d.useState(""),c=i?"/api/v1/control-plane/":"/api/v1/";return t==="sso"?e.jsxs("div",{className:"w-full flex flex-col gap-2",children:[!r&&e.jsxs(u,{variant:"outline",type:"button",fullWidth:!0,onClick:()=>a(!0),className:"h-11 justify-center gap-2 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[s.icon,s.label]}),r&&e.jsx("div",{className:"flex gap-2",children:e.jsx("input",{type:"text",value:n,onChange:l=>o(l.target.value),placeholder:"Enter your email",className:"h-10 flex-1 rounded-md border border-muted-foreground/20 bg-background px-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})}),r&&e.jsx("a",{href:n?`${c+s.href}?email=${encodeURIComponent(n)}`:"#",onClick:l=>{n||l.preventDefault()},tabIndex:n?0:-1,children:e.jsx(u,{variant:"outline",type:"button",fullWidth:!0,disabled:!n,className:"h-10 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:"Continue"})}),r&&e.jsxs(u,{variant:"ghost",type:"button",size:"sm",onClick:()=>a(!1),className:"h-11 justify-left gap-1 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[e.jsx(S,{className:"size-4"}),"Back"]})]}):!r&&e.jsx("a",{href:c+s.href,className:"w-full",children:e.jsxs(u,{variant:"outline",type:"button",fullWidth:!0,className:"h-11 justify-center gap-2 border-muted-foreground/20 bg-background shadow-sm hover:bg-muted/40",children:[s.icon,s.label]})})}function O({providers:t,ssoExpanded:r,setSsoExpanded:a}){return t.length===0?null:e.jsx("div",{className:"grid sm:grid-flow-col gap-3",children:t.map(s=>e.jsx(D,{provider:s,ssoExpanded:r,setSsoExpanded:a},s))})}function W({title:t,basicSection:r,altAction:a}){var g;B();const{meta:s}=k(),[i,n]=d.useState(!1),o=((g=s==null?void 0:s.auth)==null?void 0:g.schemes)||[],c=o.includes("basic"),l=o.includes("google"),p=o.includes("github"),j=o.includes("sso"),h=[l&&"google",p&&"github",j&&"sso"].filter(Boolean),f=[h.length>0&&e.jsx(O,{providers:h,ssoExpanded:i,setSsoExpanded:n}),!i&&c&&r].filter(Boolean);return e.jsxs(E,{children:[e.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[e.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:e.jsx(P,{className:"h-8 w-auto"})}),e.jsxs("div",{className:"flex w-full flex-col items-center gap-2 lg:flex-row lg:items-center lg:justify-between",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight","data-cy":"auth-title",children:t}),e.jsx("div",{className:"text-sm text-muted-foreground text-center lg:text-right",children:a})]})]}),f.map((y,m)=>e.jsxs(C.Fragment,{children:[y,me.jsxs(_t,{value:i,onSelect:()=>{t(i),b(!1)},className:"cursor-pointer",children:[e.jsx("span",{className:"truncate",children:i}),e.jsx(Lt,{className:ie("ml-auto size-4 shrink-0",n===i?"opacity-100":"opacity-0")})]},i))]})]})})]})}const yn=({className:n,...t})=>{var R,y,E,S,B,k,P,A;const o=t.tenantOptions!==void 0,r=s.useMemo(()=>{const f=t.isCloudEnabled?[ge.ADMIN,ge.MEMBER]:[ge.OWNER,ge.ADMIN,ge.MEMBER],I=Et(f);return it({email:be().email("Invalid email address"),role:o?I.optional():I,tenantId:o?be({required_error:"Select a tenant"}).min(1):be().optional()})},[t.isCloudEnabled,o]),{register:l,handleSubmit:b,control:i,formState:{errors:c}}=rt({resolver:dt(r),defaultValues:{email:t.defaultEmail??"",tenantId:t.defaultTenantId}}),u=((y=(R=c.email)==null?void 0:R.message)==null?void 0:y.toString())||((E=t.fieldErrors)==null?void 0:E.email),v=((B=(S=c.role)==null?void 0:S.message)==null?void 0:B.toString())||((k=t.fieldErrors)==null?void 0:k.role),h=(A=(P=c.tenantId)==null?void 0:P.message)==null?void 0:A.toString();return e.jsxs(Se,{className:"max-w-lg",children:[e.jsxs(ze,{children:[e.jsx(Re,{children:"Add member to tenant"}),e.jsx(ke,{children:o?"Attach a user to a tenant directly. For larger teams, we recommend using user groups to manage user access to tenants.":"Invite a user to this tenant by email."})]}),e.jsx("div",{className:ie("grid gap-6",n),children:e.jsx("form",{onSubmit:b(f=>{t.onSubmit(f)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx(ft,{errors:t.formErrors??[]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(te,{htmlFor:"email",children:"Email"}),t.emailOptions!==void 0?e.jsxs(e.Fragment,{children:[t.emailOptions.length===0&&!t.emailOptionsLoading?e.jsx(_e,{disabled:!0,placeholder:"All organization members are already in this tenant"}):e.jsx(ve,{control:i,name:"email",render:({field:f})=>e.jsx(jn,{value:f.value,onChange:f.onChange,options:t.emailOptions??[],loading:t.emailOptionsLoading})}),t.organizationId&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Not seeing your teammates?"," ",e.jsx(nt,{to:x.organizationTeamRoute.to,params:{organization:t.organizationId},onClick:t.onNavigateAway,className:"text-primary underline-offset-4 hover:underline",children:"Manage organization members"})]})]}):e.jsx(_e,{...l("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:t.isLoading}),u&&e.jsx("div",{className:"text-sm text-red-500",children:u})]}),o&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(te,{htmlFor:"tenant",children:"Tenant"}),e.jsx(ve,{control:i,name:"tenantId",render:({field:f})=>e.jsxs(je,{onValueChange:I=>{var z;f.onChange(I),(z=t.onTenantChange)==null||z.call(t,I)},value:f.value,disabled:t.tenantOptionsLoading,children:[e.jsx(ye,{className:"w-full focus:ring-0 focus-visible:ring-0",children:e.jsx(we,{id:"tenant",placeholder:t.tenantOptionsLoading?"Loading tenants...":"Tenant..."})}),e.jsx(Ee,{children:(t.tenantOptions??[]).map(I=>e.jsx(q,{value:I.id,children:I.label},I.id))})]})}),h&&e.jsx("div",{className:"text-sm text-red-500",children:h})]}),!o&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(te,{htmlFor:"role",children:"Role"}),e.jsx(ve,{control:i,name:"role",render:({field:f})=>e.jsxs(je,{onValueChange:f.onChange,value:f.value,children:[e.jsx(ye,{className:"w-[180px] focus:ring-0 focus-visible:ring-0",children:e.jsx(we,{id:"role",placeholder:"Role..."})}),e.jsxs(Ee,{children:[!t.isCloudEnabled&&e.jsx(q,{value:"OWNER",children:"Owner"}),e.jsx(q,{value:"ADMIN",children:"Admin"}),e.jsx(q,{value:"MEMBER",children:"Member"})]})]})}),v&&e.jsx("div",{className:"text-sm text-red-500",children:v})]}),e.jsxs(J,{disabled:t.isLoading,children:[t.isLoading&&e.jsx(lt,{}),o?"Add to tenant":"Invite user"]})]})})})]})},wn=({tenantId:n,organizationId:t,defaultEmail:o,onClose:r,onCreated:l})=>{var D,M,w;const{isCloudEnabled:b}=wt(),[i,c]=s.useState({}),[u,v]=s.useState([]),{handleApiError:h}=at({setErrors:v}),R=st(),y=!!t,E=Ae(),S=Y({...E.organizationGetQuery(t??""),enabled:y}),[B,k]=s.useState(n),{tenantMemberListQuery:P}=Ze(),A=Y({...P(B??""),enabled:y&&!!B}),f=s.useMemo(()=>{var d;return new Set((((d=A.data)==null?void 0:d.rows)??[]).map(g=>g.user.email))},[(D=A.data)==null?void 0:D.rows]),I=s.useMemo(()=>{var d;if(y)return(((d=S.data)==null?void 0:d.members)??[]).map(g=>g.email).filter(g=>!f.has(g))},[y,(M=S.data)==null?void 0:M.members,f]),z=s.useMemo(()=>{var d;if(y)return(((d=S.data)==null?void 0:d.tenants)??[]).filter(g=>g.status!==ot.ARCHIVED).map(g=>({id:g.id,label:g.name??g.slug??g.id}))},[y,(w=S.data)==null?void 0:w.tenants]),{tenantInviteCreateMutation:W}=Ze(),V=Ne({mutationKey:["tenant-add-or-invite"],mutationFn:async d=>{if(d.mode==="add")return await E.organizationTenantMembersAddMutation(t,d.tenantId).mutationFn({memberIds:[d.memberId]}),{tenantId:d.tenantId,invite:void 0};const g=await W(d.tenantId).mutationFn(d.data);return{tenantId:d.tenantId,invite:g}},onSuccess:({tenantId:d,invite:g})=>{R.invalidateQueries({queryKey:["tenant-member:list",d]}),t?R.invalidateQueries({queryKey:["organization:get",t]}):R.invalidateQueries({queryKey:["tenant-invite:list",d]}),g&&l(d,g),r()},onError:h});return e.jsx(Ie,{open:!0,onOpenChange:d=>!d&&r(),children:e.jsx(yn,{isLoading:V.isPending,onSubmit:({email:d,role:g,tenantId:T})=>{var ne;c({}),v([]);const Q=y?T:n;if(Q){if(t){if(f.has(d)){c({email:"This user is already a member of the selected tenant."});return}const H=(((ne=S.data)==null?void 0:ne.members)??[]).find(L=>L.email===d);if(!H){c({email:"Selected member could not be found."});return}V.mutate({mode:"add",tenantId:Q,memberId:H.metadata.id});return}V.mutate({mode:"invite",tenantId:Q,data:{email:d,role:g}})}},fieldErrors:i,formErrors:u,isCloudEnabled:b,defaultEmail:o,defaultTenantId:y?n:void 0,tenantOptions:z,tenantOptionsLoading:y&&S.isLoading,emailOptions:I,emailOptionsLoading:S.isLoading||A.isLoading,organizationId:t,onTenantChange:k,onNavigateAway:r})})},Xe=100,En=it({email:be().email("Invalid email address"),role:zt(K)}),Cn=({organizationId:n,organizationName:t,onClose:o,onCreated:r})=>{var G,re,le,he;const[l,b]=s.useState([]),[i,c]=s.useState([]),[u,v]=s.useState([]),{isControlPlaneEnabled:h}=ct(),{handleApiError:R}=at({setErrors:b}),{register:y,handleSubmit:E,reset:S,control:B,watch:k,formState:{errors:P}}=rt({resolver:dt(En),defaultValues:{email:"",role:h?K.MEMBER:K.OWNER}}),A=k("role"),f=k("email"),I=st(),z=Ae(),W=Y({...z.organizationGetQuery(n),enabled:!!n&&h}),V=Y({...z.organizationInviteListQuery(n),enabled:!!n&&h}),D=Y({...z.userGroupsListQuery(n),enabled:!!n&&h}),M=s.useMemo(()=>{var a;return(((a=W.data)==null?void 0:a.tenants)??[]).filter(p=>p.status!==ot.ARCHIVED).map(p=>({label:p.name??p.slug??p.id,value:p.id}))},[(G=W.data)==null?void 0:G.tenants]),w=s.useMemo(()=>new Map(M.map(a=>[a.value,a.label])),[M]),d=s.useMemo(()=>(D.data??[]).map(a=>({label:`${a.name} · ${a.role}`,value:a.metadata.id})),[D.data]),g=s.useMemo(()=>new Map(d.map(a=>[a.value,a.label])),[d]),T=s.useMemo(()=>{var p;const a=f==null?void 0:f.trim().toLowerCase();return a?(((p=V.data)==null?void 0:p.rows)??[]).some(O=>O.status===Pt.PENDING&&O.inviteeEmail.toLowerCase()===a):!1},[f,(re=V.data)==null?void 0:re.rows]),Q=h&&A===K.MEMBER,ne=Q&&d.length>0,H=z.organizationInviteCreateMutation(n),L=Ne({...H,mutationFn:async a=>{const p=h&&a.role===K.MEMBER,O={inviteeEmail:a.email,role:a.role,...p&&i.length>0?{tenants:i.map(({tenantId:C,tenantRole:_})=>({tenantId:C,tenantRole:_}))}:{},...p&&u.length>0?{userGroupIds:u}:{}};return await H.mutationFn(O),O},onSuccess:a=>{I.invalidateQueries({queryKey:["organization-invites:list",n]}),S(),c([]),v([]),r(a),o()},onError:R}),ae=(he=(le=P.email)==null?void 0:le.message)==null?void 0:he.toString();return e.jsx(Ie,{open:!0,onOpenChange:a=>!a&&o(),children:e.jsxs(Se,{className:"max-w-xl",children:[e.jsxs(ze,{children:[e.jsxs(Re,{className:"flex items-center gap-2",children:[e.jsx(xn,{className:"h-5 w-5"}),"Invite Member"]}),e.jsxs(ke,{children:["Invite a new member to ",t]})]}),e.jsxs("form",{onSubmit:E(a=>{b([]),L.mutate(a)}),className:"space-y-4",children:[e.jsx(ft,{errors:l}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(te,{htmlFor:"email",children:"Email Address"}),e.jsx(_e,{...y("email"),id:"email",type:"email",placeholder:"name@example.com",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:L.isPending}),ae&&e.jsx("div",{className:"text-sm text-red-500",children:ae}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"The user will receive an email invitation to join this organization."}),h&&T&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-yellow-500/50 bg-yellow-500/10 px-3 py-2 text-sm",children:[e.jsx(ht,{className:"mt-0.5 size-4 shrink-0 text-yellow-500"}),e.jsx("p",{className:"text-muted-foreground",children:"An invite for this email is already pending — cancel it first to change its role, tenant access, or groups."})]})]}),h&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(te,{htmlFor:"role",children:"Role"}),e.jsx(ve,{control:B,name:"role",render:({field:a})=>e.jsxs(je,{onValueChange:p=>{a.onChange(p),p===K.OWNER&&(c([]),v([]))},value:a.value,children:[e.jsx(ye,{children:e.jsx(we,{placeholder:"Select role..."})}),e.jsxs(Ee,{children:[e.jsx(q,{value:K.MEMBER,children:"Member"}),e.jsx(q,{value:K.OWNER,children:"Owner"})]})]})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Members access tenants based on their tags or can be added directly. Owners have full access to all tenants."})]}),Q&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(te,{children:"Tenant access (optional)"}),e.jsx("div",{children:e.jsx(Ke,{title:"Tenants",type:qe.Checkbox,options:M,values:i.map(a=>a.tenantId),setValues:a=>{const p=a.slice(0,Xe);c(O=>{const C=new Map(O.map(_=>[_.tenantId,_]));return p.map(_=>C.get(_)??{tenantId:_,tenantRole:Me.MEMBER})})},emptyMessage:"No tenants found."})}),i.length>0&&e.jsx(At,{columns:[{columnLabel:"Tenant",cellRenderer:a=>w.get(a.tenantId)??a.tenantId},{columnLabel:"Role",cellRenderer:a=>e.jsxs(je,{value:a.tenantRole,onValueChange:p=>c(O=>O.map(C=>C.tenantId===a.tenantId?{...C,tenantRole:p}:C)),disabled:L.isPending,children:[e.jsx(ye,{className:"h-8 w-32","aria-label":`Role for ${w.get(a.tenantId)??a.tenantId}`,children:e.jsx(we,{})}),e.jsxs(Ee,{children:[e.jsx(q,{value:Me.MEMBER,children:"Member"}),e.jsx(q,{value:Me.ADMIN,children:"Admin"})]})]})},{columnLabel:"",cellRenderer:a=>e.jsx("button",{type:"button",onClick:()=>c(p=>p.filter(O=>O.tenantId!==a.tenantId)),disabled:L.isPending,className:"rounded p-1 text-muted-foreground hover:text-destructive disabled:opacity-50","aria-label":`Remove ${w.get(a.tenantId)??a.tenantId}`,children:e.jsx(Pe,{className:"size-4"})})}],data:i,rowKey:a=>a.tenantId}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"The invitee will be added to these tenants when they accept."})]}),ne&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(te,{children:"User groups (optional)"}),e.jsx("div",{children:e.jsx(Ke,{title:"User groups",type:qe.Checkbox,options:d,values:u,setValues:a=>v(a.slice(0,Xe)),emptyMessage:"No user groups found."})}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(a=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[g.get(a)??a,e.jsx("button",{type:"button",onClick:()=>v(u.filter(p=>p!==a)),disabled:L.isPending,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${g.get(a)??a}`,children:e.jsx(Pe,{className:"size-3.5"})})]},a))}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Group membership grants tenant access dynamically by tags."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4",children:[e.jsx(J,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),e.jsx(J,{type:"submit",disabled:L.isPending,children:L.isPending?"Sending...":"Send Invitation"})]})]})]})})};function Nn({tenantId:n,organizationId:t,open:o,onClose:r}){var y;const{capture:l}=xt(),b=ut(),{cloud:i,isCloudEnabled:c}=kt(),u=Y({...Le.controlPlane.subscriptionPlans(),enabled:o&&c&&!!(i!=null&&i.canBill)}),v=(y=u.data)==null?void 0:y.freeLimits,h=Ne({mutationKey:["welcome:developer-plan"],mutationFn:async()=>{if(!t)throw new Error("No organization id");return(await Ft.organizationSubscriptionUpdate(t,{plan:pt.Developer})).data},onSuccess:E=>{localStorage.removeItem(ee),r(),E.checkoutUrl&&(window.location.href=E.checkoutUrl)}}),R=()=>{localStorage.removeItem(ee),r()};return e.jsx(Ie,{open:o,onOpenChange:E=>{E||R()},children:e.jsx(Se,{className:"max-w-lg",children:e.jsxs("div",{className:"flex w-full flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(Bt,{variant:"mark",className:"h-8 w-8"}),e.jsx(Re,{className:"text-2xl font-semibold tracking-tight",children:"Welcome to Hatchet"}),e.jsxs(ke,{className:"text-sm text-muted-foreground",children:["You're on the free plan with daily limits."," ",e.jsx("button",{type:"button",className:"text-primary/70 underline underline-offset-4 hover:text-primary disabled:opacity-50",disabled:h.isPending,onClick:()=>{l("welcome_modal_add_payment",{tenant_id:n,organization_id:t,cta:"upgrade_link"}),h.mutate()},children:h.isPending?"Redirecting…":"Upgrade"})," ","to the pay-as-you-go (developer) plan to remove daily limits."]})]}),e.jsxs(Dt,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(Qt,{className:"p-4 border-b border-border/50",children:e.jsx(Ut,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:"Free Plan Limits"})}),e.jsx(Wt,{className:"p-4",children:u.isLoading?e.jsx("div",{className:"flex justify-center py-2",children:e.jsx(lt,{})}):e.jsx("ul",{className:"space-y-2.5 text-sm",children:v==null?void 0:v.map(E=>e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:E.name}),e.jsx("span",{className:"font-medium",children:E.limit.toLocaleString()})]},E.featureId))})})]}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(J,{className:"w-full",onClick:()=>{l("welcome_modal_dismissed",{tenant_id:n,organization_id:t,cta:"get_started"}),R()},children:"Get started"}),e.jsx(J,{variant:"ghost",className:"w-full",onClick:()=>{l("welcome_modal_view_plans",{tenant_id:n,organization_id:t,cta:"view_plan_options"}),R(),n&&b({to:x.organizationSettingsBillingRoute.to,params:{organization:t??""}})},children:"View Plan Options"})]})]})})})}const et=["mousedown","mousemove","keypress","scroll","touchstart","click"];function In(n={}){const{timeoutMs:t=-1,throttleMs:o=1e3,onInactive:r}=n,l=t>0,b=s.useRef(r);s.useEffect(()=>{b.current=r});const i=s.useRef(null),c=s.useRef(null),u=s.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{var h;(h=b.current)==null||h.call(b)},t)},[t]),v=s.useCallback(()=>{c.current||(c.current=setTimeout(()=>{c.current=null},o),u())},[o,u]);return s.useEffect(()=>{if(l)return u(),et.forEach(h=>{document.addEventListener(h,v,!0)}),()=>{i.current&&clearTimeout(i.current),c.current&&clearTimeout(c.current),et.forEach(h=>{document.removeEventListener(h,v,!0)})}},[l,t,o,u,v]),{}}const Sn=s.createContext({isReady:!1});function Rn({children:n,user:t}){const{meta:o}=mt(),{tenant:r}=Vt(),[l,b]=s.useState(!1),i=s.useMemo(()=>o==null?void 0:o.posthog,[o==null?void 0:o.posthog]);s.useEffect(()=>{if(!l){if(r!=null&&r.analyticsOptOut){console.info("Skipping Analytics initialization due to opt-out, we respect user privacy.");return}!(i!=null&&i.apiKey)||!r||(console.info("Initializing Analytics, opt out in settings."),se.init(i.apiKey,{api_host:i.apiHost||"https://us.i.posthog.com",person_profiles:"identified_only",capture_pageleave:!0,session_recording:{maskAllInputs:!0,maskTextSelector:"*"},persistence:"localStorage+cookie",cross_subdomain_cookie:!0}),b(!0))}},[i,r,l]),s.useEffect(()=>{if(!l||!t)return;const u=Ht(localStorage.getItem(Ye));se.identify(`$user_${t.metadata.id}`,{email:t.email,name:t.name,...u&&{referral_key:u}}),u&&localStorage.removeItem(Ye)},[t,l]),s.useEffect(()=>{var u,v;l&&(r!=null&&r.analyticsOptOut?(se.opt_out_capturing(),(v=(u=se).stopSessionRecording)==null||v.call(u)):se.opt_in_capturing())},[r==null?void 0:r.analyticsOptOut,l]);const c={isReady:l};return e.jsx(Sn.Provider,{value:c,children:e.jsxs(cn,{client:se,children:[e.jsx(Tn,{}),n]})})}function Tn(){const n=gt(),t=un();return s.useEffect(()=>{if(!t)return;let o=window.origin+n.pathname;n.searchStr&&(o=`${o}?${n.searchStr}`),t.capture("$pageview",{$current_url:o})},[n.pathname,t]),null}async function ta(n){const{isControlPlaneEnabled:t}=await nn(),{isCloudEnabled:o,...r}=t?{isCloudEnabled:!1}:await Ce.fetchQuery(an);return await Ce.fetchQuery(hn(o,t)),{isCloudEnabled:o,isControlPlaneEnabled:t,inactivityLogoutMs:"inactivityLogoutMs"in r?r.inactivityLogoutMs??-1:-1}}function Mn(){var De,Qe,Ue,We,Ve;const{tenant:n,organizationId:t}=tt(),{meta:o}=mt(),{capture:r}=xt(),{currentUser:l,error:b,isLoading:i}=Gt(),[c,u]=$t(sn),[v,h]=s.useState(()=>{try{return localStorage.getItem("auth-disabled-banner-dismissed")==="true"}catch{return!1}}),[R,y]=s.useState(!1),[E,S]=s.useState(),[B,k]=s.useState([]),[P,A]=s.useState(),[f,I]=s.useState(),[z,W]=s.useState(!1),[V,D]=s.useState(!1),M=Kt({from:"/"}),w=ut(),g=gt().pathname,T=qt(),Q=!!T({to:x.authLoginRoute.to})||!!T({to:x.authRegisterRoute.to}),ne=!!T({to:x.tenantRoute.to,fuzzy:!0}),H=!!T({to:x.organizationsRoute.to,fuzzy:!0}),L=!!T({to:x.tenantsRoute.to}),ae=!!T({to:x.onboardingVerifyRoute.to}),G=!!T({to:x.onboardingInvitesRoute.to}),re=!!T({to:x.onboardingCreateTenantRoute.to}),le=!!T({to:x.onboardingCreateOrganizationRoute.to}),he=!!T({to:x.onboardingNoTenantsRoute.to}),a=ae||G||re||le||he,{userUpdateLogoutMutation:p}=Yt(),O=Ne({...p(),onSettled:()=>{Ce.clear(),w({to:x.authLoginRoute.to})}}),{pendingInvitesQuery:C}=gn({isCloudEnabled:M.isCloudEnabled,isControlPlaneEnabled:M.isControlPlaneEnabled}),{isCloudEnabled:_,isLoaded:de,isFetching:Fe,organizations:Z,tenantMemberships:N}=Jt(),{controlPlaneMeta:U,isControlPlaneEnabled:ce}=ct(),bt=Ae(),Be=(Qe=(De=Z==null?void 0:Z.find(m=>{var j;return(j=m.tenants)==null?void 0:j.some(X=>{var F;return X.id===((F=n==null?void 0:n.metadata)==null?void 0:F.id)})}))==null?void 0:De.metadata)==null?void 0:Qe.id,vt=Y({...bt.organizationGetQuery(Be),enabled:!!Be&&ce}),jt=ce?((Ue=vt.data)==null?void 0:Ue.inactivity_timeout)??-1:M.inactivityLogoutMs,$=Y({...Le.controlPlane.billing(t||""),enabled:_&&ce&&!!(U!=null&&U.canBill)&&!!t,retry:!1});In({timeoutMs:jt,onInactive:()=>{O.mutate()}});const yt=fn({user:l,memberships:N});return s.useEffect(()=>{var ue;const m=b,j=()=>{g!=="/"&&!g.startsWith("/onboarding/")&&!g.startsWith("/auth/")&&sessionStorage.setItem(Oe,g)};if(H||L)return;if(!i&&!l&&!Q){j(),w({to:x.authLoginRoute.to,replace:!0});return}if((m==null?void 0:m.status)===401||(m==null?void 0:m.status)===403){j(),w({to:x.authLoginRoute.to,replace:!0});return}if(l&&!l.emailVerified&&!ae){w({to:x.onboardingVerifyRoute.to,replace:!0});return}const X=C.isSuccess?C.data:null,F=C.isSuccess&&!a&&de&&!Fe,He=_&&de&&Z.length===0,fe=F&&((N==null?void 0:N.length)??0)===0&&X&&X.inviteCount>0;if(!G&&fe){w({to:x.onboardingInvitesRoute.to,replace:!0});return}else if(F&&He){j(),w({to:x.onboardingCreateOrganizationRoute.to,replace:!0});return}else if(F&&ce&&Z&&Z.length>0&&N.length===0){j(),w({to:x.onboardingNoTenantsRoute.to,replace:!0});return}else if(F&&N.length===0){j(),w({to:x.onboardingCreateTenantRoute.to,replace:!0});return}if(g==="/"&&N&&N.length>0){const Ge=sessionStorage.getItem(Oe);if(Ge){sessionStorage.removeItem(Oe),w({to:Ge,replace:!0});return}const Te=c==null?void 0:c.metadata.id,$e=Te?(ue=N.find(pe=>{var xe;return((xe=pe.tenant)==null?void 0:xe.metadata.id)===Te}))==null?void 0:ue.tenant:void 0;Te&&!$e&&(u(void 0),M.isControlPlaneEnabled&&localStorage.removeItem(Je));const me=$e??N[0].tenant;me&&(M.isControlPlaneEnabled&&localStorage.setItem(Je,JSON.stringify(me)),Zt.workflowList(me.metadata.id,{limit:1}).then(pe=>{const xe=pe.data.rows&&pe.data.rows.length>0;w({to:xe?x.tenantRunsRoute.to:x.tenantOverviewRoute.to,params:{tenant:me.metadata.id},replace:!0})}).catch(()=>{w({to:x.tenantRunsRoute.to,params:{tenant:me.metadata.id},replace:!0})}))}},[n==null?void 0:n.metadata.id,l,C,N,n==null?void 0:n.version,b,i,w,c,g,H,L,ae,G,a,Q,u,_,de,Fe,Z,le,re,ce,M.isControlPlaneEnabled]),s.useEffect(()=>oe.on("create-new-tenant",({defaultOrganizationId:m,allTenantTags:j})=>{S(m),k(j??[]),y(!0)}),[]),s.useEffect(()=>oe.on("create-tenant-invite",m=>{A(m)}),[]),s.useEffect(()=>oe.on("create-organization-invite",({organizationId:m,organizationName:j})=>{I({organizationId:m,organizationName:j})}),[]),s.useEffect(()=>oe.on("open-invite-modal",()=>{D(!0)}),[]),s.useEffect(()=>{var fe,ue;const m=ln(localStorage.getItem(ee));if(!m||!(n!=null&&n.metadata.id)||!de)return;if(!_){localStorage.removeItem(ee);return}if(!t||!(U!=null&&U.canBill))return;if(m===dn.OrganizationCreated){localStorage.removeItem(ee),W(!0),r("welcome_modal_shown",{tenant_id:n==null?void 0:n.metadata.id,source:m});return}if($.isPending)return;const j=$.error,X=(j==null?void 0:j.status)===404||((fe=j==null?void 0:j.response)==null?void 0:fe.status)===404;if($.isError&&!X)return;const F=X||(ue=$.data)==null?void 0:ue.currentSubscription;if(!(!F||F.plan===pt.Free)){localStorage.removeItem(ee);return}localStorage.removeItem(ee),W(!0),r("welcome_modal_shown",{tenant_id:n==null?void 0:n.metadata.id,source:m})},[n==null?void 0:n.metadata.id,t,r,_,de,U==null?void 0:U.canBill,(We=$.data)==null?void 0:We.currentSubscription,$.error,$.isError,$.isPending]),s.useEffect(()=>{var m;!G&&C.isSuccess&&!C.isFetching&&(((m=C.data)==null?void 0:m.inviteCount)??0)>0&&((N==null?void 0:N.length)??0)>0&&D(!0)},[C.isSuccess,C.isFetching,(Ve=C.data)==null?void 0:Ve.inviteCount,G,N==null?void 0:N.length]),l?e.jsx(Rn,{user:l,children:e.jsxs(en,{user:l,children:[e.jsx(bn,{banner:o&&"authDisabled"in o&&o.authDisabled&&!v?e.jsx(vn,{onDismiss:()=>{try{localStorage.setItem("auth-disabled-banner-dismissed","true")}catch{}h(!0)}}):void 0,header:e.jsx(mn,{user:l,tenantMemberships:N||[]}),footer:void 0,contentScroll:!ne,children:e.jsx(tn,{context:yt})}),e.jsx(Ie,{open:R,onOpenChange:y,children:e.jsxs(Se,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(ze,{children:e.jsx(Re,{children:"Create New Tenant"})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(on,{defaultOrganizationId:E,allTenantTags:B,afterSave:m=>{S(void 0),k([]),y(!1);const j=m.type==="cloud"?m.tenant.id:m.tenant.metadata.id;m.type==="cloud"&&Ce.prefetchQuery(Le.controlPlane.subscriptionPlans()),w({to:x.tenantOverviewRoute.to,params:{tenant:j}})}})})]})}),P&&e.jsx(wn,{tenantId:P.tenantId,organizationId:P.organizationId,defaultEmail:P.defaultEmail,onClose:()=>A(void 0),onCreated:(m,j)=>{oe.emit("tenant-invite-created",{tenantId:m,invite:j})}}),f&&e.jsx(Cn,{organizationId:f.organizationId,organizationName:f.organizationName,onClose:()=>I(void 0),onCreated:m=>{oe.emit("organization-invite-created",{organizationId:f.organizationId,invite:m})}}),e.jsx(Nn,{tenantId:n==null?void 0:n.metadata.id,organizationId:t,open:z,onClose:()=>W(!1)}),e.jsx(rn,{isOpen:V,onClose:()=>D(!1)})]})}):e.jsx(Xt,{})}function na(){return e.jsx(Mn,{})}export{na as default,ta as loader}; diff --git a/hatchetembed/dashboard/assets/billing-WBONcYPA.js b/hatchetembed/dashboard/assets/billing-WBONcYPA.js deleted file mode 100644 index 3d125496aa..0000000000 --- a/hatchetembed/dashboard/assets/billing-WBONcYPA.js +++ /dev/null @@ -1 +0,0 @@ -import{y as ne,N as te,O as L,k as d,j as e,S as F,W as B,X as z,a4 as $,Z as q,a3 as I,aK as pe,aF as Ae,B as U,au as Ee,l as Me,a2 as se,p as De,q as Z,c as je,A as W,T as Q,d as V,aq as ye,ab as Be,aL as ze,aM as Le,aN as Ie,aO as Fe,aP as $e,L as qe,aQ as Re,aR as Oe,aS as be,aT as Y,aU as Ye,aV as H,aI as He,b as Ke,af as We,w as Qe,aW as Ce}from"./index-NcPpBRAY.js";import{C as Ve}from"./confirm-dialog-Bv8agSqW.js";import{S as Ge}from"./switch-C9IBAXBS.js";import{S as Ne,a as A}from"./data-contracts-C0lcHVTf.js";import{S as Xe}from"./settings-page-header-CkCZd3CN.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="3e2d9f76-ea48-4f77-b616-76d6db66e662",n._sentryDebugIdIdentifier="sentry-dbid-3e2d9f76-ea48-4f77-b616-76d6db66e662")}catch{}})();function ee(n,t){const a=t==="yearly"?n/100/12:n/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a)}function Ze(n,t){return t.percent?Math.round(n*(1-t.percent/100)):t.amount_cents?Math.max(0,n-t.amount_cents):n}function Je(n){return n.percent?`${n.percent}% off`:n.amount_cents?`${ee(n.amount_cents)} off`:n.name}function en({activePlanCode:n,activePlanAmountCents:t,upcomingPlanCode:a,showAnnual:r,onSelectPlan:c,enterpriseContactUrl:u,loading:m,selectLabel:w,coupons:p}){var f;const{controlPlaneMeta:o,isControlPlaneEnabled:v}=ne(),b=p==null?void 0:p[0],j=te({...L.controlPlane.subscriptionPlans(),enabled:v&&!!(o!=null&&o.canBill)}),C=(f=j.data)==null?void 0:f.plans,P=d.useMemo(()=>{const i=C==null?void 0:C.filter(h=>!h.legacy&&h.planCode!=="free"),k=h=>i==null?void 0:i.some(g=>{var l;return g.planCode.startsWith(h.split("_")[0])&&((l=g.period)==null?void 0:l.includes("yearly"))});return i==null?void 0:i.filter(h=>{var g,l;return r?((g=h.period)==null?void 0:g.includes("yearly"))||!k(h.planCode):((l=h.period)==null?void 0:l.includes("monthly"))||!h.period}).sort((h,g)=>h.amountCents-g.amountCents)},[C,r]),y=d.useCallback(i=>{const k=t??0;return i.amountCents>k||i.amountCents===0&&k===0},[t]),x=P;return j.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(F,{})}):e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[x==null?void 0:x.map(i=>{const k=i.planCode===n,h=i.planCode===a,g=b&&i.amountCents>0,l=g?Ze(i.amountCents,b):i.amountCents;return e.jsx(Se,{name:i.name,price:ee(l,i.period),originalPrice:g&&l!==i.amountCents?ee(i.amountCents,i.period):void 0,couponBadge:g&&l!==i.amountCents?Je(b):void 0,showAnnual:r,featureGroups:i.featureGroups,isUpgrade:y(i),isActive:k,isUpcoming:h,isLoading:m===i.planCode,onSelect:()=>c(i),selectLabel:w},i.planCode)}),e.jsx(Se,{name:"Enterprise",description:"Have technical or compliance requirements?",enterpriseHighlights:["100M+ runs per month","Custom SLAs & uptime guarantees","Dedicated support & onboarding","SSO / SAML & audit logging","Bring your own cloud"],onSelect:()=>window.open(u,"_blank"),buttonLabel:"Contact Us"})]})}function Se({name:n,price:t,originalPrice:a,couponBadge:r,showAnnual:c,description:u,featureGroups:m,enterpriseHighlights:w,isUpgrade:p,isActive:o,isUpcoming:v,isLoading:b,onSelect:j,buttonLabel:C,selectLabel:P}){return e.jsxs(B,{variant:"light",className:`bg-transparent ring-1 border-none flex flex-col ${o?"ring-primary":"ring-border/50"}`,children:[e.jsx(z,{className:"p-4 border-b border-border/50",children:e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:n})}),e.jsxs(q,{className:"p-4 flex flex-col flex-1 gap-4",children:[e.jsx("div",{children:t?e.jsxs(e.Fragment,{children:[a&&e.jsx("span",{className:"text-sm text-muted-foreground line-through mr-2",children:a}),e.jsx("span",{className:"text-xl font-semibold text-foreground",children:t}),e.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["/ mo ",c?"":" + usage"]}),r&&e.jsx(I,{variant:"successful",className:"ml-2 text-[10px] align-middle",children:r}),c&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"billed yearly + usage billed monthly"})]}):e.jsx("span",{className:"text-sm text-muted-foreground",children:u})}),w&&w.length>0&&e.jsx("ul",{className:"space-y-1.5 flex-1",children:w.map(y=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(pe,{className:"size-3.5 mt-0.5 shrink-0 text-primary"}),e.jsx("span",{className:"text-foreground",children:y})]},y))}),m&&m.length>0&&e.jsx("div",{className:"space-y-3 flex-1",children:m.map(y=>e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1.5",children:y.name}),e.jsx("ul",{className:"space-y-1.5",children:y.features.map(x=>{var f,i;return e.jsxs("li",{className:`flex items-start gap-2 text-sm ${x.included?"":"opacity-40"}`,children:[x.included?e.jsx(pe,{className:"size-3.5 mt-0.5 shrink-0 text-primary"}):e.jsx(Ae,{className:"size-3.5 mt-0.5 shrink-0 text-muted-foreground"}),e.jsxs("span",{children:[e.jsx("span",{className:x.included?"text-foreground":"text-muted-foreground",children:((f=x.display)==null?void 0:f.primaryText)??x.name}),x.included&&((i=x.display)==null?void 0:i.secondaryText)&&e.jsx("span",{className:"text-foreground block",children:x.display.secondaryText})]})]},x.featureId)})})]},y.name))}),e.jsx(U,{variant:o||v?"outline":p?"default":"outline",size:"sm",disabled:o||v||b,onClick:j,className:"w-full mt-auto",children:b?e.jsx(F,{}):o?"Current Plan":v?"Upcoming Plan":C||P||(p?"Upgrade":"Downgrade")})]})]})}function G(n,t){return(n==null?void 0:n.planCode)??t}function nn(n,t){const a=t==="yearly"?n/100/12:n/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a)}function tn(n,t){const a=n||t;return a?a.split("_").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Unknown plan"}function sn(n){return n?`${n.charAt(0).toUpperCase()+n.slice(1)} billing`:"Active subscription"}function an(n){return n===Ne.Starter||n===Ne.Growth}function J(n){return!!n&&typeof n=="object"}function rn(n){const t="We could not change your plan. Please try again or contact us if this keeps happening.";if(J(n)){const a=n.response;if(J(a)){const r=a.data;if(J(r)){if(r.code==="plan_already_attached")return"This plan is already attached to your organization. Refreshing billing details should show the current plan.";if(typeof r.message=="string")return r.message;if(typeof r.description=="string")return r.description}}}return n instanceof Error&&n.message?n.message:t}const ln=({active:n,upcoming:t,plans:a,coupons:r})=>{var le,oe,ce,de,ue;const[c,u]=d.useState(),[m,w]=d.useState(!1),[p,o]=d.useState(void 0),[v,b]=d.useState(),[j,C]=d.useState(),{tenantId:P,tenant:y,billing:x,organizationId:f}=Ee(),{controlPlaneMeta:i,isControlPlaneEnabled:k}=ne(),{handleApiError:h}=Me({}),g=se(),[l,T]=d.useState(!1),S=te({...L.controlPlane.creditBalance(f||""),enabled:k&&!!(i!=null&&i.canBill)&&!!f}),M=d.useMemo(()=>{var me,xe,he,fe,ge;const s=((me=S.data)==null?void 0:me.balanceCents)??0;if(s>=0)return null;const N=(((xe=S.data)==null?void 0:xe.currency)||"USD").toUpperCase().slice(0,3);let _;try{_=new Intl.NumberFormat("en-US",{style:"currency",currency:N}).format(Math.abs(s)/100)}catch{_=`$${(Math.abs(s)/100).toFixed(2)}`}const R=(fe=(he=S.data)==null?void 0:he.description)==null?void 0:fe.trim(),O=(ge=S.data)==null?void 0:ge.expiresAt;return{amount:_,description:R,expires:O}},[(le=S.data)==null?void 0:le.balanceCents,(oe=S.data)==null?void 0:oe.currency,(ce=S.data)==null?void 0:ce.description,(de=S.data)==null?void 0:de.expiresAt]),ae=async()=>{try{if(l||(T(!0),!f))return;const s=await je.billingPortalLinkGet(f);window.open(s.data.url,"_blank")}catch(s){h(s)}finally{T(!1)}},re=De({mutationKey:["organization-subscription:update"],onMutate:({plan_code:s})=>{u(s),b(void 0),C(void 0)},mutationFn:async({plan_code:s})=>{const[N,_]=s.split("_");if(!f)throw new Error("Organization not found for billing");return(await je.organizationSubscriptionUpdate(f,{plan:N,period:_})).data},onSuccess:async(s,N)=>{if(s.checkoutUrl){window.location.href=s.checkoutUrl;return}C(N.plan_code);const _=[Z.invalidateQueries({queryKey:L.controlPlane.billing(f).queryKey})];P&&_.push(Z.invalidateQueries({queryKey:L.tenantResourcePolicy.get(P).queryKey})),await Promise.all(_)},onError:s=>{b(rn(s)),C(void 0),u(void 0),p||h(s),f&&Z.invalidateQueries({queryKey:L.controlPlane.billing(f).queryKey})}}),E=d.useMemo(()=>G(n,"free")??"free",[n]);d.useEffect(()=>{var s;return w(((s=n==null?void 0:n.period)==null?void 0:s.includes("yearly"))||!1)},[n]);const X=d.useMemo(()=>G(t,null),[t]);d.useEffect(()=>{j&&(E!==j&&X!==j||(u(void 0),C(void 0),b(void 0),o(void 0)))},[E,j,X]);const Pe=d.useMemo(()=>{var s;return(s=a==null?void 0:a.find(N=>N.planCode===E))==null?void 0:s.amountCents},[a,E]),ie=d.useMemo(()=>n!=null&&n.endsAt?new Date(n.endsAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null,[n==null?void 0:n.endsAt]),D=d.useMemo(()=>{if(!(n!=null&&n.plan))return null;const s=a==null?void 0:a.find(N=>N.planCode===E);return s?{name:s.name,amountCents:s.amountCents,period:s.period,legacy:!!s.legacy}:{name:tn(E,n.plan),period:n.period,legacy:an(n.plan)}},[n,E,a]),ke=d.useMemo(()=>{var O;const s="https://cal.com/team/hatchet/website-demo";if(!y)return s;const N=y.name||"Unknown",_=((O=y.metadata)==null?void 0:O.id)||P,R=`Custom pricing request for tenant '${N}' (${_})`;return`${s}?notes=${encodeURIComponent(R)}`},[y,P]),_e=(n==null?void 0:n.plan)==="dedicated",Te=s=>{b(void 0),C(void 0),o(s)},Ue=()=>{c||j||(b(void 0),o(void 0))};return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{isOpen:!!p,title:"Confirm Plan Change",submitVariant:"default",description:e.jsxs(e.Fragment,{children:["Are you sure you'd like to change to the"," ",e.jsx("span",{className:"font-semibold",children:p==null?void 0:p.name})," ","plan?",e.jsx("br",{}),e.jsx("br",{}),"Upgrades will be prorated and downgrades will take effect at the end of the billing period.",v&&e.jsxs(W,{variant:"destructive",className:"mt-4",children:[e.jsx(Q,{children:"Plan change failed"}),e.jsx(V,{children:v})]})]}),submitLabel:"Change Plan",onSubmit:()=>{p&&re.mutate({plan_code:p.planCode})},onCancel:Ue,cancelDisabled:!!c||!!j,isLoading:!!c}),e.jsx("div",{children:_e?e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xl font-semibold leading-tight text-foreground",children:"You are on a Dedicated plan"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Contact us to make changes to your plan."})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[g.enabled&&e.jsx(U,{onClick:g.show,variant:"outline",children:"Contact us"}),e.jsx(U,{asChild:!0,variant:"outline",children:e.jsx("a",{href:ye,target:"_blank",rel:"noreferrer",children:"Office hours"})}),e.jsx(U,{onClick:ae,variant:"outline",disabled:l,children:l?e.jsx(F,{}):"Manage Billing"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("h3",{className:"flex flex-row items-center gap-2 text-xl font-semibold leading-tight text-foreground",children:["Subscription",r==null?void 0:r.map((s,N)=>e.jsxs(I,{variant:"successful",children:[s.name," coupon applied"]},`c${N}`))]}),e.jsx(Be,{className:"my-4"}),M&&e.jsx(B,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-emerald-500/30 border-none",children:e.jsx(z,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Available Credit"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:M.description||"Applied to upcoming invoices."})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-xl font-semibold text-foreground whitespace-nowrap",children:M.amount}),M.expires&&e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground whitespace-nowrap",children:["Expires"," ",e.jsx(ze,{date:M.expires,future:!0})]})]})]})})}),D&&e.jsxs(B,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-border/50 border-none",children:[e.jsxs(z,{className:"p-4 border-b border-border/50 flex flex-row items-center justify-between",children:[e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Current Plan"}),e.jsx(U,{onClick:ae,variant:"outline",size:"sm",disabled:l,children:l?e.jsx(F,{}):"Manage Billing"})]}),e.jsx(q,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-lg font-semibold text-foreground",children:D.name}),D.legacy&&e.jsx(Le,{children:e.jsxs(Ie,{children:[e.jsx(Fe,{children:e.jsx(I,{variant:"queued",children:"Legacy"})}),e.jsx($e,{side:"right",children:"You're on a legacy plan which is no longer offered. Contact us if you have any questions."})]})})]}),ie&&e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Service ends on ",ie]})]}),e.jsx("div",{className:"text-right",children:typeof D.amountCents=="number"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xl font-bold text-foreground",children:nn(D.amountCents,D.period)}),e.jsx("span",{className:"text-sm text-muted-foreground ml-1",children:"/ month"})]}):e.jsx("span",{className:"text-sm text-muted-foreground",children:sn(D.period)})})]})})]}),t&&t.plan&&e.jsx(B,{variant:"light",className:"mb-6 bg-transparent ring-1 ring-yellow-500/30 border-none",children:e.jsx(z,{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx(I,{variant:"inProgress",children:"Scheduled Change"})}),e.jsxs("p",{className:"text-sm text-foreground",children:["Switching to"," ",e.jsx("span",{className:"font-semibold",children:((ue=a==null?void 0:a.find(s=>s.planCode===[t.plan,t.period].filter(N=>!!N).join("_")))==null?void 0:ue.name)||t.plan})]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Takes effect on"," ",new Date(t.startedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]})]})})})}),e.jsxs("div",{className:"flex flex-row items-center justify-between mb-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["For plan details, visit"," ",e.jsx("a",{href:"https://hatchet.run/pricing",className:"text-primary/70 hover:text-primary hover:underline",target:"_blank",rel:"noreferrer",children:"our pricing page"})," ","or"," ",e.jsx("a",{href:ye,className:"text-primary/70 hover:text-primary hover:underline",children:"contact us"})," ","for custom requirements."]}),e.jsxs("div",{className:"flex gap-2 items-center shrink-0 ml-4",children:[e.jsx(Ge,{id:"sa",checked:m,onClick:()=>{w(s=>!s)}}),e.jsxs(qe,{htmlFor:"sa",className:"text-sm whitespace-nowrap",children:["Annual Billing",e.jsx(I,{variant:"inProgress",className:"ml-2",children:"Save up to 20%"})]})]})]}),e.jsx(en,{activePlanCode:E,activePlanAmountCents:Pe,upcomingPlanCode:X,showAnnual:m,onSelectPlan:s=>{x!=null&&x.hasPaymentMethods?Te(s):re.mutate({plan_code:s.planCode})},enterpriseContactUrl:ke,loading:c,coupons:r})]})})]})},on={[A.Current]:"Current",[A.Upcoming]:"Upcoming",[A.Past]:"Past"},cn={[A.Current]:"successful",[A.Upcoming]:"inProgress",[A.Past]:"queued"},K={[A.Upcoming]:0,[A.Current]:1,[A.Past]:2};function dn(n){return[...n].sort((t,a)=>{const r=t.status?K[t.status]:K.past,c=a.status?K[a.status]:K.past;if(r!==c)return r-c;const u=t.startedAt?new Date(t.startedAt).getTime():0;return(a.startedAt?new Date(a.startedAt).getTime():0)-u})}function we(n){if(!n)return"—";const t=new Date(n);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function un({history:n,plans:t}){const a=c=>{var u;return((u=t==null?void 0:t.find(m=>m.planCode===c.planCode))==null?void 0:u.name)??c.planCode},r=n?dn(n):[];return e.jsxs(B,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(z,{className:"p-4 border-b border-border/50",children:e.jsx($,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground",children:"Plan History"})}),e.jsx(q,{className:"p-0",children:r.length>0?e.jsxs(Re,{children:[e.jsx(Oe,{children:e.jsxs(be,{children:[e.jsx(Y,{className:"px-4",children:"Plan"}),e.jsx(Y,{children:"Status"}),e.jsx(Y,{children:"Started"}),e.jsx(Y,{children:"Ended"})]})}),e.jsx(Ye,{children:r.map((c,u)=>e.jsxs(be,{children:[e.jsx(H,{className:"px-4 font-medium text-foreground",children:a(c)}),e.jsx(H,{children:c.status?e.jsx(I,{variant:cn[c.status],children:on[c.status]}):"—"}),e.jsx(H,{className:"text-muted-foreground",children:we(c.startedAt)}),e.jsx(H,{className:"text-muted-foreground",children:we(c.endsAt)})]},`${c.planCode}-${c.startedAt}-${u}`))})]}):e.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:"No plan history yet. Plan changes will appear here."})})]})}const mn=2e3,xn=9e4,hn=6e3;function ve({children:n}){return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(Xe,{title:"Billing",description:"Manage your organization subscription, payment methods, and plan changes."}),n]})})}function fn(){const n=se();return e.jsxs(B,{variant:"light",className:"mt-6",children:[e.jsx(z,{children:e.jsx($,{children:"Billing maintenance"})}),e.jsxs(q,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"We're making some upgrades to billing. Check back soon, or contact us if you need help."}),n.enabled&&e.jsx(U,{onClick:n.show,variant:"outline",children:"Contact us"})]})]})}function gn({isRetrying:n,isUnauthorized:t,onRetry:a}){const r=se();return e.jsxs(B,{variant:"light",className:"mt-6",children:[e.jsx(z,{children:e.jsx($,{children:t?"Unauthorized":"Billing unavailable"})}),e.jsxs(q,{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t?"You must be an organization owner to view billing and usage details.":"We couldn't load this organization's billing and usage details. Please try again, or contact us if this keeps happening."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(U,{onClick:a,variant:"outline",disabled:n,children:n?e.jsx(F,{}):"Try again"}),r.enabled&&e.jsx(U,{onClick:r.show,variant:"outline",children:"Contact us"})]})]})]})}function Sn(){const{controlPlaneMeta:n}=ne();return n!=null&&n.billingMaintenanceMode?e.jsx(ve,{children:e.jsx(fn,{})}):e.jsx(ve,{children:e.jsx(pn,{})})}function pn(){var C,P,y,x,f,i,k,h,g;const{organization:n}=He({from:Ke.organizationsRoute.to}),{cloud:t,isCloudEnabled:a}=We(),[r,c]=Qe(),[u]=d.useState(()=>r.get("billing_sync")==="plan_change"?r.get("plan_code"):null),[m,w]=d.useState(()=>r.get("billing_sync")==="plan_change"&&r.get("plan_code")?"syncing":"idle");d.useEffect(()=>{r.get("billing_sync")===null&&r.get("plan_code")===null||c(l=>(l.delete("billing_sync"),l.delete("plan_code"),l),{replace:!0})},[]);const p=m==="syncing",o=te({...L.controlPlane.billing(n),enabled:a&&!!(t!=null&&t.canBill),retry:(l,T)=>{const S=Ce(T);return S!==401&&S!==403&&l<3},refetchInterval:p?mn:!1}),v=G((C=o.data)==null?void 0:C.currentSubscription,null),b=G((P=o.data)==null?void 0:P.upcomingSubscription,null);d.useEffect(()=>{m!=="syncing"||!u||(v===u||b===u)&&w("done")},[m,u,v,b]),d.useEffect(()=>{if(m!=="syncing")return;const l=setTimeout(()=>w("timeout"),xn);return()=>clearTimeout(l)},[m]),d.useEffect(()=>{if(m!=="done")return;const l=setTimeout(()=>w("idle"),hn);return()=>clearTimeout(l)},[m]);const j=d.useMemo(()=>{var l,T,S;return u?((S=(T=(l=o.data)==null?void 0:l.plans)==null?void 0:T.find(M=>M.planCode===u))==null?void 0:S.name)??null:null},[(y=o.data)==null?void 0:y.plans,u]);if(o.isError){const l=Ce(o.error),T=l===401||l===403;return e.jsx(gn,{isRetrying:o.isFetching,isUnauthorized:T,onRetry:()=>{o.refetch()}})}return e.jsxs(e.Fragment,{children:[m==="syncing"&&e.jsxs(W,{variant:"info",className:"mb-6",children:[e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),"Finalizing your plan change"]}),e.jsx(V,{children:j?`We're activating the ${j} plan...`:"We're activating your new plan..."})]}),m==="done"&&e.jsxs(W,{variant:"info",className:"mb-6",children:[e.jsx(Q,{children:"Plan change complete"}),e.jsx(V,{children:j?`Your ${j} plan is now active.`:"Your new plan is now active."})]}),m==="timeout"&&e.jsxs(W,{variant:"warn",className:"mb-6",children:[e.jsx(Q,{children:"Your plan change is still processing"}),e.jsxs(V,{className:"flex flex-col gap-3",children:[e.jsx("span",{children:"This is taking longer than expected. Your change may still be finalizing in the background."}),e.jsx("div",{children:e.jsx(U,{size:"sm",variant:"outline",onClick:()=>{w("syncing"),o.refetch()},children:"Check again"})})]})]}),e.jsx(ln,{active:(x=o.data)==null?void 0:x.currentSubscription,upcoming:(f=o.data)==null?void 0:f.upcomingSubscription,plans:(i=o.data)==null?void 0:i.plans,coupons:(k=o.data)==null?void 0:k.coupons}),e.jsxs("div",{className:"mt-12 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Plan history"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A record of subscription changes for this organization."})]}),e.jsx(un,{history:(h=o.data)==null?void 0:h.subscriptionHistory,plans:(g=o.data)==null?void 0:g.plans})]})]})}export{Sn as default}; diff --git a/hatchetembed/dashboard/assets/billing-required-D8JPVUCq.js b/hatchetembed/dashboard/assets/billing-required-D8JPVUCq.js deleted file mode 100644 index bdca69cb75..0000000000 --- a/hatchetembed/dashboard/assets/billing-required-D8JPVUCq.js +++ /dev/null @@ -1 +0,0 @@ -import{k as r,cI as x,N as u,O as f,j as e,B as i,g as h,b as p,aq as j}from"./index-NcPpBRAY.js";import{F as g}from"./managed-compute-Dhtcalwt.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="e72e2ebb-0c51-4f26-b85a-7f870411f0cf",s._sentryDebugIdIdentifier="sentry-dbid-e72e2ebb-0c51-4f26-b85a-7f870411f0cf")}catch{}})();function N({title:s,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const b=r.forwardRef(N);function y({title:s,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const v=r.forwardRef(y);function C({tenant:s,manageClicked:a,portalLoading:t}){var d,c,m;const{tenantId:l}=x(),n=u({...f.cloud.getComputeCost((s==null?void 0:s.metadata.id)||""),enabled:!!(s!=null&&s.metadata.id)}),o=((d=n.data)==null?void 0:d.hasCreditsRemaining)&&((c=n.data)==null?void 0:c.creditsRemaining)!==void 0;return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("div",{className:"rounded-lg border bg-card p-12 shadow-sm",children:e.jsxs("div",{className:"mx-auto flex max-w-md flex-col items-center text-center",children:[e.jsx("div",{className:"mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10",children:e.jsx(g,{className:"h-8 w-8 text-primary"})}),e.jsx("h3",{className:"mb-2 text-2xl font-semibold",children:"Ready to supercharge your task runs?"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Unlock Managed Compute by setting up billing. No commitment required - you only pay for what you use!"}),e.jsx("div",{className:"mb-6 w-full rounded-lg border bg-muted/10 p-4",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"mr-3 flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:e.jsx(v,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("h4",{className:"font-medium",children:"Transparent Pay as You Go Pricing"}),e.jsxs("div",{className:"mt-2 grid gap-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"CPU:"}),e.jsx("span",{className:"font-medium",children:"$0.01/hour/CPU"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Memory:"}),e.jsx("span",{className:"font-medium",children:"$0.01/hour/GB RAM"})]}),o&&((m=n.data)==null?void 0:m.creditsRemaining)!==void 0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Monthly Free Credits:"}),e.jsx("span",{className:"font-medium text-green-500",children:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n.data.creditsRemaining)})]})]})]})]})}),e.jsx("div",{className:"mb-8 flex justify-center rounded-lg bg-muted/30 p-6",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-3 text-left text-sm",children:[e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Auto-scaling workers based on slots"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Zero infrastructure headaches"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Multiple regions and machine types"})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"No cold starts"})]})]})}),e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx(i,{onClick:a,disabled:t,className:"min-w-40 px-8 py-6 text-base",size:"lg",children:t?"Loading...":"Set Up Billing →"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Not ready yet?"})})]}),e.jsx(h,{to:p.tenantManagedWorkersTemplateRoute.to,params:{tenant:l},className:"w-full",children:e.jsx(i,{variant:"outline",className:"w-full min-w-40 px-8 py-6 text-base",size:"lg",children:"Deploy a Demo Template for Free"})}),e.jsxs("div",{className:"relative mt-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Have questions or requirements?"})})]}),e.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"w-full",children:e.jsxs(i,{variant:"ghost",className:"flex w-full min-w-40 items-center justify-center gap-2 px-8 py-6 text-base",size:"lg",children:[e.jsx(b,{className:"h-5 w-5"}),"Book a Call with Our Team"]})})]})]})})})})}export{C as B,v as F}; diff --git a/hatchetembed/dashboard/assets/confirm-dialog-Bv8agSqW.js b/hatchetembed/dashboard/assets/confirm-dialog-Bv8agSqW.js deleted file mode 100644 index 57386a415f..0000000000 --- a/hatchetembed/dashboard/assets/confirm-dialog-Bv8agSqW.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,_ as x,$ as g,a0 as u,a1 as b,B as d,S as h}from"./index-NcPpBRAY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="423ed45c-6094-418f-8a0a-5cf0ce7b7a52",s._sentryDebugIdIdentifier="sentry-dbid-423ed45c-6094-418f-8a0a-5cf0ce7b7a52")}catch{}})();function m({className:s,title:a,description:i,submitLabel:l,submitVariant:t="destructive",submitDisabled:o=!1,cancelDisabled:r=!1,cancelLabel:c="Cancel",isOpen:f,...n}){return e.jsx(x,{open:f,children:e.jsxs(g,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(u,{children:e.jsx(b,{children:a})}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 text-sm text-foreground",children:i}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(d,{variant:"ghost",disabled:r,onClick:()=>{n.onCancel()},children:c}),e.jsxs(d,{variant:t,onClick:n.onSubmit,disabled:n.isLoading||o,children:[n.isLoading&&e.jsx(h,{}),l]})]})]})]})})}export{m as C}; diff --git a/hatchetembed/dashboard/assets/create-worker-form-BqgLk5vw.js b/hatchetembed/dashboard/assets/create-worker-form-BqgLk5vw.js deleted file mode 100644 index 44ac9f2243..0000000000 --- a/hatchetembed/dashboard/assets/create-worker-form-BqgLk5vw.js +++ /dev/null @@ -1,2 +0,0 @@ -import{k as v,j as e,I as f,e as _,ac as Qt,B as T,fp as qt,au as Yt,cI as Ht,u as Xt,fq as p,t as Et,N as $,O as J,L as x,bm as j,a6 as D,a7 as I,a8 as P,a9 as z,aa as F,db as ea,dc as ta,dd as aa,de as Bt,cX as na,o as R,fr as y,s as w,bb as ia,d0 as Q,bo as sa}from"./index-NcPpBRAY.js";import{S as oa,a as V,A as la,b as ra,c as ca,d as da}from"./steps-CZ8cuefp.js";import{m as B}from"./managed-compute-Dhtcalwt.js";import{F as ua}from"./PlusIcon-ChBf4T_m.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new c.Error().stack;o&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[o]="d301df06-52b8-477f-8197-fa597ffe27bb",c._sentryDebugIdIdentifier="sentry-dbid-d301df06-52b8-477f-8197-fa597ffe27bb")}catch{}})();function ma({title:c,titleId:o,...a},h){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:h,"aria-labelledby":o},a),c?v.createElement("title",{id:o},c):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))}const _t=v.forwardRef(ma),ha=({label:c,values:o,setValues:a=()=>{},disabled:h,secretOption:N,onDeleteIds:C,onAdd:k,onUpdate:b})=>{v.useEffect(()=>{o||a([])},[a,o]);const d=(n,l,r)=>{const m=[...o],g=m[n];l==="value"&&g.hint?r!==g.hint&&r!==""&&(m[n]={...g,[l]:r,isEditing:!0}):m[n]={...g,[l]:r},a(m),g.id&&b&&r!==g.hint&&b([m[n]])},u=n=>{const l=[...o],r=l[n],m=!r.deleted;if(l[n]={...r,deleted:m},a(l),r.id&&C){const g=o.filter(S=>S.id&&S.deleted).map(S=>S.id);C(g)}},M=n=>{const l=o[n];if(l.id){const r=[...o];if(r[n]={...l,deleted:!0},a(r),C){const m=o.filter(g=>g.id&&g.deleted).map(g=>g.id);C(m)}}else{const r=o.filter((m,g)=>g!==n);a(r),k&&k(r.filter(m=>!m.id))}};return e.jsxs(e.Fragment,{children:[c&&e.jsx("div",{className:"mb-2 text-white",children:c}),o==null?void 0:o.map((n,l)=>{var r;return e.jsxs("div",{className:_("mb-2 flex items-center gap-2",n.deleted&&"opacity-50 [&>*]:line-through"),children:[e.jsx(f,{placeholder:"ex: key",value:n.key,onChange:m=>d(l,"key",m.target.value),disabled:h||n.locked||n.deleted,className:_("w-64",n.locked&&"cursor-not-allowed bg-gray-200")}),n.hidden?e.jsx(f,{placeholder:n.hint,value:n.isEditing?n.value:void 0,onChange:m=>d(l,"value",m.target.value),type:"password",disabled:h||n.locked||n.deleted,className:_("flex-1",n.locked&&"cursor-not-allowed bg-gray-200",!n.isEditing&&n.hint&&"text-gray-400")}):e.jsx(Qt,{placeholder:n.hint,value:n.isEditing?n.value:void 0,onChange:m=>d(l,"value",m.target.value),rows:((r=n.value)==null?void 0:r.split(` -`).length)||0,disabled:h||n.locked||n.deleted,className:_("flex-1",n.locked&&"cursor-not-allowed bg-gray-200",!n.isEditing&&n.hint&&"text-gray-400")}),N&&e.jsx(T,{variant:"ghost",onClick:()=>!n.locked&&d(l,"hidden",!n.hidden),disabled:n.locked||n.deleted,children:n.hidden?"Unlock":"Lock"}),!h&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{n.id?u(l):M(l)},children:e.jsx(qt,{className:"h-4 w-4"})})})]},l)}),!h&&e.jsx("div",{className:"flex items-center",children:e.jsx(T,{variant:"secondary",onClick:()=>{const n={key:"",value:"",hidden:!1,locked:!1,deleted:!1},l=[...o,n];a(l),k&&k([...o.filter(r=>!r.id),n])},children:"Add row"})})]})},q=[{title:"1 CPU, 1 GB RAM (shared CPU)",cpuKind:"shared",cpus:1,memoryMb:1024},{title:"1 CPU, 2 GB RAM (shared CPU)",cpuKind:"shared",cpus:1,memoryMb:2048},{title:"2 CPU, 2 GB RAM (shared CPU)",cpuKind:"shared",cpus:2,memoryMb:2048},{title:"2 CPU, 4 GB RAM (shared CPU)",cpuKind:"shared",cpus:2,memoryMb:4096},{title:"4 CPU, 8 GB RAM (shared CPU)",cpuKind:"shared",cpus:4,memoryMb:8192},{title:"8 CPU, 16 GB RAM (shared CPU)",cpuKind:"shared",cpus:8,memoryMb:16384},{title:"1 CPU, 2 GB RAM (performance CPU)",cpuKind:"performance",cpus:1,memoryMb:2048},{title:"2 CPU, 2 GB RAM (performance CPU)",cpuKind:"performance",cpus:2,memoryMb:2048},{title:"2 CPU, 4 GB RAM (performance CPU)",cpuKind:"performance",cpus:2,memoryMb:4096},{title:"4 CPU, 8 GB RAM (performance CPU)",cpuKind:"performance",cpus:4,memoryMb:8192},{title:"8 CPU, 16 GB RAM (performance CPU)",cpuKind:"performance",cpus:8,memoryMb:16384}],Kt=[{name:"Amsterdam, Netherlands",value:p.Ams},{name:"Stockholm, Sweden",value:p.Arn},{name:"Mumbai, India",value:p.Bom},{name:"Paris, France",value:p.Cdg},{name:"Dallas, Texas (US)",value:p.Dfw},{name:"Secaucus, NJ (US)",value:p.Ewr},{name:"Frankfurt, Germany",value:p.Fra},{name:"Sao Paulo, Brazil",value:p.Gru},{name:"Ashburn, Virginia (US)",value:p.Iad},{name:"Johannesburg, South Africa",value:p.Jnb},{name:"Los Angeles, California (US)",value:p.Lax},{name:"London, United Kingdom",value:p.Lhr},{name:"Tokyo, Japan",value:p.Nrt},{name:"Chicago, Illinois (US)",value:p.Ord},{name:"Singapore, Singapore",value:p.Sin},{name:"San Jose, California (US)",value:p.Sjc},{name:"Sydney, Australia",value:p.Syd},{name:"Toronto, Canada",value:p.Yyz}],ga=["Static","Autoscaling"],xa=R({name:w(),buildConfig:R({githubInstallationId:w().uuid().length(36),githubRepositoryOwner:w(),githubRepositoryName:w(),githubRepositoryBranch:w(),steps:Q(R({buildDir:w(),dockerfilePath:w()}))}),secrets:R({add:Q(R({key:w(),value:w()}))}),runtimeConfig:R({numReplicas:y().min(0).max(16).optional(),cpuKind:w(),cpus:y(),memoryMb:y(),regions:Q(sa(p)).optional(),autoscaling:R({waitDuration:w(),rollingWindowDuration:w(),utilizationScaleUpThreshold:y(),utilizationScaleDownThreshold:y(),increment:y(),minAwakeReplicas:y(),maxReplicas:y(),scaleToZero:ia(),fly:R({autoscalingKey:w(),currentReplicas:y()})}).optional()})});function va({onSubmit:c,isLoading:o,fieldErrors:a}){var we,fe,ve,ye,Re,Se,Ne,ke,Me,Te,Ue,Ae,De,Ie,Pe,ze,Fe,Be,Ke,Ge,_e,Ve,We,Le,Oe,Ze,$e,Je,Qe,qe,Ye,He,Xe,Ee,et,tt,at,nt,it,st,ot,lt,rt,ct,dt,ut,mt,ht,gt,xt,pt,bt,jt,Ct,wt,ft,vt,yt,Rt,St,Nt,kt,Mt,Tt,Ut,At,Dt,It,Pt,zt,Ft;const{can:h}=Yt(),{tenantId:N}=Ht(),{watch:C,handleSubmit:k,control:b,setValue:d,formState:{errors:u}}=Xt({resolver:Et(xa),defaultValues:{buildConfig:{steps:[{buildDir:".",dockerfilePath:"./Dockerfile"}]},secrets:{add:[]},runtimeConfig:{numReplicas:1,cpuKind:"shared",cpus:1,memoryMb:1024,regions:[p.Sjc]}}}),[M,n]=v.useState("1 CPU, 1 GB RAM (shared CPU)"),l=v.useMemo(()=>{if(!h)return 1/0;for(let t=1;t<=20;t++){const[s]=h(B.maxReplicas(t));if(!s)return t-1}return 20},[h]),[r]=v.useMemo(()=>{const t=q.find(i=>i.title===M);if(!t||!h)return[!0,void 0];const s={cpuKind:t.cpuKind,cpus:t.cpus,memoryMb:t.memoryMb};return h(B.selectCompute(s))},[h,M]),m=C("runtimeConfig.regions"),g=C("buildConfig.githubInstallationId"),S=C("buildConfig.githubRepositoryOwner"),H=C("buildConfig.githubRepositoryName"),X=Gt(S,H),W=C("buildConfig.githubRepositoryBranch"),L=C("runtimeConfig.numReplicas"),O=C("runtimeConfig.autoscaling.maxReplicas"),U=$({...J.github.listInstallations(N)}),Wt=$({...J.github.listRepos(N,g)}),Lt=$({...J.github.listBranches(N,g,S,H)}),K=v.useMemo(()=>{if(!L||!h)return!0;const[t]=h(B.maxReplicas(L));return t},[h,L]),G=v.useMemo(()=>{if(!O||!h)return!0;const[t]=h(B.maxReplicas(O));return t},[h,O]),[Ot,Zt]=v.useState([]),[$t,E]=v.useState("Static"),ee=((fe=(we=u.name)==null?void 0:we.message)==null?void 0:fe.toString())||(a==null?void 0:a.name),te=((Ne=(Se=(Re=(ye=(ve=u.buildConfig)==null?void 0:ve.steps)==null?void 0:ye[0])==null?void 0:Re.buildDir)==null?void 0:Se.message)==null?void 0:Ne.toString())||(a==null?void 0:a.buildDir),ae=((Ae=(Ue=(Te=(Me=(ke=u.buildConfig)==null?void 0:ke.steps)==null?void 0:Me[0])==null?void 0:Te.dockerfilePath)==null?void 0:Ue.message)==null?void 0:Ae.toString())||(a==null?void 0:a.dockerfilePath),ne=((Pe=(Ie=(De=u.runtimeConfig)==null?void 0:De.numReplicas)==null?void 0:Ie.message)==null?void 0:Pe.toString())||(a==null?void 0:a.numReplicas),ie=((Be=(Fe=(ze=u.secrets)==null?void 0:ze.add)==null?void 0:Fe.message)==null?void 0:Be.toString())||(a==null?void 0:a.secrets),se=((_e=(Ge=(Ke=u.runtimeConfig)==null?void 0:Ke.cpuKind)==null?void 0:Ge.message)==null?void 0:_e.toString())||(a==null?void 0:a.cpuKind),oe=((Le=(We=(Ve=u.runtimeConfig)==null?void 0:Ve.cpus)==null?void 0:We.message)==null?void 0:Le.toString())||(a==null?void 0:a.cpus),le=(($e=(Ze=(Oe=u.runtimeConfig)==null?void 0:Oe.memoryMb)==null?void 0:Ze.message)==null?void 0:$e.toString())||(a==null?void 0:a.memoryMb),re=((qe=(Qe=(Je=u.buildConfig)==null?void 0:Je.githubInstallationId)==null?void 0:Qe.message)==null?void 0:qe.toString())||(a==null?void 0:a.githubInstallationId),ce=((Xe=(He=(Ye=u.buildConfig)==null?void 0:Ye.githubRepositoryOwner)==null?void 0:He.message)==null?void 0:Xe.toString())||(a==null?void 0:a.githubRepositoryOwner),de=((tt=(et=(Ee=u.buildConfig)==null?void 0:Ee.githubRepositoryName)==null?void 0:et.message)==null?void 0:tt.toString())||(a==null?void 0:a.githubRepositoryName),ue=((it=(nt=(at=u.buildConfig)==null?void 0:at.githubRepositoryBranch)==null?void 0:nt.message)==null?void 0:it.toString())||(a==null?void 0:a.githubRepositoryBranch),me=((rt=(lt=(ot=(st=u.runtimeConfig)==null?void 0:st.autoscaling)==null?void 0:ot.waitDuration)==null?void 0:lt.message)==null?void 0:rt.toString())||(a==null?void 0:a.waitDuration),he=((mt=(ut=(dt=(ct=u.runtimeConfig)==null?void 0:ct.autoscaling)==null?void 0:dt.rollingWindowDuration)==null?void 0:ut.message)==null?void 0:mt.toString())||(a==null?void 0:a.rollingWindowDuration),ge=((pt=(xt=(gt=(ht=u.runtimeConfig)==null?void 0:ht.autoscaling)==null?void 0:gt.utilizationScaleUpThreshold)==null?void 0:xt.message)==null?void 0:pt.toString())||(a==null?void 0:a.utilizationScaleUpThreshold),xe=((wt=(Ct=(jt=(bt=u.runtimeConfig)==null?void 0:bt.autoscaling)==null?void 0:jt.utilizationScaleDownThreshold)==null?void 0:Ct.message)==null?void 0:wt.toString())||(a==null?void 0:a.utilizationScaleDownThreshold),pe=((Rt=(yt=(vt=(ft=u.runtimeConfig)==null?void 0:ft.autoscaling)==null?void 0:vt.increment)==null?void 0:yt.message)==null?void 0:Rt.toString())||(a==null?void 0:a.increment),be=((Mt=(kt=(Nt=(St=u.runtimeConfig)==null?void 0:St.autoscaling)==null?void 0:Nt.minAwakeReplicas)==null?void 0:kt.message)==null?void 0:Mt.toString())||(a==null?void 0:a.minAwakeReplicas),je=((Dt=(At=(Ut=(Tt=u.runtimeConfig)==null?void 0:Tt.autoscaling)==null?void 0:Ut.maxReplicas)==null?void 0:At.message)==null?void 0:Dt.toString())||(a==null?void 0:a.maxReplicas),Ce=((Ft=(zt=(Pt=(It=u.runtimeConfig)==null?void 0:It.autoscaling)==null?void 0:Pt.scaleToZero)==null?void 0:zt.message)==null?void 0:Ft.toString())||(a==null?void 0:a.scaleToZero);v.useEffect(()=>{U.isSuccess&&U.data.rows.length>0&&!g&&d("buildConfig.githubInstallationId",U.data.rows[0].metadata.id)},[U,d,g]);const Jt=t=>{const s={cpuKind:t.cpuKind,cpus:t.cpus,memoryMb:t.memoryMb},[i]=h(B.selectCompute(s));return e.jsxs(F,{value:t.title,children:[t.title," ",!i&&"🔒"]},t.title)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Define the compute resources for your services."}),e.jsxs(oa,{className:"mt-6",children:[e.jsx(V,{title:"Build configuration",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the Github repository the service should deploy from."}),e.jsxs("div",{className:"grid max-w-3xl gap-4",children:[e.jsx(x,{htmlFor:"role",children:"Github account"}),e.jsx(j,{control:b,name:"buildConfig.githubInstallationId",render:({field:t})=>{var s;return e.jsxs(D,{onValueChange:i=>{t.onChange(i),d("buildConfig.githubRepositoryOwner",""),d("buildConfig.githubRepositoryName",""),d("buildConfig.githubRepositoryBranch","")},children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Not seeing your repository?"," ",e.jsx("a",{href:`/api/v1/cloud/users/github-app/start?redirect_to=/tenants/${N}/managed-workers/create&with_repo_installation=true`,className:"text-indigo-400",children:"Link a new repository"})]}),e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose account"})}),e.jsx(z,{children:(s=U.data)==null?void 0:s.rows.map(i=>e.jsx(F,{value:i.metadata.id,children:i.account_name},i.metadata.id))})]})}}),re&&e.jsx("div",{className:"text-sm text-red-500",children:re}),e.jsx(x,{htmlFor:"role",children:"Github repo"}),e.jsx(j,{control:b,name:"buildConfig.githubRepositoryName",render:({field:t})=>{var s;return e.jsxs(D,{...t,value:X,onValueChange:i=>{d("buildConfig.githubRepositoryOwner",pa(i)||""),d("buildConfig.githubRepositoryName",ba(i)||""),d("buildConfig.githubRepositoryBranch","")},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose repository"})}),e.jsx(z,{children:(s=Wt.data)==null?void 0:s.map(i=>e.jsxs(F,{value:Gt(i.repo_owner,i.repo_name)||"",children:[i.repo_owner,"/",i.repo_name]},i.repo_owner+i.repo_name))})]})}}),ce&&e.jsx("div",{className:"text-sm text-red-500",children:ce}),de&&e.jsx("div",{className:"text-sm text-red-500",children:de}),e.jsx(x,{htmlFor:"role",children:"Github branch"}),e.jsx(j,{control:b,name:"buildConfig.githubRepositoryBranch",render:({field:t})=>{var s;return e.jsxs(D,{onValueChange:t.onChange,...t,children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"role",placeholder:"Choose branch"})}),e.jsx(z,{children:(s=Lt.data)==null?void 0:s.map(i=>e.jsx(F,{value:i.branch_name,children:i.branch_name},i.branch_name))})]})}}),ue&&e.jsx("div",{className:"text-sm text-red-500",children:ue}),e.jsx(x,{htmlFor:"buildDir",children:"Build directory"}),e.jsx(j,{control:b,name:"buildConfig.steps.0.buildDir",render:({field:t})=>e.jsx(f,{...t,placeholder:"build",id:"buildDir",defaultValue:".",disabled:!W})}),te&&e.jsx("div",{className:"text-sm text-red-500",children:te}),e.jsx(x,{htmlFor:"dockerfile",children:"Path to Dockerfile"}),e.jsx(j,{control:b,name:"buildConfig.steps.0.dockerfilePath",render:({field:t})=>e.jsx(f,{...t,placeholder:".",id:"dockerfile",defaultValue:"./Dockerfile",disabled:!W})}),ae&&e.jsx("div",{className:"text-sm text-red-500",children:ae})]})]})}),e.jsx(V,{title:"Runtime configuration",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the runtime settings for this service."}),e.jsx(x,{children:"Environment Variables"}),e.jsx(ha,{values:Ot,setValues:t=>{Zt(t),d("secrets.add",t.map(s=>({key:s.key,value:s.value})))}}),ie&&e.jsx("div",{className:"text-sm text-red-500",children:ie}),e.jsx(x,{children:"Machine Configuration"}),e.jsxs("div",{className:"grid gap-4 pt-4",children:[e.jsx(x,{htmlFor:"region",children:"Region"}),e.jsxs(D,{value:m==null?void 0:m.toString(),onValueChange:t=>{const s=Kt.find(i=>i.value===t);s&&d("runtimeConfig.regions",[s.value])},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"region",placeholder:"Choose region"})}),e.jsx(z,{children:Kt.map(t=>e.jsx(F,{value:t.value,children:t.name},t.value))})]}),e.jsx(x,{htmlFor:"machineType",children:"Machine type"}),e.jsx(j,{control:b,name:"runtimeConfig.cpuKind",render:({field:t})=>e.jsxs(D,{...t,value:M,onValueChange:s=>{const i=q.find(A=>A.title===s);n(s),d("runtimeConfig.cpus",(i==null?void 0:i.cpus)||1),d("runtimeConfig.memoryMb",(i==null?void 0:i.memoryMb)||1024),d("runtimeConfig.cpuKind",(i==null?void 0:i.cpuKind)||"shared")},children:[e.jsx(I,{className:"w-fit",children:e.jsx(P,{id:"machineType",placeholder:"Choose type"})}),e.jsx(z,{children:q.map(Jt)})]})}),!r&&e.jsx(Y,{feature:`The selected machine type (${M})`}),se&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:se}),oe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:oe}),le&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:le}),e.jsx(x,{children:"Scaling Method"}),e.jsxs(ea,{defaultValue:"Static",value:$t,onValueChange:t=>{if(t==="Static"){E("Static"),d("runtimeConfig.numReplicas",1),d("runtimeConfig.autoscaling",void 0);return}else E("Autoscaling"),d("runtimeConfig.numReplicas",void 0),d("runtimeConfig.autoscaling",{waitDuration:"1m",rollingWindowDuration:"2m",utilizationScaleUpThreshold:.75,utilizationScaleDownThreshold:.25,increment:1,scaleToZero:!0,minAwakeReplicas:1,maxReplicas:Math.min(10,l),fly:{autoscalingKey:"dashboard",currentReplicas:1}})},children:[e.jsx(ta,{layout:"underlined",children:ga.map(t=>e.jsx(aa,{variant:"underlined",value:t,children:t},t))}),e.jsxs(Bt,{value:"Static",className:"grid gap-4 pt-4",children:[e.jsxs(x,{htmlFor:"numReplicas",children:["Number of replicas (max: ",l,")"]}),e.jsx(j,{control:b,name:"runtimeConfig.numReplicas",render:({field:t})=>e.jsx(f,{...t,type:"number",onChange:s=>{if(s.target.value===""){t.onChange(s.target.value);return}t.onChange(parseInt(s.target.value))},min:0,id:"numReplicas",placeholder:"1"})}),!K&&e.jsx(Y,{feature:`More than ${l} replicas`}),ne&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:ne})]}),e.jsxs(Bt,{value:"Autoscaling",className:"grid gap-4 pt-4",children:[e.jsx(x,{htmlFor:"minAwakeReplicas",children:"Min Replicas"}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.minAwakeReplicas",render:({field:t})=>e.jsx(f,{...t,id:"minAwakeReplicas",type:"number",onChange:s=>{const i=parseInt(s.target.value);t.onChange(i),d("runtimeConfig.autoscaling.fly.currentReplicas",i),(C("runtimeConfig.autoscaling.maxReplicas")??0){const s=C("runtimeConfig.autoscaling.minAwakeReplicas")||1;return e.jsx(f,{...t,id:"maxReplicas",min:s,type:"number",onChange:i=>{const A=parseInt(i.target.value),Z=Math.max(A,s);t.onChange(Z),Z!==A&&(i.target.value=Z.toString())}})}}),!G&&e.jsx(Y,{feature:`More than ${l} max replicas`}),je&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:je}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.scaleToZero",render:({field:t})=>e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(x,{htmlFor:"scaleToZero",children:"Scale to zero during periods of inactivity?"}),e.jsx(na,{checked:t.value,onCheckedChange:t.onChange})]})}),Ce&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:Ce}),e.jsx(la,{type:"single",collapsible:!0,children:e.jsxs(ra,{value:"advanced",children:[e.jsx(ca,{children:"Advanced autoscaling settings"}),e.jsxs(da,{className:"flex flex-col gap-4",children:[e.jsx(x,{htmlFor:"waitDuration",children:"Wait Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"How long to wait between autoscaling events. For example: 10s (10 seconds), 5m (5 minutes), 1h (1 hour)."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.waitDuration",render:({field:t})=>e.jsx(f,{...t,id:"waitDuration",placeholder:"1m"})}),me&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:me}),e.jsx(x,{htmlFor:"rollingWindowDuration",children:"Rolling Window Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The amount of time to look at utilization metrics for autoscaling. Lower values will lead to faster scale-up and scale-down. Example: 2m (2 minutes), 5m (5 minutes), 1h (1 hour)."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.rollingWindowDuration",render:({field:t})=>e.jsx(f,{...t,id:"rollingWindowDuration",placeholder:"2m"})}),he&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:he}),e.jsx(x,{htmlFor:"utilizationScaleUpThreshold",children:"Utilization Scale Up Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale up. For example, 0.75 means that if the utilization is above 75%, scale up."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.utilizationScaleUpThreshold",render:({field:t})=>e.jsx(f,{...t,id:"utilizationScaleUpThreshold",type:"number",min:0,max:1,step:.01,onChange:s=>{t.onChange(parseFloat(s.target.value))}})}),ge&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:ge}),e.jsx(x,{htmlFor:"utilizationScaleDownThreshold",children:"Utilization Scale Down Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale down. For example, 0.25 means that if the utilization is below 25%, scale down."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.utilizationScaleDownThreshold",render:({field:t})=>e.jsx(f,{...t,id:"utilizationScaleDownThreshold",type:"number",min:0,max:1,step:.01,onChange:s=>{t.onChange(parseFloat(s.target.value))}})}),xe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:xe}),e.jsx(x,{htmlFor:"increment",children:"Scaling Increment"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The number of replicas to scale by when scaling up or down."}),e.jsx(j,{control:b,name:"runtimeConfig.autoscaling.increment",render:({field:t})=>e.jsx(f,{...t,id:"increment",type:"number",onChange:s=>{t.onChange(parseInt(s.target.value))}})}),pe&&e.jsx("div",{className:"text-sm text-red-500 dark:text-red-400",children:pe})]})]})})]})]})]})]})}),e.jsx(V,{title:"Name",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Give your service a name."}),e.jsx(x,{htmlFor:"name",children:"Name"}),e.jsx(j,{control:b,name:"name",render:({field:t})=>e.jsx(f,{...t,id:"name",placeholder:"my-awesome-service"})}),ee&&e.jsx("div",{className:"text-sm text-red-500",children:ee})]})}),e.jsx(V,{title:"Review",children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Review the settings for this service."}),(!r||!K||!G)&&e.jsxs("div",{className:"rounded-md border border-red-300 bg-red-50 p-4 dark:border-red-500 dark:bg-red-900/30",children:[e.jsx("h3",{className:"mb-2 font-medium text-red-800 dark:text-red-200",children:"Your configuration requires a plan upgrade"}),e.jsxs("ul",{className:"list-inside list-disc space-y-1 text-sm text-red-700 dark:text-red-300",children:[!r&&e.jsx("li",{children:"The selected machine type is not available on your current plan"}),!K&&e.jsx("li",{children:"The number of replicas exceeds your plan's limit"}),!G&&e.jsx("li",{children:"The maximum autoscaling replicas exceeds your plan's limit"})]}),e.jsx("div",{className:"mt-3",children:e.jsx("a",{href:Vt(),target:"_blank",rel:"noopener noreferrer",children:e.jsxs(T,{variant:"outline",size:"sm",children:[e.jsx(_t,{className:"mr-1 size-4"}),"Upgrade Plan"]})})})]}),e.jsxs(T,{onClick:k(c),disabled:!g||!X||!W||!r||!K||!G,className:"w-fit px-8",children:[o&&e.jsx(ua,{className:"size-4 animate-spin"}),"Create service"]})]})})]})]})}function Gt(c,o){if(!(!c||!o))return`${c}::${o}`}function pa(c){if(!c)return;const o=c.split("::");if(o.length>1)return o[0]}function ba(c){if(!c)return;const o=c.split("::");if(o.length>1)return o[1]}const Vt=()=>"/settings/billing-and-limits",Y=({feature:c})=>e.jsxs("div",{className:"my-3 flex flex-col gap-2 rounded-md border border-yellow-400 bg-yellow-50 p-4 dark:border-yellow-500 dark:bg-yellow-900/30",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-yellow-500 dark:text-yellow-400",children:"⚠️"}),e.jsxs("p",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200",children:[c," is available on higher tier plans. Upgrade to access this feature."]})]}),e.jsx("a",{href:Vt(),target:"_blank",rel:"noopener noreferrer",children:e.jsxs(T,{variant:"outline",size:"sm",className:"border-yellow-400 text-xs text-yellow-700 hover:bg-yellow-100 dark:border-yellow-500 dark:text-yellow-300 dark:hover:bg-yellow-900/50",children:[e.jsx(_t,{className:"mr-1 size-3"}),"Upgrade Plan"]})})]});export{va as C,ha as E,Y as U,pa as a,ba as b,Gt as g,q as m,Kt as r,ga as s}; diff --git a/hatchetembed/dashboard/assets/data-contracts-C0lcHVTf.js b/hatchetembed/dashboard/assets/data-contracts-C0lcHVTf.js deleted file mode 100644 index bac53fe5e1..0000000000 --- a/hatchetembed/dashboard/assets/data-contracts-C0lcHVTf.js +++ /dev/null @@ -1 +0,0 @@ -import"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c69e49c4-ec57-4982-a845-2511112c6f37",e._sentryDebugIdIdentifier="sentry-dbid-c69e49c4-ec57-4982-a845-2511112c6f37")}catch{}})();var D=(e=>(e.OWNER="OWNER",e.ADMIN="ADMIN",e.MEMBER="MEMBER",e))(D||{}),t=(e=>(e.Current="current",e.Upcoming="upcoming",e.Past="past",e))(t||{}),E=(e=>(e.Free="free",e.Starter="starter",e.Growth="growth",e.Migration="migration",e.Developer="developer",e.Team="team",e.Scale="scale",e.Dedicated="dedicated",e))(E||{}),d=(e=>(e.SHARED="SHARED",e.DEDICATED="DEDICATED",e))(d||{}),f=(e=>(e.ADMIN="ADMIN",e.MEMBER="MEMBER",e))(f||{});export{d as O,E as S,D as T,t as a,f as b}; diff --git a/hatchetembed/dashboard/assets/docs-button-Mn8SLZkH.js b/hatchetembed/dashboard/assets/docs-button-Mn8SLZkH.js deleted file mode 100644 index 68875702c7..0000000000 --- a/hatchetembed/dashboard/assets/docs-button-Mn8SLZkH.js +++ /dev/null @@ -1,6 +0,0 @@ -import{v as c,j as a,B as h}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="920d7588-754a-450c-acc8-158823fb8a71",e._sentryDebugIdIdentifier="sentry-dbid-920d7588-754a-450c-acc8-158823fb8a71")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const i=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],u=c("book-open-text",i);function l(e,t,r){const n=new URL(e.href);for(const[o,s]of Object.entries(t??{}))n.searchParams.set(o,s);return r&&(n.hash=r),n.toString()}const y=({doc:e,label:t,queryParams:r,scrollTo:n,variant:o="button"})=>{const s=l(e,r,n);switch(o){case"button":return a.jsx(h,{asChild:!0,leftIcon:a.jsx(u,{className:"size-4"}),variant:"outline",children:a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:a.jsx("span",{children:t})})});case"text":return a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",className:"underline hover:text-gray-900 dark:hover:text-gray-100 hover:cursor-pointer",children:t});default:const d=o;throw new Error(`Unhandled variant type: ${d}`)}};export{y as D}; diff --git a/hatchetembed/dashboard/assets/github-button-DalgP0Fz.js b/hatchetembed/dashboard/assets/github-button-DalgP0Fz.js deleted file mode 100644 index 0494264540..0000000000 --- a/hatchetembed/dashboard/assets/github-button-DalgP0Fz.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s,B as n,cH as o}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb4feab0-0f70-4efa-9773-4c56868cdfa1",e._sentryDebugIdIdentifier="sentry-dbid-cb4feab0-0f70-4efa-9773-4c56868cdfa1")}catch{}})();function i({buildConfig:e,commitSha:t,prefix:r}){return e!=null&&e.githubRepository?s.jsxs("div",{className:"flex w-fit flex-row items-center gap-2 text-sm text-gray-700 dark:text-gray-300",children:[r,s.jsx("a",{href:a(e,t),target:"_blank",rel:"noreferrer",children:s.jsx(n,{variant:"link",size:"xs",leftIcon:s.jsx(o,{className:"size-4"}),children:t?t.substring(0,7):`${e.githubRepository.repo_owner}/${e.githubRepository.repo_name}`})})]}):null}function a(e,t){const r=`https://github.com/${e.githubRepository.repo_owner}/${e.githubRepository.repo_name}`;return t?r+"/commit/"+t:r}export{i as G}; diff --git a/hatchetembed/dashboard/assets/global-emitter-kjRqhIKI.js b/hatchetembed/dashboard/assets/global-emitter-kjRqhIKI.js deleted file mode 100644 index 8a2e3afdf2..0000000000 --- a/hatchetembed/dashboard/assets/global-emitter-kjRqhIKI.js +++ /dev/null @@ -1 +0,0 @@ -import{ex as c}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="003b3a0d-94e4-4672-8730-30a6e35b8a2a",e._sentryDebugIdIdentifier="sentry-dbid-003b3a0d-94e4-4672-8730-30a6e35b8a2a")}catch{}})();var i,l;function g(){return l||(l=1,i=(e,t=new Map)=>({has:n=>t.has(n),get:n=>(!t.has(n)&&typeof e=="function"&&t.set(n,e(n)),t.get(n)),delete:n=>t.delete(n),set:(n,s)=>t.set(n,s),getUnderlyingDataStructure:()=>t})),i}var b=g();const y=c(b),d=()=>y(()=>new Map);function p(e=Object.create(null)){let t=d(),n=0;return e.on=(s,a)=>{const o=(n++).toString(),r=t.get(s);return r.set(o,a),()=>{r.delete(o),r.size===0&&t.delete(s)}},e.once=(s,a)=>{const o=e.on(s,(...r)=>{a(...r),o()});return o},e.emit=(s,a)=>{const o=t.get(s);let r=!1;const u=()=>r=!0;for(const f of o.values())r||f(a,{stopPropagation:u})},e.removeAllListeners=()=>{t=d()},e}const M=p();export{M as g}; diff --git a/hatchetembed/dashboard/assets/hatchet-5-DSjVfcvf.svg b/hatchetembed/dashboard/assets/hatchet-5-DSjVfcvf.svg deleted file mode 100644 index d545924ffb..0000000000 --- a/hatchetembed/dashboard/assets/hatchet-5-DSjVfcvf.svg +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hatchetembed/dashboard/assets/index-2ncWJHmk.js b/hatchetembed/dashboard/assets/index-2ncWJHmk.js deleted file mode 100644 index 0810436bd6..0000000000 --- a/hatchetembed/dashboard/assets/index-2ncWJHmk.js +++ /dev/null @@ -1 +0,0 @@ -import{k as c,j as t,ca as $,cb as X,cc as H,cd as Y,ce as Z,cf as ee,cg as te,ch as A,ci as se,aI as ne,b as ae,cj as ie,w as oe,N as W,O as re,ck as le,cl as ce,a as q,cm as ue,cn as B,o as de,s as F,by as fe,co as ge,b7 as z,aD as me,bw as he,cp as we,cq as xe,cr as G,B as ye,cs as be,a6 as pe,a7 as Se,a8 as ve,a9 as ke,aa as R,ct as je,cu as Le,b6 as U,cv as De}from"./index-NcPpBRAY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="ebefd9e0-b8f0-4605-a4f8-c1eb9a87d98f",n._sentryDebugIdIdentifier="sentry-dbid-ebefd9e0-b8f0-4605-a4f8-c1eb9a87d98f")}catch{}})();const T={DEBUG:{label:"Debug",color:"rgba(107, 114, 128, 0.55)"},INFO:{label:"Info",color:"rgba(34, 197, 94, 0.65)"},WARN:{label:"Warn",color:"rgba(234, 179, 8, 0.8)"},ERROR:{label:"Error",color:"rgba(239, 68, 68, 0.9)"}};function Ce(n,a){const u=a.findIndex(o=>o.time===n);if(u===-1)return n;if(u===a.length-1){const o=new Date(a[u].time).getTime(),f=new Date(a[u-1].time).getTime();return new Date(o+(o-f)).toISOString()}return a[u+1].time}function Re(n,a){const u=a.findIndex(o=>o.time===n);if(u===-1)return n;if(u===0){const o=new Date(a[0].time).getTime(),f=new Date(a[1].time).getTime();return new Date(o-(f-o)).toISOString()}return a[u-1].time}function Te(n,a,u){const o=new Date(n),f=u.getTime()-a.getTime(),h=1440*60*1e3,e=7*h;return f>e?o.toLocaleDateString([],{month:"short",day:"numeric"}):f>h?`${o.toLocaleDateString([],{month:"short",day:"numeric"})} ${o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Ie({metrics:n,since:a,until:u,onZoom:o}){const[f,h]=c.useState(null),[e,g]=c.useState(null),[r,w]=c.useState(null),[x,p]=c.useState(null),[m,y]=c.useState(!1),S=new Date(a),v=new Date(u??new Date().toISOString()),k=i=>{i!=null&&i.activeLabel&&(h(i.activeLabel),w(Re(i.activeLabel,n)),y(!0))},j=i=>{m&&(i!=null&&i.activeLabel)&&(g(i.activeLabel),p(Ce(i.activeLabel,n)))},L=()=>{if(r&&x){const[i,D]=[r,x].sort();o(i,D)}h(null),g(null),w(null),p(null),y(!1)};return t.jsx($,{config:T,className:"h-24 min-h-24 w-full",children:t.jsx("div",{className:"h-full",style:{touchAction:"none"},children:t.jsx(X,{width:"100%",height:"100%",children:t.jsxs(H,{data:n,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:k,onMouseMove:j,onMouseUp:L,children:[t.jsx(Y,{vertical:!1}),t.jsx(Z,{dataKey:"time",tickFormatter:i=>Te(i,S,v),tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),t.jsx(ee,{content:t.jsx(te,{className:"w-[150px] font-mono text-xs",labelFormatter:i=>new Date(i).toLocaleString()})}),t.jsx(A,{dataKey:"INFO",stackId:"normal",fill:T.INFO.color,isAnimationActive:!1}),t.jsx(A,{dataKey:"WARN",stackId:"normal",fill:T.WARN.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),t.jsx(A,{dataKey:"DEBUG",stackId:"normal",fill:T.DEBUG.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),t.jsx(A,{dataKey:"ERROR",stackId:"error",fill:T.ERROR.color,isAnimationActive:!1,minPointSize:i=>i!=null&&i>0?2:0}),f&&e&&t.jsx(se,{x1:f,x2:e,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})})})}const K=100,I="tenant-logs-filters",Q=de({q:F().optional(),tw:fe(["1h","6h","1d","7d"]).default("1d"),since:F().optional(),until:F().optional()});function V(n){const a={"1h":1,"6h":6,"1d":24,"7d":168}[n];return new Date(Date.now()-a*60*60*1e3).toISOString()}function Ne(n){return`${n.timestamp??""}-${n.line??""}`}function Oe(n){return n.map(a=>({timestamp:a.createdAt,line:a.message,level:a.level,metadata:a.metadata,attempt:a.attempt,taskExternalId:a.taskExternalId,taskDisplayName:a.taskDisplayName}))}function Ae(){var O,d;const{tenant:n}=ne({from:ae.tenantRoute.to}),{refetchInterval:a}=ie(),[u,o]=oe(),f=W({...re.workflows.list(n,{limit:1e3}),refetchInterval:a}),h=c.useMemo(()=>{var s;return(((s=f.data)==null?void 0:s.rows)??[]).reduce((l,b)=>(l[b.name]=b.metadata.id,l),{})},[(O=f.data)==null?void 0:O.rows]),e=c.useMemo(()=>{const s=u.get(I);try{return Q.parse(s?JSON.parse(s):{})}catch{return Q.parse({})}},[u]),g=c.useCallback(s=>{o(l=>({...Object.fromEntries(l.entries()),[I]:JSON.stringify({...e,...s})}))},[e,o]),r=c.useMemo(()=>le(e.q??""),[e.q]),w=c.useMemo(()=>{if(!r.workflow)return;const s=h[r.workflow];return s?[s]:void 0},[r.workflow,h]),[x,p]=c.useState(()=>e.since??V(e.tw));c.useEffect(()=>{p(e.since??V(e.tw))},[e.tw,e.since,e.until,r.level,r.search]);const m=ce({queryKey:["tenant-logs",n,x,e.until,r.level,r.search,w],queryFn:async({pageParam:s})=>(await q.v1TenantLogLineList(n,{limit:K,since:x,...s?{until:s}:e.until?{until:e.until}:{},...r.level&&{levels:[B[r.level]]},...r.search&&{search:r.search},...w&&{workflow_ids:w},order_by_direction:ue.DESC})).data,initialPageParam:void 0,getNextPageParam:s=>{const l=s.rows??[];if(!(l.length{var b;const s=new Set,l=[];for(const J of((b=m.data)==null?void 0:b.pages)??[])for(const M of Oe(J.rows??[])){const _=Ne(M);s.has(_)||(s.add(_),l.push(M))}return l},[m.data]),S=c.useCallback(()=>{m.hasNextPage&&!m.isFetchingNextPage&&m.fetchNextPage()},[m]),v=W({queryKey:["tenant-log-metrics",n,x,e.until,r.level,r.search,w],queryFn:async()=>(await q.v1TenantLogLineGetPointMetrics(n,{since:x,...e.until&&{until:e.until},...r.level&&{levels:[B[r.level]]},...r.search&&{search:r.search},...w&&{workflow_ids:w}})).data,refetchInterval:a,enabled:!!n}),k=c.useCallback((s,l)=>{g({since:s,until:l})},[g]),j=c.useCallback(s=>{o(l=>({...Object.fromEntries(l.entries()),[I]:JSON.stringify({...e,tw:s,since:void 0,until:void 0})}))},[e,o]),L=c.useCallback(()=>{o(s=>({...Object.fromEntries(s.entries()),[I]:JSON.stringify({...e,since:void 0,until:void 0})}))},[e,o]),i=c.useCallback(s=>g({since:s}),[g]),D=c.useCallback(s=>g({until:s}),[g]),C=!!e.since,E=(e.q??"").trim()!==""||C||e.tw!=="1d",N=!C&&e.tw==="1d",P=c.useCallback(()=>{o(s=>{const l=Object.fromEntries(s.entries());return delete l[I],l})},[o]);return{logs:y,isLoading:m.isLoading,isRefetching:m.isRefetching,isFetchingMore:m.isFetchingNextPage,refetch:m.refetch,fetchOlderLogs:S,queryString:e.q??"",setQueryString:s=>g({q:s}),parsedQuery:r,chartSince:x,chartUntil:e.until,chartMetrics:((d=v.data)==null?void 0:d.results)??[],setCustomTimeRange:k,timeWindow:e.tw,isCustomTimeRange:C,customSince:e.since,customUntil:e.until,setTimeWindow:j,clearTimeRange:L,setCustomSince:i,setCustomUntil:D,workflowNames:Object.keys(h),hasActiveFilters:E,isDefaultOneDayWindow:N,resetFilters:P}}function Fe(){return t.jsx(ge,{title:"No logs found",description:"Logs are emitted by your workers as they execute tasks. Run a task to see its logs appear here.",docs:{href:z.v1.logging.href,description:"Learn about logging"},children:t.jsx(Ee,{})})}function Ee(){const{logs:n,isLoading:a,isRefetching:u,refetch:o,fetchOlderLogs:f,queryString:h,setQueryString:e,chartSince:g,chartUntil:r,chartMetrics:w,setCustomTimeRange:x,timeWindow:p,isCustomTimeRange:m,customSince:y,customUntil:S,setTimeWindow:v,clearTimeRange:k,setCustomSince:j,setCustomUntil:L,workflowNames:i,hasActiveFilters:D,isDefaultOneDayWindow:C,resetFilters:E}=Ae(),N=me(),P=c.useMemo(()=>({workflowNames:i}),[i]),O=c.useCallback(d=>{N.open({type:"task-run-details",content:{taskRunId:d,showViewTaskRunButton:!0}})},[N]);return t.jsxs("div",{className:"flex flex-col h-full gap-4",children:[t.jsx(Ie,{metrics:w,since:g,until:r,onZoom:x}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[t.jsx(he,{value:h,onChange:e,onSubmit:e,getAutocomplete:(d,s)=>{const l=xe(d,s);return{...l,suggestions:l.suggestions.filter(b=>b.value!=="attempt:")}},applySuggestion:we,autocompleteContext:P,placeholder:"Search logs...",filterChips:[{key:"level:",label:"Level",description:"Filter by log level"},{key:"workflow:",label:"Workflow",description:"Filter by workflow name"}],className:"flex-1"}),m?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(G,{label:"After",date:y?new Date(y):void 0,setDate:d=>j(d==null?void 0:d.toISOString()),triggerClassName:"h-8 text-xs"}),t.jsx(G,{label:"Before",date:S?new Date(S):void 0,setDate:d=>L(d==null?void 0:d.toISOString()),triggerClassName:"h-8 text-xs"}),t.jsx(ye,{onClick:k,variant:"ghost",size:"sm",leftIcon:t.jsx(be,{className:"size-4"}),children:"Clear"})]}):t.jsxs(pe,{value:p,onValueChange:d=>{d==="custom"?x(g,new Date().toISOString()):v(d)},children:[t.jsx(Se,{className:"h-8 text-xs w-28",children:t.jsx(ve,{placeholder:"Choose time range"})}),t.jsxs(ke,{children:[t.jsx(R,{value:"1h",children:"1 hour"}),t.jsx(R,{value:"6h",children:"6 hours"}),t.jsx(R,{value:"1d",children:"1 day"}),t.jsx(R,{value:"7d",children:"7 days"}),t.jsx(R,{value:"custom",children:"Custom"})]})]}),t.jsx(je,{isRefetching:u,onRefetch:o})]}),t.jsx(Le,{logs:n,onScrollToBottom:f,isLoading:a,onViewRun:O,showAttempt:!1,showTaskName:!0,emptyComponent:D?t.jsx(U,{graphic:t.jsx(De,{}),title:"No logs matching your filters",buttons:[{label:"Clear filters",onClick:E}]}):t.jsx(U,{title:"No logs found",description:"Logs are emitted by your workers as they execute tasks.",links:[{href:z.v1.logging.href,label:"Learn about logging",external:!0}],buttons:C?[{label:"Search past 7 days",onClick:()=>v("7d")}]:void 0})},h+g+(r??""))]})}export{Fe as default}; diff --git a/hatchetembed/dashboard/assets/index-B-gmUf6P.js b/hatchetembed/dashboard/assets/index-B-gmUf6P.js deleted file mode 100644 index 863baf465f..0000000000 --- a/hatchetembed/dashboard/assets/index-B-gmUf6P.js +++ /dev/null @@ -1,38 +0,0 @@ -import{R as se,j as e,B as C,e as v,ae as Z,g as q,y as ge,N as ve,O as te,af as ae,S as be,a2 as ne,k as o,ag as U,ah as oe,ai as V,aj as ye,ak as re,al as ie,am as M,an as je,ao as ke,ap as Ce,aq as we,ar as Ne,as as ze,at as Re,au as le,h as Le,av as Y,aw as Q,ax as Se,ay as G,az as O,aA as W,aB as ce,aC as de,b as p,aD as Me,aE as Ee,aF as _e,aG as De,J as We,G as Ie,F as Te,aH as Ae}from"./index-NcPpBRAY.js";import{R as Be,C as Pe}from"./index-CQU71MwM.js";import{R as He,a as Oe,b as Fe,c as Xe,d as Ue,e as Ge,f as Ve,g as Ze,h as qe,i as Je,j as Ye,k as Qe,l as $e}from"./index-DOf3AD-4.js";import{u as Ke}from"./outlet-BQs_XxR1.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="cb7acc48-6d68-47af-a4fd-1432e65528b8",n._sentryDebugIdIdentifier="sentry-dbid-cb7acc48-6d68-47af-a4fd-1432e65528b8")}catch{}})();const es=Be,ss=Pe,E=se.forwardRef(({name:n,icon:s,muted:c=!1,className:h,...t},a)=>e.jsxs(C,{...t,ref:a,type:"button",variant:"ghost",className:v("w-full justify-start pl-2 min-w-0 overflow-hidden",c&&"[&_svg]:text-muted-foreground/50",h),children:[s,e.jsx("span",{className:"truncate",children:n})]}));E.displayName="SidebarButtonPrimaryAction";function ts(n){const s=Z();if(!("to"in n)){const{name:f,icon:k,...z}=n;return e.jsx(E,{...z,name:f,icon:k})}const{onNavLinkClick:c,to:h,params:t,name:a,icon:r,prefix:d,additionalActiveMatches:x=[],collapsibleChildren:m=[]}=n,j=x.some(f=>!!s({to:f.to,params:f.params,fuzzy:f.fuzzy})),b=m.length>0?(d?!!s({to:d,params:t,fuzzy:!0}):!!s({to:h,params:t,fuzzy:!0}))||j:!1,g=m.length>0?b:!!s({to:d??h,params:t,fuzzy:!!d})||j,y=e.jsx(q,{to:h,params:t,preload:!1,onClick:c,children:e.jsxs(C,{variant:"ghost",className:v("w-full justify-start pl-2 min-w-0 overflow-hidden [&_svg]:text-muted-foreground/50",g&&"bg-slate-200 dark:bg-slate-800 [&_svg]:text-primary"),children:[r,e.jsx("span",{className:"truncate",children:a})]})});return m.length===0?y:e.jsxs(es,{open:b,className:"w-full",children:[y,e.jsx(ss,{className:"ml-4 space-y-2 border-l border-muted",children:m})]})}function as({onNavLinkClick:n,to:s,params:c,name:h,prefix:t}){const a=Z(),r=t?!!a({to:t,params:c,fuzzy:!0}):!1,d=!!a({to:s,params:c})||r;return e.jsx(q,{to:s,params:c,preload:!1,onClick:n,children:e.jsx(C,{variant:"ghost",size:"sm",className:v("my-[1px] ml-1 mr-3 w-[calc(100%-3px)] justify-start pl-3 pr-0 min-w-0 overflow-hidden",d&&"bg-slate-200 dark:bg-slate-800"),children:e.jsx("span",{className:"truncate",children:h})})})}const ns=()=>{const{isControlPlaneEnabled:n}=ge(),{data:s,isLoading:c,isError:h,error:t}=ve({...te.info.getVersion,enabled:!n}),{isCloudEnabled:a}=ae();if(n)return null;if(c)return e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(be,{})});if(h||!(s!=null&&s.version)){const r=t instanceof Error?t.message:"Failed to fetch version info";return e.jsx("div",{className:"text-xs text-red-500",children:r})}return e.jsxs("div",{className:"text-xs",children:[a?"Cloud":"Self-Hosted"," ",s.version]})};function os({includeChat:n=!0}){const s=ne();return e.jsxs(e.Fragment,{children:[n&&s.enabled&&e.jsxs(M,{variant:"interactive",onClick:s.show,children:[e.jsx(oe,{className:"mr-2"}),"Chat with Support"]}),e.jsx(M,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:"https://docs.hatchet.run",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(je,{className:"mr-2"}),"Documentation"]})}),e.jsx(M,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:ke,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Ce,{className:"mr-2"}),"Join Discord"]})}),e.jsx(M,{variant:"interactive",asChild:!0,children:e.jsxs("a",{href:we,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Ne,{className:"mr-2"}),"Schedule Office Hours"]})}),e.jsx(ze,{}),e.jsx(M,{variant:"static",children:e.jsx(ns,{})})]})}function $({variant:n="default",triggerVariant:s="icon",align:c="end",side:h,className:t}){const a=ne(),[r,d]=o.useState(!1),x=s==="split"&&a.enabled,m=!x,j=a.enabled?"Support Chat":"Help",b=s==="split"&&!a.enabled?e.jsx(E,{name:"Help",icon:e.jsx(U,{className:"size-4 mr-2"}),className:v(t)}):x?e.jsxs("div",{className:v("flex w-full",t),children:[e.jsx(E,{name:j,icon:e.jsx(oe,{className:"size-4 mr-2"}),className:"w-auto flex-1 rounded-r-none",onClick:()=>{if(a.enabled){a.show();return}d(!0)},"aria-label":"Open Support Chat"}),e.jsx(V,{asChild:!0,children:e.jsx(C,{type:"button",variant:"ghost",size:"icon","aria-label":"Open Support Menu",className:"rounded-l-none border-l border-slate-200 dark:border-slate-800",children:e.jsx(ye,{className:"size-4 opacity-70"})})})]}):s==="button"?e.jsx(E,{name:"Help & Support",icon:e.jsx(U,{className:"size-4 mr-2"}),className:v(t)}):e.jsx(C,{variant:"icon",size:"icon","aria-label":"Help Menu",hoverText:"Help & Support",hoverTextSide:"right",className:t,children:e.jsx(U,{className:"h-6 w-6 cursor-pointer text-foreground"})});return e.jsxs(re,{open:r,onOpenChange:d,children:[x?b:e.jsx(V,{asChild:!0,children:b}),e.jsx(ie,{className:"w-56",variant:n==="sidebar"?"sidebar":"default",align:c,side:h,forceMount:!0,children:e.jsx(os,{includeChat:m})})]})}const K={current:0};function rs({className:n,navItems:s}){const{sidebarOpen:c,setSidebarOpen:h,isWide:t,collapsed:a,setCollapsed:r,expandedWidth:d,setExpandedWidth:x}=Re(),{tenantId:m}=le(),j=Le(),b=Z(),[g,y]=o.useState(!1),[f,k]=o.useState(null),[z,F]=o.useState(0),[R,_]=o.useState(0),w=o.useRef(!1),L=o.useRef(!1),[I,J]=o.useState(!1),ue=o.useRef(null),T=o.useRef(null),A=o.useCallback(()=>{t||h("closed")},[t,h]),me=t?g&&f!==null?w.current?f{if(t)return g&&f!==null?f:a?W:d})(),X=o.useCallback(i=>{if(!g)return;const u=i.clientX-z;!L.current&&Math.abs(u)>=Se&&(L.current=!0);const l=Math.max(W,Math.min(O,R+u));k(l)},[g,z,R]),B=o.useCallback(()=>{if(!L.current){w.current?r(!1):r(!0),k(null),y(!1);return}const i=f??(a?W:d);w.current?i>=Y?(r(!1),x(Math.max(G,Math.min(O,i)))):r(!0):i<=Q?r(!0):(r(!1),x(Math.max(G,Math.min(O,i)))),k(null),y(!1)},[f,a,d,r,x]),fe=o.useCallback(i=>{if(!t)return;i.preventDefault(),w.current=a,L.current=!1,y(!0),F(i.clientX);const u=a?W:d;_(u),k(u)},[t,a,d]);o.useEffect(()=>{if(g)return document.addEventListener("mousemove",X),document.addEventListener("mouseup",B),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",X),document.removeEventListener("mouseup",B),document.body.style.cursor=""}},[g,X,B]);const P=o.useMemo(()=>m?{tenant:m}:void 0,[m]);o.useLayoutEffect(()=>{T.current&&(T.current.scrollTop=K.current)},[]);const pe=o.useCallback(()=>{r(!a),k(null),y(!1)},[r,a]);return c==="closed"?null:e.jsxs("div",{ref:ue,"data-cy":"v1-sidebar",className:v("absolute inset-x-0 top-0 bottom-0 z-[100] w-full overflow-hidden bg-slate-100 dark:bg-slate-900 md:relative md:inset-auto md:top-0 md:bottom-auto md:h-full md:bg-[unset] md:dark:bg-[unset]",!g&&"md:transition-[width] md:duration-200 md:ease-in-out",n),style:t?{width:he,minWidth:g||a?W:G,maxWidth:O}:void 0,children:[e.jsx("div",{className:v("absolute right-0 top-0 bottom-0 z-20 hidden w-1 cursor-col-resize transition-colors hover:bg-blue-500/20 md:block",g&&"bg-blue-500/30"),"data-cy":"v1-sidebar-resize-handle",onMouseDown:fe,onMouseUp:i=>{i.stopPropagation(),B()},onMouseEnter:()=>J(!0),onMouseLeave:()=>J(!1),children:t&&I&&e.jsx(C,{variant:"ghost",size:"icon",hoverText:a?"Expand sidebar":"Collapse sidebar",hoverTextSide:"right","aria-label":a?"Expand sidebar":"Collapse sidebar",className:v("absolute right-0 top-1/2 z-30 hidden h-8 w-5 -translate-y-1/2 rounded-l-md border border-r-0 bg-secondary/90 text-secondary-foreground shadow-sm opacity-0 backdrop-blur transition-opacity md:flex","opacity-100",g&&"pointer-events-none opacity-0"),"data-cy":"v1-sidebar-resize-toggle",onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),pe()},children:a?e.jsx(ce,{className:"size-4"}):e.jsx(de,{className:"size-4"})})}),e.jsx("div",{className:"flex h-full flex-col overflow-hidden",children:me?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-cy":"v1-sidebar-scroll-collapsed",className:"min-h-0 flex-1 overflow-auto py-4 pl-2 overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"flex w-full flex-col items-center gap-y-2 px-2",children:s.map((i,u)=>e.jsxs(se.Fragment,{children:[u>0&&e.jsx("div",{className:"my-2 h-px w-8 bg-slate-200 dark:bg-slate-800"}),i.items.map(l=>{const D=l.params??P,S=l.displayAsActiveWhenThisRouteIsMatched??("to"in l?l.to:null),xe=l.activeFuzzy??!1,H=(S?!!b({to:S,params:D,fuzzy:xe}):!1)||(l.additionalActiveMatches??[]).some(N=>!!b({to:N.to,params:N.params,fuzzy:N.fuzzy}));return l.children&&l.children.length>0?e.jsxs(re,{children:[e.jsx(V,{asChild:!0,children:e.jsx(C,{variant:"ghost",size:"icon",hoverText:l.name,hoverTextSide:"right","aria-label":l.name,className:v("w-10",H&&"bg-slate-200 dark:bg-slate-800"),children:l.icon({collapsed:!0,active:H})})}),e.jsx(ie,{side:"right",align:"start",className:"z-[100]",children:l.children.map(N=>e.jsx(M,{asChild:!0,className:"w-full cursor-pointer",children:e.jsx(q,{to:N.to,params:P,preload:!1,onClick:A,children:N.name})},N.key))})]},l.key):e.jsx(C,{variant:"ghost",size:"icon",hoverText:l.name,hoverTextSide:"right","aria-label":l.name,className:v("w-10",H&&"bg-slate-200 dark:bg-slate-800"),onClick:()=>{"onClick"in l?l.onClick():j({to:l.to,params:D}),A()},children:l.icon({collapsed:!0,active:H})},l.key)})]},i.key))})}),e.jsx("div",{className:"w-full shrink-0 py-2",children:e.jsx("div",{className:"flex w-full flex-col items-center gap-1",children:e.jsx($,{variant:"sidebar",triggerVariant:"icon",align:"start",side:"right",className:"w-10"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:T,"data-cy":"v1-sidebar-scroll",onScroll:()=>{var i;K.current=((i=T.current)==null?void 0:i.scrollTop)??0},className:"min-h-0 flex-1 overflow-auto overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"px-4 py-4",children:s.map(i=>e.jsxs("div",{className:"py-2",children:[e.jsx("h2",{className:"mb-2 text-xs font-mono tracking-widest uppercase text-muted-foreground",children:i.title}),e.jsx("div",{className:i.itemsClassName,children:i.items.map(u=>{var D;const l=u.params??P;return"onClick"in u?e.jsx(E,{name:u.name,icon:u.icon({collapsed:!1}),onClick:u.onClick,muted:!0},u.key):e.jsx(ts,{onNavLinkClick:A,to:u.to,params:l,prefix:u.prefix,additionalActiveMatches:u.additionalActiveMatches,name:u.name,icon:u.icon({collapsed:!1,active:!!b({to:u.to,params:l,fuzzy:u.activeFuzzy})}),collapsibleChildren:((D=u.children)==null?void 0:D.map(S=>e.jsx(as,{onNavLinkClick:A,to:S.to,params:P,name:S.name},S.key)))??[]},u.key)})})]},i.key))})}),e.jsx("div",{"data-cy":"v1-sidebar-footer",className:"flex w-full shrink-0 flex-col gap-1 border-t border-slate-200 px-4 py-2 dark:border-slate-800",children:e.jsx($,{variant:"sidebar",triggerVariant:"split",align:"start",side:"top",className:"w-full"})})]})})]})}function is(n){return[{key:"overview",title:"",itemsClassName:"flex flex-col gap-y-1",items:[{key:"overview",name:"Overview",to:p.tenantOverviewRoute.to,icon:({collapsed:s,active:c})=>e.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s?"size-5":"mr-2 size-4 shrink-0",children:[e.jsx("style",{children:` - @keyframes hatchet-fall { - 0% { - transform: translateX(12px) translateY(-10px) rotate(179deg) scale(0.2); - opacity: 0; - } - 50% { - opacity: 1; - transform: translateX(0) translateY(-1px) rotate(20deg) scale(1); - } - 55% { - transform: translateY(0) rotate(-12deg); - } - 60% { - transform: translateY(0) rotate(0deg); - opacity: 1; - } - } - @keyframes stump-gap-animation { - 0% { - fill-opacity: 0.64; - } - 70% { - fill-opacity: 0.64; - } - 100% { - fill-opacity: 0; - } - } - .hatchet-animated { - transform-origin: 8px 7px; - animation: hatchet-fall 1s cubic-bezier(0.8, 0.1, 0.8, 0.2) forwards; - } - .stump-gap-animated { - animation: stump-gap-animation 0.5s cubic-bezier(0.8, 0.1, 0.8, 0.2); - animation-fill-mode: both; - } - `}),e.jsx("path",{d:"M10.7088 5.33333L8.90785 9.33333L5.39489 5.79376C5.00305 5.39895 4.80713 5.20155 4.73366 4.97425C4.66902 4.77429 4.66902 4.55905 4.73366 4.35909C4.80713 4.13178 5.00305 3.93438 5.39489 3.53957L8.90785 7.38316e-07L11.6096 1.21071e-06L7.07243 4.88519C6.94095 5.02675 6.87522 5.09753 6.87203 5.15789C6.86927 5.2103 6.89135 5.26095 6.93164 5.29459C6.97803 5.33333 7.07463 5.33333 7.26782 5.33333L10.7088 5.33333Z",className:c?"hatchet-animated":"",fill:"currentColor"},c?"hatchet-active":"hatchet-inactive"),e.jsx("path",{d:"M11.9336 13.3389L5.93359 16.6729L5.28516 15.5068L11.2852 12.1738L11.9336 13.3389ZM12.9424 8C13.6788 8 14.2764 8.59761 14.2764 9.33398V12.5049C14.2765 12.8584 14.417 13.1983 14.667 13.4482L16.5518 15.334H13.1152L11.0166 16.5L10.6924 15.917L10.3691 15.334L12.4678 14.168C12.6657 14.058 12.8888 14.0001 13.1152 14H13.4023C13.1056 13.5618 12.9424 13.0417 12.9424 12.5049V9.33398H10.6846L11.2852 8H12.9424ZM6.86035 9.33398H3.60938V12.5049C3.60931 13.0252 3.4554 13.5294 3.17578 13.959L5.95215 12.418L6.27637 13L6.59961 13.583L3.75098 15.166C3.55304 15.2759 3.32991 15.3339 3.10352 15.334H0L1.1377 14.1953L1.88574 13.4482C2.1357 13.1983 2.27628 12.8584 2.27637 12.5049V9.33398C2.27637 8.59769 2.87311 8.00013 3.60938 8H5.53711L6.86035 9.33398Z",fill:"currentColor",fillOpacity:"0.64"}),e.jsx("path",{d:"M10.6846 9.33398L11.2852 8H5.53711L6.86035 9.33398H10.6846Z",fill:"currentColor",fillOpacity:"0",id:"stump-gap",className:c?"stump-gap-animated":""})]})}]},{key:"activity",title:"Activity",itemsClassName:"space-y-1",items:[{key:"runs",name:"Runs",to:p.tenantRunsRoute.to,icon:({collapsed:s})=>e.jsx(He,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"events",name:"Events",to:p.tenantEventsRoute.to,icon:({collapsed:s})=>e.jsx(Oe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"logs",name:"Logs",to:p.tenantLogsRoute.to,icon:({collapsed:s})=>e.jsx(Fe,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"triggers",title:"Triggers",itemsClassName:"space-y-1",items:[{key:"scheduled",name:"Scheduled Runs",to:p.tenantScheduledRoute.to,icon:({collapsed:s})=>e.jsx(Xe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"crons",name:"Cron Jobs",to:p.tenantCronJobsRoute.to,icon:({collapsed:s})=>e.jsx(Ue,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"webhooks",name:"Webhooks",to:p.tenantWebhooksRoute.to,icon:({collapsed:s})=>e.jsx(Ge,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"resources",title:"Resources",itemsClassName:"space-y-1",items:[{key:"workers",name:"Workers",to:p.tenantWorkersRoute.to,icon:({collapsed:s})=>e.jsx(Ve,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"workflows",name:"Workflows",to:p.tenantWorkflowsRoute.to,icon:({collapsed:s})=>e.jsx(Ze,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...n.managedWorkerEnabled?[{key:"managed-compute",name:"Managed Compute",to:p.tenantManagedWorkersRoute.to,icon:({collapsed:s})=>e.jsx(qe,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]:[],{key:"rate-limits",name:"Rate Limits",to:p.tenantRateLimitsRoute.to,icon:({collapsed:s})=>e.jsx(Je,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"filters",name:"Filters",to:p.tenantFiltersRoute.to,icon:({collapsed:s})=>e.jsx(Ye,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"settings",title:"Settings",itemsClassName:"space-y-1",items:[{key:"settings",name:"Settings",to:p.tenantSettingsOverviewRoute.to,prefix:p.tenantSettingsLayoutRoute.to,displayAsActiveWhenThisRouteIsMatched:p.tenantSettingsLayoutRoute.to,activeFuzzy:!0,additionalActiveMatches:[{to:p.organizationSettingsLayoutRoute.to,fuzzy:!0}],icon:({collapsed:s})=>e.jsx(Qe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...n.isCloudEnabled?[]:[{key:"tenants",name:"Tenants",to:p.tenantsRoute.to,params:{},icon:({collapsed:s})=>e.jsx($e,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]]}]}function ls({sidebar:n,children:s,sidePanel:c,className:h,mainClassName:t,mainContainerType:a="normal"}){return e.jsxs("div",{className:v("relative grid h-full w-full min-h-0 min-w-0 grid-rows-1 grid-cols-[0px_1fr_auto] overflow-hidden md:grid-cols-[auto_1fr_auto]",h),children:[e.jsx("div",{className:"col-start-1 row-start-1 min-h-0",children:n}),e.jsx("div",{className:v("col-start-2 row-start-1 min-h-0 min-w-0",t),style:a==="inline-size"?{containerType:"inline-size"}:void 0,children:s}),e.jsx("div",{className:"col-start-3 row-start-1 min-h-0",children:c})]})}const cs=650,ee=350;function ds(){const{content:n,isOpen:s,close:c,canGoBack:h,canGoForward:t,goBack:a,goForward:r}=Me(),[d,x]=Ee("sidePanelWidth",cs),[m,j]=o.useState(!1),[b,g]=o.useState(0),[y,f]=o.useState(0),k=o.useRef(null),z=s?d:0,F=o.useCallback(w=>{w.preventDefault(),j(!0),g(w.clientX),f(d)},[d]),R=o.useCallback(w=>{if(!m)return;const L=b-w.clientX,I=Math.max(ee,y+L);I{j(!1)},[]);return o.useEffect(()=>{if(m)return document.addEventListener("mousemove",R),document.addEventListener("mouseup",_),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",_),document.body.style.cursor=""}},[m,R,_]),e.jsx("div",{ref:k,"data-cy":"side-panel",className:v("relative flex flex-shrink-0 flex-col overflow-hidden border-l border-border bg-background h-full",!m&&"transition-all duration-300 ease-in-out"),style:{width:z},children:n&&s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:v("absolute bottom-0 left-0 top-0 z-10 w-1 cursor-col-resize transition-colors hover:bg-blue-500/20",m&&"bg-blue-500/30"),onMouseDown:F}),e.jsxs("div",{className:"sticky top-0 z-20 flex w-full flex-row items-center justify-between bg-background px-4 pb-2 pt-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[e.jsxs(C,{variant:"ghost",size:"sm",onClick:a,disabled:!h,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(de,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Back"})]}),e.jsxs(C,{variant:"ghost",size:"sm",onClick:r,disabled:!t,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(ce,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Forward"})]})]}),e.jsx("div",{children:e.jsxs(C,{variant:"ghost",onClick:c,className:"flex-shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(_e,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})]}),e.jsx("div",{"data-cy":"side-panel-content",className:v("side-panel-content flex-1 overflow-hidden flex flex-col p-4",m&&"pointer-events-none"),children:n.component})]})})}function us({children:n}){const s=De(),{user:c,memberships:h}=s,{tenantId:t,isUserUniverseLoaded:a}=le(),{cloud:r,featureFlags:d,isCloudEnabled:x}=ae(t),m=(d==null?void 0:d["managed-worker"])==="true",{getOrganizationIdForTenant:j}=We(),b=Ie(),g=x&&t?j(t)??void 0:void 0;o.useEffect(()=>{t&&b.prefetchQuery(te.workflows.list(t,{limit:200}))},[b,t]);const y=o.useMemo(()=>is({canBill:r==null?void 0:r.canBill,managedWorkerEnabled:m,isCloudEnabled:x}),[r==null?void 0:r.canBill,m,x,g]),f=Ke({user:c,memberships:h}),k=a?n??e.jsx(Ae,{context:f}):e.jsx(Te,{className:"items-center justify-center"});return e.jsx(ls,{sidebar:e.jsx(rs,{navItems:y}),sidePanel:e.jsx(ds,{}),mainContainerType:"inline-size",children:e.jsx("div",{className:"shadow-[inset_1px_0_0_0_hsl(var(--border)/0.5),inset_0_1px_0_0_hsl(var(--border)/0.5)] md:rounded-tl-xl p-4 h-full dark:bg-[#050A23] bg-background overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:k})})}function xs(){return e.jsx(us,{})}export{us as MainShell,xs as default}; diff --git a/hatchetembed/dashboard/assets/index-BEyCp5-u.js b/hatchetembed/dashboard/assets/index-BEyCp5-u.js deleted file mode 100644 index 43df01b977..0000000000 --- a/hatchetembed/dashboard/assets/index-BEyCp5-u.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,D as n,E as o,b as a,k as l,F as c,f as d,q as u,c as f,a as m,r as s}from"./index-NcPpBRAY.js";import{T as p}from"./top-nav-DUjg_srB.js";import{u as y}from"./use-analytics-Jv1fF8RR.js";import"./organization-selector-CCw2_tjm.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./global-emitter-kjRqhIKI.js";import"./PlusIcon-ChBf4T_m.js";import"./tenant-switcher-DKarkPe5.js";import"./use-pending-invites-DdxsIf8r.js";import"./use-auth-disabled-3jxVUpNe.js";import"./resource-limit-status-BK8AB43u.js";import"./index-DOf3AD-4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e5fdb92c-7e24-43dc-9b87-fd916a1aa250",e._sentryDebugIdIdentifier="sentry-dbid-e5fdb92c-7e24-43dc-9b87-fd916a1aa250")}catch{}})();async function P({request:e}){try{const{isControlPlaneEnabled:r}=await d(),i=await u.fetchQuery({queryKey:["user:get"],queryFn:async()=>(await(r?f.cloudUserGetCurrent():m.userGetCurrent())).data});if(i.emailVerified&&e.url.includes("/onboarding/verify-email"))throw s({to:a.authenticatedRoute.to});return{user:i}}catch(r){if(r instanceof Response)throw r;if(!e.url.includes("/auth/login")&&!e.url.includes("/auth/register"))throw s({to:a.authLoginRoute.to})}}function x(){const e=o({from:a.onboardingVerifyRoute.to}),{capture:r}=y();return l.useEffect(()=>{r("onboarding_verify_email_viewed")},[r]),e!=null&&e.user?t.jsxs("div",{className:"flex h-full w-full flex-1 flex-col",children:[t.jsx(p,{user:e.user,tenantMemberships:[]}),t.jsx("div",{className:"container relative hidden flex-1 flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0 -mt-48",children:t.jsx("div",{className:"mx-auto w-screen lg:p-8",children:t.jsxs("div",{className:"mx-auto flex w-40 flex-col justify-center space-y-6 sm:w-[350px]",children:[t.jsx("div",{className:"flex flex-col space-y-2 text-center",children:t.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Verify your email"})}),t.jsx("div",{className:"my-4 text-sm",children:"Please contact your Hatchet instance administrator to verify your email. Refresh this page once your email has been verified."})]})})})]}):t.jsx(c,{})}function V(){return t.jsx(n,{children:t.jsx(x,{})})}export{V as default,P as loader}; diff --git a/hatchetembed/dashboard/assets/index-BG4bj_5y.js b/hatchetembed/dashboard/assets/index-BG4bj_5y.js deleted file mode 100644 index 827393155e..0000000000 --- a/hatchetembed/dashboard/assets/index-BG4bj_5y.js +++ /dev/null @@ -1 +0,0 @@ -import{cI as H,l as ae,p as B,a as _,j as t,_ as ne,$ as oe,a0 as se,a1 as ie,B as q,S as Y,cP as d,d3 as re,d4 as le,a3 as ce,g as de,b as ee,cZ as Q,aL as ue,be as ge,bi as me,cR as fe,cj as pe,h as xe,x as be,cS as he,cU as we,N as Z,O as W,c$ as ye,d5 as je,q as Ce,k as h,o as ke,d0 as G,s as J,co as ve,b7 as te,aE as Ke,bK as X,d2 as De,cz as Se,b6 as Ie}from"./index-NcPpBRAY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="5bee6e01-3b8d-4e54-a45f-a3775d9babc5",a._sentryDebugIdIdentifier="sentry-dbid-5bee6e01-3b8d-4e54-a45f-a3775d9babc5")}catch{}})();function Te({cron:a,setShowCronRevoke:n,onSuccess:l}){const{tenantId:u}=H(),{handleApiError:f}=ae({}),r=B({mutationKey:["cron-job:delete",u,a],mutationFn:async()=>{a&&await _.workflowCronDelete(u,a.metadata.id)},onSuccess:l,onError:f});return t.jsx(ne,{open:!!a,onOpenChange:c=>n(c?a:void 0),children:t.jsx(Ne,{isLoading:r.isPending,onSubmit:()=>r.mutate(),onCancel:()=>n(void 0)})})}function Ne({className:a,...n}){return t.jsxs(oe,{className:"w-fit min-w-[500px] max-w-[80%]",children:[t.jsx(se,{children:t.jsx(ie,{children:"Delete cron job"})}),t.jsxs("div",{children:[t.jsx("div",{className:"mb-4 text-sm text-foreground",children:"Are you sure you want to delete the cron job? This action will prevent the run from running in the future and cannot be undone."}),t.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[t.jsx(q,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),t.jsxs(q,{variant:"destructive",onClick:()=>{n.onSubmit()},children:[n.isLoading&&t.jsx(Y,{}),"Delete cron job"]})]})]})]})}const s={expression:"Expression",description:"Description",timezone:"Timezone",name:"Name",workflow:"Workflow",metadata:"Metadata",input:"Input",createdAt:"Created At",actions:"Actions",enabled:"Enabled"},Re="enabled",Fe="expression",Pe="description",Ae="timezone",Ee="name",$="workflow",U="metadata",Le="input",ze="createdAt",Me="actions",Oe=({tenantId:a,onDeleteClick:n,onEnableClick:l,onTriggerClick:u,selectedJobId:f,setSelectedJobId:r,isUpdatePending:c,updatingCronId:g})=>[{accessorKey:Fe,header:({column:e})=>t.jsx(d,{column:e,title:s.expression}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4 whitespace-nowrap",children:e.original.cron}),enableSorting:!1},{accessorKey:Pe,header:({column:e})=>t.jsx(d,{column:e,title:s.description}),cell:({row:e})=>t.jsxs("div",{className:"flex flex-row items-center gap-4",children:["Runs ",re(e.original.cron)]}),enableSorting:!1},{accessorKey:Ae,header:({column:e})=>t.jsx(d,{column:e,title:s.timezone}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:le(e.original.cron)}),enableSorting:!1},{accessorKey:Ee,header:({column:e})=>t.jsx(d,{column:e,title:s.name}),cell:({row:e})=>t.jsx("div",{children:e.original.method==="API"?e.original.name:t.jsx(ce,{variant:"outline",children:"Defined in code"})})},{accessorKey:$,header:({column:e})=>t.jsx(d,{column:e,title:s.workflow}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:t.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:t.jsx(de,{to:ee.tenantWorkflowRoute.to,params:{tenant:a,workflow:e.original.workflowId},children:e.original.workflowName})})}),enableSorting:!1,enableHiding:!0},{accessorKey:U,header:({column:e})=>t.jsx(d,{column:e,title:s.metadata}),cell:({row:e})=>e.original.additionalMetadata?t.jsx(Q,{metadata:e.original.additionalMetadata,isOpen:f===e.original.metadata.id,onOpenChange:x=>{r(x?e.original.metadata.id:null)}}):t.jsx("div",{}),enableSorting:!1},{accessorKey:Le,header:({column:e})=>t.jsx(d,{column:e,title:s.input}),cell:({row:e})=>e.original.input?t.jsx(Q,{metadata:e.original.input,isOpen:f===`${e.original.metadata.id}:input`,onOpenChange:x=>{r(x?`${e.original.metadata.id}:input`:null)},title:"Input"}):t.jsx("div",{}),enableSorting:!1},{accessorKey:ze,header:({column:e})=>t.jsx(d,{column:e,title:s.createdAt}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row items-center gap-4",children:t.jsx(ue,{date:e.original.metadata.createdAt})}),enableSorting:!0,enableHiding:!0},{accessorKey:Re,header:({column:e})=>t.jsx(d,{column:e,title:s.enabled}),cell:({row:e})=>t.jsx("div",{children:c&&g===e.original.metadata.id?t.jsx(Y,{}):e.original.enabled?t.jsx(ge,{className:"size-4 text-emerald-500"}):t.jsx(me,{className:"size-4 text-red-500"})})},{accessorKey:Me,header:({column:e})=>t.jsx(d,{column:e,title:s.actions}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row justify-center",children:t.jsx(fe,{row:e.original,actions:[{label:"Trigger Now",onClick:()=>u(e.original)},{label:e.original.enabled?"Disable":"Enable",onClick:()=>l(e.original),disabled:c&&g===e.original.metadata.id?"Update in progress":void 0},{label:"Delete",onClick:()=>n(e.original),disabled:e.original.method!=="API"?"This cron was created via a code definition. Delete it from the code definition instead.":void 0}]})}),enableHiding:!0,enableSorting:!1}],We=ke({w:G(J()).default([]),m:G(J()).default([])}).default({}),Be=({key:a})=>{var i,V;const{tenantId:n}=H(),{refetchInterval:l}=pe(),u=xe(),{toast:f}=be(),r=`crons-${a}`,{state:{w:c,m:g},columnFilters:e,setColumnFilters:x,resetFilters:v}=he(We,r,{w:$,m:U}),{limit:D,offset:S,pagination:I,setPagination:T,setPageSize:N}=we({key:a,resetPageOnChange:[c,g]}),{data:p,isLoading:R,refetch:F,error:P,isRefetching:A}=Z({...W.cronJobs.list(n,{orderByField:je.CreatedAt,orderByDirection:ye.DESC,offset:S,limit:D,workflowId:c[0],additionalMetadata:g.length>0?g:void 0}),refetchInterval:l}),b=B({mutationKey:["cron:update"],mutationFn:async({tenantId:o,cronId:m,data:y})=>{await _.workflowCronUpdate(o,m,y)},onSuccess:async()=>{await Ce.invalidateQueries({queryKey:W.cronJobs.list(n,{}).queryKey})}}),j=B({mutationFn:async o=>_.workflowCronTrigger(n,o),onSuccess:o=>{var y;const m=(y=o==null?void 0:o.data)==null?void 0:y.externalId;m?u({to:ee.tenantRunRoute.to,params:{tenant:n,run:m}}):f({title:"Run triggered successfully"})}}),K=h.useCallback(o=>j.mutate(o),[j]),C=(i=b.variables)==null?void 0:i.cronId,k=h.useCallback((o,m,y)=>b.mutate({tenantId:o,cronId:m,data:y}),[b]),E=(p==null?void 0:p.rows)??[],L=((V=p==null?void 0:p.pagination)==null?void 0:V.num_pages)??1,{data:w,isLoading:z,error:M}=Z({...W.workflows.list(n,{limit:200}),refetchInterval:l}),O=h.useMemo(()=>{var o;return((o=w==null?void 0:w.rows)==null?void 0:o.map(m=>({value:m.metadata.id,label:m.name})))||[]},[w]);return{crons:E,numPages:L,isLoading:R||z,refetch:F,error:P||M,pagination:I,setPagination:T,setPageSize:N,columnFilters:e,setColumnFilters:x,selectedWorkflowIds:c,selectedMetadata:g,workflowKeyFilters:O,isRefetching:A,resetFilters:v,updateCron:k,isUpdatePending:b.isPending,updatingCronId:C,triggerNow:K}};function He(){return t.jsx(ve,{title:"No recurring runs found",description:"Recurring runs trigger workflows automatically on a cron schedule.",docs:{href:te.v1["cron-runs"].href,description:"Learn about cron jobs"},children:t.jsx(_e,{})})}function _e(){const{tenantId:a}=H(),[n,l]=h.useState(!1),[u,f]=h.useState(null),[r,c]=Ke("hatchet:columns:recurring",{}),{crons:g,numPages:e,isLoading:x,refetch:v,error:D,pagination:S,setPagination:I,setPageSize:T,columnFilters:N,setColumnFilters:p,workflowKeyFilters:R,isRefetching:F,resetFilters:P,updateCron:A,isUpdatePending:b,updatingCronId:j,triggerNow:K}=Be({key:"table"}),[C,k]=h.useState(),E=i=>{k(i)},L=i=>{A(i.tenantId,i.metadata.id,{enabled:!i.enabled})},w=()=>{C&&(k(void 0),v())},z=h.useMemo(()=>Oe({tenantId:a,onDeleteClick:E,onEnableClick:L,onTriggerClick:i=>K(i.metadata.id),selectedJobId:u,setSelectedJobId:f,isUpdatePending:b,updatingCronId:j}),[a,u,b,j,K]),M=[{columnId:$,title:s.workflow,options:R,type:X.Radio},{columnId:U,title:s.metadata,type:X.KeyValue}],O=[t.jsx(q,{onClick:()=>l(!0),variant:"cta",children:"Create Cron Job"},"create-cron")];return t.jsxs(t.Fragment,{children:[C&&t.jsx(Te,{cron:C,setShowCronRevoke:k,onSuccess:w}),t.jsx(De,{defaultTimingOption:"cron",defaultWorkflow:void 0,show:n,onClose:()=>l(!1)}),t.jsx(Se,{error:D,isLoading:x,columns:z,data:g,filters:M,showColumnToggle:!0,columnVisibility:r,setColumnVisibility:c,columnFilters:N,setColumnFilters:p,pagination:S,setPagination:I,onSetPageSize:T,pageCount:e,rightActions:O,getRowId:i=>i.metadata.id,columnKeyToName:s,refetchProps:{isRefetching:F,onRefetch:v},onResetFilters:P,showSelectedRows:!1,emptyState:t.jsx(Ie,{title:"No recurring runs found",description:"Recurring runs trigger workflows automatically on a cron schedule.",docPage:te.v1["cron-runs"],docLabel:"Learn about cron jobs"})})]})}export{He as default}; diff --git a/hatchetembed/dashboard/assets/index-BKaLm0fk.js b/hatchetembed/dashboard/assets/index-BKaLm0fk.js deleted file mode 100644 index e9734e62d2..0000000000 --- a/hatchetembed/dashboard/assets/index-BKaLm0fk.js +++ /dev/null @@ -1,14 +0,0 @@ -import{k as c,u as q,t as K,j as e,$ as k,a0 as E,a1 as A,bc as Se,bm as ne,ac as ve,B as g,S,e as L,o as z,d0 as we,s as B,a3 as F,cR as Q,a6 as ye,a7 as Ne,a8 as Ce,a9 as ke,aa as $,bb as W,fv as Ee,fw as Z,fx as Ae,e_ as V,V as Le,fy as Re,b8 as I,L as Ie,I as Te,bt as _e,fz as Me,aI as De,b as Y,y as ae,au as G,b5 as Pe,N as C,h as Fe,b6 as R,ab as b,C as Ge,g as Ue,a as w,af as He,fA as $e,db as We,dc as Oe,dd as M,de as D,cI as v,O as T,l as y,p as N,aL as J,bj as U,c1 as Ve,Q as qe,fB as _}from"./index-NcPpBRAY.js";import{S as O}from"./switch-C9IBAXBS.js";import{S as Ke}from"./settings-page-header-CkCZd3CN.js";import{C as ze}from"./confirm-dialog-Bv8agSqW.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="1dee0b4d-b068-4f04-b089-56c9d415e0d1",t._sentryDebugIdIdentifier="sentry-dbid-1dee0b4d-b068-4f04-b089-56c9d415e0d1")}catch{}})();function Be({title:t,titleId:n,...a},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},a),t?c.createElement("title",{id:n},t):null,c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const Qe=c.forwardRef(Be);function Ze({title:t,titleId:n,...a},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},a),t?c.createElement("title",{id:n},t):null,c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Ye=c.forwardRef(Ze),Je=z({emails:we(B().email()).min(1).max(100)});function Xe({className:t,...n}){var o,l,d;const{handleSubmit:a,control:r,formState:{errors:i}}=q({resolver:K(Je)}),s=((l=(o=i.emails)==null?void 0:o.message)==null?void 0:l.toString())||((d=n.fieldErrors)==null?void 0:d.name);return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsxs(E,{children:[e.jsx(A,{children:"Create an email group"}),e.jsx(Se,{className:"py-2",children:"Enter emails as a comma-separated list."})]}),e.jsx("div",{className:L("grid gap-6",t),children:e.jsx("form",{onSubmit:a(u=>{n.onSubmit(u)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(ne,{control:r,name:"emails",render:({field:u})=>e.jsx(ve,{id:"api-token-name",placeholder:"email1@example.com,email2@example.com",onChange:m=>{u.onChange(m.target.value.split(","))},autoCapitalize:"none",autoCorrect:"off",disabled:n.isLoading})}),s&&e.jsx("div",{className:"text-sm text-red-500",children:s})]}),e.jsxs(g,{disabled:n.isLoading,children:[n.isLoading&&e.jsx(S,{}),"Create email group"]})]})})})]})}function et({className:t,...n}){return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(E,{children:e.jsx(A,{children:"Delete email group"})}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 text-sm text-foreground",children:"Are you sure you want to delete this email group?"}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.emailGroup)},children:[n.isLoading&&e.jsx(S,{}),"Delete group"]})]})]})]})}function tt({className:t,...n}){return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(E,{children:e.jsx(A,{children:"Delete webhook"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to delete the Slack webhook for channel"," ",n.slackWebhook.channelName," in team ",n.slackWebhook.teamName,"?"]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.slackWebhook)},children:[n.isLoading&&e.jsx(S,{}),"Delete webhook"]})]})]})]})}function nt({group:t}){return e.jsxs("div",{children:[t.metadata.id=="default"&&e.jsx(F,{className:"mr-2",variant:"secondary",children:"All Tenant Members"}),t.emails.map((n,a)=>e.jsx(F,{className:"mr-2",variant:"outline",children:n},a))]})}function at({group:t,alertTenantEmailsSet:n}){return e.jsx("div",{className:"flex items-center justify-end space-x-2",children:t.metadata.id!="default"||n?e.jsx(F,{variant:"successful",children:"Enabled"}):e.jsx(F,{variant:"destructive",children:"Disabled"})})}function st({group:t,alertTenantEmailsSet:n,onDeleteClick:a,onToggleMembersClick:r}){return e.jsx("div",{className:"mr-4 flex items-center justify-end space-x-2",children:e.jsx(Q,{row:t,actions:[t.metadata.id!="default"?{label:"Delete",onClick:()=>a(t)}:{label:n?"Disable":"Enable",onClick:()=>r(!n)}]})})}function rt({webhook:t,onDeleteClick:n}){return e.jsx(Q,{row:t,actions:[{label:"Delete",onClick:()=>n(t)}]})}const it=z({maxAlertingFrequency:B(),enableWorkflowRunFailureAlerts:W().optional(),enableExpiringTokenAlerts:W().optional(),enableTenantResourceLimitAlerts:W().optional()});function ot({className:t,...n}){var j,h,f;const[a,r]=c.useState(n.alertingSettings.enableWorkflowRunFailureAlerts),[i,s]=c.useState(n.alertingSettings.enableExpiringTokenAlerts),[o,l]=c.useState(n.alertingSettings.enableTenantResourceLimitAlerts),{handleSubmit:d,control:u,formState:{errors:m}}=q({resolver:K(it),defaultValues:{maxAlertingFrequency:n.alertingSettings.maxAlertingFrequency}}),x=((h=(j=m.maxAlertingFrequency)==null?void 0:j.message)==null?void 0:h.toString())||((f=n.fieldErrors)==null?void 0:f.maxAlertingFrequency);return e.jsxs("form",{onSubmit:d(p=>{n.onSubmit({...p,enableWorkflowRunFailureAlerts:a,enableExpiringTokenAlerts:i,enableTenantResourceLimitAlerts:o})}),className:L("divide-y divide-border",t),children:[e.jsx(P,{label:"Expiring Token Alerts",description:"Send alerts when API tokens are approaching their expiration date",children:e.jsx(O,{id:"eta",checked:i,onClick:()=>s(p=>!p)})}),e.jsx(P,{label:"Resource Limit Alerts",description:"Send alerts when this tenant is approaching (or exceeds) resource limits",children:e.jsx(O,{id:"atrl",checked:o,onClick:()=>l(p=>!p)})}),e.jsx(P,{label:"Run Failure Alerts",description:"Send alerts when workflow runs fail",children:e.jsx(O,{id:"awrf",checked:a,onClick:()=>r(p=>!p)})}),a&&e.jsx(P,{label:"Max Failure Alert Frequency",description:"Limit how often repeated run-failure alerts are sent for the same ongoing issue.",children:e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx(ne,{control:u,name:"maxAlertingFrequency",render:({field:p})=>e.jsxs(ye,{onValueChange:p.onChange,...p,children:[e.jsx(Ne,{className:"w-[140px]",children:e.jsx(Ce,{placeholder:"Frequency..."})}),e.jsxs(ke,{children:[e.jsx($,{value:"5m",children:"5 minutes"}),e.jsx($,{value:"1h",children:"1 hour"}),e.jsx($,{value:"24h",children:"24 hours"})]})]})}),x&&e.jsx("div",{className:"text-sm text-red-500",children:x})]})}),e.jsx("div",{className:"flex justify-end pt-4",children:e.jsxs(g,{disabled:n.isLoading,className:"w-fit",children:[n.isLoading&&e.jsx(S,{}),"Save"]})})]})}function P({label:t,description:n,children:a}){return e.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("p",{className:"text-sm font-medium",children:t}),e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:n})]}),a]})}function lt(t,n=[]){let a=[];function r(s,o){const l=c.createContext(o);l.displayName=s+"Context";const d=a.length;a=[...a,o];const u=x=>{var ee;const{scope:j,children:h,...f}=x,p=((ee=j==null?void 0:j[t])==null?void 0:ee[d])||l,be=c.useMemo(()=>f,Object.values(f));return e.jsx(p.Provider,{value:be,children:h})};u.displayName=s+"Provider";function m(x,j){var p;const h=((p=j==null?void 0:j[t])==null?void 0:p[d])||l,f=c.useContext(h);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${x}\` must be used within \`${s}\``)}return[u,m]}const i=()=>{const s=a.map(o=>c.createContext(o));return function(l){const d=(l==null?void 0:l[t])||s;return c.useMemo(()=>({[`__scope${t}`]:{...l,[t]:d}}),[l,d])}};return i.scopeName=t,[r,ct(i,...n)]}function ct(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:d,scopeName:u})=>{const x=d(s)[`__scope${u}`];return{...l,...x}},{});return c.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return a.scopeName=n.scopeName,a}var dt=Ee();function ut(){return dt.useSyncExternalStore(mt,()=>!0,()=>!1)}function mt(){return()=>{}}var X="Avatar",[xt]=lt(X),[ht,se]=xt(X),re=c.forwardRef((t,n)=>{const{__scopeAvatar:a,...r}=t,[i,s]=c.useState("idle");return e.jsx(ht,{scope:a,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:e.jsx(Z.span,{...r,ref:n})})});re.displayName=X;var ie="AvatarImage",oe=c.forwardRef((t,n)=>{const{__scopeAvatar:a,src:r,onLoadingStatusChange:i=()=>{},...s}=t,o=se(ie,a),l=gt(r,s),d=Ae(u=>{i(u),o.onImageLoadingStatusChange(u)});return V(()=>{l!=="idle"&&d(l)},[l,d]),l==="loaded"?e.jsx(Z.img,{...s,ref:n,src:r}):null});oe.displayName=ie;var le="AvatarFallback",ce=c.forwardRef((t,n)=>{const{__scopeAvatar:a,delayMs:r,...i}=t,s=se(le,a),[o,l]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(d)}},[r]),o&&s.imageLoadingStatus!=="loaded"?e.jsx(Z.span,{...i,ref:n}):null});ce.displayName=le;function te(t,n){return t?n?(t.src!==n&&(t.src=n),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gt(t,{referrerPolicy:n,crossOrigin:a}){const r=ut(),i=c.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,l]=c.useState(()=>te(s,t));return V(()=>{l(te(s,t))},[s,t]),V(()=>{const d=x=>()=>{l(x)};if(!s)return;const u=d("loaded"),m=d("error");return s.addEventListener("load",u),s.addEventListener("error",m),n&&(s.referrerPolicy=n),typeof a=="string"&&(s.crossOrigin=a),()=>{s.removeEventListener("load",u),s.removeEventListener("error",m)}},[s,a,n]),o}var de=re,ue=oe,me=ce;const xe=c.forwardRef(({className:t,...n},a)=>e.jsx(de,{ref:a,className:L("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...n}));xe.displayName=de.displayName;const he=c.forwardRef(({className:t,...n},a)=>e.jsx(ue,{ref:a,className:L("aspect-square h-full w-full",t),...n}));he.displayName=ue.displayName;const ge=c.forwardRef(({className:t,...n},a)=>e.jsx(me,{ref:a,className:L("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...n}));ge.displayName=me.displayName;function ft({installation:t}){return e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsxs(xe,{className:"h-6 w-6",children:[e.jsx(he,{src:t.account_avatar_url}),e.jsx(ge,{})]}),e.jsx("div",{children:t.account_name})]})}function pt({installation:t,onLinkToTenant:n}){return t.is_linked_to_tenant?e.jsx(g,{variant:"ghost",disabled:!0,leftIcon:e.jsx(Le,{className:"size-4"}),children:"Linked"}):t.type=="installation"?e.jsx(g,{variant:"outline",onClick:()=>n(t.metadata.id),leftIcon:e.jsx(Ye,{className:"size-4"}),children:"Link to tenant"}):e.jsx("a",{href:t.installation_settings_url+`&redirect_to=${encodeURIComponent(window.location.pathname)}`,target:"_blank",rel:"noreferrer",children:e.jsx(g,{variant:"outline",children:"Finish Setup"})})}function jt({installation:t}){return e.jsx("a",{href:t.installation_settings_url+`&redirect_to=${encodeURIComponent(window.location.pathname)}`,target:"_blank",rel:"noreferrer",children:e.jsx(g,{variant:"ghost",leftIcon:e.jsx(Re,{className:"size-4"}),children:"Configure"})})}const bt=z({topicArn:B().min(1).max(255)});function St({className:t,snsIngestionUrl:n,...a}){var l,d,u;const{register:r,handleSubmit:i,formState:{errors:s}}=q({resolver:K(bt)});if(n)return e.jsxs(k,{className:"w-fit max-w-[700px]",children:[e.jsx(E,{children:e.jsx(A,{children:"Use this ingestion URL"})}),e.jsx("p",{className:"text-sm",children:"Use this ingestion URL with an HTTPS subscriber for SNS."}),e.jsx(I,{language:"typescript",className:"text-sm",wrapLines:!1,maxWidth:"calc(700px - 4rem)",code:n,copy:!0})]});const o=((d=(l=s.topicArn)==null?void 0:l.message)==null?void 0:d.toString())||((u=a.fieldErrors)==null?void 0:u.name);return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(E,{children:e.jsx(A,{children:"Create a new SNS integration"})}),e.jsx("div",{className:L("grid gap-6",t),children:e.jsx("form",{onSubmit:i(m=>{a.onSubmit(m)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(Ie,{htmlFor:"email",children:"Topic ARN"}),e.jsx(Te,{...r("topicArn"),id:"sns-topic-arn",placeholder:"arn:aws:sns:us-west-1:123456789:topic",autoCapitalize:"none",autoCorrect:"off",disabled:a.isLoading}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs(g,{disabled:a.isLoading,children:[a.isLoading&&e.jsx(S,{}),"Create integration"]})]})})})]})}function vt({className:t,...n}){return e.jsxs(k,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(E,{children:e.jsx(A,{children:"Delete integration"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to revoke the SNS integration on Topic ARN"," ",n.snsIntegration.topicArn,"? This action will immediately prevent any SNS events from being sent to the Hatchet subscriber."]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(g,{variant:"ghost",onClick:()=>{n.onCancel()},children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:()=>{n.onSubmit(n.snsIntegration)},children:[n.isLoading&&e.jsx(S,{}),"Delete integration"]})]})]})]})}function wt({ingestUrl:t}){const[n,a]=c.useState(!1);return e.jsxs(g,{variant:"icon",onClick:()=>{navigator.clipboard.writeText(t),a(!0),setTimeout(()=>{a(!1)},2e3)},children:[n?e.jsx(_e,{className:"size-4"}):e.jsx(Me,{className:"size-4"}),n?"Copied":"Copy ingest URL"]})}function yt({integration:t,onDeleteClick:n}){return e.jsx(Q,{row:t,actions:[{label:"Delete",onClick:()=>n(t)}]})}const Nt="https://docs.hatchet.run/self-hosting/configuration-options";function fe({title:t,description:n}){return e.jsxs("div",{className:"mb-4 space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:t}),e.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:n})]})}function Ct(){var o;const{tenant:t}=De({from:Y.tenantRoute.to}),{isControlPlaneEnabled:n,isControlPlaneLoading:a}=ae(),{organizationId:r}=G(),i=Pe(),s=C({...i.organizationEntitlementsGetQuery(r||""),enabled:!!r&&n});return a?e.jsx(S,{}):n?!r||s.isLoading?e.jsx(S,{}):((o=s.data)==null?void 0:o.prometheusMetrics)!==!0?e.jsx(Lt,{organizationId:r}):e.jsx(Et,{tenantId:t}):e.jsx(At,{tenantId:t})}function kt(t){if(t)try{const n=new URL(t);return{origin:n.origin,host:n.host,scheme:n.protocol.replace(":","")}}catch{}return{origin:window.location.origin,host:window.location.host,scheme:window.location.protocol.replace(":","")}}function pe({tenantId:t}){const{tenant:n}=G(),{origin:a,host:r,scheme:i}=kt(n==null?void 0:n.serverUrl),s=`${a}/api/v1/tenants/${t}/prometheus-metrics`,o=`scrape_configs: - - job_name: hatchet - scheme: ${i} - metrics_path: /api/v1/tenants/${t}/prometheus-metrics - authorization: - type: Bearer - credentials: - static_configs: - - targets: - - ${r}`;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Scrape URL"}),e.jsx(I,{language:"text",code:s,wrapLines:!1}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Requests must be authenticated with a"," ",e.jsx(Ue,{to:Y.tenantSettingsApiTokensRoute.to,params:{tenant:t},className:"underline",children:"tenant API token"})," ","(sent as a Bearer token). Point your Prometheus instance or Grafana Agent at this URL to federate this tenant's metrics."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Example Prometheus scrape config"}),e.jsx(I,{language:"yaml",code:o})]})]})}function je({tenantId:t}){const n=C({queryKey:["tenant:prometheus-metrics",t],queryFn:async()=>(await w.tenantGetPrometheusMetrics(t)).data,retry:!1});return e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Live preview"}),n.isLoading?e.jsx(S,{}):n.isError||!n.data?e.jsx("div",{className:"py-8",children:e.jsx(R,{title:"No metrics yet",description:"Once your workers start reporting metrics, a live preview will appear here."})}):e.jsx(I,{language:"text",code:n.data,maxHeight:"24rem",copy:!1,wrapLines:!1})]})}function Et({tenantId:t}){return e.jsxs("div",{children:[e.jsx(fe,{title:"Prometheus Metrics",description:"Scrape this tenant's metrics in Prometheus exposition format to power external dashboards and alerting."}),e.jsx(b,{className:"my-4"}),e.jsx(pe,{tenantId:t}),e.jsx(b,{className:"my-6"}),e.jsx(je,{tenantId:t})]})}function At({tenantId:t}){const{meta:n}=Ge(),a=!!n&&"prometheusServerEnabled"in n&&!!n.prometheusServerEnabled;return e.jsxs("div",{children:[e.jsx(fe,{title:"Prometheus Metrics",description:"Expose this tenant's metrics in Prometheus exposition format for external dashboards and alerting."}),e.jsx(b,{className:"my-4"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"To enable tenant-scoped Prometheus metrics on a self-hosted Hatchet server, configure the following environment variables on the API server:"}),e.jsx(I,{language:"text",code:`SERVER_PROMETHEUS_SERVER_URL= -SERVER_PROMETHEUS_SERVER_USERNAME= -SERVER_PROMETHEUS_SERVER_PASSWORD= -# Gate the endpoint per tenant on the prometheus_metrics entitlement -SERVER_PROMETHEUS_SERVER_TENANT_SCOPED=true`}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx("a",{href:Nt,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"configuration options documentation"})," ","for details."]})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx(b,{className:"my-6"}),e.jsx(pe,{tenantId:t}),e.jsx(b,{className:"my-6"}),e.jsx(je,{tenantId:t})]})]})}function Lt({organizationId:t}){const n=Fe();return e.jsx("div",{className:"py-12",children:e.jsx(R,{graphic:e.jsx("div",{className:"rounded-full bg-primary/10 p-3",children:e.jsx(Qe,{className:"h-8 w-8 text-primary"})}),title:"Unlock Prometheus Metrics",description:"Prometheus metrics let you federate this tenant's metrics into your own dashboards and alerting. Upgrade your plan to enable this feature.",buttons:[{label:"View plans",onClick:()=>n({to:Y.organizationBillingRoute.to,params:{organization:t}})}]})})}function Vt(){const{cloud:t,featureFlags:n}=He(),a=$e(),r=a==null?void 0:a.find(l=>l.name==="email"),i=a==null?void 0:a.find(l=>l.name==="slack"),s=t==null?void 0:t.canLinkGithub,o=(n==null?void 0:n["managed-worker"])==="true";return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(Ke,{title:"Integrations",description:"Configure alerting, ingestors, and connected services available for this tenant."}),e.jsxs(We,{defaultValue:"alerting",children:[e.jsxs(Oe,{layout:"underlined",className:"mb-6",children:[e.jsx(M,{value:"alerting",variant:"underlined",children:"Alerting"}),e.jsx(M,{value:"ingestors",variant:"underlined",children:"Ingestors"}),e.jsx(M,{value:"metrics",variant:"underlined",children:"Metrics"}),s&&o&&e.jsx(M,{value:"github",variant:"underlined",children:"GitHub"})]}),e.jsxs(D,{value:"alerting",children:[e.jsx(Rt,{}),r&&e.jsx(b,{className:"my-6"}),r&&e.jsx(It,{}),i&&e.jsx(b,{className:"my-6"}),i&&e.jsx(Mt,{})]}),e.jsx(D,{value:"ingestors",children:e.jsx(Pt,{})}),e.jsx(D,{value:"metrics",children:e.jsx(Ct,{})}),s&&e.jsx(D,{value:"github",children:e.jsx(Ut,{})})]})]})})}function H({title:t,description:n,action:a}){return e.jsxs("div",{className:"mb-4 flex flex-col gap-2 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-sm font-medium text-foreground",children:t}),e.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:n})]}),a]})}const Rt=()=>{const{tenantId:t}=v(),n=C({...T.alertingSettings.get(t)}),[a,r]=c.useState(!1),{handleApiError:i}=y({}),s=N({mutationKey:["tenant:update"],mutationFn:async o=>{await w.tenantUpdate(t,o)},onMutate:()=>{r(!0)},onSuccess:()=>{r(!1),n.refetch()},onError:i});return n.data?e.jsx(ot,{alertingSettings:n.data,isLoading:a,onSubmit:o=>{s.mutate(o)},fieldErrors:{}}):e.jsx(S,{})};function It(){const{tenant:t}=G(),{tenantId:n}=v(),[a,r]=c.useState(!1),[i,s]=c.useState(null),[o,l]=c.useState((t==null?void 0:t.alertMemberEmails)||!1),{handleApiError:d}=y({}),u=N({mutationKey:["tenant:update"],mutationFn:async h=>{await w.tenantUpdate(n,h)},onError:d}),m=C({...T.emailGroups.list(n)}),x=c.useMemo(()=>{var f;const h=((f=m.data)==null?void 0:f.rows)||[];return[{emails:[],metadata:{id:"default",createdAt:"default",updatedAt:"default"}},...h]},[m.data]),j=c.useMemo(()=>[{columnLabel:"Emails",cellRenderer:h=>e.jsx(nt,{group:h})},{columnLabel:"Created",cellRenderer:h=>h.metadata.id!="default"?e.jsx(J,{date:h.metadata.createdAt}):e.jsx("div",{})},{columnLabel:"",cellRenderer:h=>e.jsx(at,{group:h,alertTenantEmailsSet:o})},{columnLabel:"",cellRenderer:h=>e.jsx(st,{group:h,alertTenantEmailsSet:o,onDeleteClick:f=>{s(f)},onToggleMembersClick:f=>{l(f),u.mutate({alertMemberEmails:f})}})}],[o,u]);return e.jsxs("div",{children:[e.jsx(H,{title:"Email Groups",description:"Create reusable email recipient groups for alert delivery, including a default group for tenant members.",action:e.jsx(g,{onClick:()=>{r(!0)},children:"Create new group"},"create-email-group")}),e.jsx(b,{className:"my-4"}),x.length>0?e.jsx(U,{columns:j,data:x,rowKey:h=>h.metadata.id}):e.jsx(R,{title:"No email groups found",description:"Email groups receive alert notifications when your workflows encounter errors."}),a&&e.jsx(Tt,{onSuccess:()=>{r(!1),m.refetch()},showGroupDialog:a,setShowGroupDialog:r}),i&&e.jsx(_t,{emailGroup:i,setShowEmailGroupDelete:()=>s(null),onSuccess:()=>{s(null),m.refetch()}})]})}function Tt({showGroupDialog:t,setShowGroupDialog:n,onSuccess:a}){const{tenantId:r}=v(),[i,s]=c.useState({}),{handleApiError:o}=y({setFieldErrors:s}),l=N({mutationKey:["alert-email-group:create",r],mutationFn:async d=>(await w.alertEmailGroupCreate(r,d)).data,onSuccess:()=>{a()},onError:o});return e.jsx(_,{open:t,onOpenChange:n,children:e.jsx(Xe,{isLoading:l.isPending,onSubmit:l.mutate,fieldErrors:i})})}function _t({emailGroup:t,setShowEmailGroupDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["alert-email-group:delete",r,t],mutationFn:async()=>{await w.alertEmailGroupDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(_,{open:!!t,onOpenChange:n,children:e.jsx(et,{emailGroup:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function Mt(){var o,l;const{tenantId:t}=v(),{isControlPlaneEnabled:n}=ae(),[a,r]=c.useState(null),i=C({...T.slackWebhooks.list(t)}),s=c.useMemo(()=>[{columnLabel:"Team",cellRenderer:d=>e.jsx("div",{children:d.teamName})},{columnLabel:"Channel",cellRenderer:d=>e.jsx("div",{children:d.channelName})},{columnLabel:"Created",cellRenderer:d=>e.jsx(J,{date:d.metadata.createdAt})},{columnLabel:"Actions",cellRenderer:d=>e.jsx(rt,{webhook:d,onDeleteClick:u=>{r(u)}})}],[]);return e.jsxs("div",{children:[e.jsx(H,{title:"Slack Webhooks",description:"Connect Slack channels so Hatchet can send tenant alerts directly into your team workflows.",action:e.jsx("a",{href:n?"/api/v1/control-plane/tenants/"+t+"/slack/start":"/api/v1/tenants/"+t+"/slack/start",children:e.jsx(g,{children:"Add Slack Webhook"},"add-slack-webhook")})}),e.jsx(b,{className:"my-4"}),(((o=i.data)==null?void 0:o.rows)||[]).length>0?e.jsx(U,{columns:s,data:((l=i.data)==null?void 0:l.rows)||[],rowKey:d=>d.metadata.id}):e.jsx(R,{title:"No Slack webhooks found",description:"Slack webhooks send workflow status updates and alerts to your Slack channels."}),a&&e.jsx(Dt,{slackWebhook:a,setShowSlackWebhookDelete:()=>r(null),onSuccess:()=>{r(null),i.refetch()}})]})}function Dt({slackWebhook:t,setShowSlackWebhookDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["slack-webhook:delete",r,t],mutationFn:async()=>{await w.slackWebhookDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(_,{open:!!t,onOpenChange:n,children:e.jsx(tt,{slackWebhook:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function Pt(){var l,d;const{tenantId:t}=v(),[n,a]=c.useState(!1),[r,i]=c.useState(null),s=C({...T.snsIntegrations.list(t)}),o=c.useMemo(()=>[{columnLabel:"Topic ARN",cellRenderer:u=>e.jsx("div",{children:u.topicArn})},{columnLabel:"Ingest URL",cellRenderer:u=>e.jsx(wt,{ingestUrl:u.ingestUrl||""})},{columnLabel:"Created",cellRenderer:u=>e.jsx(J,{date:u.metadata.createdAt})},{columnLabel:"Actions",cellRenderer:u=>e.jsx(yt,{integration:u,onDeleteClick:m=>{i(m)}})}],[]);return e.jsxs("div",{children:[e.jsx(H,{title:"SNS Integrations",description:"Create SNS ingestion endpoints to receive events from AWS services and forward them into this tenant.",action:e.jsx(g,{onClick:()=>a(!0),children:"Create SNS Endpoint"})}),e.jsx(b,{className:"my-4"}),(((l=s.data)==null?void 0:l.rows)||[]).length>0?e.jsx(U,{columns:o,data:((d=s.data)==null?void 0:d.rows)||[],rowKey:u=>u.metadata.id}):e.jsx(R,{title:"No SNS integrations found",description:"SNS integrations publish Hatchet workflow events to your AWS Simple Notification Service topics."}),n&&e.jsx(Ft,{showSNSDialog:n,setShowSNSDialog:a,onSuccess:()=>{s.refetch()}}),r&&e.jsx(Gt,{snsIntegration:r,setShowSNSDelete:()=>i(null),onSuccess:()=>{i(null),s.refetch()}})]})}function Ft({showSNSDialog:t,setShowSNSDialog:n,onSuccess:a}){const{tenantId:r}=v(),[i,s]=c.useState(),[o,l]=c.useState({}),{handleApiError:d}=y({setFieldErrors:l}),u=N({mutationKey:["sns:create",r],mutationFn:async m=>(await w.snsCreate(r,m)).data,onSuccess:m=>{s(m.ingestUrl),a()},onError:d});return e.jsx(_,{open:t,onOpenChange:n,children:e.jsx(St,{isLoading:u.isPending,onSubmit:u.mutate,snsIngestionUrl:i,fieldErrors:o})})}function Gt({snsIntegration:t,setShowSNSDelete:n,onSuccess:a}){const{tenantId:r}=v(),{handleApiError:i}=y({}),s=N({mutationKey:["sns:delete",r,t],mutationFn:async()=>{await w.snsDelete(t.metadata.id)},onSuccess:a,onError:i});return e.jsx(_,{open:!!t,onOpenChange:n,children:e.jsx(vt,{snsIntegration:t,isLoading:s.isPending,onSubmit:()=>s.mutate(),onCancel:()=>n(!1)})})}function Ut(){var u,m;const{tenantId:t}=v(),{tenant:n}=G(),[a,r]=c.useState(),i=C({...T.github.listInstallations(t)}),{handleApiError:s}=y({}),o=N({mutationKey:["github-app:update:installation",t,a],mutationFn:async()=>(Ve(a),(await qe.githubAppUpdateInstallation(a,{tenant:t})).data),onSuccess:()=>{r(void 0),i.refetch()},onError:s}),l=c.useMemo(()=>[{columnLabel:"Account name",cellRenderer:x=>e.jsx(ft,{installation:x})},{columnLabel:"Link to tenant?",cellRenderer:x=>e.jsx(pt,{installation:x,onLinkToTenant:j=>{r(j)}})},{columnLabel:"GitHub Settings",cellRenderer:x=>e.jsx(jt,{installation:x})}],[]),d=window.location.pathname;return e.jsxs("div",{children:[e.jsx(H,{title:"GitHub Accounts",description:"Link GitHub accounts and installations that this tenant can use for connected repository workflows.",action:e.jsx("a",{href:`/api/v1/cloud/users/github-app/start?redirect_to=${encodeURIComponent(d)}&with_repo_installation=false`,children:e.jsx(g,{children:"Link new account"})})}),e.jsx(b,{className:"my-4"}),(((u=i.data)==null?void 0:u.rows)||[]).length>0?e.jsx(U,{columns:l,data:((m=i.data)==null?void 0:m.rows)||[],rowKey:x=>x.metadata.id}):e.jsx("div",{className:"py-8",children:e.jsx(R,{title:"No GitHub accounts linked",description:"Link a GitHub account to integrate Hatchet with your CI/CD workflows."})}),e.jsx(ze,{title:"Are you sure?",description:`Linking this app to ${n==null?void 0:n.name} will allow other members of the tenant to view this installation. Users will only be able to deploy to repositories that they have access to.`,submitLabel:"Yes, link to tenant",submitVariant:"default",onSubmit:o.mutate,onCancel:()=>r(void 0),isLoading:o.isPending,isOpen:a!==void 0})]})}export{Vt as default}; diff --git a/hatchetembed/dashboard/assets/index-BavpRR8e.js b/hatchetembed/dashboard/assets/index-BavpRR8e.js deleted file mode 100644 index c97261b498..0000000000 --- a/hatchetembed/dashboard/assets/index-BavpRR8e.js +++ /dev/null @@ -1 +0,0 @@ -import{h as t,j as e,B as n,b as i}from"./index-NcPpBRAY.js";import{N as o}from"./new-organization-saver-form-B3Ag7ruu.js";import{F as r}from"./XMarkIcon-q_Tj_COY.js";import"./welcome-modal-state-YrY6roPC.js";import"./shard-deployment-key-in4ZPoWA.js";import"./use-analytics-Jv1fF8RR.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="424f0dcf-4f58-4482-a9a3-6ea626e496a4",a._sentryDebugIdIdentifier="sentry-dbid-424f0dcf-4f58-4482-a9a3-6ea626e496a4")}catch{}})();function p(){const a=t();return e.jsx("div",{className:"max-h-full overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-6xl space-y-6 p-6",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(n,{variant:"ghost",size:"sm",onClick:()=>window.history.back(),className:"h-8 w-8 p-0",children:e.jsx(r,{className:"size-4"})})}),e.jsx("h1",{className:"text-2xl font-bold text-center",children:"Create a new organization"}),e.jsx("div",{className:"flex justify-center",children:e.jsx(o,{afterSave:({tenant:s})=>a({to:i.tenantOverviewRoute.to,params:{tenant:s.id}})})})]})})}export{p as default}; diff --git a/hatchetembed/dashboard/assets/index-Bfpllom8.js b/hatchetembed/dashboard/assets/index-Bfpllom8.js deleted file mode 100644 index 10808f8e89..0000000000 --- a/hatchetembed/dashboard/assets/index-Bfpllom8.js +++ /dev/null @@ -1 +0,0 @@ -import{u as C,t as F,j as e,L as u,I as g,A as P,d as I,g as A,b as h,B as R,S as U,e as D,o as B,s as f,h as M,k as N,m as T,l as _,n as k,p as z}from"./index-NcPpBRAY.js";import{A as V}from"./auth-page-BRjt0-kC.js";import"./auth-layout-BYNreqC4.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="60b34f4f-cbbe-4f3f-9493-01bf25fc168c",a._sentryDebugIdIdentifier="sentry-dbid-60b34f4f-cbbe-4f3f-9493-01bf25fc168c")}catch{}})();const Z=B({name:f().min(3,"Name must be at least 3 characters long"),email:f().email("Invalid email address"),password:f().min(8,"Password must be at least 8 characters long").max(64,"Password must be at most 64 characters long").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[0-9]/,"Password must contain at least one number")});function q({className:a,...s}){var b,j,p,w,v,y,E,L,S;const{register:t,handleSubmit:l,formState:{errors:r,isValid:c,touchedFields:i,submitCount:n}}=C({resolver:F(Z),mode:"onChange",reValidateMode:"onChange"}),o=(i.name||n>0?(j=(b=r.name)==null?void 0:b.message)==null?void 0:j.toString():void 0)||((p=s.fieldErrors)==null?void 0:p.name),d=(i.email||n>0?(v=(w=r.email)==null?void 0:w.message)==null?void 0:v.toString():void 0)||((y=s.fieldErrors)==null?void 0:y.email),x=(i.password||n>0?(L=(E=r.password)==null?void 0:E.message)==null?void 0:L.toString():void 0)||((S=s.fieldErrors)==null?void 0:S.password);return e.jsx("div",{className:D("grid gap-6",a),children:e.jsx("form",{onSubmit:l(m=>{s.onSubmit(m)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"name",children:"Name"}),e.jsx(g,{...t("name"),id:"name",placeholder:"Boba Fett",type:"name",autoCapitalize:"none",autoCorrect:"off",disabled:s.isLoading}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"email",children:"Email"}),e.jsx(g,{...t("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:s.isLoading}),d&&e.jsx("div",{className:"text-sm text-red-500",children:d})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(u,{htmlFor:"password",children:"Password"}),e.jsx(g,{...t("password"),id:"password",placeholder:"Password",type:"password",disabled:s.isLoading}),x&&e.jsx("div",{className:"text-sm text-red-500",children:x})]}),s.errors&&s.errors.length>0&&e.jsx(P,{variant:"destructive",children:e.jsxs(I,{children:[s.errors.join(" "),s.errors.some(m=>m.toLowerCase().includes("already exists"))&&e.jsxs(e.Fragment,{children:[" ",e.jsx(A,{to:h.authLoginRoute.to,className:"font-semibold underline underline-offset-2",children:"Log in instead"})]})]})}),e.jsxs(R,{disabled:s.isLoading||!c,children:[s.isLoading&&e.jsx(U,{}),"Create Account"]})]})})})}function O(){return e.jsx(V,{title:"Create an account",basicSection:e.jsx(G,{}),altAction:e.jsxs(e.Fragment,{children:["Already have an account?"," ",e.jsx(A,{to:h.authLoginRoute.to,className:"font-semibold text-primary underline underline-offset-4 hover:text-primary/90",children:"Log in"})]})})}function G(){const a=M(),[s,t]=N.useState([]),[l,r]=N.useState({}),{get:c}=T(),{handleApiError:i}=_({setFieldErrors:r,setErrors:t}),{userCreateMutation:n}=k(),o=z({...n(),onSuccess:()=>{c(),a({to:h.authenticatedRoute.to})},onError:i});return e.jsx(q,{isLoading:o.isPending,onSubmit:d=>{t([]),r({}),o.mutate(d)},errors:s,fieldErrors:l})}export{O as default}; diff --git a/hatchetembed/dashboard/assets/index-BkqnLZBk.js b/hatchetembed/dashboard/assets/index-BkqnLZBk.js deleted file mode 100644 index 6762c396ba..0000000000 --- a/hatchetembed/dashboard/assets/index-BkqnLZBk.js +++ /dev/null @@ -1 +0,0 @@ -import{af as b,N as p,O as g,j as e,S as y,bj as h,b6 as x,b7 as R,aI as I,b as L}from"./index-NcPpBRAY.js";import{S}from"./settings-page-header-CkCZd3CN.js";import{u as j}from"./resource-limit-columns-CvplayQs.js";import"./resource-limit-status-BK8AB43u.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="9b1f1253-3ab9-4ade-9e2c-c3f873ac2c74",s._sentryDebugIdIdentifier="sentry-dbid-9b1f1253-3ab9-4ade-9e2c-c3f873ac2c74")}catch{}})();const v=5e3;function E({tenantId:s,tenantName:t,limits:n,isLoading:u,showDocsOnEmpty:l=!1}){var c;const{isCloudEnabled:i}=b(),d=j(),o=l&&!i,f=i?v:!1,a=p({...g.tenantResourcePolicy.get(s),enabled:n===void 0,refetchInterval:f}),r=n??((c=a.data)==null?void 0:c.limits)??[];return u??a.isLoading?e.jsx("div",{className:"py-6",children:e.jsx(y,{})}):e.jsxs("section",{children:[t?e.jsx("h3",{className:"mb-4 text-base font-semibold text-foreground",children:t}):null,r.length>0?e.jsx(h,{columns:d,data:r,rowKey:m=>m.metadata.id}):e.jsx(x,{title:"No resource limits configured",description:o?"Resource limits cap the number of active runs and tasks in your tenant. Set SERVER_ENFORCE_LIMITS=true to enable them.":"Resource limits cap the number of active runs and tasks in your tenant.",docPage:o?R["self-hosting"]["configuration-options"]:void 0,docLabel:o?"Learn about engine configuration options":void 0})]})}function C(){const{tenant:s}=I({from:L.tenantSettingsResourceLimitsRoute.to});return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(S,{title:"Resource Limits",description:"Review the resource limits currently applied to this tenant."}),e.jsx(E,{tenantId:s,showDocsOnEmpty:!0})]})})}export{C as default}; diff --git a/hatchetembed/dashboard/assets/index-BoqiiIh4.js b/hatchetembed/dashboard/assets/index-BoqiiIh4.js deleted file mode 100644 index 458f452399..0000000000 --- a/hatchetembed/dashboard/assets/index-BoqiiIh4.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-NcPpBRAY.js";import{O as r}from"./index-CgrU27uR.js";import"./member-primitives-r9nHLQI3.js";import"./settings-page-header-CkCZd3CN.js";import"./settings-row-D2iLPMr6.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./switch-C9IBAXBS.js";import"./data-contracts-C0lcHVTf.js";import"./global-emitter-kjRqhIKI.js";import"./docs-button-Mn8SLZkH.js";import"./shield-check-jS3YzcEA.js";import"./inline-error-BRPaHH6l.js";import"./XMarkIcon-q_Tj_COY.js";import"./confirm-dialog-Bv8agSqW.js";import"./KeyIcon-szjQ8KFq.js";import"./ExclamationTriangleIcon-Okie-gQE.js";import"./PlusIcon-ChBf4T_m.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b5b02e14-2ac1-43c0-92eb-fb2334c654e2",t._sentryDebugIdIdentifier="sentry-dbid-b5b02e14-2ac1-43c0-92eb-fb2334c654e2")}catch{}})();function h(){return o.jsx(r,{})}export{h as default}; diff --git a/hatchetembed/dashboard/assets/index-Bwjif3lq.js b/hatchetembed/dashboard/assets/index-Bwjif3lq.js deleted file mode 100644 index ab94e0f4f0..0000000000 --- a/hatchetembed/dashboard/assets/index-Bwjif3lq.js +++ /dev/null @@ -1 +0,0 @@ -import{aI as r,b as i,j as e}from"./index-NcPpBRAY.js";import{C as n}from"./index-CgrU27uR.js";import"./member-primitives-r9nHLQI3.js";import"./settings-page-header-CkCZd3CN.js";import"./settings-row-D2iLPMr6.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./switch-C9IBAXBS.js";import"./data-contracts-C0lcHVTf.js";import"./global-emitter-kjRqhIKI.js";import"./docs-button-Mn8SLZkH.js";import"./shield-check-jS3YzcEA.js";import"./inline-error-BRPaHH6l.js";import"./XMarkIcon-q_Tj_COY.js";import"./confirm-dialog-Bv8agSqW.js";import"./KeyIcon-szjQ8KFq.js";import"./ExclamationTriangleIcon-Okie-gQE.js";import"./PlusIcon-ChBf4T_m.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="79d14f52-2606-4e48-9141-5479eac41734",o._sentryDebugIdIdentifier="sentry-dbid-79d14f52-2606-4e48-9141-5479eac41734")}catch{}})();function j(){const{organization:o}=r({from:i.organizationsRoute.to});return e.jsx(n,{orgId:o,section:"general"})}export{j as default}; diff --git a/hatchetembed/dashboard/assets/index-C6BCNBHG.js b/hatchetembed/dashboard/assets/index-C6BCNBHG.js deleted file mode 100644 index 0105acc3f8..0000000000 --- a/hatchetembed/dashboard/assets/index-C6BCNBHG.js +++ /dev/null @@ -1,6 +0,0 @@ -import{v as D,k,j as e,B as b,u as T,t as E,cw as P,_ as L,$ as O,a0 as R,a1 as _,L as x,bm as A,a6 as z,a7 as K,a8 as V,a9 as B,aa as J,I as $,ac as C,bd as H,co as W,b7 as F,aD as q,cx as G,aE as M,cy as Q,cz as U,cA as w,bK as S,cB as X,cC as Y,b6 as Z,cD as ee}from"./index-NcPpBRAY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="a015191d-3f3d-48fb-8311-6a5917b71033",s._sentryDebugIdIdentifier="sentry-dbid-a015191d-3f3d-48fb-8311-6a5917b71033")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const se=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ae=D("funnel",se);function te({isOpen:s,onClose:t,workflowNameFilters:n,onCreate:d,isCreating:r}){const[f,i]=k.useState(null),h=T({resolver:E(P),defaultValues:{workflowId:"",scope:"",expression:"",payload:""}}),{register:c,handleSubmit:y,control:g,reset:u,formState:{errors:l}}=h,m=async o=>{try{const a=o.payload.trim()||"{}",v=JSON.parse(a);i(null),await d({...o,payload:v}),u(),t()}catch(a){if(a instanceof SyntaxError){i("The filter payload must be valid JSON");return}console.error("Failed to create filter:",a)}},p=()=>{u(),i(null),t()};return e.jsx(L,{open:s,onOpenChange:p,children:e.jsxs(O,{className:"max-w-md",children:[e.jsx(R,{children:e.jsxs(_,{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"size-5"}),"Create New Filter"]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"create-workflow",children:"Workflow *"}),e.jsx(A,{name:"workflowId",control:g,render:({field:o})=>e.jsxs(z,{value:o.value,onValueChange:o.onChange,children:[e.jsx(K,{children:e.jsx(V,{placeholder:"Select a workflow"})}),e.jsx(B,{children:n.map(a=>e.jsx(J,{value:a.value,children:a.label},a.value))})]})}),l.workflowId&&e.jsx("p",{className:"text-sm text-red-600",children:l.workflowId.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"create-scope",children:"Scope *"}),e.jsx($,{id:"create-scope",...c("scope"),placeholder:"e.g., event, step, workflow"}),l.scope&&e.jsx("p",{className:"text-sm text-red-600",children:l.scope.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"create-expression",children:"Expression *"}),e.jsx(C,{id:"create-expression",...c("expression"),placeholder:"Enter your filter expression...",className:"min-h-[100px] font-mono"}),l.expression&&e.jsx("p",{className:"text-sm text-red-600",children:l.expression.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"create-payload",children:"Payload (JSON)"}),e.jsx(C,{id:"create-payload",...c("payload"),placeholder:'{"key": "value"} or leave empty for {}',className:"min-h-[80px] font-mono text-sm",onChange:o=>{c("payload").onChange(o),i(null)}}),f&&e.jsx("p",{className:"text-sm text-red-600",children:f})]})]}),e.jsxs(H,{children:[e.jsx(b,{variant:"outline",onClick:p,children:"Cancel"}),e.jsx(b,{onClick:y(m),disabled:r,children:r?"Creating...":"Create Filter"})]})]})})}function oe({workflowNameFilters:s,onCreate:t,isCreating:n}){const[d,r]=k.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:()=>r(!0),variant:"cta",children:"Create Filter"}),e.jsx(te,{isOpen:d,onClose:()=>r(!1),workflowNameFilters:s,onCreate:t,isCreating:n})]})}function ne(){return e.jsx(W,{title:"No filters found",description:"Event filters route incoming events to specific workflows based on payload conditions.",docs:{href:`${F.v1.events.href}#event-filters`,description:"Learn about event filters"},children:e.jsx(le,{})})}function le(){const s=q(),{pagination:t,setPagination:n,setPageSize:d,refetch:r,filters:f,numFilters:i,error:h,isLoading:c,isRefetching:y,columnFilters:g,setColumnFilters:u,workflowIdToName:l,workflowNameFilters:m,mutations:p}=G({key:"table"}),[o,a]=M("hatchet:columns:filters",{[Q]:!1}),N=ee(l,j=>{s.open({type:"filter-detail",content:{filter:j}})}),I=[e.jsx(oe,{workflowNameFilters:m,onCreate:p.create.perform,isCreating:p.create.isPending},"create")];return e.jsx(U,{error:h,isLoading:c,columns:N,data:f,filters:[{columnId:X,title:w.workflowId,options:m,type:S.Checkbox},{columnId:Y,title:w.scope,type:S.Array}],showColumnToggle:!0,columnVisibility:o,setColumnVisibility:a,rightActions:I,columnFilters:g,setColumnFilters:u,pagination:t,setPagination:n,onSetPageSize:d,pageCount:i,getRowId:j=>j.metadata.id,emptyState:e.jsx(Z,{title:"No filters found",description:"Event filters route incoming events to specific workflows based on payload conditions.",docPage:{href:`${F.v1.events.href}#event-filters`},docLabel:"Learn about event filters"}),columnKeyToName:w,showSelectedRows:!1,refetchProps:{isRefetching:y,onRefetch:r}})}export{ne as default}; diff --git a/hatchetembed/dashboard/assets/index-C6dA5MvO.js b/hatchetembed/dashboard/assets/index-C6dA5MvO.js deleted file mode 100644 index a01228a41b..0000000000 --- a/hatchetembed/dashboard/assets/index-C6dA5MvO.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,a3 as F,cP as j,g as I,b as S,aL as A,aB as D,cI as L,cj as K,cS as H,cT as q,cU as E,k as u,N as _,O as z,o as B,s as M,co as Q,b7 as W,aI as O,aE as V,F as G,cz as U,b6 as Z,bw as $}from"./index-NcPpBRAY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a02bb95d-efbf-4587-aca9-22f7d0f84025",a._sentryDebugIdIdentifier="sentry-dbid-a02bb95d-efbf-4587-aca9-22f7d0f84025")}catch{}})();const f={status:"Status",name:"Name",createdAt:"Created at"},J="status",v="name",X="createdAt",Y=a=>[{accessorKey:J,header:({column:e})=>t.jsx(j,{column:e,title:f.status}),cell:({row:e})=>t.jsx(t.Fragment,{children:e.original.isPaused?t.jsx(F,{variant:"inProgress",children:"Paused"}):t.jsx(F,{variant:"successful",children:"Active"})}),enableSorting:!1,enableHiding:!1},{accessorKey:v,header:({column:e})=>t.jsx(j,{column:e,title:f.name}),cell:({row:e})=>t.jsx(I,{to:S.tenantWorkflowRoute.to,params:{tenant:a,workflow:e.original.metadata.id},children:t.jsx("div",{className:"text-md min-w-fit cursor-pointer whitespace-nowrap p-2 hover:underline",children:e.original.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:X,header:({column:e})=>t.jsx(j,{column:e,title:f.createdAt,className:"whitespace-nowrap"}),sortingFn:(e,n)=>new Date(e.original.metadata.createdAt).getTime()-new Date(n.original.metadata.createdAt).getTime(),cell:({row:e})=>t.jsx("div",{className:"whitespace-nowrap",children:t.jsx(A,{date:e.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{header:()=>t.jsx(t.Fragment,{}),accessorKey:"chevron",cell:({row:e})=>t.jsx("div",{className:"flex justify-end gap-2",children:t.jsx(I,{to:S.tenantWorkflowRoute.to,params:{tenant:a,workflow:e.original.metadata.id},children:t.jsx("div",{className:"text-md min-w-fit cursor-pointer whitespace-nowrap p-2 hover:underline",children:t.jsx(D,{className:"h-5 w-5 flex-none text-gray-700 dark:text-gray-300","aria-hidden":"true"})})})}),enableSorting:!1,enableHiding:!1}],ee=B({s:M().optional()}).default({s:void 0}),te=({key:a})=>{var C,P,T;const{tenantId:e}=L(),{refetchInterval:n}=K(),g=`workflows-${a}`,{state:{s:l},columnFilters:c,setColumnFilters:r,resetFilters:m}=H(ee,g,{s:v}),[d]=q(l,300),{pagination:w,setPagination:h,setPageSize:p,offset:b,limit:k}=E({key:a,resetPageOnChange:[d]}),y=u.useCallback(o=>{r(()=>o?[{id:v,value:o}]:[])},[r]),s=_({...z.workflows.list(e,{limit:k,offset:b,name:d}),refetchInterval:n,placeholderData:o=>o}),i=u.useMemo(()=>{var o;return((o=s.data)==null?void 0:o.rows)||[]},[(C=s.data)==null?void 0:C.rows]),x=((T=(P=s.data)==null?void 0:P.pagination)==null?void 0:T.num_pages)||0,N=u.useMemo(()=>i.reduce((o,R)=>(o[R.name]=R.metadata.id,o),{}),[i]);return{workflows:i,numWorkflows:x,isLoading:s.isLoading,isRefetching:s.isRefetching,error:s.error,refetch:s.refetch,pagination:w,setPagination:h,setPageSize:p,columnFilters:c,setColumnFilters:r,resetFilters:m,workflowNameToId:N,search:l??"",setSearch:y}},ae=()=>({suggestions:[]}),se=a=>a;function re(){return t.jsx(Q,{title:"No workflows found",description:"Workflows define sequences of tasks that execute together. Create your first workflow to start orchestrating work.",docs:{href:W.v1.quickstart.href,description:"Learn about workflows and tasks"},children:t.jsx(oe,{})})}function oe(){const{tenant:a}=O({from:S.tenantRoute.to}),[e,n]=V("hatchet:columns:workflows",{}),{workflows:g,numWorkflows:l,isLoading:c,isRefetching:r,pagination:m,setPagination:d,setPageSize:w,refetch:h,columnFilters:p,setColumnFilters:b,resetFilters:k,search:y,setSearch:s}=te({key:"workflows-table"}),i=u.useMemo(()=>({}),[]);if(c)return t.jsx(G,{});const x=t.jsx($,{value:y,onChange:s,onSubmit:s,getAutocomplete:ae,applySuggestion:se,autocompleteContext:i,placeholder:"Search workflows by name..."});return t.jsx(U,{columns:Y(a),data:g,emptyState:t.jsx(Z,{filterHint:"Try changing your search or filters.",title:"No workflows found",description:"Workflows define sequences of tasks that execute together.",docPage:W.v1.quickstart,docLabel:"Learn about workflows"}),searchBar:x,columnVisibility:e,setColumnVisibility:n,pagination:m,setPagination:d,onSetPageSize:w,showSelectedRows:!1,pageCount:l,isLoading:c,showColumnToggle:!0,columnKeyToName:f,refetchProps:{isRefetching:r,onRefetch:h},columnFilters:p,setColumnFilters:b,onResetFilters:k})}export{re as default}; diff --git a/hatchetembed/dashboard/assets/index-CGgjE1le.js b/hatchetembed/dashboard/assets/index-CGgjE1le.js deleted file mode 100644 index bb046f5366..0000000000 --- a/hatchetembed/dashboard/assets/index-CGgjE1le.js +++ /dev/null @@ -1,26 +0,0 @@ -import{v as K,cE as l,j as e,cF as n,L as d,I as v,a6 as R,a7 as L,a8 as M,a9 as W,aa as N,cG as B,cH as he,G as ue,cI as me,au as pe,N as ge,O as H,p as q,a as U,o as V,bb as G,s as f,bo as I,cJ as k,cK as C,k as b,ak as ye,ai as je,B as S,cL as fe,al as Ne,am as D,cM as ve,be as $,bf as O,cN as be,co as we,b7 as X,u as J,t as Y,_ as Z,$ as Q,a0 as ee,a1 as se,bh as ae,S as te,bj as Ee,b6 as Se,bg as ke,cO as Ce}from"./index-NcPpBRAY.js";import{S as Ae}from"./shield-check-jS3YzcEA.js";import{S as ne}from"./switch-C9IBAXBS.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="6b60664c-21a5-4588-b2aa-590556561e4a",s._sentryDebugIdIdentifier="sentry-dbid-6b60664c-21a5-4588-b2aa-590556561e4a")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pe=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Ke=K("key",Pe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const He=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Ie=K("lightbulb",He);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Te=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Re=K("loader",Te);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Le=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Me=K("user-check",Le);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const We=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],re=K("webhook",We),T=({authMethod:s})=>{switch(s){case l.BASIC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Me,{className:"size-4"}),"Basic"]});case l.API_KEY:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Ke,{className:"size-4"}),"API Key"]});case l.HMAC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Ae,{className:"size-4"}),"HMAC"]});default:const a=s;throw new Error(`Unhandled auth method: ${a}`)}},ze=({register:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"username",className:"text-sm font-medium",children:["Username ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"username",placeholder:"username",...s("username"),className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"password",className:"text-sm font-medium",children:["Password ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"password",type:"text",placeholder:"password",...s("password"),className:"h-10 pr-10"})})]})]}),Fe=({register:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"headerName",className:"text-sm font-medium",children:["Header Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"headerName",placeholder:"X-API-Key",...s("headerName"),className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"apiKey",className:"text-sm font-medium",children:["API Key ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"apiKey",type:"text",placeholder:"API key...",...s("apiKey"),className:"h-10 pr-10"})})]})]}),qe=({register:s,watch:a,setValue:r})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"signingSecret",className:"text-sm font-medium",children:["Webhook Signing Secret ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"signingSecret",type:"text",placeholder:"Secret key...",...s("signingSecret"),className:"h-10 pr-10"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"algorithm",className:"text-sm font-medium",children:"Algorithm"}),e.jsxs(R,{value:a("algorithm"),onValueChange:t=>r("algorithm",t),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:"SHA256",children:"SHA256"}),e.jsx(N,{value:"SHA1",children:"SHA1"}),e.jsx(N,{value:"SHA512",children:"SHA512"}),e.jsx(N,{value:"MD5",children:"MD5"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"encoding",className:"text-sm font-medium",children:"Encoding"}),e.jsxs(R,{value:a("encoding"),onValueChange:t=>r("encoding",t),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:"HEX",children:"HEX"}),e.jsx(N,{value:"BASE64",children:"BASE64"}),e.jsx(N,{value:"BASE64URL",children:"BASE64URL"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"signatureHeaderName",className:"text-sm font-medium",children:"Signature Header Name"}),e.jsx(v,{"data-1p-ignore":!0,id:"signatureHeaderName",placeholder:"X-Signature",...s("signatureHeaderName"),className:"h-10"})]})]}),P=({register:s,secretLabel:a="Signing Secret",secretPlaceholder:r="super-secret",helpText:t,helpLink:o})=>e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"signingSecret",className:"text-sm font-medium",children:[a," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"relative",children:e.jsx(v,{"data-1p-ignore":!0,id:"signingSecret",type:"text",placeholder:r,...s("signingSecret"),className:"h-10 pr-10"})}),t&&e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsxs("p",{children:[t,o&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"Learn more"}),"."]})]})})]})}),Ue=({authMethod:s,sourceName:a,register:r,watch:t,setValue:o})=>{switch(a){case n.GENERIC:switch(s){case l.BASIC:return e.jsx(ze,{register:r});case l.API_KEY:return e.jsx(Fe,{register:r});case l.HMAC:return e.jsx(qe,{register:r,watch:t,setValue:o});default:const m=s;throw new Error(`Unhandled auth method: ${m}`)}case n.GITHUB:return e.jsx(P,{register:r});case n.LINEAR:return e.jsx(P,{register:r,secretPlaceholder:"lin_wh_..."});case n.STRIPE:return e.jsx(P,{register:r,secretPlaceholder:"whsec_..."});case n.SLACK:return e.jsx(P,{register:r,helpText:"You can find your signing secret in the Basic Information panel of your Slack app settings.",helpLink:"https://docs.slack.dev/authentication/verifying-requests-from-slack/#validating-a-request"});case n.SVIX:return e.jsx(P,{register:r,secretLabel:"Svix Signing Secret",secretPlaceholder:"whsec_...",helpText:"You can find your signing secret in the Svix dashboard under the endpoint's settings."});default:const h=a;throw new Error(`Unhandled source name: ${h}`)}};function De(s){return B({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M3.03509 12.9431C3.24245 14.9227 4.10472 16.8468 5.62188 18.364C7.13904 19.8811 9.0631 20.7434 11.0428 20.9508L3.03509 12.9431Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3 11.4938L12.4921 20.9858C13.2976 20.9407 14.0981 20.7879 14.8704 20.5273L3.4585 9.11548C3.19793 9.88771 3.0451 10.6883 3 11.4938Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3.86722 8.10999L15.8758 20.1186C16.4988 19.8201 17.0946 19.4458 17.6493 18.9956L4.99021 6.33659C4.54006 6.89125 4.16573 7.487 3.86722 8.10999Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M5.66301 5.59517C9.18091 2.12137 14.8488 2.135 18.3498 5.63604C21.8508 9.13708 21.8645 14.8049 18.3907 18.3228L5.66301 5.59517Z",fill:"currentColor"},child:[]}]})(s)}function _e(s){return B({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M155.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C298.3 7.2 251.1 0 203.8 0 88.1 0 11 60.4 11 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5a396.09 396.09 0 0 0 156 32.4c118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9z"},child:[]}]})(s)}function Be(s){return B({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"},child:[]}]})(s)}const Ve=({className:s})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 230 230",fill:"currentColor",className:s,"aria-hidden":"true",focusable:"false",children:[e.jsx("g",{transform:"translate(10.7,10.6)",children:e.jsx("path",{d:"M208.8 104.4c0 57.6-46.8 104.4-104.4 104.4c-57.6 0-104.4-46.8-104.4-104.4c0-57.6 46.8-104.4 104.4-104.4c57.6 0 104.4 46.8 104.4 104.4Zm-125 42.4c-7.2-16.1-23.3-26.8-41-27.2c-11.7-0.3-22.8 3-31.8 9.1c-2.1-8.3-3.2-17-3.1-26c1-53.2 44.9-95.7 98.2-94.8c35 .7 65.3 19.8 81.7 48c-4.9 5.4-12.8 8.6-21.2 8.3c-8.1-0.2-15.5-5.1-18.8-12.5c-7.3-16.1-23.4-26.8-41-27.2c-8.2-0.2-16.2 1.9-23.3 5.9c-24.5 13.7-32 47-14.3 69.3c8 10.1 20.2 16.2 34.2 17.2c7.3 .5 12.8 3.1 16.5 7.7c6.6 8.4 5.6 21.6-2.1 28.9c-4.1 3.9-9.5 6-15.1 5.8c-8.1-0.2-15.5-5.1-18.9-12.5Zm82.2-57.7c-17.3-0.8-33.5-10.4-41-27.1c-3.4-7.4-10.8-12.3-18.9-12.5c-17.1-0.5-28 21.1-17.2 34.7c3.7 4.6 9.2 7.2 16.5 7.7c14 1 26.1 7.1 34.1 17.2c14.7 18.4 12.6 46.3-4.4 62.5c-20.6 19.5-54.8 15.6-70.4-7.9c-1.4-2.1-2.6-4.3-3.7-6.6c-3.3-7.4-10.7-12.3-18.8-12.5c-8.4-0.2-16.2 3-21.2 8.3c16.4 28.2 46.7 47.4 81.7 48c53.3 .9 97.2-41.5 98.2-94.8c.1-9-1-17.7-3.1-26c.4 1.8-13.4 6.6-15 7c-5.5 1.6-11.2 2.3-16.8 2Z",fillRule:"evenodd"})}),e.jsx("ellipse",{cx:"115",cy:"115",rx:"104.5",ry:"104.5",fill:"none",stroke:"currentColor",strokeWidth:"20"})]}),_=({sourceName:s})=>{switch(s){case n.GENERIC:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(re,{className:"size-4"}),"Generic"]});case n.GITHUB:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(he,{className:"size-4"}),"GitHub"]});case n.STRIPE:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(_e,{className:"size-4"}),"Stripe"]});case n.SLACK:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Be,{className:"size-4"}),"Slack"]});case n.LINEAR:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(De,{className:"size-4"}),"Linear"]});case n.SVIX:return e.jsxs("span",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Ve,{className:"size-4"}),"Svix"]});default:const a=s;throw new Error(`Unhandled source: ${a}`)}},z=s=>{const a=ue(),{tenantId:r}=me(),{tenant:t}=pe(),{data:o,isLoading:h,error:m}=ge({...H.v1Webhooks.list(r)}),{mutate:w,isPending:u}=q({mutationFn:async({webhookName:i})=>U.v1WebhookDelete(r,i),onSuccess:async()=>{s&&s();const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),{mutate:p,isPending:g}=q({mutationFn:async i=>U.v1WebhookCreate(r,i),onSuccess:async()=>{const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),{mutate:c,isPending:y}=q({mutationFn:async({webhookName:i,webhookData:E})=>U.v1WebhookUpdate(r,i,E),onSuccess:async()=>{const i=H.v1Webhooks.list(r).queryKey;await a.invalidateQueries({queryKey:i})}}),j=i=>{const E=`/api/v1/stable/tenants/${r}/webhooks/${i}`;return t!=null&&t.serverUrl?`${t.serverUrl}${E}`:`${window.location.protocol}//${window.location.hostname}${E}`};return{data:(o==null?void 0:o.rows)||[],isLoading:h,error:m,createWebhookURL:j,mutations:{deleteWebhook:w,isDeletePending:u,createWebhook:p,isCreatePending:g,updateWebhook:c,isUpdatePending:y}}},oe=f().optional().refine(s=>{if(!s||s.trim()==="")return!0;try{return JSON.parse(s),!0}catch{return!1}},{message:"Must be valid JSON"}),Ge=V({sourceName:I(n),name:f().min(1,"Name expression is required"),eventKeyExpression:f().min(1,"Event key expression is required"),scopeExpression:f().optional(),staticPayload:oe,returnEventAsResponsePayload:G().optional(),authType:I(l),username:f().optional(),password:f().optional(),headerName:f().optional(),apiKey:f().optional(),signingSecret:f().optional(),algorithm:I(C).optional(),encoding:I(k).optional(),signatureHeaderName:f().optional()}),$e=V({eventKeyExpression:f().min(1,"Event key expression is required"),scopeExpression:f().optional(),staticPayload:oe,returnEventAsResponsePayload:G().optional()}),Oe=({webhook:s})=>{const{mutations:a,createWebhookURL:r}=z(()=>m(!1)),[t,o]=b.useState(!1),[h,m]=b.useState(!1),[w,u]=b.useState(!1),p=r(s.name),g=c=>{navigator.clipboard.writeText(c),o(!0),setTimeout(()=>o(!1),1e3),setTimeout(()=>m(!1),400)};return e.jsxs(e.Fragment,{children:[e.jsxs(ye,{open:h,onOpenChange:m,children:[e.jsx(je,{asChild:!0,children:e.jsx(S,{variant:"icon",size:"sm",children:e.jsx(fe,{className:"size-4 cursor-pointer text-muted-foreground"})})}),e.jsxs(Ne,{align:"end",children:[e.jsxs(D,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),m(!1),u(!0)},children:[e.jsx(ve,{className:"size-4"}),"Edit"]}),e.jsxs(D,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),g(p)},children:[t?e.jsx($,{className:"size-4 text-green-600"}):e.jsx(O,{className:"size-4"}),"Copy Webhook URL"]}),e.jsxs(D,{className:"flex flex-row gap-x-2",onClick:c=>{c.stopPropagation(),c.preventDefault(),a.deleteWebhook({webhookName:s.name})},disabled:a.isDeletePending,children:[a.isDeletePending?e.jsx(Re,{className:"size-4 animate-spin"}):e.jsx(be,{className:"size-4"}),"Delete"]})]})]}),e.jsx(es,{webhook:s,open:w,onOpenChange:u})]})};function ns(){return e.jsx(we,{title:"No webhooks found",description:"Webhooks allow external services to trigger your workflows via HTTP requests.",docs:{href:X.v1.webhooks.href,description:"Learn about webhooks"},children:e.jsx(Xe,{})})}function Xe(){const{data:s,isLoading:a}=z(),r=b.useMemo(()=>[{columnLabel:"Name",cellRenderer:t=>e.jsx("div",{className:"w-full",children:t.name})},{columnLabel:"Source",cellRenderer:t=>e.jsx("div",{className:"w-full",children:e.jsx(_,{sourceName:t.sourceName})})},{columnLabel:"Event Key",cellRenderer:t=>{const o=t.eventKeyExpression||"",h=o.length>25?`${o.slice(0,25)}...`:o;return e.jsx("code",{className:"rounded bg-muted px-2 py-1 text-xs",title:o,children:h})}},{columnLabel:"Scope",cellRenderer:t=>{if(!t.scopeExpression)return e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"});const o=t.scopeExpression,h=o.length>25?`${o.slice(0,25)}...`:o;return e.jsx("code",{className:"rounded bg-muted px-2 py-1 text-xs",title:o,children:h})}},{columnLabel:"Auth Method",cellRenderer:t=>e.jsx("div",{className:"w-full",children:e.jsx(T,{authMethod:t.authType})})},{columnLabel:"Actions",cellRenderer:t=>e.jsx(Oe,{webhook:t})}],[]);return a?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"mb-4 flex w-full shrink-0 flex-row justify-end",children:e.jsx(Qe,{})}),s&&s.length>0?e.jsx(Ee,{columns:r,data:s,rowKey:t=>t.metadata.id}):e.jsx("div",{className:"flex flex-1 items-center justify-center",children:e.jsx(Se,{title:"No webhooks found",description:"Webhooks allow external services to trigger your workflows via HTTP requests.",docPage:X.v1.webhooks,docLabel:"Learn about webhooks"})})]})}const ie=s=>{if(!(!s||s.trim()===""))try{return JSON.parse(s)}catch{throw new Error("Static payload must be valid JSON")}},Je=s=>{const a={scopeExpression:s.scopeExpression||void 0,staticPayload:ie(s.staticPayload),returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0};switch(s.sourceName){case n.GENERIC:switch(s.authType){case l.BASIC:if(!s.username||!s.password)throw new Error("Username and password are required for basic auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{username:s.username,password:s.password}};case l.API_KEY:if(!s.headerName||!s.apiKey)throw new Error("Header name and API key are required for API key auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{headerName:s.headerName,apiKey:s.apiKey}};case l.HMAC:if(!s.algorithm||!s.encoding||!s.signatureHeaderName||!s.signingSecret)throw new Error("Algorithm, encoding, signature header name, and signing secret are required for HMAC auth");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:s.authType,auth:{algorithm:s.algorithm,encoding:s.encoding,signatureHeaderName:s.signatureHeaderName,signingSecret:s.signingSecret}};default:const t=s.authType;throw new Error(`Unhandled auth type: ${t}`)}case n.GITHUB:if(!s.signingSecret)throw new Error("Signing secret is required for GitHub webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"X-Hub-Signature-256",signingSecret:s.signingSecret}};case n.LINEAR:if(!s.signingSecret)throw new Error("Signing secret is required for Linear webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"linear-signature",signingSecret:s.signingSecret}};case n.STRIPE:if(!s.signingSecret)throw new Error("Signing secret is required for Stripe webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"Stripe-Signature",signingSecret:s.signingSecret}};case n.SLACK:if(!s.signingSecret)throw new Error("signing secret is required for Slack webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.HEX,signatureHeaderName:"X-Slack-Signature",signingSecret:s.signingSecret}};case n.SVIX:if(!s.signingSecret)throw new Error("signing secret is required for Svix webhooks");return{...a,sourceName:s.sourceName,name:s.name,eventKeyExpression:s.eventKeyExpression,authType:l.HMAC,auth:{algorithm:C.SHA256,encoding:k.BASE64,signatureHeaderName:"svix-signature",signingSecret:s.signingSecret}};default:const r=s.sourceName;throw new Error(`Unhandled source name: ${r}`)}},Ye=s=>{switch(s){case n.GENERIC:return"(receive incoming webhook requests from any service)";case n.GITHUB:case n.LINEAR:case n.STRIPE:case n.SLACK:case n.SVIX:return"";default:const a=s;throw new Error(`Unhandled source name: ${a}`)}},Ze=({sourceName:s})=>{switch(s){case n.GITHUB:return e.jsxs("div",{className:"ml-1 flex flex-row items-center gap-x-2",children:[e.jsx(Ce,{className:"size-4 text-yellow-500"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Select ",e.jsx("span",{className:"font-semibold",children:"application/json"})," as the content type in your GitHub webhook settings."]})]});case n.GENERIC:case n.LINEAR:case n.STRIPE:case n.SLACK:case n.SVIX:return"";default:const a=s;throw new Error(`Unhandled source name: ${a}`)}},Qe=()=>{const{mutations:s,createWebhookURL:a}=z(),{createWebhook:r,isCreatePending:t}=s,[o,h]=b.useState(!1),[m,w]=b.useState(!1),{register:u,handleSubmit:p,watch:g,setValue:c,reset:y,formState:{errors:j}}=J({resolver:Y(Ge),defaultValues:{sourceName:n.GENERIC,authType:l.BASIC,name:"",eventKeyExpression:"input.id",username:"",password:"",returnEventAsResponsePayload:!0}}),i=g("sourceName"),E=g("authType"),A=g("name"),F=g("eventKeyExpression"),ce=g("returnEventAsResponsePayload");b.useEffect(()=>{i===n.SLACK&&!F?c("eventKeyExpression","input.type"):i===n.GENERIC&&!F&&c("eventKeyExpression","input.id")},[i,F,c]);const le=b.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(a(A)),w(!0),setTimeout(()=>w(!1),2e3)}catch(x){console.error("Failed to copy URL:",x)}},[A,a]),de=b.useCallback(x=>{const xe=Je(x);r(xe,{onSuccess:()=>{h(!1),y()}})},[r,y]);return e.jsxs(Z,{open:o,onOpenChange:x=>{h(x),x||(y(),w(!1))},children:[e.jsx(ke,{asChild:!0,children:e.jsx(S,{variant:"cta",children:"Create Webhook"})}),e.jsxs(Q,{className:"max-h-[90dvh] max-w-[90%] overflow-y-auto md:max-w-[80%] lg:max-w-[60%] xl:max-w-[50%]",children:[e.jsx(ee,{children:e.jsxs(se,{className:"flex flex-col items-start gap-y-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-x-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-blue-100",children:e.jsx(re,{className:"size-4 text-indigo-700"})}),"Create a webhook"]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Webhooks are a beta feature"})]})}),e.jsxs("form",{onSubmit:p(de),className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"name",className:"text-sm font-medium",children:["Webhook Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{"data-1p-ignore":!0,id:"name",placeholder:"test-webhook",...u("name"),className:"h-10"}),j.name&&e.jsx("p",{className:"text-xs text-red-500",children:j.name.message}),e.jsxs("div",{className:"flex flex-col items-start gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"",children:"Send incoming webhook requests to:"}),e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx("code",{className:"max-w-full rounded bg-muted px-2 py-1 font-mono text-xs",children:a(A)}),e.jsx(S,{type:"button",variant:"icon",size:"xs",onClick:le,className:"flex-shrink-0",disabled:!A,children:m?e.jsx($,{className:"size-4 text-green-600"}):e.jsx(O,{className:"size-4"})})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"sourceName",className:"text-sm font-medium",children:["Source ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(R,{value:i,onValueChange:x=>c("sourceName",x),children:[e.jsx(L,{children:e.jsx(M,{children:e.jsx(_,{sourceName:i})})}),e.jsxs(W,{children:[Object.values(n).map(x=>e.jsx(N,{value:x,className:"h-10",children:e.jsxs("div",{className:"flex h-10 flex-row items-center gap-x-2",children:[e.jsx(_,{sourceName:x}),e.jsx("span",{className:"max-w-full truncate text-sm",children:Ye(x)})]})},x)),e.jsx(N,{disabled:!0,value:"reach-out",className:"text-sm data-[disabled]:text-white data-[disabled]:opacity-100",children:e.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[e.jsx(Ie,{className:"size-4 text-yellow-500"}),e.jsx("span",{children:"Want a new source added? Reach out to support"})]})},"empty")]})]}),e.jsx(Ze,{sourceName:i})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"eventKeyExpression",className:"text-sm font-medium",children:["Event Key Expression ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{id:"eventKeyExpression",placeholder:"input.id",...u("eventKeyExpression"),className:"h-10"}),j.eventKeyExpression&&e.jsx("p",{className:"text-xs text-red-500",children:j.eventKeyExpression.message}),e.jsxs("div",{className:"pl-1 text-xs text-muted-foreground",children:[e.jsxs("p",{children:["CEL expression to extract the event key from the webhook payload. See"," ",e.jsx("a",{href:"https://cel.dev/",className:"text-blue-600",target:"_blank",rel:"noopener noreferrer",children:"the docs"})," ","for details."]}),e.jsxs("ul",{className:"list-disc pl-4",children:[e.jsx("li",{children:"`input` refers to the payload"}),e.jsx("li",{children:"`headers` refers to the headers"})]}),i===n.SLACK&&e.jsx("div",{className:"mt-2 rounded-md border border-border bg-muted p-3",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["For Slack webhooks, the event key expression"," ",e.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-foreground",children:"input.type"})," ","works well since Slack interactive payloads don't have a top-level `id` field."]})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"scopeExpression",className:"text-sm font-medium",children:["Scope Expression"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx(v,{id:"scopeExpression",placeholder:"input.organization_id",...u("scopeExpression"),className:"h-10"}),j.scopeExpression&&e.jsx("p",{className:"text-xs text-red-500",children:j.scopeExpression.message}),e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsx("p",{children:"CEL expression to extract the scope from the webhook payload. Used to filter which workflows to trigger based on event filters."})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"staticPayload",className:"text-sm font-medium",children:["Static Payload"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx("textarea",{id:"staticPayload",placeholder:'{"source": "webhook", "version": "v1"}',...u("staticPayload"),className:"h-24 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),j.staticPayload&&e.jsx("p",{className:"text-xs text-red-500",children:j.staticPayload.message}),e.jsx("div",{className:"pl-1 text-xs text-muted-foreground",children:e.jsx("p",{children:"JSON object to merge into the webhook payload. Static payload fields take precedence over incoming payload fields."})})]}),e.jsxs("div",{className:"flex flex-row items-center justify-between rounded-lg border border-border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(d,{htmlFor:"returnEventAsResponsePayload",className:"text-sm font-medium",children:"Return event as response payload"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, the triggered event will be returned as the HTTP response body. Otherwise, the response will be an empty 204 OK."})]}),e.jsx(ne,{id:"returnEventAsResponsePayload",checked:ce??!0,onCheckedChange:x=>c("returnEventAsResponsePayload",x)})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"space-y-4 border-l-2 border-gray-200 pl-4",children:[i===n.GENERIC&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(d,{htmlFor:"authType",className:"text-sm font-medium",children:"Authentication Type"}),e.jsxs(R,{value:E,onValueChange:x=>c("authType",x),children:[e.jsx(L,{className:"h-10",children:e.jsx(M,{})}),e.jsxs(W,{children:[e.jsx(N,{value:l.BASIC,children:e.jsx(T,{authMethod:l.BASIC})}),e.jsx(N,{value:l.API_KEY,children:e.jsx(T,{authMethod:l.API_KEY})}),e.jsx(N,{value:l.HMAC,children:e.jsx(T,{authMethod:l.HMAC})})]})]})]}),e.jsx(Ue,{authMethod:E,sourceName:i,register:u,watch:g,setValue:c})]})}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(ae,{asChild:!0,children:e.jsx(S,{type:"button",variant:"outline",children:"Cancel"})}),e.jsxs(S,{type:"submit",disabled:t,children:[t&&e.jsx(te,{}),"Create Webhook"]})]})]})]})]})},es=({webhook:s,open:a,onOpenChange:r})=>{const{mutations:t}=z(),{register:o,handleSubmit:h,watch:m,setValue:w,reset:u,formState:{errors:p}}=J({resolver:Y($e),defaultValues:{eventKeyExpression:s.eventKeyExpression||"",scopeExpression:s.scopeExpression||"",staticPayload:s.staticPayload?JSON.stringify(s.staticPayload,null,2):"",returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0}}),g=m("returnEventAsResponsePayload");b.useEffect(()=>{a&&u({eventKeyExpression:s.eventKeyExpression||"",scopeExpression:s.scopeExpression||"",staticPayload:s.staticPayload?JSON.stringify(s.staticPayload,null,2):"",returnEventAsResponsePayload:s.returnEventAsResponsePayload??!0})},[s,a,u]);const c=b.useCallback(y=>{const j=ie(y.staticPayload);t.updateWebhook({webhookName:s.name,webhookData:{eventKeyExpression:y.eventKeyExpression,scopeExpression:y.scopeExpression??"",staticPayload:j??{},returnEventAsResponsePayload:y.returnEventAsResponsePayload??!0}},{onSuccess:()=>{r(!1)}})},[t,s.name,r]);return e.jsx(Z,{open:a,onOpenChange:r,children:e.jsxs(Q,{className:"max-w-lg",children:[e.jsx(ee,{children:e.jsxs(se,{children:["Edit Webhook: ",s.name]})}),e.jsxs("form",{onSubmit:h(c),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-eventKeyExpression",className:"text-sm font-medium",children:["Event Key Expression ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(v,{id:"edit-eventKeyExpression",placeholder:"input.id",...o("eventKeyExpression"),className:"h-10"}),p.eventKeyExpression&&e.jsx("p",{className:"text-xs text-red-500",children:p.eventKeyExpression.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CEL expression to extract the event key from the webhook payload."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-scopeExpression",className:"text-sm font-medium",children:["Scope Expression"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx(v,{id:"edit-scopeExpression",placeholder:"input.organization_id",...o("scopeExpression"),className:"h-10"}),p.scopeExpression&&e.jsx("p",{className:"text-xs text-red-500",children:p.scopeExpression.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CEL expression to extract the scope for event filtering."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"edit-staticPayload",className:"text-sm font-medium",children:["Static Payload"," ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx("textarea",{id:"edit-staticPayload",placeholder:'{"source": "webhook", "version": "v1"}',...o("staticPayload"),className:"h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),p.staticPayload&&e.jsx("p",{className:"text-xs text-red-500",children:p.staticPayload.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"JSON object to merge into the webhook payload."})]}),e.jsxs("div",{className:"flex flex-row items-center justify-between rounded-lg border border-border p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(d,{htmlFor:"edit-returnEventAsResponsePayload",className:"text-sm font-medium",children:"Return event as response payload"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, the triggered event will be returned as the HTTP response body. Otherwise, the response will be an empty 204 OK."})]}),e.jsx(ne,{id:"edit-returnEventAsResponsePayload",checked:g??!0,onCheckedChange:y=>w("returnEventAsResponsePayload",y)})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(ae,{asChild:!0,children:e.jsx(S,{type:"button",variant:"outline",children:"Cancel"})}),e.jsxs(S,{type:"submit",disabled:t.isUpdatePending,children:[t.isUpdatePending&&e.jsx(te,{}),"Save Changes"]})]})]})]})})};export{es as EditWebhookModal,ns as default}; diff --git a/hatchetembed/dashboard/assets/index-CIa_u54h.js b/hatchetembed/dashboard/assets/index-CIa_u54h.js deleted file mode 100644 index 2298f419c3..0000000000 --- a/hatchetembed/dashboard/assets/index-CIa_u54h.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,cR as D,u as P,t as R,$ as g,a0 as j,a1 as f,L as w,I as L,bm as _,a6 as F,a7 as M,a8 as H,a9 as O,aa as K,B as p,S as I,e as $,o as V,s as v,cI as b,C as B,k as h,N as G,O as Q,aL as q,b8 as z,b6 as y,bj as U,l as C,p as N,a as A,_ as E}from"./index-NcPpBRAY.js";import{S as T}from"./settings-page-header-CkCZd3CN.js";import{S as W}from"./secret-copier-68gzWNRB.js";import{u as X}from"./use-auth-disabled-3jxVUpNe.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="cef57e69-cccc-425a-b919-1b6ceb05a1d3",n._sentryDebugIdIdentifier="sentry-dbid-cef57e69-cccc-425a-b919-1b6ceb05a1d3")}catch{}})();function J({token:n,onRevokeClick:t}){return e.jsx(D,{row:n,actions:[{label:"Revoke",onClick:()=>t(n)}]})}const S={"3 months":`${2160*60*60}s`,"1 year":`${365*24*60*60}s`,"100 years":`${100*365*24*60*60}s`},Y=V({name:v().min(1).max(255),expiresIn:v().optional()});function Z({className:n,token:t,...s}){var r,m,l;const{register:i,handleSubmit:c,control:o,formState:{errors:x}}=P({resolver:R(Y)}),d=((m=(r=x.name)==null?void 0:r.message)==null?void 0:m.toString())||((l=s.fieldErrors)==null?void 0:l.name);return t?e.jsxs(g,{className:"w-fit max-w-[700px]",children:[e.jsx(j,{children:e.jsx(f,{children:"Keep it secret, keep it safe"})}),e.jsx("p",{className:"text-sm",children:"This is the only time we will show you this token. Make sure to copy it somewhere safe."}),e.jsx(W,{secrets:{HATCHET_CLIENT_TOKEN:t},className:"text-sm",maxWidth:"calc(700px - 4rem)",copy:!0})]}):e.jsxs(g,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(j,{children:e.jsx(f,{children:"Create a new API token"})}),e.jsx("div",{className:$("grid gap-6",n),children:e.jsx("form",{onSubmit:c(u=>{s.onSubmit(u)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"email",children:"Name"}),e.jsx(L,{...i("name"),id:"api-token-name",placeholder:"My Token",autoCapitalize:"none",autoCorrect:"off",disabled:s.isLoading}),d&&e.jsx("div",{className:"text-sm text-red-500",children:d})]}),e.jsx(w,{htmlFor:"expiresIn",children:"Expires In"}),e.jsx(_,{control:o,defaultValue:S["100 years"],name:"expiresIn",render:({field:u})=>e.jsxs(F,{onValueChange:u.onChange,...u,children:[e.jsx(M,{id:"expiresIn",children:e.jsx(H,{id:"expiresInSelected",placeholder:"Select a duration"})}),e.jsx(O,{children:Object.entries(S).map(([a,k])=>e.jsx(K,{value:k,children:a},k))})]})}),e.jsxs(p,{disabled:s.isLoading,children:[s.isLoading&&e.jsx(I,{}),"Generate token"]})]})})})]})}function ee({className:n,...t}){return e.jsxs(g,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(j,{children:e.jsx(f,{children:"Delete token"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to revoke the API token ",t.apiToken.name,"? This action will immediately prevent any services running with this token from dispatching events or executing steps."]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(p,{variant:"ghost",onClick:()=>{t.onCancel()},children:"Cancel"}),e.jsxs(p,{variant:"destructive",onClick:()=>{t.onSubmit(t.apiToken)},children:[t.isLoading&&e.jsx(I,{}),"Revoke API token"]})]})]})]})}function re(){var l,u;const{tenantId:n}=b(),t=X(),{meta:s}=B(),i=s&&"authDisabledToken"in s?s.authDisabledToken:void 0,[c,o]=h.useState(!1),[x,d]=h.useState(null),r=G({...Q.tokens.list(n),enabled:!t}),m=h.useMemo(()=>[{columnLabel:"Name",cellRenderer:a=>e.jsx("div",{children:a.name})},{columnLabel:"Created",cellRenderer:a=>e.jsx(q,{date:a.metadata.createdAt})},{columnLabel:"Expires",cellRenderer:a=>e.jsx("div",{children:new Date(a.expiresAt).toLocaleDateString()})},{columnLabel:"Actions",cellRenderer:a=>e.jsx(J,{token:a,onRevokeClick:k=>{d(k)}})}],[]);return t?e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(T,{title:"API token settings",description:"Authentication is disabled. Every worker uses the single built-in token below, scoped to the default tenant - creating or revoking tokens is not available."}),i?e.jsx(z,{language:"text",code:i}):e.jsx(y,{title:"No token available",description:"The built-in worker token could not be loaded."})]})}):e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(T,{title:"API Tokens",description:"Create and revoke API tokens used by workers and external systems to authenticate with this tenant."}),e.jsx("div",{className:"mb-4 flex flex-row items-baseline justify-end",children:e.jsx(p,{onClick:()=>o(!0),children:"Create API Token"},"create-api-token")}),(((l=r.data)==null?void 0:l.rows)||[]).length>0?e.jsx(U,{columns:m,data:((u=r.data)==null?void 0:u.rows)||[],rowKey:a=>a.metadata.id}):e.jsx(y,{title:"No API tokens found",description:"API tokens authenticate your workers and applications with the Hatchet API."}),c&&e.jsx(te,{showTokenDialog:c,setShowTokenDialog:o,onSuccess:()=>{r.refetch()}}),x&&e.jsx(ne,{apiToken:x,setShowTokenRevoke:()=>d(null),onSuccess:()=>{d(null),r.refetch()}})]})})}function te({showTokenDialog:n,setShowTokenDialog:t,onSuccess:s}){const{tenantId:i}=b(),[c,o]=h.useState(),[x,d]=h.useState({}),{handleApiError:r}=C({setFieldErrors:d}),m=N({mutationKey:["api-token:create",i],mutationFn:async l=>(await A.apiTokenCreate(i,l)).data,onSuccess:l=>{o(l.token),s()},onError:r});return e.jsx(E,{open:n,onOpenChange:t,children:e.jsx(Z,{isLoading:m.isPending,onSubmit:m.mutate,token:c,fieldErrors:x})})}function ne({apiToken:n,setShowTokenRevoke:t,onSuccess:s}){const{tenantId:i}=b(),{handleApiError:c}=C({}),o=N({mutationKey:["api-token:revoke",i,n],mutationFn:async()=>{await A.apiTokenUpdateRevoke(n.metadata.id)},onSuccess:s,onError:c});return e.jsx(E,{open:!!n,onOpenChange:t,children:e.jsx(ee,{apiToken:n,isLoading:o.isPending,onSubmit:()=>o.mutate(),onCancel:()=>t(!1)})})}export{re as default}; diff --git a/hatchetembed/dashboard/assets/index-CKvkkIkH.js b/hatchetembed/dashboard/assets/index-CKvkkIkH.js deleted file mode 100644 index d1da2e2326..0000000000 --- a/hatchetembed/dashboard/assets/index-CKvkkIkH.js +++ /dev/null @@ -1 +0,0 @@ -import{l as U,cI as G,cj as X,k as v,aI as Z,b,N as J,d9 as Y,O as V,p as ee,q as se,a as ae,j as e,F as M,i as re,ak as te,ai as ne,B as p,eP as ie,al as le,am as de,W as o,X as m,a4 as h,Z as c,aL as k,b7 as B,cQ as oe,a5 as F,a3 as H,e as ce,g as xe,df as ue,eQ as me,dh as he,aM as ge,aN as fe,aO as je,aP as ye}from"./index-NcPpBRAY.js";import{D as _}from"./docs-button-Mn8SLZkH.js";import{R as ve}from"./resource-not-found-DGbig0ge.js";import{F as be}from"./ServerStackIcon-CTxTfpKw.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="abcde7e9-3492-4508-a617-107f6c28557f",r._sentryDebugIdIdentifier="sentry-dbid-abcde7e9-3492-4508-a617-107f6c28557f")}catch{}})();const pe=r=>{const t=[];return r?(r.status!=="ACTIVE"&&t.push("Worker has stopped heartbeating"),r.dispatcherId||t.push("Worker has no assigned dispatcher"),r.lastHeartbeatAt||t.push("Worker has no heartbeat"),t):(t.push("Worker is undefined"),t)},ke=({status:r="INACTIVE",health:t})=>{const g={ACTIVE:"Active",INACTIVE:"Inactive",PAUSED:"Paused"},x={ACTIVE:"successful",INACTIVE:"failed",PAUSED:"inProgress"};return e.jsx("div",{className:"item-center flex flex-row gap-2",children:e.jsx(ge,{children:e.jsxs(fe,{children:[e.jsx(je,{children:e.jsx(H,{variant:x[r],children:g[r]})}),e.jsx(ye,{children:t.map((j,y)=>e.jsx("div",{children:j},y))})]})})})},N=10;function Ae(){var I,C,A,E,R,T,W,D,P,L;const{handleApiError:r}=U({}),{tenantId:t}=G(),{refetchInterval:g}=X(),[x,j]=v.useState(!1),y=Z({from:b.tenantWorkerRoute.to}),i=J({...V.workers.get(y.worker),refetchInterval:g,retry:(a,n)=>Y(n)}),s=i.data,K=pe(s),O=ee({mutationKey:["worker:update",s==null?void 0:s.metadata.id],mutationFn:async a=>(await ae.workerUpdate(s.metadata.id,a)).data,onSuccess:async()=>{await se.invalidateQueries({queryKey:V.workers.get(s.metadata.id).queryKey})},onError:r}),u=v.useMemo(()=>{var a;return((a=s==null?void 0:s.registeredWorkflows)==null?void 0:a.sort((n,l)=>n.name.toLowerCase().localeCompare(l.name.toLowerCase())))??[]},[s]),Q=v.useMemo(()=>x?u:u.slice(0,N),[x,u]);if(i.isLoading)return e.jsx(M,{});if(i.isError){if(re(i.error)&&((I=i.error.response)==null?void 0:I.status)===404)return e.jsx(ve,{resource:"Worker",primaryAction:{label:"Back to Workers",navigate:{to:b.tenantWorkersRoute.to,params:{tenant:t}}}});throw i.error}if(!s)return e.jsx(M,{});const w=Object.entries(s.slotConfig||{}).sort(([a],[n])=>a.localeCompare(n)),$=2+ +!!s.runtimeInfo+ +((((C=s==null?void 0:s.labels)==null?void 0:C.length)??0)>0);return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto p-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(be,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:s.name})]}),e.jsxs("div",{className:"flex flex-row gap-2",children:[e.jsx(ke,{status:s.status,health:K}),e.jsxs(te,{children:[e.jsx(ne,{children:e.jsx(p,{"aria-label":"Worker Actions",size:"icon",variant:"ghost",children:e.jsx(ie,{})})}),e.jsx(le,{children:e.jsxs(de,{disabled:s.status==="INACTIVE",onClick:()=>{O.mutate({isPaused:s.status!=="PAUSED"})},children:[s.status==="PAUSED"?"Resume":"Pause"," Step Run Assignment"]})})]})]})]}),e.jsxs("div",{className:ce("mt-6 grid gap-4 md:grid-cols-2",`lg:grid-cols-${$}`),children:[e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(m,{children:e.jsx(h,{children:"Connection Info"})}),e.jsxs(c,{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"First Connected"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.jsx(k,{date:(A=s.metadata)==null?void 0:A.createdAt})})]}),s.lastListenerEstablished&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Last Listener Established"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:e.jsx(k,{date:s.lastListenerEstablished})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Last Heartbeat"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.lastHeartbeatAt?e.jsx(k,{date:s.lastHeartbeatAt}):"Never"})]})]})]}),e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(m,{children:e.jsx(h,{children:"Slots"})}),e.jsxs(c,{className:"space-y-3",children:[w.length===0?e.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:"No slots"}):e.jsx("div",{className:"space-y-3",children:w.map(([a,n])=>{const l=n==null?void 0:n.available,d=(n==null?void 0:n.limit)??0,f=l!==void 0,S=f?d-l:0,q=f&&d>0?Math.round(S/d*100):0,z=f?`${l} / ${d}`:`${d}`;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:a}),e.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:z})]}),f&&d>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-gray-600/40 dark:bg-gray-500/50",children:e.jsx("div",{className:"h-full bg-emerald-300 dark:bg-emerald-500 transition-all",style:{width:`${q}%`}})}),e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:[S," used, ",l," available"]})]})]},a)})}),e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Slots represent concurrent task runs."," ",e.jsx(_,{variant:"text",doc:B.v1.workers,label:"Learn more",scrollTo:"understanding-slots"})]})]})]}),s.runtimeInfo&&(((E=s.runtimeInfo)==null?void 0:E.sdkVersion)||((R=s.runtimeInfo)==null?void 0:R.languageVersion)||((T=s.runtimeInfo)==null?void 0:T.os))&&e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsx(m,{children:e.jsx(h,{children:"Runtime Info"})}),e.jsxs(c,{className:"space-y-2 text-sm",children:[((W=s.runtimeInfo)==null?void 0:W.os)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"OS"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.os})]}),((D=s.runtimeInfo)==null?void 0:D.languageVersion)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Runtime"}),e.jsxs("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:[oe(s.runtimeInfo.language??"")," ",s.runtimeInfo.languageVersion]})]}),((P=s.runtimeInfo)==null?void 0:P.sdkVersion)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Hatchet SDK"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.sdkVersion})]}),((L=s.runtimeInfo)==null?void 0:L.runtimeExtra)&&e.jsxs("div",{children:[e.jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Runtime Extra"}),e.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.runtimeInfo.runtimeExtra})]})]})]}),s.labels&&s.labels.length>0&&e.jsxs(o,{variant:"light",className:"h-52 overflow-y-auto bg-background border-none",children:[e.jsxs(m,{children:[e.jsx(h,{children:"Worker Labels"}),e.jsxs(F,{children:["Key-value pairs used to prioritize step assignment to specific workers."," ",e.jsx(_,{variant:"text",doc:B.v1["advanced-assignment"]["worker-affinity"],label:"Learn more",scrollTo:"specifying-worker-labels"})]})]}),e.jsx(c,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.labels.map(({key:a,value:n})=>e.jsxs(H,{variant:"secondary",children:[a,": ",n]},a))})})]})]}),e.jsxs(o,{variant:"light",className:"mt-4 overflow-y-auto bg-background border-none",children:[e.jsxs(m,{children:[e.jsx(h,{children:"Registered Workflows"}),e.jsx(F,{children:"Workflows that this worker can execute"})]}),e.jsxs(c,{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:Q.map(a=>e.jsx(xe,{to:b.tenantWorkflowRoute.to,params:{tenant:t,workflow:a.id},children:e.jsx(p,{variant:"outline",size:"sm",children:a.name})},a.id))}),!x&&u.length>N&&e.jsx("div",{className:"mt-3 flex justify-start",children:e.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>j(!0),children:["Show ",u.length-N," ","more"]})})]})]}),e.jsx(o,{variant:"light",className:"mt-4 bg-primary border-none",children:e.jsx(c,{className:"flex-1 h-96 overflow-y-auto bg-background",children:e.jsx(ue,{tableKey:`worker-${s.metadata.id}`,display:{hideMetrics:!0,hideCounts:!0,hideTriggerRunButton:!0,hiddenFilters:[me],hideCancelAndReplayButtons:!0},runFilters:{workerId:s.metadata.id},children:e.jsx(he,{leftLabel:"Recent runs"})})})})]})})}export{Ae as default}; diff --git a/hatchetembed/dashboard/assets/index-CQU71MwM.js b/hatchetembed/dashboard/assets/index-CQU71MwM.js deleted file mode 100644 index 66086ac7c7..0000000000 --- a/hatchetembed/dashboard/assets/index-CQU71MwM.js +++ /dev/null @@ -1 +0,0 @@ -import{k as n,eU as j,j as d,eV as m,eW as A,eX as O,eY as S,eZ as k,e_ as M,e$ as L}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2d7cdd62-5281-44c1-9a5d-025640b71109",e._sentryDebugIdIdentifier="sentry-dbid-2d7cdd62-5281-44c1-9a5d-025640b71109")}catch{}})();var f="Collapsible",[F,q]=L(f),[$,v]=F(f),P=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,open:s,defaultOpen:t,disabled:l,onOpenChange:i,...b}=e,[p,c]=j({prop:s,defaultProp:t??!1,onChange:i,caller:f});return d.jsx($,{scope:r,disabled:l,contentId:A(),open:p,onOpenToggle:n.useCallback(()=>c(C=>!C),[c]),children:d.jsx(m.div,{"data-state":h(p),"data-disabled":l?"":void 0,...b,ref:o})})});P.displayName=f;var E="CollapsibleTrigger",T=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,...s}=e,t=v(E,r);return d.jsx(m.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":h(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...s,ref:o,onClick:S(e.onClick,t.onOpenToggle)})});T.displayName=E;var y="CollapsibleContent",D=n.forwardRef((e,o)=>{const{forceMount:r,...s}=e,t=v(y,e.__scopeCollapsible);return d.jsx(O,{present:r||t.open,children:({present:l})=>d.jsx(B,{...s,ref:o,present:l})})});D.displayName=y;var B=n.forwardRef((e,o)=>{const{__scopeCollapsible:r,present:s,children:t,...l}=e,i=v(y,r),[b,p]=n.useState(s),c=n.useRef(null),C=k(o,c),x=n.useRef(0),R=x.current,_=n.useRef(0),w=_.current,g=i.open||b,I=n.useRef(g),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(a)},[]),M(()=>{const a=c.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const N=a.getBoundingClientRect();x.current=N.height,_.current=N.width,I.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(s)}},[i.open,s]),d.jsx(m.div,{"data-state":h(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...l,ref:C,style:{"--radix-collapsible-content-height":R?`${R}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:g&&t})});function h(e){return e?"open":"closed"}var H=P,U=T,V=D;export{D as C,H as R,U as T,V as a,q as c}; diff --git a/hatchetembed/dashboard/assets/index-CY7bg9j1.js b/hatchetembed/dashboard/assets/index-CY7bg9j1.js deleted file mode 100644 index 2790042120..0000000000 --- a/hatchetembed/dashboard/assets/index-CY7bg9j1.js +++ /dev/null @@ -1 +0,0 @@ -import{cj as _,N as D,O as I,k as p,j as e,cu as de,S as le,aL as re,B,aC as ja,ab as T,W as ba,X as va,a4 as wa,a5 as Ta,Z as Aa,e as ka,fc as La,c2 as la,F as W,bj as Fa,I as M,cr as E,bP as za,fs as Ba,ft as Oa,a6 as K,a7 as P,a8 as V,a9 as Q,aa as A,fu as te,cI as Ca,u as Ua,t as _a,fq as ce,au as Ka,A as ra,T as ca,d as da,L as b,bm as y,db as ya,dc as Sa,dd as G,de as U,cX as Pa,o as F,fr as z,s as w,bb as Va,d0 as Y,bo as Qa,h as Ga,aI as Za,b as ae,d9 as $a,l as Ya,p as ua,Q as ma,i as Ha,da as Xa}from"./index-NcPpBRAY.js";import{M as qa}from"./managed-workers-gate-C-OegMsp.js";import{G as Na}from"./github-button-DalgP0Fz.js";import{F as Ra}from"./ArrowPathIcon-DJaZk0M1.js";import{m as q,g as ha,a as Ja,b as Wa,E as Ea,r as ga,U as es,s as ts}from"./create-worker-form-BqgLk5vw.js";import{A as xa,b as se,c as ne,d as ie}from"./steps-CZ8cuefp.js";import{m as pa,F as as}from"./managed-compute-Dhtcalwt.js";import{F as fa}from"./ExclamationTriangleIcon-Okie-gQE.js";import{F as ss}from"./PlusIcon-ChBf4T_m.js";import{C as ns}from"./confirm-dialog-Bv8agSqW.js";import{R as is}from"./resource-not-found-DGbig0ge.js";import"./index-CQU71MwM.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="44247909-f05e-45a5-a070-f770e68a95bc",n._sentryDebugIdIdentifier="sentry-dbid-44247909-f05e-45a5-a070-f770e68a95bc")}catch{}})();function os({buildId:n}){var o;const{refetchInterval:i}=_(),t=D({...I.cloud.getBuildLogs(n),refetchInterval:i}),a=p.useMemo(()=>{var g;const l=((g=t.data)==null?void 0:g.rows)||[];return l.length===0?[{line:"Loading...",timestamp:new Date().toISOString(),instance:"Hatchet"}]:l.map(c=>({timestamp:c.timestamp,line:c.line,instance:c.instance,level:c.level,metadata:c.metadata}))},[(o=t.data)==null?void 0:o.rows]);return e.jsx("div",{className:"w-full flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:a})})}function ls({buildId:n}){var a,o,l;const i=D({...I.cloud.getBuild(n)});if(i.isLoading)return e.jsx(le,{});const t=i.data;return e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"Build Overview"}),e.jsx("div",{className:"flex flex-row gap-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Build ID: ",(a=t==null?void 0:t.metadata)==null?void 0:a.id]}),e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Created: ",e.jsx(re,{date:(o=t==null?void 0:t.metadata)==null?void 0:o.createdAt})]}),(t==null?void 0:t.finishTime)&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Finished: ",e.jsx(re,{date:t==null?void 0:t.finishTime})]}),e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Status: ",(l=i.data)==null?void 0:l.status]})]})}),e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"Build Logs"}),e.jsx(os,{buildId:n})]})}function rs({managedWorkerId:n,deployKey:i}){var l;const{refetchInterval:t}=_(),a=D({...I.cloud.getIacLogs(n,i),refetchInterval:t}),o=p.useMemo(()=>{var c;const g=((c=a.data)==null?void 0:c.rows)||[];return g.length===0?[{line:"Loading...",timestamp:new Date().toISOString(),instance:"Hatchet"}]:g.map(r=>({timestamp:r.timestamp,line:r.line,instance:r.instance,level:r.level,metadata:r.metadata}))},[(l=a.data)==null?void 0:l.rows]);return e.jsx("div",{className:"w-full flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:o})})}function cs({managedWorkerId:n,deployKey:i}){return e.jsxs("div",{className:"flex w-full flex-col gap-4",children:[e.jsx("h4",{className:"text-lg font-semibold text-foreground",children:"IaC Logs"}),e.jsx(rs,{managedWorkerId:n,deployKey:i})]})}function ds({managedWorker:n}){const[i,t]=p.useState(),[a,o]=p.useState();return i?e.jsx(ms,{buildId:i,back:()=>t(void 0)}):a?e.jsx(hs,{managedWorkerId:n.metadata.id,deployKey:a,back:()=>o(void 0)}):e.jsx(us,{managedWorker:n,setBuildId:t,setDeployKey:o})}function us({managedWorker:n,setBuildId:i,setDeployKey:t}){var g;const{refetchInterval:a}=_(),o=D({...I.cloud.listManagedWorkerEvents(n.metadata.id||""),enabled:!!n,refetchInterval:a});if(!n||o.isLoading)return e.jsx(le,{});const l=((g=o.data)==null?void 0:g.rows)||[];return e.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[o.isLoading&&e.jsx(le,{}),l.length===0&&e.jsx(ba,{className:"h-[400px] bg-muted/30",children:e.jsx(va,{children:e.jsx(wa,{className:"text-sm tracking-wide",children:"No events found"})})}),l.map((c,r)=>e.jsx(gs,{managedWorker:n,event:c,setBuildId:i,setDeployKey:t},r))]})}function ms({buildId:n,back:i}){return e.jsxs("div",{className:"mt-8 flex flex-col items-start justify-start gap-4",children:[e.jsx("div",{className:"flex flex-row items-center justify-start gap-4",children:e.jsx(B,{onClick:i,variant:"link",leftIcon:e.jsx(ja,{className:"size-4"}),children:"Back"})}),e.jsx(T,{}),e.jsx(ls,{buildId:n})]})}function hs({managedWorkerId:n,deployKey:i,back:t}){return e.jsxs("div",{className:"mt-8 flex flex-col items-start justify-start gap-4",children:[e.jsx("div",{className:"flex flex-row items-center justify-start gap-4",children:e.jsx(B,{onClick:t,variant:"link",leftIcon:e.jsx(ja,{className:"size-4"}),children:"Back"})}),e.jsx(T,{}),e.jsx(cs,{managedWorkerId:n,deployKey:i})]})}function gs({managedWorker:n,event:i,setBuildId:t,setDeployKey:a}){return e.jsxs(ba,{className:"bg-muted/30",children:[e.jsxs(va,{children:[e.jsxs("div",{className:"flex flex-row items-center justify-between text-sm",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between gap-3",children:[e.jsx(fs,{severity:i.status}),e.jsx(wa,{className:"text-sm tracking-wide",children:i.message})]}),e.jsx(re,{date:i.timeLastSeen})]}),e.jsx(Ta,{className:"mt-2",children:i.message})]}),e.jsx(Aa,{className:"z-10 bg-background p-0"}),xs(n,i,t,a)]})}function xs(n,i,t,a){if(i.data){const o=i.data,l=[];if(o.build_id&&l.push(e.jsx(B,{variant:"link",size:"xs",onClick:()=>{t(o.build_id)},leftIcon:e.jsx(la,{className:"size-4"}),children:"View build info"})),o.deploy_key&&l.push(e.jsx(B,{variant:"link",size:"xs",onClick:()=>{a(o.deploy_key)},leftIcon:e.jsx(la,{className:"size-4"}),children:"View IaC debug info"})),o.commit_sha&&n.buildConfig&&l.push(e.jsx(Na,{buildConfig:n.buildConfig,commitSha:o.commit_sha})),l.length)return e.jsx(La,{className:"gap-4",children:l})}return null}const ps={SUCCEEDED:"border-transparent rounded-full bg-green-500",FAILED:"border-transparent rounded-full bg-red-500",CANCELLED:"border-transparent rounded-full bg-gray-500",IN_PROGRESS:"border-transparent rounded-full bg-yellow-500",SCALE_UP:"border-transparent rounded-full bg-blue-500",SCALE_DOWN:"border-transparent rounded-full bg-purple-500"};function fs({severity:n}){return e.jsx("div",{className:ka(ps[n],"h-[6px] w-[6px] rounded-full")})}function js({managedWorkerId:n}){var r;const{refetchInterval:i}=_(),[t,a]=p.useState(!1),o=D({...I.cloud.listManagedWorkerInstances(n),refetchInterval:i}),g=p.useMemo(()=>{var m;return((m=o.data)==null?void 0:m.rows)||[]},[(r=o.data)==null?void 0:r.rows]).map(x=>({...x,metadata:{id:x.instanceId}})),c=p.useMemo(()=>[{columnLabel:"Name",cellRenderer:x=>e.jsx("div",{className:"text-md min-w-fit whitespace-nowrap p-2",children:x.name})},{columnLabel:"State",cellRenderer:x=>e.jsx("div",{className:"whitespace-nowrap",children:x.state})},{columnLabel:"Commit",cellRenderer:x=>e.jsx("div",{className:"whitespace-nowrap",children:x.commitSha.substring(0,7)})}],[]);return o.isLoading?e.jsx(W,{}):e.jsxs("div",{children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(B,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:()=>{o.refetch(),a(!t)},variant:"outline","aria-label":"Refresh instances list",children:e.jsx(Ra,{className:`size-4 transition-transform ${t?"rotate-180":""}`})})}),g.length>0?e.jsx(Fa,{columns:c,data:g,rowKey:x=>x.metadata.id}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"There are no instances currently active for this managed worker pool."})]})}function bs({managedWorker:n}){const[i,t]=p.useState({}),[a,o]=p.useState(),[l,g]=p.useState(),[c,r]=p.useState(""),[x,m]=p.useState(),[v,f]=p.useState([]),[N,h]=p.useState(!1),{refetchInterval:R}=_(),S=D({...I.cloud.getManagedWorkerLogs((n==null?void 0:n.metadata.id)||"",i),enabled:!!n,refetchInterval:R});p.useEffect(()=>{var $;const O=((($=S.data)==null?void 0:$.rows)||[]).map(L=>({timestamp:L.timestamp,line:L.line,instance:L.instance,level:L.level,metadata:L.metadata}));!x&&S.isSuccess?(m(S.dataUpdatedAt),f(O)):S.isSuccess&&S.dataUpdatedAt!==x&&(m(S.dataUpdatedAt),f(L=>vs(L,O)))},[x,S.isSuccess,S.data,S.dataUpdatedAt]);const H=async()=>{const C=v[v.length-1];S.isSuccess&&x&&(C!=null&&C.timestamp)&&(!a||(a==null?void 0:a.toISOString())>C.timestamp)&&t({...i,before:a==null?void 0:a.toISOString(),after:C.timestamp,direction:"forward"})},Z=async()=>{const C=v[0];S.isSuccess&&x&&(C!=null&&C.timestamp)&&(!l||(l==null?void 0:l.toISOString()){f([]),t({...i,before:a&&a.toISOString(),after:l&&l.toISOString()}),h(!N)},ee=(a==null?void 0:a.toISOString())===(i==null?void 0:i.before)&&(l==null?void 0:l.toISOString())===(i==null?void 0:i.after);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("form",{onSubmit:()=>t({...i,search:c}),children:[e.jsx(M,{id:"search-input",placeholder:"Search...",value:c,onChange:C=>r(C.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsx("button",{type:"submit",className:"hidden",formTarget:"search-input"})]}),e.jsxs("div",{className:"flex flex-row gap-4",children:[e.jsx(E,{date:l,setDate:g,label:"After"}),e.jsx(E,{date:a,setDate:o,label:"Before"}),e.jsx(B,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:k,variant:ee?"outline":"default","aria-label":"Refresh logs",children:e.jsx(Ra,{className:`size-4 transition-transform ${N?"rotate-180":""}`})},"refresh")]})]}),e.jsx("div",{className:"flex flex-col max-h-[25rem] min-h-[25rem]",children:e.jsx(de,{logs:v,onScrollToBottom:H,onScrollToTop:Z})})]})}const vs=(n,i)=>{const t=[...n,...i],a=Array.from(new Map(t.map(o=>[(o.timestamp||"")+(o.instance||"")+(o.line||""),o])).values());return a.sort((o,l)=>o.timestamp===l.timestamp?(o.line||"")<(l.line||"")?-1:1:(o.timestamp||"")<(l.timestamp||"")?-1:1),a},J=n=>{switch(n){case"1h":return new Date(Date.now()-3600*1e3).toISOString();case"6h":return new Date(Date.now()-360*60*1e3).toISOString();case"1d":return new Date(Date.now()-1440*60*1e3).toISOString();case"7d":return new Date(Date.now()-10080*60*1e3).toISOString()}};function ws({managedWorker:n}){const{refetchInterval:i}=_(),[t,a]=za(Ba),[o,l]=p.useState(),[g,c]=p.useState(J(t)||new Date(Date.now()-1440*60*1e3).toISOString()),[r,x]=p.useState();p.useEffect(()=>{const h=setInterval(()=>{o||c(J(t)||new Date(Date.now()-864e5).toISOString())},6e4);return()=>clearInterval(h)},[t,o]),p.useEffect(()=>{o&&o.length===2?(c(o[0]),x(o[1])):t&&(c(J(t)),x(void 0))},[t,o,c]);const m=p.useMemo(()=>({after:g,before:r}),[g,r]),v=D({...I.cloud.getManagedWorkerCpuMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i}),f=D({...I.cloud.getManagedWorkerMemoryMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i}),N=D({...I.cloud.getManagedWorkerDiskMetrics((n==null?void 0:n.metadata.id)||"",m),enabled:!!n,refetchInterval:i});return v.isLoading||f.isLoading||N.isLoading||!v.data||!f.data||!N.data?e.jsx(W,{}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"mt-4 flex flex-row items-center justify-between",children:[e.jsx("h3",{className:"text-xl font-bold leading-tight text-foreground",children:"Metrics"}),e.jsxs("div",{className:"my-4 flex flex-row items-center justify-end gap-2",children:[o&&[e.jsxs(B,{onClick:()=>{l(void 0)},variant:"outline",size:"sm",className:"h-9 py-2 text-xs",children:[e.jsx(Oa,{className:"mr-2 h-[18px] w-[18px]"}),"Clear"]},"clear"),e.jsx(E,{label:"After",date:g?new Date(g):void 0,setDate:h=>{c(h==null?void 0:h.toISOString())}},"after"),e.jsx(E,{label:"Before",date:r?new Date(r):void 0,setDate:h=>{x(h==null?void 0:h.toISOString())}},"before")],e.jsxs(K,{value:o?"custom":t,onValueChange:h=>{h!=="custom"?(a(h),l(void 0)):l([J(h)||new Date(Date.now()-1440*60*1e3).toISOString(),new Date().toISOString()])},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"timerange",placeholder:"Choose time range"})}),e.jsxs(Q,{children:[e.jsx(A,{value:"1h",children:"1 hour"}),e.jsx(A,{value:"6h",children:"6 hours"}),e.jsx(A,{value:"1d",children:"1 day"}),e.jsx(A,{value:"7d",children:"7 days"}),e.jsx(A,{value:"custom",children:"Custom"})]})]})]})]}),e.jsx(T,{}),e.jsx("h4",{className:"ml-4 mt-2 text-lg font-bold leading-tight text-foreground",children:"CPU"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(v.data),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0}),e.jsx("h4",{className:"ml-4 mt-16 text-lg font-bold leading-tight text-foreground",children:"Memory"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(f.data,h=>h/(1e3*1e3)),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0}),e.jsx("h4",{className:"ml-4 mt-16 text-lg font-bold leading-tight text-foreground",children:"Disk"}),e.jsx(T,{}),e.jsx(te,{className:"max-h-[25rem] min-h-[25rem]",data:oe(N.data,h=>h/(1e3*1e3)),kind:"line",zoom:(h,R)=>{l([h,R])},showYAxis:!0})]})}function oe(n,i){const t={};return n.forEach(a=>{var l,g;let o=Object.values(a.metric||{}).join("-");(l=a.metric)!=null&&l.instance&&((g=a.metric)!=null&&g.region)&&(o=`[${a.metric.region}] ${a.metric.instance}`),(a.values||[]).forEach(([c,r])=>{const x=new Date(c*1e3).toISOString();if(!t[x]){const v={date:x};t[x]=v}let m=parseFloat(r);m=i?i(m):m,t[x][o]=m})}),Object.values(t)}const Cs=F({name:w().optional(),buildConfig:F({githubInstallationId:w().uuid().length(36),githubRepositoryOwner:w(),githubRepositoryName:w(),githubRepositoryBranch:w(),steps:Y(F({buildDir:w(),dockerfilePath:w()}))}).optional(),secrets:F({add:Y(F({key:w(),value:w()})),update:Y(F({id:w(),key:w(),value:w()})),delete:Y(w())}),runtimeConfig:F({numReplicas:z().min(0).max(16).optional(),cpuKind:w(),cpus:z(),memoryMb:z(),regions:Y(Qa(ce)).optional(),autoscaling:F({waitDuration:w(),rollingWindowDuration:w(),utilizationScaleUpThreshold:z(),utilizationScaleDownThreshold:z(),increment:z(),minAwakeReplicas:z(),maxReplicas:z(),scaleToZero:Va(),fly:F({autoscalingKey:w(),currentReplicas:z()})}).optional()}).optional()});function ys({onSubmit:n,isLoading:i,fieldErrors:t,managedWorker:a}){var ke,Le,Fe,ze,Be,Oe,Ue,_e,Ke,Pe,Ve,Qe,Ge,Ze,$e,Ye,He,Xe,qe,Je,We,Ee,et,tt,at,st,nt,it,ot,lt,rt,ct,dt,ut,mt,ht,gt,xt,pt,ft,jt,bt,vt,wt,Ct,yt,St,Nt,Rt,Dt,It,Mt,Tt,At,kt,Lt,Ft,zt,Bt,Ot,Ut,_t,Kt,Pt,Vt,Qt,Gt,Zt,$t,Yt,Ht,Xt,qt,Jt,Wt,Et,ea,ta,aa,sa,na,ia;const{tenantId:o}=Ca(),{watch:l,handleSubmit:g,control:c,setValue:r,getValues:x,formState:{errors:m}}=Ua({resolver:_a(Cs),defaultValues:{name:a.name,buildConfig:{githubInstallationId:(ke=a.buildConfig)==null?void 0:ke.githubInstallationId,githubRepositoryBranch:(Le=a.buildConfig)==null?void 0:Le.githubRepositoryBranch,githubRepositoryName:(ze=(Fe=a.buildConfig)==null?void 0:Fe.githubRepository)==null?void 0:ze.repo_name,githubRepositoryOwner:(Oe=(Be=a.buildConfig)==null?void 0:Be.githubRepository)==null?void 0:Oe.repo_owner,steps:((_e=(Ue=a.buildConfig)==null?void 0:Ue.steps)==null?void 0:_e.map(s=>({buildDir:s.buildDir,dockerfilePath:s.dockerfilePath})))||[{buildDir:".",dockerfilePath:"./Dockerfile"}]},secrets:{add:[],update:[],delete:[]},runtimeConfig:((Ke=a.runtimeConfigs)==null?void 0:Ke.length)==1?{numReplicas:a.runtimeConfigs[0].autoscaling!=null?void 0:a.runtimeConfigs[0].numReplicas,cpuKind:a.runtimeConfigs[0].cpuKind,cpus:a.runtimeConfigs[0].cpus,memoryMb:a.runtimeConfigs[0].memoryMb,regions:[a.runtimeConfigs[0].region],autoscaling:a.runtimeConfigs[0].autoscaling!=null?{waitDuration:a.runtimeConfigs[0].autoscaling.waitDuration,rollingWindowDuration:a.runtimeConfigs[0].autoscaling.rollingWindowDuration,utilizationScaleUpThreshold:a.runtimeConfigs[0].autoscaling.utilizationScaleUpThreshold,utilizationScaleDownThreshold:a.runtimeConfigs[0].autoscaling.utilizationScaleDownThreshold,increment:a.runtimeConfigs[0].autoscaling.increment,minAwakeReplicas:a.runtimeConfigs[0].autoscaling.minAwakeReplicas,maxReplicas:a.runtimeConfigs[0].autoscaling.maxReplicas,scaleToZero:a.runtimeConfigs[0].autoscaling.scaleToZero,fly:{autoscalingKey:"dashboard",currentReplicas:a.runtimeConfigs[0].autoscaling.minAwakeReplicas}}:void 0}:void 0}}),[v,f]=p.useState("1 CPU, 1 GB RAM (shared CPU)");p.useEffect(()=>{if(a!=null&&a.runtimeConfigs&&a.runtimeConfigs.length>0){const s=a.runtimeConfigs[0],u=q.find(d=>d.cpuKind===s.cpuKind&&d.cpus===s.cpus&&d.memoryMb===s.memoryMb);u&&f(u.title)}},[a]);const N=l("runtimeConfig.regions"),h=l("buildConfig.githubInstallationId"),R=l("buildConfig.githubRepositoryOwner"),S=l("buildConfig.githubRepositoryName"),H=ha(R,S),Z=l("buildConfig.githubRepositoryBranch"),k=D({...I.github.listInstallations(o)}),ee=D({...I.github.listRepos(o,h)}),C=D({...I.github.listBranches(o,h,R,S)}),[O,$]=p.useState(((Pe=a.directSecrets)==null?void 0:Pe.map(s=>({key:s.key,value:s.hint||"",hidden:!1,locked:!1,deleted:!1,id:s.id,hint:s.hint})))||[]),[L,ue]=p.useState(((Ve=a.runtimeConfigs)==null?void 0:Ve.length)==1&&a.runtimeConfigs[0].autoscaling!=null?"Autoscaling":"Static"),me=((Ge=(Qe=m.name)==null?void 0:Qe.message)==null?void 0:Ge.toString())||(t==null?void 0:t.name),he=((Xe=(He=(Ye=($e=(Ze=m.buildConfig)==null?void 0:Ze.steps)==null?void 0:$e[0])==null?void 0:Ye.buildDir)==null?void 0:He.message)==null?void 0:Xe.toString())||(t==null?void 0:t.buildDir),ge=((et=(Ee=(We=(Je=(qe=m.buildConfig)==null?void 0:qe.steps)==null?void 0:Je[0])==null?void 0:We.dockerfilePath)==null?void 0:Ee.message)==null?void 0:et.toString())||(t==null?void 0:t.dockerfilePath),xe=((st=(at=(tt=m.runtimeConfig)==null?void 0:tt.numReplicas)==null?void 0:at.message)==null?void 0:st.toString())||(t==null?void 0:t.numReplicas),pe=((ot=(it=(nt=m.secrets)==null?void 0:nt.add)==null?void 0:it.message)==null?void 0:ot.toString())||(t==null?void 0:t.secrets),fe=((ct=(rt=(lt=m.runtimeConfig)==null?void 0:lt.cpuKind)==null?void 0:rt.message)==null?void 0:ct.toString())||(t==null?void 0:t.cpuKind),je=((mt=(ut=(dt=m.runtimeConfig)==null?void 0:dt.cpus)==null?void 0:ut.message)==null?void 0:mt.toString())||(t==null?void 0:t.cpus),be=((xt=(gt=(ht=m.runtimeConfig)==null?void 0:ht.memoryMb)==null?void 0:gt.message)==null?void 0:xt.toString())||(t==null?void 0:t.memoryMb),ve=((jt=(ft=(pt=m.buildConfig)==null?void 0:pt.githubInstallationId)==null?void 0:ft.message)==null?void 0:jt.toString())||(t==null?void 0:t.githubInstallationId),we=((wt=(vt=(bt=m.buildConfig)==null?void 0:bt.githubRepositoryOwner)==null?void 0:vt.message)==null?void 0:wt.toString())||(t==null?void 0:t.githubRepositoryOwner),Ce=((St=(yt=(Ct=m.buildConfig)==null?void 0:Ct.githubRepositoryName)==null?void 0:yt.message)==null?void 0:St.toString())||(t==null?void 0:t.githubRepositoryName),ye=((Dt=(Rt=(Nt=m.buildConfig)==null?void 0:Nt.githubRepositoryBranch)==null?void 0:Rt.message)==null?void 0:Dt.toString())||(t==null?void 0:t.githubRepositoryBranch),Se=((At=(Tt=(Mt=(It=m.runtimeConfig)==null?void 0:It.autoscaling)==null?void 0:Mt.waitDuration)==null?void 0:Tt.message)==null?void 0:At.toString())||(t==null?void 0:t.waitDuration),Ne=((zt=(Ft=(Lt=(kt=m.runtimeConfig)==null?void 0:kt.autoscaling)==null?void 0:Lt.rollingWindowDuration)==null?void 0:Ft.message)==null?void 0:zt.toString())||(t==null?void 0:t.rollingWindowDuration),Re=((_t=(Ut=(Ot=(Bt=m.runtimeConfig)==null?void 0:Bt.autoscaling)==null?void 0:Ot.utilizationScaleUpThreshold)==null?void 0:Ut.message)==null?void 0:_t.toString())||(t==null?void 0:t.utilizationScaleUpThreshold),De=((Qt=(Vt=(Pt=(Kt=m.runtimeConfig)==null?void 0:Kt.autoscaling)==null?void 0:Pt.utilizationScaleDownThreshold)==null?void 0:Vt.message)==null?void 0:Qt.toString())||(t==null?void 0:t.utilizationScaleDownThreshold),Ie=((Yt=($t=(Zt=(Gt=m.runtimeConfig)==null?void 0:Gt.autoscaling)==null?void 0:Zt.increment)==null?void 0:$t.message)==null?void 0:Yt.toString())||(t==null?void 0:t.increment),Me=((Jt=(qt=(Xt=(Ht=m.runtimeConfig)==null?void 0:Ht.autoscaling)==null?void 0:Xt.minAwakeReplicas)==null?void 0:qt.message)==null?void 0:Jt.toString())||(t==null?void 0:t.minAwakeReplicas),Te=((ta=(ea=(Et=(Wt=m.runtimeConfig)==null?void 0:Wt.autoscaling)==null?void 0:Et.maxReplicas)==null?void 0:ea.message)==null?void 0:ta.toString())||(t==null?void 0:t.maxReplicas),Ae=((ia=(na=(sa=(aa=m.runtimeConfig)==null?void 0:aa.autoscaling)==null?void 0:sa.scaleToZero)==null?void 0:na.message)==null?void 0:ia.toString())||(t==null?void 0:t.scaleToZero);p.useEffect(()=>{var s;k.isSuccess&&k.data.rows.length>0&&!h&&r("buildConfig.githubInstallationId",((s=a.buildConfig)==null?void 0:s.githubInstallationId)||k.data.rows[0].metadata.id)},[a,k,r,h]),p.useEffect(()=>{x("runtimeConfig")||(r("runtimeConfig",{numReplicas:1,cpuKind:"shared",cpus:1,memoryMb:1024,regions:[ce.Sjc]}),f("1 CPU, 1 GB RAM (shared CPU)"),r("runtimeConfig.regions",[ce.Sjc]))},[x,r]);const{can:X}=Ka(),[Da]=p.useMemo(()=>{const s=q.find(d=>d.title===v);if(!s||!X)return[!0,void 0];const u={cpuKind:s.cpuKind,cpus:s.cpus,memoryMb:s.memoryMb};return X(pa.selectCompute(u))},[X,v]);if(p.useEffect(()=>{const s=O.filter(j=>!j.id&&!j.deleted),u=O.filter(j=>j.id&&!j.deleted&&j.isEditing),d=O.filter(j=>j.id&&j.deleted).map(j=>j.id);r("secrets.add",s.map(j=>({key:j.key,value:j.value}))),r("secrets.update",u.map(j=>({id:j.id,key:j.key,value:j.value}))),r("secrets.delete",d)},[O,r]),k.isSuccess&&k.data.rows.length===0)return e.jsxs(ra,{children:[e.jsx(fa,{className:"size-4"}),e.jsx(ca,{className:"font-semibold",children:"Link a Github account"}),e.jsxs(da,{children:["You don't have any Github accounts linked. Please"," ",e.jsx("a",{href:"/api/v1/cloud/users/github-app/start",className:"text-indigo-400",children:"link a Github account"})," ","first."]})]});const Ia=s=>{const u={cpuKind:s.cpuKind,cpus:s.cpus,memoryMb:s.memoryMb},[d]=X(pa.selectCompute(u));return e.jsxs(A,{value:s.title,children:[s.title," ",!d&&"🔒"]},s.title)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Change the configuration of your service. This will trigger a redeployment of all workers."}),!a.canUpdate&&e.jsxs(ra,{className:"mt-4",variant:"warn",children:[e.jsx(fa,{className:"size-4"}),e.jsx(ca,{className:"font-semibold",children:"You do not have permission to update this service."}),e.jsxs(da,{children:["Please make sure your linked"," ",e.jsx("a",{href:`/tenants/${o}/settings/github`,className:"text-indigo-400",children:"Github account"})," ","has write access to the repository."]})]}),e.jsxs("div",{className:"mt-6 flex flex-col gap-4",children:[e.jsx("div",{children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx(b,{htmlFor:"name",children:"Name"}),e.jsx(y,{control:c,name:"name",render:({field:s})=>e.jsx(M,{...s,id:"name",placeholder:"my-awesome-service"})}),me&&e.jsx("div",{className:"text-sm text-red-500",children:me})]})}),e.jsxs(xa,{type:"multiple",className:"w-full",children:[e.jsxs(se,{value:"build",children:[e.jsx(ne,{className:"text-lg font-semibold text-foreground",children:"Build configuration"}),e.jsxs(ie,{className:"grid max-w-3xl gap-4",children:[e.jsx(b,{htmlFor:"role",children:"Github account"}),e.jsx(y,{control:c,name:"buildConfig.githubInstallationId",render:({field:s})=>{var u;return e.jsxs(K,{value:h,onValueChange:d=>{s.onChange(d),r("buildConfig.githubRepositoryOwner",""),r("buildConfig.githubRepositoryName",""),r("buildConfig.githubRepositoryBranch","")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose account"})}),e.jsx(Q,{children:(u=k.data)==null?void 0:u.rows.map(d=>e.jsx(A,{value:d.metadata.id,children:d.account_name},d.metadata.id))})]})}}),ve&&e.jsx("div",{className:"text-sm text-red-500",children:ve}),e.jsx(b,{htmlFor:"role",children:"Github repo"}),e.jsx(y,{control:c,name:"buildConfig.githubRepositoryName",render:({field:s})=>{var u;return e.jsxs(K,{...s,value:H,onValueChange:d=>{r("buildConfig.githubRepositoryOwner",Ja(d)||""),r("buildConfig.githubRepositoryName",Wa(d)||""),r("buildConfig.githubRepositoryBranch","")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose repository"})}),e.jsx(Q,{children:(u=ee.data)==null?void 0:u.map(d=>e.jsxs(A,{value:ha(d.repo_owner,d.repo_name)||"",children:[d.repo_owner,"/",d.repo_name]},d.repo_owner+d.repo_name))})]})}}),we&&e.jsx("div",{className:"text-sm text-red-500",children:we}),Ce&&e.jsx("div",{className:"text-sm text-red-500",children:Ce}),e.jsx(b,{htmlFor:"role",children:"Github branch"}),e.jsx(y,{control:c,name:"buildConfig.githubRepositoryBranch",render:({field:s})=>{var u;return e.jsxs(K,{onValueChange:s.onChange,...s,children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"role",placeholder:"Choose branch"})}),e.jsx(Q,{children:(u=C.data)==null?void 0:u.map(d=>e.jsx(A,{value:d.branch_name,children:d.branch_name},d.branch_name))})]})}}),ye&&e.jsx("div",{className:"text-sm text-red-500",children:ye}),e.jsx(b,{htmlFor:"buildDir",children:"Build directory"}),e.jsx(y,{control:c,name:"buildConfig.steps.0.buildDir",render:({field:s})=>e.jsx(M,{...s,placeholder:"build",id:"buildDir",defaultValue:".",disabled:!Z})}),he&&e.jsx("div",{className:"text-sm text-red-500",children:he}),e.jsx(b,{htmlFor:"dockerfile",children:"Path to Dockerfile"}),e.jsx(y,{control:c,name:"buildConfig.steps.0.dockerfilePath",render:({field:s})=>e.jsx(M,{...s,placeholder:".",id:"dockerfile",defaultValue:"./Dockerfile",disabled:!Z})}),ge&&e.jsx("div",{className:"text-sm text-red-500",children:ge})]})]}),e.jsxs(se,{value:"runtime",children:[e.jsx(ne,{className:"text-lg font-semibold text-foreground",children:"Runtime configuration"}),e.jsxs(ie,{className:"grid gap-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Configure the runtime settings for this service."}),e.jsx(b,{children:"Environment Variables"}),e.jsx(Ea,{values:O,setValues:$,onUpdate:s=>{$(u=>u.map(j=>{const oa=s.find(Ma=>Ma.id===j.id);return oa?{...j,...oa}:j}))}}),pe&&e.jsx("div",{className:"text-sm text-red-500",children:pe}),e.jsx(b,{children:"Machine Configuration"}),e.jsxs("div",{className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"region",children:"Region"}),e.jsxs(K,{value:N==null?void 0:N.toString(),onValueChange:s=>{const u=ga.find(d=>d.value===s);u&&r("runtimeConfig.regions",[u.value])},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"region",placeholder:"Choose region"})}),e.jsx(Q,{children:ga.map(s=>e.jsx(A,{value:s.value,children:s.name},s.value))})]}),e.jsx(b,{htmlFor:"machineType",children:"Machine type"}),e.jsx(y,{control:c,name:"runtimeConfig.cpuKind",render:({field:s})=>e.jsxs(K,{...s,value:v,onValueChange:u=>{const d=q.find(j=>j.title===u);f(u),r("runtimeConfig.cpus",(d==null?void 0:d.cpus)||1),r("runtimeConfig.memoryMb",(d==null?void 0:d.memoryMb)||1024),r("runtimeConfig.cpuKind",(d==null?void 0:d.cpuKind)||"shared")},children:[e.jsx(P,{className:"w-fit",children:e.jsx(V,{id:"machineType",placeholder:"Choose type"})}),e.jsx(Q,{children:q.map(Ia)})]})}),!Da&&e.jsx(es,{feature:`The selected machine type (${v})`}),fe&&e.jsx("div",{className:"text-sm text-red-500",children:fe}),je&&e.jsx("div",{className:"text-sm text-red-500",children:je}),be&&e.jsx("div",{className:"text-sm text-red-500",children:be}),e.jsx(b,{children:"Scaling Method"}),e.jsxs(ya,{defaultValue:"Static",value:L,onValueChange:s=>{if(s==="Static"){ue("Static"),r("runtimeConfig.numReplicas",1),r("runtimeConfig.autoscaling",void 0);return}else ue("Autoscaling"),r("runtimeConfig.numReplicas",void 0),r("runtimeConfig.autoscaling",{waitDuration:"1m",rollingWindowDuration:"2m",utilizationScaleUpThreshold:.75,utilizationScaleDownThreshold:.25,increment:1,scaleToZero:!0,minAwakeReplicas:1,maxReplicas:10,fly:{autoscalingKey:"dashboard",currentReplicas:1}})},children:[e.jsx(Sa,{layout:"underlined",children:ts.map(s=>e.jsx(G,{variant:"underlined",value:s,children:s},s))}),e.jsxs(U,{value:"Static",className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"numReplicas",children:"Number of replicas"}),e.jsx(y,{control:c,name:"runtimeConfig.numReplicas",render:({field:s})=>e.jsx(M,{...s,type:"number",onChange:u=>{if(u.target.value===""){s.onChange(u.target.value);return}s.onChange(parseInt(u.target.value))},min:0,max:16,id:"numReplicas",placeholder:"1"})}),xe&&e.jsx("div",{className:"text-sm text-red-500",children:xe})]}),e.jsxs(U,{value:"Autoscaling",className:"grid gap-4 pt-4",children:[e.jsx(b,{htmlFor:"minAwakeReplicas",children:"Min Replicas"}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.minAwakeReplicas",render:({field:s})=>e.jsx(M,{...s,id:"minAwakeReplicas",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value)),r("runtimeConfig.autoscaling.fly.currentReplicas",parseInt(u.target.value))}})}),Me&&e.jsx("div",{className:"text-sm text-red-500",children:Me}),e.jsx(b,{htmlFor:"maxReplicas",children:"Max Replicas"}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.maxReplicas",render:({field:s})=>e.jsx(M,{...s,id:"maxReplicas",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value))}})}),Te&&e.jsx("div",{className:"text-sm text-red-500",children:Te}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.scaleToZero",render:({field:s})=>e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(b,{htmlFor:"scaleToZero",children:"Scale to zero during periods of inactivity?"}),e.jsx(Pa,{checked:s.value,onCheckedChange:s.onChange})]})}),Ae&&e.jsx("div",{className:"text-sm text-red-500",children:Ae}),e.jsx(xa,{type:"single",collapsible:!0,children:e.jsxs(se,{value:"advanced",children:[e.jsx(ne,{children:"Advanced autoscaling settings"}),e.jsxs(ie,{className:"flex flex-col gap-4",children:[e.jsx(b,{htmlFor:"waitDuration",children:"Wait Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"How long to wait between autoscaling events. For example: 10s (10 seconds), 5m (5 minutes), 1h (1 hour)."}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.waitDuration",render:({field:s})=>e.jsx(M,{...s,id:"waitDuration",placeholder:"1m"})}),Se&&e.jsx("div",{className:"text-sm text-red-500",children:Se}),e.jsx(b,{htmlFor:"rollingWindowDuration",children:"Rolling Window Duration"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The amount of time to look at utilization metrics for autoscaling. Lower values will lead to faster scale-up and scale-down. Example: 2m (2 minutes), 5m (5 minutes), 1h (1 hour)."}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.rollingWindowDuration",render:({field:s})=>e.jsx(M,{...s,id:"rollingWindowDuration",placeholder:"2m"})}),Ne&&e.jsx("div",{className:"text-sm text-red-500",children:Ne}),e.jsx(b,{htmlFor:"utilizationScaleUpThreshold",children:"Utilization Scale Up Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale up. For example, 0.75 means that if the utilization is above 75%, scale up."}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.utilizationScaleUpThreshold",render:({field:s})=>e.jsx(M,{...s,id:"utilizationScaleUpThreshold",type:"number",min:0,max:1,step:.01,onChange:u=>{s.onChange(parseFloat(u.target.value))}})}),Re&&e.jsx("div",{className:"text-sm text-red-500",children:Re}),e.jsx(b,{htmlFor:"utilizationScaleDownThreshold",children:"Utilization Scale Down Threshold"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"A value between 0 and 1 which represents the utilization threshold at which to scale down. For example, 0.25 means that if the utilization is below 25%, scale down."}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.utilizationScaleDownThreshold",render:({field:s})=>e.jsx(M,{...s,id:"utilizationScaleDownThreshold",type:"number",min:0,max:1,step:.01,onChange:u=>{s.onChange(parseFloat(u.target.value))}})}),De&&e.jsx("div",{className:"text-sm text-red-500",children:De}),e.jsx(b,{htmlFor:"increment",children:"Scaling Increment"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"The number of replicas to scale by when scaling up or down."}),e.jsx(y,{control:c,name:"runtimeConfig.autoscaling.increment",render:({field:s})=>e.jsx(M,{...s,id:"increment",type:"number",onChange:u=>{s.onChange(parseInt(u.target.value))}})}),Ie&&e.jsx("div",{className:"text-sm text-red-500",children:Ie})]})]})})]})]})]})]})]})]}),e.jsxs(B,{onClick:g(n),disabled:!a.canUpdate||!h||!H||!Z,className:"w-fit px-8",children:[i&&e.jsx(ss,{className:"size-4 animate-spin"}),"Save changes"]})]})]})}function Ss(){var N;const n=Ga(),[i,t]=p.useState(!1),{tenantId:a}=Ca(),{refetchInterval:o}=_(),l=Za({from:ae.tenantManagedWorkerRoute.to}),g=D({...I.cloud.getManagedWorker(l.managedWorker),refetchInterval:o,retry:(h,R)=>$a(R)}),[c,r]=p.useState({}),{handleApiError:x}=Ya({setFieldErrors:r}),m=ua({mutationKey:["managed-worker:update",l.managedWorker],mutationFn:async h=>(await ma.managedWorkerUpdate(f.metadata.id,h)).data,onSuccess:()=>{g.refetch()},onError:x}),v=ua({mutationKey:["managed-worker:delete",l.managedWorker],mutationFn:async()=>(await ma.managedWorkerDelete(f.metadata.id)).data,onSuccess:()=>{t(!1),n({to:ae.tenantManagedWorkersRoute.to,params:{tenant:a}})},onError:x});if(g.isLoading)return e.jsx(W,{});if(g.isError){if(Ha(g.error)&&((N=g.error.response)==null?void 0:N.status)===404)return e.jsx(is,{resource:"Managed worker",primaryAction:{label:"Back to Managed Workers",navigate:{to:ae.tenantManagedWorkersRoute.to,params:{tenant:a}}}});throw g.error}if(!g.data)return e.jsx(W,{});const f=g.data;return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex flex-row items-center justify-between",children:e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(as,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:f.name})]})}),e.jsxs("div",{className:"mt-4 flex flex-row items-center justify-start gap-6",children:[e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Created ",Xa(f.metadata.createdAt)]}),f.buildConfig&&e.jsx(Na,{buildConfig:f.buildConfig,prefix:"Deploys from"})]}),e.jsx("div",{className:"mt-4 flex flex-row items-center justify-start"}),e.jsxs(ya,{defaultValue:"activity",children:[e.jsxs(Sa,{layout:"underlined",children:[e.jsx(G,{variant:"underlined",value:"activity",children:"Activity"}),e.jsx(G,{variant:"underlined",value:"instances",children:"Instances"}),e.jsx(G,{variant:"underlined",value:"logs",children:"Logs"}),e.jsx(G,{variant:"underlined",value:"metrics",children:"Metrics"}),e.jsx(G,{variant:"underlined",value:"configuration",children:"Configuration"})]}),e.jsx(U,{value:"activity",children:e.jsx(ds,{managedWorker:f})}),e.jsxs(U,{value:"instances",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Instances"}),e.jsx(T,{className:"my-4"}),e.jsx(js,{managedWorkerId:f.metadata.id})]}),e.jsxs(U,{value:"logs",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Logs"}),e.jsx(T,{className:"my-4"}),e.jsx(bs,{managedWorker:f})]}),e.jsx(U,{value:"metrics",children:e.jsx(ws,{managedWorker:f})}),e.jsxs(U,{value:"configuration",children:[e.jsx("h3",{className:"mt-4 text-xl font-bold leading-tight text-foreground",children:"Configuration"}),e.jsx(T,{className:"my-4"}),e.jsx(ys,{managedWorker:f,onSubmit:m.mutate,isLoading:m.isPending,fieldErrors:c}),e.jsx(T,{className:"my-4"}),e.jsx("h4",{className:"mt-8 text-lg font-bold leading-tight text-foreground",children:"Danger Zone"}),e.jsx(T,{className:"my-4"}),e.jsx(B,{variant:"destructive",onClick:()=>{t(!0)},children:"Delete Managed Worker"}),e.jsx(ns,{title:"Delete managed worker",description:`Are you sure you want to delete the managed worker ${f.name}? This action cannot be undone, and will immediately tear these workers down.`,submitLabel:"Delete",onSubmit:v.mutate,onCancel:function(){t(!1)},isLoading:v.isPending,isOpen:i})]})]})]})})}function Os(){return e.jsx(qa,{children:e.jsx(Ss,{})})}export{Os as default}; diff --git a/hatchetembed/dashboard/assets/index-CYYxHnXB.js b/hatchetembed/dashboard/assets/index-CYYxHnXB.js deleted file mode 100644 index 5d66dfe946..0000000000 --- a/hatchetembed/dashboard/assets/index-CYYxHnXB.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,cP as o,aL as T,cQ as C,cR as D,cI as S,cj as P,cS as F,cT as V,cU as E,N,O as _,cV as z,cW as A,k as v,o as M,s as B,co as O,b7 as K,aE as H,l as Q,p as W,a as q,cz as G,bK as U,b6 as Z}from"./index-NcPpBRAY.js";import{L as $}from"./resource-limit-columns-CvplayQs.js";import"./resource-limit-status-BK8AB43u.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="e7083828-104f-4cd8-bbfd-40495c0fe415",i._sentryDebugIdIdentifier="sentry-dbid-e7083828-104f-4cd8-bbfd-40495c0fe415")}catch{}})();const s={key:"Key",value:"Value",limit:"Limit",lastRefill:"Last Refill",window:"Window",actions:"Actions"},L="key",J="value",X="limit",Y="lastRefill",ee="window",te="actions",ie=({onDeleteClick:i})=>[{accessorKey:L,header:({column:e})=>t.jsx(o,{column:e,title:s.key}),cell:({row:e})=>t.jsxs("div",{className:"flex flex-row items-center gap-4 pl-4",children:[t.jsx($,{value:e.original.limitValue-e.original.value,alarmValue:e.original.limitValue/2,limitValue:e.original.limitValue}),e.original.key]}),enableSorting:!1,enableHiding:!0},{accessorKey:J,header:({column:e})=>t.jsx(o,{column:e,title:s.value}),cell:({row:e})=>t.jsx("div",{children:e.original.value}),enableSorting:!1},{accessorKey:X,header:({column:e})=>t.jsx(o,{column:e,title:s.limit}),cell:({row:e})=>t.jsx("div",{children:e.original.limitValue}),enableSorting:!1},{accessorKey:Y,header:({column:e})=>t.jsx(o,{column:e,title:s.lastRefill}),cell:({row:e})=>t.jsx("div",{children:t.jsx(T,{date:e.original.lastRefill})}),enableSorting:!1},{accessorKey:ee,header:({column:e})=>t.jsx(o,{column:e,title:s.window}),cell:({row:e})=>t.jsx("div",{children:C(e.original.window)}),enableSorting:!1},{accessorKey:te,header:({column:e})=>t.jsx(o,{column:e,title:s.actions}),cell:({row:e})=>t.jsx("div",{className:"flex flex-row justify-center",children:t.jsx(D,{row:e.original,actions:[{label:"Delete",onClick:()=>i(e.original)}]})}),enableSorting:!1,enableHiding:!1}],ae=M({s:B().optional()}).default({s:void 0}),se=({key:i})=>{const{tenantId:e}=S(),{refetchInterval:r}=P(),d=`rate-limits-${i}`,{state:{s:m},columnFilters:f,setColumnFilters:g,resetFilters:y}=F(ae,d,{s:L}),[c]=V(m,300),{limit:h,offset:p,pagination:b,setPagination:x,setPageSize:w}=E({key:i,resetPageOnChange:[c]}),{data:a,isLoading:j,error:u,isRefetching:R,refetch:n}=N({..._.rate_limits.list(e,{search:c,orderByField:A.Key,orderByDirection:z.Asc,offset:p,limit:h}),refetchInterval:r,placeholderData:l=>l}),k=v.useMemo(()=>((a==null?void 0:a.rows)??[]).map(l=>({...l,metadata:{id:l.key}})),[a]),I=v.useMemo(()=>{var l;return((l=a==null?void 0:a.pagination)==null?void 0:l.num_pages)??0},[a]);return{data:k,numPages:I,isLoading:j,error:u,pagination:b,setPagination:x,setPageSize:w,columnFilters:f,setColumnFilters:g,isRefetching:R,refetch:n,resetFilters:y}};function ce(){return t.jsx(O,{title:"No rate limits found",description:"Rate limits cap how many times a task can run within a time window to prevent resource exhaustion.",docs:{href:K.v1["rate-limits"].href,description:"Learn about rate limits"},children:t.jsx(ne,{})})}function ne(){const[i,e]=H("hatchet:columns:rate-limits",{}),{tenantId:r}=S(),{handleApiError:d}=Q({}),{data:m,error:f,isLoading:g,columnFilters:y,setColumnFilters:c,pagination:h,setPageSize:p,setPagination:b,numPages:x,isRefetching:w,refetch:a,resetFilters:j}=se({key:"rate-limits-table"}),u=W({mutationKey:["rate-limit:delete",r],mutationFn:async n=>{await q.rateLimitDelete(r,{key:n.key})},onSuccess:()=>a(),onError:d}),R=v.useMemo(()=>ie({onDeleteClick:n=>u.mutate(n)}),[u]);return t.jsx(G,{error:f,isLoading:g,columns:R,data:m,filters:[{columnId:L,title:s.key,type:U.Search}],showColumnToggle:!0,columnVisibility:i,setColumnVisibility:e,columnFilters:y,setColumnFilters:c,pagination:h,setPagination:b,onSetPageSize:p,pageCount:x,getRowId:n=>n.metadata.id,columnKeyToName:s,refetchProps:{isRefetching:w,onRefetch:a},onResetFilters:j,emptyState:t.jsx(Z,{title:"No rate limits found",description:"Rate limits cap how many times a task can run within a time window to prevent resource exhaustion.",docPage:K.v1["rate-limits"],docLabel:"Learn about rate limits"})})}export{ce as default}; diff --git a/hatchetembed/dashboard/assets/index-Cd6hBVRN.js b/hatchetembed/dashboard/assets/index-Cd6hBVRN.js deleted file mode 100644 index 3eb2f4c0c3..0000000000 --- a/hatchetembed/dashboard/assets/index-Cd6hBVRN.js +++ /dev/null @@ -1 +0,0 @@ -import{aI as w,b as y,dj as g,b7 as p,k as h,N as u,O as l,j as e,F as m,b6 as k,df as x,dh as R}from"./index-NcPpBRAY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="0bf130d6-6b82-48af-8301-039b9daadff6",s._sentryDebugIdIdentifier="sentry-dbid-0bf130d6-6b82-48af-8301-039b9daadff6")}catch{}})();function I(){var a,i,d,f;const{tenant:s}=w({from:y.tenantRoute.to}),n=g({href:p.v1.quickstart.href,description:"Learn about running tasks"}),o=h.useMemo(()=>new Date(Date.now()-1440*60*1e3).toISOString(),[]),t=u(l.workflows.list(s,{limit:1,offset:0})),r=u(l.v1WorkflowRuns.list(s,{limit:1,offset:0,since:o,only_tasks:!1}));if(t.isLoading||r.isLoading)return e.jsx(m,{});const c=(((i=(a=t.data)==null?void 0:a.rows)==null?void 0:i.length)??0)>0,b=(((f=(d=r.data)==null?void 0:d.rows)==null?void 0:f.length)??0)>0;return!(t.isError||r.isError)&&!c&&!b?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(k,{title:"No runs found",description:"Runs are individual executions of your tasks and workflows. Dispatch a task to see runs appear here.",actions:n})}):e.jsx("div",{className:"size-full flex-grow",children:e.jsx(x,{tableKey:"workflow-runs-main",persistColumnVisibilityKey:"workflow-runs-main",children:e.jsx(R,{})})})}export{I as default}; diff --git a/hatchetembed/dashboard/assets/index-CgoYnKU8.js b/hatchetembed/dashboard/assets/index-CgoYnKU8.js deleted file mode 100644 index 0fc96d46fd..0000000000 --- a/hatchetembed/dashboard/assets/index-CgoYnKU8.js +++ /dev/null @@ -1 +0,0 @@ -import{h as r,j as a,b as s,q as o,bS as u,f as d,r as f}from"./index-NcPpBRAY.js";import{I as l}from"./invite-modal-CIZIW_VD.js";import{p as c}from"./use-pending-invites-DdxsIf8r.js";import"./use-analytics-Jv1fF8RR.js";import"./tenant-wrapper-CsXNqzkl.js";import"./member-primitives-r9nHLQI3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="31c3123a-5283-4b97-b6b2-45be11f7f99c",e._sentryDebugIdIdentifier="sentry-dbid-31c3123a-5283-4b97-b6b2-45be11f7f99c")}catch{}})();async function I(e){const[{isCloudEnabled:t},{isControlPlaneEnabled:n}]=await Promise.all([o.fetchQuery(u),d()]),{inviteCount:i}=await o.fetchQuery(c(t,n));if(i===0)throw f({to:s.authenticatedRoute.to})}function v(){const e=r();return a.jsx("div",{className:"flex min-h-full flex-1 items-center justify-center",children:a.jsx(l,{isOpen:!0,onClose:()=>e({to:s.authenticatedRoute.to})})})}export{v as default,I as loader}; diff --git a/hatchetembed/dashboard/assets/index-CgrU27uR.js b/hatchetembed/dashboard/assets/index-CgrU27uR.js deleted file mode 100644 index a2f6aa309c..0000000000 --- a/hatchetembed/dashboard/assets/index-CgrU27uR.js +++ /dev/null @@ -1,8 +0,0 @@ -import{v as Tt,k as i,aX as Et,aY as Mt,aZ as He,a_ as Dt,a$ as Qs,b0 as At,b1 as $s,b2 as We,b3 as Lt,b4 as Rt,y as nt,b5 as Ce,N as $,j as e,S as Xe,h as ps,b6 as ne,b as gs,ab as Ve,b7 as zt,b8 as Ks,b9 as at,s as q,ba as _,o as js,bb as rt,G as ke,p as ee,_ as we,$ as Te,a0 as Ee,a1 as Me,bc as Ue,bd as Ot,B as b,A as Ut,d as Pt,L as V,I as W,be as Ft,bf as It,bg as Gt,bh as qt,bi as Qt,c as ms,P as Ae,a3 as J,l as _e,a6 as me,a7 as he,a8 as xe,a9 as fe,aa as H,bj as Ne,ak as Le,ai as Re,al as ze,am as Z,J as Pe,u as $t,bk as Ke,t as Kt,bl as vs,bm as Vt,bn as _t,bo as Bt,a2 as Ht,bp as Wt,C as Yt,bq as it,br as Xt,bs as Ye,bt as Vs,F as hs,aq as _s,m as Jt,bu as Zt,bv as en,bw as sn,aM as ot,aN as lt,aO as ct,aP as dt}from"./index-NcPpBRAY.js";import{R as fs,M as Bs,f as Hs}from"./member-primitives-r9nHLQI3.js";import{S as ut}from"./settings-page-header-CkCZd3CN.js";import{S as Ws}from"./settings-row-D2iLPMr6.js";import{T as tn}from"./tenant-region-badge-C-bbxnQA.js";import{S as mt}from"./switch-C9IBAXBS.js";import{T as ue,O as nn}from"./data-contracts-C0lcHVTf.js";import{g as ys}from"./global-emitter-kjRqhIKI.js";import{f as an,s as rn}from"./shard-deployment-key-in4ZPoWA.js";import{D as on}from"./docs-button-Mn8SLZkH.js";import{S as ln}from"./shield-check-jS3YzcEA.js";import{I as es}from"./inline-error-BRPaHH6l.js";import{F as Se}from"./XMarkIcon-q_Tj_COY.js";import{C as bs}from"./confirm-dialog-Bv8agSqW.js";import{F as cn}from"./KeyIcon-szjQ8KFq.js";import{F as ht}from"./ExclamationTriangleIcon-Okie-gQE.js";import{F as xt}from"./PlusIcon-ChBf4T_m.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="50a12698-1b10-42df-aea3-4dfa99f6e590",s._sentryDebugIdIdentifier="sentry-dbid-50a12698-1b10-42df-aea3-4dfa99f6e590")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dn=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ss=Tt("loader-circle",dn);function un({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const mn=i.forwardRef(un);function hn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"}))}const Oe=i.forwardRef(hn);function xn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const Je=i.forwardRef(xn);function fn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}const pn=i.forwardRef(fn);function gn({title:s,titleId:t,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),s?i.createElement("title",{id:t},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const pe=i.forwardRef(gn);function jn(s){return Et(s,Date.now())}function vn(s,t,n){const r=Rt(),o=(n==null?void 0:n.locale)??r.locale??At,l=2520,d=Mt(s,t);if(isNaN(d))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:d});let g,v;d>0?(g=He(t),v=He(s)):(g=He(s),v=He(t));const y=Dt(v,g),h=(Qs(v)-Qs(g))/1e3,x=Math.round((y-h)/60);let m;if(x<2)return x===0?o.formatDistance("lessThanXMinutes",1,u):o.formatDistance("xMinutes",x,u);if(x<45)return o.formatDistance("xMinutes",x,u);if(x<90)return o.formatDistance("aboutXHours",1,u);if(x<$s){const N=Math.round(x/60);return o.formatDistance("aboutXHours",N,u)}else{if(x" \\ - "${t}?limit=100"`;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Endpoint"}),e.jsx(Ks,{language:"text",code:t,wrapLines:!1}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Requests must be authenticated with a Management Token (sent as a Bearer token). Create one in the"," ",e.jsx("span",{className:"font-medium text-foreground",children:"Management Tokens"})," ","tab, then call this endpoint to retrieve your organization's audit logs."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Example request"}),e.jsx(Ks,{language:"text",code:n})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Query parameters"}),e.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"tenant"})," — optional tenant ID to scope results to a single tenant"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"limit"})," — max rows to return (default 1000, max 1000)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"offset"})," — number of rows to skip for pagination (default 0)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"since"})," — RFC3339 timestamp for the start of the range (default 24 hours ago)"]}),e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:"until"})," — RFC3339 timestamp for the end of the range (default now)"]})]})]})]})}function Cn({orgId:s}){return e.jsxs("div",{children:[e.jsx(bn,{title:"Audit Log",description:"Retrieve an immutable record of actions taken across your organization's tenants for compliance and security review."}),e.jsx(Ve,{className:"my-4"}),e.jsx(Sn,{orgId:s}),e.jsx(Ve,{className:"my-6"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx(on,{doc:zt.v1.security["audit-logs"],label:"audit logs documentation",variant:"text"})," ","for the full response schema and details."]})]})}function kn({orgId:s}){const t=ps();return e.jsx("div",{className:"py-12",children:e.jsx(ne,{graphic:e.jsx("div",{className:"rounded-full bg-primary/10 p-3",children:e.jsx(pn,{className:"h-8 w-8 text-primary"})}),title:"Unlock Audit Logs",description:"Audit logs give you an immutable record of actions taken across your organization's tenants for compliance and security review. Upgrade your plan to enable this feature.",buttons:[{label:"View plans",onClick:()=>t({to:gs.organizationBillingRoute.to,params:{organization:s}})}]})})}const ae={Okta:{displayName:"Okta",defaultForm:{provider:"Okta",clientId:"",clientSecret:"",ssoDomain:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/okta"},MicrosoftEntra:{displayName:"Microsoft Entra",defaultForm:{provider:"MicrosoftEntra",clientId:"",clientSecret:"",tenantId:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/entra"},Google:{displayName:"Google",defaultForm:{provider:"Google",clientId:"",clientSecret:"",authUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userinfoUrl:"https://openidconnect.googleapis.com/v1/userinfo",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/google"},OneLogin:{displayName:"OneLogin",defaultForm:{provider:"OneLogin",clientId:"",clientSecret:"",authUrl:"",tokenUrl:"",userinfoUrl:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/onelogin"},JumpCloud:{displayName:"JumpCloud",defaultForm:{provider:"JumpCloud",clientId:"",clientSecret:"",authUrl:"https://oauth.id.jumpcloud.com/oauth2/auth",tokenUrl:"https://oauth.id.jumpcloud.com/oauth2/token",userinfoUrl:"https://oauth.id.jumpcloud.com/userinfo",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/jumpcloud"},Generic:{displayName:"Generic",defaultForm:{provider:"Generic",clientId:"",clientSecret:"",authUrl:"",tokenUrl:"",userinfoUrl:"",usesPkce:!0},docsUrl:"https://docs.byo.propelauth.com/sso/example-setup-guides/overview"}},Fe=js({clientId:q().min(1,"Client ID is required"),clientSecret:q().min(1,"Client Secret is required"),usesPkce:rt()}),Ie=js({clientId:q().min(1,"Client ID is required"),clientSecret:q().optional(),usesPkce:rt()}),wn=Fe.extend({provider:_("Okta"),ssoDomain:q().min(1,"SSO Domain is required")}),Tn=Fe.extend({provider:_("MicrosoftEntra"),tenantId:q().min(1,"Tenant ID is required")}),ts={authUrl:q().url("Must be a valid URL"),tokenUrl:q().url("Must be a valid URL"),userinfoUrl:q().url("Must be a valid URL")},En=Fe.extend({provider:_("Generic"),...ts}),Mn=Fe.extend({provider:_("Google"),...ts}),Dn=Fe.extend({provider:_("OneLogin"),...ts}),An=Fe.extend({provider:_("JumpCloud"),...ts}),Ln=Ie.extend({provider:_("Okta"),ssoDomain:q().min(1,"SSO Domain is required")}),Rn=Ie.extend({provider:_("MicrosoftEntra"),tenantId:q().min(1,"Tenant ID is required")}),ns={authUrl:q().url("Must be a valid URL"),tokenUrl:q().url("Must be a valid URL"),userinfoUrl:q().url("Must be a valid URL")},zn=Ie.extend({provider:_("Generic"),...ns}),On=Ie.extend({provider:_("Google"),...ns}),Un=Ie.extend({provider:_("OneLogin"),...ns}),Pn=Ie.extend({provider:_("JumpCloud"),...ns}),Ys=at("provider",[wn,Tn,En,Mn,Dn,An]),Xs=at("provider",[Ln,Rn,zn,On,Un,Pn]);var K=(s=>(s[s.ProviderSelection=1]="ProviderSelection",s[s.Configuration=2]="Configuration",s))(K||{});function Fn(s,t){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(s).then(()=>t==null?void 0:t())}function In(s){return{async get(){return s!=null&&s.get?s.get():(console.error("SsoSetup: api.get not implemented. Pass an `api` prop to implement."),{ok:!0,data:{}})},async upsert(t){if(s!=null&&s.upsert)return s.upsert(t);const n="SsoSetup: api.upsert not implemented. Pass an `api` prop to implement.";return console.error(n),{ok:!1,error:{message:n}}},async remove(){if(s!=null&&s.remove)return s.remove();const t="SsoSetup: api.remove not implemented. Pass an `api` prop to implement.";return console.warn(t),{ok:!1,error:{message:t}}}}}function Js(s){return s.idpType==="Okta"?"Okta":s.idpType==="MicrosoftEntra"?"MicrosoftEntra":"Generic"}function Zs(s,t){return t.idpType==="Okta"?{provider:"Okta",clientId:t.clientId||"",clientSecret:t.clientSecret||"",ssoDomain:t.ssoDomain||"",usesPkce:t.usesPkce??!0}:t.idpType==="MicrosoftEntra"?{provider:"MicrosoftEntra",clientId:t.clientId||"",clientSecret:t.clientSecret||"",tenantId:t.tenantId||"",usesPkce:t.usesPkce??!0}:{provider:s==="Generic"||s==="Google"||s==="OneLogin"||s==="JumpCloud"?s:"Generic",clientId:t.clientId||"",clientSecret:t.clientSecret||"",authUrl:t.authUrl||"",tokenUrl:t.tokenUrl||"",userinfoUrl:t.userinfoUrl||"",usesPkce:t.usesPkce??!0}}function Gn(s){if(s.provider==="Okta")return{idpType:"Okta",clientId:s.clientId,clientSecret:s.clientSecret||void 0,ssoDomain:s.ssoDomain,usesPkce:s.usesPkce};if(s.provider==="MicrosoftEntra")return{idpType:"MicrosoftEntra",clientId:s.clientId,clientSecret:s.clientSecret||void 0,tenantId:s.tenantId,usesPkce:s.usesPkce};{const t=s;return{idpType:"Generic",clientId:t.clientId,clientSecret:t.clientSecret||void 0,authUrl:t.authUrl,tokenUrl:t.tokenUrl,userinfoUrl:t.userinfoUrl,usesPkce:t.usesPkce}}}const ft=i.createContext(null);function qn({children:s,api:t,redirectUrl:n,onSave:r,onDelete:o,onConfigLoaded:l}){const[d,u]=i.useState("Generic"),[g,v]=i.useState(()=>ae.Generic.defaultForm),[y,h]=i.useState(K.ProviderSelection),[x,m]=i.useState(null),[N,c]=i.useState(!1),[p,S]=i.useState(null),[T,R]=i.useState(!1),[z,E]=i.useState(!1),[j,C]=i.useState(!1),D=i.useMemo(()=>In(t),[t]),k=ke(),{isLoading:U,data:L}=$({queryKey:["sso-config"],queryFn:()=>D.get(),staleTime:1/0}),[I,re]=i.useState(!1);if(!I&&L){if(L.ok&&L.data.idpInfoFromCustomer){const M=L.data.idpInfoFromCustomer;S(M);const O=Js(M);u(O),v(Zs(O,M)),h(K.Configuration)}re(!0)}i.useEffect(()=>{if(I&&L){const M=!!(L.ok&&L.data.idpInfoFromCustomer);l==null||l(M)}},[I,L]);const B=ee({mutationFn:M=>D.upsert({idpInfoFromCustomer:M}),onSuccess:(M,O)=>{var X;M.ok?(k.invalidateQueries({queryKey:["sso-config"]}),S(O),c(!1),r==null||r(O),C(!1)):m(((X=M.error)==null?void 0:X.message)||"Failed to save")}}),Q=ee({mutationFn:()=>D.remove(),onSuccess:M=>{var O;M.ok?(k.invalidateQueries({queryKey:["sso-config"]}),S(null),o==null||o(),Ge(),C(!1)):m(((O=M.error)==null?void 0:O.message)||"Failed to delete")}}),ie=B.isPending,Y=Q.isPending;function P(M,O){v(X=>({...X,[M]:O})),c(!0)}function w(){m(null),R(!0);const O=(p?Xs:Ys).safeParse(g);O.success&&B.mutate(Gn(O.data))}function G(){m(null),Q.mutate()}const F={};if(T){const O=(p?Xs:Ys).safeParse(g);if(!O.success)for(const X of O.error.issues)F[X.path.join(".")]=X.message}const f=M=>{p||(u(M),v(ae[M].defaultForm),h(K.Configuration))},oe=()=>{h(K.ProviderSelection),R(!1),m(null)},De=()=>{if(h(p?K.Configuration:K.ProviderSelection),c(!1),R(!1),m(null),E(!1),p){const M=Js(p);u(M),v(Zs(M,p))}else u("Generic"),v(ae.Generic.defaultForm)},Ge=()=>{h(K.ProviderSelection),c(!1),R(!1),m(null),E(!1),u("Generic"),v(ae.Generic.defaultForm)},as={provider:d,form:g,step:y,loading:U,saving:ie,deleting:Y,apiError:x,hasUnsavedChanges:N,idpConfiguration:p,redirectUrl:n,errors:F,showDeleteConfirm:z,setShowDeleteConfirm:E,isOpen:j,setIsOpen:C,onChange:P,onSave:w,onDelete:G,handleProviderSelect:f,handleBack:oe,reset:De};return e.jsx(ft.Provider,{value:as,children:s})}function ge(){const s=i.useContext(ft);if(!s)throw new Error("useSsoSetupContext must be used within a SsoSetupProvider");return s}function pt(){const{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:o,idpConfiguration:l}=ge();return{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:o,hasExistingConfig:!!l}}function Qn(){const{step:s,provider:t}=ge();return{step:s,provider:t}}function $n(){const{step:s,form:t,errors:n,onChange:r,redirectUrl:o}=ge();return{step:s,form:t,errors:n,onChange:r,redirectUrl:o}}function Kn(){const{step:s,idpConfiguration:t,saving:n,handleBack:r,onSave:o,setShowDeleteConfirm:l}=ge();return{step:s,existing:t,saving:n,onBack:r,onSave:o,onDeleteClick:()=>l(!0)}}function Vn(){const{handleProviderSelect:s}=ge();return{onProviderSelect:s}}function _n(){const{form:s,errors:t,onChange:n,idpConfiguration:r}=ge();return{form:s,errors:t,onChange:n,isEditMode:!!r}}function Bn(){const{showDeleteConfirm:s,setShowDeleteConfirm:t,onDelete:n,deleting:r,provider:o}=ge();return{open:s,onOpenChange:t,onConfirm:n,deleting:r,providerName:ae[o].displayName}}function Hn(){const{apiError:s}=ge();return{message:s}}function Wn(){const{open:s,onOpenChange:t,onConfirm:n,deleting:r,providerName:o}=Bn();return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{children:[e.jsxs(Ee,{children:[e.jsx(Me,{children:"Delete SSO Configuration?"}),e.jsxs(Ue,{children:["This will permanently delete the SSO configuration for"," ",e.jsx("strong",{children:o}),". This action cannot be undone."]})]}),e.jsxs(Ot,{children:[e.jsx(b,{variant:"outline",onClick:()=>t(!1),disabled:r,children:"Cancel"}),e.jsx(b,{variant:"destructive",onClick:n,disabled:r,children:r?e.jsxs(e.Fragment,{children:[e.jsx(ss,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):"Delete Configuration"})]})]})})}function Yn(){const{message:s}=Hn();return s?e.jsx(Ut,{variant:"destructive",children:e.jsx(Pt,{children:s})}):null}function Xn(){const{onProviderSelect:s}=Vn(),t=Object.keys(ae);return e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(n=>e.jsx(b,{type:"button",onClick:()=>s(n),className:"cursor-pointer",children:e.jsx("span",{className:"font-medium",children:ae[n].displayName})},n))})}function Jn(){return e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsxs("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:[e.jsx(ss,{className:"mr-2 h-4 w-4 animate-spin"})," Loading…"]})})}function de({label:s,htmlFor:t,children:n,required:r}){return e.jsxs("div",{className:"grid gap-1.5",children:[e.jsxs(V,{htmlFor:t,children:[s," ",r&&e.jsx("span",{className:"text-destructive",children:"*"})]}),n]})}function Zn({children:s}){return s?e.jsx("p",{className:"text-xs text-destructive",children:s}):null}function ye({id:s,type:t="text",placeholder:n,value:r,onChange:o,error:l,readOnly:d,autoComplete:u,...g}){return e.jsxs(e.Fragment,{children:[e.jsx(W,{id:s,type:t,placeholder:n,value:r,onChange:v=>o(v.target.value),readOnly:d,autoComplete:u,...g}),l&&e.jsx(Zn,{children:l})]})}function xs({checked:s,onChange:t}){return e.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-xl border p-3",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-sm font-medium",children:"Use PKCE"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Recommended."})]}),e.jsx(mt,{checked:s,onCheckedChange:t})]})}function ea(){const{form:s,errors:t,onChange:n,isEditMode:r}=_n(),o=e.jsxs(e.Fragment,{children:[e.jsx(de,{label:"Client ID",htmlFor:"clientId",required:!0,children:e.jsx(ye,{id:"clientId",placeholder:"client_id",value:s.clientId,onChange:l=>n("clientId",l),error:t.clientId,readOnly:r,autoComplete:"off","data-1p-ignore":!0,"data-bwignore":!0,"data-lpignore":"true","data-protonpass-ignore":"true","data-form-type":"other"})}),e.jsx(de,{label:"Client Secret",htmlFor:"clientSecret",required:!r,children:e.jsx(ye,{id:"clientSecret",type:"password",placeholder:r?"Leave empty to keep existing":"••••••••",value:s.clientSecret,onChange:l=>n("clientSecret",l),error:t.clientSecret,autoComplete:"off","data-1p-ignore":!0,"data-bwignore":!0,"data-lpignore":"true","data-protonpass-ignore":"true","data-form-type":"other"})})]});return s.provider==="Okta"?e.jsxs(e.Fragment,{children:[e.jsx(de,{label:"SSO Domain",htmlFor:"ssoDomain",required:!0,children:e.jsx(ye,{id:"ssoDomain",placeholder:"example.okta.com",value:s.ssoDomain||"",onChange:l=>n("ssoDomain",l),error:t.ssoDomain})}),o,e.jsx(xs,{checked:s.usesPkce,onChange:l=>n("usesPkce",l)})]}):s.provider==="MicrosoftEntra"?e.jsxs(e.Fragment,{children:[e.jsx(de,{label:"Tenant ID",htmlFor:"tenantId",required:!0,children:e.jsx(ye,{id:"tenantId",placeholder:"00000000-0000-0000-0000-000000000000",value:s.tenantId||"",onChange:l=>n("tenantId",l),error:t.tenantId})}),o,e.jsx(xs,{checked:s.usesPkce,onChange:l=>n("usesPkce",l)})]}):e.jsxs(e.Fragment,{children:[o,e.jsx(de,{label:"Authorize URL",htmlFor:"authUrl",required:!0,children:e.jsx(ye,{id:"authUrl",placeholder:"https://.../authorize",value:s.authUrl||"",onChange:l=>n("authUrl",l),error:t.authUrl})}),e.jsx(de,{label:"Token URL",htmlFor:"tokenUrl",required:!0,children:e.jsx(ye,{id:"tokenUrl",placeholder:"https://.../token",value:s.tokenUrl||"",onChange:l=>n("tokenUrl",l),error:t.tokenUrl})}),e.jsx(de,{label:"Userinfo URL",htmlFor:"userinfoUrl",required:!0,children:e.jsx(ye,{id:"userinfoUrl",placeholder:"https://.../userinfo",value:s.userinfoUrl||"",onChange:l=>n("userinfoUrl",l),error:t.userinfoUrl})}),e.jsx(xs,{checked:s.usesPkce,onChange:l=>n("usesPkce",l)})]})}function sa({redirectUrl:s}){const[t,n]=i.useState(!1);return e.jsx(de,{label:"Redirect / Callback URL",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{readOnly:!0,value:s,tabIndex:-1}),e.jsx(b,{type:"button",size:"sm",onClick:()=>{Fn(s,()=>{n(!0),setTimeout(()=>n(!1),500)})},className:"shrink-0 cursor-pointer",children:t?e.jsx(Ft,{className:"h-4 w-4"}):e.jsx(It,{className:"h-4 w-4"})})]})})}function ta({redirectUrl:s,api:t,onConfigLoaded:n}){return e.jsx(qn,{redirectUrl:s,api:t,onConfigLoaded:n,children:e.jsx(na,{})})}function na(){const{loading:s,hasUnsavedChanges:t,reset:n,isOpen:r,setIsOpen:o,hasExistingConfig:l}=pt(),d=u=>{!u&&t?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(o(!1),n()):o(u)};return e.jsxs(we,{open:r,onOpenChange:d,modal:!0,children:[e.jsx(Gt,{asChild:!0,children:e.jsxs(b,{variant:"outline",disabled:s,className:"cursor-pointer",children:[s?e.jsx(ss,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(ln,{className:"mr-2 h-4 w-4"}),s?"Loading...":l?"Edit SSO Config":"Set up SSO"]})}),e.jsxs(Te,{className:"!max-w-[80vw] max-h-[90vh] overflow-y-auto sm:!max-w-[600px]",children:[e.jsxs(qt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(Qt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),e.jsx(aa,{})]})]})}function aa(){const{loading:s}=pt();return s?e.jsx(Jn,{}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(ra,{}),e.jsx(ia,{}),e.jsx(oa,{}),e.jsx(Wn,{})]})}function ra(){const{step:s,provider:t}=Qn();return e.jsxs(Ee,{children:[e.jsxs(Me,{children:["Set up Enterprise SSO",s===K.Configuration&&` - ${ae[t].displayName}`]}),s===K.ProviderSelection&&e.jsx(Ue,{children:"Choose your Identity Provider to get started."}),s===K.Configuration&&e.jsxs(Ue,{children:["Follow"," ",e.jsx("a",{href:ae[t].docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"these instructions"})," ","to set up your Identity Provider and create an OAuth/OIDC application."]})]})}function ia(){const{step:s,redirectUrl:t}=$n();return e.jsx("div",{className:"space-y-6",children:s===K.ProviderSelection?e.jsx("div",{className:"grid gap-4",children:e.jsx(Xn,{})}):e.jsxs("div",{className:"grid gap-4",children:[e.jsx(sa,{redirectUrl:t}),e.jsx(ea,{}),e.jsx(Yn,{})]})})}function oa(){const{step:s,existing:t,saving:n,onBack:r,onSave:o,onDeleteClick:l}=Kn();return s!==K.Configuration?null:e.jsxs("div",{className:"flex w-full items-center justify-between mt-6",children:[!t&&e.jsx(b,{onClick:r,className:"cursor-pointer",children:"Back"}),e.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[t&&e.jsx(b,{variant:"destructive",onClick:l,className:"cursor-pointer",children:"Delete"}),e.jsxs(b,{onClick:o,disabled:n,className:"cursor-pointer",children:[n&&e.jsx(ss,{className:"mr-2 h-4 w-4 animate-spin"}),t?"Save changes":"Create OIDC client"]})]})]})}function la(s){return{async get(){try{return{ok:!0,data:(await ms.ssoList(s)).data}}catch(t){return t instanceof Ae?{ok:!1,error:{status:t.status,message:t.message}}:{ok:!1,error:{message:"unspecified error"}}}},async upsert(t){try{return await ms.ssoUpdate(s,t),{ok:!0,data:void 0}}catch(n){return n instanceof Ae?{ok:!1,error:{status:n.status,message:n.message}}:{ok:!1,error:{message:"unspecified error"}}}},async remove(){try{return await ms.ssoDelete(s),{ok:!0,data:void 0}}catch(t){return t instanceof Ae?{ok:!1,error:{status:t.status,message:t.message}}:{ok:!1,error:{message:"unspecified error"}}}}}}function ca({orgId:s,onConfigLoaded:t}){const n=i.useMemo(()=>la(s),[s]);return e.jsx(ta,{redirectUrl:`${window.location.origin}/api/v1/control-plane/users/sso/callback`,api:n,onConfigLoaded:t})}function Ze({tag:s}){return e.jsx(J,{variant:"secondary",className:"flex-shrink-0 text-xs",children:s})}function da({tags:s}){const t=i.useRef(null),n=i.useRef(null),[r,o]=i.useState(s.length);i.useLayoutEffect(()=>{const u=t.current,g=n.current;if(!u||!g)return;const v=()=>{const h=u.clientWidth;if(h===0)return;const x=Array.from(g.children),m=4,N=20;let c=0,p=0;for(let S=0;S0?m:0),R=S===x.length-1;if(c+T+(R?0:N)>h)break;c+=T,p++}o(p)};v();const y=new ResizeObserver(v);return y.observe(u),()=>y.disconnect()},[s]);const l=Math.min(r,s.length),d=le.jsx(Ze,{tag:u},`m-${g}`))}),e.jsxs("div",{className:"flex flex-nowrap items-center gap-1",children:[s.slice(0,l).map((u,g)=>e.jsx(Ze,{tag:u},g)),d&&e.jsx("span",{className:"flex-shrink-0 text-xs text-muted-foreground",children:"…"})]})]})}function ua({open:s,onOpenChange:t,organizationId:n,allTenantTags:r=[]}){const o=Ce(),l=ke(),[d,u]=i.useState([]),{handleApiError:g}=_e({setErrors:u}),[v,y]=i.useState(""),[h,x]=i.useState(ue.MEMBER),[m,N]=i.useState([]),[c,p]=i.useState(""),S=i.useMemo(()=>r.filter(j=>!m.includes(j)),[r,m]),T=j=>{const C=j.trim();!C||m.includes(C)||N(D=>[...D,C])},R=j=>N(C=>C.filter(D=>D!==j)),z=ee({mutationKey:["organization:user-groups:create",n],mutationFn:async j=>{var D;const C=await o.userGroupCreateMutation(n).mutationFn({name:j.name,role:j.role});return j.tags.length>0&&((D=C==null?void 0:C.metadata)!=null&&D.id)&&await o.userGroupTagsSetMutation(n,C.metadata.id).mutationFn(j.tags),C},onSuccess:()=>{l.invalidateQueries({queryKey:["organization:user-groups:list",n]}),y(""),x(ue.MEMBER),N([]),p(""),t(!1)},onError:g}),E=z.isPending;return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{className:"max-w-md",children:[e.jsxs(Ee,{children:[e.jsx(Me,{children:"Create User Group"}),e.jsx(Ue,{children:"User groups associate tags and a tenant role with a set of org members."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(es,{errors:d}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"group-name",children:"Name"}),e.jsx(W,{id:"group-name",value:v,onChange:j=>y(j.target.value),placeholder:"e.g. Engineers",disabled:E})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"group-role",children:"Tenant role"}),e.jsxs(me,{value:h,onValueChange:j=>x(j),disabled:E,children:[e.jsx(he,{id:"group-role",children:e.jsx(xe,{})}),e.jsxs(fe,{children:[e.jsx(H,{value:ue.MEMBER,children:"Member"}),e.jsx(H,{value:ue.ADMIN,children:"Admin"}),e.jsx(H,{value:ue.OWNER,children:"Owner"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Tags"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Members of this group get access to tenants with matching tags."}),m.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:m.map(j=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[j,e.jsx("button",{type:"button",onClick:()=>R(j),disabled:E,className:"text-muted-foreground hover:text-foreground focus:outline-none",children:e.jsx(Se,{className:"size-3"})})]},j))}),S.length>0&&e.jsxs(me,{value:"",onValueChange:j=>T(j),disabled:E,children:[e.jsx(he,{className:"text-muted-foreground",children:e.jsx(xe,{placeholder:"Add an existing tag"})}),e.jsx(fe,{children:S.map(j=>e.jsx(H,{value:j,children:j},j))})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(W,{value:c,onChange:j=>p(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),T(c),p(""))},placeholder:"Or create a new tag",disabled:E}),e.jsx(b,{type:"button",variant:"outline",onClick:()=>{T(c),p("")},disabled:E||!c.trim(),children:"Add"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(b,{variant:"outline",onClick:()=>t(!1),disabled:E,children:"Cancel"}),e.jsx(b,{onClick:()=>z.mutate({name:v,role:h,tags:m}),disabled:E||!v.trim(),children:E?"Creating...":"Create Group"})]})]})]})})}function ma({open:s,onOpenChange:t,organizationId:n,group:r,allOrgMembers:o,allTenantTags:l}){var F;const d=Ce(),u=ke(),[g,v]=i.useState([]),{handleApiError:y}=_e({setErrors:v}),h=r.metadata.id,[x,m]=i.useState(r.name),[N,c]=i.useState(r.role),[p,S]=i.useState(r.tags);i.useEffect(()=>{s&&(m(r.name),c(r.role),S(r.tags))},[s,r]);const T=$({...d.userGroupMembersListQuery(n,h),enabled:s}),R=i.useCallback(()=>{u.invalidateQueries({queryKey:["organization:user-groups:list",n]}),u.invalidateQueries({queryKey:["organization:user-group:members:list",n,h]})},[u,n,h]),z=ee({...d.userGroupUpdateMutation(n,h),onSuccess:R,onError:y}),E=ee({...d.userGroupTagsSetMutation(n,h),onSuccess:R,onError:y}),j=ee({...d.userGroupMemberAddMutation(n,h),onSuccess:()=>{u.invalidateQueries({queryKey:["organization:user-group:members:list",n,h]})},onError:y}),C=ee({...d.userGroupMemberRemoveMutation(n,h),onSuccess:()=>{u.invalidateQueries({queryKey:["organization:user-group:members:list",n,h]})},onError:y}),D=((F=T.data)==null?void 0:F.rows)??[],k=new Set(D.map(f=>f.metadata.id)),U=o.filter(f=>!k.has(f.metadata.id)),L=l.filter(f=>!p.includes(f)),I=f=>S(oe=>[...oe,f]),re=f=>S(oe=>oe.filter(De=>De!==f)),B=i.useCallback(f=>z.mutateAsync(f),[z]),Q=i.useCallback(f=>E.mutateAsync(f),[E]),ie=i.useCallback(f=>j.mutate(f),[j]),Y=i.useCallback(f=>C.mutate(f),[C]),P=z.isPending||E.isPending,w=j.isPending||C.isPending,G=i.useCallback(async()=>{try{await Promise.all([B({name:x.trim()||void 0,role:N}),Q(p)]),t(!1)}catch{}},[B,Q,x,N,p,t]);return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{className:"max-w-lg",children:[e.jsx(Ee,{children:e.jsx(Me,{children:"Edit User Group"})}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(es,{errors:g}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"edit-group-name",children:"Name"}),e.jsx(W,{id:"edit-group-name",value:x,onChange:f=>m(f.target.value),disabled:P})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"edit-group-role",children:"Tenant role"}),e.jsxs(me,{value:N,onValueChange:f=>c(f),disabled:P,children:[e.jsx(he,{id:"edit-group-role",children:e.jsx(xe,{})}),e.jsxs(fe,{children:[e.jsx(H,{value:ue.MEMBER,children:"MEMBER"}),e.jsx(H,{value:ue.ADMIN,children:"ADMIN"}),e.jsx(H,{value:ue.OWNER,children:"OWNER"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Tags"}),p.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(f=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[f,e.jsx("button",{type:"button",onClick:()=>re(f),disabled:P,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${f}`,children:e.jsx(Se,{className:"size-3.5"})})]},f))}),L.length>0?e.jsxs(me,{onValueChange:I,disabled:P,value:"",children:[e.jsx(he,{children:e.jsx(xe,{placeholder:"Add a tag…"})}),e.jsx(fe,{children:L.map(f=>e.jsx(H,{value:f,children:f},f))})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l.length===0?"No tags exist on any tenant yet.":"All available tags have been added."}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Members in this group get access to tenants whose tags are a subset of these tags."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Members"}),T.isLoading?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs("div",{className:"space-y-1 rounded-md border p-2",children:[D.length===0&&e.jsx("p",{className:"py-2 text-center text-sm text-muted-foreground",children:"No members yet."}),D.map(f=>e.jsxs("div",{className:"flex items-center justify-between rounded px-2 py-1 hover:bg-muted/30",children:[e.jsx("span",{className:"font-mono text-sm",children:f.email}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>Y(f.metadata.id),disabled:w,children:e.jsx(pe,{className:"size-3.5 text-destructive"})})]},f.metadata.id))]}),U.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add member:"}),e.jsxs(me,{onValueChange:ie,disabled:w,value:"",children:[e.jsx(he,{children:e.jsx(xe,{placeholder:"Select a member to add..."})}),e.jsx(fe,{children:U.map(f=>e.jsxs(H,{value:f.metadata.id,children:[f.email," ",e.jsx(J,{variant:"outline",className:"ml-1 text-xs",children:f.role})]},f.metadata.id))})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(b,{onClick:G,disabled:P,children:P?"Saving...":"Save"})})]})]})})}function ha({organizationId:s,allOrgMembers:t,allTenantTags:n}){const r=Ce(),o=ke(),{handleApiError:l}=_e({}),[d,u]=i.useState(!1),[g,v]=i.useState(null),y=$({...r.userGroupsListQuery(s)}),h=y.data??[],x=[{columnLabel:"Name",cellRenderer:m=>e.jsx("span",{className:"font-medium",children:m.name})},{columnLabel:"Tenant Role",cellRenderer:m=>e.jsx(fs,{role:m.role})},{columnLabel:"Tags",cellRenderer:m=>m.tags.length>0?e.jsx("div",{className:"flex flex-wrap gap-1",children:m.tags.map(N=>e.jsx(Ze,{tag:N},N))}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})},{columnLabel:"Members",cellRenderer:m=>e.jsx("span",{className:"text-sm",children:m.memberCount})},{columnLabel:"Actions",cellRenderer:m=>e.jsx(xa,{group:m,organizationId:s,onEdit:v,onDeleted:()=>o.invalidateQueries({queryKey:["organization:user-groups:list",s]}),onError:l})}];return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold",children:"User Groups"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"User groups allow you to automatically add team members to tenants based on tags."})]}),e.jsx(b,{className:"shrink-0",onClick:()=>u(!0),children:"New Group"})]}),e.jsx(Ve,{}),y.isLoading?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Loading..."}):h.length>0?e.jsx(Ne,{data:h,columns:x,rowKey:m=>m.metadata.id}):e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"No user groups",description:"User groups let you grant a set of organization members access to tenants by tag. Create a group to get started."})}),e.jsx(ua,{open:d,onOpenChange:u,organizationId:s,allTenantTags:n}),g&&e.jsx(ma,{open:!!g,onOpenChange:m=>!m&&v(null),organizationId:s,group:g,allOrgMembers:t,allTenantTags:n})]})}function xa({group:s,organizationId:t,onEdit:n,onDeleted:r,onError:o}){const l=Ce(),d=ee({...l.userGroupDeleteMutation(t,s.metadata.id),onSuccess:r,onError:o}),u=i.useCallback(()=>d.mutate(),[d]),g=d.isPending;return e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsxs(ze,{align:"end",children:[e.jsxs(Z,{onClick:()=>n(s),children:[e.jsx(Je,{className:"mr-2 size-4"}),"Edit"]}),e.jsxs(Z,{className:"text-destructive",onClick:u,disabled:g,children:[e.jsx(pe,{className:"mr-2 size-4"}),"Delete"]})]})]})}function fa({open:s,onOpenChange:t,invite:n,organizationName:r,onSuccess:o}){const{handleCancelInvite:l,cancelInviteLoading:d}=Pe();return n?e.jsx(bs,{isOpen:s,title:"Cancel Invitation",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to cancel the invitation for"," ",e.jsx("strong",{children:n.inviteeEmail})," to join ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. The invitation will be permanently deleted and the invited user will no longer be able to accept it."})]}),submitLabel:"Cancel Invitation",submitVariant:"destructive",cancelLabel:"Keep Invitation",onSubmit:()=>l(n.metadata.id,o,t),onCancel:()=>t(!1),isLoading:d}):null}const pa=js({name:q().min(1,"Token name is required"),duration:_t([Bt(Ke),_("never")])});function ga({open:s,onOpenChange:t,organizationId:n,organizationName:r,onSuccess:o,allTenantTags:l}){var Q,ie,Y,P;const d="never",[u,g]=i.useState(null),[v,y]=i.useState([]),[h,x]=i.useState([]),{handleApiError:m}=_e({setErrors:x}),{handleCreateToken:N,createTokenLoading:c}=Pe(),{register:p,handleSubmit:S,reset:T,control:R,watch:z,formState:{errors:E}}=$t({resolver:Kt(pa),defaultValues:{name:"",duration:Ke.Value30D}}),j=i.useCallback(()=>{g(null),y([]),T(),t(!1)},[T,t]),C=w=>y(G=>[...G,w]),D=w=>y(G=>G.filter(F=>F!==w)),k=l.filter(w=>!v.includes(w)),U=i.useCallback(w=>{x([]);const G=w.duration===d?void 0:w.duration;N(n,w.name,G,F=>{g(F.token),o()},v.length>0?v:void 0,F=>m(F))},[n,N,o,v,m]);i.useEffect(()=>{s||j()},[s,j]);const L=(ie=(Q=E.name)==null?void 0:Q.message)==null?void 0:ie.toString(),I=(P=(Y=E.duration)==null?void 0:Y.message)==null?void 0:P.toString(),re=z("duration"),B=[{value:Ke.Value30D,label:"30 days"},{value:Ke.Value60D,label:"60 days"},{value:Ke.Value90D,label:"90 days"},{value:d,label:"Do not expire"}];return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{className:"max-w-md",children:[e.jsxs(Ee,{children:[e.jsxs(Me,{className:"flex items-center gap-2",children:[e.jsx(cn,{className:"h-5 w-5"}),"Create Management Token"]}),e.jsxs(Ue,{children:["Create a new API token for managing ",r]})]}),u?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-green-200 bg-green-50 p-4",children:[e.jsx("div",{className:"mb-2 text-sm text-green-800",children:e.jsx("strong",{children:"Token created successfully!"})}),e.jsx("p",{className:"text-xs text-green-700",children:"Make sure to copy your token now. You won't be able to see it again!"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Your Management Token"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{value:u,readOnly:!0,className:"font-mono text-sm"}),e.jsx(vs,{text:u,className:"px-3"})]})]}),e.jsx("div",{className:"flex items-center justify-end pt-4",children:e.jsx(b,{onClick:j,children:"Done"})})]}):e.jsxs("form",{onSubmit:S(U),className:"space-y-4",children:[e.jsx(es,{errors:h}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"name",children:"Token Name"}),e.jsx(W,{...p("name"),id:"name",placeholder:"e.g., CI/CD Pipeline Token",disabled:c}),L&&e.jsx("div",{className:"text-sm text-red-500",children:L}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a descriptive name for your token."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"duration",children:"Duration"}),e.jsx(Vt,{control:R,name:"duration",render:({field:w})=>e.jsxs(me,{onValueChange:w.onChange,value:w.value,children:[e.jsx(he,{children:e.jsx(xe,{placeholder:"Select duration..."})}),e.jsx(fe,{children:B.map(G=>e.jsx(H,{value:G.value,children:G.label},G.value))})]})}),I&&e.jsx("div",{className:"text-sm text-red-500",children:I}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"How long the token should remain valid."}),re===d&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-yellow-200 bg-yellow-50 p-3 text-sm text-yellow-800",children:[e.jsx(ht,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:"Tokens that never expire pose a security risk. Consider using a shorter duration and rotating tokens regularly."})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Tag Scope (optional)"}),v.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(w=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[w,e.jsx("button",{type:"button",onClick:()=>D(w),disabled:c,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${w}`,children:e.jsx(Se,{className:"size-3.5"})})]},w))}),k.length>0?e.jsxs(me,{onValueChange:C,disabled:c,value:"",children:[e.jsx(he,{children:e.jsx(xe,{placeholder:"Add a tag…"})}),e.jsx(fe,{children:k.map(w=>e.jsx(H,{value:w,children:w},w))})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l.length===0?"No tags exist on any tenant yet.":"All available tags have been added."}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"When set, the token can only access or create tenants whose tags are a subset of these tags."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 pt-4",children:[e.jsx(b,{type:"button",variant:"outline",onClick:j,children:"Cancel"}),e.jsx(b,{type:"submit",disabled:c,children:c?"Creating...":"Create Token"})]})]})]})})}function ja({open:s,onOpenChange:t,member:n,organizationName:r,onSuccess:o}){const{handleDeleteMember:l,deleteMemberLoading:d}=Pe();return n?e.jsx(bs,{isOpen:s,title:"Remove Member",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to remove ",e.jsx("strong",{children:n.email})," from"," ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. The member will lose access to this organization and all its tenants immediately."})]}),submitLabel:"Remove Member",submitVariant:"destructive",cancelLabel:"Cancel",onSubmit:()=>l(n,o,t),onCancel:()=>t(!1),isLoading:d}):null}function gt({open:s,onOpenChange:t,tenant:n,tenantName:r,organizationName:o,onSuccess:l}){const{handleDeleteTenant:d,deleteTenantLoading:u}=Pe(),[g,v]=i.useState("");if(i.useEffect(()=>{s||v("")},[s]),!n)return null;const y=g===r,h=()=>{y&&d(n.id,l,t)};return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(Ee,{children:e.jsx(Me,{children:"Archive Tenant"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 space-y-3 text-sm text-foreground",children:[e.jsxs("p",{children:["Are you sure you want to archive ",e.jsx("strong",{children:r})," ","from ",o,"?"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["The tenant will be archived and kept for 30 days before being permanently deleted. During this period, you can contact"," ",e.jsx("a",{href:"mailto:support@hatchet.run",className:"text-primary underline",children:"support@hatchet.run"})," ","to unarchive the tenant if needed. After 30 days, the tenant and all associated data will be permanently removed."]}),e.jsxs("div",{className:"space-y-2 pt-2",children:[e.jsxs("label",{className:"text-sm font-medium",children:["To confirm, type ",e.jsx("strong",{children:r}),":"]}),e.jsx(W,{value:g,onChange:x=>v(x.target.value),placeholder:r,className:"w-full",autoFocus:!0})]})]}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(b,{variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),e.jsxs(b,{variant:"destructive",onClick:h,disabled:!y||u,children:[u&&e.jsx(Xe,{}),"Archive Tenant"]})]})]})]})})}function va({open:s,onOpenChange:t,token:n,organizationName:r,onSuccess:o}){const{handleDeleteToken:l,deleteTokenLoading:d}=Pe();return n?e.jsx(bs,{isOpen:s,title:"Delete Management Token",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Are you sure you want to delete the management token"," ",e.jsxs("strong",{children:['"',n.name,'"']})," from ",r,"?"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This action cannot be undone. Any applications or services using this token will immediately lose access and may break functionality."}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Potential consequences:"}),e.jsxs("ul",{className:"list-inside list-disc space-y-1 text-xs",children:[e.jsx("li",{children:"API integrations may fail"}),e.jsx("li",{children:"Automated deployments could break"}),e.jsx("li",{children:"CI/CD pipelines might stop working"}),e.jsx("li",{children:"Third-party tools will lose access"})]})]})]}),submitLabel:"Delete Token",submitVariant:"destructive",cancelLabel:"Cancel",onSubmit:()=>l(n.id,o,t),onCancel:()=>t(!1),isLoading:d}):null}function ya({open:s,onOpenChange:t,organizationId:n,tenantId:r,tenantName:o,onSuccess:l,initialTags:d=[],allTenantTags:u=[]}){const g=Ce(),v=ke(),[y,h]=i.useState([]),{handleApiError:x}=_e({setErrors:h}),[m,N]=i.useState(d),[c,p]=i.useState(""),S=$({...g.tenantTagsGetQuery(n,r),enabled:s});i.useEffect(()=>{S.data&&N(S.data)},[S.data]),i.useEffect(()=>{s||p("")},[s]);const T=ee({...g.tenantTagsSetMutation(n,r),onSuccess:()=>{v.invalidateQueries({queryKey:["organization-tenant:list:tags",n,r]}),l(),t(!1)},onError:x}),R=i.useCallback(k=>{const U=k.trim();U&&!m.includes(U)&&N(L=>[...L,U]),p("")},[m]),z=k=>N(U=>U.filter(L=>L!==k)),E=k=>{k.key==="Enter"&&(k.preventDefault(),R(c))},j=i.useCallback(k=>T.mutate(k),[T]),C=T.isPending,D=u.filter(k=>!m.includes(k));return e.jsx(we,{open:s,onOpenChange:t,children:e.jsxs(Te,{className:"max-w-md",children:[e.jsxs(Ee,{children:[e.jsx(Me,{children:"Edit Tenant Tags"}),e.jsxs(Ue,{children:["Tags for ",e.jsx("strong",{children:o}),". User groups with these tags will have access to this tenant."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(es,{errors:y}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Tags"}),S.isError&&e.jsx("p",{className:"text-xs text-destructive",children:"Couldn't load the latest tags for this tenant. Showing the last known tags — saving will overwrite them."}),m.length===0&&!S.isError&&e.jsx("p",{className:"text-xs text-muted-foreground",children:S.isLoading?"Loading tags…":"No tags yet. Add one below."}),m.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:m.map(k=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[k,e.jsx("button",{type:"button",onClick:()=>z(k),disabled:C,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${k}`,children:e.jsx(Se,{className:"size-3.5"})})]},k))}),D.length>0&&e.jsxs(me,{onValueChange:R,disabled:C,value:"",children:[e.jsx(he,{className:"text-muted-foreground",children:e.jsx(xe,{placeholder:"Add an existing tag"})}),e.jsx(fe,{children:D.map(k=>e.jsx(H,{value:k,children:k},k))})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(W,{id:"tag-input",value:c,onChange:k=>p(k.target.value),onKeyDown:E,placeholder:"New tag...",disabled:C,autoComplete:"off"}),e.jsx(b,{type:"button",variant:"outline",onClick:()=>R(c),disabled:C||!c.trim(),children:"Add"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(b,{variant:"outline",onClick:()=>t(!1),disabled:C,children:"Cancel"}),e.jsx(b,{onClick:()=>j(m),disabled:C,children:C?"Saving...":"Save Tags"})]})]})]})})}const ba="https://registry.terraform.io/providers/hatchet-dev/hatchet/latest/docs",Na=()=>({suggestions:[]}),Sa=s=>s,Ca={};function et(s){if(s<=0)return"Disabled";const t=Math.floor(s/6e4);if(t<60)return`${t} minute${t!==1?"s":""}`;const n=Math.floor(t/60),r=t%60;if(n<24)return r===0?`${n} hour${n!==1?"s":""}`:`${n} hour${n!==1?"s":""} ${r} minute${r!==1?"s":""}`;const o=Math.floor(n/24),l=n%24;return l===0?`${o} day${o!==1?"s":""}`:`${o} day${o!==1?"s":""} ${l} hour${l!==1?"s":""}`}const st={general:{title:"General",description:"Update the organization name and inactivity timeout."},tenants:{title:"Tenants",description:"Manage the tenants associated with this organization."},team:{title:"Team",description:"Manage the members, invites, and user groups for this organization."},tokens:{title:"Management Tokens",description:"Organization-scoped API tokens for automating administrative tasks — like creating tenants and managing members — via the Hatchet API."},regions:{title:"Available Regions",description:"Review the regions where new tenants can be deployed for this organization."},sso:{title:"SSO",description:"Configure single sign-on for this organization."},"audit-log":{title:"Audit Log",description:"Review administrative actions taken in this organization."}};function ka({tenants:s}){if(!s||s.length===0)return e.jsx("span",{className:"text-muted-foreground",children:"—"});const t=s.slice(0,3),n=s.slice(3);return e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[t.map(r=>e.jsxs(J,{variant:"outline",children:[r.tenantName," · ",Hs(r.tenantRole)]},r.tenantId)),n.length>0&&e.jsx(ot,{children:e.jsxs(lt,{children:[e.jsx(ct,{asChild:!0,children:e.jsxs(J,{variant:"outline",children:["+",n.length," more"]})}),e.jsx(dt,{children:e.jsx("div",{className:"flex flex-col gap-1",children:n.map(r=>e.jsxs("span",{children:[r.tenantName," · ",Hs(r.tenantRole)]},r.tenantId))})})]})})]})}function be({description:s}){return e.jsx("div",{className:"py-12",children:e.jsx(ne,{title:"You do not have access to this page",description:s??"Ask an organization owner to grant you access."})})}function Va({orgId:s,section:t="general"}){var As,Ls,Rs,zs,Os,Us,Ps,Fs,Is,Gs,qs;const{isControlPlaneEnabled:n}=nt(),r=Ht(),{organizations:o,handleUpdateOrganization:l,handleUpdateOrganizationTimeout:d,updateOrganizationLoading:u,handleCreateOrganizationSsoDomain:g,handleDeleteOrganizationSsoDomain:v}=Pe(),y=o.find(a=>a.metadata.id===s),h=(y==null?void 0:y.isOwner)??!1,x=Ce(),m=ke(),{currentUser:N}=Wt(),{meta:c}=Yt(),p=((As=c==null?void 0:c.auth)==null?void 0:As.schemes)||[],S=h&&p.includes("sso"),[T,R]=i.useState(null),[z,E]=i.useState(null),[j,C]=i.useState(!1),[D,k]=i.useState(null),[U,L]=i.useState(null),[I,re]=i.useState(null),[B,Q]=i.useState(""),[ie,Y]=i.useState(!1),[P,w]=i.useState(""),[G,F]=i.useState(!1),[f,oe]=i.useState(""),[De,Ge]=i.useState(!1),[as,M]=i.useState(!1),O=$({...x.organizationEntitlementsGetQuery(s),enabled:!!s&&S}),X=((Ls=O.data)==null?void 0:Ls.canSSO)===!0,se=$({...x.organizationSsoDomainGetQuery(s),enabled:!!s&&X}),Ns=$({...x.organizationSsoConfigGetQuery(s),enabled:!!s&&X}),Ss=ee({...x.organizationSsoConfigUpdateMutation(s),onSuccess:()=>{m.invalidateQueries({queryKey:["organization:sso_config:get",s]})}}),Cs=async()=>{!s||!f.trim()||(Ge(!0),g(s,f.trim(),()=>{Ge(!1),oe(""),m.invalidateQueries({queryKey:["organization:sso_domain:get",s]})},()=>{Ge(!1)}))},vt=async a=>{s&&v(s,a,()=>{m.invalidateQueries({queryKey:["organization:sso_domain:get",s]})})},qe=$({...x.organizationGetQuery(s),enabled:!!s}),je=$({...x.managementTokenListQuery(s),enabled:!!s}),ks=$({...x.organizationInviteListQuery(s),enabled:!!s}),ve=$({...x.organizationAvailableShardsQuery(s),enabled:!!s&&n&&h}),ws=$({...x.userGroupsListQuery(s),enabled:!!s&&n&&h}),A=qe.data,le=(A==null?void 0:A.name)??(y==null?void 0:y.name)??"",rs=(A==null?void 0:A.name)??"",Qe=i.useMemo(()=>{var a;return((a=(A==null?void 0:A.tenants)??(y==null?void 0:y.tenants))==null?void 0:a.filter(ce=>ce.status!==it.ARCHIVED))||[]},[y==null?void 0:y.tenants,A==null?void 0:A.tenants]),is=i.useMemo(()=>{var ce,$e;const a=new Set;for(const ds of Qe)(ce=ds.tags)==null||ce.forEach(us=>a.add(us));for(const ds of ws.data??[])($e=ds.tags)==null||$e.forEach(us=>a.add(us));return Array.from(a).sort()},[Qe,ws.data]),Ts=()=>{const a=B.trim();if(!(!s||!a)){if(a===rs){Y(!1);return}l(s,a,()=>{Q(a),Y(!1),m.invalidateQueries({queryKey:["organization:get",s]})})}},yt=()=>{Q(rs),Y(!0)},Es=()=>{Q(rs),Y(!1)},os=n?A:void 0,ls=(os==null?void 0:os.inactivity_timeout)??-1,te=i.useMemo(()=>Xt(P),[P]),Be=te!==null&&te>Zt,Ms=()=>{if(!(!s||te===null||Be)){if(te===ls){F(!1);return}d(s,te,()=>{F(!1),m.invalidateQueries({queryKey:["organization:get",s]})})}},bt=()=>{w(en(ls)),F(!0)},Ds=()=>{F(!1)},cs=(zs=(Rs=ks.data)==null?void 0:Rs.rows)==null?void 0:zs.filter(a=>a.status===Ye.PENDING||a.status===Ye.EXPIRED),Nt=[{columnLabel:"Email",cellRenderer:a=>e.jsx(Bs,{email:a.email})},{columnLabel:"Role",cellRenderer:a=>e.jsx(fs,{role:a.role})},...h?[{columnLabel:"Actions",cellRenderer:a=>e.jsx(Ta,{row:a,organizationId:s,currentUserEmail:N==null?void 0:N.email,onDelete:R})}]:[]],St=[{columnLabel:"Email",cellRenderer:a=>e.jsx(Bs,{email:a.inviteeEmail})},{columnLabel:"Role",cellRenderer:a=>e.jsx(fs,{role:a.role})},{columnLabel:"Tenant Access",cellRenderer:a=>e.jsx(ka,{tenants:a.tenants})},{columnLabel:"Status",cellRenderer:a=>e.jsx(J,{variant:a.status===Ye.PENDING?"secondary":"destructive",children:a.status})},{columnLabel:"Expiry",cellRenderer:a=>e.jsx("span",{children:tt(a.expires)})},...h?[{columnLabel:"Actions",cellRenderer:a=>a.status===Ye.PENDING?e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsx(ze,{align:"end",children:e.jsxs(Z,{onClick:()=>L(a),children:[e.jsx(pe,{className:"mr-2 size-4"}),"Cancel Invitation"]})})]}):null}]:[]],Ct=[{columnLabel:"Domain",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:a.domain})},{columnLabel:"Verified",cellRenderer:a=>e.jsx(J,{variant:a.verified?"successful":"secondary",children:a.verified?"Verified":"Unverified"})},{columnLabel:"Verification Token",cellRenderer:a=>a.verification_token?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:a.verification_token}),e.jsx(vs,{text:a.verification_token})]}):e.jsx("span",{className:"text-muted-foreground",children:"-"})},{columnLabel:"Actions",cellRenderer:a=>e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsx(ze,{align:"end",children:e.jsxs(Z,{onClick:()=>vt(a.domain),children:[e.jsx(pe,{className:"mr-2 size-4"}),"Remove Domain"]})})]})}],kt=[{columnLabel:"Cloud Provider",cellRenderer:a=>a.provider?e.jsx(J,{variant:"outline",children:a.provider}):e.jsx("span",{className:"text-muted-foreground",children:"—"})},{columnLabel:"Region",cellRenderer:a=>e.jsx("span",{className:"font-mono text-sm",children:an(rn(a))??a.region})},{columnLabel:"Class",cellRenderer:a=>a.shardClass===nn.DEDICATED?e.jsx(J,{variant:"secondary",children:"Dedicated"}):e.jsx(J,{variant:"outline",children:"Shared"})}],wt=[{columnLabel:"Name",cellRenderer:a=>e.jsx("span",{className:"font-medium",children:a.name})},{columnLabel:"Tags",cellRenderer:a=>{const ce=a.tags;return ce&&ce.length>0?e.jsx("div",{className:"flex flex-wrap gap-1",children:ce.map($e=>e.jsx(Ze,{tag:$e},$e))}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}},{columnLabel:"Expiry",cellRenderer:a=>e.jsx("span",{children:tt(a.expiresAt)})},...h?[{columnLabel:"Actions",cellRenderer:a=>e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsx(ze,{align:"end",children:e.jsxs(Z,{onClick:()=>k({id:a.id,name:a.name,expiresAt:a.expiresAt}),children:[e.jsx(pe,{className:"mr-2 size-4"}),"Delete"]})})]})}]:[]];return s?qe.isLoading&&!A?e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})})}):e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(ut,{title:st[t].title,description:st[t].description}),t==="general"&&!h&&e.jsx(be,{description:"Only organization owners can manage these settings."}),t==="general"&&h&&e.jsxs("div",{className:"divide-y divide-border",children:[e.jsx(Ws,{label:"Organization Name",description:"The display name for this organization, shown across the dashboard.",children:ie?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{value:B,onChange:a=>Q(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ts(),a.key==="Escape"&&Es()},className:"w-[220px]",disabled:u,"aria-label":"Organization name",autoFocus:!0}),e.jsx(b,{variant:"ghost",size:"icon",onClick:Es,disabled:u,hoverText:"Cancel editing","aria-label":"Cancel editing",className:"shrink-0",children:e.jsx(Se,{className:"size-4"})}),e.jsx(b,{variant:"outline",size:"icon",onClick:Ts,disabled:u||!B.trim()||B.trim()===le,hoverText:"Save organization name","aria-label":"Save organization name",className:"shrink-0",children:u?e.jsx(Xe,{}):e.jsx(Vs,{className:"size-4"})})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"max-w-[220px] truncate text-sm",children:le}),e.jsx(b,{variant:"outline",size:"icon",onClick:yt,hoverText:"Edit organization name","aria-label":"Edit organization name",className:"shrink-0",children:e.jsx(Je,{className:"size-4"})})]})}),n&&e.jsx(Ws,{label:"Inactivity Timeout",description:"Automatically sign out members of this organization after this period of inactivity. Maximum 14 days.",children:G?e.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{type:"text",value:P,onChange:a=>w(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Ms(),a.key==="Escape"&&Ds()},className:"w-[220px]",placeholder:"e.g. 30m, 1h, 1h30m, -1 to disable",disabled:u,autoFocus:!0}),e.jsx(b,{variant:"ghost",size:"icon",onClick:Ds,disabled:u,hoverText:"Cancel editing","aria-label":"Cancel editing",className:"shrink-0",children:e.jsx(Se,{className:"size-4"})}),e.jsx(b,{variant:"outline",size:"icon",onClick:Ms,disabled:u||te===null||Be,hoverText:"Save inactivity timeout","aria-label":"Save inactivity timeout",className:"shrink-0",children:u?e.jsx(Xe,{}):e.jsx(Vs,{className:"size-4"})})]}),P.trim()!==""&&e.jsx("p",{className:`text-xs ${te===null||Be?"text-destructive":"text-muted-foreground"}`,children:te===null?"Invalid format — try 30m, 1h, 1h30m, 100ms":Be?"Inactivity timeout cannot exceed 14 days":`→ ${et(te)}`})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"max-w-[220px] truncate text-sm",children:et(ls)}),e.jsx(b,{variant:"outline",size:"icon",onClick:bt,hoverText:"Edit inactivity timeout","aria-label":"Edit inactivity timeout",className:"shrink-0",children:e.jsx(Je,{className:"size-4"})})]})})]}),e.jsxs("div",{className:"mt-2",children:[t==="tenants"&&e.jsx(jt,{tenants:Qe,onArchive:re,onEditTags:n&&h?E:void 0,defaultOrganizationId:s,canManageOrganization:h}),t==="team"&&(qe.error instanceof Ae&&((Os=qe.error.response)==null?void 0:Os.status)===403?e.jsx(be,{description:"You must be an organization owner to view members."}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold",children:"Members"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"People with access to this organization."})]}),h&&e.jsx(b,{className:"shrink-0",onClick:()=>ys.emit("create-organization-invite",{organizationId:s,organizationName:le}),children:"Invite Member"})]}),e.jsx(Ve,{}),A!=null&&A.members&&A.members.length>0?e.jsx(Ne,{data:A.members,columns:Nt,rowKey:a=>a.metadata.id}):e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"No members",description:"Invite teammates to give them access to this organization."})})]}),cs&&cs.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold",children:"Pending Invites"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Invitations that have not been accepted yet."})]}),e.jsx(Ve,{}),e.jsx(Ne,{data:cs,columns:St,rowKey:a=>a.metadata.id})]}),h&&n&&e.jsx(ha,{organizationId:s,allOrgMembers:(A==null?void 0:A.members)??[],allTenantTags:is})]})),t==="regions"&&(h&&n?ve.isLoading?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(hs,{})}):ve.error instanceof Ae&&((Us=ve.error.response)==null?void 0:Us.status)===403?e.jsx(be,{description:"You must be an organization owner to view available regions."}):ve.error?e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"Failed to load available regions",description:"Something went wrong fetching the regions for this organization. Try refreshing the page."})}):e.jsxs("div",{className:"space-y-4",children:[(Ps=ve.data)!=null&&Ps.rows&&ve.data.rows.length>0?e.jsx(Ne,{data:ve.data.rows,columns:kt,rowKey:a=>`${a.shardClass}:${a.provider}:${a.region}:${a.shardName??""}`}):e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"No deployment regions",description:"No regions are currently available for deploying new tenants in this organization."})}),e.jsx("div",{className:"space-y-2 text-sm text-muted-foreground",children:e.jsxs("p",{children:["Need to configure which regions are available for a tenant, or looking for a new region?"," ",r.enabled?e.jsxs(e.Fragment,{children:[e.jsx(b,{type:"button",variant:"link",className:"h-auto p-0 text-sm font-normal",onClick:()=>r.show(),children:"Chat with us"}),", or"," "]}):null,e.jsx("a",{href:_s,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"Schedule office hours"}),"."]})})]}):e.jsx(be,{})),t==="tokens"&&(je.error instanceof Ae&&((Fs=je.error.response)==null?void 0:Fs.status)===403?e.jsx(be,{description:"You must be an organization owner to view management tokens."}):e.jsxs(e.Fragment,{children:[h&&e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(b,{onClick:()=>C(!0),children:"Create Token"})}),(Is=je.data)!=null&&Is.rows&&je.data.rows.length>0?e.jsx(Ne,{data:je.data.rows,columns:wt,rowKey:a=>a.id}):e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"No management tokens",description:"Management tokens are used to manage tenants and members programmatically. We recommend using the Hatchet Terraform provider for this.",docPage:{href:ba},docLabel:"Hatchet Terraform provider docs"})})]})),t==="sso"&&(S?O.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(hs,{})}):X?e.jsxs("div",{className:"space-y-6",children:[e.jsx(ca,{orgId:s,onConfigLoaded:M}),h&&e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border/50 bg-muted/10 p-4",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:"Force SSO"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Require all organization members to sign in with SSO. All other login methods will be disabled."})]}),e.jsx(mt,{checked:((Gs=Ns.data)==null?void 0:Gs.forceSSO)??!1,onCheckedChange:a=>Ss.mutate(a),disabled:Ns.isLoading||Ss.isPending})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold",children:"SSO Domains"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Domains associated with your organization for SSO login. Members signing in with a verified domain will be automatically directed to your identity provider."})]}),as&&!se.isLoading&&(!se.data||se.data.length===0)&&e.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-yellow-500/50 bg-yellow-500/10 px-4 py-3 text-sm",children:[e.jsx(ht,{className:"mt-0.5 h-4 w-4 shrink-0 text-yellow-500"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"SSO is configured but no domains are set up."}),e.jsx("p",{className:"mt-0.5 text-muted-foreground",children:"Without a verified domain, members will not be automatically redirected to your identity provider. Add a domain below to complete your SSO setup."})]})]}),e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(W,{placeholder:"example.com",value:f,onChange:a=>oe(a.target.value),onKeyDown:a=>{a.key==="Enter"&&Cs()},className:"max-w-sm",disabled:De}),e.jsx(b,{variant:"outline",size:"sm",onClick:Cs,disabled:De||!f.trim(),leftIcon:e.jsx(xt,{className:"size-4"}),children:"Add Domain"})]})}),se.isLoading?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(hs,{})}):se.data&&se.data.length>0?e.jsx(Ne,{data:se.data.map(a=>({domain:a.ssoDomain,verified:a.verified,verification_token:a.verificationToken})),columns:Ct,rowKey:a=>a.domain}):null,se.data&&se.data.length>0&&e.jsxs("div",{className:"rounded-md border border-muted bg-muted/30 px-4 py-3 text-sm text-muted-foreground",children:[e.jsx("p",{children:"To verify your domain, add a DNS TXT record with the value:"}),e.jsx("p",{className:"mt-1 font-mono",children:"hatchet-sso-verify={verification_token}"}),e.jsx("p",{className:"mt-2",children:"It may take a few minutes for DNS changes to propagate and for the verified status to update."})]})]})]}):e.jsx("div",{className:"py-12",children:e.jsx(ne,{title:"SSO is not enabled",description:"Single sign-on is not enabled for this organization. Contact us to get access.",links:[{href:_s,label:"Schedule office hours",external:!0}]})}):e.jsx(be,{})),t==="audit-log"&&(n?e.jsx(Nn,{orgId:s}):e.jsx(be,{}))]})]}),h&&T&&e.jsx(ja,{open:!!T,onOpenChange:a=>!a&&R(null),member:T,organizationName:le,onSuccess:()=>qe.refetch()}),h&&e.jsx(ga,{open:j,onOpenChange:C,organizationId:s,organizationName:le,onSuccess:()=>je.refetch(),allTenantTags:is}),h&&D&&e.jsx(va,{open:!!D,onOpenChange:a=>!a&&k(null),token:D,organizationName:le,onSuccess:()=>je.refetch()}),h&&U&&e.jsx(fa,{open:!!U,onOpenChange:a=>!a&&L(null),invite:U,organizationName:le,onSuccess:()=>ks.refetch()}),I&&Qe.find(a=>(a==null?void 0:a.id)===I.id)&&e.jsx(gt,{open:!!I,onOpenChange:a=>!a&&re(null),tenant:I,tenantName:((qs=Qe.find(a=>(a==null?void 0:a.id)===I.id))==null?void 0:qs.name)||I.id,organizationName:le,onSuccess:()=>{m.invalidateQueries({queryKey:["organization:get",s]}),m.invalidateQueries({queryKey:["tenant:get"]})}}),h&&n&&z&&e.jsx(ya,{open:!!z,onOpenChange:a=>!a&&E(null),organizationId:s,tenantId:z.id,tenantName:z.name||z.id,initialTags:z.tags??[],allTenantTags:is,onSuccess:()=>m.invalidateQueries({queryKey:["organization:get",s]})})]}):e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsx("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No organization found for this tenant."})})})}function _a(){var l;const{tenantMemberships:s}=Jt(),t=ke(),[n,r]=i.useState(null),o=i.useMemo(()=>(s==null?void 0:s.map(d=>d.tenant?{id:d.tenant.metadata.id,name:d.tenant.name,status:it.ACTIVE,slug:d.tenant.slug}:null).filter(d=>d!==null))||[],[s]);return e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(ut,{title:"Tenants",description:"Review the tenants associated with your account."}),e.jsx(jt,{tenants:o,onArchive:r,canManageOrganization:!1})]}),n&&o.find(d=>(d==null?void 0:d.id)===n.id)&&e.jsx(gt,{open:!!n,onOpenChange:d=>!d&&r(null),tenant:n,tenantName:((l=o.find(d=>(d==null?void 0:d.id)===n.id))==null?void 0:l.name)||n.id,organizationName:"",onSuccess:()=>{t.invalidateQueries({queryKey:["tenant:get"]})}})]})}function tt(s){if(!s)return"never";try{const t=new Date(s);return t{var p;const c=new Set;for(const S of s)(p=S.tags)==null||p.forEach(T=>c.add(T));return Array.from(c).sort()},[s]),h=i.useMemo(()=>{const c=g.trim().toLowerCase();return s.filter(p=>{if(c&&![p.name,p.slug,p.id].filter(Boolean).join(" ").toLowerCase().includes(c))return!1;if(d.length>0){const S=p.tags??[];return d.every(T=>S.includes(T))}return!0})},[s,d,g]),x=g.trim()!==""||d.length>0,m=c=>u(p=>p.includes(c)?p.filter(S=>S!==c):[...p,c]),N=[{columnLabel:"Name",cellRenderer:c=>e.jsx("p",{className:"min-w-0 truncate font-medium",children:c.name??c.slug??c.id})},{columnLabel:"ID",cellRenderer:c=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"max-w-[10rem] truncate font-mono text-xs text-muted-foreground",children:c.id}),e.jsx(vs,{text:c.id})]})},{columnLabel:"Tags",cellRenderer:c=>{const p=c.tags??[];return p.length>0?e.jsx(da,{tags:p}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}},{columnLabel:"Status",cellRenderer:c=>e.jsx(J,{variant:"outline",children:c.status})},{columnLabel:"Region",cellRenderer:c=>c.region?e.jsx(tn,{region:c.region}):e.jsx("span",{className:"text-muted-foreground",children:"—"})},{columnLabel:"Members",cellRenderer:c=>e.jsx(b,{variant:"outline",size:"sm",onClick:()=>l({to:gs.tenantSettingsMembersRoute.to,params:{tenant:c.id}}),children:"Manage members"})},{columnLabel:"Actions",cellRenderer:c=>e.jsx(wa,{row:{...c,metadata:{id:c.id}},onArchive:t,onEditTags:n,canManageOrganization:o})}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(sn,{value:g,onChange:v,onSubmit:v,getAutocomplete:Na,applySuggestion:Sa,autocompleteContext:Ca,placeholder:"Search tenants by name, slug, or ID..."})}),o&&e.jsx("div",{className:"shrink-0",children:e.jsx(b,{onClick:()=>ys.emit("create-new-tenant",{defaultOrganizationId:r,allTenantTags:y}),children:"Add Tenant"})})]}),y.length>0&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Filter by tag:"}),y.map(c=>e.jsx("button",{type:"button",onClick:()=>m(c),className:"focus:outline-none",children:e.jsx(J,{variant:d.includes(c)?"default":"outline",className:"cursor-pointer text-xs",children:c})},c)),d.length>0&&e.jsxs("button",{type:"button",onClick:()=>u([]),className:"text-xs text-muted-foreground hover:text-foreground focus:outline-none",children:[e.jsx(Se,{className:"inline size-3"})," Clear"]})]}),h.length?e.jsx(Ne,{columns:N,data:h,rowKey:c=>c.id}):e.jsx("div",{className:"py-8",children:e.jsx(ne,{title:"No tenants",description:x?"No tenants match your search or filters.":"Add a tenant to this organization to get started.",filterHint:x?"Try changing your search or clearing the tag filters.":void 0})})]})}function wa({row:s,onArchive:t,onEditTags:n,canManageOrganization:r}){const o=ps();return e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsxs(ze,{align:"end",children:[e.jsxs(Z,{onClick:()=>o({to:gs.tenantRoute.to,params:{tenant:s.id}}),children:[e.jsx(mn,{className:"mr-2 size-4"}),"View Tenant"]}),r&&n&&e.jsxs(Z,{onClick:()=>n(s),children:[e.jsx(Je,{className:"mr-2 size-4"}),"Edit Tags"]}),r&&e.jsxs(Z,{onClick:()=>t({id:s.id,status:s.status}),children:[e.jsx(pe,{className:"mr-2 size-4"}),"Archive Tenant"]})]})]})}function Ta({row:s,organizationId:t,currentUserEmail:n,onDelete:r}){const o=n===s.email;return e.jsxs(Le,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:e.jsx(Oe,{className:"size-4"})})}),e.jsxs(ze,{align:"end",children:[e.jsxs(Z,{onClick:()=>ys.emit("create-tenant-invite",{organizationId:t,defaultEmail:s.email}),children:[e.jsx(xt,{className:"mr-2 size-4"}),"Add to tenant"]}),o?e.jsx(ot,{children:e.jsxs(lt,{children:[e.jsx(ct,{asChild:!0,children:e.jsxs(Z,{disabled:!0,className:"cursor-not-allowed text-gray-400",children:[e.jsx(pe,{className:"mr-2 size-4"}),"Remove Member"]})}),e.jsx(dt,{children:e.jsx("p",{children:"Cannot remove yourself"})})]})}):e.jsxs(Z,{onClick:()=>r(s),children:[e.jsx(pe,{className:"mr-2 size-4"}),"Remove Member"]})]})]})}export{Va as C,_a as O}; diff --git a/hatchetembed/dashboard/assets/index-D46ZK8zA.js b/hatchetembed/dashboard/assets/index-D46ZK8zA.js deleted file mode 100644 index 73d5fed779..0000000000 --- a/hatchetembed/dashboard/assets/index-D46ZK8zA.js +++ /dev/null @@ -1 +0,0 @@ -import{h as c,n as u,m as f,p as g,q as m,b as d,j as e,B as r,H as x}from"./index-NcPpBRAY.js";import{O as b}from"./organization-selector-CCw2_tjm.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./global-emitter-kjRqhIKI.js";import"./PlusIcon-ChBf4T_m.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="8ded549d-35ed-49f4-becb-4fbb30f0dd4c",t._sentryDebugIdIdentifier="sentry-dbid-8ded549d-35ed-49f4-becb-4fbb30f0dd4c")}catch{}})();function w(){const t=c(),{userUpdateLogoutMutation:o}=u(),{organizations:s,tenantMemberships:l}=f(),n=g({...o(),onSettled:()=>{m.clear(),t({to:d.authLoginRoute.to})}}),a=s==null?void 0:s[0],i=((s==null?void 0:s.length)??0)===1?a==null?void 0:a.name:void 0;return e.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[e.jsxs("div",{className:"absolute top-4 right-4 z-10 flex items-center gap-2",children:[e.jsx(b,{memberships:l??[]}),e.jsx(r,{variant:"ghost",size:"sm",onClick:()=>n.mutate(),disabled:n.isPending,children:"Sign out"})]}),e.jsx("div",{className:"flex h-full items-center justify-center px-4",children:e.jsxs("div",{className:"flex w-full max-w-lg flex-col gap-6 rounded-lg border bg-card p-6 shadow-sm",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(x,{variant:"mark",className:"h-8 w-8"}),e.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:i?`You've joined ${i}`:"You've joined the organization"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You're not a member of any tenants yet. Ask an organization owner to add you to a tenant, or head to organization settings to manage your organization."})]}),a&&e.jsx("div",{className:"flex w-full flex-col gap-2",children:e.jsx(r,{className:"w-full",onClick:()=>t({to:d.organizationsIndexRoute.to,params:{organization:a.metadata.id}}),children:"Go to organization settings"})})]})})]})}export{w as default}; diff --git a/hatchetembed/dashboard/assets/index-D4LBFMbY.js b/hatchetembed/dashboard/assets/index-D4LBFMbY.js deleted file mode 100644 index a8975a65ed..0000000000 --- a/hatchetembed/dashboard/assets/index-D4LBFMbY.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,ab as ae,L as Q,I as me,ak as ue,ai as he,B as u,aj as ge,al as xe,am as pe,S as H,k as i,db as X,dc as Z,dd as J,de as E,b8 as g,aB as C,aK as Y,d2 as fe,W as q,X as P,a4 as R,Z as A,an as be,di as je,aq as ke,c2 as Ne,_ as ve,$ as we,a0 as ye,a1 as Ce,au as _e,bp as Te,C as Se,h as Ie,l as De,p as U,a as ee,N as Fe,O as Le}from"./index-NcPpBRAY.js";import{n as Oe,o as Me,p as ze,q as Ee}from"./index-DOf3AD-4.js";import{S as qe}from"./secret-copier-68gzWNRB.js";import{u as Pe}from"./use-analytics-Jv1fF8RR.js";import{u as Re}from"./use-auth-disabled-3jxVUpNe.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="fdd482a7-b1e8-4be8-80b7-2d296224d09b",t._sentryDebugIdIdentifier="sentry-dbid-fdd482a7-b1e8-4be8-80b7-2d296224d09b")}catch{}})();const Ae=e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"bottom-[1px] relative",children:e.jsx("path",{d:"M10.499 1.5V2.5C10.499 7.3137 7.81275 9.5 4.49902 9.5L3.5482 9.49995C3.65395 7.9938 4.1227 7.0824 5.34695 5.99945C5.94895 5.4669 5.89825 5.15945 5.60145 5.33605C3.55965 6.5508 2.54557 8.1931 2.50059 10.8151L2.49902 11H1.49902C1.49902 10.3187 1.55688 9.69985 1.6719 9.1341C1.55665 8.48705 1.49902 7.6088 1.49902 6.5C1.49902 3.73857 3.7376 1.5 6.499 1.5C7.499 1.5 8.499 2 10.499 1.5Z",fill:"hsl(var(--brand))"})});function He({completed:t}){return t?e.jsxs("span",{className:"text-[10px] font-mono tracking-widest uppercase inline-flex items-center gap-1.5 text-foreground/50",children:[e.jsx(Oe,{}),"Onboarding step"]}):e.jsxs("span",{className:"text-[10px] font-mono tracking-widest uppercase inline-flex items-center gap-1.5 text-brand",children:[Ae,"Onboarding step"]})}function se({title:t,showOnboardingBadge:s=!1,completed:a=!1}){return e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inline-flex items-baseline gap-5",children:[e.jsx("h2",{className:"text-md",children:t}),s&&e.jsx(He,{completed:a})]}),e.jsx(ae,{className:"my-4 bg-border/50",flush:!0})]})}function We({tokenName:t,onTokenNameChange:s,expiresIn:a,expiresInOptions:d,onExpiresInChange:x,onExpiresInSelected:p,fieldErrors:N,isGenerating:l,onGenerateToken:c}){var j;const b=((j=Object.entries(d).find(([,m])=>m===a))==null?void 0:j[0])||"Select an option";return e.jsxs("div",{children:[e.jsx(se,{title:"Create API token",showOnboardingBadge:!0}),e.jsxs("div",{className:"grid gap-4 items-end grid-flow-row lg:[grid-template-columns:1fr_1fr_auto_1fr] lg:grid-flow-col",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(Q,{htmlFor:"name",children:"Name"}),e.jsx(me,{id:"name",type:"text",required:!0,autoCapitalize:"none",autoCorrect:"off",placeholder:"My Token",value:t,onChange:m=>s(m.target.value),disabled:l}),N.name&&e.jsx("div",{className:"text-sm text-red-500",children:N.name})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(Q,{htmlFor:"expiresIn",children:"Expires In"}),e.jsxs(ue,{children:[e.jsx(he,{asChild:!0,children:e.jsxs(u,{variant:"outline",size:"default",className:"flex justify-between data-[state=open]:bg-muted",disabled:l,children:[b,e.jsx(ge,{className:"size-4"})]})}),e.jsx(xe,{align:"end",className:"w-[160px]",children:Object.entries(d).map(([m,h])=>e.jsx(pe,{onClick:()=>{x(h),p==null||p(m,h)},children:m},h))})]})]}),e.jsx("div",{className:"grid gap-2 justify-self-start",children:e.jsxs(u,{variant:"default",size:"default",onClick:c,disabled:l,children:[l&&e.jsx(H,{}),"Generate Token"]})})]})]})}const o={install:{value:"install",label:"Install the CLI"},profile:{value:"profile",label:"Set your profile"},quickstart:{value:"quickstart",label:"Project quickstart"},runTask:{value:"runTask",label:"Run a task"},aiDocs:{value:"aiDocs",label:"Install Docs MCP (optional)"}},$e={python:{value:"python"}},F={native:{value:"native",label:"Native (Recommended)"},homebrew:{value:"homebrew",label:"Homebrew"}};function Be({tenantName:t,selectedTab:s,onSelectedTabChange:a,profileToken:d,isGeneratingProfileToken:x,profileTokenError:p,onGenerateProfileToken:N,hasActiveWorker:l,onTabChangeEvent:c,onFinish:b,installMethod:j,onInstallMethodChange:m,authDisabled:h,authDisabledToken:L}){const _=(t==null?void 0:t.trim())||"local",y=n=>n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`"),[O,T]=i.useState(!1),[M,k]=i.useState(!1);i.useEffect(()=>{k(!1)},[d]);const S=[{...o.install,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:" Install the Hatchet CLI. "}),e.jsxs(X,{value:j,onValueChange:n=>{m(n)},className:"w-full",children:[e.jsx(Z,{className:"mt-2 bg-muted ring-1 ring-border/50 rounded-lg p-0 gap-0.5 dark:bg-muted/20 dark:ring-inset",children:Object.entries(F).map(([n,v])=>e.jsx(J,{value:v.value,className:"rounded-lg h-full text-muted-foreground data-[state=active]:ring-1 data-[state=active]:ring-border data-[state=active]:bg-background dark:data-[state=active]:bg-muted/70 dark:data-[state=active]:shadow-lg dark:ring-inset",children:v.label},n))}),e.jsxs(E,{value:F.native.value,className:"mt-4 space-y-3",children:[e.jsx("p",{className:"text-sm",children:e.jsx("b",{children:"MacOS, Linux, WSL"})}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"curl -fsSL https://install.hatchet.run/install.sh | bash",language:"shell",copy:!0})]}),e.jsxs(E,{value:F.homebrew.value,className:"mt-4 space-y-3",children:[e.jsx("p",{className:"text-sm",children:e.jsx("b",{children:"MacOS"})}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"brew install hatchet-dev/hatchet/hatchet --cask",language:"shell",copy:!0})]})]}),e.jsx("p",{className:"text-sm",children:"Verify the installation by running:"}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet --version",language:"shell",copy:!0}),e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(o.profile.value),children:["Continue",e.jsx(C,{className:"size-3 text-foreground/50"})]})]})},{...o.profile,content:h?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Authentication is disabled, but workers still authenticate over gRPC with an API token."}),e.jsx("p",{className:"text-sm",children:"This instance ships with a built-in token for the default tenant. Add it to a CLI profile:"}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:`hatchet profile add --name "${y(_)}" --token "${L??""}"`,language:"shell",copy:!0}),e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(o.quickstart.value),children:["Continue",e.jsx(C,{className:"size-3 text-foreground/50"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Add a Hatchet CLI profile using an API token."}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>{k(!1),N()},disabled:x,children:[x&&e.jsx(H,{}),"Generate token for this command"]}),d&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"This token is only shown once — copy it now."})]}),p&&e.jsx("div",{className:"text-sm text-red-500",children:p}),d&&e.jsx("div",{onMouseDown:()=>k(!0),onClick:()=>k(!0),children:e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:`hatchet profile add --name "${y(_)}" --token "${y(d)}"`,language:"shell",copy:!0,onCopy:()=>k(!0)})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 justify-between",children:[e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",disabled:!d||!M,onClick:()=>a(o.quickstart.value),children:["Continue",e.jsx(C,{className:"size-3 text-foreground/50"})]}),e.jsx(u,{variant:"ghost",size:"default",className:"w-fit",onClick:()=>a(o.quickstart.value),children:"Skip"})]})]})},{...o.quickstart,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Run the quickstart command to clone an example project repository and follow the instructions to cd into the project directory.."}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet quickstart",language:"shell",copy:!0}),e.jsx("p",{className:"text-sm",children:"Then, start your worker in development mode. This will start a worker that will listen for tasks and run them locally."}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet worker dev",language:"shell",copy:!0}),e.jsx("div",{className:"flex items-center gap-3 rounded-lg border border-border/50 bg-muted/20 p-4",children:l?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"size-5 text-green-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Worker is connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"size-5"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Waiting for worker..."})]})}),e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(o.runTask.value),children:["Continue",e.jsx(C,{className:"size-3 text-foreground/50"})]})]})},{...o.runTask,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"With the worker running, you can now open a new terminal and run the following command to trigger a task run:"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet trigger simple",language:"shell",copy:!0}),e.jsx("p",{className:"text-sm",children:"You can view the script to understand how to trigger a task run from your own codebase."})]}),e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:()=>a(o.aiDocs.value),children:["Continue",e.jsx(C,{className:"size-3 text-foreground/50"})]})]})},{...o.aiDocs,content:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Get Hatchet documentation directly in your AI coding assistant (Cursor, Claude Code, Claude Desktop, and more)."}),e.jsx(g,{className:"bg-muted/20 ring-1 ring-border/50 ring-inset px-1",code:"hatchet docs install",language:"shell",copy:!0}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the"," ",e.jsx("a",{href:"https://docs.hatchet.run/home/install-docs-mcp",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"full setup guide"})," ","for manual configuration options."]}),e.jsxs(u,{variant:"outline",size:"default",className:"w-fit gap-2 bg-muted/70",onClick:b,children:["Finish",e.jsx(Y,{className:"size-3 text-brand"})]})]})}];return e.jsxs("div",{children:[e.jsx(fe,{defaultWorkflow:void 0,show:O,onClose:()=>T(!1)}),e.jsx(se,{title:"Setup your local environment",showOnboardingBadge:!0}),e.jsxs(X,{value:s,onValueChange:n=>{a(n),c==null||c(n,o[n].label)},className:"w-full rounded-md px-6 pb-6 bg-muted/20 ring-1 ring-border/50 ring-inset",children:[e.jsx(Z,{className:"grid w-full grid-flow-col rounded-none bg-transparent p-0 pb-6 justify-start gap-6 h-auto ",children:S.map((n,v)=>e.jsx(J,{value:n.value,className:"text-xs text-muted-foreground rounded-none pt-2.5 px-1 font-medium border-t border-transparent hover:border-border bg-transparent data-[state=active]:border-primary/50 data-[state=active]:bg-transparent data-[state=active]:shadow-none",children:e.jsxs("div",{className:"flex items-center gap-2",children:[v+1," ",n.label]})},n.value))}),S.map(n=>e.jsx(E,{value:n.value,className:"mt-0 space-y-5",children:n.content},n.value))]})]})}function Ge(){return e.jsxs("div",{className:"pb-6",children:[e.jsx("h2",{className:"text-md",children:"Support"}),e.jsx(ae,{className:"my-4 bg-border/50",flush:!0}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.jsxs(q,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(P,{className:"p-4 border-b border-border/50 ",children:e.jsx(R,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:"Community"})}),e.jsx(A,{className:"p-4",children:e.jsxs("ul",{className:"space-y-2",children:[e.jsx("li",{children:e.jsxs("a",{href:"https://hatchet.run/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(Me,{className:"mr-2"})," Join Discord"]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://github.com/hatchet-dev/hatchet/issues",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(ze,{className:"mr-2"})," Github Issues"]})})]})})]}),e.jsxs(q,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(P,{className:"p-4 border-b border-border/50 ",children:e.jsx(R,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:"Resources"})}),e.jsx(A,{className:"p-4",children:e.jsxs("ul",{className:"space-y-2",children:[e.jsx("li",{children:e.jsxs("a",{href:"https://docs.hatchet.run",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(be,{className:"mr-2"})," Documentation"]})}),e.jsx("li",{children:e.jsxs("a",{href:"mailto:support@hatchet.run?subject=Slack%20Channel%20Request",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(Ee,{className:"mr-2"}),"Request Slack Channel"]})}),e.jsx("li",{children:e.jsxs("a",{href:"mailto:support@hatchet.run",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-sm text-primary/70 hover:underline hover:text-primary",children:[e.jsx(je,{className:"mr-2"}),"Email Support"]})})]})})]}),e.jsxs(q,{variant:"light",className:"bg-transparent ring-1 ring-border/50 border-none",children:[e.jsx(P,{className:"p-4 border-b border-border/50 ",children:e.jsx(R,{className:"font-mono font-normal tracking-wider uppercase text-xs text-muted-foreground whitespace-nowrap",children:e.jsxs("a",{href:ke,target:"_blank",rel:"noreferrer",className:"group inline-flex items-center gap-1 hover:text-primary",children:["Book Office Hours",e.jsx(Ne,{className:"size-3 transition-transform group-hover:translate-x-0.5"})]})})}),e.jsxs(A,{className:"p-4 space-y-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"GMT-5 Eastern Standard Time"}),e.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["Weekdays ",e.jsx("span",{className:"text-primary",children:"09:00 - 17:00"})]})]})]})]})]})}function Ke({open:t,onOpenChange:s,token:a}){return!t||!a?null:e.jsx(ve,{open:t,onOpenChange:s,children:e.jsxs(we,{className:"w-fit max-w-[700px]",children:[e.jsx(ye,{children:e.jsx(Ce,{children:"Keep it secret, keep it safe"})}),e.jsx("p",{className:"text-sm",children:"This is the only time we will show you this token. Make sure to copy it somewhere safe."}),e.jsx(qe,{secrets:{HATCHET_CLIENT_TOKEN:a},className:"text-sm",maxWidth:"calc(700px - 4rem)",copy:!0})]})})}const D={"3 months":`${2160*60*60}s`,"1 year":`${365*24*60*60}s`,"100 years":`${100*365*24*60*60}s`};function Ue(){var K,V;const{tenant:t,tenantId:s}=_e(),{currentUser:a}=Te(),d=Re(),{meta:x}=Se(),p=x&&"authDisabledToken"in x?x.authDisabledToken:void 0,N=Ie(),{capture:l}=Pe(),[c,b]=i.useState(""),[j,m]=i.useState(!1),[h,L]=i.useState(D["100 years"]),[_,y]=i.useState(),[O,T]=i.useState(!1),[M,k]=i.useState(),[S,n]=i.useState(),[v,I]=i.useState({}),[W,te]=i.useState(o.install.value),[ne,re]=i.useState($e.python.value),[ie,le]=i.useState(F.native.value),$=i.useRef(!1),w=i.useMemo(()=>{var f;const r=(f=a==null?void 0:a.name)==null?void 0:f.trim();return r?`${r}'s token`:""},[a==null?void 0:a.name]),{handleApiError:oe}=De({setFieldErrors:I});i.useEffect(()=>{j||c.trim()||w&&(b(w),I(r=>r.name?{}:r))},[w,j,c]),i.useEffect(()=>{l("onboarding_overview_viewed",{tenant_id:s,user_email:a==null?void 0:a.email})},[l,s,a==null?void 0:a.email]);const B=U({mutationKey:["api-token:create",s],mutationFn:async r=>(await ee.apiTokenCreate(s,r)).data,onSuccess:r=>{y(r.token),T(!0),l("onboarding_token_generated",{tenant_id:s,user_email:a==null?void 0:a.email,token_name:c,expires_in:h}),m(!1),b("")},onError:oe}),G=U({mutationKey:["api-token:create:profile",s],mutationFn:async r=>(await ee.apiTokenCreate(s,r)).data,onSuccess:r=>{k(r.token),n(void 0),l("onboarding_token_generated",{tenant_id:s,user_email:a==null?void 0:a.email,token_name:`${w||"Local"} (CLI profile)`,expires_in:D["100 years"],source:"learn_workflow_profile_step"})},onError:()=>{n("Failed to generate token. Please try again.")}}),ce=()=>{if(!c.trim()){I({name:"Name is required"});return}B.mutate({name:c,expiresIn:h})},de=()=>{n(void 0),G.mutate({name:w?`${w} (CLI)`:"CLI token",expiresIn:D["100 years"]})},z=(((V=(K=Fe({...Le.workers.list(s),enabled:W===o.quickstart.value,refetchInterval:2e3}).data)==null?void 0:K.rows)==null?void 0:V.length)??0)>0;return i.useEffect(()=>{z&&!$.current&&(l("onboarding_worker_connected",{tenant_id:s,user_email:a==null?void 0:a.email}),$.current=!0)},[z,l,s,a==null?void 0:a.email]),e.jsxs("div",{className:"flex h-full w-full flex-col gap-y-8 lg:p-6",children:[e.jsx("div",{className:"grid gap-2 grid-cols-1 items-start lg:grid-cols-[1fr_auto]",children:e.jsx("div",{className:"flex items-center gap-6 flex-wrap",children:e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Overview"})})}),e.jsx(Be,{tenantName:t==null?void 0:t.name,selectedTab:W,onSelectedTabChange:te,language:ne,onLanguageChange:re,installMethod:ie,onInstallMethodChange:le,authDisabled:d,authDisabledToken:p,profileToken:M,isGeneratingProfileToken:G.isPending,profileTokenError:S,onGenerateProfileToken:de,hasActiveWorker:z,onTabChangeEvent:(r,f)=>{l("onboarding_tab_changed",{tenant_id:s,user_email:a==null?void 0:a.email,tab:f})},onLanguageSelectedEvent:(r,f)=>{l("onboarding_language_selected",{tenant_id:s,user_email:a==null?void 0:a.email,language:f})},onFinish:()=>{l("onboarding_completed",{tenant_id:s,user_email:a==null?void 0:a.email}),N({to:"/tenants/$tenant/runs",params:{tenant:s}})}}),!d&&e.jsx(We,{tokenName:c,onTokenNameChange:r=>{m(!0),b(r),I({})},expiresIn:h,expiresInOptions:D,onExpiresInChange:L,onExpiresInSelected:r=>{l("onboarding_token_expiration_selected",{tenant_id:s,user_email:a==null?void 0:a.email,expiration:r})},fieldErrors:v,isGenerating:B.isPending,onGenerateToken:ce}),e.jsx(Ge,{}),e.jsx(Ke,{open:O,onOpenChange:T,token:_})]})}export{Ue as default}; diff --git a/hatchetembed/dashboard/assets/index-D7XvoUmw.js b/hatchetembed/dashboard/assets/index-D7XvoUmw.js deleted file mode 100644 index 076d0193d9..0000000000 --- a/hatchetembed/dashboard/assets/index-D7XvoUmw.js +++ /dev/null @@ -1 +0,0 @@ -import{k as r,h as Y,G as P,J as G,K as Z,M as J,N as X,O as ee,p as se,P as ae,U as w,Q as re,j as e,B as O,b as M,A as L,T,d as _,V as $,W as E,X as W,Y as h,Z as k,_ as te,$ as ne,a0 as ie,a1 as de,a2 as oe,a3 as F,e as B,a4 as le,a5 as ce,a6 as me,a7 as ue,a8 as xe,a9 as he,aa as V,ab as fe,ac as ge,S as pe,ad as v}from"./index-NcPpBRAY.js";import{N as je}from"./new-organization-saver-form-B3Ag7ruu.js";import{F as be}from"./ExclamationTriangleIcon-Okie-gQE.js";import{F as ve}from"./PlusIcon-ChBf4T_m.js";import"./welcome-modal-state-YrY6roPC.js";import"./shard-deployment-key-in4ZPoWA.js";import"./use-analytics-Jv1fF8RR.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="d7da868b-1a05-4107-9341-d352db1b37ee",s._sentryDebugIdIdentifier="sentry-dbid-d7da868b-1a05-4107-9341-d352db1b37ee")}catch{}})();function we({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const ye=r.forwardRef(we);function Ne({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"}))}const Ce=r.forwardRef(Ne);function Oe({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 11.25v8.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 1 0 9.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1 1 14.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const ke=r.forwardRef(Oe);function Re({title:s,titleId:a,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":a},n),s?r.createElement("title",{id:a},s):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const Ae=r.forwardRef(Re);function K(s){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(s/100)}function Ie(s){switch(s){case v.YCAlumni:case v.YCCurrentBatch:return"default";case v.Startup:return"secondary";default:return"outline"}}function Se(s){switch(s){case w.Approved:return"successful";case w.Redeemed:return"inProgress";default:return"queued"}}function Ee(s){return s===v.YCAlumni||s===v.YCCurrentBatch}const Q="__create_new_org__";function ze({offer:s,organizations:a,defaultOrgId:n,onRedeem:i,onCreateOrg:y,isRedeeming:o,redeemingOfferId:R}){const c=oe(),[N,f]=r.useState(null),[m,g]=r.useState(""),u=N??n,C=d=>{if(d===Q){y();return}f(d)},A=s.stage===w.Approved,I=s.stage===w.Redeemed,p=o&&R===s.recordId,j=Ee(s.type);return e.jsxs(E,{className:B(j&&"border-orange-400/60 bg-gradient-to-br from-orange-50/60 to-background dark:border-orange-500/40 dark:from-orange-950/20"),children:[e.jsxs(W,{className:"space-y-2 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[j&&e.jsx("span",{className:"mr-1 flex h-5 w-5 items-center justify-center rounded-sm bg-orange-500",children:e.jsx("span",{className:"text-xs font-bold leading-none text-white",children:"Y"})}),s.type?e.jsx(F,{variant:Ie(s.type),className:B(j&&"border-orange-300 bg-orange-500 text-white dark:border-orange-600 dark:bg-orange-600"),children:s.type}):e.jsx(le,{className:"text-base",children:"Offer"})]}),s.stage&&e.jsx(F,{variant:Se(s.stage),children:s.stage})]}),e.jsxs("div",{className:"mt-1 space-y-0.5",children:[e.jsx("p",{className:"text-base font-semibold",children:s.creditAmountCents?`${K(s.creditAmountCents)} credit`:"Credit offer"}),e.jsxs(ce,{children:[s.expiresAt&&`Expires ${new Date(s.expiresAt).toLocaleDateString()}`,s.expiresAt&&s.expiresInMonths&&" · ",s.expiresInMonths&&`Expires in ${s.expiresInMonths} month${s.expiresInMonths===1?"":"s"}`]})]})]}),A&&e.jsxs(k,{className:"space-y-3 px-5 pb-5 pt-1",children:[e.jsx("div",{className:"flex items-end gap-3",children:e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium",children:"Apply to organization"}),e.jsxs(me,{value:u,onValueChange:C,children:[e.jsx(ue,{children:e.jsx(xe,{placeholder:"Select an organization"})}),e.jsxs(he,{children:[a.map(d=>e.jsx(V,{value:d.metadata.id,children:d.name},d.metadata.id)),e.jsx(fe,{className:"my-1"}),e.jsx(V,{value:Q,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(ve,{className:"size-4"}),"Create new organization"]})})]})]})]})}),s.includesWelcomeKit&&e.jsxs("div",{className:"rounded-lg border border-dashed border-primary/30 bg-primary/5 p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(Ae,{className:"size-5 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"This offer includes a welcome kit!"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"We'll ship some swag to your door. Enter your shipping address below."})]})]}),e.jsx(ge,{placeholder:"Street address, city, state, zip code, country",value:m,onChange:d=>g(d.target.value),rows:3,className:"bg-background"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[c.enabled?e.jsxs(O,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground",onClick:c.show,children:[e.jsx(Ce,{className:"size-4"}),"Questions?"]}):e.jsx("div",{}),e.jsx(O,{onClick:()=>i(s.recordId,u,s.includesWelcomeKit?m:void 0),disabled:!u||o||s.includesWelcomeKit&&!m.trim(),children:p?e.jsxs(e.Fragment,{children:[e.jsx(pe,{}),"Redeeming..."]}):"Redeem Offer"})]})]}),I&&e.jsx(k,{className:"px-5 pb-5 pt-1",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx($,{className:"size-4 text-green-500"}),"This offer has been redeemed."]})})]})}function Ve(){const s=Y(),a=P(),{organizations:n,isUserUniverseLoaded:i,getOrganizationIdForTenant:y}=G(),o=Z(J),[R,c]=r.useState(null),[N,f]=r.useState(null),[m,g]=r.useState(null),u=X({...ee.cloud.offers()}),C=se({mutationKey:["offer:redeem"],mutationFn:async t=>(await re.userOfferRedeem({offerRecordId:t.offerRecordId,organizationId:t.organizationId,address:t.address})).data,onMutate:async t=>{await a.cancelQueries({queryKey:["offers:list"]});const b=a.getQueryData(["offers:list"]);return a.setQueryData(["offers:list"],l=>l&&l.map(x=>x.recordId===t.offerRecordId?{...x,stage:w.Redeemed}:x)),{previous:b}},onSuccess:t=>{f(null),g(`${K(t.appliedCents)} in credit has been applied to your organization.`),a.refetchQueries({queryKey:["offers:list"]}),c(null)},onError:(t,b,l)=>{var z,D;l!=null&&l.previous&&a.setQueryData(["offers:list"],l.previous),g(null);let x="An unexpected error occurred.";if(t instanceof ae){const S=(D=(z=t.response)==null?void 0:z.data)==null?void 0:D.errors;Array.isArray(S)&&S.length>0&&(x=S.map(H=>H.description||"Unknown error").join(", "))}f(x),a.refetchQueries({queryKey:["offers:list"]}),c(null)}}),A=(t,b,l)=>{f(null),g(null),c(t),C.mutate({offerRecordId:t,organizationId:b,address:l})},[I,p]=r.useState(!1),j=u.isLoading||!i,d=u.data??[],U=r.useMemo(()=>{if(o!=null&&o.metadata.id){const t=y(o.metadata.id);if(t)return t}return n.length>0?n[0].metadata.id:""},[o==null?void 0:o.metadata.id,y,n]),q=()=>{p(!0)};return e.jsxs("div",{className:"max-h-full overflow-y-auto",children:[e.jsxs("div",{className:"mx-auto max-w-2xl space-y-6 p-6",children:[e.jsx("div",{className:"flex items-center gap-4",children:e.jsxs(O,{variant:"ghost",size:"sm",onClick:()=>s({to:M.authenticatedRoute.to}),className:"gap-2 text-muted-foreground",children:[e.jsx(ye,{className:"size-4"}),"Back to Dashboard"]})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Redeem Offers"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"View and redeem available offers for your account."})]}),N&&e.jsxs(L,{variant:"destructive",children:[e.jsx(be,{className:"size-4"}),e.jsx(T,{children:"Redemption failed"}),e.jsx(_,{children:N})]}),m&&e.jsxs(L,{variant:"default",className:"border-green-500/50",children:[e.jsx($,{className:"size-4 text-green-500"}),e.jsx(T,{children:"Offer redeemed"}),e.jsx(_,{children:m})]}),j?e.jsx("div",{className:"space-y-4",children:e.jsxs(E,{children:[e.jsxs(W,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(h,{className:"h-5 w-28 rounded-md"}),e.jsx(h,{className:"h-5 w-20 rounded-md"})]}),e.jsx(h,{className:"mt-2 h-4 w-44"})]}),e.jsx(k,{children:e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(h,{className:"h-4 w-36"}),e.jsx(h,{className:"h-9 w-full rounded-md"})]}),e.jsx(h,{className:"h-9 w-24 rounded-md"})]})})]})}):d.length===0?e.jsx(E,{children:e.jsxs(k,{className:"py-16 text-center",children:[e.jsx(ke,{className:"mx-auto mb-4 h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mb-2 text-lg font-medium",children:"No Offers Available"}),e.jsx("p",{className:"mb-4 text-muted-foreground",children:"There are no offers associated with your account at this time."}),e.jsx(O,{variant:"outline",onClick:()=>s({to:M.authenticatedRoute.to}),children:"Go to Dashboard"})]})}):e.jsx("div",{className:"space-y-4",children:d.map(t=>e.jsx(ze,{offer:t,organizations:n,defaultOrgId:U,onRedeem:A,onCreateOrg:q,isRedeeming:C.isPending,redeemingOfferId:R},t.recordId))})]}),e.jsx(te,{open:I,onOpenChange:p,children:e.jsxs(ne,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(ie,{children:e.jsx(de,{children:"Create New Organization"})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(je,{afterSave:()=>{p(!1),a.invalidateQueries({queryKey:["organization:list"]})}})})]})})]})}export{Ve as default}; diff --git a/hatchetembed/dashboard/assets/index-DGszS3I6.js b/hatchetembed/dashboard/assets/index-DGszS3I6.js deleted file mode 100644 index 7282eee92b..0000000000 --- a/hatchetembed/dashboard/assets/index-DGszS3I6.js +++ /dev/null @@ -1 +0,0 @@ -import{k as o,j as e,e as P,d6 as O,a3 as l,d3 as F,bj as A,b8 as $,L as f,d7 as k,d8 as c,cI as B,cj as V,aI as T,b as d,N as w,d9 as K,O as R,h as G,p as M,a as U,F as u,i as q,B as C,d2 as H,da as z,db as Z,dc as J,dd as S,de as W,df as Q,dg as X,dh as Y}from"./index-NcPpBRAY.js";import{C as ee}from"./confirm-dialog-Bv8agSqW.js";import{R as se}from"./resource-not-found-DGbig0ge.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="0ba42c10-9fe9-44e8-b472-8fedd6efe202",s._sentryDebugIdIdentifier="sentry-dbid-0ba42c10-9fe9-44e8-b472-8fedd6efe202")}catch{}})();function te({title:s,titleId:t,...r},i){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},r),s?o.createElement("title",{id:t},s):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"}))}const re=o.forwardRef(te);function ae({tags:s}){return s==null?void 0:s.map(t=>e.jsx("div",{className:P(`text-[${t.color}] bg-[${t.color}]/10 ring-[${t.color}]/30`,"flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset"),children:t.name},t.name))}function ne(s){switch(s){case c.CANCEL_IN_PROGRESS:return"Cancel In Progress";case c.DROP_NEWEST:return"Drop Newest";case c.QUEUE_NEWEST:return"Queue Newest";case c.GROUP_ROUND_ROBIN:return"Group Round Robin";default:return s}}function ie(s){switch(s){case k.WORKFLOW:return"Workflow";case k.TASK:return"Task";default:return s}}function oe({workflow:s}){var r,i;const t=((r=s.triggers)==null?void 0:r.events)&&s.triggers.events.length>0||((i=s.triggers)==null?void 0:i.crons)&&s.triggers.crons.length>0;return e.jsxs("div",{className:"space-y-5",children:[t&&e.jsx(m,{title:"Triggers",children:e.jsx(le,{workflow:s})}),e.jsx(m,{title:"Concurrency",children:e.jsx(ce,{workflow:s})}),e.jsx(m,{title:"Other",children:e.jsx(de,{workflow:s})}),e.jsx(O,{workflowConfig:s.workflowConfig})]})}function m({title:s,children:t}){return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"border-b border-gray-200 pb-2 text-base font-semibold text-gray-900 dark:border-gray-700 dark:text-gray-100",children:s}),e.jsx("div",{className:"pl-1",children:t})]})}function g({message:s}){return e.jsx("p",{className:"text-sm italic text-gray-500 dark:text-gray-400",children:s})}function L({label:s,children:t,description:r}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:s}),t,r&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r})]})}function le({workflow:s}){return s.triggers?e.jsxs("div",{className:"space-y-2",children:[s.triggers.events&&s.triggers.events.length>0&&e.jsx(L,{label:"Events",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:s.triggers.events.map(t=>e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:t.event_key},t.event_key))})}),s.triggers.crons&&s.triggers.crons.length>0&&e.jsx(L,{label:"Cron Schedules",children:e.jsx("div",{className:"max-h-72 space-y-2 overflow-y-auto pr-2",children:s.triggers.crons.map(t=>e.jsxs("div",{children:[e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:t.cron},t.cron),t.cron&&e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:["Runs ",F(t.cron)]})]},t.cron))})})]}):e.jsx(g,{message:"There are no trigger settings for this workflow."})}function ce({workflow:s}){return!s.v1Concurrency||s.v1Concurrency.length===0?e.jsx(g,{message:"There are no concurrency settings for this workflow."}):e.jsx(A,{data:s.v1Concurrency.map(t=>({stepReadableId:t.stepReadableId||"N/A",...t})).sort((t,r)=>r.scope.localeCompare(t.scope)||t.stepReadableId.localeCompare(r.stepReadableId)),rowKey:(t,r)=>`${t.scope}-${t.stepReadableId}-${r}`,columns:[{columnLabel:"Scope",cellRenderer:t=>ie(t.scope)},{columnLabel:"Task",cellRenderer:t=>t.stepReadableId},{columnLabel:"Max",cellRenderer:t=>t.maxRuns},{columnLabel:"Strategy",cellRenderer:t=>e.jsx(l,{variant:"secondary",children:ne(t.limitStrategy)})},{columnLabel:"Expression",cellRenderer:t=>e.jsx($,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:t.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"})}]})}function de({workflow:s}){return s.sticky||s.defaultPriority?e.jsxs("div",{className:"space-y-2",children:[s.sticky&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Sticky Strategy:"}),e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:s.sticky})]}),s.defaultPriority&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Default Priority:"}),e.jsx(l,{variant:"secondary",className:"font-mono text-sm",children:s.defaultPriority})]})]}):e.jsx(g,{message:"No additional configuration set for this workflow."})}function ge(){var b,N;const[s]=o.useState(),{tenantId:t}=B(),[r,i]=o.useState(!1),[E,h]=o.useState(!1),{refetchInterval:y}=V(),p=T({from:d.tenantWorkflowRoute.to}),a=w({...R.workflows.get(p.workflow),refetchInterval:y,retry:(D,_)=>K(_)}),x=w({...R.workflows.getVersion(p.workflow,s),refetchInterval:y}),I=G(),j=M({mutationKey:["workflow:delete",(b=a==null?void 0:a.data)==null?void 0:b.metadata.id],mutationFn:async()=>a!=null&&a.data?(await U.workflowDelete(a==null?void 0:a.data.metadata.id)).data:void 0,onSuccess:()=>{I({to:d.tenantWorkflowsRoute.to,params:{tenant:t}})}}),n=a.data;if(a.isLoading)return e.jsx(u,{});if(a.isError){if(q(a.error)&&((N=a.error.response)==null?void 0:N.status)===404)return e.jsx(se,{resource:"Workflow",primaryAction:{label:"Back to Workflows",navigate:{to:d.tenantWorkflowsRoute.to,params:{tenant:t}}}});throw a.error}if(!n)return e.jsx(u,{});const v=n.versions&&n.versions[0].version;return e.jsxs("div",{className:"flex h-full w-full flex-grow flex-col gap-y-4 overflow-hidden",children:[e.jsxs("div",{className:"flex-shrink-0 p-4",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(re,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:n.name}),v&&e.jsx(l,{className:"mt-1 text-sm",variant:"outline",children:v}),e.jsx(l,{variant:"successful",className:"px-2",children:"Active"})]}),e.jsx(ae,{tags:n.tags||[]}),e.jsx("div",{className:"flex flex-row gap-2",children:e.jsx(C,{className:"text-sm",onClick:()=>i(!0),children:"Trigger Workflow"})}),e.jsx(H,{show:r,defaultWorkflow:n,onClose:()=>i(!1)})]}),e.jsx("div",{className:"mt-4 flex flex-row items-center justify-start",children:e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Updated"," ",z(n.versions&&n.versions[0].metadata.updatedAt)]})}),n.description&&e.jsx("div",{className:"mt-4 text-sm text-gray-700 dark:text-gray-300",children:n.description})]}),e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-6 lg:px-8",children:e.jsxs(Z,{defaultValue:"runs",className:"flex h-full flex-col",children:[e.jsxs(J,{layout:"underlined",className:"mb-4",children:[e.jsx(S,{variant:"underlined",value:"runs",children:"Runs"}),e.jsx(S,{variant:"underlined",value:"settings",children:"Settings"})]}),e.jsx(W,{value:"runs",className:"min-h-0 flex-1",children:e.jsx(xe,{})}),e.jsxs(W,{value:"settings",className:"min-h-0 flex-1 overflow-y-auto pt-4 pb-8",children:[x.isLoading||!x.data?e.jsx(u,{}):e.jsx(oe,{workflow:x.data}),e.jsx("div",{className:"mt-8",children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"border-b border-gray-200 pb-2 text-base font-semibold text-gray-900 dark:border-gray-700 dark:text-gray-100",children:"Danger Zone"}),e.jsx("div",{className:"pl-1",children:e.jsx("div",{className:"max-w-xl rounded-md border border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-800/50",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:"Delete Workflow"}),e.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:"Permanently delete this workflow and all its data. This action cannot be undone."})]}),e.jsx(C,{variant:"destructive",size:"sm",onClick:()=>{h(!0)},children:"Delete Workflow"})]})})})]})}),e.jsx(ee,{title:"Delete workflow",description:`Are you sure you want to delete the workflow ${n.name}? This action cannot be undone, and will immediately prevent any services running with this workflow from executing steps.`,submitLabel:"Delete",onSubmit:function(){j.mutate()},onCancel:function(){h(!1)},isLoading:j.isPending,isOpen:E})]})]})})]})}function xe(){const s=T({from:d.tenantWorkflowRoute.to});return e.jsx(Q,{tableKey:`workflow-${s.workflow}`,initColumnVisibility:{Workflow:!1},filterVisibility:{Workflow:!1},display:{hideMetrics:!0,hiddenFilters:[X]},runFilters:{workflowId:s.workflow},children:e.jsx(Y,{})})}export{ge as default}; diff --git a/hatchetembed/dashboard/assets/index-DOf3AD-4.js b/hatchetembed/dashboard/assets/index-DOf3AD-4.js deleted file mode 100644 index a7fc73068d..0000000000 --- a/hatchetembed/dashboard/assets/index-DOf3AD-4.js +++ /dev/null @@ -1 +0,0 @@ -import{cG as t}from"./index-NcPpBRAY.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new C.Error().stack;i&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[i]="d7165cba-8c44-4f61-91bc-2688422f9a89",C._sentryDebugIdIdentifier="sentry-dbid-d7165cba-8c44-4f61-91bc-2688422f9a89")}catch{}})();function H(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM13 12H17V14H11V7H13V12Z"},child:[]}]})(C)}function l(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3.33946 17.0002C2.90721 16.2515 2.58277 15.4702 2.36133 14.6741C3.3338 14.1779 3.99972 13.1668 3.99972 12.0002C3.99972 10.8345 3.3348 9.824 2.36353 9.32741C2.81025 7.71651 3.65857 6.21627 4.86474 4.99001C5.7807 5.58416 6.98935 5.65534 7.99972 5.072C9.01009 4.48866 9.55277 3.40635 9.4962 2.31604C11.1613 1.8846 12.8847 1.90004 14.5031 2.31862C14.4475 3.40806 14.9901 4.48912 15.9997 5.072C17.0101 5.65532 18.2187 5.58416 19.1346 4.99007C19.7133 5.57986 20.2277 6.25151 20.66 7.00021C21.0922 7.7489 21.4167 8.53025 21.6381 9.32628C20.6656 9.82247 19.9997 10.8336 19.9997 12.0002C19.9997 13.166 20.6646 14.1764 21.6359 14.673C21.1892 16.2839 20.3409 17.7841 19.1347 19.0104C18.2187 18.4163 17.0101 18.3451 15.9997 18.9284C14.9893 19.5117 14.4467 20.5941 14.5032 21.6844C12.8382 22.1158 11.1148 22.1004 9.49633 21.6818C9.55191 20.5923 9.00929 19.5113 7.99972 18.9284C6.98938 18.3451 5.78079 18.4162 4.86484 19.0103C4.28617 18.4205 3.77172 17.7489 3.33946 17.0002ZM8.99972 17.1964C10.0911 17.8265 10.8749 18.8227 11.2503 19.9659C11.7486 20.0133 12.2502 20.014 12.7486 19.9675C13.1238 18.8237 13.9078 17.8268 14.9997 17.1964C16.0916 16.5659 17.347 16.3855 18.5252 16.6324C18.8146 16.224 19.0648 15.7892 19.2729 15.334C18.4706 14.4373 17.9997 13.2604 17.9997 12.0002C17.9997 10.74 18.4706 9.5632 19.2729 8.6665C19.1688 8.4405 19.0538 8.21822 18.9279 8.00021C18.802 7.78219 18.667 7.57148 18.5233 7.36842C17.3457 7.61476 16.0911 7.43414 14.9997 6.80405C13.9083 6.17395 13.1246 5.17768 12.7491 4.03455C12.2509 3.98714 11.7492 3.98646 11.2509 4.03292C10.8756 5.17671 10.0916 6.17364 8.99972 6.80405C7.9078 7.43447 6.65245 7.61494 5.47428 7.36803C5.18485 7.77641 4.93463 8.21117 4.72656 8.66637C5.52881 9.56311 5.99972 10.74 5.99972 12.0002C5.99972 13.2604 5.52883 14.4372 4.72656 15.3339C4.83067 15.5599 4.94564 15.7822 5.07152 16.0002C5.19739 16.2182 5.3324 16.4289 5.47612 16.632C6.65377 16.3857 7.90838 16.5663 8.99972 17.1964ZM11.9997 15.0002C10.3429 15.0002 8.99972 13.6571 8.99972 12.0002C8.99972 10.3434 10.3429 9.00021 11.9997 9.00021C13.6566 9.00021 14.9997 10.3434 14.9997 12.0002C14.9997 13.6571 13.6566 15.0002 11.9997 15.0002ZM11.9997 13.0002C12.552 13.0002 12.9997 12.5525 12.9997 12.0002C12.9997 11.4479 12.552 11.0002 11.9997 11.0002C11.4474 11.0002 10.9997 11.4479 10.9997 12.0002C10.9997 12.5525 11.4474 13.0002 11.9997 13.0002Z"},child:[]}]})(C)}function a(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4C3 3.44772 3.44772 3 4 3H10C10.5523 3 11 3.44772 11 4V10C11 10.5523 10.5523 11 10 11H4C3.44772 11 3 10.5523 3 10V4ZM3 14C3 13.4477 3.44772 13 4 13H10C10.5523 13 11 13.4477 11 14V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V14ZM13 4C13 3.44772 13.4477 3 14 3H20C20.5523 3 21 3.44772 21 4V10C21 10.5523 20.5523 11 20 11H14C13.4477 11 13 10.5523 13 10V4ZM13 14C13 13.4477 13.4477 13 14 13H20C20.5523 13 21 13.4477 21 14V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V14ZM15 5V9H19V5H15ZM15 15V19H19V15H15ZM5 5V9H9V5H5ZM5 15V19H9V15H5Z"},child:[]}]})(C)}function n(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 4V6H20L15 13.5V22H9V13.5L4 6H3V4H21ZM6.4037 6L11 12.8944V20H13V12.8944L17.5963 6H6.4037Z"},child:[]}]})(C)}function e(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z"},child:[]}]})(C)}function o(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 18.3915V5.60846L18.2264 12L8 18.3915ZM6 3.80421V20.1957C6 20.9812 6.86395 21.46 7.53 21.0437L20.6432 12.848C21.2699 12.4563 21.2699 11.5436 20.6432 11.152L7.53 2.95621C6.86395 2.53993 6 3.01878 6 3.80421Z"},child:[]}]})(C)}function c(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM18 17V10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10V17H18ZM9 21H15V23H9V21Z"},child:[]}]})(C)}function d(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M7 3V6H3V8H7V11H9V3H7ZM11 8H21V6H11V8ZM17 13V16H21V18H17V21H15V13H17ZM13 18H3V16H13V18Z"},child:[]}]})(C)}function u(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19.7134 8.12811L19.4668 8.69379C19.2864 9.10792 18.7136 9.10792 18.5331 8.69379L18.2866 8.12811C17.8471 7.11947 17.0555 6.31641 16.0677 5.87708L15.308 5.53922C14.8973 5.35653 14.8973 4.75881 15.308 4.57612L16.0252 4.25714C17.0384 3.80651 17.8442 2.97373 18.2761 1.93083L18.5293 1.31953C18.7058 0.893489 19.2942 0.893489 19.4706 1.31953L19.7238 1.93083C20.1558 2.97373 20.9616 3.80651 21.9748 4.25714L22.6919 4.57612C23.1027 4.75881 23.1027 5.35653 22.6919 5.53922L21.9323 5.87708C20.9445 6.31641 20.1529 7.11947 19.7134 8.12811ZM15 21.5386L9 7.53861L6.6594 13H1V11H5.3406L9 2.46143L15 16.4614L17.3406 11H23V13H18.6594L15 21.5386Z"},child:[]}]})(C)}function L(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 3C15.5523 3 16 3.44772 16 4V8C16 8.55228 15.5523 9 15 9H13V11H17C17.5523 11 18 11.4477 18 12V15H20C20.5523 15 21 15.4477 21 16V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V16C13 15.4477 13.4477 15 14 15H16V13H8V15H10C10.5523 15 11 15.4477 11 16V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V16C3 15.4477 3.44772 15 4 15H6V12C6 11.4477 6.44772 11 7 11H11V9H9C8.44772 9 8 8.55228 8 8V4C8 3.44772 8.44772 3 9 3H15ZM9 17H5V19H9V17ZM19 17H15V19H19V17ZM14 5H10V7H14V5Z"},child:[]}]})(C)}function M(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8.86874 14.1392C8.6556 14.4912 8.55014 14.7778 8.72043 15.2253C9.1905 16.4613 8.52737 17.664 7.28097 17.9905C6.10556 18.2985 4.96035 17.526 4.72713 16.2676C4.52048 15.1537 5.38488 14.0617 6.61294 13.8877C6.67963 13.8781 6.74717 13.874 6.83351 13.8688C6.88044 13.866 6.93293 13.8628 6.99384 13.8582L8.86194 10.7257C7.687 9.55742 6.98767 8.19164 7.14246 6.49936C7.25188 5.30308 7.72226 4.26933 8.58208 3.42201C10.2288 1.79945 12.7411 1.53667 14.68 2.78212C16.5423 3.97841 17.3951 6.30867 16.6681 8.30311L14.9611 7.84C15.1895 6.73115 15.0206 5.73536 14.2727 4.88234C13.7786 4.31914 13.1446 4.02394 12.4236 3.91516C10.9783 3.69681 9.55922 4.6254 9.13816 6.04399C8.66019 7.65406 9.38355 8.96924 11.3603 9.96029C10.5311 11.3541 9.70859 12.7518 8.86874 14.1392ZM13.7838 8.27337C14.3816 9.32798 14.9886 10.3986 15.5902 11.4593C18.631 10.5186 20.9237 12.2018 21.7462 14.004C22.7396 16.1809 22.0605 18.7593 20.1094 20.1023C18.1067 21.481 15.5741 21.2454 13.7997 19.4744L15.1919 18.3094C16.9444 19.4445 18.4772 19.3911 19.6151 18.047C20.5855 16.9003 20.5644 15.1906 19.5659 14.068C18.4136 12.7726 16.8701 12.7331 15.0044 13.9767C14.2305 12.6037 13.443 11.2413 12.6936 9.85845C12.4409 9.39233 12.1618 9.12196 11.5923 9.0233C10.6411 8.85839 10.027 8.04157 9.99016 7.12642C9.95395 6.22138 10.4871 5.4033 11.3205 5.08455C12.146 4.7688 13.1148 5.02367 13.6701 5.72554C14.1239 6.29901 14.2681 6.94443 14.0293 7.65167C13.9843 7.7852 13.9304 7.91584 13.8713 8.05885C13.8431 8.12694 13.8138 8.19801 13.7838 8.27337ZM11.552 16.895H15.2126C15.2636 16.963 15.3113 17.0303 15.3579 17.0959C15.4551 17.233 15.5474 17.3632 15.6551 17.4788C16.4304 18.3077 17.7395 18.3489 18.5682 17.5795C19.4271 16.7821 19.466 15.4426 18.6544 14.6101C17.8602 13.7955 16.5029 13.7177 15.7655 14.5802C15.3176 15.1044 14.8586 15.166 14.2641 15.1567C12.7414 15.1332 11.2177 15.149 9.69524 15.149C9.79406 17.2909 8.98436 18.6255 7.37841 18.9424C5.80582 19.2528 4.3575 18.4504 3.84759 16.9864C3.26842 15.3229 3.98467 13.9925 6.05421 12.9366C5.89847 12.3725 5.74115 11.8016 5.58541 11.236C3.32977 11.7276 1.63749 13.916 1.8122 16.378C1.96652 18.5514 3.71968 20.4815 5.86369 20.8273C7.02819 21.0153 8.12233 20.82 9.13741 20.2442C10.4433 19.5032 11.2011 18.3381 11.552 16.895Z"},child:[]}]})(C)}function Z(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6.52739 14.5136C6.52739 15.5966 5.64264 16.4814 4.55959 16.4814C3.47654 16.4814 2.5918 15.5966 2.5918 14.5136C2.5918 13.4305 3.47654 12.5458 4.55959 12.5458H6.52739V14.5136ZM7.51892 14.5136C7.51892 13.4305 8.40366 12.5458 9.48671 12.5458C10.5698 12.5458 11.4545 13.4305 11.4545 14.5136V19.4407C11.4545 20.5238 10.5698 21.4085 9.48671 21.4085C8.40366 21.4085 7.51892 20.5238 7.51892 19.4407V14.5136ZM9.48671 6.52715C8.40366 6.52715 7.51892 5.6424 7.51892 4.55935C7.51892 3.4763 8.40366 2.59155 9.48671 2.59155C10.5698 2.59155 11.4545 3.4763 11.4545 4.55935V6.52715H9.48671ZM9.48671 7.51867C10.5698 7.51867 11.4545 8.40342 11.4545 9.48647C11.4545 10.5695 10.5698 11.4543 9.48671 11.4543H4.55959C3.47654 11.4543 2.5918 10.5695 2.5918 9.48647C2.5918 8.40342 3.47654 7.51867 4.55959 7.51867H9.48671ZM17.4732 9.48647C17.4732 8.40342 18.3579 7.51867 19.4409 7.51867C20.524 7.51867 21.4087 8.40342 21.4087 9.48647C21.4087 10.5695 20.524 11.4543 19.4409 11.4543H17.4732V9.48647ZM16.4816 9.48647C16.4816 10.5695 15.5969 11.4543 14.5138 11.4543C13.4308 11.4543 12.546 10.5695 12.546 9.48647V4.55935C12.546 3.4763 13.4308 2.59155 14.5138 2.59155C15.5969 2.59155 16.4816 3.4763 16.4816 4.55935V9.48647ZM14.5138 17.4729C15.5969 17.4729 16.4816 18.3577 16.4816 19.4407C16.4816 20.5238 15.5969 21.4085 14.5138 21.4085C13.4308 21.4085 12.546 20.5238 12.546 19.4407V17.4729H14.5138ZM14.5138 16.4814C13.4308 16.4814 12.546 15.5966 12.546 14.5136C12.546 13.4305 13.4308 12.5458 14.5138 12.5458H19.4409C20.524 12.5458 21.4087 13.4305 21.4087 14.5136C21.4087 15.5966 20.524 16.4814 19.4409 16.4814H14.5138Z"},child:[]}]})(C)}function h(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z"},child:[]}]})(C)}function f(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M19.3034 5.33716C17.9344 4.71103 16.4805 4.2547 14.9629 4C14.7719 4.32899 14.5596 4.77471 14.411 5.12492C12.7969 4.89144 11.1944 4.89144 9.60255 5.12492C9.45397 4.77471 9.2311 4.32899 9.05068 4C7.52251 4.2547 6.06861 4.71103 4.70915 5.33716C1.96053 9.39111 1.21766 13.3495 1.5891 17.2549C3.41443 18.5815 5.17612 19.388 6.90701 19.9187C7.33151 19.3456 7.71356 18.73 8.04255 18.0827C7.41641 17.8492 6.82211 17.5627 6.24904 17.2231C6.39762 17.117 6.5462 17.0003 6.68416 16.8835C10.1438 18.4648 13.8911 18.4648 17.3082 16.8835C17.4568 17.0003 17.5948 17.117 17.7434 17.2231C17.1703 17.5627 16.576 17.8492 15.9499 18.0827C16.2789 18.73 16.6609 19.3456 17.0854 19.9187C18.8152 19.388 20.5875 18.5815 22.4033 17.2549C22.8596 12.7341 21.6806 8.80747 19.3034 5.33716ZM8.5201 14.8459C7.48007 14.8459 6.63107 13.9014 6.63107 12.7447C6.63107 11.5879 7.45884 10.6434 8.5201 10.6434C9.57071 10.6434 10.4303 11.5879 10.4091 12.7447C10.4091 13.9014 9.57071 14.8459 8.5201 14.8459ZM15.4936 14.8459C14.4535 14.8459 13.6034 13.9014 13.6034 12.7447C13.6034 11.5879 14.4323 10.6434 15.4936 10.6434C16.5442 10.6434 17.4038 11.5879 17.3825 12.7447C17.3825 13.9014 16.5548 14.8459 15.4936 14.8459Z"},child:[]}]})(C)}function s(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 8V20.9932C21 21.5501 20.5552 22 20.0066 22H3.9934C3.44495 22 3 21.556 3 21.0082V2.9918C3 2.45531 3.4487 2 4.00221 2H14.9968L21 8ZM19 9H14V4H5V20H19V9ZM8 7H11V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z"},child:[]}]})(C)}function g(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 18H18V6H6V18ZM14 20H10V22H8V20H5C4.44772 20 4 19.5523 4 19V16H2V14H4V10H2V8H4V5C4 4.44772 4.44772 4 5 4H8V2H10V4H14V2H16V4H19C19.5523 4 20 4.44772 20 5V8H22V10H20V14H22V16H20V19C20 19.5523 19.5523 20 19 20H16V22H14V20ZM8 8H16V16H8V8Z"},child:[]}]})(C)}function p(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20.0833 15.1999L21.2854 15.9212C21.5221 16.0633 21.5989 16.3704 21.4569 16.6072C21.4146 16.6776 21.3557 16.7365 21.2854 16.7787L12.5144 22.0412C12.1977 22.2313 11.8021 22.2313 11.4854 22.0412L2.71451 16.7787C2.47772 16.6366 2.40093 16.3295 2.54301 16.0927C2.58523 16.0223 2.64413 15.9634 2.71451 15.9212L3.9166 15.1999L11.9999 20.0499L20.0833 15.1999ZM20.0833 10.4999L21.2854 11.2212C21.5221 11.3633 21.5989 11.6704 21.4569 11.9072C21.4146 11.9776 21.3557 12.0365 21.2854 12.0787L11.9999 17.6499L2.71451 12.0787C2.47772 11.9366 2.40093 11.6295 2.54301 11.3927C2.58523 11.3223 2.64413 11.2634 2.71451 11.2212L3.9166 10.4999L11.9999 15.3499L20.0833 10.4999ZM12.5144 1.30864L21.2854 6.5712C21.5221 6.71327 21.5989 7.0204 21.4569 7.25719C21.4146 7.32757 21.3557 7.38647 21.2854 7.42869L11.9999 12.9999L2.71451 7.42869C2.47772 7.28662 2.40093 6.97949 2.54301 6.7427C2.58523 6.67232 2.64413 6.61343 2.71451 6.5712L11.4854 1.30864C11.8021 1.11864 12.1977 1.11864 12.5144 1.30864ZM11.9999 3.33233L5.88723 6.99995L11.9999 10.6676L18.1126 6.99995L11.9999 3.33233Z"},child:[]}]})(C)}function w(C){return t({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM11 13V17H6V13H11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"},child:[]}]})(C)}export{o as R,u as a,s as b,w as c,H as d,M as e,p as f,a as g,g as h,d as i,n as j,l as k,L as l,c as m,e as n,f as o,h as p,Z as q}; diff --git a/hatchetembed/dashboard/assets/index-DQrE5gCH.js b/hatchetembed/dashboard/assets/index-DQrE5gCH.js deleted file mode 100644 index 80503536aa..0000000000 --- a/hatchetembed/dashboard/assets/index-DQrE5gCH.js +++ /dev/null @@ -1 +0,0 @@ -import{x as H,k as g,l as N,n as J,p as R,u as k,t as F,j as e,_ as O,$ as z,a0 as U,a1 as _,bc as G,L as E,I as y,B as L,S as B,o as Q,s as M,aG as Y,C as X,af as Z,y as D,q as ee,cR as K,bm as se,a6 as ae,a7 as ne,a8 as re,a9 as te,aa as P,e as oe,bo as ie,bx as C,aL as T,bj as V,aM as le,aN as de,aO as ce,a3 as me,aP as ue,cI as xe,au as he,J as ge,N as A,P as pe,g as we,b as be,b6 as je}from"./index-NcPpBRAY.js";import{S as fe}from"./settings-page-header-CkCZd3CN.js";import{I}from"./inline-error-BRPaHH6l.js";import{C as W}from"./confirm-dialog-Bv8agSqW.js";import{u as S}from"./tenant-wrapper-CsXNqzkl.js";import{M as q,R as $}from"./member-primitives-r9nHLQI3.js";import{g as ve}from"./global-emitter-kjRqhIKI.js";import{F as Ee}from"./PlusIcon-ChBf4T_m.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="36ae4f46-4cd2-412e-bfdf-15db93f2eff5",s._sentryDebugIdIdentifier="sentry-dbid-36ae4f46-4cd2-412e-bfdf-15db93f2eff5")}catch{}})();const ye=Q({password:M().min(1,"Enter your current password"),newPassword:M().min(8,"New password must be at least 8 characters"),confirmNewPassword:M()}).refine(s=>s.newPassword===s.confirmNewPassword,{message:"Passwords do not match",path:["confirmNewPassword"]});function Ce({onClose:s}){var w,v,p,b,j,f;const{toast:n}=H(),[l,c]=g.useState([]),{handleApiError:d}=N({setErrors:c}),{userUpdatePasswordMutation:r}=J(),t=R({...r(),onSuccess:()=>{n({title:"Password updated",duration:4e3}),s()},onError:d}),{register:a,handleSubmit:m,formState:{errors:i}}=k({resolver:F(ye)}),u=(v=(w=i.password)==null?void 0:w.message)==null?void 0:v.toString(),o=(b=(p=i.newPassword)==null?void 0:p.message)==null?void 0:b.toString(),h=(f=(j=i.confirmNewPassword)==null?void 0:j.message)==null?void 0:f.toString();return e.jsx(O,{open:!0,onOpenChange:x=>!x&&s(),children:e.jsxs(z,{className:"max-w-md",children:[e.jsxs(U,{children:[e.jsx(_,{children:"Change password"}),e.jsx(G,{children:"Update the password you use to sign in."})]}),e.jsx("form",{onSubmit:m(x=>{c([]),t.mutate({password:x.password,newPassword:x.newPassword})}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx(I,{errors:l}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"current-password",children:"Current password"}),e.jsx(y,{...a("password"),id:"current-password",type:"password",autoComplete:"current-password",disabled:t.isPending}),u&&e.jsx("div",{className:"text-sm text-red-500",children:u})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"new-password",children:"New password"}),e.jsx(y,{...a("newPassword"),id:"new-password",type:"password",autoComplete:"new-password",disabled:t.isPending}),o&&e.jsx("div",{className:"text-sm text-red-500",children:o})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"confirm-new-password",children:"Confirm new password"}),e.jsx(y,{...a("confirmNewPassword"),id:"confirm-new-password",type:"password",autoComplete:"new-password",disabled:t.isPending}),h&&e.jsx("div",{className:"text-sm text-red-500",children:h})]}),e.jsxs(L,{disabled:t.isPending,children:[t.isPending&&e.jsx(B,{}),"Update password"]})]})})]})})}function Ne({member:s,onChangePasswordClick:n,onEditRoleClick:l,tenantId:c,onDeleteSuccess:d}){const{user:r}=Y(),[t,a]=g.useState(!1),{handleApiError:m}=N({}),{meta:i}=X(),{isCloudEnabled:u}=Z(),{isControlPlaneEnabled:o}=D(),{tenantMemberDeleteMutation:h}=S(),w=R({mutationKey:["tenant-member:delete",c],mutationFn:async x=>{await h(c,x.memberId).mutationFn()},onSuccess:()=>{ee.invalidateQueries({queryKey:["tenant-member:list",c]}),d==null||d(),a(!1)},onError:x=>{m(x),a(!1)}}),v=s.role==="OWNER",p=!o||s.manually_added,b=p&&s.user.email!==(r==null?void 0:r.email)&&(i==null?void 0:i.allowInvites)&&!(u&&v),j=s.user.email===(r==null?void 0:r.email)&&(i==null?void 0:i.allowChangePassword),f=p&&s.user.email!==(r==null?void 0:r.email);return e.jsxs(e.Fragment,{children:[e.jsx(K,{row:s,actions:[...f?[{label:"Edit role",onClick:()=>l(s)}]:[],...j?[{label:"Change password",onClick:()=>n(s)}]:[],...b?[{label:"Remove from tenant",onClick:()=>a(!0)}]:[]]}),e.jsx(W,{isOpen:t,title:"Remove member",description:`Are you sure you want to remove ${s.user.name} from this tenant?`,submitLabel:"Remove",onSubmit:()=>{w.mutate({memberId:s.metadata.id})},onCancel:()=>a(!1),isLoading:w.isPending})]})}const Re=Q({role:ie(C)});function Se({className:s,...n}){var t,a;const{handleSubmit:l,control:c,formState:{errors:d}}=k({resolver:F(Re),defaultValues:{role:n.member.role}}),r=(a=(t=d.role)==null?void 0:t.message)==null?void 0:a.toString();return e.jsxs(z,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(U,{children:e.jsx(_,{children:"Update member role"})}),e.jsx("div",{className:oe("grid gap-6",s),children:e.jsx("form",{onSubmit:l(m=>{n.onSubmit(m)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsx(I,{errors:n.formErrors??[]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"name",children:"Name"}),e.jsx(y,{readOnly:!0,id:"name",value:n.member.user.name||"",disabled:!0})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"email",children:"Email"}),e.jsx(y,{readOnly:!0,id:"email",placeholder:"name@example.com",type:"email",value:n.member.user.email,autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:!0})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(E,{htmlFor:"role",children:"Role"}),e.jsx(se,{control:c,name:"role",render:({field:m})=>e.jsxs(ae,{onValueChange:m.onChange,...m,children:[e.jsx(ne,{className:"w-[180px]",children:e.jsx(re,{id:"role",placeholder:"Role..."})}),e.jsxs(te,{children:[(!n.isCloudEnabled||n.canSetOwnerRole)&&e.jsx(P,{value:"OWNER",children:"Owner"}),e.jsx(P,{value:"ADMIN",children:"Admin"}),e.jsx(P,{value:"MEMBER",children:"Member"})]})]})}),r&&e.jsx("div",{className:"text-sm text-red-500",children:r})]}),e.jsxs(L,{disabled:n.isLoading,children:[n.isLoading&&e.jsx(B,{}),"Update member"]})]})})})]})}function Me({member:s}){const n=s.manually_added;return e.jsx(le,{children:e.jsxs(de,{children:[e.jsx(ce,{asChild:!0,children:e.jsx(me,{variant:"outline",children:n?"Direct":"Tags"})}),e.jsx(ue,{children:e.jsx("p",{children:n?"Added to this tenant directly, rather than through tag matching.":"Membership derived from matching the organization's tenant tags."})})]})})}function Pe({tenantId:s,members:n,canManage:l,canManageOrganization:c,onMembersChanged:d}){const[r,t]=g.useState(null),[a,m]=g.useState(!1),{isControlPlaneEnabled:i}=D(),u=g.useMemo(()=>[{columnLabel:"Name",cellRenderer:o=>e.jsx("span",{className:"font-medium",children:o.user.name})},{columnLabel:"Email",cellRenderer:o=>e.jsx(q,{email:o.user.email})},{columnLabel:"Role",cellRenderer:o=>e.jsx($,{role:o.role})},{columnLabel:"Joined",cellRenderer:o=>e.jsx(T,{date:o.metadata.createdAt})},...i?[{columnLabel:"Source",cellRenderer:o=>e.jsx(Me,{member:o})}]:[],...l?[{columnLabel:"Actions",cellRenderer:o=>e.jsx(Ne,{member:o,tenantId:s,onEditRoleClick:!i||o.manually_added?t:()=>{},onChangePasswordClick:()=>m(!0),onDeleteSuccess:d})}]:[]],[l,i,d,s]);return e.jsxs(e.Fragment,{children:[e.jsx(V,{columns:u,data:n,rowKey:o=>o.metadata.id}),a&&e.jsx(Ce,{onClose:()=>m(!1)}),r&&e.jsx(Te,{tenantId:s,member:r,canManageOrganization:c,onClose:()=>t(null),onSuccess:()=>{t(null),d()}})]})}function Te({tenantId:s,member:n,canManageOrganization:l,onClose:c,onSuccess:d}){const[r,t]=g.useState([]),{handleApiError:a}=N({setErrors:t}),{tenantMemberUpdateMutation:m}=S(),i=m(s,n.metadata.id),u=R({...i,onSuccess:d,onError:h=>a(h)}),o=h=>{if(t([]),n.role===C.OWNER&&!l){t(["Owner role management must be done through organization membership."]);return}u.mutate(h)};return e.jsx(O,{open:!0,onOpenChange:c,children:e.jsx(Se,{isLoading:u.isPending,onSubmit:o,formErrors:r,member:n,isCloudEnabled:!0,canSetOwnerRole:l})})}function Le({invites:s,tenantId:n,canManage:l,onInviteRevoked:c}){const[d,r]=g.useState(null);if(s.length===0)return null;const t=[{columnLabel:"Email",cellRenderer:a=>e.jsx(q,{email:a.email})},{columnLabel:"Role",cellRenderer:a=>e.jsx($,{role:a.role})},{columnLabel:"Created",cellRenderer:a=>e.jsx(T,{date:a.metadata.createdAt})},{columnLabel:"Expires",cellRenderer:a=>e.jsx(T,{date:a.expires})},...l?[{columnLabel:"Actions",cellRenderer:a=>e.jsx(K,{row:a,actions:[{label:"Revoke invite",onClick:()=>r(a)}]})}]:[]];return e.jsxs("div",{className:"mt-6 space-y-2",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Pending Invites"}),e.jsx(V,{columns:t,data:s,rowKey:a=>a.metadata.id}),d&&e.jsx(De,{tenantId:n,invite:d,onClose:()=>r(null),onSuccess:()=>{r(null),c()}})]})}function De({tenantId:s,invite:n,onClose:l,onSuccess:c}){const[d,r]=g.useState([]),{handleApiError:t}=N({setErrors:r}),{tenantInviteDeleteMutation:a}=S(),m=a(s,n.metadata.id),i=R({...m,onSuccess:c,onError:t});return e.jsx(W,{isOpen:!0,title:"Revoke invite",description:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Revoke the pending invite for ",e.jsx("strong",{children:n.email}),"? They will no longer be able to accept it."]}),e.jsx(I,{errors:d})]}),submitLabel:"Revoke invite",submitVariant:"destructive",isLoading:i.isPending,onSubmit:()=>{r([]),i.mutate()},onCancel:l})}function Be(){var p,b,j,f;const{tenantId:s}=xe(),{membership:n,organizationId:l}=he(),{isControlPlaneEnabled:c}=D(),{organizations:d}=ge(),{tenantMemberListQuery:r,tenantInviteListQuery:t}=S(),a=((p=d.find(x=>x.metadata.id===l))==null?void 0:p.isOwner)??!1,m=n===C.OWNER||n===C.ADMIN,i=a||!c&&m,u=A(r(s)),o=A(t(s)),h=g.useMemo(()=>{var x;return((x=u.data)==null?void 0:x.rows)||[]},[(b=u.data)==null?void 0:b.rows]),w=((j=o.data)==null?void 0:j.rows)||[],v=u.isError&&u.error instanceof pe&&[401,403].includes(((f=u.error.response)==null?void 0:f.status)??0);return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(fe,{title:"Members",description:e.jsxs(e.Fragment,{children:["Manage which team members can access this tenant.",a&&l&&e.jsxs(e.Fragment,{children:[" ","Looking to add new team members? Navigate to"," ",e.jsx(we,{to:be.organizationTeamRoute.to,params:{organization:l},className:"text-primary underline-offset-4 hover:underline",children:"team settings"}),"."]})]})}),i&&e.jsx("div",{className:"mb-4 flex flex-row items-baseline justify-end",children:e.jsx(L,{variant:"link",className:"h-auto p-0",leftIcon:e.jsx(Ee,{className:"size-4"}),onClick:()=>ve.emit("create-tenant-invite",{tenantId:s,organizationId:l}),children:"Add members to this tenant"})}),u.isLoading?e.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"Loading members..."}):v?e.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"You must be a tenant admin or owner to view members."}):h.length>0?e.jsx(Pe,{tenantId:s,members:h,canManage:i,canManageOrganization:a,onMembersChanged:()=>u.refetch()}):e.jsx(je,{title:"No members found",description:"Members with access to this tenant will appear here."}),e.jsx(Le,{invites:w,tenantId:s,canManage:i,onInviteRevoked:()=>o.refetch()})]})})}export{Be as default}; diff --git a/hatchetembed/dashboard/assets/index-DSRJ3V8B.js b/hatchetembed/dashboard/assets/index-DSRJ3V8B.js deleted file mode 100644 index 93ffdbd06b..0000000000 --- a/hatchetembed/dashboard/assets/index-DSRJ3V8B.js +++ /dev/null @@ -1 +0,0 @@ -import{u as S,t as E,j as e,L as p,I as b,A as L,d as A,B as I,S as N,e as F,o as U,s as j,g as C,b as w,h as D,k as v,l as P,m as R,n as T,p as M}from"./index-NcPpBRAY.js";import{A as _}from"./auth-page-BRjt0-kC.js";import"./auth-layout-BYNreqC4.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="1af716fc-ed04-46cd-af5a-ec70a20026be",a._sentryDebugIdIdentifier="sentry-dbid-1af716fc-ed04-46cd-af5a-ec70a20026be")}catch{}})();const k=U({email:j().email("Invalid email address"),password:j().min(8,"Password must be at least 8 characters long")});function B({className:a,...s}){var u,m,g,h,f,x;const{register:i,handleSubmit:l,formState:{errors:r,isValid:c,touchedFields:o,submitCount:d}}=S({resolver:E(k),mode:"onChange",reValidateMode:"onChange"}),n=(o.email||d>0?(m=(u=r.email)==null?void 0:u.message)==null?void 0:m.toString():void 0)||((g=s.fieldErrors)==null?void 0:g.email),t=(o.password||d>0?(f=(h=r.password)==null?void 0:h.message)==null?void 0:f.toString():void 0)||((x=s.fieldErrors)==null?void 0:x.password);return e.jsx("div",{className:F("grid gap-6",a),children:e.jsx("form",{onSubmit:l(y=>{s.onSubmit(y)}),children:e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email"}),e.jsx(b,{...i("email"),id:"email",placeholder:"name@example.com",type:"email",autoCapitalize:"none",autoComplete:"email",autoCorrect:"off",disabled:s.isLoading}),n&&e.jsx("div",{className:"text-sm text-red-500",children:n})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password",children:"Password"}),e.jsx(b,{...i("password"),id:"password",placeholder:"Password",type:"password",disabled:s.isLoading}),t&&e.jsx("div",{className:"text-sm text-red-500",children:t})]}),s.errors&&s.errors.length>0&&e.jsx(L,{variant:"destructive",children:e.jsx(A,{children:s.errors.join(" ")})}),e.jsxs(I,{disabled:s.isLoading||!c,children:[s.isLoading&&e.jsx(N,{}),"Sign In"]})]})})})}function H(){return e.jsx(_,{title:"Log in to continue",basicSection:e.jsx(V,{}),altAction:e.jsxs(e.Fragment,{children:["Don't have an account?"," ",e.jsx(C,{to:w.authRegisterRoute.to,className:"font-semibold text-primary underline underline-offset-4 hover:text-primary/90",children:"Sign up"})]})})}function V(){const a=D(),[s,i]=v.useState([]),[l,r]=v.useState({}),{handleApiError:c}=P({setFieldErrors:r,setErrors:i}),{invalidate:o}=R(),{userUpdateLoginMutation:d}=T(),n=M({...d(),onSuccess:async()=>{await o(),await new Promise(t=>setTimeout(t,0)),a({to:w.authenticatedRoute.to})},onError:c});return e.jsx(B,{isLoading:n.isPending,onSubmit:t=>{i([]),r({}),n.mutate(t)},errors:s,fieldErrors:l})}export{H as default}; diff --git a/hatchetembed/dashboard/assets/index-Df3PCeRG.js b/hatchetembed/dashboard/assets/index-Df3PCeRG.js deleted file mode 100644 index 3fe0a1748b..0000000000 --- a/hatchetembed/dashboard/assets/index-Df3PCeRG.js +++ /dev/null @@ -1,57 +0,0 @@ -import{k as s,ff as We,eU as Le,j as e,fg as Ue,eV as A,eZ as B,fh as He,eY as Y,fi as ce,eX as Ke,e$ as de,f0 as Qe,f1 as Ve,e as me,fj as ze,cI as $e,fk as g,p as Ye,Q as Be,N as qe,O as Xe,fl as ie,g as R,b as S,B as y,fm as Ze,ab as Je,W as H,L as K,cH as Q,V as es,b8 as D,db as ss,dc as ts,dd as V,de as z,a as rs}from"./index-NcPpBRAY.js";import{M as as}from"./managed-workers-gate-C-OegMsp.js";import{S as ns,a as $}from"./steps-CZ8cuefp.js";import{F as le}from"./ArrowPathIcon-DJaZk0M1.js";import{F as os}from"./KeyIcon-szjQ8KFq.js";import"./index-CQU71MwM.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="ce8f288b-6a66-41fe-b23b-f9e1dd9e4b9c",t._sentryDebugIdIdentifier="sentry-dbid-ce8f288b-6a66-41fe-b23b-f9e1dd9e4b9c")}catch{}})();function is({title:t,titleId:n,...r},d){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:d,"aria-labelledby":n},r),t?s.createElement("title",{id:n},t):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const ls=s.forwardRef(is);var q="Radio",[cs,ue]=de(q),[ds,ms]=cs(q),pe=s.forwardRef((t,n)=>{const{__scopeRadio:r,name:d,checked:l=!1,required:o,disabled:u,value:j="on",onCheck:p,form:v,...m}=t,[i,x]=s.useState(null),c=B(n,b=>x(b)),h=s.useRef(!1),w=i?v||!!i.closest("form"):!0;return e.jsxs(ds,{scope:r,checked:l,disabled:u,children:[e.jsx(A.button,{type:"button",role:"radio","aria-checked":l,"data-state":ge(l),"data-disabled":u?"":void 0,disabled:u,value:j,...m,ref:c,onClick:Y(t.onClick,b=>{l||p==null||p(),w&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),w&&e.jsx(fe,{control:i,bubbles:!h.current,name:d,value:j,checked:l,required:o,disabled:u,form:v,style:{transform:"translateX(-100%)"}})]})});pe.displayName=q;var he="RadioIndicator",xe=s.forwardRef((t,n)=>{const{__scopeRadio:r,forceMount:d,...l}=t,o=ms(he,r);return e.jsx(Ke,{present:d||o.checked,children:e.jsx(A.span,{"data-state":ge(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:n})})});xe.displayName=he;var us="RadioBubbleInput",fe=s.forwardRef(({__scopeRadio:t,control:n,checked:r,bubbles:d=!0,...l},o)=>{const u=s.useRef(null),j=B(u,o),p=Qe(r),v=Ve(n);return s.useEffect(()=>{const m=u.current;if(!m)return;const i=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(i,"checked").set;if(p!==r&&c){const h=new Event("click",{bubbles:d});c.call(m,r),m.dispatchEvent(h)}},[p,r,d]),e.jsx(A.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:j,style:{...l.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fe.displayName=us;function ge(t){return t?"checked":"unchecked"}var ps=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G="RadioGroup",[hs]=de(G,[ce,ue]),je=ce(),ye=ue(),[xs,fs]=hs(G),ve=s.forwardRef((t,n)=>{const{__scopeRadioGroup:r,name:d,defaultValue:l,value:o,required:u=!1,disabled:j=!1,orientation:p,dir:v,loop:m=!0,onValueChange:i,...x}=t,c=je(r),h=We(v),[w,b]=Le({prop:o,defaultProp:l??null,onChange:i,caller:G});return e.jsx(xs,{scope:r,name:d,required:u,disabled:j,value:w,onValueChange:b,children:e.jsx(Ue,{asChild:!0,...c,orientation:p,dir:h,loop:m,children:e.jsx(A.div,{role:"radiogroup","aria-required":u,"aria-orientation":p,"data-disabled":j?"":void 0,dir:h,...x,ref:n})})})});ve.displayName=G;var be="RadioGroupItem",Ne=s.forwardRef((t,n)=>{const{__scopeRadioGroup:r,disabled:d,...l}=t,o=fs(be,r),u=o.disabled||d,j=je(r),p=ye(r),v=s.useRef(null),m=B(n,v),i=o.value===l.value,x=s.useRef(!1);return s.useEffect(()=>{const c=w=>{ps.includes(w.key)&&(x.current=!0)},h=()=>x.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",h)}},[]),e.jsx(He,{asChild:!0,...j,focusable:!u,active:i,children:e.jsx(pe,{disabled:u,required:o.required,checked:i,...p,...l,name:o.name,ref:m,onCheck:()=>o.onValueChange(l.value),onKeyDown:Y(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:Y(l.onFocus,()=>{var c;x.current&&((c=v.current)==null||c.click())})})})});Ne.displayName=be;var gs="RadioGroupIndicator",we=s.forwardRef((t,n)=>{const{__scopeRadioGroup:r,...d}=t,l=ye(r);return e.jsx(xe,{...l,...d,ref:n})});we.displayName=gs;var Te=ve,ke=Ne,js=we;const Re=s.forwardRef(({className:t,...n},r)=>e.jsx(Te,{className:me("grid gap-2",t),...n,ref:r}));Re.displayName=Te.displayName;const P=s.forwardRef(({className:t,...n},r)=>e.jsx(ke,{ref:r,className:me("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e.jsx(js,{className:"flex items-center justify-center",children:e.jsx(ze,{className:"h-3.5 w-3.5 fill-primary"})})}));P.displayName=ke.displayName;function ys(){const{tenantId:t}=$e(),[n,r]=s.useState(!1),[d,l]=s.useState(!1),[o,u]=s.useState(null),[j,p]=s.useState(null),[v,m]=s.useState(""),[i]=s.useState(!1),[x,c]=s.useState(null),[,h]=s.useState(!1),[,w]=s.useState(!1),[b,X]=s.useState(0),[Z,J]=s.useState(!1),[Se,ee]=s.useState(!0),[Ce,Ie]=s.useState(!1),[Ee,C]=s.useState(!1),[O,M]=s.useState(!1),[N,_e]=s.useState(g.QUICKSTART_TYPESCRIPT),{mutate:De,isPending:se}=Ye({mutationFn:a=>Be.managedWorkerTemplateCreate(t,{name:a}),onSuccess:a=>{var T;const f=(T=a.data.metadata)==null?void 0:T.id;f&&(u(f),i&&c(`sim-wf-${Math.random().toString(36).substring(2,7)}`))},onError:a=>{var f,T,k,_;console.error("Failed to create template:",a),p(((_=(k=(T=(f=a==null?void 0:a.response)==null?void 0:f.data)==null?void 0:T.errors)==null?void 0:k[0])==null?void 0:_.description)||"Failed to create template"),r(!1)}}),F=qe({...Xe.cloud.listManagedWorkerEvents(o||""),enabled:!!o&&!i,refetchInterval:o&&!d&&!i?2e3:!1}),Pe=()=>{r(!0),p(null),m("Initializing deployment...");const a=`sim-${Math.random().toString(36).substring(2,9)}`;u(a),c(`sim-wf-${Math.random().toString(36).substring(2,7)}`),setTimeout(()=>{m("Creating worker resources..."),setTimeout(()=>{m("Building container image..."),setTimeout(()=>{m("Deploying managed worker..."),setTimeout(()=>{m("Deployment complete"),r(!1),l(!0),C(!1),M(!0)},2e3)},1500)},1500)},1e3)},te=s.useCallback(async()=>{if(x){if(h(!0),i){setTimeout(()=>{h(!1),w(!0),X(a=>a+1),b+1>=3&&J(!0)},1e3);return}try{setTimeout(()=>{h(!1),w(!0),X(a=>a+1),b+1>=3&&J(!0)},1e3)}catch(a){console.error("Failed to trigger run:",a),h(!1)}}},[x,i,b]);s.useEffect(()=>{O&&x&&!Z&&(async()=>{for(let f=0;f<3;f++)f>0&&await new Promise(T=>setTimeout(T,1500)),await te()})()},[Z,O,te,x]),s.useEffect(()=>{var a;if(o&&((a=F.data)!=null&&a.rows)&&!i){const f=F.data.rows;if(f.length>0){const k=[...f].sort((_,Fe)=>new Date(Fe.timeLastSeen).getTime()-new Date(_.timeLastSeen).getTime())[0];m(k.message),k.status===ie.SUCCEEDED?(r(!1),l(!0),C(!1),M(!0),x||c(`demo-wf-${Math.random().toString(36).substring(2,7)}`)):k.status===ie.FAILED&&(p(k.message),r(!1))}}},[o,F.data,i,x]);const Ae=async()=>{if(i){Pe();return}r(!0),p(null),m("Initializing deployment..."),De(N)},I=()=>{Ie(!0),ee(!1),C(!0)},E=a=>{_e(a)},[W,L]=s.useState(!1),[re,ae]=s.useState(null),[ne,Ge]=s.useState(!0),[Oe,Me]=s.useState("typescript"),oe=()=>{L(!0),i?setTimeout(()=>{const a="hx_sim_",f=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ae(`${a}${f}`),L(!1)},1500):rs.apiTokenCreate(t,{name:"demo-template-token"}).then(a=>{a.data&&a.data.token?ae(a.data.token):console.error("Failed to get token from response")}).catch(a=>{console.error("Failed to generate token:",a)}).finally(()=>{L(!1)})},U={typescript:`import HatchetClient from '@hatchet-dev/typescript-sdk'; - -async function main() { - const hatchet = HatchetClient.init(); - const result = await hatchet.run('first-workflow', {}); - console.log(result); -} - -if (require.main === module) { - main().catch(console.error).finally(() => process.exit(0)); -} -`,python:`from hatchet_sdk import Hatchet - -hatchet = Hatchet() -result = hatchet.run_workflow(name="first-workflow") -print(result) -`,go:`package main - -import ( - "fmt" - - v1_workflows "github.com/hatchet-dev/hatchet/examples/go/tasks" - v1 "github.com/hatchet-dev/hatchet/pkg/v1" - "github.com/hatchet-dev/hatchet/pkg/v1/workflow" - "github.com/joho/godotenv" -) - -func main() { - err := godotenv.Load() - if err != nil { - panic(err) - } - - hatchet, err := v1.NewHatchetClient() - - if err != nil { - panic(err) - } - - simple := v1.WorkflowFactory[any, any]( - workflow.CreateOpts[any]{ - Name: "first-workflow", - }, - &hatchet, - ) - - result, err := simple.Run(v1_workflows.SimpleInput{ - Message: "Hello, World!", - }) - - if err != nil { - panic(err) - } - - fmt.Println(result) -} -`};return e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"mb-4 flex flex-row items-center",children:[e.jsx(R,{to:S.tenantManagedWorkersRoute.to,params:{tenant:t},className:"mr-4",children:e.jsx(y,{variant:"ghost",size:"icon",children:e.jsx(Ze,{className:"size-4"})})}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"Deploy Demo Template"})]}),e.jsx(Je,{className:"my-4"}),e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsxs(ns,{className:"mt-6",children:[e.jsx($,{title:"Select your template language",open:Se,setOpen:ee,children:e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"mb-2 rounded-lg bg-muted/30 p-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"Demo Includes:"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Sample workflow with 3 steps"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"1 managed service (limited resources)"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Active for 1 hour"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"No payment method required"})]})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"mb-4 text-lg font-medium",children:"Choose your programming language:"}),e.jsxs(Re,{value:N,onValueChange:E,className:"flex flex-col space-y-3",children:[e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_TYPESCRIPT),children:e.jsxs(H,{className:`border-2 p-4 ${N===g.QUICKSTART_TYPESCRIPT?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_TYPESCRIPT,id:"typescript",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(K,{htmlFor:"typescript",className:"cursor-pointer text-lg font-medium",children:"TypeScript"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Modern JavaScript with type safety."})]})]}),N===g.QUICKSTART_TYPESCRIPT&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/typescript",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View TypeScript source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with TypeScript"})]})})]})}),e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_PYTHON),children:e.jsxs(H,{className:`border-2 p-4 ${N===g.QUICKSTART_PYTHON?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_PYTHON,id:"python",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(K,{htmlFor:"python",className:"cursor-pointer text-lg font-medium",children:"Python"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Simple, readable syntax for rapid development."})]})]}),N===g.QUICKSTART_PYTHON&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/python",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View Python source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with Python"})]})})]})}),e.jsx("div",{className:"cursor-pointer",onClick:()=>E(g.QUICKSTART_GO),children:e.jsxs(H,{className:`border-2 p-4 ${N===g.QUICKSTART_GO?"border-primary":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(P,{value:g.QUICKSTART_GO,id:"go",className:"mr-2"}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(K,{htmlFor:"go",className:"cursor-pointer text-lg font-medium",children:"Go"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Efficient, concurrent programming language."})]})]}),N===g.QUICKSTART_GO&&e.jsx("div",{className:"mt-4 border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("a",{href:"https://github.com/hatchet-dev/managed-compute-examples/tree/main/go",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-medium text-primary hover:underline",children:[e.jsx(Q,{className:"mr-2 size-4"}),"View Go source on GitHub",e.jsx("span",{className:"ml-1",children:"↗"})]}),e.jsx(y,{onClick:I,size:"sm",className:"px-4",children:"Continue with Go"})]})})]})})]})]}),e.jsx(y,{onClick:I,className:"mt-2 w-fit",children:"Continue"})]})}),e.jsx($,{title:"Deploy the demo template",open:Ee,setOpen:C,disabled:!Ce,children:e.jsx("div",{className:"grid gap-4",children:e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:e.jsx(ls,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"mb-2 text-xl font-medium",children:"Ready to Deploy"}),e.jsxs("p",{className:"mb-4 text-muted-foreground",children:["Click the button below to deploy your"," ",N.replace("QUICKSTART_","").toLowerCase()," ","demo template. This will create a managed service and workflow that you can use to explore the features."]}),e.jsxs("div",{className:"mb-6 rounded-lg bg-muted/30 p-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"What happens next:"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"A service will be provisioned with the necessary resources"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"A sample workflow will be created and registered"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"You'll be able to monitor the activity in your dashboard"})]})]})]}),n&&e.jsxs("div",{className:"mb-4 rounded-lg border bg-muted/20 p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(le,{className:"mr-2 size-4 animate-spin"}),e.jsx("h4",{className:"font-medium",children:"Deployment in progress..."})]}),e.jsxs("p",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[e.jsx("span",{children:v}),o&&e.jsx(R,{to:S.tenantManagedWorkerRoute.to,params:{tenant:t,managedWorker:o},target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-primary hover:underline",children:"View Logs"})]})]}),j&&e.jsxs("div",{className:"mb-4 rounded-lg border border-destructive bg-destructive/10 p-4",children:[e.jsx("h4",{className:"mb-1 font-medium text-destructive",children:"Deployment failed"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:j})]}),e.jsx("div",{className:"border-t pt-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:n?"Deploying demo template...":i?"Ready to simulate deployment":"Ready to deploy"}),e.jsx(y,{onClick:Ae,disabled:n||!i&&se,className:"min-w-32",children:n||!i&&se?"Deploying...":i?"Simulate Deploy":"Deploy Demo"})]})})]})]})})})}),e.jsx($,{title:"Deployment successful",open:O,setOpen:M,disabled:!d,children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-4 text-center",children:[e.jsx("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-green-500/10",children:e.jsx(es,{className:"h-8 w-8 text-green-500"})}),e.jsx("h3",{className:"mb-2 text-xl font-medium",children:"Demo Template Deployed!"}),e.jsxs("p",{className:"mb-4 max-w-md text-muted-foreground",children:["Your"," ",N.replace("QUICKSTART_","").toLowerCase()," ","demo template has been successfully deployed. You can now explore the managed service features.",i&&e.jsx("span",{className:"mt-2 block font-medium text-amber-500",children:"Note: This was a simulated deployment. No actual resources were created."})]})]})}),e.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:e.jsxs("div",{className:"mb-4 flex items-start",children:[e.jsx("div",{className:"mr-3 flex h-8 w-8 items-center justify-center rounded-full bg-primary/10",children:e.jsx(os,{className:"size-4 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"mb-1 font-medium",children:"Trigger a Remote Run Programmatically"}),e.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:"Run the following code locally to execute a task on the deployed service."}),re?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mb-4 rounded bg-green-500/10 p-3 text-sm text-green-600",children:"API token successfully generated!"}),e.jsx("p",{className:"mb-2 text-sm text-muted-foreground",children:"This is the only time we will show you this auth token. Make sure to copy it now."}),e.jsx(D,{language:"plaintext",code:`export HATCHET_CLIENT_TOKEN="${re}"`,copy:!0,className:"mb-3"}),e.jsxs("div",{className:"mb-4 flex space-x-2",children:[e.jsx(y,{type:"button",variant:"outline",size:"sm",onClick:()=>Ge(!ne),children:ne?"Hide Token":"Reveal Token"}),e.jsx(y,{variant:"outline",size:"sm",onClick:oe,disabled:W,children:"Generate New Token"})]})]}):e.jsx(y,{onClick:oe,disabled:W,fullWidth:!0,children:W?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"mr-2 size-4 animate-spin"}),"Generating Token..."]}):"Generate API Token"}),e.jsxs("div",{className:"mt-2 border-t pt-4",children:[e.jsx("h5",{className:"mb-2 font-medium",children:"Example Code"}),e.jsxs(ss,{value:Oe,onValueChange:Me,className:"w-full",children:[e.jsxs(ts,{className:"mb-2",children:[e.jsx(V,{value:"typescript",children:"TypeScript"}),e.jsx(V,{value:"python",children:"Python"}),e.jsx(V,{value:"go",children:"Go"})]}),e.jsx(z,{value:"typescript",className:"mt-0",children:e.jsx(D,{code:U.typescript,language:"typescript",copy:!0})}),e.jsx(z,{value:"python",className:"mt-0",children:e.jsx(D,{code:U.python,language:"python",copy:!0})}),e.jsx(z,{value:"go",className:"mt-0",children:e.jsx(D,{code:U.go,language:"go",copy:!0})})]})]})]})]})}),e.jsxs("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:[e.jsx("h4",{className:"mb-3 font-medium",children:"What's next?"}),e.jsxs("ul",{className:"mb-4 space-y-3",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"View your deployed service to see logs and metrics"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Three demo task runs have been triggered for you"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Use the API to trigger additional task runs"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"mr-2 mt-0.5 flex items-center text-primary",children:"•"}),e.jsx("span",{children:"Monitor task runs in the dashboard"})]})]}),o&&e.jsx(R,{to:S.tenantManagedWorkerRoute.to,params:{tenant:t,managedWorker:o},children:e.jsx(y,{variant:"default",fullWidth:!0,children:"View Your Service"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(R,{to:S.tenantRunsRoute.to,params:{tenant:t},children:e.jsx(y,{variant:"outline",fullWidth:!0,children:"View Runs"})}),e.jsx(R,{to:S.tenantWorkflowsRoute.to,params:{tenant:t},children:e.jsx(y,{variant:"outline",fullWidth:!0,children:"View RegisteredTasks"})})]})]})]})})]})})]})})}function Rs(){return e.jsx(as,{children:e.jsx(ys,{})})}export{Rs as default}; diff --git a/hatchetembed/dashboard/assets/index-DjIt7K6k.js b/hatchetembed/dashboard/assets/index-DjIt7K6k.js deleted file mode 100644 index c67e38f8a1..0000000000 --- a/hatchetembed/dashboard/assets/index-DjIt7K6k.js +++ /dev/null @@ -1 +0,0 @@ -import{cI as k,cj as T,k as h,N as j,O as p,j as e,F as z,B as f,W as y,X as N,a4 as w,a5 as U,fc as G,aL as Q,g as C,b as v,Z as D,au as $,l as q,S as H,fd as L,ab as O,_ as V,$ as X,a0 as Y,a1 as Z,bc as J,bd as K,fe as ee,c as se}from"./index-NcPpBRAY.js";import{F as P,B as ae}from"./billing-required-D8JPVUCq.js";import{M as te}from"./managed-workers-gate-C-OegMsp.js";import{G as re}from"./github-button-DalgP0Fz.js";import{F as ne}from"./ArrowPathIcon-DJaZk0M1.js";import{F as oe,m as S,R as ie}from"./managed-compute-Dhtcalwt.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="36e79832-03a5-4f79-a802-ec330092d08e",a._sentryDebugIdIdentifier="sentry-dbid-36e79832-03a5-4f79-a802-ec330092d08e")}catch{}})();const de=({data:a})=>{var r,d,l,c,u,x;const{tenantId:s}=k(),n=(r=a.runtimeConfigs)==null?void 0:r.reduce((o,i)=>o+i.numReplicas,0),m=(d=a.runtimeConfigs)==null?void 0:d.reduce((o,i)=>o+i.cpus,0),t=(l=a.runtimeConfigs)==null?void 0:l.reduce((o,i)=>o+i.memoryMb,0);return e.jsxs("div",{className:"overflow-hidden rounded-lg border shadow",children:[e.jsxs("div",{className:"flex flex-col gap-1 px-4 py-5 sm:p-6",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(oe,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h3",{className:"text-lg font-semibold leading-tight text-foreground",children:a.name})]}),e.jsxs("p",{className:"mt-1 max-w-2xl text-sm text-gray-700 dark:text-gray-300",children:["Created ",e.jsx(Q,{date:(c=a.metadata)==null?void 0:c.createdAt})]}),a.buildConfig&&e.jsx(re,{buildConfig:a.buildConfig,prefix:"Deploys from"}),e.jsxs("p",{className:"mt-1 max-w-2xl text-sm text-gray-700 dark:text-gray-300",children:[n," ",n==1?"instance":"instances"," with"," ",m," CPUs and ",t," MB memory"]})]}),e.jsx("div",{className:"px-4 py-4 sm:px-6",children:e.jsx("div",{className:"text-background-secondary text-sm",children:e.jsx(C,{to:v.tenantManagedWorkerRoute.to,params:{tenant:s,managedWorker:(u=a.metadata)==null?void 0:u.id},children:e.jsx(f,{children:"View Compute Instance"})})})})]},(x=a.metadata)==null?void 0:x.id)};function le(){var d;const{tenantId:a}=k(),{refetchInterval:s}=T(),[n,m]=h.useState(!1),t=j({...p.cloud.listManagedWorkers(a),refetchInterval:s}),r=h.useMemo(()=>{var c;return(((c=t.data)==null?void 0:c.rows)||[]).sort((u,x)=>{var o,i;return((o=u.metadata)==null?void 0:o.created_at)<((i=x.metadata)==null?void 0:i.created_at)?1:-1})},[(d=t.data)==null?void 0:d.rows]);return t.isLoading?e.jsx(z,{}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"flex flex-row justify-end mb-4",children:e.jsx(f,{className:"h-8 px-2 lg:px-3",size:"sm",onClick:()=>{t.refetch(),m(!n)},variant:"outline","aria-label":"Refresh events list",children:e.jsx(ne,{className:`size-4 transition-transform ${n?"rotate-180":""}`})},"refresh")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[r.map(l=>e.jsx(de,{data:l},l.metadata.id)),r.length===0&&e.jsxs(y,{className:"w-full text-justify",children:[e.jsxs(N,{children:[e.jsx(w,{children:"No Managed Services"}),e.jsx(U,{children:e.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:"There are no managed services created in this tenant."})})]}),e.jsx(G,{})]})]})]})}function ce({computeCost:a,isLoading:s}){if(s)return e.jsxs(y,{className:"w-full",children:[e.jsx(N,{className:"pb-2",children:e.jsxs(w,{className:"text-md flex items-center font-medium",children:[e.jsx(P,{className:"mr-2 h-5 w-5 text-primary"}),"Monthly Usage"]})}),e.jsx(D,{children:e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."})})]});if(!a)return null;const{cost:n,hasCreditsRemaining:m,creditsRemaining:t}=a,r=n<0||m,d=Math.abs(r&&t!==void 0?t:n),l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(d);return e.jsxs(y,{className:"w-full",children:[e.jsxs(N,{className:"pb-2",children:[e.jsxs(w,{className:"text-md flex items-center font-medium",children:[e.jsx(P,{className:"mr-2 h-5 w-5 text-primary"}),"Monthly Usage"]}),e.jsx(U,{children:"Current billing period"})]}),e.jsx(D,{children:e.jsxs("div",{className:"flex items-center",children:[e.jsxs("div",{className:`text-xl font-bold ${r?"text-green-500":"text-foreground"}`,children:[r?"+ ":"- ",l]}),e.jsx("div",{className:"ml-2 text-sm text-muted-foreground",children:r?"credits remaining":"used this month"})]})})]})}function me(){var b,I,R,W;const{tenant:a,billing:s,can:n,organizationId:m}=$(),{tenantId:t}=k(),[r,d]=h.useState(!1),[l,c]=h.useState(!1),u=j({...p.cloud.getComputeCost(t)}),x=j({...p.cloud.listManagedWorkers(t)}),o=((I=(b=x.data)==null?void 0:b.rows)==null?void 0:I.length)||0,[i]=n(S.canCreateWorkerPool(o));h.useEffect(()=>{s!=null&&s.hasPaymentMethods&&(s==null||s.setPollBilling(!1))},[s,s==null?void 0:s.hasPaymentMethods]);const[,B]=n(S.create()),{handleApiError:F}=q({}),A=async()=>{try{if(r||(d(!0),s==null||s.setPollBilling(!0),!t)||!m)return;const g=await se.billingPortalLinkGet(m);window.open(g.data.url,"_blank")}catch(g){F(g)}finally{d(!1)}},E=(((W=(R=x.data)==null?void 0:R.rows)==null?void 0:W.length)||0)>0;if(s!=null&&s.isLoading)return e.jsx("div",{className:"flex items-center justify-center h-screen",children:e.jsx(H,{})});if(B==ie.BILLING_REQUIRED&&!E)return e.jsx(ae,{tenant:a,billing:s,manageClicked:A,portalLoading:r});const M=()=>{if(!(s!=null&&s.plan))return 0;switch(s.plan){case"free":return 1;case"starter":return 2;case"growth":return 5;default:return 5}},_=()=>{i||c(!0)};return e.jsxs("div",{className:"h-full w-full flex-grow",children:[e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between",children:[e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"Managed Compute"}),i?e.jsx(C,{to:v.tenantManagedWorkersCreateRoute.to,params:{tenant:t},children:e.jsx(f,{leftIcon:e.jsx(L,{className:"size-4"}),children:"Add Service"})}):e.jsxs(f,{onClick:_,leftIcon:e.jsx(L,{className:"size-4"}),children:["Add Service (",o,"/",M(),")"]})]}),e.jsx(O,{className:"my-4"}),x.isLoading?e.jsx("div",{children:"Loading..."}):e.jsx(le,{}),e.jsx("div",{className:"mb-6 mt-6",children:e.jsx(ce,{computeCost:u.data,isLoading:u.isLoading})})]}),e.jsx(V,{open:l,onOpenChange:c,children:e.jsxs(X,{className:"max-w-md",children:[e.jsxs(Y,{children:[e.jsx(Z,{children:"Plan Upgrade Required"}),e.jsxs(J,{children:["You've reached the maximum number of services (",o,"/",M(),") allowed on your current plan. Upgrade to create more services."]})]}),e.jsxs(K,{children:[e.jsx(f,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(C,{to:v.tenantSettingsBillingRoute.to,params:{tenant:t},children:e.jsx(f,{leftIcon:e.jsx(ee,{className:"size-4"}),children:"Upgrade Plan"})})]})]})})]})}function pe(){return e.jsx(te,{children:e.jsx(me,{})})}export{pe as default}; diff --git a/hatchetembed/dashboard/assets/index-Dq1G0ZP8.js b/hatchetembed/dashboard/assets/index-Dq1G0ZP8.js deleted file mode 100644 index a70cc64be4..0000000000 --- a/hatchetembed/dashboard/assets/index-Dq1G0ZP8.js +++ /dev/null @@ -1 +0,0 @@ -import{h as c,n as f,E as g,p as m,q as r,b as d,j as t,B as p,H as b,O as h}from"./index-NcPpBRAY.js";import{N as x}from"./new-tenant-saver-form-DYNtrUbW.js";import{u as v}from"./redirect-BMRF0kLa.js";import{A as y}from"./auth-layout-BYNreqC4.js";import"./welcome-modal-state-YrY6roPC.js";import"./shard-deployment-key-in4ZPoWA.js";import"./XMarkIcon-q_Tj_COY.js";import"./use-analytics-Jv1fF8RR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="9bab7742-e375-4fb0-914f-7134646413bf",e._sentryDebugIdIdentifier="sentry-dbid-9bab7742-e375-4fb0-914f-7134646413bf")}catch{}})();function O(){const e=v(),a=c(),{userUpdateLogoutMutation:s}=f(),{organizations:o}=g({from:"/onboarding/create-tenant"}),i=m({...s(),onSettled:()=>{r.clear(),a({to:d.authLoginRoute.to})}}),l=o&&o.length>0?o[0].metadata.id:void 0;return t.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[t.jsx("div",{className:"absolute top-4 right-4 z-10",children:t.jsx(p,{variant:"ghost",size:"sm",onClick:()=>i.mutate(),disabled:i.isPending,children:"Sign out"})}),t.jsxs(y,{children:[t.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[t.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:t.jsx(b,{className:"h-8 w-auto"})}),t.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Create a new tenant"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"A tenant is an isolated environment for your workflows. Set one up to get started."})]}),t.jsx(x,{defaultOrganizationId:l,afterSave:n=>{const u=n.type==="cloud"?n.tenant.id:n.tenant.metadata.id;n.type==="cloud"&&r.prefetchQuery(h.controlPlane.subscriptionPlans()).catch(()=>{}),e({to:d.tenantOverviewRoute.to,params:{tenant:u},replace:!0})}})]})]})}export{O as default}; diff --git a/hatchetembed/dashboard/assets/index-Fd0xVSp_.css b/hatchetembed/dashboard/assets/index-Fd0xVSp_.css deleted file mode 100644 index e003326a09..0000000000 --- a/hatchetembed/dashboard/assets/index-Fd0xVSp_.css +++ /dev/null @@ -1 +0,0 @@ -.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%} diff --git a/hatchetembed/dashboard/assets/index-NcPpBRAY.js b/hatchetembed/dashboard/assets/index-NcPpBRAY.js deleted file mode 100644 index bbe5b76b37..0000000000 --- a/hatchetembed/dashboard/assets/index-NcPpBRAY.js +++ /dev/null @@ -1,481 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DSRJ3V8B.js","assets/auth-page-BRjt0-kC.js","assets/auth-layout-BYNreqC4.js","assets/index-Bfpllom8.js","assets/index-BEyCp5-u.js","assets/top-nav-DUjg_srB.js","assets/organization-selector-CCw2_tjm.js","assets/tenant-region-badge-C-bbxnQA.js","assets/shard-deployment-key-in4ZPoWA.js","assets/global-emitter-kjRqhIKI.js","assets/PlusIcon-ChBf4T_m.js","assets/tenant-switcher-DKarkPe5.js","assets/use-pending-invites-DdxsIf8r.js","assets/use-auth-disabled-3jxVUpNe.js","assets/resource-limit-status-BK8AB43u.js","assets/index-DOf3AD-4.js","assets/use-analytics-Jv1fF8RR.js","assets/index-D7XvoUmw.js","assets/new-organization-saver-form-B3Ag7ruu.js","assets/welcome-modal-state-YrY6roPC.js","assets/ExclamationTriangleIcon-Okie-gQE.js","assets/index-B-gmUf6P.js","assets/index-CQU71MwM.js","assets/outlet-BQs_XxR1.js","assets/index-Bwjif3lq.js","assets/index-CgrU27uR.js","assets/member-primitives-r9nHLQI3.js","assets/settings-page-header-CkCZd3CN.js","assets/settings-row-D2iLPMr6.js","assets/switch-C9IBAXBS.js","assets/data-contracts-C0lcHVTf.js","assets/docs-button-Mn8SLZkH.js","assets/shield-check-jS3YzcEA.js","assets/inline-error-BRPaHH6l.js","assets/XMarkIcon-q_Tj_COY.js","assets/confirm-dialog-Bv8agSqW.js","assets/KeyIcon-szjQ8KFq.js","assets/billing-WBONcYPA.js","assets/sections-Dml0nEEJ.js","assets/index-BoqiiIh4.js","assets/index-BavpRR8e.js","assets/authenticated-CYpLJHv6.js","assets/new-tenant-saver-form-DYNtrUbW.js","assets/tenant-wrapper-CsXNqzkl.js","assets/invite-modal-CIZIW_VD.js","assets/redirect-BMRF0kLa.js","assets/index-Dq1G0ZP8.js","assets/index-Y2aiVoiY.js","assets/index-D46ZK8zA.js","assets/index-CgoYnKU8.js","assets/index-CGgjE1le.js","assets/index-CYYxHnXB.js","assets/resource-limit-columns-CvplayQs.js","assets/index-k398qAe_.js","assets/index-DGszS3I6.js","assets/resource-not-found-DGbig0ge.js","assets/index-D4LBFMbY.js","assets/secret-copier-68gzWNRB.js","assets/index-U7cfLZjk.js","assets/index-Fd0xVSp_.css","assets/index-CKvkkIkH.js","assets/ServerStackIcon-CTxTfpKw.js","assets/index-DjIt7K6k.js","assets/billing-required-D8JPVUCq.js","assets/managed-compute-Dhtcalwt.js","assets/managed-workers-gate-C-OegMsp.js","assets/github-button-DalgP0Fz.js","assets/ArrowPathIcon-DJaZk0M1.js","assets/index-Df3PCeRG.js","assets/steps-CZ8cuefp.js","assets/index-VOVOHhA6.js","assets/create-worker-form-BqgLk5vw.js","assets/index-CY7bg9j1.js","assets/index-jA2UlkYY.js","assets/index-CIa_u54h.js","assets/index-DQrE5gCH.js","assets/index-BKaLm0fk.js","assets/index-BkqnLZBk.js"])))=>i.map(i=>d[i]); -var Yfe=Object.defineProperty;var e6=e=>{throw TypeError(e)};var Xfe=(e,t,n)=>t in e?Yfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var re=(e,t,n)=>Xfe(e,typeof t!="symbol"?t+"":t,n),gT=(e,t,n)=>t.has(e)||e6("Cannot "+n);var ue=(e,t,n)=>(gT(e,t,"read from private field"),n?n.call(e):t.get(e)),wt=(e,t,n)=>t.has(e)?e6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),rt=(e,t,n,r)=>(gT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Xt=(e,t,n)=>(gT(e,t,"access private method"),n);var t_=(e,t,n,r)=>({set _(o){rt(e,t,o,n)},get _(){return ue(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4f0130cf-ae05-41cd-bbbb-a7b8ba888d8d",e._sentryDebugIdIdentifier="sentry-dbid-4f0130cf-ae05-41cd-bbbb-a7b8ba888d8d")}catch{}})();function Qfe(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Zfe=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Zfe.SENTRY_RELEASE={id:"68295d4ec88cf3e744dae100baf28f6ebf20f096"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var qu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ln(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jfe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var vT={exports:{}},S1={},yT={exports:{}},An={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var t6;function ede(){if(t6)return An;t6=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.iterator;function h(z){return z===null||typeof z!="object"?null:(z=d&&z[d]||z["@@iterator"],typeof z=="function"?z:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function w(z,X,ee){this.props=z,this.context=X,this.refs=y,this.updater=ee||p}w.prototype.isReactComponent={},w.prototype.setState=function(z,X){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,X,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function _(){}_.prototype=w.prototype;function C(z,X,ee){this.props=z,this.context=X,this.refs=y,this.updater=ee||p}var O=C.prototype=new _;O.constructor=C,x(O,w.prototype),O.isPureReactComponent=!0;var P=Array.isArray,R=Object.prototype.hasOwnProperty,T={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function M(z,X,ee){var ae,fe={},ie=null,we=null;if(X!=null)for(ae in X.ref!==void 0&&(we=X.ref),X.key!==void 0&&(ie=""+X.key),X)R.call(X,ae)&&!k.hasOwnProperty(ae)&&(fe[ae]=X[ae]);var de=arguments.length-2;if(de===1)fe.children=ee;else if(1rde||!ode.test(t)?null:t}const ade=6e4,sde=1e3,lde=1e4,tI="exchange-token";function ude(e){return[tI,e]}function lK(e,t){return{queryKey:ude(e),queryFn:()=>t(),staleTime:n=>{const r=n.state.data;if(!r)return 0;const o=new Date(r.expiresAt).getTime();return Math.max(0,o-Date.now()-ade)},gcTime:3600*1e3,retry:5,retryDelay:n=>Math.min(sde*2**n,lde)}}function uK(e,t){return function(){return e.apply(t,arguments)}}const{toString:cde}=Object.prototype,{getPrototypeOf:PO}=Object,{iterator:TO,toStringTag:cK}=Symbol,AO=(e=>t=>{const n=cde.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wl=e=>(e=e.toLowerCase(),t=>AO(t)===e),kO=e=>t=>typeof t===e,{isArray:Ly}=Array,Yv=kO("undefined");function Kx(e){return e!==null&&!Yv(e)&&e.constructor!==null&&!Yv(e.constructor)&&Pa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fK=Wl("ArrayBuffer");function fde(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fK(e.buffer),t}const dde=kO("string"),Pa=kO("function"),dK=kO("number"),Yx=e=>e!==null&&typeof e=="object",hde=e=>e===!0||e===!1,J_=e=>{if(AO(e)!=="object")return!1;const t=PO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(cK in e)&&!(TO in e)},pde=e=>{if(!Yx(e)||Kx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},mde=Wl("Date"),gde=Wl("File"),vde=e=>!!(e&&typeof e.uri<"u"),yde=e=>e&&typeof e.getParts<"u",wde=Wl("Blob"),xde=Wl("FileList"),bde=e=>Yx(e)&&Pa(e.pipe);function Sde(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const i6=Sde(),a6=typeof i6.FormData<"u"?i6.FormData:void 0,_de=e=>{if(!e)return!1;if(a6&&e instanceof a6)return!0;const t=PO(e);if(!t||t===Object.prototype||!Pa(e.append))return!1;const n=AO(e);return n==="formdata"||n==="object"&&Pa(e.toString)&&e.toString()==="[object FormData]"},Ede=Wl("URLSearchParams"),[Cde,Ode,Rde,Pde]=["ReadableStream","Request","Response","Headers"].map(Wl),Tde=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xx(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ly(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Sp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pK=e=>!Yv(e)&&e!==Sp;function nI(...e){const{caseless:t,skipUndefined:n}=pK(this)&&this||{},r={},o=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&hK(r,a)||a,l=rI(r,s)?r[s]:void 0;J_(l)&&J_(i)?r[s]=nI(l,i):J_(i)?r[s]=nI({},i):Ly(i)?r[s]=i.slice():(!n||!Yv(i))&&(r[s]=i)};for(let i=0,a=e.length;i(Xx(t,(o,i)=>{n&&Pa(o)?Object.defineProperty(e,i,{__proto__:null,value:uK(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),kde=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nde=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Mde=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&PO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jde=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ide=e=>{if(!e)return null;if(Ly(e))return e;let t=e.length;if(!dK(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Dde=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&PO(Uint8Array)),Lde=(e,t)=>{const r=(e&&e[TO]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},$de=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Fde=Wl("HTMLFormElement"),Bde=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),rI=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zde=Wl("RegExp"),mK=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xx(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},qde=e=>{mK(e,(t,n)=>{if(Pa(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Pa(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ude=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Ly(e)?r(e):r(String(e).split(t)),n},Vde=()=>{},Wde=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hde(e){return!!(e&&Pa(e.append)&&e[cK]==="FormData"&&e[TO])}const Gde=e=>{const t=new Array(10),n=(r,o)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(Kx(r))return r;if(!("toJSON"in r)){t[o]=r;const i=Ly(r)?[]:{};return Xx(r,(a,s)=>{const l=n(a,o+1);!Yv(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},Kde=Wl("AsyncFunction"),Yde=e=>e&&(Yx(e)||Pa(e))&&Pa(e.then)&&Pa(e.catch),gK=((e,t)=>e?setImmediate:t?((n,r)=>(Sp.addEventListener("message",({source:o,data:i})=>{o===Sp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Sp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pa(Sp.postMessage)),Xde=typeof queueMicrotask<"u"?queueMicrotask.bind(Sp):typeof process<"u"&&process.nextTick||gK,Qde=e=>e!=null&&Pa(e[TO]),Re={isArray:Ly,isArrayBuffer:fK,isBuffer:Kx,isFormData:_de,isArrayBufferView:fde,isString:dde,isNumber:dK,isBoolean:hde,isObject:Yx,isPlainObject:J_,isEmptyObject:pde,isReadableStream:Cde,isRequest:Ode,isResponse:Rde,isHeaders:Pde,isUndefined:Yv,isDate:mde,isFile:gde,isReactNativeBlob:vde,isReactNative:yde,isBlob:wde,isRegExp:zde,isFunction:Pa,isStream:bde,isURLSearchParams:Ede,isTypedArray:Dde,isFileList:xde,forEach:Xx,merge:nI,extend:Ade,trim:Tde,stripBOM:kde,inherits:Nde,toFlatObject:Mde,kindOf:AO,kindOfTest:Wl,endsWith:jde,toArray:Ide,forEachEntry:Lde,matchAll:$de,isHTMLForm:Fde,hasOwnProperty:rI,hasOwnProp:rI,reduceDescriptors:mK,freezeMethods:qde,toObjectSet:Ude,toCamelCase:Bde,noop:Vde,toFiniteNumber:Wde,findKey:hK,global:Sp,isContextDefined:pK,isSpecCompliantForm:Hde,toJSONObject:Gde,isAsyncFn:Kde,isThenable:Yde,setImmediate:gK,asap:Xde,isIterable:Qde},Zde=Re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jde=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Zde[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},s6=Symbol("internals"),ehe=/[^\x09\x20-\x7E\x80-\xFF]/g;function the(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function _1(e){return e&&String(e).trim().toLowerCase()}function nhe(e){return the(e.replace(ehe,""))}function eE(e){return e===!1||e==null?e:Re.isArray(e)?e.map(eE):nhe(String(e))}function rhe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ohe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function wT(e,t,n,r,o){if(Re.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Re.isString(t)){if(Re.isString(r))return t.indexOf(r)!==-1;if(Re.isRegExp(r))return r.test(t)}}function ihe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ahe(e,t){const n=Re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}let Zi=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,u){const c=_1(l);if(!c)throw new Error("header name must be a non-empty string");const d=Re.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=eE(s))}const a=(s,l)=>Re.forEach(s,(u,c)=>i(u,c,l));if(Re.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Re.isString(t)&&(t=t.trim())&&!ohe(t))a(Jde(t),n);else if(Re.isObject(t)&&Re.isIterable(t)){let s={},l,u;for(const c of t){if(!Re.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?Re.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}a(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=_1(t),t){const r=Re.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return rhe(o);if(Re.isFunction(n))return n.call(this,o,r);if(Re.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_1(t),t){const r=Re.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||wT(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=_1(a),a){const s=Re.findKey(r,a);s&&(!n||wT(r,r[s],s,n))&&(delete r[s],o=!0)}}return Re.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||wT(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Re.forEach(this,(o,i)=>{const a=Re.findKey(r,i);if(a){n[a]=eE(o),delete n[i];return}const s=t?ihe(i):String(i).trim();s!==i&&delete n[i],n[s]=eE(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Re.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[s6]=this[s6]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=_1(a);r[s]||(ahe(o,a),r[s]=!0)}return Re.isArray(t)?t.forEach(i):i(t),this}};Zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Re.reduceDescriptors(Zi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Re.freezeMethods(Zi);const she="[REDACTED ****]";function lhe(e){if(Re.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Re.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function uhe(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],o=i=>{if(i===null||typeof i!="object"||Re.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof Zi&&(i=i.toJSON()),r.push(i);let a;if(Re.isArray(i))a=[],i.forEach((s,l)=>{const u=o(s);Re.isUndefined(u)||(a[l]=u)});else{if(!Re.isPlainObject(i)&&lhe(i))return r.pop(),i;a=Object.create(null);for(const[s,l]of Object.entries(i)){const u=n.has(s.toLowerCase())?she:o(l);Re.isUndefined(u)||(a[s]=u)}}return r.pop(),a};return o(e)}let Tt=class vK extends Error{static from(t,n,r,o,i,a){const s=new vK(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(t,n,r,o,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&Re.hasOwnProp(t,"redact")?t.redact:void 0,r=Re.isArray(n)&&n.length>0?uhe(t,n):Re.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Tt.ERR_BAD_OPTION="ERR_BAD_OPTION";Tt.ECONNABORTED="ECONNABORTED";Tt.ETIMEDOUT="ETIMEDOUT";Tt.ECONNREFUSED="ECONNREFUSED";Tt.ERR_NETWORK="ERR_NETWORK";Tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Tt.ERR_DEPRECATED="ERR_DEPRECATED";Tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Tt.ERR_CANCELED="ERR_CANCELED";Tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Tt.ERR_INVALID_URL="ERR_INVALID_URL";Tt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const che=null;function oI(e){return Re.isPlainObject(e)||Re.isArray(e)}function yK(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function xT(e,t,n){return e?e.concat(t).map(function(o,i){return o=yK(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function fhe(e){return Re.isArray(e)&&!e.some(oI)}const dhe=Re.toFlatObject(Re,{},null,function(t){return/^is[A-Z]/.test(t)});function NO(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,_){return!Re.isUndefined(_[w])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,u=s&&Re.isSpecCompliantForm(t);if(!Re.isFunction(o))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(Re.isDate(y))return y.toISOString();if(Re.isBoolean(y))return y.toString();if(!u&&Re.isBlob(y))throw new Tt("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(y)||Re.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,w,_){let C=y;if(Re.isReactNative(t)&&Re.isReactNativeBlob(y))return t.append(xT(_,w,i),c(y)),!1;if(y&&!_&&typeof y=="object"){if(Re.endsWith(w,"{}"))w=r?w:w.slice(0,-2),y=JSON.stringify(y);else if(Re.isArray(y)&&fhe(y)||(Re.isFileList(y)||Re.endsWith(w,"[]"))&&(C=Re.toArray(y)))return w=yK(w),C.forEach(function(P,R){!(Re.isUndefined(P)||P===null)&&t.append(a===!0?xT([w],R,i):a===null?w:w+"[]",c(P))}),!1}return oI(y)?!0:(t.append(xT(_,w,i),c(y)),!1)}const h=[],p=Object.assign(dhe,{defaultVisitor:d,convertValue:c,isVisitable:oI});function x(y,w,_=0){if(!Re.isUndefined(y)){if(_>l)throw new Tt("Object is too deeply nested ("+_+" levels). Max depth: "+l,Tt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(y)!==-1)throw Error("Circular reference detected in "+w.join("."));h.push(y),Re.forEach(y,function(O,P){(!(Re.isUndefined(O)||O===null)&&o.call(t,O,Re.isString(P)?P.trim():P,w,p))===!0&&x(O,w?w.concat(P):[P],_+1)}),h.pop()}}if(!Re.isObject(e))throw new TypeError("data must be an object");return x(e),t}function l6(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function N3(e,t){this._pairs=[],e&&NO(e,this,t)}const wK=N3.prototype;wK.append=function(t,n){this._pairs.push([t,n])};wK.toString=function(t){const n=t?function(r){return t.call(this,r,l6)}:l6;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hhe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xK(e,t,n){if(!t)return e;const r=n&&n.encode||hhe,o=Re.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(i?a=i(t,o):a=Re.isURLSearchParams(t)?t.toString():new N3(t,o).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class u6{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const M3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},phe=typeof URLSearchParams<"u"?URLSearchParams:N3,mhe=typeof FormData<"u"?FormData:null,ghe=typeof Blob<"u"?Blob:null,vhe={isBrowser:!0,classes:{URLSearchParams:phe,FormData:mhe,Blob:ghe},protocols:["http","https","file","blob","url","data"]},j3=typeof window<"u"&&typeof document<"u",iI=typeof navigator=="object"&&navigator||void 0,yhe=j3&&(!iI||["ReactNative","NativeScript","NS"].indexOf(iI.product)<0),whe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xhe=j3&&window.location.href||"http://localhost",bhe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:j3,hasStandardBrowserEnv:yhe,hasStandardBrowserWebWorkerEnv:whe,navigator:iI,origin:xhe},Symbol.toStringTag,{value:"Module"})),Ri={...bhe,...vhe};function She(e,t){return NO(e,new Ri.classes.URLSearchParams,{visitor:function(n,r,o,i){return Ri.isNode&&Re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function _he(e){return Re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ehe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Re.isArray(o)?o.length:a,l?(Re.hasOwnProp(o,a)?o[a]=Re.isArray(o[a])?o[a].concat(r):[o[a],r]:o[a]=r,!s):((!o[a]||!Re.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Re.isArray(o[a])&&(o[a]=Ehe(o[a])),!s)}if(Re.isFormData(e)&&Re.isFunction(e.entries)){const n={};return Re.forEachEntry(e,(r,o)=>{t(_he(r),o,n,0)}),n}return null}const Hg=(e,t)=>e!=null&&Re.hasOwnProp(e,t)?e[t]:void 0;function Che(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qx={transitional:M3,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Re.isObject(t);if(i&&Re.isHTMLForm(t)&&(t=new FormData(t)),Re.isFormData(t))return o?JSON.stringify(bK(t)):t;if(Re.isArrayBuffer(t)||Re.isBuffer(t)||Re.isStream(t)||Re.isFile(t)||Re.isBlob(t)||Re.isReadableStream(t))return t;if(Re.isArrayBufferView(t))return t.buffer;if(Re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){const l=Hg(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return She(t,l).toString();if((s=Re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Hg(this,"env"),c=u&&u.FormData;return NO(s?{"files[]":t}:t,c&&new c,l)}}return i||o?(n.setContentType("application/json",!1),Che(t)):t}],transformResponse:[function(t){const n=Hg(this,"transitional")||Qx.transitional,r=n&&n.forcedJSONParsing,o=Hg(this,"responseType"),i=o==="json";if(Re.isResponse(t)||Re.isReadableStream(t))return t;if(t&&Re.isString(t)&&(r&&!o||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Hg(this,"parseReviver"))}catch(l){if(s)throw l.name==="SyntaxError"?Tt.from(l,Tt.ERR_BAD_RESPONSE,this,null,Hg(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ri.classes.FormData,Blob:Ri.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Re.forEach(["delete","get","head","post","put","patch","query"],e=>{Qx.headers[e]={}});function bT(e,t){const n=this||Qx,r=t||n,o=Zi.from(r.headers);let i=r.data;return Re.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function SK(e){return!!(e&&e.__CANCEL__)}let Zx=class extends Tt{constructor(t,n,r){super(t??"canceled",Tt.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function _K(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Tt("Request failed with status code "+n.status,n.status>=400&&n.status<500?Tt.ERR_BAD_REQUEST:Tt.ERR_BAD_RESPONSE,n.config,n.request,n))}function Ohe(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Rhe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];a||(a=u),n[o]=l,r[o]=u;let d=i,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a{n=c,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(o=u,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const xE=(e,t,n=3)=>{let r=0;const o=Rhe(50,250);return Phe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=s!=null?Math.min(a,s):a,u=Math.max(0,l-r),c=o(u);r=Math.max(r,l);const d={loaded:l,total:s,progress:s?l/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s?(s-l)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},c6=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},f6=e=>(...t)=>Re.asap(()=>e(...t)),The=Ri.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ri.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ri.origin),Ri.navigator&&/(msie|trident)/i.test(Ri.navigator.userAgent)):()=>!0,Ahe=Ri.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];Re.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Re.isString(r)&&s.push(`path=${r}`),Re.isString(o)&&s.push(`domain=${o}`),i===!0&&s.push("secure"),Re.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Zi?{...e}:e;function Xp(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,c,d,h){return Re.isPlainObject(u)&&Re.isPlainObject(c)?Re.merge.call({caseless:h},u,c):Re.isPlainObject(c)?Re.merge({},c):Re.isArray(c)?c.slice():c}function o(u,c,d,h){if(Re.isUndefined(c)){if(!Re.isUndefined(u))return r(void 0,u,d,h)}else return r(u,c,d,h)}function i(u,c){if(!Re.isUndefined(c))return r(void 0,c)}function a(u,c){if(Re.isUndefined(c)){if(!Re.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(Re.hasOwnProp(t,d))return r(u,c);if(Re.hasOwnProp(e,d))return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>o(d6(u),d6(c),d,!0)};return Re.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=Re.hasOwnProp(l,c)?l[c]:o,h=Re.hasOwnProp(e,c)?e[c]:void 0,p=Re.hasOwnProp(t,c)?t[c]:void 0,x=d(h,p,c);Re.isUndefined(x)&&d!==s||(n[c]=x)}),n}const Mhe=["content-type","content-length"];function jhe(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Mhe.includes(r.toLowerCase())&&e.set(r,o)})}const Ihe=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),CK=e=>{const t=Xp({},e),n=h=>Re.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(t.headers=s=Zi.from(s),t.url=xK(EK(u,d,c),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?Ihe(l.password):""))),Re.isFormData(r)&&(Ri.hasStandardBrowserEnv||Ri.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):Re.isFunction(r.getHeaders)&&jhe(s,r.getHeaders(),n("formDataHeaderPolicy"))),Ri.hasStandardBrowserEnv&&(Re.isFunction(o)&&(o=o(t)),o===!0||o==null&&The(t.url))){const p=i&&a&&Ahe.read(a);p&&s.set(i,p)}return t},Dhe=typeof XMLHttpRequest<"u",Lhe=Dhe&&function(e){return new Promise(function(n,r){const o=CK(e);let i=o.data;const a=Zi.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=o,c,d,h,p,x;function y(){p&&p(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function _(){if(!w)return;const O=Zi.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),R={data:!s||s==="text"||s==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:O,config:e,request:w};_K(function(k){n(k),y()},function(k){r(k),y()},R),w=null}"onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(_)},w.onabort=function(){w&&(r(new Tt("Request aborted",Tt.ECONNABORTED,e,w)),y(),w=null)},w.onerror=function(P){const R=P&&P.message?P.message:"Network Error",T=new Tt(R,Tt.ERR_NETWORK,e,w);T.event=P||null,r(T),y(),w=null},w.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||M3;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new Tt(P,R.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,e,w)),y(),w=null},i===void 0&&a.setContentType(null),"setRequestHeader"in w&&Re.forEach(a.toJSON(),function(P,R){w.setRequestHeader(R,P)}),Re.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),s&&s!=="json"&&(w.responseType=o.responseType),u&&([h,x]=xE(u,!0),w.addEventListener("progress",h)),l&&w.upload&&([d,p]=xE(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=O=>{w&&(r(!O||O.type?new Zx(null,e,w):O),w.abort(),y(),w=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const C=Ohe(o.url);if(C&&!Ri.protocols.includes(C)){r(new Tt("Unsupported protocol "+C+":",Tt.ERR_BAD_REQUEST,e));return}w.send(i||null)})},$he=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Tt?c:new Zx(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new Tt(`timeout of ${t}ms exceeded`,Tt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Re.asap(s),l}},Fhe=function*(e,t){let n=e.byteLength;if(n{const o=Bhe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),o.return()}},{highWaterMark:2})};function qhe(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let a=r.length;const s=r.length;for(let p=0;p=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(a-=2,p+=2)}let l=0,u=s-1;const c=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);u>=0&&(r.charCodeAt(u)===61?(l++,u--):c(u)&&(l++,u-=3)),l===1&&u>=0&&(r.charCodeAt(u)===61||c(u))&&l++;const h=Math.floor(a/4)*3-(l||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let a=0,s=r.length;a=55296&&l<=56319&&a+1=56320&&u<=57343?(i+=4,a++):i+=3}else i+=3}return i}const I3="1.16.0",p6=64*1024,{isFunction:n_}=Re,m6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Uhe=e=>{const t=Re.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Re.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?n_(o):typeof fetch=="function",l=n_(i),u=n_(a);if(!s)return!1;const c=s&&n_(n),d=s&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):async _=>new Uint8Array(await new i(_).arrayBuffer())),h=l&&c&&m6(()=>{let _=!1;const C=new i(Ri.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),O=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),_&&!O}),p=u&&c&&m6(()=>Re.isReadableStream(new a("").body)),x={stream:p&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!x[_]&&(x[_]=(C,O)=>{let P=C&&C[_];if(P)return P.call(C);throw new Tt(`Response type '${_}' is not supported`,Tt.ERR_NOT_SUPPORT,O)})});const y=async _=>{if(_==null)return 0;if(Re.isBlob(_))return _.size;if(Re.isSpecCompliantForm(_))return(await new i(Ri.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Re.isArrayBufferView(_)||Re.isArrayBuffer(_))return _.byteLength;if(Re.isURLSearchParams(_)&&(_=_+""),Re.isString(_))return(await d(_)).byteLength},w=async(_,C)=>{const O=Re.toFiniteNumber(_.getContentLength());return O??y(C)};return async _=>{let{url:C,method:O,data:P,signal:R,cancelToken:T,timeout:k,onDownloadProgress:M,onUploadProgress:j,responseType:$,headers:L,withCredentials:K="same-origin",fetchOptions:H,maxContentLength:D,maxBodyLength:W}=CK(_);const q=Re.isNumber(D)&&D>-1,Y=Re.isNumber(W)&&W>-1;let U=o||fetch;$=$?($+"").toLowerCase():"text";let V=$he([R,T&&T.toAbortSignal()],k),G=null;const z=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let X;try{if(q&&typeof C=="string"&&C.startsWith("data:")&&qhe(C)>D)throw new Tt("maxContentLength size of "+D+" exceeded",Tt.ERR_BAD_RESPONSE,_,G);if(Y&&O!=="get"&&O!=="head"){const de=await w(L,P);if(typeof de=="number"&&isFinite(de)&&de>W)throw new Tt("Request body larger than maxBodyLength limit",Tt.ERR_BAD_REQUEST,_,G)}if(j&&h&&O!=="get"&&O!=="head"&&(X=await w(L,P))!==0){let de=new i(C,{method:"POST",body:P,duplex:"half"}),se;if(Re.isFormData(P)&&(se=de.headers.get("content-type"))&&L.setContentType(se),de.body){const[ye,Te]=c6(X,xE(f6(j)));P=h6(de.body,p6,ye,Te)}}Re.isString(K)||(K=K?"include":"omit");const ee=l&&"credentials"in i.prototype;if(Re.isFormData(P)){const de=L.getContentType();de&&/^multipart\/form-data/i.test(de)&&!/boundary=/i.test(de)&&L.delete("content-type")}L.set("User-Agent","axios/"+I3,!1);const ae={...H,signal:V,method:O.toUpperCase(),headers:L.normalize().toJSON(),body:P,duplex:"half",credentials:ee?K:void 0};G=l&&new i(C,ae);let fe=await(l?U(G,H):U(C,ae));if(q){const de=Re.toFiniteNumber(fe.headers.get("content-length"));if(de!=null&&de>D)throw new Tt("maxContentLength size of "+D+" exceeded",Tt.ERR_BAD_RESPONSE,_,G)}const ie=p&&($==="stream"||$==="response");if(p&&fe.body&&(M||q||ie&&z)){const de={};["status","statusText","headers"].forEach(Ie=>{de[Ie]=fe[Ie]});const se=Re.toFiniteNumber(fe.headers.get("content-length")),[ye,Te]=M&&c6(se,xE(f6(M),!0))||[];let ge=0;const Be=Ie=>{if(q&&(ge=Ie,ge>D))throw new Tt("maxContentLength size of "+D+" exceeded",Tt.ERR_BAD_RESPONSE,_,G);ye&&ye(Ie)};fe=new a(h6(fe.body,p6,Be,()=>{Te&&Te(),z&&z()}),de)}$=$||"text";let we=await x[Re.findKey(x,$)||"text"](fe,_);if(q&&!p&&!ie){let de;if(we!=null&&(typeof we.byteLength=="number"?de=we.byteLength:typeof we.size=="number"?de=we.size:typeof we=="string"&&(de=typeof r=="function"?new r().encode(we).byteLength:we.length)),typeof de=="number"&&de>D)throw new Tt("maxContentLength size of "+D+" exceeded",Tt.ERR_BAD_RESPONSE,_,G)}return!ie&&z&&z(),await new Promise((de,se)=>{_K(de,se,{data:we,headers:Zi.from(fe.headers),status:fe.status,statusText:fe.statusText,config:_,request:G})})}catch(ee){if(z&&z(),V&&V.aborted&&V.reason instanceof Tt){const ae=V.reason;throw ae.config=_,G&&(ae.request=G),ee!==ae&&(ae.cause=ee),ae}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,_,G,ee&&ee.response),{cause:ee.cause||ee}):Tt.from(ee,ee&&ee.code,_,G,ee&&ee.response)}}},Vhe=new Map,OK=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a=i.length,s=a,l,u,c=Vhe;for(;s--;)l=i[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:Uhe(t)),c=u;return u};OK();const D3={http:che,xhr:Lhe,fetch:{get:OK}};Re.forEach(D3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const g6=e=>`- ${e}`,Whe=e=>Re.isFunction(e)||e===null||e===!1;function Hhe(e,t){e=Re.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since : -`+a.map(g6).join(` -`):" "+g6(a[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o}const RK={getAdapter:Hhe,adapters:D3};function ST(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zx(null,e)}function v6(e){return ST(e),e.headers=Zi.from(e.headers),e.data=bT.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),RK.getAdapter(e.adapter||Qx.adapter,e)(e).then(function(r){ST(e),e.response=r;try{r.data=bT.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Zi.from(r.headers),r},function(r){if(!SK(r)&&(ST(e),r&&r.response)){e.response=r.response;try{r.response.data=bT.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Zi.from(r.response.headers)}return Promise.reject(r)})}const MO={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{MO[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const y6={};MO.transitional=function(t,n,r){function o(i,a){return"[Axios v"+I3+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Tt(o(a," has been removed"+(n?" in "+n:"")),Tt.ERR_DEPRECATED);return n&&!y6[a]&&(y6[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};MO.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ghe(e,t,n){if(typeof e!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new Tt("option "+i+" must be "+l,Tt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Tt("Unknown option "+i,Tt.ERR_BAD_OPTION)}}const tE={assertOptions:Ghe,validators:MO},Rs=tE.validators;let zp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new u6,response:new u6}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(` -`);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=i;else if(i){const a=i.indexOf(` -`),s=a===-1?-1:i.indexOf(` -`,a+1),l=s===-1?"":i.slice(s+1);String(r.stack).endsWith(l)||(r.stack+=` -`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xp(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&tE.assertOptions(r,{silentJSONParsing:Rs.transitional(Rs.boolean),forcedJSONParsing:Rs.transitional(Rs.boolean),clarifyTimeoutError:Rs.transitional(Rs.boolean),legacyInterceptorReqResOrdering:Rs.transitional(Rs.boolean)},!1),o!=null&&(Re.isFunction(o)?n.paramsSerializer={serialize:o}:tE.assertOptions(o,{encode:Rs.function,serialize:Rs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),tE.assertOptions(n,{baseUrl:Rs.spelling("baseURL"),withXsrfToken:Rs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Re.merge(i.common,i[n.method]);i&&Re.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete i[x]}),n.headers=Zi.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;l=l&&y.synchronous;const w=n.transitional||M3;w&&w.legacyInterceptorReqResOrdering?s.unshift(y.fulfilled,y.rejected):s.push(y.fulfilled,y.rejected)});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,d=0,h;if(!l){const x=[v6.bind(this),void 0];for(x.unshift(...s),x.push(...u),h=x.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Zx(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new PK(function(o){t=o}),cancel:t}}};function Yhe(e){return function(n){return e.apply(null,n)}}function Xhe(e){return Re.isObject(e)&&e.isAxiosError===!0}const aI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(aI).forEach(([e,t])=>{aI[t]=e});function TK(e){const t=new zp(e),n=uK(zp.prototype.request,t);return Re.extend(n,zp.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return TK(Xp(e,o))},n}const $r=TK(Qx);$r.Axios=zp;$r.CanceledError=Zx;$r.CancelToken=Khe;$r.isCancel=SK;$r.VERSION=I3;$r.toFormData=NO;$r.AxiosError=Tt;$r.Cancel=$r.CanceledError;$r.all=function(t){return Promise.all(t)};$r.spread=Yhe;$r.isAxiosError=Xhe;$r.mergeConfig=Xp;$r.AxiosHeaders=Zi;$r.formToJSON=e=>bK(Re.isHTMLForm(e)?new FormData(e):e);$r.getAdapter=RK.getAdapter;$r.HttpStatusCode=aI;$r.default=$r;const{Axios:het,AxiosError:pet,CanceledError:met,isCancel:get,CancelToken:vet,VERSION:yet,all:wet,Cancel:xet,isAxiosError:L3,spread:bet,toFormData:_et,AxiosHeaders:Eet,HttpStatusCode:Cet,formToJSON:Oet,getAdapter:Ret,mergeConfig:Pet,create:Tet}=$r;function AK(e,t){var r;if(!(e<3))return!1;if(L3(t)){const o=(r=t.response)==null?void 0:r.status;if(!o)return!0;if(o>=400&&o<500)return o===408||o===429}return!0}var wm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Np,Sd,jv,YG,Qhe=(YG=class extends wm{constructor(){super();wt(this,Np);wt(this,Sd);wt(this,jv);rt(this,jv,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ue(this,Sd)||this.setEventListener(ue(this,jv))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Sd))==null||t.call(this),rt(this,Sd,void 0))}setEventListener(t){var n;rt(this,jv,t),(n=ue(this,Sd))==null||n.call(this),rt(this,Sd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ue(this,Np)!==t&&(rt(this,Np,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ue(this,Np)=="boolean"?ue(this,Np):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Np=new WeakMap,Sd=new WeakMap,jv=new WeakMap,YG),$3=new Qhe,Zhe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_d,k3,XG,Jhe=(XG=class{constructor(){wt(this,_d,Zhe);wt(this,k3,!1)}setTimeoutProvider(e){rt(this,_d,e)}setTimeout(e,t){return ue(this,_d).setTimeout(e,t)}clearTimeout(e){ue(this,_d).clearTimeout(e)}setInterval(e,t){return ue(this,_d).setInterval(e,t)}clearInterval(e){ue(this,_d).clearInterval(e)}},_d=new WeakMap,k3=new WeakMap,XG),_p=new Jhe;function epe(e){setTimeout(e,0)}var tpe=typeof window>"u"||"Deno"in globalThis;function _i(){}function npe(e,t){return typeof e=="function"?e(t):e}function sI(e){return typeof e=="number"&&e>=0&&e!==1/0}function kK(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fd(e,t){return typeof e=="function"?e(t):e}function Is(e,t){return typeof e=="function"?e(t):e}function w6(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==F3(a,t.options))return!1}else if(!jw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function x6(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Qp(t.options.mutationKey)!==Qp(i))return!1}else if(!jw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function F3(e,t){return((t==null?void 0:t.queryKeyHashFn)||Qp)(e)}function Qp(e){return JSON.stringify(e,(t,n)=>lI(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function jw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>jw(e[n],t[n])):!1}var rpe=Object.prototype.hasOwnProperty;function B3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=b6(e)&&b6(t);if(!r&&!(lI(e)&&lI(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),s=a.length,l=r?new Array(s):{};let u=0;for(let c=0;c{_p.setTimeout(t,e)})}function uI(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?B3(e,t):t}function ipe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ape(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var z3=Symbol();function NK(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===z3?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function q3(e,t){return typeof e=="function"?e(...t):!!e}function spe(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Dw=(()=>{let e=()=>tpe;return{isServer(){return e()},setIsServer(t){e=t}}})();function cI(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var lpe=epe;function upe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=lpe;const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Gr=upe(),Iv,Ed,Dv,QG,cpe=(QG=class extends wm{constructor(){super();wt(this,Iv,!0);wt(this,Ed);wt(this,Dv);rt(this,Dv,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,Ed)||this.setEventListener(ue(this,Dv))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Ed))==null||t.call(this),rt(this,Ed,void 0))}setEventListener(t){var n;rt(this,Dv,t),(n=ue(this,Ed))==null||n.call(this),rt(this,Ed,t(this.setOnline.bind(this)))}setOnline(t){ue(this,Iv)!==t&&(rt(this,Iv,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ue(this,Iv)}},Iv=new WeakMap,Ed=new WeakMap,Dv=new WeakMap,QG),bE=new cpe;function fpe(e){return Math.min(1e3*2**e,3e4)}function MK(e){return(e??"online")==="online"?bE.isOnline():!0}var fI=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jK(e){let t=!1,n=0,r;const o=cI(),i=()=>o.status!=="pending",a=y=>{var w;if(!i()){const _=new fI(y);h(_),(w=e.onCancel)==null||w.call(e,_)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>$3.isFocused()&&(e.networkMode==="always"||bE.isOnline())&&e.canRun(),c=()=>MK(e.networkMode)&&e.canRun(),d=y=>{i()||(r==null||r(),o.resolve(y))},h=y=>{i()||(r==null||r(),o.reject(y))},p=()=>new Promise(y=>{var w;r=_=>{(i()||u())&&y(_)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),x=()=>{if(i())return;let y;const w=n===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(_){y=Promise.reject(_)}Promise.resolve(y).then(d).catch(_=>{var T;if(i())return;const C=e.retry??(Dw.isServer()?0:3),O=e.retryDelay??fpe,P=typeof O=="function"?O(n,_):O,R=C===!0||typeof C=="number"&&nu()?void 0:p()).then(()=>{t?h(_):x()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r==null||r(),o),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?x():p().then(x),o)}}var Mp,ZG,IK=(ZG=class{constructor(){wt(this,Mp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sI(this.gcTime)&&rt(this,Mp,_p.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Dw.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Mp)!==void 0&&(_p.clearTimeout(ue(this,Mp)),rt(this,Mp,void 0))}},Mp=new WeakMap,ZG),jp,Lv,Ms,Ip,Wo,$x,Dp,es,DK,Wc,JG,dpe=(JG=class extends IK{constructor(t){super();wt(this,es);wt(this,jp);wt(this,Lv);wt(this,Ms);wt(this,Ip);wt(this,Wo);wt(this,$x);wt(this,Dp);rt(this,Dp,!1),rt(this,$x,t.defaultOptions),this.setOptions(t.options),this.observers=[],rt(this,Ip,t.client),rt(this,Ms,ue(this,Ip).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,rt(this,jp,E6(this.options)),this.state=t.state??ue(this,jp),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ue(this,Wo))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,$x),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=E6(this.options);n.data!==void 0&&(this.setState(_6(n.data,n.dataUpdatedAt)),rt(this,jp,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Ms).remove(this)}setData(t,n){const r=uI(this.state.data,t,this.options);return Xt(this,es,Wc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Xt(this,es,Wc).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=ue(this,Wo))==null?void 0:r.promise;return(o=ue(this,Wo))==null||o.cancel(t),n?n.then(_i).catch(_i):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,jp)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Is(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===z3||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Fd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!kK(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ue(this,Wo))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ue(this,Wo))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,Ms).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ue(this,Wo)&&(ue(this,Dp)||Xt(this,es,DK).call(this)?ue(this,Wo).cancel({revert:!0}):ue(this,Wo).cancelRetry()),this.scheduleGc()),ue(this,Ms).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xt(this,es,Wc).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,c,d,h,p,x,y,w,_,C,O;if(this.state.fetchStatus!=="idle"&&((l=ue(this,Wo))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Wo))return ue(this,Wo).continueRetry(),ue(this,Wo).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(R=>R.options.queryFn);P&&this.setOptions(P.options)}const r=new AbortController,o=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(rt(this,Dp,!0),r.signal)})},i=()=>{const P=NK(this.options,n),T=(()=>{const k={client:ue(this,Ip),queryKey:this.queryKey,meta:this.meta};return o(k),k})();return rt(this,Dp,!1),this.options.persister?this.options.persister(P,T,this):P(T)},s=(()=>{const P={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ue(this,Ip),state:this.state,fetchFn:i};return o(P),P})();(u=this.options.behavior)==null||u.onFetch(s,this),rt(this,Lv,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Xt(this,es,Wc).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),rt(this,Wo,jK({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:P=>{P instanceof fI&&P.revert&&this.setState({...ue(this,Lv),fetchStatus:"idle"}),r.abort()},onFail:(P,R)=>{Xt(this,es,Wc).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{Xt(this,es,Wc).call(this,{type:"pause"})},onContinue:()=>{Xt(this,es,Wc).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const P=await ue(this,Wo).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(p=(h=ue(this,Ms).config).onSuccess)==null||p.call(h,P,this),(y=(x=ue(this,Ms).config).onSettled)==null||y.call(x,P,this.state.error,this),P}catch(P){if(P instanceof fI){if(P.silent)return ue(this,Wo).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw Xt(this,es,Wc).call(this,{type:"error",error:P}),(_=(w=ue(this,Ms).config).onError)==null||_.call(w,P,this),(O=(C=ue(this,Ms).config).onSettled)==null||O.call(C,this.state.data,P,this),P}finally{this.scheduleGc()}}},jp=new WeakMap,Lv=new WeakMap,Ms=new WeakMap,Ip=new WeakMap,Wo=new WeakMap,$x=new WeakMap,Dp=new WeakMap,es=new WeakSet,DK=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Wc=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...LK(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,..._6(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return rt(this,Lv,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Gr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ue(this,Ms).notify({query:this,type:"updated",action:t})})},JG);function LK(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MK(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _6(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function E6(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ba,Vn,Fx,Wi,Lp,$v,Xc,Cd,Bx,Fv,Bv,$p,Fp,Od,zv,cr,ew,dI,hI,pI,mI,gI,vI,yI,$K,eK,jO=(eK=class extends wm{constructor(t,n){super();wt(this,cr);wt(this,ba);wt(this,Vn);wt(this,Fx);wt(this,Wi);wt(this,Lp);wt(this,$v);wt(this,Xc);wt(this,Cd);wt(this,Bx);wt(this,Fv);wt(this,Bv);wt(this,$p);wt(this,Fp);wt(this,Od);wt(this,zv,new Set);this.options=n,rt(this,ba,t),rt(this,Cd,null),rt(this,Xc,cI()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Vn).addObserver(this),C6(ue(this,Vn),this.options)?Xt(this,cr,ew).call(this):this.updateResult(),Xt(this,cr,mI).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wI(ue(this,Vn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wI(ue(this,Vn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Xt(this,cr,gI).call(this),Xt(this,cr,vI).call(this),ue(this,Vn).removeObserver(this)}setOptions(t){const n=this.options,r=ue(this,Vn);if(this.options=ue(this,ba).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Is(this.options.enabled,ue(this,Vn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Xt(this,cr,yI).call(this),ue(this,Vn).setOptions(this.options),n._defaulted&&!Iw(this.options,n)&&ue(this,ba).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Vn),observer:this});const o=this.hasListeners();o&&O6(ue(this,Vn),r,this.options,n)&&Xt(this,cr,ew).call(this),this.updateResult(),o&&(ue(this,Vn)!==r||Is(this.options.enabled,ue(this,Vn))!==Is(n.enabled,ue(this,Vn))||Fd(this.options.staleTime,ue(this,Vn))!==Fd(n.staleTime,ue(this,Vn)))&&Xt(this,cr,dI).call(this);const i=Xt(this,cr,hI).call(this);o&&(ue(this,Vn)!==r||Is(this.options.enabled,ue(this,Vn))!==Is(n.enabled,ue(this,Vn))||i!==ue(this,Od))&&Xt(this,cr,pI).call(this,i)}getOptimisticResult(t){const n=ue(this,ba).getQueryCache().build(ue(this,ba),t),r=this.createResult(n,t);return ppe(this,r)&&(rt(this,Wi,r),rt(this,$v,this.options),rt(this,Lp,ue(this,Vn).state)),r}getCurrentResult(){return ue(this,Wi)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ue(this,Xc).status==="pending"&&ue(this,Xc).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){ue(this,zv).add(t)}getCurrentQuery(){return ue(this,Vn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ue(this,ba).defaultQueryOptions(t),r=ue(this,ba).getQueryCache().build(ue(this,ba),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Xt(this,cr,ew).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,Wi)))}createResult(t,n){var j;const r=ue(this,Vn),o=this.options,i=ue(this,Wi),a=ue(this,Lp),s=ue(this,$v),u=t!==r?t.state:ue(this,Fx),{state:c}=t;let d={...c},h=!1,p;if(n._optimisticResults){const $=this.hasListeners(),L=!$&&C6(t,n),K=$&&O6(t,r,n,o);(L||K)&&(d={...d,...LK(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:x,errorUpdatedAt:y,status:w}=d;p=d.data;let _=!1;if(n.placeholderData!==void 0&&p===void 0&&w==="pending"){let $;i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?($=i.data,_=!0):$=typeof n.placeholderData=="function"?n.placeholderData((j=ue(this,Bv))==null?void 0:j.state.data,ue(this,Bv)):n.placeholderData,$!==void 0&&(w="success",p=uI(i==null?void 0:i.data,$,n),h=!0)}if(n.select&&p!==void 0&&!_)if(i&&p===(a==null?void 0:a.data)&&n.select===ue(this,Bx))p=ue(this,Fv);else try{rt(this,Bx,n.select),p=n.select(p),p=uI(i==null?void 0:i.data,p,n),rt(this,Fv,p),rt(this,Cd,null)}catch($){rt(this,Cd,$)}ue(this,Cd)&&(x=ue(this,Cd),p=ue(this,Fv),y=Date.now(),w="error");const C=d.fetchStatus==="fetching",O=w==="pending",P=w==="error",R=O&&C,T=p!==void 0,M={status:w,fetchStatus:d.fetchStatus,isPending:O,isSuccess:w==="success",isError:P,isInitialLoading:R,isLoading:R,data:p,dataUpdatedAt:d.dataUpdatedAt,error:x,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!O,isLoadingError:P&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:P&&T,isStale:U3(t,n),refetch:this.refetch,promise:ue(this,Xc),isEnabled:Is(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=M.data!==void 0,L=M.status==="error"&&!$,K=W=>{L?W.reject(M.error):$&&W.resolve(M.data)},H=()=>{const W=rt(this,Xc,M.promise=cI());K(W)},D=ue(this,Xc);switch(D.status){case"pending":t.queryHash===r.queryHash&&K(D);break;case"fulfilled":(L||M.data!==D.value)&&H();break;case"rejected":(!L||M.error!==D.reason)&&H();break}}return M}updateResult(){const t=ue(this,Wi),n=this.createResult(ue(this,Vn),this.options);if(rt(this,Lp,ue(this,Vn).state),rt(this,$v,this.options),ue(this,Lp).data!==void 0&&rt(this,Bv,ue(this,Vn)),Iw(n,t))return;rt(this,Wi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!ue(this,zv).size)return!0;const a=new Set(i??ue(this,zv));return this.options.throwOnError&&a.add("error"),Object.keys(ue(this,Wi)).some(s=>{const l=s;return ue(this,Wi)[l]!==t[l]&&a.has(l)})};Xt(this,cr,$K).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Xt(this,cr,mI).call(this)}},ba=new WeakMap,Vn=new WeakMap,Fx=new WeakMap,Wi=new WeakMap,Lp=new WeakMap,$v=new WeakMap,Xc=new WeakMap,Cd=new WeakMap,Bx=new WeakMap,Fv=new WeakMap,Bv=new WeakMap,$p=new WeakMap,Fp=new WeakMap,Od=new WeakMap,zv=new WeakMap,cr=new WeakSet,ew=function(t){Xt(this,cr,yI).call(this);let n=ue(this,Vn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_i)),n},dI=function(){Xt(this,cr,gI).call(this);const t=Fd(this.options.staleTime,ue(this,Vn));if(Dw.isServer()||ue(this,Wi).isStale||!sI(t))return;const r=kK(ue(this,Wi).dataUpdatedAt,t)+1;rt(this,$p,_p.setTimeout(()=>{ue(this,Wi).isStale||this.updateResult()},r))},hI=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Vn)):this.options.refetchInterval)??!1},pI=function(t){Xt(this,cr,vI).call(this),rt(this,Od,t),!(Dw.isServer()||Is(this.options.enabled,ue(this,Vn))===!1||!sI(ue(this,Od))||ue(this,Od)===0)&&rt(this,Fp,_p.setInterval(()=>{(this.options.refetchIntervalInBackground||$3.isFocused())&&Xt(this,cr,ew).call(this)},ue(this,Od)))},mI=function(){Xt(this,cr,dI).call(this),Xt(this,cr,pI).call(this,Xt(this,cr,hI).call(this))},gI=function(){ue(this,$p)!==void 0&&(_p.clearTimeout(ue(this,$p)),rt(this,$p,void 0))},vI=function(){ue(this,Fp)!==void 0&&(_p.clearInterval(ue(this,Fp)),rt(this,Fp,void 0))},yI=function(){const t=ue(this,ba).getQueryCache().build(ue(this,ba),this.options);if(t===ue(this,Vn))return;const n=ue(this,Vn);rt(this,Vn,t),rt(this,Fx,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},$K=function(t){Gr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ue(this,Wi))}),ue(this,ba).getQueryCache().notify({query:ue(this,Vn),type:"observerResultsUpdated"})})},eK);function hpe(e,t){return Is(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function C6(e,t){return hpe(e,t)||e.state.data!==void 0&&wI(e,t,t.refetchOnMount)}function wI(e,t,n){if(Is(t.enabled,e)!==!1&&Fd(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&U3(e,t)}return!1}function O6(e,t,n,r){return(e!==t||Is(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&U3(e,n)}function U3(e,t){return Is(t.enabled,e)!==!1&&e.isStaleByTime(Fd(t.staleTime,e))}function ppe(e,t){return!Iw(e.getCurrentResult(),t)}function SE(e){return{onFetch:(t,n)=>{var c,d,h,p,x;const r=t.options,o=(h=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((x=t.state.data)==null?void 0:x.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const w=O=>{spe(O,()=>t.signal,()=>y=!0)},_=NK(t.options,t.fetchOptions),C=async(O,P,R)=>{if(y)return Promise.reject();if(P==null&&O.pages.length)return Promise.resolve(O);const k=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:P,direction:R?"backward":"forward",meta:t.options.meta};return w(L),L})(),M=await _(k),{maxPages:j}=t.options,$=R?ape:ipe;return{pages:$(O.pages,M,j),pageParams:$(O.pageParams,P,j)}};if(o&&i.length){const O=o==="backward",P=O?FK:xI,R={pages:i,pageParams:a},T=P(r,R);s=await C(R,T,O)}else{const O=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:xI(r,s);if(l>0&&P==null)break;s=await C(s,P),l++}while(l{var y,w;return(w=(y=t.options).persister)==null?void 0:w.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function xI(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function FK(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function mpe(e,t){return t?xI(e,t)!=null:!1}function gpe(e,t){return!t||!e.getPreviousPageParam?!1:FK(e,t)!=null}var vpe=class extends jO{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:SE()})}getOptimisticResult(e){return e.behavior=SE(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var x,y;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:i,isError:a,isRefetchError:s}=r,l=(y=(x=n.fetchMeta)==null?void 0:x.fetchMore)==null?void 0:y.direction,u=a&&l==="forward",c=o&&l==="forward",d=a&&l==="backward",h=o&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:mpe(t,n.data),hasPreviousPage:gpe(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:h,isRefetchError:s&&!u&&!d,isRefetching:i&&!c&&!h}}},zx,Lu,bi,Bp,$u,dd,tK,ype=(tK=class extends IK{constructor(t){super();wt(this,$u);wt(this,zx);wt(this,Lu);wt(this,bi);wt(this,Bp);rt(this,zx,t.client),this.mutationId=t.mutationId,rt(this,bi,t.mutationCache),rt(this,Lu,[]),this.state=t.state||BK(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,Lu).includes(t)||(ue(this,Lu).push(t),this.clearGcTimeout(),ue(this,bi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){rt(this,Lu,ue(this,Lu).filter(n=>n!==t)),this.scheduleGc(),ue(this,bi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,Lu).length||(this.state.status==="pending"?this.scheduleGc():ue(this,bi).remove(this))}continue(){var t;return((t=ue(this,Bp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,l,u,c,d,h,p,x,y,w,_,C,O,P,R,T,k;const n=()=>{Xt(this,$u,dd).call(this,{type:"continue"})},r={client:ue(this,zx),meta:this.options.meta,mutationKey:this.options.mutationKey};rt(this,Bp,jK({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,j)=>{Xt(this,$u,dd).call(this,{type:"failed",failureCount:M,error:j})},onPause:()=>{Xt(this,$u,dd).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,bi).canRun(this)}));const o=this.state.status==="pending",i=!ue(this,Bp).canStart();try{if(o)n();else{Xt(this,$u,dd).call(this,{type:"pending",variables:t,isPaused:i}),ue(this,bi).config.onMutate&&await ue(this,bi).config.onMutate(t,this,r);const j=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t,r));j!==this.state.context&&Xt(this,$u,dd).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const M=await ue(this,Bp).start();return await((u=(l=ue(this,bi).config).onSuccess)==null?void 0:u.call(l,M,t,this.state.context,this,r)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,M,t,this.state.context,r)),await((p=(h=ue(this,bi).config).onSettled)==null?void 0:p.call(h,M,null,this.state.variables,this.state.context,this,r)),await((y=(x=this.options).onSettled)==null?void 0:y.call(x,M,null,t,this.state.context,r)),Xt(this,$u,dd).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(w=ue(this,bi).config).onError)==null?void 0:_.call(w,M,t,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((O=(C=this.options).onError)==null?void 0:O.call(C,M,t,this.state.context,r))}catch(j){Promise.reject(j)}try{await((R=(P=ue(this,bi).config).onSettled)==null?void 0:R.call(P,void 0,M,this.state.variables,this.state.context,this,r))}catch(j){Promise.reject(j)}try{await((k=(T=this.options).onSettled)==null?void 0:k.call(T,void 0,M,t,this.state.context,r))}catch(j){Promise.reject(j)}throw Xt(this,$u,dd).call(this,{type:"error",error:M}),M}finally{ue(this,bi).runNext(this)}}},zx=new WeakMap,Lu=new WeakMap,bi=new WeakMap,Bp=new WeakMap,$u=new WeakSet,dd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Gr.batch(()=>{ue(this,Lu).forEach(r=>{r.onMutationUpdate(t)}),ue(this,bi).notify({mutation:this,type:"updated",action:t})})},tK);function BK(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qc,Cl,qx,nK,wpe=(nK=class extends wm{constructor(t={}){super();wt(this,Qc);wt(this,Cl);wt(this,qx);this.config=t,rt(this,Qc,new Set),rt(this,Cl,new Map),rt(this,qx,0)}build(t,n,r){const o=new ype({client:t,mutationCache:this,mutationId:++t_(this,qx)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){ue(this,Qc).add(t);const n=r_(t);if(typeof n=="string"){const r=ue(this,Cl).get(n);r?r.push(t):ue(this,Cl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,Qc).delete(t)){const n=r_(t);if(typeof n=="string"){const r=ue(this,Cl).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&ue(this,Cl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=r_(t);if(typeof n=="string"){const r=ue(this,Cl).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=r_(t);if(typeof n=="string"){const o=(r=ue(this,Cl).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Gr.batch(()=>{ue(this,Qc).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,Qc).clear(),ue(this,Cl).clear()})}getAll(){return Array.from(ue(this,Qc))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>x6(n,r))}findAll(t={}){return this.getAll().filter(n=>x6(t,n))}notify(t){Gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Gr.batch(()=>Promise.all(t.map(n=>n.continue().catch(_i))))}},Qc=new WeakMap,Cl=new WeakMap,qx=new WeakMap,nK);function r_(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Zc,Rd,Sa,Jc,cf,nE,bI,rK,xpe=(rK=class extends wm{constructor(n,r){super();wt(this,cf);wt(this,Zc);wt(this,Rd);wt(this,Sa);wt(this,Jc);rt(this,Zc,n),this.setOptions(r),this.bindMethods(),Xt(this,cf,nE).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=ue(this,Zc).defaultMutationOptions(n),Iw(this.options,r)||ue(this,Zc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Sa),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Qp(r.mutationKey)!==Qp(this.options.mutationKey)?this.reset():((o=ue(this,Sa))==null?void 0:o.state.status)==="pending"&&ue(this,Sa).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ue(this,Sa))==null||n.removeObserver(this)}onMutationUpdate(n){Xt(this,cf,nE).call(this),Xt(this,cf,bI).call(this,n)}getCurrentResult(){return ue(this,Rd)}reset(){var n;(n=ue(this,Sa))==null||n.removeObserver(this),rt(this,Sa,void 0),Xt(this,cf,nE).call(this),Xt(this,cf,bI).call(this)}mutate(n,r){var o;return rt(this,Jc,r),(o=ue(this,Sa))==null||o.removeObserver(this),rt(this,Sa,ue(this,Zc).getMutationCache().build(ue(this,Zc),this.options)),ue(this,Sa).addObserver(this),ue(this,Sa).execute(n)}},Zc=new WeakMap,Rd=new WeakMap,Sa=new WeakMap,Jc=new WeakMap,cf=new WeakSet,nE=function(){var r;const n=((r=ue(this,Sa))==null?void 0:r.state)??BK();rt(this,Rd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},bI=function(n){Gr.batch(()=>{var r,o,i,a,s,l,u,c;if(ue(this,Jc)&&this.hasListeners()){const d=ue(this,Rd).variables,h=ue(this,Rd).context,p={client:ue(this,Zc),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=ue(this,Jc)).onSuccess)==null||o.call(r,n.data,d,h,p)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Jc)).onSettled)==null||a.call(i,n.data,null,d,h,p)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=ue(this,Jc)).onError)==null||l.call(s,n.error,d,h,p)}catch(x){Promise.reject(x)}try{(c=(u=ue(this,Jc)).onSettled)==null||c.call(u,void 0,n.error,d,h,p)}catch(x){Promise.reject(x)}}}this.listeners.forEach(d=>{d(ue(this,Rd))})})},rK);function R6(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function bpe(e,t,n){const r=e.slice(0);return r[t]=n,r}var qv,Za,Uv,Vv,js,Pd,Ux,Vx,Wx,Hx,ai,SI,_I,EI,CI,OI,oK,Spe=(oK=class extends wm{constructor(t,n,r){super();wt(this,ai);wt(this,qv);wt(this,Za);wt(this,Uv);wt(this,Vv);wt(this,js);wt(this,Pd);wt(this,Ux);wt(this,Vx);wt(this,Wx);wt(this,Hx,[]);rt(this,qv,t),rt(this,Vv,r),rt(this,Uv,[]),rt(this,js,[]),rt(this,Za,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&ue(this,js).forEach(t=>{t.subscribe(n=>{Xt(this,ai,CI).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,js).forEach(t=>{t.destroy()})}setQueries(t,n){rt(this,Uv,t),rt(this,Vv,n),Gr.batch(()=>{const r=ue(this,js),o=Xt(this,ai,EI).call(this,ue(this,Uv));o.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=o.map(d=>d.observer),a=i.map(d=>d.getCurrentResult()),s=r.length!==i.length,l=i.some((d,h)=>d!==r[h]),u=s||l,c=u?!0:a.some((d,h)=>{const p=ue(this,Za)[h];return!p||!Iw(d,p)});!u&&!c||(u&&(rt(this,Hx,o),rt(this,js,i)),rt(this,Za,a),this.hasListeners()&&(u&&(R6(r,i).forEach(d=>{d.destroy()}),R6(i,r).forEach(d=>{d.subscribe(h=>{Xt(this,ai,CI).call(this,d,h)})})),Xt(this,ai,OI).call(this)))})}getCurrentResult(){return ue(this,Za)}getQueries(){return ue(this,js).map(t=>t.getCurrentQuery())}getObservers(){return ue(this,js)}getOptimisticResult(t,n){const r=Xt(this,ai,EI).call(this,t),o=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[o,a=>Xt(this,ai,_I).call(this,a??o,n,i),()=>Xt(this,ai,SI).call(this,o,r)]}},qv=new WeakMap,Za=new WeakMap,Uv=new WeakMap,Vv=new WeakMap,js=new WeakMap,Pd=new WeakMap,Ux=new WeakMap,Vx=new WeakMap,Wx=new WeakMap,Hx=new WeakMap,ai=new WeakSet,SI=function(t,n){return n.map((r,o)=>{const i=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,a=>{n.forEach(s=>{s.observer.trackProp(a)})})})},_I=function(t,n,r){if(n){const o=ue(this,Wx),i=r!==void 0&&o!==void 0&&(o.length!==r.length||r.some((a,s)=>a!==o[s]));return(!ue(this,Pd)||ue(this,Za)!==ue(this,Vx)||i||n!==ue(this,Ux))&&(rt(this,Ux,n),rt(this,Vx,ue(this,Za)),r!==void 0&&rt(this,Wx,r),rt(this,Pd,B3(ue(this,Pd),n(t)))),ue(this,Pd)}return t},EI=function(t){const n=new Map;ue(this,js).forEach(o=>{const i=o.options.queryHash;if(!i)return;const a=n.get(i);a?a.push(o):n.set(i,[o])});const r=[];return t.forEach(o=>{var l;const i=ue(this,qv).defaultQueryOptions(o),s=((l=n.get(i.queryHash))==null?void 0:l.shift())??new jO(ue(this,qv),i);r.push({defaultedQueryOptions:i,observer:s})}),r},CI=function(t,n){const r=ue(this,js).indexOf(t);r!==-1&&(rt(this,Za,bpe(ue(this,Za),r,n)),Xt(this,ai,OI).call(this))},OI=function(){var t;if(this.hasListeners()){const n=ue(this,Pd),r=Xt(this,ai,SI).call(this,ue(this,Za),ue(this,Hx)),o=Xt(this,ai,_I).call(this,r,(t=ue(this,Vv))==null?void 0:t.combine);n!==o&&Gr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,Za))})})}},oK),Fu,iK,_pe=(iK=class extends wm{constructor(t={}){super();wt(this,Fu);this.config=t,rt(this,Fu,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??F3(o,n);let a=this.get(i);return a||(a=new dpe({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){ue(this,Fu).has(t.queryHash)||(ue(this,Fu).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ue(this,Fu).get(t.queryHash);n&&(t.destroy(),n===t&&ue(this,Fu).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,Fu).get(t)}getAll(){return[...ue(this,Fu).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>w6(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>w6(t,r)):n}notify(t){Gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Gr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fu=new WeakMap,iK),Wr,Td,Ad,Wv,Hv,kd,Gv,Kv,aK,Epe=(aK=class{constructor(e={}){wt(this,Wr);wt(this,Td);wt(this,Ad);wt(this,Wv);wt(this,Hv);wt(this,kd);wt(this,Gv);wt(this,Kv);rt(this,Wr,e.queryCache||new _pe),rt(this,Td,e.mutationCache||new wpe),rt(this,Ad,e.defaultOptions||{}),rt(this,Wv,new Map),rt(this,Hv,new Map),rt(this,kd,0)}mount(){t_(this,kd)._++,ue(this,kd)===1&&(rt(this,Gv,$3.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Wr).onFocus())})),rt(this,Kv,bE.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Wr).onOnline())})))}unmount(){var e,t;t_(this,kd)._--,ue(this,kd)===0&&((e=ue(this,Gv))==null||e.call(this),rt(this,Gv,void 0),(t=ue(this,Kv))==null||t.call(this),rt(this,Kv,void 0))}isFetching(e){return ue(this,Wr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Td).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ue(this,Wr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ue(this,Wr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Fd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ue(this,Wr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=ue(this,Wr).get(r.queryHash),i=o==null?void 0:o.state.data,a=npe(t,i);if(a!==void 0)return ue(this,Wr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Gr.batch(()=>ue(this,Wr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ue(this,Wr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ue(this,Wr);Gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ue(this,Wr);return Gr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Gr.batch(()=>ue(this,Wr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(_i).catch(_i)}invalidateQueries(e,t={}){return Gr.batch(()=>(ue(this,Wr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Gr.batch(()=>ue(this,Wr).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(_i)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(_i)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ue(this,Wr).build(this,t);return n.isStaleByTime(Fd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_i).catch(_i)}fetchInfiniteQuery(e){return e.behavior=SE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_i).catch(_i)}ensureInfiniteQueryData(e){return e.behavior=SE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bE.isOnline()?ue(this,Td).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Wr)}getMutationCache(){return ue(this,Td)}getDefaultOptions(){return ue(this,Ad)}setDefaultOptions(e){rt(this,Ad,e)}setQueryDefaults(e,t){ue(this,Wv).set(Qp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Wv).values()],n={};return t.forEach(r=>{jw(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ue(this,Hv).set(Qp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,Hv).values()],n={};return t.forEach(r=>{jw(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,Ad).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=F3(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===z3&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Ad).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Wr).clear(),ue(this,Td).clear()}},Wr=new WeakMap,Td=new WeakMap,Ad=new WeakMap,Wv=new WeakMap,Hv=new WeakMap,kd=new WeakMap,Gv=new WeakMap,Kv=new WeakMap,aK),b=Gx();const J=Ln(b),IO=Qfe({__proto__:null,default:J},[b]);var zK=b.createContext(void 0),rc=e=>{const t=b.useContext(zK);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Cpe=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(zK.Provider,{value:e,children:t})),qK=b.createContext(!1),UK=()=>b.useContext(qK);qK.Provider;function Ope(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rpe=b.createContext(Ope()),VK=()=>b.useContext(Rpe),WK=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?q3(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},HK=e=>{b.useEffect(()=>{e.clearReset()},[e])},GK=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||q3(n,[e.error,r])),KK=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ppe=(e,t)=>e.isLoading&&e.isFetching&&!t,RI=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,PI=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Tpe({queries:e,...t},n){const r=rc(),o=UK(),i=VK(),a=b.useMemo(()=>e.map(y=>{const w=r.defaultQueryOptions(y);return w._optimisticResults=o?"isRestoring":"optimistic",w}),[e,r,o]);a.forEach(y=>{KK(y);const w=r.getQueryCache().get(y.queryHash);WK(y,i,w)}),HK(i);const[s]=b.useState(()=>new Spe(r,a,t)),[l,u,c]=s.getOptimisticResult(a,t.combine),d=!o&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(y=>d?s.subscribe(Gr.batchCalls(y)):_i,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),b.useEffect(()=>{s.setQueries(a,t)},[a,t,s]);const p=l.some((y,w)=>RI(a[w],y))?l.flatMap((y,w)=>{const _=a[w];if(_&&RI(_,y)){const C=new jO(r,_);return PI(_,C,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const x=l.find((y,w)=>{const _=a[w];return _&&GK({result:y,errorResetBoundary:i,throwOnError:_.throwOnError,query:r.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(x!=null&&x.error)throw x.error;return u(c())}function YK(e,t,n){var h,p,x,y;const r=UK(),o=VK(),i=rc(),a=i.defaultQueryOptions(e);(p=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,a);const s=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",KK(a),WK(a,o,s),HK(o);const l=!i.getQueryCache().get(a.queryHash),[u]=b.useState(()=>new t(i,a)),c=u.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(w=>{const _=d?u.subscribe(Gr.batchCalls(w)):_i;return u.updateResult(),_},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(a)},[a,u]),RI(a,c))throw PI(a,u,o);if(GK({result:c,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw c.error;if((y=(x=i.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||y.call(x,a,c),a.experimental_prefetchInRender&&!Dw.isServer()&&Ppe(c,r)){const w=l?PI(a,u,o):s==null?void 0:s.promise;w==null||w.catch(_i).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function Mn(e,t){return YK(e,jO)}function Ir(e,t){const n=rc(),[r]=b.useState(()=>new xpe(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const o=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(Gr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=b.useCallback((a,s)=>{r.mutate(a,s).catch(_i)},[r]);if(o.error&&q3(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function Ape(e,t){return YK(e,vpe)}const Fs=new Epe({defaultOptions:{queries:{retry:AK}}});function kpe(){if(typeof window>"u"||typeof navigator>"u")return;let e,t=!1;const n=s=>{t=t||s,e&&window.clearTimeout(e),e=window.setTimeout(()=>{e=void 0;const l=t;if(t=!1,l){Fs.invalidateQueries({queryKey:[tI],refetchType:"all"});return}Fs.refetchQueries({queryKey:[tI],stale:!0,type:"all"})},250)},r=()=>n(!1),o=()=>n(!0);window.addEventListener("focus",r),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&r()}),window.addEventListener("online",o);const i=navigator,a=i.connection??i.mozConnection??i.webkitConnection;a==null||a.addEventListener("change",o)}kpe();const Npe="modulepreload",Mpe=function(e){return"/"+e},P6={},Zt=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let a=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=a(n.map(u=>{if(u=Mpe(u),u in P6)return;P6[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Npe,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((p,x)=>{h.addEventListener("load",p),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};function XK(e){return!!e}var xn=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(xn||{});let jpe=class{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}},Ipe=class extends jpe{constructor(){super(...arguments);re(this,"v1TaskGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1TaskEventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}/task-events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1LogLineList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tasks/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1TaskCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/tasks/cancel`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TenantLogLineList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TenantLogLineGetPointMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/log-point-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/tasks/replay`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskRestore",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/tasks/${n}/restore`,method:"POST",secure:!0,format:"json",...r,xResources:["tenant","task"]}),{resources:new Set(["tenant","task"])}));re(this,"v1DagListTasks",Object.assign((n,r={})=>this.request({path:"/api/v1/stable/dags/tasks",method:"GET",query:n,secure:!0,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"v1WorkflowRunList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunDisplayNamesList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/display-names`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunExternalIdsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/external-ids`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/workflow-runs/trigger`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1DurableTaskBranch",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/durable-tasks/branch`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1DurableTaskEventLogList",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/durable-tasks/${r}`,method:"GET",query:o,secure:!0,format:"json",...i,xResources:["tenant","durable-task"]}),{resources:new Set(["tenant","durable-task"])}));re(this,"v1WorkflowRunGet",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1WorkflowRunGetStatus",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/status`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1WorkflowRunTaskEventsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/task-events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1ObservabilityGetTrace",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/traces`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WorkflowRunGetTimings",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/workflow-runs/${n}/task-timings`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","v1-workflow-run"]}),{resources:new Set(["tenant","v1-workflow-run"])}));re(this,"v1TaskListStatusMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/task-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1TaskGetPointMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/task-point-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1EventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1EventGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/events/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-event"]}),{resources:new Set(["tenant","v1-event"])}));re(this,"v1EventKeyList",Object.assign((n,r={})=>this.request({path:`/api/v1/stable/tenants/${n}/events/keys`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1FilterGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1FilterDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1FilterUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/filters/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","v1-filter"]}),{resources:new Set(["tenant","v1-filter"])}));re(this,"v1WebhookList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WebhookCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"v1WebhookGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookReceive",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"POST",body:o,format:"json",...i,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1WebhookUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/stable/tenants/${n}/webhooks/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","v1-webhook"]}),{resources:new Set(["tenant","v1-webhook"])}));re(this,"v1CelDebug",Object.assign((n,r,o={})=>this.request({path:`/api/v1/stable/tenants/${n}/cel/debug`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"readinessGet",Object.assign((n={})=>this.request({path:"/api/ready",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"livenessGet",Object.assign((n={})=>this.request({path:"/api/live",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"metadataGet",Object.assign((n={})=>this.request({path:"/api/v1/meta",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"cloudMetadataGet",Object.assign((n={})=>this.request({path:"/api/v1/cloud/metadata",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"metadataListIntegrations",Object.assign((n={})=>this.request({path:"/api/v1/meta/integrations",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateLogin",Object.assign((n,r={})=>this.request({path:"/api/v1/users/login",method:"POST",body:n,type:xn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGoogleOauthStart",Object.assign((n={})=>this.request({path:"/api/v1/users/google/start",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGoogleOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/google/callback",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubOauthStart",Object.assign((n={})=>this.request({path:"/api/v1/users/github/start",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/github/callback",method:"GET",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateSlackOauthStart",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/slack/start`,method:"GET",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"userUpdateSlackOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/users/slack/callback",method:"GET",secure:!0,...n,xResources:[]}),{resources:new Set([])}));re(this,"snsUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/sns/${n}/${r}`,method:"POST",...o,xResources:[]}),{resources:new Set([])}));re(this,"snsList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/sns`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"snsCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/sns`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/alerting-email-groups`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/alerting-email-groups`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantResourcePolicyGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/resource-policy`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"alertEmailGroupUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/alerting-email-groups/${n}`,method:"PATCH",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant","alert-email-group"]}),{resources:new Set(["tenant","alert-email-group"])}));re(this,"alertEmailGroupDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/alerting-email-groups/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","alert-email-group"]}),{resources:new Set(["tenant","alert-email-group"])}));re(this,"snsDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/sns/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","sns"]}),{resources:new Set(["tenant","sns"])}));re(this,"slackWebhookList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/slack`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"slackWebhookDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/slack/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","slack"]}),{resources:new Set(["tenant","slack"])}));re(this,"userGetCurrent",Object.assign((n={})=>this.request({path:"/api/v1/users/current",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdatePassword",Object.assign((n,r={})=>this.request({path:"/api/v1/users/password",method:"POST",body:n,secure:!0,type:xn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/users/register",method:"POST",body:n,type:xn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateLogout",Object.assign((n={})=>this.request({path:"/api/v1/users/logout",method:"POST",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantMembershipsList",Object.assign((n={})=>this.request({path:"/api/v1/users/memberships",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userListTenantInvites",Object.assign((n={})=>this.request({path:"/api/v1/users/invites",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantInviteAccept",Object.assign((n,r={})=>this.request({path:"/api/v1/users/invites/accept",method:"POST",body:n,secure:!0,type:xn.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantInviteReject",Object.assign((n,r={})=>this.request({path:"/api/v1/users/invites/reject",method:"POST",body:n,secure:!0,type:xn.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/tenants",method:"POST",body:n,secure:!0,type:xn.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"tenantUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}`,method:"PATCH",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantAlertingSettingsGet",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/alerting/settings`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/invites`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/invites`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantInviteUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/invites/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","tenant-invite"]}),{resources:new Set(["tenant","tenant-invite"])}));re(this,"tenantInviteDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/invites/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","tenant-invite"]}),{resources:new Set(["tenant","tenant-invite"])}));re(this,"apiTokenCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"apiTokenList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"apiTokenUpdateRevoke",Object.assign((n,r={})=>this.request({path:`/api/v1/api-tokens/${n}`,method:"POST",secure:!0,...r,xResources:["tenant","api-token"]}),{resources:new Set(["tenant","api-token"])}));re(this,"tenantGetQueueMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/queue-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGetStepRunQueueMetrics",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/step-run-queue-metrics`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventCreateBulk",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/bulk`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventUpdateReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/replay`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"eventUpdateCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/events/cancel`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"rateLimitList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/rate-limits`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"rateLimitDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/rate-limits`,method:"DELETE",query:r,secure:!0,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantMemberList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/members`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantMemberUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/members/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","member"]}),{resources:new Set(["tenant","member"])}));re(this,"tenantMemberDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/members/${r}`,method:"DELETE",secure:!0,format:"json",...o,xResources:["tenant","member"]}),{resources:new Set(["tenant","member"])}));re(this,"eventGet",Object.assign((n,r={})=>this.request({path:`/api/v1/events/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","event"]}),{resources:new Set(["tenant","event"])}));re(this,"eventDataGet",Object.assign((n,r={})=>this.request({path:`/api/v1/events/${n}/data`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","event"]}),{resources:new Set(["tenant","event"])}));re(this,"eventDataGetWithTenant",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${r}/events/${n}/data`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","event-with-tenant"]}),{resources:new Set(["tenant","event-with-tenant"])}));re(this,"eventKeyList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/events/keys`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"scheduledWorkflowRunCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/scheduled`,method:"POST",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"DELETE",secure:!0,...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledTrigger",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/${r}`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","scheduled-workflow-run"]}),{resources:new Set(["tenant","scheduled-workflow-run"])}));re(this,"workflowScheduledBulkDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/bulk-delete`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowScheduledBulkUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/scheduled/bulk-update`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"cronWorkflowTriggerCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/crons`,method:"POST",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"cronWorkflowList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowCronGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"DELETE",secure:!0,...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronUpdate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"PATCH",body:o,secure:!0,type:xn.Json,...i,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowCronTrigger",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/crons/${r}`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","cron-workflow"]}),{resources:new Set(["tenant","cron-workflow"])}));re(this,"workflowRunCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/cancel`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowGet",Object.assign((n,r={})=>this.request({path:`/api/v1/workflows/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/workflows/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}`,method:"PATCH",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowVersionGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}/versions`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowRunCreate",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/workflows/${n}/trigger`,method:"POST",query:o,body:r,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workflows/${n}/metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"stepRunListEvents",Object.assign((n,r,o={})=>this.request({path:`/api/v1/step-runs/${n}/events`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workflowRunListStepRunEvents",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/step-run-events`,method:"GET",query:o,secure:!0,format:"json",...i,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"stepRunListArchives",Object.assign((n,r,o={})=>this.request({path:`/api/v1/step-runs/${n}/archives`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workflowGetWorkersCount",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/${r}/worker-count`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow"]}),{resources:new Set(["tenant","workflow"])}));re(this,"workflowRunList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/runs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunUpdateReplay",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/replay`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflows/runs/metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workflowRunGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"workflowRunGetShape",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/shape`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"stepRunGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunUpdateRerun",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/rerun`,method:"POST",body:o,secure:!0,type:xn.Json,format:"json",...i,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunUpdateCancel",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/cancel`,method:"POST",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"stepRunGetSchema",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/step-runs/${r}/schema`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","step-run"]}),{resources:new Set(["tenant","step-run"])}));re(this,"workerList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/worker`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"workerUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/workers/${n}`,method:"PATCH",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant","worker"]}),{resources:new Set(["tenant","worker"])}));re(this,"workerGet",Object.assign((n,r={})=>this.request({path:`/api/v1/workers/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","worker"]}),{resources:new Set(["tenant","worker"])}));re(this,"webhookList",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/webhook-workers`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"webhookCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/webhook-workers`,method:"POST",body:r,secure:!0,type:xn.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"webhookDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/webhook-workers/${n}`,method:"DELETE",secure:!0,...r,xResources:["tenant","webhook"]}),{resources:new Set(["tenant","webhook"])}));re(this,"webhookRequestsList",Object.assign((n,r={})=>this.request({path:`/api/v1/webhook-workers/${n}/requests`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","webhook"]}),{resources:new Set(["tenant","webhook"])}));re(this,"workflowRunGetInput",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/workflow-runs/${r}/input`,method:"GET",secure:!0,format:"json",...o,xResources:["tenant","workflow-run"]}),{resources:new Set(["tenant","workflow-run"])}));re(this,"monitoringPostRunProbe",Object.assign((n,r={})=>this.request({path:`/api/v1/monitoring/${n}/probe`,method:"POST",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"infoGetVersion",Object.assign((n={})=>this.request({path:"/api/v1/version",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"tenantGetPrometheusMetrics",Object.assign((n,r={})=>this.request({path:`/api/v1/tenants/${n}/prometheus-metrics`,method:"GET",secure:!0,...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantGetTaskStats",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/task-stats`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"tenantFeatureFlagEvaluate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/tenants/${n}/feature-flags`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}))}};var Co=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(Co||{});let Dpe=class{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}},Lpe=class extends Dpe{constructor(){super(...arguments);re(this,"metadataGet",Object.assign((n={})=>this.request({path:"/api/v1/cloud/metadata",method:"GET",format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubAppOauthStart",Object.assign((n,r={})=>this.request({path:"/api/v1/cloud/users/github-app/start",method:"GET",query:n,secure:!0,...r,xResources:[]}),{resources:new Set([])}));re(this,"userUpdateGithubAppOauthCallback",Object.assign((n={})=>this.request({path:"/api/v1/cloud/users/github-app/callback",method:"GET",secure:!0,...n,xResources:[]}),{resources:new Set([])}));re(this,"githubUpdateGlobalWebhook",Object.assign((n={})=>this.request({path:"/api/v1/cloud/github/webhook",method:"POST",...n,xResources:[]}),{resources:new Set([])}));re(this,"githubUpdateTenantWebhook",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/github/webhook/${n}`,method:"POST",...r,xResources:[]}),{resources:new Set([])}));re(this,"githubAppListInstallations",Object.assign((n,r={})=>this.request({path:"/api/v1/cloud/github-app/installations",method:"GET",query:n,secure:!0,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"githubAppListRepos",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/repos`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"githubAppUpdateInstallation",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/link`,method:"GET",query:r,secure:!0,...o,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"githubAppListBranches",Object.assign((n,r,o,i,a={})=>this.request({path:`/api/v1/cloud/github-app/installations/${n}/repos/${r}/${o}/branches`,method:"GET",query:i,secure:!0,format:"json",...a,xResources:["gh-installation"]}),{resources:new Set(["gh-installation"])}));re(this,"managedWorkerList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerTemplateCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker/template`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"computeCostGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/managed-worker/cost`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"managedWorkerGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"managedWorkerUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"managedWorkerDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}`,method:"DELETE",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"infraAsCodeCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/infra-as-code/${n}`,method:"POST",body:r,secure:!0,type:Co.Json,...o,xResources:["tenant","infra-as-code-request"]}),{resources:new Set(["tenant","infra-as-code-request"])}));re(this,"runtimeConfigListActions",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/runtime-config/${n}/actions`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","runtime-config"]}),{resources:new Set(["tenant","managed-worker","runtime-config"])}));re(this,"managedWorkerInstancesList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/instances`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"buildGet",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/build/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","build"]}),{resources:new Set(["tenant","managed-worker","build"])}));re(this,"managedWorkerEventsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/events`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsCpuGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/cpu`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsMemoryGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/memory`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"metricsDiskGet",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/metrics/disk`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"workflowRunEventsGetMetrics",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/runs-metrics`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"logList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"iacLogsList",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/managed-worker/${n}/iac-logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["tenant","managed-worker"]}),{resources:new Set(["tenant","managed-worker"])}));re(this,"buildLogsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/build/${n}/logs`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant","managed-worker","build"]}),{resources:new Set(["tenant","managed-worker","build"])}));re(this,"logCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/logs`,method:"POST",body:r,secure:!0,type:Co.Json,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"userOffersList",Object.assign((n={})=>this.request({path:"/api/v1/billing/offers",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"userOfferRedeem",Object.assign((n,r={})=>this.request({path:"/api/v1/billing/offers/redeem",method:"POST",body:n,secure:!0,type:Co.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"featureFlagsList",Object.assign((n,r={})=>this.request({path:`/api/v1/cloud/tenants/${n}/feature-flags`,method:"GET",secure:!0,format:"json",...r,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"externalAutoscalingConfigCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/cloud/tenants/${n}/autoscaling`,method:"POST",body:r,secure:!0,type:Co.Json,...o,xResources:["tenant"]}),{resources:new Set(["tenant"])}));re(this,"organizationList",Object.assign((n={})=>this.request({path:"/api/v1/management/organizations",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"organizationCreate",Object.assign((n,r={})=>this.request({path:"/api/v1/management/organizations",method:"POST",body:n,secure:!0,type:Co.Json,format:"json",...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationGet",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}`,method:"PATCH",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationCreateTenant",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/tenants`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationTenantUpdate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}`,method:"PATCH",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-tenants/${n}`,method:"DELETE",secure:!0,format:"json",...r,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantListApiTokens",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantCreateApiToken",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationTenantDeleteApiToken",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-tenants/${n}/api-tokens/${r}`,method:"DELETE",secure:!0,...o,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}));re(this,"organizationMemberDelete",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organization-members/${n}`,method:"DELETE",body:r,secure:!0,type:Co.Json,...o,xResources:["organization","organization-member"]}),{resources:new Set(["organization","organization-member"])}));re(this,"managementTokenCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/management-tokens`,method:"POST",body:r,secure:!0,type:Co.Json,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"managementTokenList",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}/management-tokens`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"managementTokenDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/management-tokens/${n}`,method:"DELETE",secure:!0,...r,xResources:["organization","management-token"]}),{resources:new Set(["organization","management-token"])}));re(this,"userListOrganizationInvites",Object.assign((n={})=>this.request({path:"/api/v1/management/invites",method:"GET",secure:!0,format:"json",...n,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteAccept",Object.assign((n,r={})=>this.request({path:"/api/v1/management/invites/accept",method:"POST",body:n,secure:!0,type:Co.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteReject",Object.assign((n,r={})=>this.request({path:"/api/v1/management/invites/reject",method:"POST",body:n,secure:!0,type:Co.Json,...r,xResources:[]}),{resources:new Set([])}));re(this,"organizationInviteList",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organizations/${n}/invites`,method:"GET",secure:!0,format:"json",...r,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationInviteCreate",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/invites`,method:"POST",body:r,secure:!0,type:Co.Json,...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationInviteDelete",Object.assign((n,r={})=>this.request({path:`/api/v1/management/organization-invites/${n}`,method:"DELETE",secure:!0,...r,xResources:["organization","organization-invite"]}),{resources:new Set(["organization","organization-invite"])}));re(this,"organizationListAuditLogs",Object.assign((n,r,o={})=>this.request({path:`/api/v1/management/organizations/${n}/audit-logs`,method:"GET",query:r,secure:!0,format:"json",...o,xResources:["organization"]}),{resources:new Set(["organization"])}));re(this,"organizationTenantMembersAdd",Object.assign((n,r,o,i={})=>this.request({path:`/api/v1/management/organizations/${n}/tenants/${r}/members`,method:"POST",body:o,secure:!0,type:Co.Json,...i,xResources:["organization","organization-tenant"]}),{resources:new Set(["organization","organization-tenant"])}))}};var pr=(e=>(e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain",e))(pr||{});class $pe{constructor({securityWorker:t,secure:n,format:r,...o}={}){re(this,"instance");re(this,"securityData",null);re(this,"securityWorker");re(this,"secure");re(this,"format");re(this,"setSecurityData",t=>{this.securityData=t});re(this,"request",async({secure:t,path:n,type:r,query:o,format:i,body:a,...s})=>{const l=(typeof t=="boolean"?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(s,l),c=i||this.format||void 0;return r==="multipart/form-data"&&a&&a!==null&&typeof a=="object"&&(a=this.createFormData(a)),r==="text/plain"&&a&&a!==null&&typeof a!="string"&&(a=JSON.stringify(a)),this.instance.request({...u,headers:{...u.headers||{},...r?{"Content-Type":r}:{}},params:o,responseType:c,data:a,url:n})});this.instance=$r.create({...o,baseURL:o.baseURL||""}),this.secure=n,this.format=r,this.securityWorker=t}mergeRequestParams(t,n){const r=t.method||n&&n.method;return{...this.instance.defaults,...t,...n||{},headers:{...r&&this.instance.defaults.headers[r.toLowerCase()]||{},...t.headers||{},...n&&n.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return t instanceof FormData?t:Object.keys(t||{}).reduce((n,r)=>{const o=t[r],i=o instanceof Array?o:[o];for(const a of i){const s=a instanceof Blob||a instanceof File;n.append(r,s?a:this.stringifyFormItem(a))}return n},new FormData)}}class Fpe extends $pe{constructor(){super(...arguments);re(this,"readinessGet",(n={})=>this.request({path:"/api/ready",method:"GET",...n}));re(this,"livenessGet",(n={})=>this.request({path:"/api/live",method:"GET",...n}));re(this,"metadataGet",(n={})=>this.request({path:"/api/v1/control-plane/metadata",method:"GET",format:"json",...n}));re(this,"metadataListIntegrations",(n={})=>this.request({path:"/api/v1/control-plane/metadata/integrations",method:"GET",secure:!0,format:"json",...n}));re(this,"cloudUserUpdateLogin",(n,r={})=>this.request({path:"/api/v1/control-plane/users/login",method:"POST",body:n,type:pr.Json,format:"json",...r}));re(this,"cloudUserUpdateLogout",(n={})=>this.request({path:"/api/v1/control-plane/users/logout",method:"POST",secure:!0,format:"json",...n}));re(this,"cloudUserUpdatePassword",(n,r={})=>this.request({path:"/api/v1/control-plane/users/password",method:"POST",body:n,secure:!0,type:pr.Json,format:"json",...r}));re(this,"cloudUserCreate",(n,r={})=>this.request({path:"/api/v1/control-plane/users/register",method:"POST",body:n,type:pr.Json,format:"json",...r}));re(this,"cloudUserGetCurrent",(n={})=>this.request({path:"/api/v1/control-plane/users/current",method:"GET",secure:!0,format:"json",...n}));re(this,"cloudUserUpdateGoogleOauthStart",(n={})=>this.request({path:"/api/v1/control-plane/users/google/start",method:"GET",...n}));re(this,"cloudUserUpdateGoogleOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/google/callback",method:"GET",...n}));re(this,"cloudUserUpdateGithubOauthStart",(n={})=>this.request({path:"/api/v1/control-plane/users/github/start",method:"GET",...n}));re(this,"cloudUserUpdateGithubOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/github/callback",method:"GET",...n}));re(this,"cloudUserUpdateSlackOauthStart",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/slack/start`,method:"GET",secure:!0,...r}));re(this,"cloudUserUpdateSlackOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/slack/callback",method:"GET",secure:!0,...n}));re(this,"shardsListShared",(n={})=>this.request({path:"/api/v1/control-plane/shared-shards",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationList",(n={})=>this.request({path:"/api/v1/control-plane/organizations",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationCreate",(n,r={})=>this.request({path:"/api/v1/control-plane/organizations",method:"POST",body:n,secure:!0,type:pr.Json,format:"json",...r}));re(this,"organizationGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}`,method:"PATCH",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationCreateTenant",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationListAvailableShards",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/available-shards`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationListAuditLogs",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/audit-logs`,method:"GET",query:r,secure:!0,format:"json",...o}));re(this,"organizationTenantDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}`,method:"DELETE",secure:!0,format:"json",...r}));re(this,"organizationTenantListApiTokens",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantCreateApiToken",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationTenantDeleteApiToken",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-tenants/${n}/api-tokens/${r}`,method:"DELETE",secure:!0,...o}));re(this,"organizationMemberDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organization-members/${n}`,method:"DELETE",body:r,secure:!0,type:pr.Json,...o}));re(this,"managementTokenCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/management-tokens`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"managementTokenList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/management-tokens`,method:"GET",secure:!0,format:"json",...r}));re(this,"managementTokenDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/management-tokens/${n}`,method:"DELETE",secure:!0,...r}));re(this,"userListOrganizationInvites",(n={})=>this.request({path:"/api/v1/control-plane/invites",method:"GET",secure:!0,format:"json",...n}));re(this,"organizationInviteAccept",(n,r={})=>this.request({path:"/api/v1/control-plane/invites/accept",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"organizationInviteReject",(n,r={})=>this.request({path:"/api/v1/control-plane/invites/reject",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"organizationInviteList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/invites`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationInviteCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/invites`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"organizationInviteDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organization-invites/${n}`,method:"DELETE",secure:!0,...r}));re(this,"ssoList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"ssoDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso`,method:"DELETE",secure:!0,...r}));re(this,"ssoDomainList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-domain`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoDomainCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-domain`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"ssoDomainDelete",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/sso-domain/${n}`,method:"DELETE",secure:!0,...r}));re(this,"ssoConfigGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-config`,method:"GET",secure:!0,format:"json",...r}));re(this,"ssoConfigUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/sso-config`,method:"POST",body:r,secure:!0,type:pr.Json,...o}));re(this,"organizationEntitlementsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/entitlements`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantListTags",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/tags`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationTenantSetTags",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/tags`,method:"PUT",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationTenantMembersAdd",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/tenants/${r}/members`,method:"POST",body:o,secure:!0,type:pr.Json,...i}));re(this,"organizationUserGroupsList",(n,r={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationUserGroupsCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"organizationUserGroupGet",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationUserGroupDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}`,method:"DELETE",secure:!0,...o}));re(this,"organizationUserGroupListTags",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/tags`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupSetTags",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/tags`,method:"PUT",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"organizationUserGroupListMembers",(n,r,o={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members`,method:"GET",secure:!0,format:"json",...o}));re(this,"organizationUserGroupAddMember",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members`,method:"POST",body:o,secure:!0,type:pr.Json,...i}));re(this,"organizationUserGroupRemoveMember",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/organizations/${n}/user-groups/${r}/members/${o}`,method:"DELETE",secure:!0,...i}));re(this,"cloudUserUpdateSsoOauthStart",(n,r={})=>this.request({path:"/api/v1/control-plane/users/sso/start",method:"GET",query:n,...r}));re(this,"cloudUserUpdateSsoOauthCallback",(n={})=>this.request({path:"/api/v1/control-plane/users/sso/callback",method:"GET",...n}));re(this,"tenantMembershipsList",(n={})=>this.request({path:"/api/v1/control-plane/users/memberships",method:"GET",secure:!0,format:"json",...n}));re(this,"userListTenantInvites",(n={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites",method:"GET",secure:!0,format:"json",...n}));re(this,"tenantInviteAccept",(n,r={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites/accept",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"tenantInviteReject",(n,r={})=>this.request({path:"/api/v1/control-plane/users/tenant-invites/reject",method:"POST",body:n,secure:!0,type:pr.Json,...r}));re(this,"exchangeTokenCreate",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/token`,method:"POST",secure:!0,format:"json",...r}));re(this,"tenantMemberList",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members`,method:"GET",secure:!0,format:"json",...r}));re(this,"tenantMemberUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"tenantMemberDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/members/${r}`,method:"DELETE",secure:!0,...o}));re(this,"tenantInviteList",(n,r={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites`,method:"GET",secure:!0,format:"json",...r}));re(this,"tenantInviteCreate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites`,method:"POST",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"tenantInviteUpdate",(n,r,o,i={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites/${r}`,method:"PATCH",body:o,secure:!0,type:pr.Json,format:"json",...i}));re(this,"tenantInviteDelete",(n,r,o={})=>this.request({path:`/api/v1/control-plane/tenants/${n}/invites/${r}`,method:"DELETE",secure:!0,...o}));re(this,"subscriptionPlansList",(n={})=>this.request({path:"/api/v1/control-plane/billing/plans",method:"GET",format:"json",...n}));re(this,"organizationBillingStateGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationTenantResourceLimitsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/tenant-resource-limits`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationSubscriptionUpdate",(n,r,o={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/subscription`,method:"PATCH",body:r,secure:!0,type:pr.Json,format:"json",...o}));re(this,"billingPortalLinkGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/billing-portal-link`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationPaymentMethodsGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/payment-methods`,method:"GET",secure:!0,format:"json",...r}));re(this,"organizationCreditBalanceGet",(n,r={})=>this.request({path:`/api/v1/control-plane/billing/organizations/${n}/credit-balance`,method:"GET",secure:!0,format:"json",...r}))}}var _T,T6;function $y(){return T6||(T6=1,_T=TypeError),_T}const Bpe={},zpe=Object.freeze(Object.defineProperty({__proto__:null,default:Bpe},Symbol.toStringTag,{value:"Module"})),qpe=Jfe(zpe);var ET,A6;function DO(){if(A6)return ET;A6=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,u=l?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype,d=c?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,p=h?WeakRef.prototype.deref:null,x=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,_=String.prototype.match,C=String.prototype.slice,O=String.prototype.replace,P=String.prototype.toUpperCase,R=String.prototype.toLowerCase,T=RegExp.prototype.test,k=Array.prototype.concat,M=Array.prototype.join,j=Array.prototype.slice,$=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,K=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,Y=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Ee){return Ee.__proto__}:null);function U(Ee,Ce){if(Ee===1/0||Ee===-1/0||Ee!==Ee||Ee&&Ee>-1e3&&Ee<1e3||T.call(/e/,Ce))return Ce;var me=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Ee=="number"){var Ae=Ee<0?-$(-Ee):$(Ee);if(Ae!==Ee){var Le=String(Ae),ze=C.call(Ce,Le.length+1);return O.call(Le,me,"$&_")+"."+O.call(O.call(ze,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(Ce,me,"$&_")}var V=qpe,G=V.custom,z=Ie(G)?G:null,X={__proto__:null,double:'"',single:"'"},ee={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ET=function Ee(Ce,me,Ae,Le){var ze=me||{};if(lt(ze,"quoteStyle")&&!lt(X,ze.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(lt(ze,"maxStringLength")&&(typeof ze.maxStringLength=="number"?ze.maxStringLength<0&&ze.maxStringLength!==1/0:ze.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Vt=lt(ze,"customInspect")?ze.customInspect:!0;if(typeof Vt!="boolean"&&Vt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(lt(ze,"indent")&&ze.indent!==null&&ze.indent!==" "&&!(parseInt(ze.indent,10)===ze.indent&&ze.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(lt(ze,"numericSeparator")&&typeof ze.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Ut=ze.numericSeparator;if(typeof Ce>"u")return"undefined";if(Ce===null)return"null";if(typeof Ce=="boolean")return Ce?"true":"false";if(typeof Ce=="string")return Qe(Ce,ze);if(typeof Ce=="number"){if(Ce===0)return 1/0/Ce>0?"0":"-0";var Sn=String(Ce);return Ut?U(Ce,Sn):Sn}if(typeof Ce=="bigint"){var at=String(Ce)+"n";return Ut?U(Ce,at):at}var vt=typeof ze.depth>"u"?5:ze.depth;if(typeof Ae>"u"&&(Ae=0),Ae>=vt&&vt>0&&typeof Ce=="object")return we(Ce)?"[Array]":"[Object]";var Lt=nr(ze,Ae);if(typeof Le>"u")Le=[];else if(vn(Le,Ce)>=0)return"[Circular]";function kt(Di,Fa,Zl){if(Fa&&(Le=j.call(Le),Le.push(Fa)),Zl){var nl={depth:ze.depth};return lt(ze,"quoteStyle")&&(nl.quoteStyle=ze.quoteStyle),Ee(Di,nl,Ae+1,Le)}return Ee(Di,ze,Ae+1,Le)}if(typeof Ce=="function"&&!se(Ce)){var Jn=Kt(Ce),Xr=Mr(Ce,kt);return"[Function"+(Jn?": "+Jn:" (anonymous)")+"]"+(Xr.length>0?" { "+M.call(Xr,", ")+" }":"")}if(Ie(Ce)){var na=D?O.call(String(Ce),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(Ce);return typeof Ce=="object"&&!D?nt(na):na}if(Ge(Ce)){for(var Qr="<"+R.call(String(Ce.nodeName)),Js=Ce.attributes||[],ko=0;ko",Qr}if(we(Ce)){if(Ce.length===0)return"[]";var ra=Mr(Ce,kt);return Lt&&!an(ra)?"["+$n(ra,Lt)+"]":"[ "+M.call(ra,", ")+" ]"}if(ye(Ce)){var oa=Mr(Ce,kt);return!("cause"in Error.prototype)&&"cause"in Ce&&!q.call(Ce,"cause")?"{ ["+String(Ce)+"] "+M.call(k.call("[cause]: "+kt(Ce.cause),oa),", ")+" }":oa.length===0?"["+String(Ce)+"]":"{ ["+String(Ce)+"] "+M.call(oa,", ")+" }"}if(typeof Ce=="object"&&Vt){if(z&&typeof Ce[z]=="function"&&V)return V(Ce,{depth:vt-Ae});if(Vt!=="symbol"&&typeof Ce.inspect=="function")return Ce.inspect()}if(un(Ce)){var ms=[];return r&&r.call(Ce,function(Di,Fa){ms.push(kt(Fa,Ce,!0)+" => "+kt(Di,Ce))}),Rt("Map",n.call(Ce),ms,Lt)}if(he(Ce)){var La=[];return s&&s.call(Ce,function(Di){La.push(kt(Di,Ce))}),Rt("Set",a.call(Ce),La,Lt)}if(on(Ce))return At("WeakMap");if(Se(Ce))return At("WeakSet");if(oe(Ce))return At("WeakRef");if(ge(Ce))return nt(kt(Number(Ce)));if(Ve(Ce))return nt(kt(L.call(Ce)));if(Be(Ce))return nt(x.call(Ce));if(Te(Ce))return nt(kt(String(Ce)));if(typeof window<"u"&&Ce===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ce===globalThis||typeof qu<"u"&&Ce===qu)return"{ [object globalThis] }";if(!de(Ce)&&!se(Ce)){var el=Mr(Ce,kt),ia=Y?Y(Ce)===Object.prototype:Ce instanceof Object||Ce.constructor===Object,Ko=Ce instanceof Object?"":"null prototype",$a=!ia&&W&&Object(Ce)===Ce&&W in Ce?C.call(Ye(Ce),8,-1):Ko?"Object":"",gs=ia||typeof Ce.constructor!="function"?"":Ce.constructor.name?Ce.constructor.name+" ":"",tl=gs+($a||Ko?"["+M.call(k.call([],$a||[],Ko||[]),": ")+"] ":"");return el.length===0?tl+"{}":Lt?tl+"{"+$n(el,Lt)+"}":tl+"{ "+M.call(el,", ")+" }"}return String(Ce)};function ae(Ee,Ce,me){var Ae=me.quoteStyle||Ce,Le=X[Ae];return Le+Ee+Le}function fe(Ee){return O.call(String(Ee),/"/g,""")}function ie(Ee){return!W||!(typeof Ee=="object"&&(W in Ee||typeof Ee[W]<"u"))}function we(Ee){return Ye(Ee)==="[object Array]"&&ie(Ee)}function de(Ee){return Ye(Ee)==="[object Date]"&&ie(Ee)}function se(Ee){return Ye(Ee)==="[object RegExp]"&&ie(Ee)}function ye(Ee){return Ye(Ee)==="[object Error]"&&ie(Ee)}function Te(Ee){return Ye(Ee)==="[object String]"&&ie(Ee)}function ge(Ee){return Ye(Ee)==="[object Number]"&&ie(Ee)}function Be(Ee){return Ye(Ee)==="[object Boolean]"&&ie(Ee)}function Ie(Ee){if(D)return Ee&&typeof Ee=="object"&&Ee instanceof Symbol;if(typeof Ee=="symbol")return!0;if(!Ee||typeof Ee!="object"||!H)return!1;try{return H.call(Ee),!0}catch{}return!1}function Ve(Ee){if(!Ee||typeof Ee!="object"||!L)return!1;try{return L.call(Ee),!0}catch{}return!1}var ht=Object.prototype.hasOwnProperty||function(Ee){return Ee in this};function lt(Ee,Ce){return ht.call(Ee,Ce)}function Ye(Ee){return y.call(Ee)}function Kt(Ee){if(Ee.name)return Ee.name;var Ce=_.call(w.call(Ee),/^function\s*([\w$]+)/);return Ce?Ce[1]:null}function vn(Ee,Ce){if(Ee.indexOf)return Ee.indexOf(Ce);for(var me=0,Ae=Ee.length;meCe.maxStringLength){var me=Ee.length-Ce.maxStringLength,Ae="... "+me+" more character"+(me>1?"s":"");return Qe(C.call(Ee,0,Ce.maxStringLength),Ce)+Ae}var Le=ee[Ce.quoteStyle||"single"];Le.lastIndex=0;var ze=O.call(O.call(Ee,Le,"\\$1"),/[\x00-\x1f]/g,Ke);return ae(ze,"single",Ce)}function Ke(Ee){var Ce=Ee.charCodeAt(0),me={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ce];return me?"\\"+me:"\\x"+(Ce<16?"0":"")+P.call(Ce.toString(16))}function nt(Ee){return"Object("+Ee+")"}function At(Ee){return Ee+" { ? }"}function Rt(Ee,Ce,me,Ae){var Le=Ae?$n(me,Ae):M.call(me,", ");return Ee+" ("+Ce+") {"+Le+"}"}function an(Ee){for(var Ce=0;Ce=0)return!1;return!0}function nr(Ee,Ce){var me;if(Ee.indent===" ")me=" ";else if(typeof Ee.indent=="number"&&Ee.indent>0)me=M.call(Array(Ee.indent+1)," ");else return null;return{base:me,prev:M.call(Array(Ce+1),me)}}function $n(Ee,Ce){if(Ee.length===0)return"";var me=` -`+Ce.prev+Ce.base;return me+M.call(Ee,","+me)+` -`+Ce.prev}function Mr(Ee,Ce){var me=we(Ee),Ae=[];if(me){Ae.length=Ee.length;for(var Le=0;Le"u"||!k?e:k(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":K,"%AsyncGenerator%":K,"%AsyncGeneratorFunction%":K,"%AsyncIteratorPrototype%":K,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":K,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&k?k(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":R,"%TypedArray%":H,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":$,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":M,"%Math.abs%":u,"%Math.floor%":c,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":p,"%Math.round%":x,"%Math.sign%":y,"%Reflect.getPrototypeOf%":j};if(k)try{null.error}catch(se){var W=k(k(se));D["%Error.prototype%"]=W}var q=function se(ye){var Te;if(ye==="%AsyncFunction%")Te=_("async function () {}");else if(ye==="%GeneratorFunction%")Te=_("function* () {}");else if(ye==="%AsyncGeneratorFunction%")Te=_("async function* () {}");else if(ye==="%AsyncGenerator%"){var ge=se("%AsyncGeneratorFunction%");ge&&(Te=ge.prototype)}else if(ye==="%AsyncIteratorPrototype%"){var Be=se("%AsyncGenerator%");Be&&k&&(Te=k(Be.prototype))}return D[ye]=Te,Te},Y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=LO(),V=hme(),G=U.call(L,Array.prototype.concat),z=U.call($,Array.prototype.splice),X=U.call(L,String.prototype.replace),ee=U.call(L,String.prototype.slice),ae=U.call(L,RegExp.prototype.exec),fe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,we=function(ye){var Te=ee(ye,0,1),ge=ee(ye,-1);if(Te==="%"&&ge!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(ge==="%"&&Te!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Be=[];return X(ye,fe,function(Ie,Ve,ht,lt){Be[Be.length]=ht?X(lt,ie,"$1"):Ve||Ie}),Be},de=function(ye,Te){var ge=ye,Be;if(V(Y,ge)&&(Be=Y[ge],ge="%"+Be[0]+"%"),V(D,ge)){var Ie=D[ge];if(Ie===K&&(Ie=q(ge)),typeof Ie>"u"&&!Te)throw new s("intrinsic "+ye+" exists, but is not available. Please file an issue!");return{alias:Be,name:ge,value:Ie}}throw new a("intrinsic "+ye+" does not exist!")};return o2=function(ye,Te){if(typeof ye!="string"||ye.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Te!="boolean")throw new s('"allowMissing" argument must be a boolean');if(ae(/^%?[^%]*%?$/,ye)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ge=we(ye),Be=ge.length>0?ge[0]:"",Ie=de("%"+Be+"%",Te),Ve=Ie.name,ht=Ie.value,lt=!1,Ye=Ie.alias;Ye&&(Be=Ye[0],z(ge,G([0,1],Ye)));for(var Kt=1,vn=!0;Kt=ge.length){var he=C(ht,un);vn=!!he,vn&&"get"in he&&!("originalValue"in he.get)?ht=he.get:ht=ht[un]}else vn=V(ht,un),ht=ht[un];vn&&!lt&&(D[Ve]=ht)}}return ht},o2}var i2,fF;function rY(){if(fF)return i2;fF=1;var e=W3(),t=nY(),n=t([e("%String.prototype.indexOf%")]);return i2=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},i2}var a2,dF;function oY(){if(dF)return a2;dF=1;var e=W3(),t=rY(),n=DO(),r=$y(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return a2=!!o&&function(){var d,h={assert:function(p){if(!h.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var x=l(d,p);return u(d)===0&&(d=void 0),x}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,x){d||(d=new o),a(d,p,x)}};return h},a2}var s2,hF;function pme(){if(hF)return s2;hF=1;var e=W3(),t=rY(),n=DO(),r=oY(),o=$y(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return s2=i?function(){var d,h,p={assert:function(x){if(!p.has(x))throw new o("Side channel does not contain "+n(x))},delete:function(x){if(i&&x&&(typeof x=="object"||typeof x=="function")){if(d)return u(d,x)}else if(r&&h)return h.delete(x);return!1},get:function(x){return i&&x&&(typeof x=="object"||typeof x=="function")&&d?a(d,x):h&&h.get(x)},has:function(x){return i&&x&&(typeof x=="object"||typeof x=="function")&&d?l(d,x):!!h&&h.has(x)},set:function(x,y){i&&x&&(typeof x=="object"||typeof x=="function")?(d||(d=new i),s(d,x,y)):r&&(h||(h=r()),h.set(x,y))}};return p}:r,s2}var l2,pF;function iY(){if(pF)return l2;pF=1;var e=$y(),t=DO(),n=Upe(),r=oY(),o=pme(),i=o||r||n;return l2=function(){var s,l={assert:function(u){if(!l.has(u))throw new e("Side channel does not contain "+t(u))},delete:function(u){return!!s&&s.delete(u)},get:function(u){return s&&s.get(u)},has:function(u){return!!s&&s.has(u)},set:function(u,c){s||(s=i()),s.set(u,c)}};return l},l2}var u2,mF;function H3(){if(mF)return u2;mF=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return u2={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},u2}var c2,gF;function aY(){if(gF)return c2;gF=1;var e=H3(),t=iY(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(k,M){return o.set(k,M),k},a=function(k){return o.has(k)},s=function(k){return o.get(k)},l=function(k,M){o.set(k,M)},u=(function(){for(var T=[],k=0;k<256;++k)T[T.length]="%"+((k<16?"0":"")+k.toString(16)).toUpperCase();return T})(),c=function(k){for(;k.length>1;){var M=k.pop(),j=M.obj[M.prop];if(r(j)){for(var $=[],L=0;Lj.arrayLimit)return i(d(k.concat(M),j),$);k[$]=M}else if(k&&typeof k=="object")if(a(k)){var L=s(k)+1;k[L]=M,l(k,L)}else{if(j&&j.strictMerge)return[k,M];(j&&(j.plainObjects||j.allowPrototypes)||!n.call(Object.prototype,M))&&(k[M]=!0)}else return[k,M];return k}if(!k||typeof k!="object"){if(a(M)){for(var K=Object.keys(M),H=j&&j.plainObjects?{__proto__:null,0:k}:{0:k},D=0;Dj.arrayLimit?i(d(q,j),q.length-1):q}var Y=k;return r(k)&&!r(M)&&(Y=d(k,j)),r(k)&&r(M)?(M.forEach(function(U,V){if(n.call(k,V)){var G=k[V];G&&typeof G=="object"&&U&&typeof U=="object"?k[V]=T(G,U,j):k[k.length]=U}else k[V]=U}),k):Object.keys(M).reduce(function(U,V){var G=M[V];if(n.call(U,V)?U[V]=T(U[V],G,j):U[V]=G,a(M)&&!a(U)&&i(U,s(M)),a(U)){var z=parseInt(V,10);String(z)===V&&z>=0&&z>s(U)&&l(U,z)}return U},Y)},p=function(k,M){return Object.keys(M).reduce(function(j,$){return j[$]=M[$],j},k)},x=function(T,k,M){var j=T.replace(/\+/g," ");if(M==="iso-8859-1")return j.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(j)}catch{return j}},y=1024,w=function(k,M,j,$,L){if(k.length===0)return k;var K=k;if(typeof k=="symbol"?K=Symbol.prototype.toString.call(k):typeof k!="string"&&(K=String(k)),j==="iso-8859-1")return escape(K).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var H="",D=0;D=y?K.slice(D,D+y):K,q=[],Y=0;Y=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||L===e.RFC1738&&(U===40||U===41)){q[q.length]=W.charAt(Y);continue}if(U<128){q[q.length]=u[U];continue}if(U<2048){q[q.length]=u[192|U>>6]+u[128|U&63];continue}if(U<55296||U>=57344){q[q.length]=u[224|U>>12]+u[128|U>>6&63]+u[128|U&63];continue}Y+=1,U=65536+((U&1023)<<10|W.charCodeAt(Y)&1023),q[q.length]=u[240|U>>18]+u[128|U>>12&63]+u[128|U>>6&63]+u[128|U&63]}H+=q.join("")}return H},_=function(k){for(var M=[{obj:{o:k},prop:"o"}],j=[],$=0;$j?i(d(K,{plainObjects:$}),K.length-1):K},R=function(k,M){if(r(k)){for(var j=[],$=0;$"u"&&(G=0)}if(typeof j=="function"?U=j(_,U):U instanceof Date?U=K(U):C==="comma"&&i(U)&&(U=t.maybeMap(U,function(Ve){return Ve instanceof Date?K(Ve):Ve})),U===null){if(R)return D(M&&!W?M(_,c.encoder,q,"key",H):_);U=""}if(d(U)||t.isBuffer(U)){if(M){var ee=W?_:M(_,c.encoder,q,"key",H);return[D(ee)+"="+D(M(U,c.encoder,q,"value",H))]}return[D(_)+"="+D(String(U))]}var ae=[];if(typeof U>"u")return ae;var fe;if(C==="comma"&&i(U))W&&M&&(U=t.maybeMap(U,function(Ve){return Ve==null?Ve:M(Ve)})),fe=[{value:U.length>0?U.join(",")||null:void 0}];else if(i(j))fe=j;else{var ie=Object.keys(U);fe=$?ie.sort($):ie}var we=k?String(_).replace(/\./g,"%2E"):String(_),de=O&&i(U)&&U.length===1?we+"[]":we;if(P&&i(U)&&U.length===0)return de+"[]";for(var se=0;se"u"?w.encodeDotInKeys===!0?!0:c.allowDots:!!w.allowDots;return{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:c.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof w.allowEmptyArrays=="boolean"?!!w.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:R,charset:_,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!w.commaRoundTrip,delimiter:typeof w.delimiter>"u"?c.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:c.encode,encodeDotInKeys:typeof w.encodeDotInKeys=="boolean"?w.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof w.encoder=="function"?w.encoder:c.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:c.encodeValuesOnly,filter:P,format:C,formatter:O,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:c.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:c.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:c.strictNullHandling}};return f2=function(y,w){var _=y,C=x(w),O,P;typeof C.filter=="function"?(P=C.filter,_=P("",_)):i(C.filter)&&(P=C.filter,O=P);var R=[];if(typeof _!="object"||_===null)return"";var T=o[C.arrayFormat],k=T==="comma"&&C.commaRoundTrip;O||(O=Object.keys(_)),C.sort&&O.sort(C.sort);for(var M=e(),j=0;j"u"||$===null)){var L=_[$];C.skipNulls&&L===null||s(R,p(L,$,T,k,C.allowEmptyArrays,C.strictNullHandling,C.skipNulls,C.encodeDotInKeys,C.encode?C.encoder:null,C.filter,C.sort,C.allowDots,C.serializeDate,C.format,C.formatter,C.encodeValuesOnly,C.charset,M))}}var K=R.join(C.delimiter),H=C.addQueryPrefix===!0?"?":"";return C.charsetSentinel&&(C.charset==="iso-8859-1"?H+="utf8=%26%2310003%3B"+C.delimiter:H+="utf8=%E2%9C%93"+C.delimiter),K.length>0?H+K:""},f2}var d2,yF;function gme(){if(yF)return d2;yF=1;var e=aY(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(x,y){return String.fromCharCode(parseInt(y,10))})},i=function(p,x,y){if(p&&typeof p=="string"&&x.comma&&p.indexOf(",")>-1)return p.split(",");if(x.throwOnLimitExceeded&&y>=x.arrayLimit)throw new RangeError("Array limit exceeded. Only "+x.arrayLimit+" element"+(x.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(x,y){var w={__proto__:null},_=y.ignoreQueryPrefix?x.replace(/^\?/,""):x;_=_.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var C=y.parameterLimit===1/0?void 0:y.parameterLimit,O=_.split(y.delimiter,y.throwOnLimitExceeded&&typeof C<"u"?C+1:C);if(y.throwOnLimitExceeded&&typeof C<"u"&&O.length>C)throw new RangeError("Parameter limit exceeded. Only "+C+" parameter"+(C===1?"":"s")+" allowed.");var P=-1,R,T=y.charset;if(y.charsetSentinel)for(R=0;R-1&&(L=n(L)?[L]:L),y.comma&&n(L)&&L.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");L=e.combine([],L,y.arrayLimit,y.plainObjects)}if($!==null){var K=t.call(w,$);K&&(y.duplicates==="combine"||k.indexOf("[]=")>-1)?w[$]=e.combine(w[$],L,y.arrayLimit,y.plainObjects):(!K||y.duplicates==="last")&&(w[$]=L)}}return w},u=function(p,x,y,w){var _=0;if(p.length>0&&p[p.length-1]==="[]"){var C=p.slice(0,-1).join("");_=Array.isArray(x)&&x[C]?x[C].length:0}for(var O=w?x:i(x,y,_),P=p.length-1;P>=0;--P){var R,T=p[P];if(T==="[]"&&y.parseArrays)e.isOverflow(O)?R=O:R=y.allowEmptyArrays&&(O===""||y.strictNullHandling&&O===null)?[]:e.combine([],O,y.arrayLimit,y.plainObjects);else{R=y.plainObjects?{__proto__:null}:{};var k=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,M=y.decodeDotInKeys?k.replace(/%2E/g,"."):k,j=parseInt(M,10),$=!isNaN(j)&&T!==M&&String(j)===M&&j>=0&&y.parseArrays;if(!y.parseArrays&&M==="")R={0:O};else if($&&j=0?w.slice(0,C):w;if(O){if(!y.plainObjects&&t.call(Object.prototype,O)&&!y.allowPrototypes)return;_[_.length]=O}for(var P=w.length,R=C,T=0;R>=0&&T=0){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");_[_.length]="["+w.slice(R)+"]"}return _},d=function(x,y,w,_){if(x){var C=c(x,w);if(C)return u(C,y,w,_)}},h=function(x){if(!x)return r;if(typeof x.allowEmptyArrays<"u"&&typeof x.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof x.decodeDotInKeys<"u"&&typeof x.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(x.decoder!==null&&typeof x.decoder<"u"&&typeof x.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof x.charset<"u"&&x.charset!=="utf-8"&&x.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof x.throwOnLimitExceeded<"u"&&typeof x.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof x.charset>"u"?r.charset:x.charset,w=typeof x.duplicates>"u"?r.duplicates:x.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var _=typeof x.allowDots>"u"?x.decodeDotInKeys===!0?!0:r.allowDots:!!x.allowDots;return{allowDots:_,allowEmptyArrays:typeof x.allowEmptyArrays=="boolean"?!!x.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof x.allowPrototypes=="boolean"?x.allowPrototypes:r.allowPrototypes,allowSparse:typeof x.allowSparse=="boolean"?x.allowSparse:r.allowSparse,arrayLimit:typeof x.arrayLimit=="number"?x.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof x.charsetSentinel=="boolean"?x.charsetSentinel:r.charsetSentinel,comma:typeof x.comma=="boolean"?x.comma:r.comma,decodeDotInKeys:typeof x.decodeDotInKeys=="boolean"?x.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof x.decoder=="function"?x.decoder:r.decoder,delimiter:typeof x.delimiter=="string"||e.isRegExp(x.delimiter)?x.delimiter:r.delimiter,depth:typeof x.depth=="number"||x.depth===!1?+x.depth:r.depth,duplicates:w,ignoreQueryPrefix:x.ignoreQueryPrefix===!0,interpretNumericEntities:typeof x.interpretNumericEntities=="boolean"?x.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof x.parameterLimit=="number"?x.parameterLimit:r.parameterLimit,parseArrays:x.parseArrays!==!1,plainObjects:typeof x.plainObjects=="boolean"?x.plainObjects:r.plainObjects,strictDepth:typeof x.strictDepth=="boolean"?!!x.strictDepth:r.strictDepth,strictMerge:typeof x.strictMerge=="boolean"?!!x.strictMerge:r.strictMerge,strictNullHandling:typeof x.strictNullHandling=="boolean"?x.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof x.throwOnLimitExceeded=="boolean"?x.throwOnLimitExceeded:!1}};return d2=function(p,x){var y=h(x);if(p===""||p===null||typeof p>"u")return y.plainObjects?{__proto__:null}:{};for(var w=typeof p=="string"?l(p,y):p,_=y.plainObjects?{__proto__:null}:{},C=Object.keys(w),O=0;OG3.stringify(e,{arrayFormat:"repeat"})}),On=new Lpe({paramsSerializer:e=>G3.stringify(e,{arrayFormat:"repeat"})}),Mt=new Fpe({paramsSerializer:e=>G3.stringify(e,{arrayFormat:"repeat"})});ot.instance.interceptors.request.use(cY);On.instance.interceptors.request.use(cY);const lY="controlPlaneLastTenant";function xme(){var e;try{const t=localStorage.getItem(lY);return t?((e=JSON.parse(t).metadata)==null?void 0:e.id)??null:null}catch{return null}}function bme(e){const t=e.split("/").filter(Boolean),n=t.indexOf("tenants");if(n===-1)return null;const r=t[n+1];return!r||!sY(r)?null:r}function Sme(){return typeof window>"u"?null:bme(window.location.pathname)}function _me(e){return e.xTenantId??Sme()??xme()}const uY={queryKey:["control-plane-metadata:get"],queryFn:async()=>{try{return await Mt.metadataGet()}catch{return null}},staleTime:1e3*60};async function $O(){const e=await Fs.fetchQuery(uY);return{meta:e,isControlPlaneEnabled:XK(e==null?void 0:e.data)}}async function Eme(){return(await $O()).isControlPlaneEnabled}async function cY(e){if(!(e.xResources??[]).includes("tenant")&&!e.useExchangeToken)return e;const n=await Eme(),r=_me(e);if(!n||!r)return e;try{const o=await Fs.fetchQuery(lK(r,()=>Mt.exchangeTokenCreate(r).then(i=>i.data)));e.baseURL=o.apiUrl,e.withCredentials=!1,e.headers.set("Authorization",`Bearer ${o.token}`),e.headers.set("X-Exchange-Token","true")}catch(o){console.error("[exchange-token interceptor] failed to get token",{url:e.url,tenantId:r,err:o})}return e}function Fy(){var n,r;const e=Mn({...uY,refetchOnMount:"always"});return{isControlPlaneEnabled:b.useMemo(()=>{var o;return XK((o=e.data)==null?void 0:o.data)},[(n=e.data)==null?void 0:n.data]),isControlPlaneLoading:e.isLoading,controlPlaneMeta:(r=e.data)==null?void 0:r.data}}const Cme=e=>!!e&&!(e!=null&&e.errors),FO={queryKey:["cloud-metadata:get"],retry:!1,queryFn:async()=>{try{const{data:e}=await On.metadataGet(),t=Cme(e);if(t)return console.log("🪓☁️"),{...e,isCloudEnabled:t};console.log("\x1B[33m🪓 Thanks for self-hosting Hatchet!\x1B[0m"),console.log("For support, please contact support@hatchet.run,"),console.log("Join our Discord server at https://hatchet.run/discord,"),console.log("or visit https://docs.hatchet.run/self-hosting")}catch(e){console.error("Failed to get cloud metadata",e)}return{isCloudEnabled:!1}},staleTime:1e3*60};function K3(e){var i,a,s,l,u;const t=Mn(FO),{isControlPlaneEnabled:n,controlPlaneMeta:r}=Fy(),o=Mn({queryKey:["feature-flags:list",e],retry:!1,enabled:(n||((i=t.data)==null?void 0:i.isCloudEnabled))&&!!e,queryFn:async()=>{try{return e===void 0?null:await On.featureFlagsList(e)}catch{return null}},staleTime:1e3*60});return n?{cloud:{canBill:(r==null?void 0:r.canBill)??!1,canLinkGithub:!0,metricsEnabled:!0,requireBillingForManagedCompute:!0,inactivityLogoutMs:r==null?void 0:r.inactivityLogoutMs},isCloudEnabled:!0,isCloudLoaded:!0,isCloudLoading:!1,featureFlags:((a=o.data)==null?void 0:a.data)||null}:t.data&&t.data.isCloudEnabled?{cloud:t.data,isCloudEnabled:t.data.isCloudEnabled,isCloudLoaded:!0,isCloudLoading:t.isLoading,featureFlags:((s=o.data)==null?void 0:s.data)||null}:{isCloudEnabled:!1,isCloudLoaded:t.isSuccess,isCloudLoading:t.isLoading,featureFlags:((l=o.data)==null?void 0:l.data)||null,cloud:(u=t==null?void 0:t.data)!=null&&u.isCloudEnabled?t.data:null}}function fY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t0)return a(c);if(h==="number"&&isFinite(c))return d.long?l(c):s(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function a(c){if(c=String(c),!(c.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(d){var h=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*o;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function s(c){var d=Math.abs(c);return d>=r?Math.round(c/r)+"d":d>=n?Math.round(c/n)+"h":d>=t?Math.round(c/t)+"m":d>=e?Math.round(c/e)+"s":c+"ms"}function l(c){var d=Math.abs(c);return d>=r?u(c,d,r,"day"):d>=n?u(c,d,n,"hour"):d>=t?u(c,d,t,"minute"):d>=e?u(c,d,e,"second"):c+" ms"}function u(c,d,h,p){var x=d>=h*1.5;return Math.round(c/h)+" "+p+(x?"s":"")}return p2}var Rme=Ome();const Pme=Ln(Rme),Tme=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),dY=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_E="-",bF=[],kme="arbitrary..",Nme=e=>{const t=jme(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Mme(a);const s=a.split(_E),l=s[0]===""&&s.length>1?1:0;return hY(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],u=n[a];return l?u?Tme(u,l):l:u||bF}return n[a]||bF}}},hY=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=hY(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const s=t===0?e.join(_E):e.slice(t).join(_E),l=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?kme+r:void 0})(),jme=e=>{const{theme:t,classGroups:n}=e;return Ime(n,t)},Ime=(e,t)=>{const n=dY();for(const r in e){const o=e[r];Y3(o,n,r,t)}return n},Y3=(e,t,n,r)=>{const o=e.length;for(let i=0;i{if(typeof e=="string"){Lme(e,t,n);return}if(typeof e=="function"){$me(e,t,n,r);return}Fme(e,t,n,r)},Lme=(e,t,n)=>{const r=e===""?t:pY(t,e);r.classGroupId=n},$me=(e,t,n,r)=>{if(Bme(e)){Y3(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ame(n,e))},Fme=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a{let n=e;const r=t.split(_E),o=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,zme=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},TI="!",SF=":",qme=[],_F=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ume=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,u;const c=o.length;for(let y=0;yl?u-l:void 0;return _F(i,p,h,x)};if(t){const o=t+SF,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):_F(qme,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Vme=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},Wme=e=>({cache:zme(e.cacheSize),parseClassName:Ume(e),sortModifiers:Vme(e),...Nme(e)}),Hme=/\s+/,Gme=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(Hme);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:y}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let w=!!y,_=r(w?x.substring(0,y):x);if(!_){if(!w){l=c+(l.length>0?" "+l:l);continue}if(_=r(x),!_){l=c+(l.length>0?" "+l:l);continue}w=!1}const C=h.length===0?"":h.length===1?h[0]:i(h).join(":"),O=p?C+TI:C,P=O+_;if(a.indexOf(P)>-1)continue;a.push(P);const R=o(_,w);for(let T=0;T0?" "+l:l)}return l},Kme=(...e)=>{let t=0,n,r,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,o,i;const a=l=>{const u=t.reduce((c,d)=>d(c),e());return n=Wme(u),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const u=r(l);if(u)return u;const c=Gme(l,n);return o(l,c),c};return i=a,(...l)=>i(Kme(...l))},Xme=[],_o=e=>{const t=n=>n[e]||Xme;return t.isThemeGetter=!0,t},gY=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vY=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qme=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zme=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jme=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ege=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ld=e=>Qme.test(e),Cn=e=>!!e&&!Number.isNaN(Number(e)),ud=e=>!!e&&Number.isInteger(Number(e)),m2=e=>e.endsWith("%")&&Cn(e.slice(0,-1)),zc=e=>Zme.test(e),yY=()=>!0,rge=e=>Jme.test(e)&&!ege.test(e),X3=()=>!1,oge=e=>tge.test(e),ige=e=>nge.test(e),age=e=>!Ct(e)&&!Pt(e),sge=e=>eh(e,bY,X3),Ct=e=>gY.test(e),hp=e=>eh(e,SY,rge),EF=e=>eh(e,mge,Cn),lge=e=>eh(e,EY,yY),uge=e=>eh(e,_Y,X3),CF=e=>eh(e,wY,X3),cge=e=>eh(e,xY,ige),o_=e=>eh(e,CY,oge),Pt=e=>vY.test(e),E1=e=>xm(e,SY),fge=e=>xm(e,_Y),OF=e=>xm(e,wY),dge=e=>xm(e,bY),hge=e=>xm(e,xY),i_=e=>xm(e,CY,!0),pge=e=>xm(e,EY,!0),eh=(e,t,n)=>{const r=gY.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xm=(e,t,n=!1)=>{const r=vY.exec(e);return r?r[1]?t(r[1]):n:!1},wY=e=>e==="position"||e==="percentage",xY=e=>e==="image"||e==="url",bY=e=>e==="length"||e==="size"||e==="bg-size",SY=e=>e==="length",mge=e=>e==="number",_Y=e=>e==="family-name",EY=e=>e==="number"||e==="weight",CY=e=>e==="shadow",gge=()=>{const e=_o("color"),t=_o("font"),n=_o("text"),r=_o("font-weight"),o=_o("tracking"),i=_o("leading"),a=_o("breakpoint"),s=_o("container"),l=_o("spacing"),u=_o("radius"),c=_o("shadow"),d=_o("inset-shadow"),h=_o("text-shadow"),p=_o("drop-shadow"),x=_o("blur"),y=_o("perspective"),w=_o("aspect"),_=_o("ease"),C=_o("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...P(),Pt,Ct],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],M=()=>[Pt,Ct,l],j=()=>[ld,"full","auto",...M()],$=()=>[ud,"none","subgrid",Pt,Ct],L=()=>["auto",{span:["full",ud,Pt,Ct]},ud,Pt,Ct],K=()=>[ud,"auto",Pt,Ct],H=()=>["auto","min","max","fr",Pt,Ct],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...M()],Y=()=>[ld,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],U=()=>[ld,"screen","full","dvw","lvw","svw","min","max","fit",...M()],V=()=>[ld,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],G=()=>[e,Pt,Ct],z=()=>[...P(),OF,CF,{position:[Pt,Ct]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",dge,sge,{size:[Pt,Ct]}],ae=()=>[m2,E1,hp],fe=()=>["","none","full",u,Pt,Ct],ie=()=>["",Cn,E1,hp],we=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Cn,m2,OF,CF],ye=()=>["","none",x,Pt,Ct],Te=()=>["none",Cn,Pt,Ct],ge=()=>["none",Cn,Pt,Ct],Be=()=>[Cn,Pt,Ct],Ie=()=>[ld,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zc],breakpoint:[zc],color:[yY],container:[zc],"drop-shadow":[zc],ease:["in","out","in-out"],font:[age],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zc],shadow:[zc],spacing:["px",Cn],text:[zc],"text-shadow":[zc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ld,Ct,Pt,w]}],container:["container"],columns:[{columns:[Cn,Ct,Pt,s]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ud,"auto",Pt,Ct]}],basis:[{basis:[ld,"full","auto",s,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Cn,ld,"auto","initial","none",Ct]}],grow:[{grow:["",Cn,Pt,Ct]}],shrink:[{shrink:["",Cn,Pt,Ct]}],order:[{order:[ud,"first","last","none",Pt,Ct]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[s,"screen",...Y()]}],"min-w":[{"min-w":[s,"screen","none",...Y()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,E1,hp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pge,lge]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",m2,Ct]}],"font-family":[{font:[fge,uge,t]}],"font-features":[{"font-features":[Ct]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Pt,Ct]}],"line-clamp":[{"line-clamp":[Cn,"none",Pt,EF]}],leading:[{leading:[i,...M()]}],"list-image":[{"list-image":["none",Pt,Ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pt,Ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Cn,"from-font","auto",Pt,hp]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Cn,"auto",Pt,Ct]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pt,Ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pt,Ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ud,Pt,Ct],radial:["",Pt,Ct],conic:[ud,Pt,Ct]},hge,cge]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Cn,Pt,Ct]}],"outline-w":[{outline:["",Cn,E1,hp]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",c,i_,o_]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",d,i_,o_]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Cn,hp]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",h,i_,o_]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Cn,Pt,Ct]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Cn]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Pt,Ct]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Cn]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pt,Ct]}],filter:[{filter:["","none",Pt,Ct]}],blur:[{blur:ye()}],brightness:[{brightness:[Cn,Pt,Ct]}],contrast:[{contrast:[Cn,Pt,Ct]}],"drop-shadow":[{"drop-shadow":["","none",p,i_,o_]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Cn,Pt,Ct]}],"hue-rotate":[{"hue-rotate":[Cn,Pt,Ct]}],invert:[{invert:["",Cn,Pt,Ct]}],saturate:[{saturate:[Cn,Pt,Ct]}],sepia:[{sepia:["",Cn,Pt,Ct]}],"backdrop-filter":[{"backdrop-filter":["","none",Pt,Ct]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Cn,Pt,Ct]}],"backdrop-contrast":[{"backdrop-contrast":[Cn,Pt,Ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Cn,Pt,Ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Cn,Pt,Ct]}],"backdrop-invert":[{"backdrop-invert":["",Cn,Pt,Ct]}],"backdrop-opacity":[{"backdrop-opacity":[Cn,Pt,Ct]}],"backdrop-saturate":[{"backdrop-saturate":[Cn,Pt,Ct]}],"backdrop-sepia":[{"backdrop-sepia":["",Cn,Pt,Ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pt,Ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Cn,"initial",Pt,Ct]}],ease:[{ease:["linear","initial",_,Pt,Ct]}],delay:[{delay:[Cn,Pt,Ct]}],animate:[{animate:["none",C,Pt,Ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Pt,Ct]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Te()}],"rotate-x":[{"rotate-x":Te()}],"rotate-y":[{"rotate-y":Te()}],"rotate-z":[{"rotate-z":Te()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[Pt,Ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pt,Ct]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pt,Ct]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Cn,E1,hp,EF]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vge=Yme(gge);function je(...e){return vge(Dn(e))}function yge(e){const t={};if(!e.errors)return t;for(const n of e.errors)n.field&&n.description&&(t[n.field]=n.description);return t}function BO(e){if(e){if(e.length==0)return e;if(e.length==1)return e.charAt(0).toUpperCase()}else return"";return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()}function Det(e){if(!e)return"N/A";const t=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),n=wge(e);if(!n)return"N/A";let r=n.time;return n.when==="past"&&(r=-r),BO(t.format(r,n.unitOfTime))}function wge(e,t){const n=new Date(e).getTime();if(!n)return;let r=new Date().getTime(),o=n/1e3-r/1e3;const i={when:"now",unitOfTime:"seconds",time:0};return o>0?i.when="future":o<-1&&(i.when="past"),o=Math.abs(o),o/(3600*24*365)>1?(i.unitOfTime="years",i.time=Math.floor(o/(3600*24*365))):o/(3600*24*45)>1?(i.unitOfTime="months",i.time=Math.floor(o/(3600*24*45))):o/(3600*24)>1?(i.unitOfTime="days",i.time=Math.floor(o/(3600*24))):o/3600>1?(i.unitOfTime="hours",i.time=Math.floor(o/3600)):o/60>1?(i.unitOfTime="minutes",i.time=Math.floor(o/60)):(i.unitOfTime="seconds",i.time=Math.floor(o)),i}function OY(e){if(e<0)return"0s";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5)return`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`;{const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return`${t}h ${n}m ${r}s`}}const RY="00000000-0000-0000-0000-000000000000";function Let(e){const t=e.trim();if(!t)return null;if(t==="-1")return-1;const n=t.match(/\d+\s*[a-z]+/gi);if(!n)return null;let r=0;for(const o of n){const i=Pme(o.replace(/\s/g,""));if(typeof i!="number"||isNaN(i))return null;r+=i}return r>0?r:null}function $et(e){if(e<=0)return"";let t=e;const n=Math.floor(t/864e5);t-=n*864e5;const r=Math.floor(t/36e5);t-=r*36e5;const o=Math.floor(t/6e4);t-=o*6e4;const i=Math.floor(t/1e3);return t-=i*1e3,[n&&`${n}d`,r&&`${r}h`,o&&`${o}m`,i&&`${i}s`,t&&`${t}ms`].filter(Boolean).join("")}const RF=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,PF=Dn,Hl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return PF(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const h=RF(c)||RF(d);return o[u][h]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(x=>{let[y,w]=x;return Array.isArray(w)?w.includes({...i,...s}[y]):{...i,...s}[y]===w})?[...u,d,h]:u},[]);return PF(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},xge=Hl("rounded-lg border",{variants:{variant:{default:"rounded-xl bg-card text-card-foreground shadow",light:"bg-gray-50/50 border-gray-200 dark:bg-gray-800/20 dark:border-gray-700"}},defaultVariants:{variant:"default"}}),PY=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,className:je(xge({variant:t}),e),...n}));PY.displayName="Card";const TY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("flex flex-col space-y-0.5 p-4",e),...t}));TY.displayName="CardHeader";const bge=b.forwardRef(({className:e,...t},n)=>v.jsx("h3",{ref:n,className:je("text-sm font-semibold leading-tight",e),...t}));bge.displayName="CardTitle";const Sge=b.forwardRef(({className:e,...t},n)=>v.jsx("p",{ref:n,className:je("text-xs text-muted-foreground leading-snug",e),...t}));Sge.displayName="CardDescription";const AY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("px-4 pb-4 pt-0",e),...t}));AY.displayName="CardContent";const kY=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("flex items-center p-6 pt-0",e),...t}));kY.displayName="CardFooter";function zO({title:e,description:t,icon:n,actions:r,children:o,className:i}){return v.jsx("div",{className:"flex h-full w-full flex-1 flex-row items-center justify-center p-6",children:v.jsxs(PY,{className:je("w-full max-w-xl border-border/60 bg-background shadow-sm",i),children:[v.jsxs(TY,{className:"pb-3 text-center",children:[n&&v.jsx("div",{className:"mx-auto mb-2 flex h-10 w-10 items-center justify-center rounded-md border bg-muted/30 text-foreground/80",children:n}),v.jsx("div",{className:"text-xl font-semibold tracking-tight sm:text-2xl",children:e}),t&&v.jsx("div",{className:"mx-auto max-w-prose text-sm text-muted-foreground",children:t})]}),o&&v.jsx(AY,{className:"pt-0",children:v.jsx("div",{className:"space-y-3",children:o})}),r&&v.jsx(kY,{className:"flex flex-col gap-2 sm:flex-row sm:justify-center",children:r})]})})}const _ge=Hl("inline-flex items-center rounded-md border px-3 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",successful:"border-transparent rounded-sm font-normal text-green-800 dark:text-green-300 bg-green-500/20 ring-green-500/30",failed:"border-transparent rounded-sm font-normal text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500/30",inProgress:"border-transparent rounded-sm font-normal text-yellow-800 dark:text-yellow-300 bg-yellow-500/20 ring-yellow-500/30",outlineDestructive:"border border-destructive rounded-sm font-normal text-red-800 dark:text-red-300 bg-transparent",queued:"border-transparent rounded-sm font-normal text-slate-800 dark:text-slate-300 bg-slate-500/20 ring-slate-500/30",cancelled:"border-transparent rounded-sm font-normal text-orange-800 dark:text-orange-300 bg-orange-500/20 ring-orange-500/30",evicted:"border-transparent rounded-sm font-normal text-indigo-800 dark:text-indigo-300 bg-indigo-500/20 ring-indigo-500/30"}},defaultVariants:{variant:"default"}});function Ti({className:e,variant:t,...n}){return v.jsx("span",{className:je(_ge({variant:t}),e),...n})}function Je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function TF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=TF(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{const{children:a,...s}=i,l=b.useMemo(()=>s,Object.values(s));return v.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function fs(e,t=[]){let n=[];function r(i,a){const s=b.createContext(a),l=n.length;n=[...n,a];const u=d=>{var _;const{scope:h,children:p,...x}=d,y=((_=h==null?void 0:h[e])==null?void 0:_[l])||s,w=b.useMemo(()=>x,Object.values(x));return v.jsx(y.Provider,{value:w,children:p})};u.displayName=i+"Provider";function c(d,h){var y;const p=((y=h==null?void 0:h[e])==null?void 0:y[l])||s,x=b.useContext(p);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(a=>b.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Cge(o,...t)]}function Cge(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var g2={exports:{}},xa={},v2={exports:{}},y2={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var AF;function Oge(){return AF||(AF=1,(function(e){function t(U,V){var G=U.length;U.push(V);e:for(;0>>1,X=U[z];if(0>>1;zo(fe,G))ieo(we,fe)?(U[z]=we,U[ie]=G,z=ie):(U[z]=fe,U[ae]=G,z=ae);else if(ieo(we,G))U[z]=we,U[ie]=G,z=ie;else break e}}return V}function o(U,V){var G=U.sortIndex-V.sortIndex;return G!==0?G:U.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,h=3,p=!1,x=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(U){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=U)r(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function P(U){if(y=!1,O(U),!x)if(n(l)!==null)x=!0,q(R);else{var V=n(u);V!==null&&Y(P,V.startTime-U)}}function R(U,V){x=!1,y&&(y=!1,_(M),M=-1),p=!0;var G=h;try{for(O(V),d=n(l);d!==null&&(!(d.expirationTime>V)||U&&!L());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var X=z(d.expirationTime<=V);V=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(l)&&r(l),O(V)}else r(l);d=n(l)}if(d!==null)var ee=!0;else{var ae=n(u);ae!==null&&Y(P,ae.startTime-V),ee=!1}return ee}finally{d=null,h=G,p=!1}}var T=!1,k=null,M=-1,j=5,$=-1;function L(){return!(e.unstable_now()-$U||125z?(U.sortIndex=G,t(u,U),n(l)===null&&U===n(u)&&(y?(_(M),M=-1):y=!0,Y(P,G-z))):(U.sortIndex=X,t(l,U),x||p||(x=!0,q(R))),U},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(U){var V=h;return function(){var G=h;h=V;try{return U.apply(this,arguments)}finally{h=G}}}})(y2)),y2}var kF;function Rge(){return kF||(kF=1,v2.exports=Oge()),v2.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var NF;function Pge(){if(NF)return xa;NF=1;var e=Gx(),t=Rge();function n(f){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+f,E=1;E"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,c={},d={};function h(f){return l.call(d,f)?!0:l.call(c,f)?!1:u.test(f)?d[f]=!0:(c[f]=!0,!1)}function p(f,m,E,A){if(E!==null&&E.type===0)return!1;switch(typeof m){case"function":case"symbol":return!0;case"boolean":return A?!1:E!==null?!E.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function x(f,m,E,A){if(m===null||typeof m>"u"||p(f,m,E,A))return!0;if(A)return!1;if(E!==null)switch(E.type){case 3:return!m;case 4:return m===!1;case 5:return isNaN(m);case 6:return isNaN(m)||1>m}return!1}function y(f,m,E,A,I,B,Z){this.acceptsBooleans=m===2||m===3||m===4,this.attributeName=A,this.attributeNamespace=I,this.mustUseProperty=E,this.propertyName=f,this.type=m,this.sanitizeURL=B,this.removeEmptyString=Z}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){w[f]=new y(f,0,!1,f,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var m=f[0];w[m]=new y(m,1,!1,f[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(f){w[f]=new y(f,2,!1,f.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){w[f]=new y(f,2,!1,f,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(f){w[f]=new y(f,3,!1,f.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(f){w[f]=new y(f,3,!0,f,null,!1,!1)}),["capture","download"].forEach(function(f){w[f]=new y(f,4,!1,f,null,!1,!1)}),["cols","rows","size","span"].forEach(function(f){w[f]=new y(f,6,!1,f,null,!1,!1)}),["rowSpan","start"].forEach(function(f){w[f]=new y(f,5,!1,f.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function C(f){return f[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(f){var m=f.replace(_,C);w[m]=new y(m,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(f){w[f]=new y(f,1,!1,f.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(f){w[f]=new y(f,1,!1,f.toLowerCase(),null,!0,!0)});function O(f,m,E,A){var I=w.hasOwnProperty(m)?w[m]:null;(I!==null?I.type!==0:A||!(2le||I[Z]!==B[le]){var pe=` -`+I[Z].replace(" at new "," at ");return f.displayName&&pe.includes("")&&(pe=pe.replace("",f.displayName)),pe}while(1<=Z&&0<=le);break}}}finally{ee=!1,Error.prepareStackTrace=E}return(f=f?f.displayName||f.name:"")?X(f):""}function fe(f){switch(f.tag){case 5:return X(f.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return f=ae(f.type,!1),f;case 11:return f=ae(f.type.render,!1),f;case 1:return f=ae(f.type,!0),f;default:return""}}function ie(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case k:return"Fragment";case T:return"Portal";case j:return"Profiler";case M:return"StrictMode";case H:return"Suspense";case D:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case L:return(f.displayName||"Context")+".Consumer";case $:return(f._context.displayName||"Context")+".Provider";case K:var m=f.render;return f=f.displayName,f||(f=m.displayName||m.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case W:return m=f.displayName||null,m!==null?m:ie(f.type)||"Memo";case q:m=f._payload,f=f._init;try{return ie(f(m))}catch{}}return null}function we(f){var m=f.type;switch(f.tag){case 24:return"Cache";case 9:return(m.displayName||"Context")+".Consumer";case 10:return(m._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=m.render,f=f.displayName||f.name||"",m.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return m;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ie(m);case 8:return m===M?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m}return null}function de(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function se(f){var m=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function ye(f){var m=se(f)?"checked":"value",E=Object.getOwnPropertyDescriptor(f.constructor.prototype,m),A=""+f[m];if(!f.hasOwnProperty(m)&&typeof E<"u"&&typeof E.get=="function"&&typeof E.set=="function"){var I=E.get,B=E.set;return Object.defineProperty(f,m,{configurable:!0,get:function(){return I.call(this)},set:function(Z){A=""+Z,B.call(this,Z)}}),Object.defineProperty(f,m,{enumerable:E.enumerable}),{getValue:function(){return A},setValue:function(Z){A=""+Z},stopTracking:function(){f._valueTracker=null,delete f[m]}}}}function Te(f){f._valueTracker||(f._valueTracker=ye(f))}function ge(f){if(!f)return!1;var m=f._valueTracker;if(!m)return!0;var E=m.getValue(),A="";return f&&(A=se(f)?f.checked?"true":"false":f.value),f=A,f!==E?(m.setValue(f),!0):!1}function Be(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function Ie(f,m){var E=m.checked;return G({},m,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:E??f._wrapperState.initialChecked})}function Ve(f,m){var E=m.defaultValue==null?"":m.defaultValue,A=m.checked!=null?m.checked:m.defaultChecked;E=de(m.value!=null?m.value:E),f._wrapperState={initialChecked:A,initialValue:E,controlled:m.type==="checkbox"||m.type==="radio"?m.checked!=null:m.value!=null}}function ht(f,m){m=m.checked,m!=null&&O(f,"checked",m,!1)}function lt(f,m){ht(f,m);var E=de(m.value),A=m.type;if(E!=null)A==="number"?(E===0&&f.value===""||f.value!=E)&&(f.value=""+E):f.value!==""+E&&(f.value=""+E);else if(A==="submit"||A==="reset"){f.removeAttribute("value");return}m.hasOwnProperty("value")?Kt(f,m.type,E):m.hasOwnProperty("defaultValue")&&Kt(f,m.type,de(m.defaultValue)),m.checked==null&&m.defaultChecked!=null&&(f.defaultChecked=!!m.defaultChecked)}function Ye(f,m,E){if(m.hasOwnProperty("value")||m.hasOwnProperty("defaultValue")){var A=m.type;if(!(A!=="submit"&&A!=="reset"||m.value!==void 0&&m.value!==null))return;m=""+f._wrapperState.initialValue,E||m===f.value||(f.value=m),f.defaultValue=m}E=f.name,E!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,E!==""&&(f.name=E)}function Kt(f,m,E){(m!=="number"||Be(f.ownerDocument)!==f)&&(E==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+E&&(f.defaultValue=""+E))}var vn=Array.isArray;function un(f,m,E,A){if(f=f.options,m){m={};for(var I=0;I"+m.valueOf().toString()+"",m=Ke.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;m.firstChild;)f.appendChild(m.firstChild)}});function At(f,m){if(m){var E=f.firstChild;if(E&&E===f.lastChild&&E.nodeType===3){E.nodeValue=m;return}}f.textContent=m}var Rt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},an=["Webkit","ms","Moz","O"];Object.keys(Rt).forEach(function(f){an.forEach(function(m){m=m+f.charAt(0).toUpperCase()+f.substring(1),Rt[m]=Rt[f]})});function nr(f,m,E){return m==null||typeof m=="boolean"||m===""?"":E||typeof m!="number"||m===0||Rt.hasOwnProperty(f)&&Rt[f]?(""+m).trim():m+"px"}function $n(f,m){f=f.style;for(var E in m)if(m.hasOwnProperty(E)){var A=E.indexOf("--")===0,I=nr(E,m[E],A);E==="float"&&(E="cssFloat"),A?f.setProperty(E,I):f[E]=I}}var Mr=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(f,m){if(m){if(Mr[f]&&(m.children!=null||m.dangerouslySetInnerHTML!=null))throw Error(n(137,f));if(m.dangerouslySetInnerHTML!=null){if(m.children!=null)throw Error(n(60));if(typeof m.dangerouslySetInnerHTML!="object"||!("__html"in m.dangerouslySetInnerHTML))throw Error(n(61))}if(m.style!=null&&typeof m.style!="object")throw Error(n(62))}}function Ce(f,m){if(f.indexOf("-")===-1)return typeof m.is=="string";switch(f){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var me=null;function Ae(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var Le=null,ze=null,Vt=null;function Ut(f){if(f=mu(f)){if(typeof Le!="function")throw Error(n(280));var m=f.stateNode;m&&(m=yn(m),Le(f.stateNode,f.type,m))}}function Sn(f){ze?Vt?Vt.push(f):Vt=[f]:ze=f}function at(){if(ze){var f=ze,m=Vt;if(Vt=ze=null,Ut(f),m)for(f=0;f>>=0,f===0?32:31-(il(f)/Li|0)|0}var No=64,Yo=4194304;function cc(f){switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function fc(f,m){var E=f.pendingLanes;if(E===0)return 0;var A=0,I=f.suspendedLanes,B=f.pingedLanes,Z=E&268435455;if(Z!==0){var le=Z&~I;le!==0?A=cc(le):(B&=Z,B!==0&&(A=cc(B)))}else Z=E&~I,Z!==0?A=cc(Z):B!==0&&(A=cc(B));if(A===0)return 0;if(m!==0&&m!==A&&(m&I)===0&&(I=A&-A,B=m&-m,I>=B||I===16&&(B&4194240)!==0))return m;if((A&4)!==0&&(A|=E&16),m=f.entangledLanes,m!==0)for(f=f.entanglements,m&=A;0E;E++)m.push(f);return m}function al(f,m,E){f.pendingLanes|=m,m!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,m=31-er(m),f[m]=E}function mh(f,m){var E=f.pendingLanes&~m;f.pendingLanes=m,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=m,f.mutableReadLanes&=m,f.entangledLanes&=m,m=f.entanglements;var A=f.eventTimes;for(f=f.expirationTimes;0=pc),_0=" ",Xb=!1;function Qb(f,m){switch(f){case"keyup":return Yb.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zb(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Nf=!1;function AP(f,m){switch(f){case"compositionend":return Zb(m);case"keypress":return m.which!==32?null:(Xb=!0,_0);case"textInput":return f=m.data,f===_0&&Xb?null:f;default:return null}}function Mf(f,m){if(Nf)return f==="compositionend"||!Qo&&Qb(f,m)?(f=iu(),Tf=Zr=ou=null,Nf=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1=m)return{node:E,offset:m-f};f=A}e:{for(;E;){if(E.nextSibling){E=E.nextSibling;break e}E=E.parentNode}E=void 0}E=mt(E)}}function Hn(f,m){return f&&m?f===m?!0:f&&f.nodeType===3?!1:m&&m.nodeType===3?Hn(f,m.parentNode):"contains"in f?f.contains(m):f.compareDocumentPosition?!!(f.compareDocumentPosition(m)&16):!1:!1}function Br(){for(var f=window,m=Be();m instanceof f.HTMLIFrameElement;){try{var E=typeof m.contentWindow.location.href=="string"}catch{E=!1}if(E)f=m.contentWindow;else break;m=Be(f.document)}return m}function or(f){var m=f&&f.nodeName&&f.nodeName.toLowerCase();return m&&(m==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||m==="textarea"||f.contentEditable==="true")}function C0(f){var m=Br(),E=f.focusedElem,A=f.selectionRange;if(m!==E&&E&&E.ownerDocument&&Hn(E.ownerDocument.documentElement,E)){if(A!==null&&or(E)){if(m=A.start,f=A.end,f===void 0&&(f=m),"selectionStart"in E)E.selectionStart=m,E.selectionEnd=Math.min(f,E.value.length);else if(f=(m=E.ownerDocument||document)&&m.defaultView||window,f.getSelection){f=f.getSelection();var I=E.textContent.length,B=Math.min(A.start,I);A=A.end===void 0?B:Math.min(A.end,I),!f.extend&&B>A&&(I=A,A=B,B=I),I=sn(E,B);var Z=sn(E,A);I&&Z&&(f.rangeCount!==1||f.anchorNode!==I.node||f.anchorOffset!==I.offset||f.focusNode!==Z.node||f.focusOffset!==Z.offset)&&(m=m.createRange(),m.setStart(I.node,I.offset),f.removeAllRanges(),B>A?(f.addRange(m),f.extend(Z.node,Z.offset)):(m.setEnd(Z.node,Z.offset),f.addRange(m)))}}for(m=[],f=E;f=f.parentNode;)f.nodeType===1&&m.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E=document.documentMode,yo=null,Df=null,Sh=null,cu=!1;function _h(f,m,E){var A=E.window===E?E.document:E.nodeType===9?E:E.ownerDocument;cu||yo==null||yo!==Be(A)||(A=yo,"selectionStart"in A&&or(A)?A={start:A.selectionStart,end:A.selectionEnd}:(A=(A.ownerDocument&&A.ownerDocument.defaultView||window).getSelection(),A={anchorNode:A.anchorNode,anchorOffset:A.anchorOffset,focusNode:A.focusNode,focusOffset:A.focusOffset}),Sh&&Ne(Sh,A)||(Sh=A,A=kh(Df,"onSelect"),0Uf||(f.current=A0[Uf],A0[Uf]=null,Uf--)}function hr(f,m){Uf++,A0[Uf]=f.current,f.current=m}var vu={},Io=gu(vu),ci=gu(!1),wc=vu;function fi(f,m){var E=f.type.contextTypes;if(!E)return vu;var A=f.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===m)return A.__reactInternalMemoizedMaskedChildContext;var I={},B;for(B in E)I[B]=m[B];return A&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=m,f.__reactInternalMemoizedMaskedChildContext=I),I}function di(f){return f=f.childContextTypes,f!=null}function Xm(){Qn(ci),Qn(Io)}function fS(f,m,E){if(Io.current!==vu)throw Error(n(168));hr(Io,m),hr(ci,E)}function dS(f,m,E){var A=f.stateNode;if(m=m.childContextTypes,typeof A.getChildContext!="function")return E;A=A.getChildContext();for(var I in A)if(!(I in m))throw Error(n(108,we(f)||"Unknown",I));return G({},E,A)}function Qm(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||vu,wc=Io.current,hr(Io,f),hr(ci,ci.current),!0}function xs(f,m,E){var A=f.stateNode;if(!A)throw Error(n(169));E?(f=dS(f,m,wc),A.__reactInternalMemoizedMergedChildContext=f,Qn(ci),Qn(Io),hr(Io,f)):Qn(ci),hr(ci,E)}var cl=null,Zm=!1,k0=!1;function hS(f){cl===null?cl=[f]:cl.push(f)}function LP(f){Zm=!0,hS(f)}function hi(){if(!k0&&cl!==null){k0=!0;var f=0,m=Fn;try{var E=cl;for(Fn=1;f>=Z,I-=Z,fl=1<<32-er(m)+I|E<Yt?(no=qt,qt=null):no=qt.sibling;var Gn=qe(Oe,qt,Pe[Yt],Ze);if(Gn===null){qt===null&&(qt=no);break}f&&qt&&Gn.alternate===null&&m(Oe,qt),xe=B(Gn,xe,Yt),zt===null?_t=Gn:zt.sibling=Gn,zt=Gn,qt=no}if(Yt===Pe.length)return E(Oe,qt),wr&&yu(Oe,Yt),_t;if(qt===null){for(;YtYt?(no=qt,qt=null):no=qt.sibling;var ju=qe(Oe,qt,Gn.value,Ze);if(ju===null){qt===null&&(qt=no);break}f&&qt&&ju.alternate===null&&m(Oe,qt),xe=B(ju,xe,Yt),zt===null?_t=ju:zt.sibling=ju,zt=ju,qt=no}if(Gn.done)return E(Oe,qt),wr&&yu(Oe,Yt),_t;if(qt===null){for(;!Gn.done;Yt++,Gn=Pe.next())Gn=Xe(Oe,Gn.value,Ze),Gn!==null&&(xe=B(Gn,xe,Yt),zt===null?_t=Gn:zt.sibling=Gn,zt=Gn);return wr&&yu(Oe,Yt),_t}for(qt=A(Oe,qt);!Gn.done;Yt++,Gn=Pe.next())Gn=dt(qt,Oe,Yt,Gn.value,Ze),Gn!==null&&(f&&Gn.alternate!==null&&qt.delete(Gn.key===null?Yt:Gn.key),xe=B(Gn,xe,Yt),zt===null?_t=Gn:zt.sibling=Gn,zt=Gn);return f&&qt.forEach(function(rT){return m(Oe,rT)}),wr&&yu(Oe,Yt),_t}function Ar(Oe,xe,Pe,Ze){if(typeof Pe=="object"&&Pe!==null&&Pe.type===k&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case R:e:{for(var _t=Pe.key,zt=xe;zt!==null;){if(zt.key===_t){if(_t=Pe.type,_t===k){if(zt.tag===7){E(Oe,zt.sibling),xe=I(zt,Pe.props.children),xe.return=Oe,Oe=xe;break e}}else if(zt.elementType===_t||typeof _t=="object"&&_t!==null&&_t.$$typeof===q&&Fh(_t)===zt.type){E(Oe,zt.sibling),xe=I(zt,Pe.props),xe.ref=Hf(Oe,zt,Pe),xe.return=Oe,Oe=xe;break e}E(Oe,zt);break}else m(Oe,zt);zt=zt.sibling}Pe.type===k?(xe=Lc(Pe.props.children,Oe.mode,Ze,Pe.key),xe.return=Oe,Oe=xe):(Ze=Dc(Pe.type,Pe.key,Pe.props,null,Oe.mode,Ze),Ze.ref=Hf(Oe,xe,Pe),Ze.return=Oe,Oe=Ze)}return Z(Oe);case T:e:{for(zt=Pe.key;xe!==null;){if(xe.key===zt)if(xe.tag===4&&xe.stateNode.containerInfo===Pe.containerInfo&&xe.stateNode.implementation===Pe.implementation){E(Oe,xe.sibling),xe=I(xe,Pe.children||[]),xe.return=Oe,Oe=xe;break e}else{E(Oe,xe);break}else m(Oe,xe);xe=xe.sibling}xe=v1(Pe,Oe.mode,Ze),xe.return=Oe,Oe=xe}return Z(Oe);case q:return zt=Pe._init,Ar(Oe,xe,zt(Pe._payload),Ze)}if(vn(Pe))return yt(Oe,xe,Pe,Ze);if(V(Pe))return St(Oe,xe,Pe,Ze);tg(Oe,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,xe!==null&&xe.tag===6?(E(Oe,xe.sibling),xe=I(xe,Pe),xe.return=Oe,Oe=xe):(E(Oe,xe),xe=g1(Pe,Oe.mode,Ze),xe.return=Oe,Oe=xe),Z(Oe)):E(Oe,xe)}return Ar}var _c=gS(!0),lo=gS(!1),Gf=gu(null),Bh=null,Zo=null,zh=null;function Kf(){zh=Zo=Bh=null}function hl(f){var m=Gf.current;Qn(Gf),f._currentValue=m}function ng(f,m,E){for(;f!==null;){var A=f.alternate;if((f.childLanes&m)!==m?(f.childLanes|=m,A!==null&&(A.childLanes|=m)):A!==null&&(A.childLanes&m)!==m&&(A.childLanes|=m),f===E)break;f=f.return}}function zr(f,m){Bh=f,zh=Zo=null,f=f.dependencies,f!==null&&f.firstContext!==null&&((f.lanes&m)!==0&&(bo=!0),f.firstContext=null)}function mi(f){var m=f._currentValue;if(zh!==f)if(f={context:f,memoizedValue:m,next:null},Zo===null){if(Bh===null)throw Error(n(308));Zo=f,Bh.dependencies={lanes:0,firstContext:f}}else Zo=Zo.next=f;return m}var Ec=null;function j0(f){Ec===null?Ec=[f]:Ec.push(f)}function vS(f,m,E,A){var I=m.interleaved;return I===null?(E.next=E,j0(m)):(E.next=I.next,I.next=E),m.interleaved=E,qa(f,A)}function qa(f,m){f.lanes|=m;var E=f.alternate;for(E!==null&&(E.lanes|=m),E=f,f=f.return;f!==null;)f.childLanes|=m,E=f.alternate,E!==null&&(E.childLanes|=m),E=f,f=f.return;return E.tag===3?E.stateNode:null}var xu=!1;function Cc(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I0(f,m){f=f.updateQueue,m.updateQueue===f&&(m.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function pl(f,m){return{eventTime:f,lane:m,tag:0,payload:null,callback:null,next:null}}function bu(f,m,E){var A=f.updateQueue;if(A===null)return null;if(A=A.shared,(qn&2)!==0){var I=A.pending;return I===null?m.next=m:(m.next=I.next,I.next=m),A.pending=m,qa(f,E)}return I=A.interleaved,I===null?(m.next=m,j0(A)):(m.next=I.next,I.next=m),A.interleaved=m,qa(f,E)}function Su(f,m,E){if(m=m.updateQueue,m!==null&&(m=m.shared,(E&4194240)!==0)){var A=m.lanes;A&=f.pendingLanes,E|=A,m.lanes=E,pn(f,E)}}function yS(f,m){var E=f.updateQueue,A=f.alternate;if(A!==null&&(A=A.updateQueue,E===A)){var I=null,B=null;if(E=E.firstBaseUpdate,E!==null){do{var Z={eventTime:E.eventTime,lane:E.lane,tag:E.tag,payload:E.payload,callback:E.callback,next:null};B===null?I=B=Z:B=B.next=Z,E=E.next}while(E!==null);B===null?I=B=m:B=B.next=m}else I=B=m;E={baseState:A.baseState,firstBaseUpdate:I,lastBaseUpdate:B,shared:A.shared,effects:A.effects},f.updateQueue=E;return}f=E.lastBaseUpdate,f===null?E.firstBaseUpdate=m:f.next=m,E.lastBaseUpdate=m}function rg(f,m,E,A){var I=f.updateQueue;xu=!1;var B=I.firstBaseUpdate,Z=I.lastBaseUpdate,le=I.shared.pending;if(le!==null){I.shared.pending=null;var pe=le,ke=pe.next;pe.next=null,Z===null?B=ke:Z.next=ke,Z=pe;var Ue=f.alternate;Ue!==null&&(Ue=Ue.updateQueue,le=Ue.lastBaseUpdate,le!==Z&&(le===null?Ue.firstBaseUpdate=ke:le.next=ke,Ue.lastBaseUpdate=pe))}if(B!==null){var Xe=I.baseState;Z=0,Ue=ke=pe=null,le=B;do{var qe=le.lane,dt=le.eventTime;if((A&qe)===qe){Ue!==null&&(Ue=Ue.next={eventTime:dt,lane:0,tag:le.tag,payload:le.payload,callback:le.callback,next:null});e:{var yt=f,St=le;switch(qe=m,dt=E,St.tag){case 1:if(yt=St.payload,typeof yt=="function"){Xe=yt.call(dt,Xe,qe);break e}Xe=yt;break e;case 3:yt.flags=yt.flags&-65537|128;case 0:if(yt=St.payload,qe=typeof yt=="function"?yt.call(dt,Xe,qe):yt,qe==null)break e;Xe=G({},Xe,qe);break e;case 2:xu=!0}}le.callback!==null&&le.lane!==0&&(f.flags|=64,qe=I.effects,qe===null?I.effects=[le]:qe.push(le))}else dt={eventTime:dt,lane:qe,tag:le.tag,payload:le.payload,callback:le.callback,next:null},Ue===null?(ke=Ue=dt,pe=Xe):Ue=Ue.next=dt,Z|=qe;if(le=le.next,le===null){if(le=I.shared.pending,le===null)break;qe=le,le=qe.next,qe.next=null,I.lastBaseUpdate=qe,I.shared.pending=null}}while(!0);if(Ue===null&&(pe=Xe),I.baseState=pe,I.firstBaseUpdate=ke,I.lastBaseUpdate=Ue,m=I.shared.interleaved,m!==null){I=m;do Z|=I.lane,I=I.next;while(I!==m)}else B===null&&(I.shared.lanes=0);Nc|=Z,f.lanes=Z,f.memoizedState=Xe}}function og(f,m,E){if(f=m.effects,m.effects=null,f!==null)for(m=0;mE?E:4,f(!0);var A=sg.transition;sg.transition={};try{f(!1),m()}finally{Fn=E,sg.transition=A}}function H0(){return da().memoizedState}function SS(f,m,E){var A=ku(f);if(E={lane:A,action:E,hasEagerState:!1,eagerState:null,next:null},G0(f))K0(m,E);else if(E=vS(f,m,E,A),E!==null){var I=qo();Ha(E,f,A,I),Jo(E,m,A)}}function FP(f,m,E){var A=ku(f),I={lane:A,action:E,hasEagerState:!1,eagerState:null,next:null};if(G0(f))K0(m,I);else{var B=f.alternate;if(f.lanes===0&&(B===null||B.lanes===0)&&(B=m.lastRenderedReducer,B!==null))try{var Z=m.lastRenderedState,le=B(Z,E);if(I.hasEagerState=!0,I.eagerState=le,Me(le,Z)){var pe=m.interleaved;pe===null?(I.next=I,j0(m)):(I.next=pe.next,pe.next=I),m.interleaved=I;return}}catch{}finally{}E=vS(f,m,I,A),E!==null&&(I=qo(),Ha(E,f,A,I),Jo(E,m,A))}}function G0(f){var m=f.alternate;return f===br||m!==null&&m===br}function K0(f,m){Rc=Gh=!0;var E=f.pending;E===null?m.next=m:(m.next=E.next,E.next=m),f.pending=m}function Jo(f,m,E){if((E&4194240)!==0){var A=m.lanes;A&=f.pendingLanes,E|=A,m.lanes=E,pn(f,E)}}var qi={readContext:mi,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},BP={readContext:mi,useCallback:function(f,m){return Ua().memoizedState=[f,m===void 0?null:m],f},useContext:mi,useEffect:cg,useImperativeHandle:function(f,m,E){return E=E!=null?E.concat([f]):null,Zf(4194308,4,vl.bind(null,m,f),E)},useLayoutEffect:function(f,m){return Zf(4194308,4,f,m)},useInsertionEffect:function(f,m){return Zf(4,2,f,m)},useMemo:function(f,m){var E=Ua();return m=m===void 0?null:m,f=f(),E.memoizedState=[f,m],f},useReducer:function(f,m,E){var A=Ua();return m=E!==void 0?E(m):m,A.memoizedState=A.baseState=m,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:m},A.queue=f,f=f.dispatch=SS.bind(null,br,f),[A.memoizedState,f]},useRef:function(f){var m=Ua();return f={current:f},m.memoizedState=f},useState:U0,useDebugValue:fg,useDeferredValue:function(f){return Ua().memoizedState=f},useTransition:function(){var f=U0(!1),m=f[0];return f=$P.bind(null,f[1]),Ua().memoizedState=f,[m,f]},useMutableSource:function(){},useSyncExternalStore:function(f,m,E){var A=br,I=Ua();if(wr){if(E===void 0)throw Error(n(407));E=E()}else{if(E=m(),fo===null)throw Error(n(349));(Oc&30)!==0||z0(A,m,E)}I.memoizedState=E;var B={value:E,getSnapshot:m};return I.queue=B,cg(vi.bind(null,A,B,f),[f]),A.flags|=2048,Eu(9,q0.bind(null,A,B,E,m),void 0,null),E},useId:function(){var f=Ua(),m=fo.identifierPrefix;if(wr){var E=bs,A=fl;E=(A&~(1<<32-er(A)-1)).toString(32)+E,m=":"+m+"R"+E,E=Kh++,0<\/script>",f=f.removeChild(f.firstChild)):typeof A.is=="string"?f=Z.createElement(E,{is:A.is}):(f=Z.createElement(E),E==="select"&&(Z=f,A.multiple?Z.multiple=!0:A.size&&(Z.size=A.size))):f=Z.createElementNS(f,E),f[ws]=m,f[Dh]=A,e1(f,m,!1,!1),m.stateNode=f;e:{switch(Z=Ce(E,A),E){case"dialog":gr("cancel",f),gr("close",f),I=A;break;case"iframe":case"object":case"embed":gr("load",f),I=A;break;case"video":case"audio":for(I=0;I<$f.length;I++)gr($f[I],f);I=A;break;case"source":gr("error",f),I=A;break;case"img":case"image":case"link":gr("error",f),gr("load",f),I=A;break;case"details":gr("toggle",f),I=A;break;case"input":Ve(f,A),I=Ie(f,A),gr("invalid",f);break;case"option":I=A;break;case"select":f._wrapperState={wasMultiple:!!A.multiple},I=G({},A,{value:void 0}),gr("invalid",f);break;case"textarea":oe(f,A),I=on(f,A),gr("invalid",f);break;default:I=A}Ee(E,I),le=I;for(B in le)if(le.hasOwnProperty(B)){var pe=le[B];B==="style"?$n(f,pe):B==="dangerouslySetInnerHTML"?(pe=pe?pe.__html:void 0,pe!=null&&nt(f,pe)):B==="children"?typeof pe=="string"?(E!=="textarea"||pe!=="")&&At(f,pe):typeof pe=="number"&&At(f,""+pe):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(o.hasOwnProperty(B)?pe!=null&&B==="onScroll"&&gr("scroll",f):pe!=null&&O(f,B,pe,Z))}switch(E){case"input":Te(f),Ye(f,A,!1);break;case"textarea":Te(f),Se(f);break;case"option":A.value!=null&&f.setAttribute("value",""+de(A.value));break;case"select":f.multiple=!!A.multiple,B=A.value,B!=null?un(f,!!A.multiple,B,!1):A.defaultValue!=null&&un(f,!!A.multiple,A.defaultValue,!0);break;default:typeof I.onClick=="function"&&(f.onclick=Nh)}switch(E){case"button":case"input":case"select":case"textarea":A=!!A.autoFocus;break e;case"img":A=!0;break e;default:A=!1}}A&&(m.flags|=4)}m.ref!==null&&(m.flags|=512,m.flags|=2097152)}return Fo(m),null;case 6:if(f&&m.stateNode!=null)kS(f,m,f.memoizedProps,A);else{if(typeof A!="string"&&m.stateNode===null)throw Error(n(166));if(E=_u(Uh.current),_u(Ss.current),eg(m)){if(A=m.stateNode,E=m.memoizedProps,A[ws]=m,(B=A.nodeValue!==E)&&(f=xo,f!==null))switch(f.tag){case 3:Km(A.nodeValue,E,(f.mode&1)!==0);break;case 5:f.memoizedProps.suppressHydrationWarning!==!0&&Km(A.nodeValue,E,(f.mode&1)!==0)}B&&(m.flags|=4)}else A=(E.nodeType===9?E:E.ownerDocument).createTextNode(A),A[ws]=m,m.stateNode=A}return Fo(m),null;case 13:if(Qn(xr),A=m.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(wr&&Do!==null&&(m.mode&1)!==0&&(m.flags&128)===0)M0(),bc(),m.flags|=98560,B=!1;else if(B=eg(m),A!==null&&A.dehydrated!==null){if(f===null){if(!B)throw Error(n(318));if(B=m.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(n(317));B[ws]=m}else bc(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;Fo(m),B=!1}else fa!==null&&(f1(fa),fa=null),B=!0;if(!B)return m.flags&65536?m:null}return(m.flags&128)!==0?(m.lanes=E,m):(A=A!==null,A!==(f!==null&&f.memoizedState!==null)&&A&&(m.child.flags|=8192,(m.mode&1)!==0&&(f===null||(xr.current&1)!==0?to===0&&(to=3):p1())),m.updateQueue!==null&&(m.flags|=4),Fo(m),null);case 4:return Xf(),uo(f,m),f===null&&du(m.stateNode.containerInfo),Fo(m),null;case 10:return hl(m.type._context),Fo(m),null;case 17:return di(m.type)&&Xm(),Fo(m),null;case 19:if(Qn(xr),B=m.memoizedState,B===null)return Fo(m),null;if(A=(m.flags&128)!==0,Z=B.rendering,Z===null)if(A)nd(B,!1);else{if(to!==0||f!==null&&(f.flags&128)!==0)for(f=m.child;f!==null;){if(Z=Wh(f),Z!==null){for(m.flags|=128,nd(B,!1),A=Z.updateQueue,A!==null&&(m.updateQueue=A,m.flags|=4),m.subtreeFlags=0,A=E,E=m.child;E!==null;)B=E,f=A,B.flags&=14680066,Z=B.alternate,Z===null?(B.childLanes=0,B.lanes=f,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=Z.childLanes,B.lanes=Z.lanes,B.child=Z.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=Z.memoizedProps,B.memoizedState=Z.memoizedState,B.updateQueue=Z.updateQueue,B.type=Z.type,f=Z.dependencies,B.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),E=E.sibling;return hr(xr,xr.current&1|2),m.child}f=f.sibling}B.tail!==null&&dr()>id&&(m.flags|=128,A=!0,nd(B,!1),m.lanes=4194304)}else{if(!A)if(f=Wh(Z),f!==null){if(m.flags|=128,A=!0,E=f.updateQueue,E!==null&&(m.updateQueue=E,m.flags|=4),nd(B,!0),B.tail===null&&B.tailMode==="hidden"&&!Z.alternate&&!wr)return Fo(m),null}else 2*dr()-B.renderingStartTime>id&&E!==1073741824&&(m.flags|=128,A=!0,nd(B,!1),m.lanes=4194304);B.isBackwards?(Z.sibling=m.child,m.child=Z):(E=B.last,E!==null?E.sibling=Z:m.child=Z,B.last=Z)}return B.tail!==null?(m=B.tail,B.rendering=m,B.tail=m.sibling,B.renderingStartTime=dr(),m.sibling=null,E=xr.current,hr(xr,A?E&1|2:E&1),m):(Fo(m),null);case 22:case 23:return h1(),A=m.memoizedState!==null,f!==null&&f.memoizedState!==null!==A&&(m.flags|=8192),A&&(m.mode&1)!==0?(Ui&1073741824)!==0&&(Fo(m),m.subtreeFlags&6&&(m.flags|=8192)):Fo(m),null;case 24:return null;case 25:return null}throw Error(n(156,m.tag))}function qP(f,m){switch(Lh(m),m.tag){case 1:return di(m.type)&&Xm(),f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 3:return Xf(),Qn(ci),Qn(Io),D0(),f=m.flags,(f&65536)!==0&&(f&128)===0?(m.flags=f&-65537|128,m):null;case 5:return ag(m),null;case 13:if(Qn(xr),f=m.memoizedState,f!==null&&f.dehydrated!==null){if(m.alternate===null)throw Error(n(340));bc()}return f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 19:return Qn(xr),null;case 4:return Xf(),null;case 10:return hl(m.type._context),null;case 22:case 23:return h1(),null;case 24:return null;default:return null}}var Eg=!1,Bo=!1,wl=typeof WeakSet=="function"?WeakSet:Set,st=null;function Cu(f,m){var E=f.ref;if(E!==null)if(typeof E=="function")try{E(null)}catch(A){Sr(f,m,A)}else E.current=null}function t1(f,m,E){try{E()}catch(A){Sr(f,m,A)}}var Cg=!1;function UP(f,m){if(T0=Im,f=Br(),or(f)){if("selectionStart"in f)var E={start:f.selectionStart,end:f.selectionEnd};else e:{E=(E=f.ownerDocument)&&E.defaultView||window;var A=E.getSelection&&E.getSelection();if(A&&A.rangeCount!==0){E=A.anchorNode;var I=A.anchorOffset,B=A.focusNode;A=A.focusOffset;try{E.nodeType,B.nodeType}catch{E=null;break e}var Z=0,le=-1,pe=-1,ke=0,Ue=0,Xe=f,qe=null;t:for(;;){for(var dt;Xe!==E||I!==0&&Xe.nodeType!==3||(le=Z+I),Xe!==B||A!==0&&Xe.nodeType!==3||(pe=Z+A),Xe.nodeType===3&&(Z+=Xe.nodeValue.length),(dt=Xe.firstChild)!==null;)qe=Xe,Xe=dt;for(;;){if(Xe===f)break t;if(qe===E&&++ke===I&&(le=Z),qe===B&&++Ue===A&&(pe=Z),(dt=Xe.nextSibling)!==null)break;Xe=qe,qe=Xe.parentNode}Xe=dt}E=le===-1||pe===-1?null:{start:le,end:pe}}else E=null}E=E||{start:0,end:0}}else E=null;for(Mh={focusedElem:f,selectionRange:E},Im=!1,st=m;st!==null;)if(m=st,f=m.child,(m.subtreeFlags&1028)!==0&&f!==null)f.return=m,st=f;else for(;st!==null;){m=st;try{var yt=m.alternate;if((m.flags&1024)!==0)switch(m.tag){case 0:case 11:case 15:break;case 1:if(yt!==null){var St=yt.memoizedProps,Ar=yt.memoizedState,Oe=m.stateNode,xe=Oe.getSnapshotBeforeUpdate(m.elementType===m.type?St:Lo(m.type,St),Ar);Oe.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var Pe=m.stateNode.containerInfo;Pe.nodeType===1?Pe.textContent="":Pe.nodeType===9&&Pe.documentElement&&Pe.removeChild(Pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ze){Sr(m,m.return,Ze)}if(f=m.sibling,f!==null){f.return=m.return,st=f;break}st=m.return}return yt=Cg,Cg=!1,yt}function op(f,m,E){var A=m.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var I=A=A.next;do{if((I.tag&f)===f){var B=I.destroy;I.destroy=void 0,B!==void 0&&t1(m,E,B)}I=I.next}while(I!==A)}}function Ou(f,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var E=m=m.next;do{if((E.tag&f)===f){var A=E.create;E.destroy=A()}E=E.next}while(E!==m)}}function Og(f){var m=f.ref;if(m!==null){var E=f.stateNode;switch(f.tag){case 5:f=E;break;default:f=E}typeof m=="function"?m(f):m.current=f}}function n1(f){var m=f.alternate;m!==null&&(f.alternate=null,n1(m)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(m=f.stateNode,m!==null&&(delete m[ws],delete m[Dh],delete m[yc],delete m[cS],delete m[te])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function MS(f){return f.tag===5||f.tag===3||f.tag===4}function jS(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||MS(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function r1(f,m,E){var A=f.tag;if(A===5||A===6)f=f.stateNode,m?E.nodeType===8?E.parentNode.insertBefore(f,m):E.insertBefore(f,m):(E.nodeType===8?(m=E.parentNode,m.insertBefore(f,E)):(m=E,m.appendChild(f)),E=E._reactRootContainer,E!=null||m.onclick!==null||(m.onclick=Nh));else if(A!==4&&(f=f.child,f!==null))for(r1(f,m,E),f=f.sibling;f!==null;)r1(f,m,E),f=f.sibling}function o1(f,m,E){var A=f.tag;if(A===5||A===6)f=f.stateNode,m?E.insertBefore(f,m):E.appendChild(f);else if(A!==4&&(f=f.child,f!==null))for(o1(f,m,E),f=f.sibling;f!==null;)o1(f,m,E),f=f.sibling}var co=null,ha=!1;function Ru(f,m,E){for(E=E.child;E!==null;)Rg(f,m,E),E=E.sibling}function Rg(f,m,E){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(gt,E)}catch{}switch(E.tag){case 5:Bo||Cu(E,m);case 6:var A=co,I=ha;co=null,Ru(f,m,E),co=A,ha=I,co!==null&&(ha?(f=co,E=E.stateNode,f.nodeType===8?f.parentNode.removeChild(E):f.removeChild(E)):co.removeChild(E.stateNode));break;case 18:co!==null&&(ha?(f=co,E=E.stateNode,f.nodeType===8?hu(f.parentNode,E):f.nodeType===1&&hu(f,E),rr(f)):hu(co,E.stateNode));break;case 4:A=co,I=ha,co=E.stateNode.containerInfo,ha=!0,Ru(f,m,E),co=A,ha=I;break;case 0:case 11:case 14:case 15:if(!Bo&&(A=E.updateQueue,A!==null&&(A=A.lastEffect,A!==null))){I=A=A.next;do{var B=I,Z=B.destroy;B=B.tag,Z!==void 0&&((B&2)!==0||(B&4)!==0)&&t1(E,m,Z),I=I.next}while(I!==A)}Ru(f,m,E);break;case 1:if(!Bo&&(Cu(E,m),A=E.stateNode,typeof A.componentWillUnmount=="function"))try{A.props=E.memoizedProps,A.state=E.memoizedState,A.componentWillUnmount()}catch(le){Sr(E,m,le)}Ru(f,m,E);break;case 21:Ru(f,m,E);break;case 22:E.mode&1?(Bo=(A=Bo)||E.memoizedState!==null,Ru(f,m,E),Bo=A):Ru(f,m,E);break;default:Ru(f,m,E)}}function i1(f){var m=f.updateQueue;if(m!==null){f.updateQueue=null;var E=f.stateNode;E===null&&(E=f.stateNode=new wl),m.forEach(function(A){var I=XP.bind(null,f,A);E.has(A)||(E.add(A),A.then(I,I))})}}function ei(f,m){var E=m.deletions;if(E!==null)for(var A=0;AI&&(I=Z),A&=~B}if(A=I,A=dr()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*VP(A/1960))-A,10f?16:f,Au===null)var A=!1;else{if(f=Au,Au=null,Ng=0,(qn&6)!==0)throw Error(n(331));var I=qn;for(qn|=4,st=f.current;st!==null;){var B=st,Z=B.child;if((st.flags&16)!==0){var le=B.deletions;if(le!==null){for(var pe=0;pedr()-l1?jc(f,0):Tg|=E),wi(f,m)}function VS(f,m){m===0&&((f.mode&1)===0?m=1:(m=Yo,Yo<<=1,(Yo&130023424)===0&&(Yo=4194304)));var E=qo();f=qa(f,m),f!==null&&(al(f,m,E),wi(f,E))}function YP(f){var m=f.memoizedState,E=0;m!==null&&(E=m.retryLane),VS(f,E)}function XP(f,m){var E=0;switch(f.tag){case 13:var A=f.stateNode,I=f.memoizedState;I!==null&&(E=I.retryLane);break;case 19:A=f.stateNode;break;default:throw Error(n(314))}A!==null&&A.delete(m),VS(f,E)}var WS;WS=function(f,m,E){if(f!==null)if(f.memoizedProps!==m.pendingProps||ci.current)bo=!0;else{if((f.lanes&E)===0&&(m.flags&128)===0)return bo=!1,J0(f,m,E);bo=(f.flags&131072)!==0}else bo=!1,wr&&(m.flags&1048576)!==0&&pS(m,Jm,m.index);switch(m.lanes=0,m.tag){case 2:var A=m.type;Es(f,m),f=m.pendingProps;var I=fi(m,Io.current);zr(m,E),I=F0(null,m,A,f,I,E);var B=Pc();return m.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,di(A)?(B=!0,Qm(m)):B=!1,m.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Cc(m),I.updater=Jh,m.stateNode=I,I._reactInternals=m,Ac(m,A,f,E),m=bg(null,m,A,!0,B,E)):(m.tag=0,wr&&B&&N0(m),$o(null,m,I,E),m=m.child),m;case 16:A=m.elementType;e:{switch(Es(f,m),f=m.pendingProps,I=A._init,A=I(A._payload),m.type=A,I=m.tag=GS(A),f=Lo(A,f),I){case 0:m=xg(null,m,A,f,E);break e;case 1:m=RS(null,m,A,f,E);break e;case 11:m=wg(null,m,A,f,E);break e;case 14:m=OS(null,m,A,Lo(A.type,f),E);break e}throw Error(n(306,A,""))}return m;case 0:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),xg(f,m,A,I,E);case 1:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),RS(f,m,A,I,E);case 3:e:{if(PS(m),f===null)throw Error(n(387));A=m.pendingProps,B=m.memoizedState,I=B.element,I0(f,m),rg(m,A,null,E);var Z=m.memoizedState;if(A=Z.element,B.isDehydrated)if(B={element:A,isDehydrated:!1,cache:Z.cache,pendingSuspenseBoundaries:Z.pendingSuspenseBoundaries,transitions:Z.transitions},m.updateQueue.baseState=B,m.memoizedState=B,m.flags&256){I=Jf(Error(n(423)),m),m=TS(f,m,A,E,I);break e}else if(A!==I){I=Jf(Error(n(424)),m),m=TS(f,m,A,E,I);break e}else for(Do=pu(m.stateNode.containerInfo.firstChild),xo=m,wr=!0,fa=null,E=lo(m,null,A,E),m.child=E;E;)E.flags=E.flags&-3|4096,E=E.sibling;else{if(bc(),A===I){m=yl(f,m,E);break e}$o(f,m,A,E)}m=m.child}return m;case 5:return ig(m),f===null&&dl(m),A=m.type,I=m.pendingProps,B=f!==null?f.memoizedProps:null,Z=I.children,vc(A,I)?Z=null:B!==null&&vc(A,B)&&(m.flags|=32),Z0(f,m),$o(f,m,Z,E),m.child;case 6:return f===null&&dl(m),null;case 13:return Sg(f,m,E);case 4:return Vh(m,m.stateNode.containerInfo),A=m.pendingProps,f===null?m.child=_c(m,null,A,E):$o(f,m,A,E),m.child;case 11:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),wg(f,m,A,I,E);case 7:return $o(f,m,m.pendingProps,E),m.child;case 8:return $o(f,m,m.pendingProps.children,E),m.child;case 12:return $o(f,m,m.pendingProps.children,E),m.child;case 10:e:{if(A=m.type._context,I=m.pendingProps,B=m.memoizedProps,Z=I.value,hr(Gf,A._currentValue),A._currentValue=Z,B!==null)if(Me(B.value,Z)){if(B.children===I.children&&!ci.current){m=yl(f,m,E);break e}}else for(B=m.child,B!==null&&(B.return=m);B!==null;){var le=B.dependencies;if(le!==null){Z=B.child;for(var pe=le.firstContext;pe!==null;){if(pe.context===A){if(B.tag===1){pe=pl(-1,E&-E),pe.tag=2;var ke=B.updateQueue;if(ke!==null){ke=ke.shared;var Ue=ke.pending;Ue===null?pe.next=pe:(pe.next=Ue.next,Ue.next=pe),ke.pending=pe}}B.lanes|=E,pe=B.alternate,pe!==null&&(pe.lanes|=E),ng(B.return,E,m),le.lanes|=E;break}pe=pe.next}}else if(B.tag===10)Z=B.type===m.type?null:B.child;else if(B.tag===18){if(Z=B.return,Z===null)throw Error(n(341));Z.lanes|=E,le=Z.alternate,le!==null&&(le.lanes|=E),ng(Z,E,m),Z=B.sibling}else Z=B.child;if(Z!==null)Z.return=B;else for(Z=B;Z!==null;){if(Z===m){Z=null;break}if(B=Z.sibling,B!==null){B.return=Z.return,Z=B;break}Z=Z.return}B=Z}$o(f,m,I.children,E),m=m.child}return m;case 9:return I=m.type,A=m.pendingProps.children,zr(m,E),I=mi(I),A=A(I),m.flags|=1,$o(f,m,A,E),m.child;case 14:return A=m.type,I=Lo(A,m.pendingProps),I=Lo(A.type,I),OS(f,m,A,I,E);case 15:return Q0(f,m,m.type,m.pendingProps,E);case 17:return A=m.type,I=m.pendingProps,I=m.elementType===A?I:Lo(A,I),Es(f,m),m.tag=1,di(A)?(f=!0,Qm(m)):f=!1,zr(m,E),Y0(m,A,I),Ac(m,A,I,E),bg(null,m,A,!0,f,E);case 19:return _g(f,m,E);case 22:return _s(f,m,E)}throw Error(n(156,m.tag))};function HS(f,m){return Zl(f,m)}function QP(f,m,E,A){this.tag=f,this.key=E,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ga(f,m,E,A){return new QP(f,m,E,A)}function m1(f){return f=f.prototype,!(!f||!f.isReactComponent)}function GS(f){if(typeof f=="function")return m1(f)?1:0;if(f!=null){if(f=f.$$typeof,f===K)return 11;if(f===W)return 14}return 2}function Mu(f,m){var E=f.alternate;return E===null?(E=ga(f.tag,m,f.key,f.mode),E.elementType=f.elementType,E.type=f.type,E.stateNode=f.stateNode,E.alternate=f,f.alternate=E):(E.pendingProps=m,E.type=f.type,E.flags=0,E.subtreeFlags=0,E.deletions=null),E.flags=f.flags&14680064,E.childLanes=f.childLanes,E.lanes=f.lanes,E.child=f.child,E.memoizedProps=f.memoizedProps,E.memoizedState=f.memoizedState,E.updateQueue=f.updateQueue,m=f.dependencies,E.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},E.sibling=f.sibling,E.index=f.index,E.ref=f.ref,E}function Dc(f,m,E,A,I,B){var Z=2;if(A=f,typeof f=="function")m1(f)&&(Z=1);else if(typeof f=="string")Z=5;else e:switch(f){case k:return Lc(E.children,I,B,m);case M:Z=8,I|=8;break;case j:return f=ga(12,E,m,I|2),f.elementType=j,f.lanes=B,f;case H:return f=ga(13,E,m,I),f.elementType=H,f.lanes=B,f;case D:return f=ga(19,E,m,I),f.elementType=D,f.lanes=B,f;case Y:return Dg(E,I,B,m);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case $:Z=10;break e;case L:Z=9;break e;case K:Z=11;break e;case W:Z=14;break e;case q:Z=16,A=null;break e}throw Error(n(130,f==null?f:typeof f,""))}return m=ga(Z,E,m,I),m.elementType=f,m.type=A,m.lanes=B,m}function Lc(f,m,E,A){return f=ga(7,f,A,m),f.lanes=E,f}function Dg(f,m,E,A){return f=ga(22,f,A,m),f.elementType=Y,f.lanes=E,f.stateNode={isHidden:!1},f}function g1(f,m,E){return f=ga(6,f,null,m),f.lanes=E,f}function v1(f,m,E){return m=ga(4,f.children!==null?f.children:[],f.key,m),m.lanes=E,m.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},m}function ZP(f,m,E,A,I){this.tag=m,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ba(0),this.expirationTimes=Ba(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ba(0),this.identifierPrefix=A,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function y1(f,m,E,A,I,B,Z,le,pe){return f=new ZP(f,m,E,le,pe),m===1?(m=1,B===!0&&(m|=8)):m=0,B=ga(3,null,null,m),f.current=B,B.stateNode=f,B.memoizedState={element:A,isDehydrated:E,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cc(B),f}function JP(f,m,E){var A=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),g2.exports=Pge(),g2.exports}var Vs=NY();const MY=Ln(Vs);function Zp(e){const t=Tge(e),n=b.forwardRef((r,o)=>{const{children:i,...a}=r,s=b.Children.toArray(i),l=s.find(kge);if(l){const u=l.props.children,c=s.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return v.jsx(t,{...a,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Tge(e){const t=b.forwardRef((n,r)=>{const{children:o,...i}=n;if(b.isValidElement(o)){const a=Mge(o),s=Nge(i,o.props);return o.type!==b.Fragment&&(s.ref=r?Jx(r,a):a),b.cloneElement(o,s)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jY=Symbol("radix.slottable");function Age(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jY,t}function kge(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jY}function Nge(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Mge(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=jge.reduce((e,t)=>{const n=Zp(`Primitive.${t}`),r=b.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Q3(e,t){e&&Vs.flushSync(()=>e.dispatchEvent(t))}function Ji(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ige(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e);b.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Dge="DismissableLayer",AI="dismissableLayer.update",Lge="dismissableLayer.pointerDownOutside",$ge="dismissableLayer.focusOutside",jF,IY=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),th=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,u=b.useContext(IY),[c,d]=b.useState(null),h=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),x=zn(t,k=>d(k)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),_=y.indexOf(w),C=c?y.indexOf(c):-1,O=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=_,R=Bge(k=>{const M=k.target,j=[...u.branches].some($=>$.contains(M));!P||j||(o==null||o(k),a==null||a(k),k.defaultPrevented||s==null||s())},h),T=zge(k=>{const M=k.target;[...u.branches].some($=>$.contains(M))||(i==null||i(k),a==null||a(k),k.defaultPrevented||s==null||s())},h);return Ige(k=>{C===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jF=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),IF(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jF)}},[c,h,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),IF())},[c,u]),b.useEffect(()=>{const k=()=>p({});return document.addEventListener(AI,k),()=>document.removeEventListener(AI,k)},[]),v.jsx(Jt.div,{...l,ref:x,style:{pointerEvents:O?P?"auto":"none":void 0,...e.style},onFocusCapture:Je(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Je(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Je(e.onPointerDownCapture,R.onPointerDownCapture)})});th.displayName=Dge;var Fge="DismissableLayerBranch",DY=b.forwardRef((e,t)=>{const n=b.useContext(IY),r=b.useRef(null),o=zn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(Jt.div,{...e,ref:o})});DY.displayName=Fge;function Bge(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e),r=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){LY(Lge,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zge(e,t=globalThis==null?void 0:globalThis.document){const n=Ji(e),r=b.useRef(!1);return b.useEffect(()=>{const o=i=>{i.target&&!r.current&&LY($ge,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function IF(){const e=new CustomEvent(AI);document.dispatchEvent(e)}function LY(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Q3(o,i):o.dispatchEvent(i)}var qge=th,Uge=DY,ii=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Vge=IO[" useId ".trim().toString()]||(()=>{}),Wge=0;function Ta(e){const[t,n]=b.useState(Vge());return ii(()=>{n(r=>r??String(Wge++))},[e]),t?`radix-${t}`:""}const Hge=["top","right","bottom","left"],Kd=Math.min,os=Math.max,EE=Math.round,a_=Math.floor,Hu=e=>({x:e,y:e}),Gge={left:"right",right:"left",bottom:"top",top:"bottom"},Kge={start:"end",end:"start"};function kI(e,t,n){return os(e,Kd(t,n))}function ff(e,t){return typeof e=="function"?e(t):e}function df(e){return e.split("-")[0]}function By(e){return e.split("-")[1]}function Z3(e){return e==="x"?"y":"x"}function J3(e){return e==="y"?"height":"width"}const Yge=new Set(["top","bottom"]);function Uu(e){return Yge.has(df(e))?"y":"x"}function eL(e){return Z3(Uu(e))}function Xge(e,t,n){n===void 0&&(n=!1);const r=By(e),o=eL(e),i=J3(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=CE(a)),[a,CE(a)]}function Qge(e){const t=CE(e);return[NI(e),t,NI(t)]}function NI(e){return e.replace(/start|end/g,t=>Kge[t])}const DF=["left","right"],LF=["right","left"],Zge=["top","bottom"],Jge=["bottom","top"];function eve(e,t,n){switch(e){case"top":case"bottom":return n?t?LF:DF:t?DF:LF;case"left":case"right":return t?Zge:Jge;default:return[]}}function tve(e,t,n,r){const o=By(e);let i=eve(df(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(NI)))),i}function CE(e){return e.replace(/left|right|bottom|top/g,t=>Gge[t])}function nve(e){return{top:0,right:0,bottom:0,left:0,...e}}function $Y(e){return typeof e!="number"?nve(e):{top:e,right:e,bottom:e,left:e}}function OE(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $F(e,t,n){let{reference:r,floating:o}=e;const i=Uu(t),a=eL(t),s=J3(a),l=df(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(By(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1);break}return p}const rve=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=$F(u,r,l),h=r,p={},x=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=ff(e,t)||{};if(u==null)return{};const d=$Y(c),h={x:n,y:r},p=eL(o),x=J3(p),y=await a.getDimensions(u),w=p==="y",_=w?"top":"left",C=w?"bottom":"right",O=w?"clientHeight":"clientWidth",P=i.reference[x]+i.reference[p]-h[p]-i.floating[x],R=h[p]-i.reference[p],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=T?T[O]:0;(!k||!await(a.isElement==null?void 0:a.isElement(T)))&&(k=s.floating[O]||i.floating[x]);const M=P/2-R/2,j=k/2-y[x]/2-1,$=Kd(d[_],j),L=Kd(d[C],j),K=$,H=k-y[x]-L,D=k/2-y[x]/2+M,W=kI(K,D,H),q=!l.arrow&&By(o)!=null&&D!==W&&i.reference[x]/2-(DD<=0)){var L,K;const D=(((L=i.flip)==null?void 0:L.index)||0)+1,W=k[D];if(W&&(!(d==="alignment"?C!==Uu(W):!1)||$.every(U=>Uu(U.placement)===C?U.overflows[0]>0:!0)))return{data:{index:D,overflows:$},reset:{placement:W}};let q=(K=$.filter(Y=>Y.overflows[0]<=0).sort((Y,U)=>Y.overflows[1]-U.overflows[1])[0])==null?void 0:K.placement;if(!q)switch(p){case"bestFit":{var H;const Y=(H=$.filter(U=>{if(T){const V=Uu(U.placement);return V===C||V==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(V=>V>0).reduce((V,G)=>V+G,0)]).sort((U,V)=>U[1]-V[1])[0])==null?void 0:H[0];Y&&(q=Y);break}case"initialPlacement":q=s;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function FF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BF(e){return Hge.some(t=>e[t]>=0)}const ave=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ff(e,t);switch(r){case"referenceHidden":{const i=await Lw(t,{...o,elementContext:"reference"}),a=FF(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:BF(a)}}}case"escaped":{const i=await Lw(t,{...o,altBoundary:!0}),a=FF(i,n.floating);return{data:{escapedOffsets:a,escaped:BF(a)}}}default:return{}}}}},FY=new Set(["left","top"]);async function sve(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=df(n),s=By(n),l=Uu(n)==="y",u=FY.has(a)?-1:1,c=i&&l?-1:1,d=ff(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof x=="number"&&(p=s==="end"?x*-1:x),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const lve=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await sve(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},uve=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:_,y:C}=w;return{x:_,y:C}}},...l}=ff(e,t),u={x:n,y:r},c=await Lw(t,l),d=Uu(df(o)),h=Z3(d);let p=u[h],x=u[d];if(i){const w=h==="y"?"top":"left",_=h==="y"?"bottom":"right",C=p+c[w],O=p-c[_];p=kI(C,p,O)}if(a){const w=d==="y"?"top":"left",_=d==="y"?"bottom":"right",C=x+c[w],O=x-c[_];x=kI(C,x,O)}const y=s.fn({...t,[h]:p,[d]:x});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[d]:a}}}}}},cve=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=ff(e,t),c={x:n,y:r},d=Uu(o),h=Z3(d);let p=c[h],x=c[d];const y=ff(s,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const O=h==="y"?"height":"width",P=i.reference[h]-i.floating[O]+w.mainAxis,R=i.reference[h]+i.reference[O]-w.mainAxis;pR&&(p=R)}if(u){var _,C;const O=h==="y"?"width":"height",P=FY.has(df(o)),R=i.reference[d]-i.floating[O]+(P&&((_=a.offset)==null?void 0:_[d])||0)+(P?0:w.crossAxis),T=i.reference[d]+i.reference[O]+(P?0:((C=a.offset)==null?void 0:C[d])||0)-(P?w.crossAxis:0);xT&&(x=T)}return{[h]:p,[d]:x}}}},fve=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=ff(e,t),c=await Lw(t,u),d=df(o),h=By(o),p=Uu(o)==="y",{width:x,height:y}=i.floating;let w,_;d==="top"||d==="bottom"?(w=d,_=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(_=d,w=h==="end"?"top":"bottom");const C=y-c.top-c.bottom,O=x-c.left-c.right,P=Kd(y-c[w],C),R=Kd(x-c[_],O),T=!t.middlewareData.shift;let k=P,M=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=C),T&&!h){const $=os(c.left,0),L=os(c.right,0),K=os(c.top,0),H=os(c.bottom,0);p?M=x-2*($!==0||L!==0?$+L:os(c.left,c.right)):k=y-2*(K!==0||H!==0?K+H:os(c.top,c.bottom))}await l({...t,availableWidth:M,availableHeight:k});const j=await a.getDimensions(s.floating);return x!==j.width||y!==j.height?{reset:{rects:!0}}:{}}}};function qO(){return typeof window<"u"}function zy(e){return BY(e)?(e.nodeName||"").toLowerCase():"#document"}function ss(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oc(e){var t;return(t=(BY(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function BY(e){return qO()?e instanceof Node||e instanceof ss(e).Node:!1}function $l(e){return qO()?e instanceof Element||e instanceof ss(e).Element:!1}function Qu(e){return qO()?e instanceof HTMLElement||e instanceof ss(e).HTMLElement:!1}function zF(e){return!qO()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ss(e).ShadowRoot}const dve=new Set(["inline","contents"]);function eb(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dve.has(o)}const hve=new Set(["table","td","th"]);function pve(e){return hve.has(zy(e))}const mve=[":popover-open",":modal"];function UO(e){return mve.some(t=>{try{return e.matches(t)}catch{return!1}})}const gve=["transform","translate","scale","rotate","perspective"],vve=["transform","translate","scale","rotate","perspective","filter"],yve=["paint","layout","strict","content"];function tL(e){const t=nL(),n=$l(e)?Fl(e):e;return gve.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vve.some(r=>(n.willChange||"").includes(r))||yve.some(r=>(n.contain||"").includes(r))}function wve(e){let t=Yd(e);for(;Qu(t)&&!Xv(t);){if(tL(t))return t;if(UO(t))return null;t=Yd(t)}return null}function nL(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xve=new Set(["html","body","#document"]);function Xv(e){return xve.has(zy(e))}function Fl(e){return ss(e).getComputedStyle(e)}function VO(e){return $l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yd(e){if(zy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zF(e)&&e.host||oc(e);return zF(t)?t.host:t}function zY(e){const t=Yd(e);return Xv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qu(t)&&eb(t)?t:zY(t)}function $w(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zY(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ss(o);if(i){const s=MI(a);return t.concat(a,a.visualViewport||[],eb(o)?o:[],s&&n?$w(s):[])}return t.concat(o,$w(o,[],n))}function MI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qY(e){const t=Fl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qu(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=EE(n)!==i||EE(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function rL(e){return $l(e)?e:e.contextElement}function wv(e){const t=rL(e);if(!Qu(t))return Hu(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=qY(t);let a=(i?EE(n.width):n.width)/r,s=(i?EE(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const bve=Hu(0);function UY(e){const t=ss(e);return!nL()||!t.visualViewport?bve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ss(e)?!1:t}function Jp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=rL(e);let a=Hu(1);t&&(r?$l(r)&&(a=wv(r)):a=wv(e));const s=Sve(i,n,r)?UY(i):Hu(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const h=ss(i),p=r&&$l(r)?ss(r):r;let x=h,y=MI(x);for(;y&&r&&p!==x;){const w=wv(y),_=y.getBoundingClientRect(),C=Fl(y),O=_.left+(y.clientLeft+parseFloat(C.paddingLeft))*w.x,P=_.top+(y.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=O,u+=P,x=ss(y),y=MI(x)}}return OE({width:c,height:d,x:l,y:u})}function oL(e,t){const n=VO(e).scrollLeft;return t?t.left+n:Jp(oc(e)).left+n}function VY(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:oL(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function _ve(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=oc(r),s=t?UO(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Hu(1);const c=Hu(0),d=Qu(r);if((d||!d&&!i)&&((zy(r)!=="body"||eb(a))&&(l=VO(r)),Qu(r))){const p=Jp(r);u=wv(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=a&&!d&&!i?VY(a,l,!0):Hu(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Eve(e){return Array.from(e.getClientRects())}function Cve(e){const t=oc(e),n=VO(e),r=e.ownerDocument.body,o=os(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=os(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oL(e);const s=-n.scrollTop;return Fl(r).direction==="rtl"&&(a+=os(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Ove(e,t){const n=ss(e),r=oc(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=nL();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}const Rve=new Set(["absolute","fixed"]);function Pve(e,t){const n=Jp(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Qu(e)?wv(e):Hu(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function qF(e,t,n){let r;if(t==="viewport")r=Ove(e,n);else if(t==="document")r=Cve(oc(e));else if($l(t))r=Pve(t,n);else{const o=UY(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return OE(r)}function WY(e,t){const n=Yd(e);return n===t||!$l(n)||Xv(n)?!1:Fl(n).position==="fixed"||WY(n,t)}function Tve(e,t){const n=t.get(e);if(n)return n;let r=$w(e,[],!1).filter(s=>$l(s)&&zy(s)!=="body"),o=null;const i=Fl(e).position==="fixed";let a=i?Yd(e):e;for(;$l(a)&&!Xv(a);){const s=Fl(a),l=tL(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&Rve.has(o.position)||eb(a)&&!l&&WY(e,a))?r=r.filter(c=>c!==a):o=s,a=Yd(a)}return t.set(e,r),r}function Ave(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?UO(t)?[]:Tve(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=qF(t,c,o);return u.top=os(d.top,u.top),u.right=Kd(d.right,u.right),u.bottom=Kd(d.bottom,u.bottom),u.left=os(d.left,u.left),u},qF(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kve(e){const{width:t,height:n}=qY(e);return{width:t,height:n}}function Nve(e,t,n){const r=Qu(t),o=oc(t),i=n==="fixed",a=Jp(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hu(0);function u(){l.x=oL(o)}if(r||!r&&!i)if((zy(t)!=="body"||eb(o))&&(s=VO(t)),r){const p=Jp(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=o&&!r&&!i?VY(o,s):Hu(0),d=a.left+s.scrollLeft-l.x-c.x,h=a.top+s.scrollTop-l.y-c.y;return{x:d,y:h,width:a.width,height:a.height}}function w2(e){return Fl(e).position==="static"}function UF(e,t){if(!Qu(e)||Fl(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oc(e)===n&&(n=n.ownerDocument.body),n}function HY(e,t){const n=ss(e);if(UO(e))return n;if(!Qu(e)){let o=Yd(e);for(;o&&!Xv(o);){if($l(o)&&!w2(o))return o;o=Yd(o)}return n}let r=UF(e,t);for(;r&&pve(r)&&w2(r);)r=UF(r,t);return r&&Xv(r)&&w2(r)&&!tL(r)?n:r||wve(e)||n}const Mve=async function(e){const t=this.getOffsetParent||HY,n=this.getDimensions,r=await n(e.floating);return{reference:Nve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jve(e){return Fl(e).direction==="rtl"}const Ive={convertOffsetParentRelativeRectToViewportRelativeRect:_ve,getDocumentElement:oc,getClippingRect:Ave,getOffsetParent:HY,getElementRects:Mve,getClientRects:Eve,getDimensions:kve,getScale:wv,isElement:$l,isRTL:jve};function GY(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dve(e,t){let n=null,r;const o=oc(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(s||t(),!h||!p)return;const x=a_(d),y=a_(o.clientWidth-(c+h)),w=a_(o.clientHeight-(d+p)),_=a_(c),O={rootMargin:-x+"px "+-y+"px "+-w+"px "+-_+"px",threshold:os(0,Kd(1,l))||1};let P=!0;function R(T){const k=T[0].intersectionRatio;if(k!==l){if(!P)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!GY(u,e.getBoundingClientRect())&&a(),P=!1}try{n=new IntersectionObserver(R,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,O)}n.observe(e)}return a(!0),i}function Lve(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=rL(e),c=o||i?[...u?$w(u):[],...$w(t)]:[];c.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const d=u&&s?Dve(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(_=>{let[C]=_;C&&C.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var O;(O=p)==null||O.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let x,y=l?Jp(e):null;l&&w();function w(){const _=Jp(e);y&&!GY(y,_)&&n(),y=_,x=requestAnimationFrame(w)}return n(),()=>{var _;c.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),d==null||d(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(x)}}const $ve=lve,Fve=uve,Bve=ive,zve=fve,qve=ave,VF=ove,Uve=cve,Vve=(e,t,n)=>{const r=new Map,o={platform:Ive,...n},i={...o.platform,_c:r};return rve(e,t,{...o,platform:i})};var Wve=typeof document<"u",Hve=function(){},rE=Wve?b.useLayoutEffect:Hve;function RE(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!RE(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!RE(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function KY(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WF(e,t){const n=KY(e);return Math.round(t*n)/n}function x2(e){const t=b.useRef(e);return rE(()=>{t.current=e}),t}function Gve(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=b.useState(r);RE(h,r)||p(r);const[x,y]=b.useState(null),[w,_]=b.useState(null),C=b.useCallback(U=>{U!==T.current&&(T.current=U,y(U))},[]),O=b.useCallback(U=>{U!==k.current&&(k.current=U,_(U))},[]),P=i||x,R=a||w,T=b.useRef(null),k=b.useRef(null),M=b.useRef(c),j=l!=null,$=x2(l),L=x2(o),K=x2(u),H=b.useCallback(()=>{if(!T.current||!k.current)return;const U={placement:t,strategy:n,middleware:h};L.current&&(U.platform=L.current),Vve(T.current,k.current,U).then(V=>{const G={...V,isPositioned:K.current!==!1};D.current&&!RE(M.current,G)&&(M.current=G,Vs.flushSync(()=>{d(G)}))})},[h,t,n,L,K]);rE(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[u]);const D=b.useRef(!1);rE(()=>(D.current=!0,()=>{D.current=!1}),[]),rE(()=>{if(P&&(T.current=P),R&&(k.current=R),P&&R){if($.current)return $.current(P,R,H);H()}},[P,R,H,$,j]);const W=b.useMemo(()=>({reference:T,floating:k,setReference:C,setFloating:O}),[C,O]),q=b.useMemo(()=>({reference:P,floating:R}),[P,R]),Y=b.useMemo(()=>{const U={position:n,left:0,top:0};if(!q.floating)return U;const V=WF(q.floating,c.x),G=WF(q.floating,c.y);return s?{...U,transform:"translate("+V+"px, "+G+"px)",...KY(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:G}},[n,s,q.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:H,refs:W,elements:q,floatingStyles:Y}),[c,H,W,q,Y])}const Kve=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?VF({element:r.current,padding:o}).fn(n):{}:r?VF({element:r,padding:o}).fn(n):{}}}},Yve=(e,t)=>({...$ve(e),options:[e,t]}),Xve=(e,t)=>({...Fve(e),options:[e,t]}),Qve=(e,t)=>({...Uve(e),options:[e,t]}),Zve=(e,t)=>({...Bve(e),options:[e,t]}),Jve=(e,t)=>({...zve(e),options:[e,t]}),eye=(e,t)=>({...qve(e),options:[e,t]}),tye=(e,t)=>({...Kve(e),options:[e,t]});var nye="Arrow",YY=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return v.jsx(Jt.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});YY.displayName=nye;var rye=YY;function XY(e){const[t,n]=b.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var iL="Popper",[QY,ic]=fs(iL),[oye,ZY]=QY(iL),JY=e=>{const{__scopePopper:t,children:n}=e,[r,o]=b.useState(null);return v.jsx(oye,{scope:t,anchor:r,onAnchorChange:o,children:n})};JY.displayName=iL;var eX="PopperAnchor",tX=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=ZY(eX,n),a=b.useRef(null),s=zn(t,a),l=b.useRef(null);return b.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:v.jsx(Jt.div,{...o,ref:s})});tX.displayName=eX;var aL="PopperContent",[iye,aye]=QY(aL),nX=b.forwardRef((e,t)=>{var we,de,se,ye,Te,ge;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:x,...y}=e,w=ZY(aL,n),[_,C]=b.useState(null),O=zn(t,Be=>C(Be)),[P,R]=b.useState(null),T=XY(P),k=(T==null?void 0:T.width)??0,M=(T==null?void 0:T.height)??0,j=r+(i!=="center"?"-"+i:""),$=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],K=L.length>0,H={padding:$,boundary:L.filter(lye),altBoundary:K},{refs:D,floatingStyles:W,placement:q,isPositioned:Y,middlewareData:U}=Gve({strategy:"fixed",placement:j,whileElementsMounted:(...Be)=>Lve(...Be,{animationFrame:p==="always"}),elements:{reference:w.anchor},middleware:[Yve({mainAxis:o+M,alignmentAxis:a}),l&&Xve({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Qve():void 0,...H}),l&&Zve({...H}),Jve({...H,apply:({elements:Be,rects:Ie,availableWidth:Ve,availableHeight:ht})=>{const{width:lt,height:Ye}=Ie.reference,Kt=Be.floating.style;Kt.setProperty("--radix-popper-available-width",`${Ve}px`),Kt.setProperty("--radix-popper-available-height",`${ht}px`),Kt.setProperty("--radix-popper-anchor-width",`${lt}px`),Kt.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),P&&tye({element:P,padding:s}),uye({arrowWidth:k,arrowHeight:M}),h&&eye({strategy:"referenceHidden",...H})]}),[V,G]=iX(q),z=Ji(x);ii(()=>{Y&&(z==null||z())},[Y,z]);const X=(we=U.arrow)==null?void 0:we.x,ee=(de=U.arrow)==null?void 0:de.y,ae=((se=U.arrow)==null?void 0:se.centerOffset)!==0,[fe,ie]=b.useState();return ii(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:Y?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(ye=U.transformOrigin)==null?void 0:ye.x,(Te=U.transformOrigin)==null?void 0:Te.y].join(" "),...((ge=U.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(iye,{scope:n,placedSide:V,onArrowChange:R,arrowX:X,arrowY:ee,shouldHideArrow:ae,children:v.jsx(Jt.div,{"data-side":V,"data-align":G,...y,ref:O,style:{...y.style,animation:Y?void 0:"none"}})})})});nX.displayName=aL;var rX="PopperArrow",sye={top:"bottom",right:"left",bottom:"top",left:"right"},oX=b.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=aye(rX,r),a=sye[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(rye,{...o,ref:n,style:{...o.style,display:"block"}})})});oX.displayName=rX;function lye(e){return e!==null}var uye=e=>({name:"transformOrigin",options:e,fn(t){var w,_,C;const{placement:n,rects:r,middlewareData:o}=t,a=((w=o.arrow)==null?void 0:w.centerOffset)!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,c]=iX(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(((_=o.arrow)==null?void 0:_.x)??0)+s/2,p=(((C=o.arrow)==null?void 0:C.y)??0)+l/2;let x="",y="";return u==="bottom"?(x=a?d:`${h}px`,y=`${-l}px`):u==="top"?(x=a?d:`${h}px`,y=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,y=a?d:`${p}px`):u==="left"&&(x=`${r.floating.width+l}px`,y=a?d:`${p}px`),{data:{x,y}}}});function iX(e){const[t,n="center"]=e.split("-");return[t,n]}var qy=JY,Uy=tX,tb=nX,nb=oX,cye="Portal",bm=b.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=b.useState(!1);ii(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?MY.createPortal(v.jsx(Jt.div,{...r,ref:t}),a):null});bm.displayName=cye;function fye(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ji=e=>{const{present:t,children:n}=e,r=dye(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=zn(r.ref,hye(o));return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};ji.displayName="Presence";function dye(e){const[t,n]=b.useState(),r=b.useRef(null),o=b.useRef(e),i=b.useRef("none"),a=e?"mounted":"unmounted",[s,l]=fye(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=s_(r.current);i.current=s==="mounted"?u:"none"},[s]),ii(()=>{const u=r.current,c=o.current;if(c!==e){const h=i.current,p=s_(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ii(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=p=>{const y=s_(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(l("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=p=>{p.target===t&&(i.current=s_(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function s_(e){return(e==null?void 0:e.animationName)||"none"}function hye(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pye=IO[" useInsertionEffect ".trim().toString()]||ii;function Ws({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=mye({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const c=b.useRef(e!==void 0);b.useEffect(()=>{const d=c.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,r])}const u=b.useCallback(c=>{var d;if(s){const h=gye(c)?c(e):c;h!==e&&((d=a.current)==null||d.call(a,h))}else i(c)},[s,e,i,a]);return[l,u]}function mye({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),o=b.useRef(n),i=b.useRef(t);return pye(()=>{i.current=t},[t]),b.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function gye(e){return typeof e=="function"}var aX=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),vye="VisuallyHidden",WO=b.forwardRef((e,t)=>v.jsx(Jt.span,{...e,ref:t,style:{...aX,...e.style}}));WO.displayName=vye;var yye=WO,[HO]=fs("Tooltip",[ic]),GO=ic(),sX="TooltipProvider",wye=700,jI="tooltip.open",[xye,sL]=HO(sX),lX=e=>{const{__scopeTooltip:t,delayDuration:n=wye,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=b.useRef(!0),s=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),v.jsx(xye,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:i})};lX.displayName=sX;var Fw="Tooltip",[bye,rb]=HO(Fw),uX=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=sL(Fw,e.__scopeTooltip),u=GO(t),[c,d]=b.useState(null),h=Ta(),p=b.useRef(0),x=a??l.disableHoverableContent,y=s??l.delayDuration,w=b.useRef(!1),[_,C]=Ws({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(jI))):l.onClose(),i==null||i(k)},caller:Fw}),O=b.useMemo(()=>_?w.current?"delayed-open":"instant-open":"closed",[_]),P=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w.current=!1,C(!0)},[C]),R=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,C(!1)},[C]),T=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{w.current=!0,C(!0),p.current=0},y)},[y,C]);return b.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),v.jsx(qy,{...u,children:v.jsx(bye,{scope:t,contentId:h,open:_,stateAttribute:O,trigger:c,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?T():P()},[l.isOpenDelayedRef,T,P]),onTriggerLeave:b.useCallback(()=>{x?R():(window.clearTimeout(p.current),p.current=0)},[R,x]),onOpen:P,onClose:R,disableHoverableContent:x,children:n})})};uX.displayName=Fw;var II="TooltipTrigger",cX=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rb(II,n),i=sL(II,n),a=GO(n),s=b.useRef(null),l=zn(t,s,o.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),v.jsx(Uy,{asChild:!0,...a,children:v.jsx(Jt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Je(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:Je(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:Je(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Je(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Je(e.onBlur,o.onClose),onClick:Je(e.onClick,o.onClose)})})});cX.displayName=II;var lL="TooltipPortal",[Sye,_ye]=HO(lL,{forceMount:void 0}),fX=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=rb(lL,t);return v.jsx(Sye,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(bm,{asChild:!0,container:o,children:r})})})};fX.displayName=lL;var Qv="TooltipContent",dX=b.forwardRef((e,t)=>{const n=_ye(Qv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=rb(Qv,e.__scopeTooltip);return v.jsx(ji,{present:r||a.open,children:a.disableHoverableContent?v.jsx(hX,{side:o,...i,ref:t}):v.jsx(Eye,{side:o,...i,ref:t})})}),Eye=b.forwardRef((e,t)=>{const n=rb(Qv,e.__scopeTooltip),r=sL(Qv,e.__scopeTooltip),o=b.useRef(null),i=zn(t,o),[a,s]=b.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((x,y)=>{const w=x.currentTarget,_={x:x.clientX,y:x.clientY},C=Tye(_,w.getBoundingClientRect()),O=Aye(_,C),P=kye(y.getBoundingClientRect()),R=Mye([...O,...P]);s(R),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&c){const x=w=>p(w,c),y=w=>p(w,l);return l.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[l,c,p,h]),b.useEffect(()=>{if(a){const x=y=>{const w=y.target,_={x:y.clientX,y:y.clientY},C=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),O=!Nye(_,a);C?h():O&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,c,a,u,h]),v.jsx(hX,{...e,ref:i})}),[Cye,Oye]=HO(Fw,{isInside:!1}),Rye=Age("TooltipContent"),hX=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=rb(Qv,n),u=GO(n),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(jI,c),()=>document.removeEventListener(jI,c)),[c]),b.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),v.jsx(th,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:v.jsxs(tb,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(Rye,{children:r}),v.jsx(Cye,{scope:n,isInside:!0,children:v.jsx(yye,{id:l.contentId,role:"tooltip",children:o||r})})]})})});dX.displayName=Qv;var pX="TooltipArrow",Pye=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=GO(n);return Oye(pX,n).isInside?null:v.jsx(nb,{...o,...r,ref:t})});Pye.displayName=pX;function Tye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Aye(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function kye(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Nye(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;ir!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}function Mye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),jye(t)}function jye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Iye=lX,Dye=uX,Lye=cX,$ye=fX,mX=dX;const Bl=Iye,zl=Dye,ql=Lye,Hs=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx($ye,{children:v.jsx(mX,{ref:r,sideOffset:t,className:je("z-[300] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),avoidCollisions:!0,collisionPadding:8,...n})}));Hs.displayName=mX.displayName;var Fye=Symbol.for("react.lazy"),PE=IO[" use ".trim().toString()];function Bye(e){return typeof e=="object"&&e!==null&&"then"in e}function gX(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Fye&&"_payload"in e&&Bye(e._payload)}function vX(e){const t=qye(e),n=b.forwardRef((r,o)=>{let{children:i,...a}=r;gX(i)&&typeof PE=="function"&&(i=PE(i._payload));const s=b.Children.toArray(i),l=s.find(Wye);if(l){const u=l.props.children,c=s.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return v.jsx(t,{...a,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var zye=vX("Slot");function qye(e){const t=b.forwardRef((n,r)=>{let{children:o,...i}=n;if(gX(o)&&typeof PE=="function"&&(o=PE(o._payload)),b.isValidElement(o)){const a=Gye(o),s=Hye(i,o.props);return o.type!==b.Fragment&&(s.ref=r?Jx(r,a):a),b.cloneElement(o,s)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yX=Symbol("radix.slottable");function Uye(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=yX,t}var Vye=Uye("Slottable");function Wye(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yX}function Hye(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Gye(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const DI=Hl("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",{variants:{size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9",xs:""},variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",icon:"hover:bg-accent hover:text-accent-foreground p-1",cta:"bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 border px-3"}},defaultVariants:{variant:"default",size:"default"}}),xt=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,hoverText:o=void 0,hoverTextSide:i="top",leftIcon:a,rightIcon:s,fullWidth:l,children:u,...c},d)=>{const h=r?zye:"button",p=je(a&&n!=="icon"&&"pl-3",s&&n!=="icon"&&"pr-3"),x=l?"w-full":"";return v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsxs(h,{className:je(DI({variant:t,size:n,className:e}),p,x),ref:d,...c,children:[a&&v.jsx("span",{className:"-ml-1 mr-2",children:a}),v.jsx(Vye,{children:u}),s&&v.jsx("span",{className:"-mr-1 ml-2",children:s})]})}),o&&v.jsx(Hs,{side:i,children:o})]})})});xt.displayName="Button";const xv=new WeakMap,oE=new WeakMap,TE={current:[]};let b2=!1,pw=0;const tw=new Set,l_=new Map;function wX(e){const t=Array.from(e).sort((n,r)=>n instanceof bv&&n.options.deps.includes(r)?1:r instanceof bv&&r.options.deps.includes(n)?-1:0);for(const n of t){if(TE.current.includes(n))continue;TE.current.push(n),n.recompute();const r=oE.get(n);if(r)for(const o of r){const i=xv.get(o);i&&wX(i)}}}function Kye(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Yye(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function xX(e){if(pw>0&&!l_.has(e)&&l_.set(e,e.prevState),tw.add(e),!(pw>0)&&!b2)try{for(b2=!0;tw.size>0;){const t=Array.from(tw);tw.clear();for(const n of t){const r=l_.get(n)??n.prevState;n.prevState=r,Kye(n)}for(const n of t){const r=xv.get(n);r&&(TE.current.push(n),wX(r))}for(const n of t){const r=xv.get(n);if(r)for(const o of r)Yye(o)}}}finally{b2=!1,TE.current=[],l_.clear()}}function mw(e){pw++;try{e()}finally{if(pw--,pw===0){const t=tw.values().next().value;t&&xX(t)}}}function Xye(e){return typeof e=="function"}class LI{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var o,i;this.listeners.add(r);const a=(i=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:i.call(o,r,this);return()=>{this.listeners.delete(r),a==null||a()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,o;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):Xye(t)?this.state=t(this.prevState):this.state=t,(o=(r=this.options)==null?void 0:r.onUpdate)==null||o.call(r),xX(this)}}class bv{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),o=new Array(n);for(let i=0;i{var n,r;this.prevState=this.state;const o=this.getDepVals();this.state=this.options.fn(o),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof bv&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:o}=this.getDepVals();for(let i=0;i(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,o;this.listeners.add(n);const i=(o=(r=this.options).onSubscribe)==null?void 0:o.call(r,n,this);return()=>{this.listeners.delete(n),i==null||i()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof bv)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof LI){let r=xv.get(n);r||(r=new Set,xv.set(n,r)),r.add(this);let o=oE.get(this);o||(o=new Set,oE.set(this,o)),o.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof bv)this.unregisterFromGraph(n.options.deps);else if(n instanceof LI){const r=xv.get(n);r&&r.delete(this);const o=oE.get(this);o&&o.delete(n)}}}const Bd="__TSR_index",HF="popstate",GF="beforeunload";function Qye(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(s=>s({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},i=async({task:a,navigateOpts:s,...l})=>{var h,p;if((s==null?void 0:s.ignoreBlocker)??!1){a();return}const c=((h=e.getBlockers)==null?void 0:h.call(e))??[],d=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&d)for(const x of c){const y=AE(l.path,l.state);if(await x.blockerFn({currentLocation:t,nextLocation:y,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,s,l)=>{const u=t.state[Bd];s=KF(u+1,s),i({task:()=>{e.pushState(a,s),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:s})},replace:(a,s,l)=>{const u=t.state[Bd];s=KF(u,s),i({task:()=>{e.replaceState(a,s),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:s})},go:(a,s)=>{i({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:s,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Bd]!==0,createHref:a=>e.createHref(a),block:a=>{var l;if(!e.setBlockers)return()=>{};const s=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...s,a]),()=>{var c,d;const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];(d=e.setBlockers)==null||d.call(e,u.filter(h=>h!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function KF(e,t){t||(t={});const n=uL();return{...t,key:n,__TSR_key:n,[Bd]:e}}function Zye(e){var M,j;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const i=()=>o,a=$=>o=$,s=($=>$),l=(()=>AE(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((j=t.history.state)!=null&&j.key)){const $=uL();t.history.replaceState({[Bd]:0,key:$,__TSR_key:$},"")}let u=l(),c,d=!1,h=!1,p=!1,x=!1;const y=()=>u;let w,_;const C=()=>{w&&(k._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),k._ignoreSubscribers=!1,w=void 0,_=void 0,c=void 0)},O=($,L,K)=>{const H=s(L);_||(c=u),u=AE(L,K),w={href:H,state:K,isPush:(w==null?void 0:w.isPush)||$==="push"},_||(_=Promise.resolve().then(()=>C()))},P=$=>{u=l(),k.notify({type:$})},R=async()=>{if(h){h=!1;return}const $=l(),L=$.state[Bd]-u.state[Bd],K=L===1,H=L===-1,D=!K&&!H||d;d=!1;const W=D?"GO":H?"BACK":"FORWARD",q=D?{type:"GO",index:L}:{type:H?"BACK":"FORWARD"};if(p)p=!1;else{const Y=i();if(typeof document<"u"&&Y.length){for(const U of Y)if(await U.blockerFn({currentLocation:u,nextLocation:$,action:W})){h=!0,t.history.go(1),k.notify(q);return}}}u=l(),k.notify(q)},T=$=>{if(x){x=!1;return}let L=!1;const K=i();if(typeof document<"u"&&K.length)for(const H of K){const D=H.enableBeforeUnload??!0;if(D===!0){L=!0;break}if(typeof D=="function"&&D()===!0){L=!0;break}}if(L)return $.preventDefault(),$.returnValue=""},k=Qye({getLocation:y,getLength:()=>t.history.length,pushState:($,L)=>O("push",$,L),replaceState:($,L)=>O("replace",$,L),back:$=>($&&(p=!0),x=!0,t.history.back()),forward:$=>{$&&(p=!0),x=!0,t.history.forward()},go:$=>{d=!0,t.history.go($)},createHref:$=>s($),flush:C,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(GF,T,{capture:!0}),t.removeEventListener(HF,R)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(GF,T,{capture:!0}),t.addEventListener(HF,R),t.history.pushState=function(...$){const L=n.apply(t.history,$);return k._ignoreSubscribers||P("PUSH"),L},t.history.replaceState=function(...$){const L=r.apply(t.history,$);return k._ignoreSubscribers||P("REPLACE"),L},k}function AE(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),o=uL();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Bd]:0,key:o,__TSR_key:o}}}function uL(){return(Math.random()+1).toString(36).substring(7)}function kE(e){return e[e.length-1]}function Jye(e){return typeof e=="function"}function Nd(e,t){return Jye(e)?e(t):e}const e0e=Object.prototype.hasOwnProperty;function Ns(e,t){if(e===t)return e;const n=t,r=QF(e)&&QF(n);if(!r&&!(NE(e)&&NE(n)))return n;const o=r?e:YF(e);if(!o)return n;const i=r?n:YF(n);if(!i)return n;const a=o.length,s=i.length,l=r?new Array(s):{};let u=0;for(let c=0;c"u")return!0;const n=t.prototype;return!(!XF(n)||!n.hasOwnProperty("isPrototypeOf"))}function XF(e){return Object.prototype.toString.call(e)==="[object Object]"}function QF(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qp(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;ro||!qp(e[a],t[a],n)))return!1;return o===i}return!1}function Zv(e){let t,n;const r=new Promise((o,i)=>{t=o,n=i});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e==null||e(o)},r.reject=o=>{r.status="rejected",n(o)},r}function t0e(e){return typeof(e==null?void 0:e.message)!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function zd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ZF(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function JF(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,o="",i;for(;(i=n.exec(e))!==null;)o+=ZF(e.slice(r,i.index))+i[0],r=n.lastIndex;return o+ZF(r?e.slice(r):e)}var n0e="Invariant failed";function Cr(e,t){if(!e)throw new Error(n0e)}function ME(e){const t=new Map;let n,r;const o=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=t.get(i);if(a)return o(a),a.value},set(i,a){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const s=t.get(i);if(s)s.value=a,o(s);else{const l={key:i,value:a,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(i,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const Jv=0,em=1,tm=2,Bw=3,r0e=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,o0e=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,i0e=/^([^{]*)\{\$\}([^}]*)$/;function cL(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,i=e.substring(t,o);if(!i||!i.includes("$"))return n[0]=Jv,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(i==="$"){const u=e.length;return n[0]=tm,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(i.charCodeAt(0)===36)return n[0]=em,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=i.match(i0e);if(a){const c=a[1].length;return n[0]=tm,n[1]=t+c,n[2]=t+c+1,n[3]=t+c+2,n[4]=t+c+3,n[5]=e.length,n}const s=i.match(o0e);if(s){const u=s[1],c=s[2],d=s[3],h=u.length;return n[0]=Bw,n[1]=t+h,n[2]=t+h+3,n[3]=t+h+3+c.length,n[4]=o-d.length,n[5]=o,n}const l=i.match(r0e);if(l){const u=l[1],c=l[2],d=l[3],h=u.length;return n[0]=em,n[1]=t+h,n[2]=t+h+2,n[3]=t+h+2+c.length,n[4]=o-d.length,n[5]=o,n}return n[0]=Jv,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function KO(e,t,n,r,o,i,a){var l,u,c,d,h;a==null||a(n);let s=r;{const p=n.fullPath??n.from,x=p.length,y=((l=n.options)==null?void 0:l.caseSensitive)??e;for(;sL.caseSensitive===k&&L.prefix===M&&L.suffix===j);if($)_=$;else{const L=_2(em,n.fullPath??n.from,k,M,j);_=L,L.depth=i,L.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(L)}break}case Bw:{const R=p.substring(C,w[1]),T=p.substring(w[4],O),k=y&&!!(R||T),M=R?k?R:R.toLowerCase():void 0,j=T?k?T:T.toLowerCase():void 0,$=(h=o.optional)==null?void 0:h.find(L=>L.caseSensitive===k&&L.prefix===M&&L.suffix===j);if($)_=$;else{const L=_2(Bw,n.fullPath??n.from,k,M,j);_=L,L.parent=o,L.depth=i,o.optional??(o.optional=[]),o.optional.push(L)}break}case tm:{const R=p.substring(C,w[1]),T=p.substring(w[4],O),k=y&&!!(R||T),M=R?k?R:R.toLowerCase():void 0,j=T?k?T:T.toLowerCase():void 0,$=_2(tm,n.fullPath??n.from,k,M,j);_=$,$.parent=o,$.depth=i,o.wildcard??(o.wildcard=[]),o.wildcard.push($)}}o=_}if((n.path||!n.children)&&!n.isRoot){const w=p.endsWith("/");w||(o.notFound=n),(!o.route||!o.isIndex&&w)&&(o.route=n,o.fullPath=n.fullPath??n.from),o.isIndex||(o.isIndex=w)}}if(n.children)for(const p of n.children)KO(e,t,p,s,o,i,a)}function S2(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function bp(e){var t,n,r;if(e.static)for(const o of e.static.values())bp(o);if(e.staticInsensitive)for(const o of e.staticInsensitive.values())bp(o);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(S2);for(const o of e.dynamic)bp(o)}if((n=e.optional)!=null&&n.length){e.optional.sort(S2);for(const o of e.optional)bp(o)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(S2);for(const o of e.wildcard)bp(o)}}function zw(e){return{kind:Jv,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function _2(e,t,n,r,o){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:o}}function a0e(e,t){const n=zw("/"),r=new Uint16Array(6);for(const o of e)KO(!1,r,o,1,n,0);bp(n),t.masksTree=n,t.flatCache=ME(1e3)}function s0e(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=fL(e,t.masksTree);return t.flatCache.set(e,r),r}function l0e(e,t,n,r,o){e||(e="/"),r||(r="/");const i=t?`case\0${e}`:e;let a=o.singleCache.get(i);if(!a){a=zw("/");const s=new Uint16Array(6);KO(t,s,{from:e},1,a,0),o.singleCache.set(i,a)}return fL(r,a,n)}function u0e(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||(e="/");const i=fL(e,t.segmentTree,n);return i&&(i.branch=h0e(i.route)),t.matchCache.set(r,i),i}function c0e(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function f0e(e,t=!1,n){const r=zw(e.fullPath),o=new Uint16Array(6),i={},a={};let s=0;return KO(t,o,e,1,r,0,u=>{if(n==null||n(u,s),Cr(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,s!==0&&u.path){const c=c0e(u.fullPath);(!a[c]||u.fullPath.endsWith("/"))&&(a[c]=u)}s++}),bp(r),{processedTree:{segmentTree:r,singleCache:ME(1e3),matchCache:ME(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function fL(e,t,n=!1){const r=e.split("/"),o=m0e(e,r,t,n);if(!o)return null;const i=d0e(e,r,o),a="**"in o;return a&&(i["**"]=o["**"]),{route:a?o.node.notFound??o.node.route:o.node.route,params:i}}function d0e(e,t,n){var a,s,l,u,c,d;const r=p0e(n.node);let o=null;const i={};for(let h=0,p=0,x=0;p=0;M--){const j=h.optional[M];s.push({node:j,index:p,skipped:T,depth:k,statics:w,dynamics:_,optionals:C})}if(!O)for(let M=h.optional.length-1;M>=0;M--){const j=h.optional[M],{prefix:$,suffix:L}=j;if($||L){const K=j.caseSensitive?P:R??(R=P.toLowerCase());if($&&!K.startsWith($)||L&&!K.endsWith(L))continue}s.push({node:j,index:p+1,skipped:x,depth:k,statics:w,dynamics:_,optionals:C+1})}}if(!O&&h.dynamic&&P)for(let T=h.dynamic.length-1;T>=0;T--){const k=h.dynamic[T],{prefix:M,suffix:j}=k;if(M||j){const $=k.caseSensitive?P:R??(R=P.toLowerCase());if(M&&!$.startsWith(M)||j&&!$.endsWith(j))continue}s.push({node:k,index:p+1,skipped:x,depth:y+1,statics:w,dynamics:_+1,optionals:C})}if(!O&&h.staticInsensitive){const T=h.staticInsensitive.get(R??(R=P.toLowerCase()));T&&s.push({node:T,index:p+1,skipped:x,depth:y+1,statics:w+1,dynamics:_,optionals:C})}if(!O&&h.static){const T=h.static.get(P);T&&s.push({node:T,index:p+1,skipped:x,depth:y+1,statics:w+1,dynamics:_,optionals:C})}}if(c&&l)return u_(l,c)?c:l;if(c)return c;if(l)return l;if(r&&u){let d=u.index;for(let p=0;pe.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function iE(e){return dL(e.filter(t=>t!==void 0).join("/"))}function dL(e){return e.replace(/\/{2,}/g,"/")}function bX(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Up(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function aE(e){return Up(bX(e))}function jE(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function g0e(e,t,n){return jE(e,n)===jE(t,n)}function v0e({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),i=!o&&t===".";let a;if(r){a=o?t:i?e:e+"\0"+t;const d=r.get(a);if(d)return d}let s;if(i)s=e.split("/");else if(o)s=t.split("/");else{for(s=e.split("/");s.length>1&&kE(s)==="";)s.pop();const d=t.split("/");for(let h=0,p=d.length;h1&&(kE(s)===""?n==="never"&&s.pop():n==="always"&&s.push(""));let l,u="";for(let d=0;d0&&(u+="/");const h=s[d];if(!h)continue;l=cL(h,0,l);const p=l[0];if(p===Jv){u+=h;continue}const x=l[5],y=h.substring(0,l[1]),w=h.substring(l[4],x),_=h.substring(l[2],l[3]);p===em?u+=y||w?`${y}{$${_}}${w}`:`$${_}`:p===tm?u+=y||w?`${y}{$}${w}`:"$":u+=`${y}{-$${_}}${w}`}u=dL(u);const c=u||"/";return a&&r&&r.set(a,c),c}function E2(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):y0e(r,n)}function C2({path:e,params:t,decodeCharMap:n}){let r=!1;const o={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:r};const i=e.length;let a=0,s,l="";for(;a{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function b0e(){const e=w0e();if(!e)return null;const t=e.getItem(IE);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Nd(r,n)||n,e.setItem(IE,JSON.stringify(n)))}}const c_=b0e(),$I=e=>e.state.__TSR_key||e.href;function S0e(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let DE=!1;function SX({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:i}){var u,c;let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(d){console.error(d);return}const s=t||((u=window.history.state)==null?void 0:u.__TSR_key),l=a[s];DE=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const p in l){const x=l[p];if(p==="window")window.scrollTo({top:x.scrollY,left:x.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=x.scrollX,y.scrollTop=x.scrollY)}}break e}const d=(i??window.location).hash.split("#",2)[1];if(d){const p=((c=window.history.state)==null?void 0:c.__hashScrollIntoViewOptions)??!0;if(p){const x=document.getElementById(d);x&&x.scrollIntoView(p)}break e}const h={top:0,left:0,behavior:n};if(window.scrollTo(h),o)for(const p of o){if(p==="window")continue;const x=typeof p=="function"?p():document.querySelector(p);x&&x.scrollTo(h)}}DE=!1}function _0e(e,t){if(!c_&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!c_))return;e.isScrollRestorationSetup=!0,DE=!1;const r=e.options.getScrollRestorationKey||$I;window.history.scrollRestoration="manual";const o=i=>{if(DE||!e.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const l=i.target.getAttribute("data-scroll-restoration-id");l?a=`[data-scroll-restoration-id="${l}"]`:a=S0e(i.target)}const s=r(e.state.location);c_.set(l=>{const u=l[s]||(l[s]={}),c=u[a]||(u[a]={});if(a==="window")c.scrollX=window.scrollX||0,c.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(c.scrollX=d.scrollLeft||0,c.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",x0e(o,100),!0),e.subscribe("onRendered",i=>{const a=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(SX({storageKey:IE,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&c_.set(s=>(s[a]||(s[a]={}),s)))})}function E0e(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function C0e(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function O2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function O0e(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const i=n[r];i==null?n[r]=O2(o):Array.isArray(i)?i.push(O2(o)):n[r]=[i,O2(o)]}return n}const R0e=T0e(JSON.parse),P0e=A0e(JSON.stringify,JSON.parse);function T0e(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=O0e(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function A0e(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const i=C0e(o,r);return i?`?${i}`:""}}const ts="__root__";function cn(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ml(e){return e instanceof Response&&!!e.options}const sE=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},YO=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),_X=(e,t)=>{var o;const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&((o=e.router.options)!=null&&o.defaultNotFoundComponent)&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Cr(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);Cr(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,_X(e,t))},Md=(e,t,n)=>{var r,o,i;if(!(!Ml(n)&&!Bs(n))){if(Ml(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=t._nonReactive.loaderPromise)==null||o.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=Ml(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:a,isFetching:!1,error:n})),Bs(n)&&!n.routeId&&(n.routeId=t.routeId),(i=t._nonReactive.loadPromise)==null||i.resolve()}throw Ml(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(_X(e,n),n)}},EX=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},C1=(e,t,n,r)=>{var s,l;const{id:o,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Md(e,e.router.getMatch(o),n);try{(l=(s=a.options).onError)==null||l.call(s,n)}catch(u){n=u,Md(e,e.router.getMatch(o),n)}e.updateMatch(o,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},k0e=(e,t,n,r)=>{var p;const o=e.router.getMatch(t),i=(p=e.matches[n-1])==null?void 0:p.id,a=i?e.router.getMatch(i):void 0;if(e.router.isShell()){o.ssr=r.id===ts;return}if((a==null?void 0:a.ssr)===!1){o.ssr=!1;return}const s=x=>x===!0&&(a==null?void 0:a.ssr)==="data-only"?"data-only":x,l=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){o.ssr=s(l);return}if(typeof r.options.ssr!="function"){o.ssr=s(r.options.ssr);return}const{search:u,params:c}=o,d={search:f_(u,o.searchError),params:f_(c,o.paramsError),location:e.location,matches:e.matches.map(x=>({index:x.index,pathname:x.pathname,fullPath:x.fullPath,staticData:x.staticData,id:x.id,routeId:x.routeId,search:f_(x.search,x.searchError),params:f_(x.params,x.paramsError),ssr:x.ssr}))},h=r.options.ssr(d);if(zd(h))return h.then(x=>{o.ssr=s(x??l)});o.ssr=s(h??l)},CX=(e,t,n,r)=>{var a;if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!YO(e,t)&&(n.options.loader||n.options.beforeLoad||PX(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??((a=e.router.options)==null?void 0:a.defaultPendingComponent)))){const s=setTimeout(()=>{sE(e)},o);r._nonReactive.pendingTimeout=s}},N0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;CX(e,t,n,r);const o=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Md(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},M0e=(e,t,n,r)=>{var T;const o=e.router.getMatch(t),i=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Zv(()=>{i==null||i.resolve()});const{paramsError:a,searchError:s}=o;a&&C1(e,n,a,"PARSE_PARAMS"),s&&C1(e,n,s,"VALIDATE_SEARCH"),CX(e,t,r,o);const l=new AbortController,u=(T=e.matches[n-1])==null?void 0:T.id,c=u?e.router.getMatch(u):void 0,d=(c==null?void 0:c.context)??e.router.options.context??void 0;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:l})))},x=()=>{var k;(k=o._nonReactive.beforeLoadPromise)==null||k.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!r.options.beforeLoad){mw(()=>{p(),x()});return}o._nonReactive.beforeLoadPromise=Zv();const{search:y,params:w,cause:_}=o,C=YO(e,t),O={search:y,abortController:l,params:w,preload:C,context:{...d,...c==null?void 0:c.__beforeLoadContext,...o.__routeContext},location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":_,matches:e.matches,...e.router.options.additionalContext},P=k=>{if(k===void 0){mw(()=>{p(),x()});return}(Ml(k)||Bs(k))&&(p(),C1(e,n,k,"BEFORE_LOAD")),mw(()=>{p(),e.updateMatch(t,M=>({...M,__beforeLoadContext:k})),x()})};let R;try{if(R=r.options.beforeLoad(O),zd(R))return p(),R.catch(k=>{C1(e,n,k,"BEFORE_LOAD")}).then(P)}catch(k){p(),C1(e,n,k,"BEFORE_LOAD")}P(R)},j0e=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const l=k0e(e,n,t,o);if(zd(l))return l.then(s)}return s()},a=()=>M0e(e,n,t,o),s=()=>{if(EX(e,n))return;const l=N0e(e,n,o);return zd(l)?l.then(a):a()};return i()},gw=(e,t,n)=>{var i,a,s,l,u,c;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(a=(i=n.options).head)==null?void 0:a.call(i,o),(l=(s=n.options).scripts)==null?void 0:l.call(s,o),(c=(u=n.options).headers)==null?void 0:c.call(u,o)]).then(([d,h,p])=>{const x=d==null?void 0:d.meta,y=d==null?void 0:d.links,w=d==null?void 0:d.scripts,_=d==null?void 0:d.styles;return{meta:x,links:y,headScripts:w,headers:p,scripts:h,styles:_}})},OX=(e,t,n,r)=>{const o=e.matchPromises[n-1],{params:i,loaderDeps:a,abortController:s,cause:l}=e.router.getMatch(t);let u=e.router.options.context??{};for(let d=0;d<=n;d++){const h=e.matches[d];if(!h)continue;const p=e.router.getMatch(h.id);p&&(u={...u,...p.__routeContext??{},...p.__beforeLoadContext??{}})}const c=YO(e,t);return{params:i,deps:a,preload:!!c,parentMatchPromise:o,abortController:s,context:u,location:e.location,navigate:d=>e.router.navigate({...d,_fromLocation:e.location}),cause:c?"preload":l,route:r,...e.router.options.additionalContext}},e7=async(e,t,n,r)=>{var o,i,a,s,l,u;try{const c=e.router.getMatch(t);try{(!e.router.isServer||c.ssr===!0)&&RX(r);const d=(i=(o=r.options).loader)==null?void 0:i.call(o,OX(e,t,n,r)),h=r.options.loader&&zd(d);if(!!(h||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(t,_=>({..._,isFetching:"loader"})),r.options.loader){const _=h?await d:d;Md(e,e.router.getMatch(t),_),_!==void 0&&e.updateMatch(t,C=>({...C,loaderData:_}))}r._lazyPromise&&await r._lazyPromise;const x=gw(e,t,r),y=x?await x:void 0,w=c._nonReactive.minPendingPromise;w&&await w,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,_=>({..._,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...y}))}catch(d){let h=d;const p=c._nonReactive.minPendingPromise;p&&await p,Bs(d)&&await((s=(a=r.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:s.call(a)),Md(e,e.router.getMatch(t),d);try{(u=(l=r.options).onError)==null||u.call(l,d)}catch(w){h=w,Md(e,e.router.getMatch(t),w)}const x=gw(e,t,r),y=x?await x:void 0;e.updateMatch(t,w=>({...w,error:h,status:"error",isFetching:!1,...y}))}}catch(c){const d=e.router.getMatch(t);if(d){const h=gw(e,t,r);if(h){const p=await h;e.updateMatch(t,x=>({...x,...p}))}d._nonReactive.loaderPromise=void 0}Md(e,d,c)}},I0e=async(e,t)=>{var c,d;const{id:n,routeId:r}=e.matches[t];let o=!1,i=!1;const a=e.router.looseRoutesById[r],s=()=>{const h={...e.router.options.context};for(let p=0;p<=t;p++){const x=e.matches[p];if(!x)continue;const y=e.router.getMatch(x.id);y&&Object.assign(h,y.__routeContext,y.__beforeLoadContext)}e.updateMatch(n,p=>({...p,context:h}))};if(EX(e,n)){if(e.router.isServer){const h=gw(e,n,a);if(h){const p=await h;e.updateMatch(n,x=>({...x,...p}))}return e.router.getMatch(n)}}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),x=p._nonReactive.error||p.error;x&&Md(e,p,x)}else{const p=Date.now()-h.updatedAt,x=YO(e,n),y=x?a.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??e.router.options.defaultStaleTime??0,w=a.options.shouldReload,_=typeof w=="function"?w(OX(e,n,t,a)):w,C=!!x&&!e.router.state.matches.some(T=>T.id===n),O=e.router.getMatch(n);O._nonReactive.loaderPromise=Zv(),C!==O.preload&&e.updateMatch(n,T=>({...T,preload:C}));const{status:P,invalid:R}=O;if(o=P==="success"&&(R||(_??p>y)),!(x&&a.options.preload===!1))if(o&&!e.sync)i=!0,(async()=>{var T,k;try{await e7(e,n,t,a),s();const M=e.router.getMatch(n);(T=M._nonReactive.loaderPromise)==null||T.resolve(),(k=M._nonReactive.loadPromise)==null||k.resolve(),M._nonReactive.loaderPromise=void 0}catch(M){Ml(M)&&await e.router.navigate(M.options)}})();else if(P!=="success"||o&&e.sync)await e7(e,n,t,a);else{const T=gw(e,n,a);if(T){const k=await T;e.updateMatch(n,M=>({...M,...k}))}}}}const l=e.router.getMatch(n);i||((c=l._nonReactive.loaderPromise)==null||c.resolve(),(d=l._nonReactive.loadPromise)==null||d.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,i||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0,i||s();const u=i?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:u,invalid:!1})),e.router.getMatch(n)):l};async function t7(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&sE(t);try{for(let o=0;o{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var r;const n=[];for(const o of TX){const i=(r=e.options[o])==null?void 0:r.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function f_(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function PX(e){var t;for(const n of TX)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const TX=["component","errorComponent","pendingComponent","notFoundComponent"];function D0e(e){return{input:({url:t})=>{for(const n of e)t=AX(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=kX(e[n],t);return t}}}function L0e(e){const t=aE(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const s=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return s===o?a.pathname="/":s.startsWith(i)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=iE(["/",t,a.pathname]),a)}}function AX(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function kX(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Vp(e){const t=e.resolvedLocation,n=e.location,r=(t==null?void 0:t.pathname)!==n.pathname,o=(t==null?void 0:t.href)!==n.href,i=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:i}}class $0e{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var h;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(p=>[encodeURIComponent(p),p])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Zye())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new LI(B0e(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(p=>!["redirected"].includes(p.status))}}}),_0e(this));let s=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(i||o!==l||a!==u){this.basepath=l;const p=[];aE(l)!==""&&p.push(L0e({basepath:l})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:D0e(p),this.history&&this.updateLatestLocation(),s=!0}s&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:o}=f0e(this.routeTree,this.options.caseSensitive,(a,s)=>{a.init({originalIndex:s})});this.options.routeMasks&&a0e(this.options.routeMasks,o),this.routesById=n,this.routesByPath=r,this.processedTree=o;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({href:l,state:u})=>{const c=new URL(l,this.origin),d=AX(this.rewrite,c),h=this.options.parseSearch(d.search),p=this.options.stringifySearch(h);d.search=p;const x=d.href.replace(d.origin,""),{pathname:y,hash:w}=d;return{href:x,publicHref:l,url:d.href,pathname:JF(y),searchStr:p,search:Ns(r==null?void 0:r.search,h),hash:w.split("#").reverse()[0]??"",state:Ns(r==null?void 0:r.state,u)}},i=o(n),{__tempLocation:a,__tempKey:s}=i.state;if(a&&(!s||s===this.tempLocationKey)){const l=o(a);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathCache=ME(1e3),this.resolvePathWithBase=(n,r)=>v0e({base:n,to:dL(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>z0e({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{var $,L;const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,s=this.matchRoutes(a,{_buildLocation:!0}),l=kE(s);i.from;const u=i.unsafeRelative==="path"?a.pathname:i.from??l.fullPath,c=this.resolvePathWithBase(u,"."),d=l.search,h={...l.params},p=i.to?this.resolvePathWithBase(c,`${i.to}`):this.resolvePathWithBase(c,"."),x=i.params===!1||i.params===null?{}:(i.params??!0)===!0?h:Object.assign(h,Nd(i.params,h)),y=C2({path:p,params:x}).interpolatedPath,w=this.matchRoutes(y,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(x).length>0)for(const K of w){const H=(($=K.options.params)==null?void 0:$.stringify)??K.options.stringifyParams;H&&Object.assign(x,H(x))}const _=n.leaveParams?p:JF(C2({path:p,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let C=d;if(n._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const K={};w.forEach(H=>{if(H.options.validateSearch)try{Object.assign(K,FI(H.options.validateSearch,{...K,...C}))}catch{}}),C=K}C=q0e({search:C,dest:i,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),C=Ns(d,C);const O=this.options.stringifySearch(C),P=i.hash===!0?a.hash:i.hash?Nd(i.hash,a.hash):void 0,R=P?`#${P}`:"";let T=i.state===!0?a.state:i.state?Nd(i.state,a.state):{};T=Ns(a.state,T);const k=`${_}${O}${R}`,M=new URL(k,this.origin),j=kX(this.rewrite,M);return{publicHref:j.pathname+j.search+j.hash,href:k,url:j.href,pathname:_,search:C,searchStr:O,state:T,hash:P??"",unmaskOnReload:i.unmaskOnReload}},o=(i={},a)=>{const s=r(i);let l=a?r(a):void 0;if(!l){const u={};if(this.options.routeMasks){const c=s0e(s.pathname,this.processedTree);if(c){Object.assign(u,c.params);const{from:d,params:h,...p}=c.route,x=h===!1||h===null?{}:(h??!0)===!0?u:Object.assign(u,Nd(h,u));a={from:n.from,...p,params:x},l=r(a)}}}return l&&(s.maskedLocation=l),s};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...o})=>{const i=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{o.state[c]=this.latestLocation.state[c]});const u=qp(o.state,this.latestLocation.state);return l.forEach(c=>{delete o.state[c]}),u},a=Up(this.latestLocation.href)===Up(o.href),s=this.commitLocationPromise;if(this.commitLocationPromise=Zv(()=>{s==null||s.resolve()}),a&&i())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=o;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:i,ignoreBlocker:a,href:s,...l}={})=>{if(s){const d=this.history.location.state.__TSR_index,h=AE(s,{__TSR_index:n?d:d+1});l.to=h.pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:n,reloadDocument:r,href:o,...i})=>{var a;if(!r&&o)try{new URL(`${o}`),r=!0}catch{}if(r){if(o||(o=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const s=this.history,l=((a=s.getBlockers)==null?void 0:a.call(s))??[];for(const u of l)if(u!=null&&u.blockerFn&&await u.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(o):window.location.href=o,Promise.resolve()}return this.buildAndCommitLocation({...i,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),o=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(aE(o(this.latestLocation.href))!==aE(o(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),cn({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(o=>!n.some(i=>i.id===o.id))}))},this.load=async n=>{let r,o,i;for(i=new Promise(s=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,c=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Vp({resolvedLocation:c,location:u})}),this.emit({type:"onBeforeLoad",...Vp({resolvedLocation:c,location:u})}),await t7({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=[],h=[],p=[];mw(()=>{this.__store.setState(x=>{const y=x.matches,w=x.pendingMatches||x.matches;return d=y.filter(_=>!w.some(C=>C.id===_.id)),h=w.filter(_=>!y.some(C=>C.id===_.id)),p=w.filter(_=>y.some(C=>C.id===_.id)),{...x,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...x.cachedMatches,...d.filter(_=>_.status!=="error"&&_.status!=="notFound")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[h,"onEnter"],[p,"onStay"]].forEach(([x,y])=>{x.forEach(w=>{var _,C;(C=(_=this.looseRoutesById[w.routeId].options)[y])==null||C.call(_,w)})})})})}})}catch(u){Ml(u)?(r=u,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Bs(u)&&(o=u),this.__store.setState(c=>({...c,statusCode:r?r.status:o?404:c.matches.some(d=>d.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),s()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(s=>s.status==="error")&&(a=500),a!==void 0&&this.__store.setState(s=>({...s,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,s=typeof r.types=="function"?r.types(Vp({resolvedLocation:a,location:i})):r.types;if(s===!1){n();return}o={update:n,types:s}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{var i;const o=(i=this.state.pendingMatches)!=null&&i.some(a=>a.id===n)?"pendingMatches":this.state.matches.some(a=>a.id===n)?"matches":this.state.cachedMatches.some(a=>a.id===n)?"cachedMatches":"";o&&this.__store.setState(a=>{var s;return{...a,[o]:(s=a[o])==null?void 0:s.map(l=>l.id===n?r(l):l)}})})},this.getMatch=n=>{var o;const r=i=>i.id===n;return this.state.cachedMatches.find(r)??((o=this.state.pendingMatches)==null?void 0:o.find(r))??this.state.matches.find(r)},this.invalidate=n=>{const r=o=>{var i;return((i=n==null?void 0:n.filter)==null?void 0:i.call(n,o))??!0?{...o,invalid:!0,...n!=null&&n.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.__store.setState(o=>{var i;return{...o,matches:o.matches.map(r),cachedMatches:o.cachedMatches.map(r),pendingMatches:(i=o.pendingMatches)==null?void 0:i.map(r)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let o=r.url;this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",o)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(i=>!r(i))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!0;const i=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=RX,this.preloadRoute=async n=>{const r=this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(s=>s.id)),a=new Set([...i,...this.state.cachedMatches.map(s=>s.id)]);mw(()=>{o.forEach(s=>{a.has(s.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,s]}))})});try{return o=await t7({router:this,matches:o,location:r,preload:!0,updateMatch:(s,l)=>{i.has(s)?o=o.map(u=>u.id===s?l(u):u):this.updateMatch(s,l)}}),o}catch(s){if(Ml(s))return s.options.reloadDocument?void 0:await this.preloadRoute({...s.options,_fromLocation:r});Bs(s)||console.error(s);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(o);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const s=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=l0e(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,s.pathname,this.processedTree);return!l||n.params&&!qp(l.params,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?qp(s.search,i.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??P0e,parseSearch:t.parseSearch??R0e}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:i}=r;let{matchedRoutes:a}=r,s=!1;(o?o.path!=="/"&&i["**"]:Up(t.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:s=!0);const l=(()=>{if(s){if(this.options.notFoundMode!=="root")for(let d=a.length-1;d>=0;d--){const h=a[d];if(h.children)return h.id}return ts}})(),u=[],c=d=>(d==null?void 0:d.id)?d.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((d,h)=>{var H,D,W;const p=u[h-1],[x,y,w]=(()=>{const q=(p==null?void 0:p.search)??t.search,Y=(p==null?void 0:p._strictSearch)??void 0;try{const U=FI(d.options.validateSearch,{...q})??void 0;return[{...q,...U},{...Y,...U},void 0]}catch(U){let V=U;if(U instanceof LE||(V=new LE(U.message,{cause:U})),n!=null&&n.throwOnError)throw V;return[q,{},V]}})(),_=((D=(H=d.options).loaderDeps)==null?void 0:D.call(H,{search:x}))??"",C=_?JSON.stringify(_):"",{interpolatedPath:O,usedParams:P}=C2({path:d.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),R=d.id+O+C,T=this.getMatch(R),k=this.state.matches.find(q=>q.routeId===d.id),M=(T==null?void 0:T._strictParams)??P;let j;if(!T){const q=((W=d.options.params)==null?void 0:W.parse)??d.options.parseParams;if(q)try{Object.assign(M,q(M))}catch(Y){if(Bs(Y)||Ml(Y)?j=Y:j=new F0e(Y.message,{cause:Y}),n!=null&&n.throwOnError)throw j}}Object.assign(i,M);const $=k?"stay":"enter";let L;if(T)L={...T,cause:$,params:k?Ns(k.params,i):i,_strictParams:M,search:Ns(k?k.search:T.search,x),_strictSearch:y};else{const q=d.options.loader||d.options.beforeLoad||d.lazyFn||PX(d)?"pending":"success";L={id:R,ssr:this.isServer?void 0:d.options.ssr,index:h,routeId:d.id,params:k?Ns(k.params,i):i,_strictParams:M,pathname:O,updatedAt:Date.now(),search:k?Ns(k.search,x):x,_strictSearch:y,searchError:void 0,status:q,isFetching:!1,error:void 0,paramsError:j,__routeContext:void 0,_nonReactive:{loadPromise:Zv()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:k?Ns(k.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}n!=null&&n.preload||(L.globalNotFound=l===d.id),L.searchError=w;const K=c(p);L.context={...K,...L.__routeContext,...L.__beforeLoadContext},u.push(L)}),u.forEach((d,h)=>{const p=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&(n==null?void 0:n._buildLocation)!==!0){const y=u[h-1],w=c(y);if(p.options.context){const _={deps:d.loaderDeps,params:d.params,context:w??{},location:t,navigate:C=>this.navigate({...C,_fromLocation:t}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:u};d.__routeContext=p.options.context(_)??void 0}d.context={...w,...d.__routeContext,...d.__beforeLoadContext}}}),u}}class LE extends Error{}class F0e extends Error{}function B0e(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function FI(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new LE("Async validation not supported");if(n.issues)throw new LE(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function z0e({pathname:e,routesById:t,processedTree:n}){const r={},o=Up(e);let i;const a=u0e(o,n,!0);return a&&(i=a.route,Object.assign(r,a.params)),{matchedRoutes:(a==null?void 0:a.branch)||[t[ts]],routeParams:r,foundRoute:i}}function q0e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const o=n.reduce((s,l)=>{var c;const u=[];if("search"in l.options)(c=l.options.search)!=null&&c.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const d=({search:h,next:p})=>{let x=h;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(x=l.options.preSearchFilters.reduce((w,_)=>_(w),h));const y=p(x);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((w,_)=>_(w),y):y};u.push(d)}if(r&&l.options.validateSearch){const d=({search:h,next:p})=>{const x=p(h);try{return{...x,...FI(l.options.validateSearch,x)??void 0}}catch{return x}};u.push(d)}return s.concat(u)},[])??[],i=({search:s})=>t.search?t.search===!0?s:Nd(t.search,s):{};o.push(i);const a=(s,l)=>{if(s>=o.length)return l;const u=o[s];return u({search:l,next:d=>a(s+1,d)})};return a(0,e)}const U0e="Error preloading route! ☝️";class NX{constructor(t){if(this.init=n=>{var u,c;this.originalIndex=n.originalIndex;const r=this.options,o=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(c=(u=this.options).getParentRoute)==null?void 0:c.call(u),o?this._path=ts:this.parentRoute||Cr(!1);let i=o?ts:r==null?void 0:r.path;i&&i!=="/"&&(i=bX(i));const a=(r==null?void 0:r.id)||i;let s=o?ts:iE([this.parentRoute.id===ts?"":this.parentRoute.id,a]);i===ts&&(i="/"),s!==ts&&(s=iE(["/",s]));const l=s===ts?"/":iE([this.parentRoute.fullPath,i]);this._path=i,this._id=s,this._fullPath=l,this._to=l},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class V0e extends NX{constructor(t){super(t)}}function hL(e){const t=e.errorComponent??XO;return v.jsx(W0e,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?b.createElement(t,{error:n,reset:r}):e.children})}class W0e extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function XO({error:e}){const[t,n]=b.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function H0e({children:e,fallback:t=null}){return G0e()?v.jsx(J.Fragment,{children:e}):v.jsx(J.Fragment,{children:t})}function G0e(){return J.useSyncExternalStore(K0e,()=>!0,()=>!1)}function K0e(){return()=>{}}var R2={exports:{}},P2={},T2={exports:{}},A2={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n7;function Y0e(){if(n7)return A2;n7=1;var e=Gx();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,h){var p=h(),x=r({inst:{value:p,getSnapshot:h}}),y=x[0].inst,w=x[1];return i(function(){y.value=p,y.getSnapshot=h,l(y)&&w({inst:y})},[d,p,h]),o(function(){return l(y)&&w({inst:y}),d(function(){l(y)&&w({inst:y})})},[d]),a(p),p}function l(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!n(d,p)}catch{return!0}}function u(d,h){return h()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return A2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,A2}var r7;function X0e(){return r7||(r7=1,T2.exports=Y0e()),T2.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var o7;function Q0e(){if(o7)return P2;o7=1;var e=Gx(),t=X0e();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return P2.useSyncExternalStoreWithSelector=function(u,c,d,h,p){var x=i(null);if(x.current===null){var y={hasValue:!1,value:null};x.current=y}else y=x.current;x=s(function(){function _(T){if(!C){if(C=!0,O=T,T=h(T),p!==void 0&&y.hasValue){var k=y.value;if(p(k,T))return P=k}return P=T}if(k=P,r(O,T))return k;var M=h(T);return p!==void 0&&p(k,M)?(O=T,k):(O=T,P=M)}var C=!1,O,P,R=d===void 0?null:d;return[function(){return _(c())},R===null?void 0:function(){return _(R())}]},[c,d,h,p]);var w=o(u,x[0],x[1]);return a(function(){y.hasValue=!0,y.value=w},[w]),l(w),w},P2}var i7;function Z0e(){return i7||(i7=1,R2.exports=Q0e()),R2.exports}var MX=Z0e();const J0e=Ln(MX);function e1e(e,t=r=>r,n={}){const r=n.equal??t1e;return MX.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function t1e(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!t.has(r)||!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=a7(e);if(n.length!==a7(t).length)return!1;for(let r=0;r"u"?k2:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=k2,k2)}function Ma(e){const t=b.useContext(jX());return e==null||e.warn,t}function Ai(e){const t=Ma({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=b.useRef(void 0);return e1e(n.__store,o=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=Ns(r.current,e.select(o));return r.current=i,i}return e.select(o)}return o})}const QO=b.createContext(void 0),n1e=b.createContext(void 0);function Zu(e){const t=b.useContext(e.from?n1e:QO);return Ai({select:r=>{const o=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Cr(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function pL(e){return Zu({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function mL(e){const{select:t,...n}=e;return Zu({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function ta(e){return Zu({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function gL(e){return Zu({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const d_=typeof window<"u"?b.useLayoutEffect:b.useEffect;function N2(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function r1e(e,t,n={},r={}){b.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([i])=>{t(i)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function o1e(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function Gl(e){const t=Ma();return b.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function i1e(e,t){const n=Ma(),[r,o]=b.useState(!1),i=b.useRef(!1),a=o1e(t),{activeProps:s,inactiveProps:l,activeOptions:u,to:c,preload:d,preloadDelay:h,hashScrollIntoView:p,replace:x,startTransition:y,resetScroll:w,viewTransition:_,children:C,target:O,disabled:P,style:R,className:T,onClick:k,onFocus:M,onMouseEnter:j,onMouseLeave:$,onTouchStart:L,ignoreBlocker:K,params:H,search:D,hash:W,state:q,mask:Y,reloadDocument:U,unsafeRelative:V,from:G,_fromLocation:z,...X}=e,ee=Ai({select:oe=>oe.location.search,structuralSharing:!0}),ae=e.from,fe=b.useMemo(()=>({...e,from:ae}),[n,ee,ae,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=b.useMemo(()=>n.buildLocation({...fe}),[n,fe]),we=b.useMemo(()=>{if(P)return;let oe=ie.maskedLocation?ie.maskedLocation.url:ie.url,he=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":he=!0),{href:oe,external:he}},[P,ie.maskedLocation,ie.url,n.origin,n.history]),de=b.useMemo(()=>{if(we!=null&&we.external)return we.href;try{return new URL(c),c}catch{}},[c,we]),se=e.reloadDocument||de?!1:d??n.options.defaultPreload,ye=h??n.options.defaultPreloadDelay??0,Te=Ai({select:oe=>{if(de)return!1;if(u!=null&&u.exact){if(!g0e(oe.location.pathname,ie.pathname,n.basepath))return!1}else{const he=jE(oe.location.pathname,n.basepath),Se=jE(ie.pathname,n.basepath);if(!(he.startsWith(Se)&&(he.length===Se.length||he[Se.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!qp(oe.location.search,ie.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?oe.location.hash===ie.hash:!0}}),ge=b.useCallback(()=>{n.preloadRoute({...fe}).catch(oe=>{console.warn(oe),console.warn(U0e)})},[n,fe]),Be=b.useCallback(oe=>{oe!=null&&oe.isIntersecting&&ge()},[ge]);r1e(a,Be,c1e,{disabled:!!P||se!=="viewport"}),b.useEffect(()=>{i.current||!P&&se==="render"&&(ge(),i.current=!0)},[P,ge,se]);const Ie=oe=>{const he=oe.currentTarget.getAttribute("target"),Se=O!==void 0?O:he;if(!P&&!f1e(oe)&&!oe.defaultPrevented&&(!Se||Se==="_self")&&oe.button===0){oe.preventDefault(),Vs.flushSync(()=>{o(!0)});const Ge=n.subscribe("onResolved",()=>{Ge(),o(!1)});n.navigate({...fe,replace:x,resetScroll:w,hashScrollIntoView:p,startTransition:y,viewTransition:_,ignoreBlocker:K})}};if(de)return{...X,ref:a,href:de,...C&&{children:C},...O&&{target:O},...P&&{disabled:P},...R&&{style:R},...T&&{className:T},...k&&{onClick:k},...M&&{onFocus:M},...j&&{onMouseEnter:j},...$&&{onMouseLeave:$},...L&&{onTouchStart:L}};const Ve=oe=>{P||se&&ge()},ht=Ve,lt=oe=>{if(!(P||!se))if(!ye)ge();else{const he=oe.target;if(O1.has(he))return;const Se=setTimeout(()=>{O1.delete(he),ge()},ye);O1.set(he,Se)}},Ye=oe=>{if(P||!se||!ye)return;const he=oe.target,Se=O1.get(he);Se&&(clearTimeout(Se),O1.delete(he))},Kt=Te?Nd(s,{})??a1e:M2,vn=Te?M2:Nd(l,{})??M2,un=[T,Kt.className,vn.className].filter(Boolean).join(" "),on=(R||Kt.style||vn.style)&&{...R,...Kt.style,...vn.style};return{...X,...Kt,...vn,href:we==null?void 0:we.href,ref:a,onClick:R1([k,Ie]),onFocus:R1([M,Ve]),onMouseEnter:R1([j,lt]),onMouseLeave:R1([$,Ye]),onTouchStart:R1([L,ht]),disabled:!!P,target:O,...on&&{style:on},...un&&{className:un},...P&&s1e,...Te&&l1e,...r&&u1e}}const M2={},a1e={className:"active"},s1e={role:"link","aria-disabled":!0},l1e={"data-status":"active","aria-current":"page"},u1e={"data-transitioning":"transitioning"},O1=new WeakMap,c1e={rootMargin:"100px"},R1=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Ul=b.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,ref:i,...a}=i1e(r,t),s=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;return n===void 0&&delete a.disabled,b.createElement(n||"a",{...a,ref:i},s)});function f1e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class d1e extends NX{constructor(t){super(t),this.useMatch=n=>Zu({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Zu({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>gL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>ta({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>mL({...n,from:this.id}),this.useLoaderData=n=>pL({...n,from:this.id}),this.useNavigate=()=>Gl({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>v.jsx(Ul,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function tt(e){return new d1e(e)}class h1e extends V0e{constructor(t){super(t),this.useMatch=n=>Zu({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Zu({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>gL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>ta({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>mL({...n,from:this.id}),this.useLoaderData=n=>pL({...n,from:this.id}),this.useNavigate=()=>Gl({from:this.fullPath}),this.Link=J.forwardRef((n,r)=>v.jsx(Ul,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function p1e(e){return new h1e(e)}function s7(e){return typeof e=="object"?new l7(e,{silent:!0}).createRoute(e):new l7(e,{silent:!0}).createRoute}class l7{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const o=tt(r);return o.isRoot=!1,o},this.silent=n==null?void 0:n.silent}}class u7{constructor(t){this.useMatch=n=>Zu({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Zu({from:this.options.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>gL({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>ta({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>mL({...n,from:this.options.id}),this.useLoaderData=n=>pL({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ma();return Gl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function c7(e){return typeof e=="object"?new u7(e):t=>new u7({id:e,...t})}function fn(e,t){let n,r,o,i;const a=()=>(n||(n=e().then(l=>{n=void 0,r=l[t??"default"]}).catch(l=>{if(o=l,t0e(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),i=!0)}})),n),s=function(u){if(i)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)throw a();return b.createElement(r,u)};return s.preload=a,s}function m1e(){const e=Ma(),t=b.useRef({router:e,mounted:!1}),[n,r]=b.useState(!1),{hasPendingMatches:o,isLoading:i}=Ai({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(h=>h.status==="pending")}),structuralSharing:!0}),a=N2(i),s=i||n||o,l=N2(s),u=i||o,c=N2(u);return e.startTransition=d=>{r(!0),b.startTransition(()=>{d(),r(!1)})},b.useEffect(()=>{const d=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Up(e.latestLocation.href)!==Up(h.href)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),d_(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),d_(()=>{a&&!i&&e.emit({type:"onLoad",...Vp(e.state)})},[a,e,i]),d_(()=>{c&&!u&&e.emit({type:"onBeforeRouteMount",...Vp(e.state)})},[u,c,e]),d_(()=>{if(l&&!s){const d=Vp(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),d.hrefChanged&&E0e(e)}},[s,l,e]),null}function g1e(e){const t=Ai({select:n=>`not-found-${n.location.pathname}-${n.status}`});return v.jsx(hL,{getResetKey:()=>t,onCatch:(n,r)=>{var o;if(Bs(n))(o=e.onCatch)==null||o.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;if(Bs(n))return(r=e.fallback)==null?void 0:r.call(e,n);throw n},children:e.children})}function v1e(){return v.jsx("p",{children:"Not Found"})}function uv(e){return v.jsx(v.Fragment,{children:e.children})}function IX(e,t,n){return t.options.notFoundComponent?v.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?v.jsx(e.options.defaultNotFoundComponent,{...n}):v.jsx(v1e,{})}function y1e({children:e}){var n;const t=Ma();return t.isServer?v.jsx("script",{nonce:(n=t.options.ssr)==null?void 0:n.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function w1e(){const e=Ma();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||$I)(e.latestLocation),r=n!==$I(e.latestLocation)?n:void 0,o={storageKey:IE,shouldScrollRestoration:!0};return r&&(o.key=r),v.jsx(y1e,{children:`(${SX.toString()})(${JSON.stringify(o)})`})}const DX=b.memo(function({matchId:t}){var _,C;const n=Ma(),r=Ai({select:O=>{const P=O.matches.find(R=>R.id===t);return Cr(P),{routeId:P.routeId,ssr:P.ssr,_displayPending:P._displayPending}},structuralSharing:!0}),o=n.routesById[r.routeId],i=o.options.pendingComponent??n.options.defaultPendingComponent,a=i?v.jsx(i,{}):null,s=o.options.errorComponent??n.options.defaultErrorComponent,l=o.options.onCatch??n.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??((_=n.options.notFoundRoute)==null?void 0:_.options.component):o.options.notFoundComponent,c=r.ssr===!1||r.ssr==="data-only",d=(!o.isRoot||o.options.wrapInSuspense||c)&&(o.options.wrapInSuspense??i??(((C=o.options.errorComponent)==null?void 0:C.preload)||c))?b.Suspense:uv,h=s?hL:uv,p=u?g1e:uv,x=Ai({select:O=>O.loadedAt}),y=Ai({select:O=>{var R;const P=O.matches.findIndex(T=>T.id===t);return(R=O.matches[P-1])==null?void 0:R.routeId}}),w=o.isRoot?o.options.shellComponent??uv:uv;return v.jsxs(w,{children:[v.jsx(QO.Provider,{value:t,children:v.jsx(d,{fallback:a,children:v.jsx(h,{getResetKey:()=>x,errorComponent:s||XO,onCatch:(O,P)=>{if(Bs(O))throw O;l==null||l(O,P)},children:v.jsx(p,{fallback:O=>{if(!u||O.routeId&&O.routeId!==r.routeId||!O.routeId&&!o.isRoot)throw O;return b.createElement(u,O)},children:c||r._displayPending?v.jsx(H0e,{fallback:a,children:v.jsx(f7,{matchId:t})}):v.jsx(f7,{matchId:t})})})})}),y===ts&&n.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(x1e,{}),v.jsx(w1e,{})]}):null]})});function x1e(){const e=Ma(),t=b.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Vp(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const f7=b.memo(function({matchId:t}){var l,u,c,d;const n=Ma(),{match:r,key:o,routeId:i}=Ai({select:h=>{const p=h.matches.find(C=>C.id===t),x=p.routeId,y=n.routesById[x].options.remountDeps??n.options.defaultRemountDeps,w=y==null?void 0:y({routeId:x,loaderDeps:p.loaderDeps,params:p._strictParams,search:p._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:x,match:{id:p.id,status:p.status,error:p.error,_forcePending:p._forcePending,_displayPending:p._displayPending}}},structuralSharing:!0}),a=n.routesById[i],s=b.useMemo(()=>{const h=a.options.component??n.options.defaultComponent;return h?v.jsx(h,{},o):v.jsx(ZO,{})},[o,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw(l=n.getMatch(r.id))==null?void 0:l._nonReactive.displayPendingPromise;if(r._forcePending)throw(u=n.getMatch(r.id))==null?void 0:u._nonReactive.minPendingPromise;if(r.status==="pending"){const h=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(r.id);if(p&&!p._nonReactive.minPendingPromise&&!n.isServer){const x=Zv();p._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw(c=n.getMatch(r.id))==null?void 0:c._nonReactive.loadPromise}if(r.status==="notFound")return Cr(Bs(r.error)),IX(n,a,r.error);if(r.status==="redirected")throw Cr(Ml(r.error)),(d=n.getMatch(r.id))==null?void 0:d._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const h=(a.options.errorComponent??n.options.defaultErrorComponent)||XO;return v.jsx(h,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return s}),ZO=b.memo(function(){const t=Ma(),n=b.useContext(QO),r=Ai({select:u=>{var c;return(c=u.matches.find(d=>d.id===n))==null?void 0:c.routeId}}),o=t.routesById[r],i=Ai({select:u=>{const d=u.matches.find(h=>h.id===n);return Cr(d),d.globalNotFound}}),a=Ai({select:u=>{var h;const c=u.matches,d=c.findIndex(p=>p.id===n);return(h=c[d+1])==null?void 0:h.id}}),s=t.options.defaultPendingComponent?v.jsx(t.options.defaultPendingComponent,{}):null;if(i)return IX(t,o,void 0);if(!a)return null;const l=v.jsx(DX,{matchId:a});return r===ts?v.jsx(b.Suspense,{fallback:s,children:l}):l});function b1e(){const e=Ma(),n=e.routesById[ts].options.pendingComponent??e.options.defaultPendingComponent,r=n?v.jsx(n,{}):null,o=e.isServer||typeof document<"u"&&e.ssr?uv:b.Suspense,i=v.jsxs(o,{fallback:r,children:[!e.isServer&&v.jsx(m1e,{}),v.jsx(S1e,{})]});return e.options.InnerWrap?v.jsx(e.options.InnerWrap,{children:i}):i}function S1e(){const e=Ma(),t=Ai({select:o=>{var i;return(i=o.matches[0])==null?void 0:i.id}}),n=Ai({select:o=>o.loadedAt}),r=t?v.jsx(DX,{matchId:t}):null;return v.jsx(QO.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:v.jsx(hL,{getResetKey:()=>n,errorComponent:XO,onCatch:o=>{o.message||o.toString()},children:r})})}function LX(){const e=Ma();return Ai({select:t=>{var n;return[t.location.href,(n=t.resolvedLocation)==null?void 0:n.href,t.status]},structuralSharing:!0}),b.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:o,includeSearch:i,...a}=t;return e.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:o,includeSearch:i})},[e])}const _1e=e=>new E1e(e);let E1e=class extends $0e{constructor(t){super(t)}};typeof globalThis<"u"?(globalThis.createFileRoute=s7,globalThis.createLazyFileRoute=c7):typeof window<"u"&&(window.createFileRoute=s7,window.createLazyFileRoute=c7);function C1e({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=jX(),o=v.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?v.jsx(e.options.Wrap,{children:o}):o}function O1e({router:e,...t}){return v.jsx(C1e,{router:e,...t,children:v.jsx(b1e,{})})}function Vy(e){return Ai({select:t=>t.location})}const BI=b.createContext(void 0);function Bet({context:e}){const t=b.useContext(BI),n=e===void 0?t:e;return v.jsx(BI.Provider,{value:n,children:v.jsx(ZO,{})})}function zet(){return b.useContext(BI)}function Wy(){const e=Vy(),t=Gl();return[b.useMemo(()=>new URLSearchParams(e.searchStr??""),[e.searchStr]),(o,i)=>{const a=new URLSearchParams(e.searchStr??""),s=typeof o=="function"?o(a):o;let l;if(s instanceof URLSearchParams)l={},s.forEach((u,c)=>{try{l[c]=JSON.parse(u)}catch{l[c]=u}});else if(typeof s=="string"){const u=new URLSearchParams(s);l={},u.forEach((c,d)=>{try{l[d]=JSON.parse(c)}catch{l[d]=c}})}else l={},Object.entries(s||{}).forEach(([u,c])=>{if(c!=null)if(typeof c=="string")try{l[u]=JSON.parse(c)}catch{l[u]=c}else l[u]=c});t({to:e.pathname,search:l,replace:i==null?void 0:i.replace,state:i==null?void 0:i.state})}]}function vL(e,t){if(!e||typeof e!="object")return;const n=Reflect.get(e,t);return typeof n=="string"?n:void 0}/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $X=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P1e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const d7=e=>{const t=P1e(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var j2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T1e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},A1e=b.createContext({}),k1e=()=>b.useContext(A1e),N1e=b.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>{const{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:h="currentColor",className:p=""}=k1e()??{},x=r??d?Number(n??c)*24/Number(t??u):n??c;return b.createElement("svg",{ref:l,...j2,width:t??u??j2.width,height:t??u??j2.height,stroke:e??h,strokeWidth:x,className:$X("lucide",p,o),...!i&&!T1e(s)&&{"aria-hidden":"true"},...s},[...a.map(([y,w])=>b.createElement(y,w)),...Array.isArray(i)?i:[i]])});/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kn=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(N1e,{ref:i,iconNode:t,className:$X(`lucide-${R1e(d7(e))}`,`lucide-${e}`,r),...o}));return n.displayName=d7(e),n};/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M1e=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],I2=Kn("activity",M1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],I1e=Kn("ban",j1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D1e=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],L1e=Kn("book-open",D1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $1e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],F1e=Kn("calendar",$1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B1e=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],z1e=Kn("chart-column",B1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q1e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yL=Kn("check",q1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U1e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],V1e=Kn("chevron-down",U1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W1e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],H1e=Kn("chevron-right",W1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G1e=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],K1e=Kn("chevrons-down-up",G1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Y1e=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],X1e=Kn("chevrons-up-down",Y1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Z1e=Kn("circle-alert",Q1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J1e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],ewe=Kn("circle-minus",J1e);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const twe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],nwe=Kn("circle-x",twe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],owe=Kn("clock",rwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iwe=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],awe=Kn("cloud-download",iwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const swe=[["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"}]],lwe=Kn("copy",swe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uwe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Wp=Kn("external-link",uwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cwe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],fwe=Kn("file-question-mark",cwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dwe=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],h7=Kn("fullscreen",dwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hwe=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],FX=Kn("house",hwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pwe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],mwe=Kn("log-out",pwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gwe=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],p7=Kn("message-circle",gwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vwe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ywe=Kn("panel-right",vwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wwe=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],BX=Kn("play",wwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xwe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],zX=Kn("refresh-cw",xwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bwe=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}],["path",{d:"M11 10h1v4",key:"70cz1p"}]],Swe=Kn("repeat-1",bwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _we=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Ewe=Kn("rocket",_we);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cwe=[["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"}]],Owe=Kn("save",Cwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rwe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],Pwe=Kn("shield-x",Rwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Twe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Awe=Kn("square-pen",Twe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kwe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Nwe=Kn("trash-2",kwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mwe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jwe=Kn("triangle-alert",Mwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iwe=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],qX=Kn("undo-2",Iwe);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dwe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],JO=Kn("x",Dwe);function eR(){const e=Gl(),t=Vy(),n=ta({strict:!1}),r=vL(n,"tenant");return v.jsxs(zO,{icon:v.jsx(fwe,{className:"h-5 w-5"}),title:"Page not found",description:"This page doesn’t exist or may have moved.",actions:v.jsxs(v.Fragment,{children:[v.jsx(xt,{leftIcon:v.jsx(FX,{className:"h-4 w-4"}),onClick:()=>e(r?{to:ft.tenantRunsRoute.to,params:{tenant:r},replace:!0}:{to:ft.authenticatedRoute.to,replace:!0}),children:"Dashboard"}),v.jsx(xt,{leftIcon:v.jsx(qX,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"404"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested path"}),v.jsx("div",{className:"break-all text-foreground/90",children:t.pathname})]})]})}function Lwe({status:e,statusText:t}){const n=Gl(),r=Vy();return v.jsxs(zO,{icon:v.jsx(jwe,{className:"h-6 w-6"}),title:"Something went wrong",description:t||"An unexpected error occurred.",actions:v.jsxs(v.Fragment,{children:[v.jsx(xt,{leftIcon:v.jsx(zX,{className:"h-4 w-4"}),onClick:()=>window.location.reload(),children:"Reload"}),v.jsx(xt,{onClick:()=>n({to:ft.authenticatedRoute.to}),variant:"outline",children:"Dashboard"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:e??"error"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Path"}),v.jsx("div",{className:"break-all text-foreground/90",children:r.pathname})]})]})}function $we(){const e=Gl(),t=Vy(),n=new URLSearchParams(t.search);if(!n.has("updated")){n.set("updated","true");const r=`${t.pathname}?${n.toString()}`;window.location.href=r}return v.jsxs(zO,{icon:v.jsx(awe,{className:"h-6 w-6"}),title:"Update available",description:"A new version of the app is available.",actions:v.jsxs(v.Fragment,{children:[v.jsx(xt,{onClick:()=>window.location.reload(),children:"Reload"}),v.jsx(xt,{leftIcon:v.jsx(FX,{className:"h-4 w-4"}),onClick:()=>e({to:ft.authenticatedRoute.to}),variant:"outline",children:"Dashboard"})]}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"update"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Path"}),v.jsx("div",{className:"break-all text-foreground/90",children:t.pathname})]})]})}var UX=(e=>(e.TenantLogWorkflowFilterEnabled="tenant-log-workflow-filter-enabled",e.TraceMinimapEnabled="trace-minimap-enabled",e.OrganizationSsoEnabled="organization-sso-enabled",e))(UX||{}),lE=(e=>(e.INFO="INFO",e.WARNING="WARNING",e.CRITICAL="CRITICAL",e))(lE||{}),Fwe=(e=>(e.WORKFLOW="WORKFLOW",e.TASK="TASK",e))(Fwe||{}),Bwe=(e=>(e.CANCEL_IN_PROGRESS="CANCEL_IN_PROGRESS",e.DROP_NEWEST="DROP_NEWEST",e.QUEUE_NEWEST="QUEUE_NEWEST",e.GROUP_ROUND_ROBIN="GROUP_ROUND_ROBIN",e))(Bwe||{}),zwe=(e=>(e.Name="name",e.CreatedAt="createdAt",e))(zwe||{}),qwe=(e=>(e.PENDING="PENDING",e.RUNNING="RUNNING",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.QUEUED="QUEUED",e.SCHEDULED="SCHEDULED",e))(qwe||{}),Uwe=(e=>(e.ASC="ASC",e.DESC="DESC",e))(Uwe||{}),Vwe=(e=>(e.TriggerAt="triggerAt",e.CreatedAt="createdAt",e))(Vwe||{}),Wwe=(e=>(e.Asc="asc",e.Desc="desc",e))(Wwe||{}),Hwe=(e=>(e.Key="key",e.Value="value",e.LimitValue="limitValue",e))(Hwe||{}),Gwe=(e=>(e.OWNER="OWNER",e.ADMIN="ADMIN",e.MEMBER="MEMBER",e))(Gwe||{}),Kwe=(e=>(e.WORKER="WORKER",e.WORKER_SLOT="WORKER_SLOT",e.EVENT="EVENT",e.TASK_RUN="TASK_RUN",e.CRON="CRON",e.SCHEDULE="SCHEDULE",e.INCOMING_WEBHOOK="INCOMING_WEBHOOK",e))(Kwe||{}),Ywe=(e=>(e.HEX="HEX",e.BASE64="BASE64",e.BASE64URL="BASE64URL",e))(Ywe||{}),Xwe=(e=>(e.SHA1="SHA1",e.SHA256="SHA256",e.SHA512="SHA512",e.MD5="MD5",e))(Xwe||{}),Qwe=(e=>(e.BASIC="BASIC",e.API_KEY="API_KEY",e.HMAC="HMAC",e))(Qwe||{}),Zwe=(e=>(e.GENERIC="GENERIC",e.GITHUB="GITHUB",e.STRIPE="STRIPE",e.SLACK="SLACK",e.LINEAR="LINEAR",e.SVIX="SVIX",e))(Zwe||{}),Lr=(e=>(e.UNSET="UNSET",e.OK="OK",e.ERROR="ERROR",e))(Lr||{}),Gu=(e=>(e.SLEEP="SLEEP",e.USER_EVENT="USER_EVENT",e.CHILD_WORKFLOW="CHILD_WORKFLOW",e))(Gu||{}),Hy=(e=>(e.RUN="RUN",e.WAIT_FOR="WAIT_FOR",e.MEMO="MEMO",e))(Hy||{}),$E=(e=>(e.ALL="ALL",e.EVICTED="EVICTED",e.ON_WORKER="ON_WORKER",e))($E||{}),VX=(e=>(e.ASC="ASC",e.DESC="DESC",e))(VX||{}),Xi=(e=>(e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR",e))(Xi||{}),Nn=(e=>(e.REQUEUED_NO_WORKER="REQUEUED_NO_WORKER",e.REQUEUED_RATE_LIMIT="REQUEUED_RATE_LIMIT",e.SCHEDULING_TIMED_OUT="SCHEDULING_TIMED_OUT",e.ASSIGNED="ASSIGNED",e.STARTED="STARTED",e.FINISHED="FINISHED",e.FAILED="FAILED",e.RETRYING="RETRYING",e.CANCELLED="CANCELLED",e.TIMED_OUT="TIMED_OUT",e.REASSIGNED="REASSIGNED",e.SLOT_RELEASED="SLOT_RELEASED",e.TIMEOUT_REFRESHED="TIMEOUT_REFRESHED",e.RETRIED_BY_USER="RETRIED_BY_USER",e.SENT_TO_WORKER="SENT_TO_WORKER",e.RATE_LIMIT_ERROR="RATE_LIMIT_ERROR",e.ACKNOWLEDGED="ACKNOWLEDGED",e.CREATED="CREATED",e.QUEUED="QUEUED",e.SKIPPED="SKIPPED",e.COULD_NOT_SEND_TO_WORKER="COULD_NOT_SEND_TO_WORKER",e.DURABLE_EVICTED="DURABLE_EVICTED",e.DURABLE_RESTORING="DURABLE_RESTORING",e))(Nn||{}),It=(e=>(e.QUEUED="QUEUED",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e))(It||{}),Jwe=e=>{let t=Object.keys(e).sort((n,r)=>n.localeCompare(r));if(t.some(n=>n.startsWith("_")))throw new Error('Keys that start with "_" are reserved for Query Key Factory');return t};function Vo(e){return Object.assign(Object.create(null),e)}function m7(e,t){let n={_def:[e]};if(t==null)return Vo(n);let r=(i,a)=>Jwe(i).reduce((s,l)=>{let u=i[l],c=[...a,l],d=p=>Array.isArray(p),h;if(typeof u=="function"){let p=(...x)=>{let y=u(...x);if(d(y))return Vo({queryKey:[...c,...y]});let w=[...c,...y.queryKey];if("queryFn"in y){let _={queryKey:w,queryFn:y.queryFn};if("contextQueries"in y){let C=r(y.contextQueries,w);return Vo({_ctx:Vo(Object.fromEntries(C)),..._})}return Vo({..._})}if("contextQueries"in y){let _=r(y.contextQueries,w);return Vo({_ctx:Vo(Object.fromEntries(_)),queryKey:w})}return Vo({queryKey:w})};p._def=c,h=p}else if(u==null)h=Vo({queryKey:c});else if(d(u))h=Vo({_def:c,queryKey:[...c,...u]});else if("queryFn"in u){let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]],y={queryKey:x,queryFn:u.queryFn};if("contextQueries"in u){let w=r(u.contextQueries,x);h=Vo({_ctx:Vo(Object.fromEntries(w)),...p,...y})}else h=Vo({...p,...y})}else if("contextQueries"in u){let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]],y=r(u.contextQueries,x);h=Vo({_ctx:Vo(Object.fromEntries(y)),queryKey:x,...p})}else{let p={...u.queryKey?{_def:c}:void 0},x=[...c,...u.queryKey??[]];h=Vo({queryKey:x,...p})}return s.set(l,h),s},new Map),o=r(t,n._def);return Vo({...Object.fromEntries(o),...n})}function exe(e){let t=Object.keys(e).reduce((n,r)=>{let o=e[r],i=o?m7(r,o):m7(r);return n.set(r,i),n},new Map);return Vo(Object.fromEntries(t))}const Yr=exe({controlPlane:{billing:e=>({queryKey:["organization-billing-state:get",e],queryFn:async()=>(await Mt.organizationBillingStateGet(e)).data}),tenantResourceLimits:e=>({queryKey:["organization-tenant-resource-limits:get",e],queryFn:async()=>(await Mt.organizationTenantResourceLimitsGet(e)).data}),creditBalance:e=>({queryKey:["organization-credit-balance:get",e],queryFn:async()=>(await Mt.organizationCreditBalanceGet(e)).data}),subscriptionPlans:()=>({queryKey:["subscription-plans:list"],queryFn:async()=>(await Mt.subscriptionPlansList()).data}),paymentMethods:e=>({queryKey:["organization-payment-methods:get",e],queryFn:async()=>(await Mt.organizationPaymentMethodsGet(e)).data})},cloud:{getComputeCost:e=>({queryKey:["compute-cost:get",e],queryFn:async()=>(await On.computeCostGet(e)).data}),createComputeDemoTemplate:(e,t)=>({queryKey:["compute-demo-template:create",e,t],queryFn:async()=>(await On.managedWorkerTemplateCreate(e,{name:t})).data}),getManagedWorker:e=>({queryKey:["managed-worker:get",e],queryFn:async()=>(await On.managedWorkerGet(e)).data}),listManagedWorkers:e=>({queryKey:["managed-worker:list",e],queryFn:async()=>(await On.managedWorkerList(e)).data}),listManagedWorkerInstances:e=>({queryKey:["managed-worker:list:instances",e],queryFn:async()=>(await On.managedWorkerInstancesList(e)).data}),getManagedWorkerLogs:(e,t)=>({queryKey:["managed-worker:get:logs",e,t],queryFn:async()=>(await On.logList(e,t)).data}),getBuild:e=>({queryKey:["build:get",e],queryFn:async()=>(await On.buildGet(e)).data}),getBuildLogs:e=>({queryKey:["build-logs:list",e],queryFn:async()=>(await On.buildLogsList(e)).data}),getIacLogs:(e,t)=>({queryKey:["iac-logs:list",e,t],queryFn:async()=>(await On.iacLogsList(e,{deployKey:t})).data}),getManagedWorkerCpuMetrics:(e,t)=>({queryKey:["managed-worker:get:cpu-metrics",e,t],queryFn:async()=>(await On.metricsCpuGet(e,t)).data}),getManagedWorkerMemoryMetrics:(e,t)=>({queryKey:["managed-worker:get:memory-metrics",e,t],queryFn:async()=>(await On.metricsMemoryGet(e,t)).data}),getManagedWorkerDiskMetrics:(e,t)=>({queryKey:["managed-worker:get:disk-metrics",e,t],queryFn:async()=>(await On.metricsDiskGet(e,t)).data}),listManagedWorkerEvents:e=>({queryKey:["managed-worker:get:events",e],queryFn:async()=>(await On.managedWorkerEventsList(e)).data}),workflowRunMetrics:(e,t)=>({queryKey:["workflow-run:metrics",e,t],queryFn:async()=>(await On.workflowRunEventsGetMetrics(e,t)).data}),offers:()=>({queryKey:["offers:list"],queryFn:async()=>(await On.userOffersList()).data})},alertingSettings:{get:e=>({queryKey:["tenant-alerting-settings:get",e],queryFn:async()=>(await ot.tenantAlertingSettingsGet(e)).data})},tenantResourcePolicy:{get:e=>({queryKey:["tenant-resource-policy:get",e],queryFn:async()=>(await ot.tenantResourcePolicyGet(e)).data})},tokens:{list:e=>({queryKey:["api-token:list",e],queryFn:async()=>(await ot.apiTokenList(e)).data})},emailGroups:{list:e=>({queryKey:["email-group:list",e],queryFn:async()=>(await ot.alertEmailGroupList(e)).data})},slackWebhooks:{list:e=>({queryKey:["slack-webhook:list",e],queryFn:async()=>(await ot.slackWebhookList(e)).data})},snsIntegrations:{list:e=>({queryKey:["sns:list",e],queryFn:async()=>(await ot.snsList(e)).data})},workflows:{list:(e,t)=>({queryKey:["workflow:list",e,t],queryFn:async()=>(await ot.workflowList(e,t)).data}),get:e=>({queryKey:["workflow:get",e],queryFn:async()=>(await ot.workflowGet(e)).data}),getMetrics:e=>({queryKey:["workflow:get:metrics",e],queryFn:async()=>(await ot.workflowGetMetrics(e)).data}),getVersion:(e,t)=>({queryKey:["workflow-version:get",e,t],queryFn:async()=>(await ot.workflowVersionGet(e,{version:t})).data})},scheduledRuns:{list:(e,t)=>({queryKey:["scheduled-run:list",e,t],queryFn:async()=>(await ot.workflowScheduledList(e,t)).data})},cronJobs:{list:(e,t)=>({queryKey:["cron-job:list",e,t],queryFn:async()=>(await ot.cronWorkflowList(e,t)).data})},workflowRuns:{list:(e,t)=>({queryKey:["workflow-run:list",e,t],queryFn:async()=>(await ot.workflowRunList(e,t)).data}),shape:(e,t)=>({queryKey:["workflow-run:get:shape",e,t],queryFn:async()=>(await ot.workflowRunGetShape(e,t)).data}),get:(e,t)=>({queryKey:["workflow-run:get",e,t],queryFn:async()=>(await ot.workflowRunGet(e,t)).data}),getInput:(e,t)=>({queryKey:["workflow-run:get:input",e,t],queryFn:async()=>(await ot.workflowRunGetInput(e,t)).data}),metrics:(e,t)=>({queryKey:["workflow-run:metrics",e,t],queryFn:async()=>(await ot.workflowRunGetMetrics(e,t)).data}),listStepRunEvents:(e,t)=>({queryKey:["workflow-run:list:step-run-events",t],queryFn:async()=>(await ot.workflowRunListStepRunEvents(e,t)).data})},v1Webhooks:{list:(e,t)=>({queryKey:["v1:webhook:list",e],queryFn:async()=>(await ot.v1WebhookList(e,t)).data})},v1Events:{list:(e,t)=>({queryKey:["v1:events:list",e,t],queryFn:async()=>(await ot.v1EventList(e,t)).data})},v1WorkflowRuns:{list:(e,t)=>({queryKey:["v1:workflow-run:list",e,t],queryFn:async()=>(await ot.v1WorkflowRunList(e,t)).data}),listTaskEvents:e=>({queryKey:["v1:workflow-run:list-tasks",e],queryFn:async()=>(await ot.v1WorkflowRunTaskEventsList(e)).data}),listTaskTimings:(e,t)=>({queryKey:["v1:workflow-run:list-tasks-timings",e,t],queryFn:async()=>(await ot.v1WorkflowRunGetTimings(e,{depth:t})).data}),details:e=>({queryKey:["workflow-run-details:get",e],queryFn:async()=>(await ot.v1WorkflowRunGet(e)).data}),listDisplayNames:(e,t)=>({queryKey:["workflow-run:display-names:list",e,t],queryFn:async()=>(await ot.v1WorkflowRunDisplayNamesList(e,{external_ids:t})).data})},v1Tasks:{get:e=>({queryKey:["v1-task:get",e],queryFn:async()=>(await ot.v1TaskGet(e)).data}),getByDagId:(e,t)=>({queryKey:["v1-task:get-by-dag-id",t],queryFn:async()=>(await ot.v1DagListTasks({dag_ids:t,tenant:e})).data}),getLogs:(e,t)=>({queryKey:["v1-log-line:list",e,t],queryFn:async()=>(await ot.v1LogLineList(e,t)).data})},v1DurableTasks:{eventLog:(e,t)=>({queryKey:["v1-durable-task:event-log",e,t],queryFn:async()=>(await ot.v1DurableTaskEventLogList(e,t)).data})},v1TaskEvents:{list:(e,t,n,r)=>({queryKey:["v1:workflow-run:list",e,n,r,t],queryFn:async()=>{if(n)return(await ot.v1TaskEventList(n,t)).data;if(r)return(await ot.v1WorkflowRunTaskEventsList(r)).data;throw new Error("Either task or workflowRunId must be set")}})},v1TaskRuns:{metrics:(e,t)=>({queryKey:["v1:task-run:metrics",e,t],queryFn:async()=>(await ot.v1TaskListStatusMetrics(e,t)).data}),pointMetrics:(e,t)=>({queryKey:["v1-task:metrics",e,t],queryFn:async()=>(await ot.v1TaskGetPointMetrics(e,t)).data})},metrics:{get:e=>({queryKey:["queue-metrics:get",e],queryFn:async()=>(await ot.tenantGetQueueMetrics(e)).data}),getStepRunQueueMetrics:e=>({queryKey:["queue-metrics:get:step-run",e],queryFn:async()=>(await ot.tenantGetStepRunQueueMetrics(e)).data})},stepRuns:{get:(e,t)=>({queryKey:["step-run:get",e,t],queryFn:async()=>(await ot.stepRunGet(e,t)).data}),getLogs:(e,t)=>({queryKey:["log-lines:list",e],queryFn:async()=>(await ot.v1LogLineList(e,t)).data}),getSchema:(e,t)=>({queryKey:["step-run:get:schema",t],queryFn:async()=>(await ot.stepRunGetSchema(e,t)).data}),listEvents:e=>({queryKey:["step-run:list:events",e],queryFn:async()=>(await ot.stepRunListEvents(e)).data}),listArchives:e=>({queryKey:["step-run:list:archives",e],queryFn:async()=>(await ot.stepRunListArchives(e)).data})},events:{list:(e,t)=>({queryKey:["event:list",e,t],queryFn:async()=>(await ot.eventList(e,t)).data}),listKeys:e=>({queryKey:["event-keys:list",e],queryFn:async()=>(await ot.eventKeyList(e)).data}),get:e=>({queryKey:["event:get",e],queryFn:async()=>(await ot.eventGet(e)).data}),getData:e=>({queryKey:["event-data:get",e],queryFn:async()=>(await ot.eventDataGet(e)).data})},rate_limits:{list:(e,t)=>({queryKey:["rate-limits:list",e,t],queryFn:async()=>(await ot.rateLimitList(e,t)).data})},workers:{list:(e,t)=>({queryKey:["worker:list",e,t],queryFn:async()=>(await ot.workerList(e,t)).data}),get:e=>({queryKey:["worker:get",e],queryFn:async()=>(await ot.workerGet(e)).data})},github:{listInstallations:e=>({queryKey:["github-app:list:installations"],queryFn:async()=>(await On.githubAppListInstallations({tenant:e})).data}),listRepos:(e,t)=>({queryKey:["github-app:list:repos",e,t],queryFn:async()=>(Cr(t),(await On.githubAppListRepos(t,{tenant:e})).data),enabled:!!t}),listBranches:(e,t,n,r)=>({queryKey:["github-app:list:branches",e,t,n,r],queryFn:async()=>(Cr(t),Cr(n),Cr(r),(await On.githubAppListBranches(t,n,r,{tenant:e})).data),enabled:!!t&&!!n&&!!r})},webhookWorkers:{list:e=>({queryKey:["webhook-worker:list",e],queryFn:async()=>(await ot.webhookList(e)).data}),create:(e,t)=>({queryKey:["webhook-worker:create",e,t],queryFn:async()=>(await ot.webhookCreate(e,t)).data}),listRequests:e=>({queryKey:["webhook-worker:list:requests",e],queryFn:async()=>(await ot.webhookRequestsList(e)).data})},info:{getVersion:{queryKey:["info:version"],queryFn:async()=>(await ot.infoGetVersion()).data}}}),txe=1,nxe=1e6;let D2=0;function rxe(){return D2=(D2+1)%Number.MAX_SAFE_INTEGER,D2.toString()}const L2=new Map,g7=e=>{if(L2.has(e))return;const t=setTimeout(()=>{L2.delete(e),vw({type:"REMOVE_TOAST",toastId:e})},nxe);L2.set(e,t)},oxe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,txe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?g7(n):e.toasts.forEach(r=>{g7(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},uE=[];let cE={toasts:[]};function vw(e){cE=oxe(cE,e),uE.forEach(t=>{t(cE)})}function ixe({...e}){const t=rxe(),n=o=>vw({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>vw({type:"DISMISS_TOAST",toastId:t});return vw({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function wL(){const[e,t]=b.useState(cE);return b.useEffect(()=>(uE.push(t),()=>{const n=uE.indexOf(t);n>-1&&uE.splice(n,1)}),[e]),{...e,toast:ixe,dismiss:n=>vw({type:"DISMISS_TOAST",toastId:n})}}function v7(e){return!!e&&typeof e=="object"&&Array.isArray(e.errors)}function axe(e){return!!e&&typeof e=="object"&&typeof e.description=="string"}const h_="An internal error occurred.";function tR(e={}){const{toast:t}=wL(),n=e.setErrors?e.setErrors:o=>{for(const i of o)t({title:"Error",description:i,duration:5e3})};return{handleApiError:o=>{var s,l;console.log(o);const i=(s=o.response)==null?void 0:s.status,a=(l=o.response)==null?void 0:l.data;if(i!==void 0&&i>=500){n([h_]);return}if(i===400&&v7(a)&&a.errors.length>0){const u=yge(a);if(Object.keys(u).length!==0){e.setFieldErrors&&e.setFieldErrors(u),e.setErrors&&e.setErrors(Object.values(u));return}}if(v7(a)&&a.errors.length>0){n(a.errors.map(u=>u.description||h_));return}if(axe(a)){n([a.description||h_]);return}n([h_])}}}function qet(){var n;const{isControlPlaneEnabled:e}=Fy();return(n=Mn({queryKey:["metadata:get:integrations",e],queryFn:async()=>{try{return e?await Mt.metadataListIntegrations():await ot.metadataListIntegrations()}catch(r){return console.error("Failed to get API meta integrations",r),null}},retry:!1}).data)==null?void 0:n.data}const WX=b.createContext(null),xL=({isCloudEnabled:e,isCloudLoaded:t,isControlPlaneEnabled:n})=>({queryKey:["user-universe",e,n],queryFn:async()=>{const[r,o]=await Promise.all([e?n?Mt.organizationList():On.organizationList():null,n?Mt.tenantMembershipsList():ot.tenantMembershipsList()]),i=((r==null?void 0:r.data.rows)||[]).map(s=>({...s,tenants:s.tenants||[]})),a=o.data.rows||[];return e?{isCloudEnabled:e,organizations:i,tenantMemberships:a}:{isCloudEnabled:e,organizations:null,tenantMemberships:a}},enabled:t,refetchInterval:3e4,staleTime:3e4});function sxe({children:e}){const{isCloudEnabled:t,isCloudLoaded:n}=K3(),r=Gl(),{handleApiError:o}=tR({}),{isControlPlaneEnabled:i}=Fy(),a=Mn(xL({isCloudEnabled:t,isCloudLoaded:n,isControlPlaneEnabled:i})),s=rc(),l=b.useCallback(()=>s.invalidateQueries({queryKey:["user-universe"]}),[s]),u=Ir({mutationKey:["user:update:logout"],mutationFn:async()=>{if(i){await Mt.cloudUserUpdateLogout();return}await ot.userUpdateLogout()},onError:o,onSettled:()=>{s.clear(),r({to:ft.authLoginRoute.to})}}),c=b.useCallback(()=>a.refetch({cancelRefetch:!1}).then(h=>{if(h.isSuccess)return h.data;throw h.error}),[a]),d=b.useMemo(()=>{const h=a.isSuccess,p=a.isFetching;if(t){const x=c;return h?(Cr(a.data.organizations),{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:a.data.organizations,tenantMemberships:a.data.tenantMemberships,get:x,invalidate:l,logoutMutation:u}):{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:null,get:x,invalidate:l,logoutMutation:u}}else{const x=c;return h?{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:a.data.tenantMemberships,get:x,invalidate:l,logoutMutation:u}:{isCloudEnabled:t,isLoaded:h,isFetching:p,organizations:null,tenantMemberships:null,get:x,invalidate:l,logoutMutation:u}}},[a,t,c,l,u]);return v.jsx(WX.Provider,{value:d,children:e})}function nR(){const e=b.useContext(WX);return Cr(e),e}function HX(){const{isControlPlaneEnabled:e}=Fy();return b.useMemo(()=>({userGetCurrentQuery:()=>({queryKey:["user:get"],queryFn:async()=>(await(e?Mt.cloudUserGetCurrent():ot.userGetCurrent())).data}),userUpdateGoogleOauthStartQuery:()=>({queryKey:["user:google-oauth:start"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGoogleOauthStart():ot.userUpdateGoogleOauthStart())).data}),userUpdateGoogleOauthCallbackQuery:()=>({queryKey:["user:google-oauth:callback"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGoogleOauthCallback():ot.userUpdateGoogleOauthCallback())).data}),userUpdateGithubOauthStartQuery:()=>({queryKey:["user:github-oauth:start"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGithubOauthStart():ot.userUpdateGithubOauthStart())).data}),userUpdateGithubOauthCallbackQuery:()=>({queryKey:["user:github-oauth:callback"],queryFn:async()=>(await(e?Mt.cloudUserUpdateGithubOauthCallback():ot.userUpdateGithubOauthCallback())).data}),userUpdateLoginMutation:()=>({mutationKey:["user:update:login"],mutationFn:async t=>(await(e?Mt.cloudUserUpdateLogin(t):ot.userUpdateLogin(t))).data}),userCreateMutation:()=>({mutationKey:["user:create"],mutationFn:async t=>(await(e?Mt.cloudUserCreate(t):ot.userCreate(t))).data}),userUpdateLogoutMutation:()=>({mutationKey:["user:update:logout"],mutationFn:async()=>(await(e?Mt.cloudUserUpdateLogout():ot.userUpdateLogout())).data}),userUpdatePasswordMutation:()=>({mutationKey:["user:update:password"],mutationFn:async t=>(await(e?Mt.cloudUserUpdatePassword(t):ot.userUpdatePassword(t))).data})}),[e])}const Bu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function GX(e){return"init"in e}function zI(e){return!!e.write}function lxe(e){return!!e.onMount}function y7(e){return"v"in e||"e"in e}function FE(e){if("e"in e)throw e.e;if((Bu?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function BE(e){return typeof(e==null?void 0:e.then)=="function"}function KX(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function YX(e,t,n){const r=n.get(e),o=r==null?void 0:r.t,i=t.p;if(!(o!=null&&o.size))return i;if(!i.size)return o;const a=new Set(o);for(const s of i)a.add(s);return a}const uxe=(e,t,...n)=>t.read(...n),cxe=(e,t,...n)=>t.write(...n),fxe=(e,t)=>{var n;return(n=t.INTERNAL_onInit)==null?void 0:n.call(t,e)},dxe=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},hxe=(e,t)=>{var n;const r=To(e),o=r[0],i=r[6],a=r[9];if((Bu?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let s=o.get(t);return s||(s={d:new Map,p:new Set,n:0},o.set(t,s),(n=i.i)==null||n.call(i,t),a==null||a(e,t)),s},pxe=e=>{var t;const n=To(e),r=n[1],o=n[3],i=n[4],a=n[5],s=n[6],l=n[13];if(!s.f&&!o.size&&!i.size&&!a.size)return;const u=[],c=d=>{try{d()}catch(h){u.push(h)}};do{s.f&&c(s.f);const d=new Set;for(const h of o){const p=(t=r.get(h))==null?void 0:t.l;if(p)for(const x of p)d.add(x)}o.clear();for(const h of a)d.add(h);a.clear();for(const h of i)d.add(h);i.clear();for(const h of d)c(h);o.size&&l(e)}while(o.size||a.size||i.size);if(u.length)throw new AggregateError(u)},mxe=e=>{const t=To(e),n=t[1],r=t[2],o=t[3],i=t[11],a=t[14],s=t[17];if(!o.size)return;const l=[],u=[],c=new WeakSet,d=new WeakSet,h=[],p=[];for(const x of o)h.push(x),p.push(i(e,x));for(;h.length;){const x=h.length-1,y=h[x],w=p[x];if(d.has(y)){h.pop(),p.pop();continue}if(c.has(y)){if(r.get(y)===w.n)l.push(y),u.push(w);else if((Bu?"production":void 0)!=="production"&&r.has(y))throw new Error("[Bug] invalidated atom exists");d.add(y),h.pop(),p.pop();continue}c.add(y);for(const _ of YX(y,w,n))c.has(_)||(h.push(_),p.push(i(e,_)))}for(let x=l.length-1;x>=0;--x){const y=l[x],w=u[x];let _=!1;for(const C of w.d.keys())if(C!==y&&o.has(C)){_=!0;break}_&&(r.set(y,w.n),a(e,y),s(e,y)),r.delete(y)}},qI=new WeakSet,gxe=(e,t)=>{var n,r;const o=To(e),i=o[1],a=o[2],s=o[3],l=o[6],u=o[7],c=o[11],d=o[12],h=o[13],p=o[14],x=o[16],y=o[17],w=o[20],_=o[26],C=o[28],O=c(e,t),P=C[0];if(y7(O)){if(i.has(t)&&a.get(t)!==O.n||O.m===P)return O.m=P,O;let W=!1;for(const[q,Y]of O.d)if(p(e,q).n!==Y){W=!0;break}if(!W)return O.m=P,O}let R=!0;const T=new Set(O.d.keys()),k=()=>{for(const W of T)O.d.delete(W)},M=()=>{if(i.has(t)){const W=!s.size;y(e,t),W&&(h(e),d(e))}},j=W=>{var q;if(W===t){const U=c(e,W);if(!y7(U))if(GX(W))w(e,W,W.init);else throw new Error("no atom init");return FE(U)}const Y=p(e,W);try{return FE(Y)}finally{T.delete(W),O.d.set(W,Y.n),BE(O.v)&&KX(t,O.v,Y),i.has(t)&&((q=i.get(W))==null||q.t.add(t)),R||M()}};let $,L;const K={get signal(){return $||($=new AbortController),$.signal},get setSelf(){return(Bu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(Bu?"production":void 0)!=="production"&&!zI(t)&&console.warn("setSelf function cannot be used with read-only atom"),!L&&zI(t)&&(L=(...W)=>{if((Bu?"production":void 0)!=="production"&&R&&console.warn("setSelf function cannot be called in sync"),!R)try{return x(e,t,...W)}finally{h(e),d(e)}}),L}},H=O.n,D=a.get(t)===H;try{(Bu?"production":void 0)!=="production"&&qI.delete(e);const W=u(e,t,j,K);if((Bu?"production":void 0)!=="production"&&qI.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),w(e,t,W),BE(W)){_(e,W,()=>$==null?void 0:$.abort());const q=()=>{k(),M()};W.then(q,q)}else k();return(n=l.r)==null||n.call(l,t),O.m=P,O}catch(W){return delete O.v,O.e=W,++O.n,O.m=P,O}finally{R=!1,O.n!==H&&D&&(a.set(t,O.n),s.add(t),(r=l.c)==null||r.call(l,t))}},vxe=(e,t)=>{const n=To(e),r=n[1],o=n[2],i=n[11],a=[t];for(;a.length;){const s=a.pop(),l=i(e,s);for(const u of YX(s,l,r)){const c=i(e,u);o.get(u)!==c.n&&(o.set(u,c.n),a.push(u))}}},yxe=(e,t,...n)=>{const r=To(e),o=r[3],i=r[6],a=r[8],s=r[11],l=r[12],u=r[13],c=r[14],d=r[15],h=r[16],p=r[17],x=r[20],y=r[28];let w=!0;const _=O=>FE(c(e,O)),C=(O,...P)=>{var R;const T=s(e,O);try{if(O===t){if(!GX(O))throw new Error("atom not writable");(Bu?"production":void 0)!=="production"&&qI.add(e);const k=T.n,M=P[0];x(e,O,M),p(e,O),k!==T.n&&(++y[0],o.add(O),d(e,O),(R=i.c)==null||R.call(i,O));return}else return h(e,O,...P)}finally{w||(u(e),l(e))}};try{return a(e,t,_,C,...n)}finally{w=!1}},wxe=(e,t)=>{var n;const r=To(e),o=r[1],i=r[3],a=r[6],s=r[11],l=r[15],u=r[18],c=r[19],d=s(e,t),h=o.get(t);if(h&&d.d.size>0){for(const[p,x]of d.d)if(!h.d.has(p)){const y=s(e,p);u(e,p).t.add(t),h.d.add(p),x!==y.n&&(i.add(p),l(e,p),(n=a.c)==null||n.call(a,p))}for(const p of h.d)if(!d.d.has(p)){h.d.delete(p);const x=c(e,p);x==null||x.t.delete(t)}}},xxe=(e,t)=>{var n;const r=To(e),o=r[1],i=r[4],a=r[6],s=r[10],l=r[11],u=r[12],c=r[13],d=r[14],h=r[16],p=r[18],x=l(e,t);let y=o.get(t);if(!y){d(e,t);for(const w of x.d.keys())p(e,w).t.add(t);if(y={l:new Set,d:new Set(x.d.keys()),t:new Set},o.set(t,y),zI(t)&&lxe(t)){const w=()=>{let _=!0;const C=(...O)=>{try{return h(e,t,...O)}finally{_||(c(e),u(e))}};try{const O=s(e,t,C);O&&(y.u=()=>{_=!0;try{O()}finally{_=!1}})}finally{_=!1}};i.add(w)}(n=a.m)==null||n.call(a,t)}return y},bxe=(e,t)=>{var n,r;const o=To(e),i=o[1],a=o[5],s=o[6],l=o[11],u=o[19],c=l(e,t);let d=i.get(t);if(!d||d.l.size)return d;let h=!1;for(const p of d.t)if((n=i.get(p))!=null&&n.d.has(t)){h=!0;break}if(!h){d.u&&a.add(d.u),d=void 0,i.delete(t);for(const p of c.d.keys()){const x=u(e,p);x==null||x.t.delete(t)}(r=s.u)==null||r.call(s,t);return}return d},Sxe=(e,t,n)=>{const r=To(e),o=r[11],i=r[27],a=o(e,t),s="v"in a,l=a.v;if(BE(n))for(const u of a.d.keys())KX(t,n,o(e,u));a.v=n,delete a.e,(!s||!Object.is(l,a.v))&&(++a.n,BE(l)&&i(e,l))},_xe=(e,t)=>{const n=To(e)[14];return FE(n(e,t))},Exe=(e,t,...n)=>{const r=To(e),o=r[3],i=r[12],a=r[13],s=r[16],l=o.size;try{return s(e,t,...n)}finally{o.size!==l&&(a(e),i(e))}},Cxe=(e,t,n)=>{const r=To(e),o=r[12],i=r[18],a=r[19],l=i(e,t).l;return l.add(n),o(e),()=>{l.delete(n),a(e,t),o(e)}},Oxe=(e,t,n)=>{const o=To(e)[25];let i=o.get(t);if(!i){i=new Set,o.set(t,i);const a=()=>o.delete(t);t.then(a,a)}i.add(n)},Rxe=(e,t)=>{const o=To(e)[25].get(t);o==null||o.forEach(i=>i())},XX=new WeakMap,To=e=>{const t=XX.get(e);if((Bu?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function Pxe(e){const t=To(e),n=t[24];return n?n(t):t}function Txe(...e){const t={get(r){const o=To(t)[21];return o(t,r)},set(r,...o){const i=To(t)[22];return i(t,r,...o)},sub(r,o){const i=To(t)[23];return i(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},uxe,cxe,fxe,dxe,hxe,pxe,mxe,gxe,vxe,yxe,wxe,xxe,bxe,Sxe,_xe,Exe,Cxe,void 0,new WeakMap,Oxe,Rxe,[0]].map((r,o)=>e[o]||r);return XX.set(t,Object.freeze(n)),t}const QX={};let Axe=0;function Gy(e,t){const n=`atom${++Axe}`,r={toString(){return(QX?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=kxe,r.write=Nxe),t&&(r.write=t),r}function kxe(e){return e(this)}function Nxe(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function Mxe(){return Txe()}let P1;function jxe(){return P1||(P1=Mxe(),(QX?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=P1),globalThis.__JOTAI_DEFAULT_STORE__!==P1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),P1}const Ixe={},Dxe=b.createContext(void 0);function ZX(e){return b.useContext(Dxe)||jxe()}const UI=e=>typeof(e==null?void 0:e.then)=="function",VI=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Lxe=J.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(VI(e),e)}),$2=new WeakMap,w7=(e,t,n)=>{const o=Pxe(e)[26];let i=$2.get(t);return i||(i=new Promise((a,s)=>{let l=t;const u=h=>p=>{l===h&&a(p)},c=h=>p=>{l===h&&s(p)},d=()=>{try{const h=n();UI(h)?($2.set(h,i),l=h,h.then(u(h),c(h)),o(e,h,d)):a(h)}catch(h){s(h)}};t.then(u(t),c(t)),o(e,t,d)}),$2.set(t,i)),i};function $xe(e,t){const{delay:n,unstable_promiseStatus:r=!J.use}={},o=ZX(),[[i,a,s],l]=b.useReducer(c=>{const d=o.get(e);return Object.is(c[0],d)&&c[1]===o&&c[2]===e?c:[d,o,e]},void 0,()=>[o.get(e),o,e]);let u=i;if((a!==o||s!==e)&&(l(),u=o.get(e)),b.useEffect(()=>{const c=o.sub(e,()=>{if(r)try{const d=o.get(e);UI(d)&&VI(w7(o,d,()=>o.get(e)))}catch{}if(typeof n=="number"){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3. - -Migration guide: - -Create a custom hook like the following. - -function useAtomValueWithDelay( - atom: Atom, - options: { delay: number }, -): Value { - const { delay } = options - const store = useStore(options) - const [value, setValue] = useState(() => store.get(atom)) - useEffect(() => { - const unsub = store.sub(atom, () => { - setTimeout(() => setValue(store.get(atom)), delay) - }) - return unsub - }, [store, atom, delay]) - return value -} -`),setTimeout(l,n);return}l()});return l(),c},[o,e,n,r]),b.useDebugValue(u),UI(u)){const c=w7(o,u,()=>o.get(e));return r&&VI(c),Lxe(c)}return u}function JX(e,t){const n=ZX();return b.useCallback((...o)=>{if((Ixe?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function eQ(e,t){return[$xe(e),JX(e)]}const bL=(e,t)=>{const n=localStorage.getItem(e);if(n!==null)return JSON.parse(n);if(t!==void 0)return t},WI="lastTenant",x7=Gy(bL(WI)),SL=Gy(e=>e(x7),(e,t,n)=>{if(t(x7,n),n===void 0){localStorage.removeItem(WI);return}localStorage.setItem(WI,JSON.stringify(n))}),tQ="lastWorkerMetricsTimeRange",b7=Gy(bL(tQ,"1h")),Uet=Gy(e=>e(b7),(e,t,n)=>{t(b7,n),localStorage.setItem(tQ,JSON.stringify(n))}),nQ="wrView",S7=Gy(bL(nQ,"minimap")),Vet=Gy(e=>e(S7),(e,t,n)=>{t(S7,n),localStorage.setItem(nQ,JSON.stringify(n))}),rQ=b.createContext(null),Fxe=e=>{if(e)return Cr(e.tenant),e.tenant};function Bxe({children:e}){var R,T,k;const t=ta({strict:!1}),[n,r]=eQ(SL),o=t.tenant,i=t.organization,{userGetCurrentQuery:a}=HX(),s=Mn({...a(),retry:!1}),l=rc(),u=b.useCallback(()=>{l.resetQueries({queryKey:a().queryKey})},[l,a]),{isLoaded:c,organizations:d,tenantMemberships:h,isCloudEnabled:p}=nR(),x=b.useMemo(()=>{var $;if(!i||!p||!d)return;const M=d.find(L=>L.metadata.id===i);return M?M.tenants.some(L=>L.id===(n==null?void 0:n.metadata.id))?n==null?void 0:n.metadata.id:($=M.tenants[0])==null?void 0:$.id:void 0},[i,p,d,n==null?void 0:n.metadata.id]),y=b.useMemo(()=>{if(!(!(n!=null&&n.metadata.id)||!h))return h.find(M=>{var j;return((j=M.tenant)==null?void 0:j.metadata.id)===n.metadata.id})},[n==null?void 0:n.metadata.id,h]),w=((R=y==null?void 0:y.tenant)==null?void 0:R.metadata.id)??((k=(T=h==null?void 0:h[0])==null?void 0:T.tenant)==null?void 0:k.metadata.id),_=o||x||w,C=b.useMemo(()=>{if(!(!_||!h))return h.find(M=>{var j;return((j=M.tenant)==null?void 0:j.metadata.id)===_})},[_,h]),O=b.useMemo(()=>Fxe(C),[C]);b.useEffect(()=>{O&&O.metadata.id!==(n==null?void 0:n.metadata.id)&&r(O)},[O,n,r]);const P=b.useMemo(()=>{const M={user:s.data,isUserLoaded:s.isSuccess,isUserLoading:s.isLoading,userError:s.error,isUserError:s.isError,invalidateCurrentUser:u,tenant:O,tenantId:o||(O==null?void 0:O.metadata.id)};return c?p?{...M,isUserUniverseLoaded:!0,isCloudEnabled:!0,membership:C==null?void 0:C.role,organizations:d||[]}:{...M,isUserUniverseLoaded:!0,isCloudEnabled:!1,membership:C==null?void 0:C.role,organizations:void 0}:{...M,isUserUniverseLoaded:!1,membership:void 0,organizations:void 0}},[s.data,s.isLoading,s.isSuccess,s.error,s.isError,u,O,o,c,p,C==null?void 0:C.role,d]);return v.jsx(rQ.Provider,{value:P,children:e})}function rR(){const e=b.useContext(rQ);if(!e)throw new Error("useAppContext must be used within AppContextProvider");return e}function zxe(){const{user:e,isUserLoading:t,isUserError:n,userError:r,invalidateCurrentUser:o}=rR();return{currentUser:e,isLoading:t,isError:n||!e&&!t,error:r,invalidate:o}}var qxe=(e=>(e.YCAlumni="YC Alumni",e.YCCurrentBatch="YC Current Batch",e.Startup="Startup",e.Custom="Custom",e))(qxe||{}),Uxe=(e=>(e.Requested="Requested",e.Approved="Approved",e.Redeemed="Redeemed",e))(Uxe||{}),Vxe=(e=>(e.PENDING="PENDING",e.ACCEPTED="ACCEPTED",e.REJECTED="REJECTED",e.EXPIRED="EXPIRED",e))(Vxe||{}),Wxe=(e=>(e.Value30D="30D",e.Value60D="60D",e.Value90D="90D",e))(Wxe||{}),oQ=(e=>(e.ACTIVE="ACTIVE",e.ARCHIVED="ARCHIVED",e))(oQ||{}),Hxe=(e=>(e.OWNER="OWNER",e.MEMBER="MEMBER",e))(Hxe||{}),Gxe=(e=>(e.QUICKSTART_PYTHON="QUICKSTART_PYTHON",e.QUICKSTART_TYPESCRIPT="QUICKSTART_TYPESCRIPT",e.QUICKSTART_GO="QUICKSTART_GO",e))(Gxe||{}),Kxe=(e=>(e.Ams="ams",e.Arn="arn",e.Bom="bom",e.Cdg="cdg",e.Dfw="dfw",e.Ewr="ewr",e.Fra="fra",e.Gru="gru",e.Iad="iad",e.Jnb="jnb",e.Lax="lax",e.Lhr="lhr",e.Nrt="nrt",e.Ord="ord",e.Sin="sin",e.Sjc="sjc",e.Syd="syd",e.Yyz="yyz",e))(Kxe||{}),Yxe=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.SCALE_UP="SCALE_UP",e.SCALE_DOWN="SCALE_DOWN",e))(Yxe||{});function Xxe(){const{isControlPlaneEnabled:e}=Fy();return b.useMemo(()=>({organizationListQuery:()=>({queryKey:["organization:list"],queryFn:async()=>(await(e?Mt.organizationList():On.organizationList())).data}),organizationGetQuery:t=>({queryKey:["organization:get",t],queryFn:async()=>(await(e?Mt.organizationGet(t):On.organizationGet(t))).data}),organizationAvailableShardsQuery:t=>({queryKey:["organization:available-shards",t],queryFn:async()=>(await Mt.organizationListAvailableShards(t)).data}),sharedShardsQuery:()=>({queryKey:["shards:list:shared"],queryFn:async()=>(await Mt.shardsListShared()).data}),organizationSsoDomainGetQuery:t=>({queryKey:["organization:sso_domain:get",t],queryFn:async()=>(await Mt.ssoDomainList(t)).data}),organizationSsoConfigGetQuery:t=>({queryKey:["organization:sso_config:get",t],queryFn:async()=>(await Mt.ssoConfigGet(t)).data}),organizationEntitlementsGetQuery:t=>({queryKey:["organization:entitlements:get",t],queryFn:async()=>(await Mt.organizationEntitlementsGet(t)).data}),managementTokenListQuery:t=>({queryKey:["management-tokens:list",t],queryFn:async()=>(await(e?Mt.managementTokenList(t):On.managementTokenList(t))).data}),userListOrganizationInvitesQuery:()=>({queryKey:["user:list:organization-invites"],queryFn:async()=>(await(e?Mt.userListOrganizationInvites():On.userListOrganizationInvites())).data}),organizationInviteListQuery:t=>({queryKey:["organization-invites:list",t],queryFn:async()=>(await(e?Mt.organizationInviteList(t):On.organizationInviteList(t))).data}),organizationSsoConfigUpdateMutation:t=>({mutationKey:["organization:sso_config:update",t],mutationFn:async n=>(await Mt.ssoConfigUpdate(t,{forceSSO:n})).data}),organizationSsoDomainCreateMutation:t=>({mutationKey:["organization:sso_domain:create",t],mutationFn:async n=>(await Mt.ssoDomainCreate(t,{ssoDomain:n})).data}),organizationSsoDomainDeleteMutation:t=>({mutationKey:["organization:sso_domain:create",t],mutationFn:async n=>(await Mt.ssoDomainDelete(n)).data}),organizationCreateMutation:()=>({mutationKey:["organization:create"],mutationFn:async t=>(await(e?Mt.organizationCreate(t):On.organizationCreate(t))).data}),organizationUpdateMutation:t=>({mutationKey:["organization:update",t],mutationFn:async n=>(await(e?Mt.organizationUpdate(t,n):On.organizationUpdate(t,n))).data}),organizationCreateTenantMutation:t=>({mutationKey:["organization:create-tenant",t],mutationFn:async n=>(await(e?Mt.organizationCreateTenant(t,n):On.organizationCreateTenant(t,n))).data}),organizationTenantDeleteMutation:t=>({mutationKey:["organization-tenant:delete",t],mutationFn:async()=>(await(e?Mt.organizationTenantDelete(t):On.organizationTenantDelete(t))).data}),organizationMemberDeleteMutation:t=>({mutationKey:["organization-member:delete",t],mutationFn:async n=>(await(e?Mt.organizationMemberDelete(t,n):On.organizationMemberDelete(t,n))).data}),managementTokenCreateMutation:t=>({mutationKey:["management-token:create",t],mutationFn:async n=>(await(e?Mt.managementTokenCreate(t,n):On.managementTokenCreate(t,n))).data}),managementTokenDeleteMutation:t=>({mutationKey:["management-token:delete",t],mutationFn:async()=>(await(e?Mt.managementTokenDelete(t):On.managementTokenDelete(t))).data}),organizationInviteAcceptMutation:()=>({mutationKey:["organization-invite:accept"],mutationFn:async t=>(await(e?Mt.organizationInviteAccept(t):On.organizationInviteAccept(t))).data}),organizationInviteRejectMutation:()=>({mutationKey:["organization-invite:reject"],mutationFn:async t=>(await(e?Mt.organizationInviteReject(t):On.organizationInviteReject(t))).data}),organizationInviteCreateMutation:t=>({mutationKey:["organization-invite:create",t],mutationFn:async n=>(await(e?Mt.organizationInviteCreate(t,n):On.organizationInviteCreate(t,n))).data}),organizationInviteDeleteMutation:t=>({mutationKey:["organization-invite:delete",t],mutationFn:async()=>(await(e?Mt.organizationInviteDelete(t):On.organizationInviteDelete(t))).data}),tenantTagsGetQuery:(t,n)=>({queryKey:["organization-tenant:list:tags",t,n],queryFn:async()=>(await Mt.organizationTenantListTags(t,n)).data}),tenantTagsSetMutation:(t,n)=>({mutationKey:["organization-tenant:set:tags",t,n],mutationFn:async r=>(await Mt.organizationTenantSetTags(t,n,{tags:r})).data}),userGroupsListQuery:t=>({queryKey:["organization:user-groups:list",t],queryFn:async()=>(await Mt.organizationUserGroupsList(t)).data}),userGroupCreateMutation:t=>({mutationKey:["organization:user-groups:create",t],mutationFn:async n=>(await Mt.organizationUserGroupsCreate(t,{name:n.name,role:n.role})).data}),userGroupGetQuery:(t,n)=>({queryKey:["organization:user-group:get",t,n],queryFn:async()=>(await Mt.organizationUserGroupGet(t,n)).data}),userGroupUpdateMutation:(t,n)=>({mutationKey:["organization:user-group:update",t,n],mutationFn:async r=>(await Mt.organizationUserGroupUpdate(t,n,r)).data}),userGroupDeleteMutation:(t,n)=>({mutationKey:["organization:user-group:delete",t,n],mutationFn:async()=>Mt.organizationUserGroupDelete(t,n)}),userGroupTagsGetQuery:(t,n)=>({queryKey:["organization:user-group:tags:get",t,n],queryFn:async()=>(await Mt.organizationUserGroupListTags(t,n)).data}),userGroupTagsSetMutation:(t,n)=>({mutationKey:["organization:user-group:tags:set",t,n],mutationFn:async r=>(await Mt.organizationUserGroupSetTags(t,n,{tags:r})).data}),userGroupMembersListQuery:(t,n)=>({queryKey:["organization:user-group:members:list",t,n],queryFn:async()=>(await Mt.organizationUserGroupListMembers(t,n)).data}),userGroupMemberAddMutation:(t,n)=>({mutationKey:["organization:user-group:members:add",t,n],mutationFn:async r=>Mt.organizationUserGroupAddMember(t,n,{organizationMemberId:r})}),userGroupMemberRemoveMutation:(t,n)=>({mutationKey:["organization:user-group:members:remove",t,n],mutationFn:async r=>Mt.organizationUserGroupRemoveMember(t,n,r)}),organizationTenantMembersAddMutation:(t,n)=>({mutationKey:["organization-tenant:members:add",t,n],mutationFn:async r=>(await(e?Mt.organizationTenantMembersAdd(t,n,r):On.organizationTenantMembersAdd(t,n,r))).data})}),[e])}const Qxe=336*60*60*1e3;function Zxe(){var G;const{organizations:e,isLoaded:t,isCloudEnabled:n}=nR(),{handleApiError:r}=tR({}),o=Xxe(),i=Mn({...o.organizationListQuery(),enabled:n}),a=b.useMemo(()=>t&&n?(Cr(e),e):[],[t,e,n]),s=b.useMemo(()=>{const z=new Map;return a.forEach(X=>{X.tenants.forEach(ee=>{z.set(ee.id,X)})}),X=>z.get(X)},[a]),l=b.useCallback(z=>{const X=s(z);return(X==null?void 0:X.metadata.id)||null},[s]),u=b.useCallback(z=>{var ee,ae;const X=s(z);return X?((ae=(ee=X.tenants)==null?void 0:ee.find(fe=>fe.id===z))==null?void 0:ae.status)===oQ.ARCHIVED:!1},[s]),c=b.useMemo(()=>{var z,X;return(((X=(z=i.data)==null?void 0:z.rows)==null?void 0:X.length)||0)>0},[(G=i.data)==null?void 0:G.rows]),d=o.organizationInviteAcceptMutation(),h=Ir({mutationKey:d.mutationKey,mutationFn:async z=>{await d.mutationFn({id:z.inviteId})},onError:r}),p=o.organizationInviteRejectMutation(),x=Ir({mutationKey:p.mutationKey,mutationFn:async z=>{await p.mutationFn({id:z.inviteId})},onError:r}),y=Ir({mutationFn:async z=>o.organizationCreateTenantMutation(z.organizationId).mutationFn({name:z.name,slug:z.slug}),onSuccess:()=>{localStorage.setItem("hatchet:show-welcome","1")},onError:r}),w=Ir({mutationFn:async z=>{await o.organizationInviteDeleteMutation(z.inviteId).mutationFn()},onError:r}),_=b.useCallback((z,X,ee)=>{w.mutate({inviteId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[w]),C=Ir({mutationFn:async z=>{const X={name:z.name};return z.duration!=null&&(X.duration=z.duration),z.tags&&z.tags.length>0&&(X.tags=z.tags),o.managementTokenCreateMutation(z.organizationId).mutationFn(X)}}),O=Ir({mutationFn:async z=>{await o.organizationMemberDeleteMutation(z.memberId).mutationFn({emails:[z.email]})},onError:r}),P=Ir({mutationFn:async z=>{await o.managementTokenDeleteMutation(z.tokenId).mutationFn()},onError:r}),R=Ir({mutationFn:async z=>{await o.organizationTenantDeleteMutation(z.tenantId).mutationFn()},onError:r}),T=Ir({mutationFn:async z=>o.organizationUpdateMutation(z.organizationId).mutationFn({name:z.name,inactivity_timeout:z.inactivity_timeout}),onError:r}),k=o.organizationCreateMutation(),M=Ir({...k,onError:r,onSuccess:()=>{i.refetch()}}),j=Ir({mutationFn:async z=>o.organizationSsoDomainCreateMutation(z.organizationId).mutationFn(z.ssoDomain),onError:r}),$=Ir({mutationFn:async z=>o.organizationSsoDomainDeleteMutation(z.organizationId).mutationFn(z.ssoDomain),onError:r}),L=b.useCallback((z,X,ee,ae,fe,ie)=>{C.mutate({organizationId:z,name:X,duration:ee,tags:fe},{onSuccess:we=>{ae(we)},onError:we=>{ie?ie(we):r(we)}})},[C,r]),K=b.useCallback((z,X,ee)=>{z&&O.mutate({memberId:z.metadata.id,email:z.email},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[O]),H=b.useCallback((z,X,ee)=>{P.mutate({tokenId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[P]),D=b.useCallback((z,X,ee)=>{R.mutate({tenantId:z},{onSuccess:()=>{X(),ee(!1)},onError:()=>{ee(!1)}})},[R]),W=b.useCallback((z,X,ee)=>{T.mutate({organizationId:z,name:X},{onSuccess:()=>{ee()},onError:()=>{}})},[T]),q=(z,X,ee)=>{if(X>Qxe)throw new Error("Inactivity timeout must not exceed 14 days.");T.mutate({organizationId:z,inactivity_timeout:`${X}ms`},{onSuccess:()=>{ee()},onError:()=>{}})},Y=b.useCallback((z,X)=>{M.mutate({name:z},{onSuccess:ee=>{X(ee.metadata.id)},onError:()=>{}})},[M]),U=b.useCallback((z,X,ee,ae)=>{j.mutate({organizationId:z,ssoDomain:X},{onSuccess:()=>{ee(z)},onError:()=>{ae==null||ae()}})},[j]),V=b.useCallback((z,X,ee)=>{$.mutate({organizationId:z,ssoDomain:X},{onSuccess:()=>{ee(z)},onError:()=>{}})},[$]);return{organizations:a,organizationData:e,isCloudEnabled:n,getOrganizationForTenant:s,getOrganizationIdForTenant:l,isTenantArchivedInOrg:u,hasOrganizations:c,acceptOrgInviteMutation:h,rejectOrgInviteMutation:x,createTenantMutation:y,handleCancelInvite:_,handleCreateToken:L,handleDeleteMember:K,handleDeleteToken:H,handleDeleteTenant:D,handleUpdateOrganization:W,handleUpdateOrganizationTimeout:q,handleCreateOrganization:Y,handleCreateOrganizationSsoDomain:U,handleDeleteOrganizationSsoDomain:V,cancelInviteLoading:w.isPending,createTokenLoading:C.isPending,deleteMemberLoading:O.isPending,deleteTokenLoading:P.isPending,deleteTenantLoading:R.isPending,updateOrganizationLoading:T.isPending,createOrganizationLoading:M.isPending,isUserUniverseLoaded:t,error:i.error}}function Jxe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))}const ebe=b.forwardRef(Jxe);function tbe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const nbe=b.forwardRef(tbe);function rbe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const obe=b.forwardRef(rbe);function ibe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const iQ=b.forwardRef(ibe);function abe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const aQ=b.forwardRef(abe);function sbe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const lbe=b.forwardRef(sbe);function ube({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const cbe=b.forwardRef(ube);function fbe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}const _7=b.forwardRef(fbe);function dbe({title:e,titleId:t,...n},r){return b.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?b.createElement("title",{id:t},e):null,b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const sQ=b.forwardRef(dbe);function lQ({membership:e,onSelect:t,indented:n}){var r;return v.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-foreground/80 transition-colors hover:bg-muted/50 hover:text-foreground",style:n?{paddingLeft:"2rem"}:void 0,children:[v.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:v.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"})}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:(r=e.tenant)==null?void 0:r.name})]})}function hbe({organization:e,tenants:t,onTenantSelect:n,defaultExpanded:r}){const[o,i]=b.useState(r??!0);return t.length===0?null:v.jsxs("div",{children:[v.jsxs("button",{type:"button",onClick:()=>i(!o),className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm font-medium transition-colors hover:bg-muted/50",children:[o?v.jsx(iQ,{className:"size-3 shrink-0"}):v.jsx(aQ,{className:"size-3 shrink-0"}),v.jsx(ebe,{className:"size-4 shrink-0"}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})]}),o&&t.sort((a,s)=>{var l,u;return(((l=a.tenant)==null?void 0:l.name)??"").toLowerCase().localeCompare((((u=s.tenant)==null?void 0:u.name)??"").toLowerCase())}).map(a=>v.jsx(lQ,{membership:a,onSelect:()=>n(a),indented:!0},a.metadata.id))]})}function pbe(){const e=Gl(),t=ta({strict:!1}),n=vL(t,"tenant"),r=JX(SL),o=rc(),{currentUser:i}=zxe(),{tenantMemberships:a,isCloudEnabled:s}=nR(),{organizations:l,getOrganizationForTenant:u,isTenantArchivedInOrg:c}=Zxe(),{userUpdateLogoutMutation:d}=HX(),h=Ir({...d(),onSuccess:()=>{o.clear(),e({to:ft.authLoginRoute.to,replace:!0})}}),p=_=>{_.tenant&&(r(_.tenant),o.clear(),e({to:ft.tenantRunsRoute.to,params:{tenant:_.tenant.metadata.id}}))},x=b.useMemo(()=>(a==null?void 0:a.filter(_=>{var O;const C=(O=_.tenant)==null?void 0:O.metadata.id;return!(!C||C===n||s&&c(C))}))||[],[a,n,s,c]),{orgGroups:y,standaloneTenants:w}=b.useMemo(()=>{if(!s)return{orgGroups:[],standaloneTenants:x};const _=new Map,C=[];return x.forEach(P=>{var k;const R=((k=P.tenant)==null?void 0:k.metadata.id)||"",T=u(R);if(T){const M=T.metadata.id;_.has(M)||_.set(M,[]),_.get(M).push(P)}else C.push(P)}),{orgGroups:l.map(P=>({organization:P,tenants:_.get(P.metadata.id)||[]})).filter(P=>P.tenants.length>0).sort((P,R)=>P.organization.name.toLowerCase().localeCompare(R.organization.name.toLowerCase())),standaloneTenants:C}},[s,x,l,u]);return v.jsxs(zO,{icon:v.jsx(Pwe,{className:"h-6 w-6"}),title:"Access denied",description:"You don't have permission to view this tenant.",actions:v.jsx(xt,{leftIcon:v.jsx(qX,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"}),children:[v.jsx("div",{className:"flex justify-center",children:v.jsx(Ti,{variant:"secondary",className:"font-mono",children:"403"})}),v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested Tenant"}),v.jsx("div",{className:"break-all text-foreground/90",children:n||"unknown"})]}),x.length>0&&v.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-1",children:[v.jsx("div",{className:"px-3 pb-1 pt-2 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Switch to another tenant"}),v.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[y.map(({organization:_,tenants:C})=>v.jsx(hbe,{organization:_,tenants:C,onTenantSelect:p},_.metadata.id)),w.length>0&&w.sort((_,C)=>{var O,P;return(((O=_.tenant)==null?void 0:O.name)??"").toLowerCase().localeCompare((((P=C.tenant)==null?void 0:P.name)??"").toLowerCase())}).map(_=>v.jsx(lQ,{membership:_,onSelect:()=>p(_)},_.metadata.id))]})]}),v.jsxs("div",{className:"flex flex-row flex-wrap items-center justify-center gap-2",children:[!!(i!=null&&i.email)&&v.jsxs("div",{className:"text-xs text-muted-foreground",children:["Signed in as ",v.jsx("span",{className:"font-mono",children:i.email})]}),v.jsx(xt,{leftIcon:v.jsx(mwe,{className:"size-4"}),onClick:()=>h.mutate(),size:"sm",variant:"ghost",children:"Sign out"})]})]})}function uQ(e,t){if(!(!e||typeof e!="object"))return Reflect.get(e,t)}function _L(e){var n;if(!e)return;if(e instanceof Response)return e.status;if(L3(e))return(n=e.response)==null?void 0:n.status;const t=uQ(e,"status");return typeof t=="number"?t:void 0}function mbe(e){var n;if(!e)return;if(e instanceof Response)return e.statusText;if(L3(e))return(n=e.response)==null?void 0:n.statusText;const t=uQ(e,"statusText");return typeof t=="string"?t:void 0}function Wet(e){const t=_L(e);return!(t!==void 0&&t>=400&&t<500)}function gbe({error:e}){const t=LX(),n=ta({strict:!1}),r=vL(n,"tenant"),o=_L(e),i=mbe(e);if(console.error(e),e instanceof TypeError&&e.message.includes("Failed to fetch dynamically imported module:"))return v.jsx($we,{});const a=!!t({to:ft.tenantRoute.to,params:r?{tenant:r}:void 0,fuzzy:!0});return o===403&&a?v.jsx(pbe,{}):o===404?v.jsx(eR,{}):v.jsx(Lwe,{status:o,statusText:i})}const F2="hatchet:local-storage";function ey(e,t){const[n,r]=b.useState(()=>{try{const i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),o=i=>{try{r(a=>{const s=typeof i=="function"?i(a):i;return window.localStorage.setItem(e,JSON.stringify(s)),window.dispatchEvent(new CustomEvent(F2,{detail:{key:e,value:s}})),s})}catch(a){console.warn(`Error setting localStorage key "${e}":`,a)}};return b.useEffect(()=>{const i=s=>{if(s.key===e&&s.newValue)try{r(JSON.parse(s.newValue))}catch(l){console.warn(`Error parsing localStorage change for key "${e}":`,l)}},a=s=>{var u;const l=s;((u=l.detail)==null?void 0:u.key)===e&&r(l.detail.value)};return window.addEventListener("storage",i),window.addEventListener(F2,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(F2,a)}},[e]),[n,o]}const vbe="v1SidebarWidth",ybe="v1SidebarWidthExpanded",wbe="v1SidebarCollapsed",E7=768,fE=200,cQ=200,Het=520,xbe=56,Get=cQ,Ket=cQ-100,Yet=3,bbe={sidebarOpen:"closed",setSidebarOpen:()=>null,toggleSidebarOpen:()=>null,isWide:!1,sidebarWidth:void 0,collapsed:!1,setCollapsed:()=>null,toggleCollapsed:()=>null,expandedWidth:fE,setExpandedWidth:()=>null},fQ=b.createContext(bbe);function Sbe({children:e,defaultSidebarOpen:t="closed",...n}){const[r,o]=b.useState(()=>t),[i,a]=b.useState(()=>typeof window<"u"?window.innerWidth>=E7:!1),s=b.useMemo(()=>{if(typeof window>"u")return fE;try{const x=window.localStorage.getItem(vbe);return x?JSON.parse(x):fE}catch{return fE}},[]),[l,u]=ey(ybe,s),[c,d]=ey(wbe,!1),h=b.useMemo(()=>{if(i)return c?xbe:l},[c,l,i]),p=b.useCallback(()=>{d(!c)},[c,d]);return b.useEffect(()=>{const x=()=>{a(window.innerWidth>=E7)};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]),b.useEffect(()=>{o(i?"open":"closed")},[i]),v.jsx(fQ.Provider,{...n,value:{sidebarOpen:r,setSidebarOpen:x=>{o(x)},toggleSidebarOpen:()=>{o(x=>x==="open"?"closed":"open")},isWide:i,sidebarWidth:h,collapsed:c,setCollapsed:d,toggleCollapsed:p,expandedWidth:l,setExpandedWidth:u},children:e})}const Xet=()=>{const e=b.useContext(fQ);if(e===void 0)throw new Error("useSidebar must be used within a SidebarProvider");return e},_be={theme:"system",setTheme:()=>null,toggleTheme:()=>null,currentlyVisibleTheme:"light"},dQ=b.createContext(_be),B2=e=>e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;function Ebe({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=b.useState(()=>localStorage.getItem(n)||t),[a,s]=b.useState(()=>B2(o));b.useEffect(()=>{const d=window.document.documentElement;d.classList.remove("light","dark");const h=B2(o);s(h),d.classList.add(h)},[o]),b.useEffect(()=>{if(o!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const p=B2("system");s(p);const x=window.document.documentElement;x.classList.remove("light","dark"),x.classList.add(p)};return d.addEventListener("change",h),()=>d.removeEventListener("change",h)},[o]);const l=d=>{localStorage.setItem(n,d),i(d)},c={theme:o,setTheme:l,toggleTheme:()=>{l(o==="dark"?"light":"dark")},currentlyVisibleTheme:a};return v.jsx(dQ.Provider,{...r,value:c,children:e})}const hQ=()=>{const e=b.useContext(dQ);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var z2="focusScope.autoFocusOnMount",q2="focusScope.autoFocusOnUnmount",C7={bubbles:!1,cancelable:!0},Cbe="FocusScope",ob=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=b.useState(null),u=Ji(o),c=Ji(i),d=b.useRef(null),h=zn(t,y=>l(y)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let y=function(O){if(p.paused||!s)return;const P=O.target;s.contains(P)?d.current=P:hd(d.current,{select:!0})},w=function(O){if(p.paused||!s)return;const P=O.relatedTarget;P!==null&&(s.contains(P)||hd(d.current,{select:!0}))},_=function(O){if(document.activeElement===document.body)for(const R of O)R.removedNodes.length>0&&hd(s)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const C=new MutationObserver(_);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),C.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){R7.add(p);const y=document.activeElement;if(!s.contains(y)){const _=new CustomEvent(z2,C7);s.addEventListener(z2,u),s.dispatchEvent(_),_.defaultPrevented||(Obe(kbe(pQ(s)),{select:!0}),document.activeElement===y&&hd(s))}return()=>{s.removeEventListener(z2,u),setTimeout(()=>{const _=new CustomEvent(q2,C7);s.addEventListener(q2,c),s.dispatchEvent(_),_.defaultPrevented||hd(y??document.body,{select:!0}),s.removeEventListener(q2,c),R7.remove(p)},0)}}},[s,u,c,p]);const x=b.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(w&&_){const C=y.currentTarget,[O,P]=Rbe(C);O&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&hd(O,{select:!0})):y.shiftKey&&_===O&&(y.preventDefault(),n&&hd(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,p.paused]);return v.jsx(Jt.div,{tabIndex:-1,...a,ref:h,onKeyDown:x})});ob.displayName=Cbe;function Obe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(hd(r,{select:t}),document.activeElement!==n)return}function Rbe(e){const t=pQ(e),n=O7(t,e),r=O7(t.reverse(),e);return[n,r]}function pQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O7(e,t){for(const n of e)if(!Pbe(n,{upTo:t}))return n}function Pbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Tbe(e){return e instanceof HTMLInputElement&&"select"in e}function hd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tbe(e)&&t&&e.select()}}var R7=Abe();function Abe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=P7(e,t),e.unshift(t)},remove(t){var n;e=P7(e,t),(n=e[0])==null||n.resume()}}}function P7(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kbe(e){return e.filter(t=>t.tagName!=="A")}var U2=0;function oR(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??T7()),document.body.insertAdjacentElement("beforeend",e[1]??T7()),U2++,()=>{U2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U2--}},[])}function T7(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pi=function(){return Pi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return Vbe;var t=Wbe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gbe=CL(),Sv="data-scroll-locked",Kbe=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Nbe,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body[`).concat(Sv,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(yw,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(ww,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(yw," .").concat(yw,` { - right: 0 `).concat(r,`; - } - - .`).concat(ww," .").concat(ww,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(Sv,`] { - `).concat(Mbe,": ").concat(s,`px; - } -`)},k7=function(){var e=parseInt(document.body.getAttribute(Sv)||"0",10);return isFinite(e)?e:0},Ybe=function(){b.useEffect(function(){return document.body.setAttribute(Sv,(k7()+1).toString()),function(){var e=k7()-1;e<=0?document.body.removeAttribute(Sv):document.body.setAttribute(Sv,e.toString())}},[])},bQ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ybe();var i=b.useMemo(function(){return Hbe(o)},[o]);return b.createElement(Gbe,{styles:Kbe(i,!t,o,n?"":"!important")})},HI=!1;if(typeof window<"u")try{var p_=Object.defineProperty({},"passive",{get:function(){return HI=!0,!0}});window.addEventListener("test",p_,p_),window.removeEventListener("test",p_,p_)}catch{HI=!1}var Gg=HI?{passive:!1}:!1,Xbe=function(e){return e.tagName==="TEXTAREA"},SQ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Xbe(e)&&n[t]==="visible")},Qbe=function(e){return SQ(e,"overflowY")},Zbe=function(e){return SQ(e,"overflowX")},N7=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=_Q(e,r);if(o){var i=EQ(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Jbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},eSe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_Q=function(e,t){return e==="v"?Qbe(t):Zbe(t)},EQ=function(e,t){return e==="v"?Jbe(t):eSe(t)},tSe=function(e,t){return e==="h"&&t==="rtl"?-1:1},nSe=function(e,t,n,r,o){var i=tSe(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,h=0;do{if(!s)break;var p=EQ(e,s),x=p[0],y=p[1],w=p[2],_=y-w-i*x;(x||_)&&_Q(e,s)&&(d+=_,h+=x);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(d)<1||!c&&Math.abs(h)<1)&&(u=!0),u},m_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},M7=function(e){return[e.deltaX,e.deltaY]},j7=function(e){return e&&"current"in e?e.current:e},rSe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oSe=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},iSe=0,Kg=[];function aSe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(iSe++)[0],i=b.useState(CL)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=mQ([e.lockRef.current],(e.shards||[]).map(j7),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var _=m_(y),C=n.current,O="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],R,T=y.target,k=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in y&&k==="h"&&T.type==="range")return!1;var M=N7(k,T);if(!M)return!0;if(M?R=k:(R=k==="v"?"h":"v",M=N7(k,T)),!M)return!1;if(!r.current&&"changedTouches"in y&&(O||P)&&(r.current=R),!R)return!0;var j=r.current||R;return nSe(j,w,y,j==="h"?O:P)},[]),l=b.useCallback(function(y){var w=y;if(!(!Kg.length||Kg[Kg.length-1]!==i)){var _="deltaY"in w?M7(w):m_(w),C=t.current.filter(function(R){return R.name===w.type&&(R.target===w.target||w.target===R.shadowParent)&&rSe(R.delta,_)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var O=(a.current.shards||[]).map(j7).filter(Boolean).filter(function(R){return R.contains(w.target)}),P=O.length>0?s(w,O[0]):!a.current.noIsolation;P&&w.cancelable&&w.preventDefault()}}},[]),u=b.useCallback(function(y,w,_,C){var O={name:y,delta:w,target:_,should:C,shadowParent:sSe(_)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),c=b.useCallback(function(y){n.current=m_(y),r.current=void 0},[]),d=b.useCallback(function(y){u(y.type,M7(y),y.target,s(y,e.lockRef.current))},[]),h=b.useCallback(function(y){u(y.type,m_(y),y.target,s(y,e.lockRef.current))},[]);b.useEffect(function(){return Kg.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Gg),document.addEventListener("touchmove",l,Gg),document.addEventListener("touchstart",c,Gg),function(){Kg=Kg.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,Gg),document.removeEventListener("touchmove",l,Gg),document.removeEventListener("touchstart",c,Gg)}},[]);var p=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(i,{styles:oSe(o)}):null,p?b.createElement(bQ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sSe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lSe=wQ(xQ,aSe);var ib=b.forwardRef(function(e,t){return b.createElement(iR,Pi({},e,{ref:t,sideCar:lSe}))});ib.classNames=iR.classNames;var uSe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yg=new WeakMap,g_=new WeakMap,v_={},G2=0,CQ=function(e){return e&&(e.host||CQ(e.parentNode))},cSe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=CQ(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fSe=function(e,t,n,r){var o=cSe(t,Array.isArray(e)?e:[e]);v_[n]||(v_[n]=new WeakMap);var i=v_[n],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),x=p!==null&&p!=="false",y=(Yg.get(h)||0)+1,w=(i.get(h)||0)+1;Yg.set(h,y),i.set(h,w),a.push(h),y===1&&x&&g_.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return c(t),s.clear(),G2++,function(){a.forEach(function(d){var h=Yg.get(d)-1,p=i.get(d)-1;Yg.set(d,h),i.set(d,p),h||(g_.has(d)||d.removeAttribute(r),g_.delete(d)),p||d.removeAttribute(n)}),G2--,G2||(Yg=new WeakMap,Yg=new WeakMap,g_=new WeakMap,v_={})}},ab=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=uSe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),fSe(r,o,n,"aria-hidden")):function(){return null}},aR="Dialog",[OQ]=fs(aR),[dSe,Kl]=OQ(aR),RQ=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=b.useRef(null),l=b.useRef(null),[u,c]=Ws({prop:r,defaultProp:o??!1,onChange:i,caller:aR});return v.jsx(dSe,{scope:t,triggerRef:s,contentRef:l,contentId:Ta(),titleId:Ta(),descriptionId:Ta(),open:u,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a,children:n})};RQ.displayName=aR;var PQ="DialogTrigger",TQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kl(PQ,n),i=zn(t,o.triggerRef);return v.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":PL(o.open),...r,ref:i,onClick:Je(e.onClick,o.onOpenToggle)})});TQ.displayName=PQ;var OL="DialogPortal",[hSe,AQ]=OQ(OL,{forceMount:void 0}),kQ=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Kl(OL,t);return v.jsx(hSe,{scope:t,forceMount:n,children:b.Children.map(r,a=>v.jsx(ji,{present:n||i.open,children:v.jsx(bm,{asChild:!0,container:o,children:a})}))})};kQ.displayName=OL;var zE="DialogOverlay",NQ=b.forwardRef((e,t)=>{const n=AQ(zE,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Kl(zE,e.__scopeDialog);return i.modal?v.jsx(ji,{present:r||i.open,children:v.jsx(mSe,{...o,ref:t})}):null});NQ.displayName=zE;var pSe=Zp("DialogOverlay.RemoveScroll"),mSe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kl(zE,n);return v.jsx(ib,{as:pSe,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(Jt.div,{"data-state":PL(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nm="DialogContent",MQ=b.forwardRef((e,t)=>{const n=AQ(nm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Kl(nm,e.__scopeDialog);return v.jsx(ji,{present:r||i.open,children:i.modal?v.jsx(gSe,{...o,ref:t}):v.jsx(vSe,{...o,ref:t})})});MQ.displayName=nm;var gSe=b.forwardRef((e,t)=>{const n=Kl(nm,e.__scopeDialog),r=b.useRef(null),o=zn(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return ab(i)},[]),v.jsx(jQ,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Je(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Je(e.onFocusOutside,i=>i.preventDefault())})}),vSe=b.forwardRef((e,t)=>{const n=Kl(nm,e.__scopeDialog),r=b.useRef(!1),o=b.useRef(!1);return v.jsx(jQ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),jQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Kl(nm,n),l=b.useRef(null),u=zn(t,l);return oR(),v.jsxs(v.Fragment,{children:[v.jsx(ob,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(th,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":PL(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(ySe,{titleId:s.titleId}),v.jsx(xSe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),RL="DialogTitle",IQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kl(RL,n);return v.jsx(Jt.h2,{id:o.titleId,...r,ref:t})});IQ.displayName=RL;var DQ="DialogDescription",LQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kl(DQ,n);return v.jsx(Jt.p,{id:o.descriptionId,...r,ref:t})});LQ.displayName=DQ;var $Q="DialogClose",FQ=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kl($Q,n);return v.jsx(Jt.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,()=>o.onOpenChange(!1))})});FQ.displayName=$Q;function PL(e){return e?"open":"closed"}var BQ="DialogTitleWarning",[Qet,zQ]=Ege(BQ,{contentName:nm,titleName:RL,docsSlug:"dialog"}),ySe=({titleId:e})=>{const t=zQ(BQ),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wSe="DialogDescriptionWarning",xSe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zQ(wSe).contentName}}.`;return b.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bSe=RQ,SSe=TQ,_Se=kQ,qQ=NQ,UQ=MQ,VQ=IQ,WQ=LQ,ESe=FQ;const sb=bSe,Zet=SSe,CSe=_Se,Jet=ESe,HQ=b.forwardRef(({className:e,...t},n)=>v.jsx(qQ,{ref:n,className:je("fixed inset-0 z-[200] bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));HQ.displayName=qQ.displayName;const Ky=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(CSe,{children:[v.jsx(HQ,{}),v.jsx(UQ,{ref:r,className:je("fixed left-[50%] top-[50%] z-[200] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:t})]}));Ky.displayName=UQ.displayName;const lb=({className:e,...t})=>v.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lb.displayName="DialogHeader";const GQ=({className:e,...t})=>v.jsx("div",{className:je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});GQ.displayName="DialogFooter";const Yy=b.forwardRef(({className:e,...t},n)=>v.jsx(VQ,{ref:n,className:je("text-lg font-semibold leading-none tracking-tight",e),...t}));Yy.displayName=VQ.displayName;const sR=b.forwardRef(({className:e,...t},n)=>v.jsx(WQ,{ref:n,className:je("text-sm text-gray-700 dark:text-gray-300",e),...t}));sR.displayName=WQ.displayName;function OSe({title:e="Hatchet",colorVariant:t="brand",variant:n="lockup",className:r,...o}){const i=n==="mark",a=n==="wordmark";return v.jsxs("svg",{viewBox:i?"0 0 33 24":a?"41 0 96 24":"0 0 137 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":e,className:je(t==="brand"&&"text-[rgb(0,26,56)] dark:text-[rgb(184,217,255)]",r),...o,children:[a?null:v.jsxs(v.Fragment,{children:[v.jsx("path",{d:"M17.5 10L22 0L30.6059 8.60589C31.7939 9.79394 32.388 10.388 32.6105 11.0729C32.8063 11.6755 32.8063 12.3245 32.6105 12.9271C32.388 13.612 31.7939 14.2061 30.6059 15.3941L22 24H15L26.7517 11.3444C27.146 10.9197 27.3432 10.7074 27.3527 10.5263C27.361 10.3691 27.2947 10.2171 27.1739 10.1162C27.0347 10 26.7449 10 26.1654 10H17.5Z",fill:"currentColor"}),v.jsx("path",{d:"M16.5 14L12 24L3.39411 15.3941C2.20606 14.2061 1.61204 13.612 1.38947 12.9271C1.1937 12.3245 1.1937 11.6755 1.38947 11.0729C1.61204 10.388 2.20606 9.79394 3.39411 8.60589L12 0H19L7.24833 12.6556C6.854 13.0803 6.65684 13.2926 6.6473 13.4737C6.63902 13.6309 6.70527 13.7829 6.82612 13.8838C6.96529 14 7.25505 14 7.83457 14H16.5Z",fill:"currentColor"})]}),i?null:v.jsx("path",{d:"M88.5908 3.14502C92.0637 3.14506 94.5478 5.30746 94.5479 8.96436V10.1147H91.0977V9.05615C91.0975 7.42337 90.0857 6.36577 88.5908 6.36572C87.0959 6.36572 86.0841 7.42333 86.084 9.05615V14.9448C86.0841 16.5776 87.0959 17.6353 88.5908 17.6353C90.0856 17.6352 91.0975 16.5776 91.0977 14.9448V13.6108H94.5479V14.9448C94.5477 18.6476 92.0866 20.8549 88.5908 20.855C85.0949 20.855 82.634 18.6476 82.6338 14.9448V8.96436C82.6338 5.30742 85.1179 3.14502 88.5908 3.14502ZM80.4238 6.61865H76.3994V20.6489H72.9492V6.61865H68.9238V3.39893H80.4238V6.61865ZM136.884 6.61865H132.858V20.6489H129.408V6.61865H125.384V3.39893H136.884V6.61865ZM44.4502 10.3677H49.4414V3.37549H52.8916V20.6255H49.4414V13.5874H44.4502V20.6255H41V3.37549H44.4502V10.3677ZM68.4639 20.6255H64.3926L63.9326 18.3022H59.7461L59.2861 20.6255H55.4688L59.7461 3.37549H64.1855L68.4639 20.6255ZM101.157 10.3677H106.148V3.37549H109.598V20.6255H106.148V13.5874H101.157V20.6255H97.707V3.37549H101.157V10.3677ZM122.801 6.59521H116.361V10.1831H121.812V13.4038H116.361V17.4058H122.848V20.6255H112.911V3.37549H122.801V6.59521ZM60.2988 15.5425H63.4033L61.8623 7.72217L60.2988 15.5425Z",fill:"currentColor"})]})}function RSe(e){const t=e.trim();if(!t)return null;try{return t.includes("://")?new URL(t):new URL(`https://${t}`)}catch{return null}}function I7(e,t){return new URL(`${t.pathname}${t.search}${t.hash}`,e.origin).href}function PSe(e){return typeof e=="object"&&e!==null&&e.isCloudEnabled===!0}function TSe(){const{data:e}=Mn(FO),t=b.useMemo(()=>{var s;if(!PSe(e))return null;const a=(s=e.redirectFrontendHost)==null?void 0:s.trim();return a?RSe(a):null},[e]),n=(t==null?void 0:t.host)??"a new domain",r=t&&typeof window<"u"?I7(t,window.location):t==null?void 0:t.origin,o=b.useMemo(()=>!(typeof window>"u"||!t||window.location.origin===t.origin),[t]),i=b.useCallback(()=>{t&&window.location.assign(I7(t,window.location))},[t]);return v.jsx(sb,{open:o,children:v.jsx(Ky,{className:"max-w-lg text-center",onEscapeKeyDown:a=>a.preventDefault(),onInteractOutside:a=>a.preventDefault(),children:v.jsxs("div",{className:"flex flex-col items-center gap-6",children:[v.jsx(OSe,{variant:"mark",className:"h-10 w-10"}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(Yy,{className:"text-center text-2xl",children:"We moved Hatchet Cloud"}),v.jsxs(sR,{className:"text-center text-base text-muted-foreground",children:["Your dashboard now lives on"," ",v.jsx("a",{href:r,className:"text-primary underline-offset-4 hover:underline",children:n}),". ",v.jsx("br",{}),v.jsx("br",{})," We're making this change to unlock new features like multi-region support and improved performance."]})]}),v.jsx("div",{className:"flex w-full flex-col gap-2",children:v.jsx(xt,{className:"w-full",onClick:i,children:"Take me there →"})})]})})})}function Tr(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var ASe=["color"],D7=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,ASe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kSe=["color"],ett=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,kSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),NSe=["color"],ttt=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,NSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),MSe=["color"],L7=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,MSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),jSe=["color"],ISe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,jSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),DSe=["color"],LSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,DSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),$Se=["color"],lR=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,$Se);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),FSe=["color"],TL=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,FSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),BSe=["color"],KQ=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,BSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),zSe=["color"],AL=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,zSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),qSe=["color"],USe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,qSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),VSe=["color"],WSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,VSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),HSe=["color"],ty=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,HSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),GSe=["color"],KSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,GSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),YSe=["color"],XSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,YSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),QSe=["color"],ZSe=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,QSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),JSe=["color"],e_e=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,JSe);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),t_e=["color"],n_e=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,t_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),r_e=["color"],ntt=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,r_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),o_e=["color"],rtt=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,o_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),i_e=["color"],YQ=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,i_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),a_e=["color"],s_e=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,a_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),l_e=["color"],ott=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,l_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),u_e=["color"],c_e=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,u_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),f_e=["color"],itt=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Tr(e,f_e);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),b.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function uR(e){const t=e+"CollectionProvider",[n,r]=fs(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:w,children:_}=y,C=J.useRef(null),O=J.useRef(new Map).current;return v.jsx(o,{scope:w,itemMap:O,collectionRef:C,children:_})};a.displayName=t;const s=e+"CollectionSlot",l=Zp(s),u=J.forwardRef((y,w)=>{const{scope:_,children:C}=y,O=i(s,_),P=zn(w,O.collectionRef);return v.jsx(l,{ref:P,children:C})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",h=Zp(c),p=J.forwardRef((y,w)=>{const{scope:_,children:C,...O}=y,P=J.useRef(null),R=zn(w,P),T=i(c,_);return J.useEffect(()=>(T.itemMap.set(P,{ref:P,...O}),()=>void T.itemMap.delete(P))),v.jsx(h,{[d]:"",ref:R,children:C})});p.displayName=c;function x(y){const w=i(e+"CollectionConsumer",y);return J.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const O=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((T,k)=>O.indexOf(T.ref.current)-O.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},x,r]}var kL="ToastProvider",[NL,d_e,h_e]=uR("Toast"),[XQ]=fs("Toast",[h_e]),[p_e,cR]=XQ(kL),QQ=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${kL}\`. Expected non-empty \`string\`.`),v.jsx(NL.Provider,{scope:t,children:v.jsx(p_e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:b.useCallback(()=>c(p=>p+1),[]),onToastRemove:b.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:a})})};QQ.displayName=kL;var ZQ="ToastViewport",m_e=["F8"],GI="toast.viewportPause",KI="toast.viewportResume",JQ=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=m_e,label:o="Notifications ({hotkey})",...i}=e,a=cR(ZQ,n),s=d_e(n),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),h=zn(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;b.useEffect(()=>{const w=_=>{var O;r.length!==0&&r.every(P=>_[P]||_.code===P)&&((O=d.current)==null||O.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),b.useEffect(()=>{const w=l.current,_=d.current;if(x&&w&&_){const C=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(GI);_.dispatchEvent(T),a.isClosePausedRef.current=!0}},O=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(KI);_.dispatchEvent(T),a.isClosePausedRef.current=!1}},P=T=>{!w.contains(T.relatedTarget)&&O()},R=()=>{w.contains(document.activeElement)||O()};return w.addEventListener("focusin",C),w.addEventListener("focusout",P),w.addEventListener("pointermove",C),w.addEventListener("pointerleave",R),window.addEventListener("blur",C),window.addEventListener("focus",O),()=>{w.removeEventListener("focusin",C),w.removeEventListener("focusout",P),w.removeEventListener("pointermove",C),w.removeEventListener("pointerleave",R),window.removeEventListener("blur",C),window.removeEventListener("focus",O)}}},[x,a.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:w})=>{const C=s().map(O=>{const P=O.ref.current,R=[P,...P_e(P)];return w==="forwards"?R:R.reverse()});return(w==="forwards"?C.reverse():C).flat()},[s]);return b.useEffect(()=>{const w=d.current;if(w){const _=C=>{var R,T,k;const O=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!O){const M=document.activeElement,j=C.shiftKey;if(C.target===w&&j){(R=u.current)==null||R.focus();return}const K=y({tabbingDirection:j?"backwards":"forwards"}),H=K.findIndex(D=>D===M);K2(K.slice(H+1))?C.preventDefault():j?(T=u.current)==null||T.focus():(k=c.current)==null||k.focus()}};return w.addEventListener("keydown",_),()=>w.removeEventListener("keydown",_)}},[s,y]),v.jsxs(Uge,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&v.jsx(YI,{ref:u,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"forwards"});K2(w)}}),v.jsx(NL.Slot,{scope:n,children:v.jsx(Jt.ol,{tabIndex:-1,...i,ref:h})}),x&&v.jsx(YI,{ref:c,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"backwards"});K2(w)}})]})});JQ.displayName=ZQ;var eZ="ToastFocusProxy",YI=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=cR(eZ,n);return v.jsx(WO,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const s=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(s))&&r()}})});YI.displayName=eZ;var ub="Toast",g_e="toast.swipeStart",v_e="toast.swipeMove",y_e="toast.swipeCancel",w_e="toast.swipeEnd",tZ=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Ws({prop:r,defaultProp:o??!0,onChange:i,caller:ub});return v.jsx(ji,{present:n||s,children:v.jsx(S_e,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Ji(e.onPause),onResume:Ji(e.onResume),onSwipeStart:Je(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Je(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Je(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Je(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});tZ.displayName=ub;var[x_e,b_e]=XQ(ub,{onClose(){}}),S_e=b.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...x}=e,y=cR(ub,n),[w,_]=b.useState(null),C=zn(t,D=>_(D)),O=b.useRef(null),P=b.useRef(null),R=o||y.duration,T=b.useRef(0),k=b.useRef(R),M=b.useRef(0),{onToastAdd:j,onToastRemove:$}=y,L=Ji(()=>{var W;(w==null?void 0:w.contains(document.activeElement))&&((W=y.viewport)==null||W.focus()),a()}),K=b.useCallback(D=>{!D||D===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(L,D))},[L]);b.useEffect(()=>{const D=y.viewport;if(D){const W=()=>{K(k.current),u==null||u()},q=()=>{const Y=new Date().getTime()-T.current;k.current=k.current-Y,window.clearTimeout(M.current),l==null||l()};return D.addEventListener(GI,q),D.addEventListener(KI,W),()=>{D.removeEventListener(GI,q),D.removeEventListener(KI,W)}}},[y.viewport,R,l,u,K]),b.useEffect(()=>{i&&!y.isClosePausedRef.current&&K(R)},[i,R,y.isClosePausedRef,K]),b.useEffect(()=>(j(),()=>$()),[j,$]);const H=b.useMemo(()=>w?lZ(w):null,[w]);return y.viewport?v.jsxs(v.Fragment,{children:[H&&v.jsx(__e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:H}),v.jsx(x_e,{scope:n,onClose:L,children:Vs.createPortal(v.jsx(NL.ItemSlot,{scope:n,children:v.jsx(qge,{asChild:!0,onEscapeKeyDown:Je(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||L(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Jt.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...x,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Je(e.onKeyDown,D=>{D.key==="Escape"&&(s==null||s(D.nativeEvent),D.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:Je(e.onPointerDown,D=>{D.button===0&&(O.current={x:D.clientX,y:D.clientY})}),onPointerMove:Je(e.onPointerMove,D=>{if(!O.current)return;const W=D.clientX-O.current.x,q=D.clientY-O.current.y,Y=!!P.current,U=["left","right"].includes(y.swipeDirection),V=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,G=U?V(0,W):0,z=U?0:V(0,q),X=D.pointerType==="touch"?10:2,ee={x:G,y:z},ae={originalEvent:D,delta:ee};Y?(P.current=ee,y_(v_e,d,ae,{discrete:!1})):$7(ee,y.swipeDirection,X)?(P.current=ee,y_(g_e,c,ae,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(W)>X||Math.abs(q)>X)&&(O.current=null)}),onPointerUp:Je(e.onPointerUp,D=>{const W=P.current,q=D.target;if(q.hasPointerCapture(D.pointerId)&&q.releasePointerCapture(D.pointerId),P.current=null,O.current=null,W){const Y=D.currentTarget,U={originalEvent:D,delta:W};$7(W,y.swipeDirection,y.swipeThreshold)?y_(w_e,p,U,{discrete:!0}):y_(y_e,h,U,{discrete:!0}),Y.addEventListener("click",V=>V.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),__e=e=>{const{__scopeToast:t,children:n,...r}=e,o=cR(ub,t),[i,a]=b.useState(!1),[s,l]=b.useState(!1);return O_e(()=>a(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:v.jsx(bm,{asChild:!0,children:v.jsx(WO,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},E_e="ToastTitle",nZ=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Jt.div,{...r,ref:t})});nZ.displayName=E_e;var C_e="ToastDescription",rZ=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Jt.div,{...r,ref:t})});rZ.displayName=C_e;var oZ="ToastAction",iZ=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(sZ,{altText:n,asChild:!0,children:v.jsx(ML,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${oZ}\`. Expected non-empty \`string\`.`),null)});iZ.displayName=oZ;var aZ="ToastClose",ML=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=b_e(aZ,n);return v.jsx(sZ,{asChild:!0,children:v.jsx(Jt.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,o.onClose)})})});ML.displayName=aZ;var sZ=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(Jt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function lZ(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),R_e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...lZ(r))}}),t}function y_(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Q3(o,i):o.dispatchEvent(i)}var $7=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function O_e(e=()=>{}){const t=Ji(e);ii(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function R_e(e){return e.nodeType===e.ELEMENT_NODE}function P_e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function K2(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var T_e=QQ,uZ=JQ,cZ=tZ,fZ=nZ,dZ=rZ,hZ=iZ,pZ=ML;const A_e=T_e,mZ=b.forwardRef(({className:e,...t},n)=>v.jsx(uZ,{ref:n,className:je("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));mZ.displayName=uZ.displayName;const k_e=Hl("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border-foreground bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),gZ=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx(cZ,{ref:r,className:je(k_e({variant:t}),e),...n}));gZ.displayName=cZ.displayName;const N_e=b.forwardRef(({className:e,...t},n)=>v.jsx(hZ,{ref:n,className:je("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));N_e.displayName=hZ.displayName;const vZ=b.forwardRef(({className:e,...t},n)=>v.jsx(pZ,{ref:n,className:je("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:v.jsx(ty,{className:"h-4 w-4"})}));vZ.displayName=pZ.displayName;const yZ=b.forwardRef(({className:e,...t},n)=>v.jsx(fZ,{ref:n,className:je("text-sm font-semibold [&+div]:text-xs",e),...t}));yZ.displayName=fZ.displayName;const wZ=b.forwardRef(({className:e,...t},n)=>v.jsx(dZ,{ref:n,className:je("text-sm opacity-90",e),...t}));wZ.displayName=dZ.displayName;function xZ(){const{toasts:e}=wL();return v.jsxs(A_e,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return v.jsxs(gZ,{...i,children:[v.jsxs("div",{className:"grid gap-1",children:[n&&v.jsx(yZ,{children:n}),r&&v.jsx(wZ,{children:r})]}),o,v.jsx(vZ,{})]},t)}),v.jsx(mZ,{})]})}const xw={off:{label:"Off",value:!1},"5s":{label:"5s",value:5e3},"10s":{label:"10s",value:1e4},"30s":{label:"30s",value:3e4},"1m":{label:"1m",value:6e4},"5m":{label:"5m",value:3e5}},bZ=b.createContext(null),M_e="app-default-refetch-interval",j_e=({children:e})=>{const{pathname:t}=Vy(),[n,r]=ey(M_e,"10s"),[o,i]=ey("app-refetch-interval-frozen",!1),a=b.useMemo(()=>xw[n],[n]),s=b.useMemo(()=>o?!1:a.value,[o,a]),l=b.useCallback(c=>{var h;const d=(h=Object.entries(xw).find(([,p])=>p.value===c.value))==null?void 0:h[0];d&&(r(d),i(!1))},[r,i]),u=b.useMemo(()=>({isFrozen:o,setIsFrozen:i,userRefetchIntervalPreference:a,refetchInterval:s,setRefetchInterval:l}),[s,l,o,i,a]);return b.useEffect(()=>{o&&i(!1)},[t]),v.jsx(bZ.Provider,{value:u,children:e})},xf=()=>{const e=b.useContext(bZ);if(!e)throw new Error("useRefetchInterval must be used within a RefetchIntervalProvider");return e};var I_e=b.createContext(void 0);function fR(e){const t=b.useContext(I_e);return e||t||"ltr"}var Y2="rovingFocusGroup.onEntryFocus",D_e={bubbles:!1,cancelable:!0},cb="RovingFocusGroup",[XI,SZ,L_e]=uR(cb),[$_e,dR]=fs(cb,[L_e]),[F_e,B_e]=$_e(cb),_Z=b.forwardRef((e,t)=>v.jsx(XI.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(XI.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(z_e,{...e,ref:t})})}));_Z.displayName=cb;var z_e=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,h=b.useRef(null),p=zn(t,h),x=fR(i),[y,w]=Ws({prop:a,defaultProp:s??null,onChange:l,caller:cb}),[_,C]=b.useState(!1),O=Ji(u),P=SZ(n),R=b.useRef(!1),[T,k]=b.useState(0);return b.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Y2,O),()=>M.removeEventListener(Y2,O)},[O]),v.jsx(F_e,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:y,onItemFocus:b.useCallback(M=>w(M),[w]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:b.useCallback(()=>k(M=>M-1),[]),children:v.jsx(Jt.div,{tabIndex:_||T===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Je(e.onMouseDown,()=>{R.current=!0}),onFocus:Je(e.onFocus,M=>{const j=!R.current;if(M.target===M.currentTarget&&j&&!_){const $=new CustomEvent(Y2,D_e);if(M.currentTarget.dispatchEvent($),!$.defaultPrevented){const L=P().filter(q=>q.focusable),K=L.find(q=>q.active),H=L.find(q=>q.id===y),W=[K,H,...L].filter(Boolean).map(q=>q.ref.current);OZ(W,c)}}R.current=!1}),onBlur:Je(e.onBlur,()=>C(!1))})})}),EZ="RovingFocusGroupItem",CZ=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...s}=e,l=Ta(),u=i||l,c=B_e(EZ,n),d=c.currentTabStopId===u,h=SZ(n),{onFocusableItemAdd:p,onFocusableItemRemove:x,currentTabStopId:y}=c;return b.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),v.jsx(XI.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:v.jsx(Jt.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Je(e.onMouseDown,w=>{r?c.onItemFocus(u):w.preventDefault()}),onFocus:Je(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Je(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const _=V_e(w,c.orientation,c.dir);if(_!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let O=h().filter(P=>P.focusable).map(P=>P.ref.current);if(_==="last")O.reverse();else if(_==="prev"||_==="next"){_==="prev"&&O.reverse();const P=O.indexOf(w.currentTarget);O=c.loop?W_e(O,P+1):O.slice(P+1)}setTimeout(()=>OZ(O))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:y!=null}):a})})});CZ.displayName=EZ;var q_e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function U_e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function V_e(e,t,n){const r=U_e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return q_e[r]}function OZ(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function W_e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RZ=_Z,PZ=CZ,QI=["Enter"," "],H_e=["ArrowDown","PageUp","Home"],TZ=["ArrowUp","PageDown","End"],G_e=[...H_e,...TZ],K_e={ltr:[...QI,"ArrowRight"],rtl:[...QI,"ArrowLeft"]},Y_e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},fb="Menu",[qw,X_e,Q_e]=uR(fb),[Sm,AZ]=fs(fb,[Q_e,ic,dR]),db=ic(),kZ=dR(),[NZ,nh]=Sm(fb),[Z_e,hb]=Sm(fb),MZ=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=db(t),[l,u]=b.useState(null),c=b.useRef(!1),d=Ji(i),h=fR(o);return b.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),v.jsx(qy,{...s,children:v.jsx(NZ,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:v.jsx(Z_e,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};MZ.displayName=fb;var J_e="MenuAnchor",jL=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=db(n);return v.jsx(Uy,{...o,...r,ref:t})});jL.displayName=J_e;var IL="MenuPortal",[eEe,jZ]=Sm(IL,{forceMount:void 0}),IZ=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=nh(IL,t);return v.jsx(eEe,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(bm,{asChild:!0,container:o,children:r})})})};IZ.displayName=IL;var zs="MenuContent",[tEe,DL]=Sm(zs),DZ=b.forwardRef((e,t)=>{const n=jZ(zs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=nh(zs,e.__scopeMenu),a=hb(zs,e.__scopeMenu);return v.jsx(qw.Provider,{scope:e.__scopeMenu,children:v.jsx(ji,{present:r||i.open,children:v.jsx(qw.Slot,{scope:e.__scopeMenu,children:a.modal?v.jsx(nEe,{...o,ref:t}):v.jsx(rEe,{...o,ref:t})})})})}),nEe=b.forwardRef((e,t)=>{const n=nh(zs,e.__scopeMenu),r=b.useRef(null),o=zn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return ab(i)},[]),v.jsx(LL,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Je(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),rEe=b.forwardRef((e,t)=>{const n=nh(zs,e.__scopeMenu);return v.jsx(LL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),oEe=Zp("MenuContent.ScrollLock"),LL=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:x,...y}=e,w=nh(zs,n),_=hb(zs,n),C=db(n),O=kZ(n),P=X_e(n),[R,T]=b.useState(null),k=b.useRef(null),M=zn(t,k,w.onContentChange),j=b.useRef(0),$=b.useRef(""),L=b.useRef(0),K=b.useRef(null),H=b.useRef("right"),D=b.useRef(0),W=x?ib:b.Fragment,q=x?{as:oEe,allowPinchZoom:!0}:void 0,Y=V=>{var we,de;const G=$.current+V,z=P().filter(se=>!se.disabled),X=document.activeElement,ee=(we=z.find(se=>se.ref.current===X))==null?void 0:we.textValue,ae=z.map(se=>se.textValue),fe=gEe(ae,G,ee),ie=(de=z.find(se=>se.textValue===fe))==null?void 0:de.ref.current;(function se(ye){$.current=ye,window.clearTimeout(j.current),ye!==""&&(j.current=window.setTimeout(()=>se(""),1e3))})(G),ie&&setTimeout(()=>ie.focus())};b.useEffect(()=>()=>window.clearTimeout(j.current),[]),oR();const U=b.useCallback(V=>{var z,X;return H.current===((z=K.current)==null?void 0:z.side)&&yEe(V,(X=K.current)==null?void 0:X.area)},[]);return v.jsx(tEe,{scope:n,searchRef:$,onItemEnter:b.useCallback(V=>{U(V)&&V.preventDefault()},[U]),onItemLeave:b.useCallback(V=>{var G;U(V)||((G=k.current)==null||G.focus(),T(null))},[U]),onTriggerLeave:b.useCallback(V=>{U(V)&&V.preventDefault()},[U]),pointerGraceTimerRef:L,onPointerGraceIntentChange:b.useCallback(V=>{K.current=V},[]),children:v.jsx(W,{...q,children:v.jsx(ob,{asChild:!0,trapped:o,onMountAutoFocus:Je(i,V=>{var G;V.preventDefault(),(G=k.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:v.jsx(th,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:v.jsx(RZ,{asChild:!0,...O,dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:T,onEntryFocus:Je(l,V=>{_.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(tb,{role:"menu","aria-orientation":"vertical","data-state":JZ(w.open),"data-radix-menu-content":"",dir:_.dir,...C,...y,ref:M,style:{outline:"none",...y.style},onKeyDown:Je(y.onKeyDown,V=>{const z=V.target.closest("[data-radix-menu-content]")===V.currentTarget,X=V.ctrlKey||V.altKey||V.metaKey,ee=V.key.length===1;z&&(V.key==="Tab"&&V.preventDefault(),!X&&ee&&Y(V.key));const ae=k.current;if(V.target!==ae||!G_e.includes(V.key))return;V.preventDefault();const ie=P().filter(we=>!we.disabled).map(we=>we.ref.current);TZ.includes(V.key)&&ie.reverse(),pEe(ie)}),onBlur:Je(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(j.current),$.current="")}),onPointerMove:Je(e.onPointerMove,Uw(V=>{const G=V.target,z=D.current!==V.clientX;if(V.currentTarget.contains(G)&&z){const X=V.clientX>D.current?"right":"left";H.current=X,D.current=V.clientX}}))})})})})})})});DZ.displayName=zs;var iEe="MenuGroup",$L=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Jt.div,{role:"group",...r,ref:t})});$L.displayName=iEe;var aEe="MenuLabel",LZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Jt.div,{...r,ref:t})});LZ.displayName=aEe;var qE="MenuItem",F7="menu.itemSelect",hR=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=b.useRef(null),a=hb(qE,e.__scopeMenu),s=DL(qE,e.__scopeMenu),l=zn(t,i),u=b.useRef(!1),c=()=>{const d=i.current;if(!n&&d){const h=new CustomEvent(F7,{bubbles:!0,cancelable:!0});d.addEventListener(F7,p=>r==null?void 0:r(p),{once:!0}),Q3(d,h),h.defaultPrevented?u.current=!1:a.onClose()}};return v.jsx($Z,{...o,ref:l,disabled:n,onClick:Je(e.onClick,c),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:Je(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:Je(e.onKeyDown,d=>{const h=s.searchRef.current!=="";n||h&&d.key===" "||QI.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});hR.displayName=qE;var $Z=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=DL(qE,n),s=kZ(n),l=b.useRef(null),u=zn(t,l),[c,d]=b.useState(!1),[h,p]=b.useState("");return b.useEffect(()=>{const x=l.current;x&&p((x.textContent??"").trim())},[i.children]),v.jsx(qw.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:v.jsx(PZ,{asChild:!0,...s,focusable:!r,children:v.jsx(Jt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Je(e.onPointerMove,Uw(x=>{r?a.onItemLeave(x):(a.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Je(e.onPointerLeave,Uw(x=>a.onItemLeave(x))),onFocus:Je(e.onFocus,()=>d(!0)),onBlur:Je(e.onBlur,()=>d(!1))})})})}),sEe="MenuCheckboxItem",FZ=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.jsx(VZ,{scope:e.__scopeMenu,checked:n,children:v.jsx(hR,{role:"menuitemcheckbox","aria-checked":UE(n)?"mixed":n,...o,ref:t,"data-state":zL(n),onSelect:Je(o.onSelect,()=>r==null?void 0:r(UE(n)?!0:!n),{checkForDefaultPrevented:!1})})})});FZ.displayName=sEe;var BZ="MenuRadioGroup",[lEe,uEe]=Sm(BZ,{value:void 0,onValueChange:()=>{}}),zZ=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ji(r);return v.jsx(lEe,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx($L,{...o,ref:t})})});zZ.displayName=BZ;var qZ="MenuRadioItem",UZ=b.forwardRef((e,t)=>{const{value:n,...r}=e,o=uEe(qZ,e.__scopeMenu),i=n===o.value;return v.jsx(VZ,{scope:e.__scopeMenu,checked:i,children:v.jsx(hR,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":zL(i),onSelect:Je(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});UZ.displayName=qZ;var FL="MenuItemIndicator",[VZ,cEe]=Sm(FL,{checked:!1}),WZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=cEe(FL,n);return v.jsx(ji,{present:r||UE(i.checked)||i.checked===!0,children:v.jsx(Jt.span,{...o,ref:t,"data-state":zL(i.checked)})})});WZ.displayName=FL;var fEe="MenuSeparator",HZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Jt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});HZ.displayName=fEe;var dEe="MenuArrow",GZ=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=db(n);return v.jsx(nb,{...o,...r,ref:t})});GZ.displayName=dEe;var BL="MenuSub",[hEe,KZ]=Sm(BL),YZ=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=nh(BL,t),a=db(t),[s,l]=b.useState(null),[u,c]=b.useState(null),d=Ji(o);return b.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),v.jsx(qy,{...a,children:v.jsx(NZ,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:v.jsx(hEe,{scope:t,contentId:Ta(),triggerId:Ta(),trigger:s,onTriggerChange:l,children:n})})})};YZ.displayName=BL;var nw="MenuSubTrigger",XZ=b.forwardRef((e,t)=>{const n=nh(nw,e.__scopeMenu),r=hb(nw,e.__scopeMenu),o=KZ(nw,e.__scopeMenu),i=DL(nw,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},c=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>c,[c]),b.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),v.jsx(jL,{asChild:!0,...u,children:v.jsx($Z,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":JZ(n.open),...e,ref:Jx(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Je(e.onPointerMove,Uw(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Je(e.onPointerLeave,Uw(d=>{var p,x;c();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const y=(x=n.content)==null?void 0:x.dataset.side,w=y==="right",_=w?-5:5,C=h[w?"left":"right"],O=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+_,y:d.clientY},{x:C,y:h.top},{x:O,y:h.top},{x:O,y:h.bottom},{x:C,y:h.bottom}],side:y}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Je(e.onKeyDown,d=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&d.key===" "||K_e[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});XZ.displayName=nw;var QZ="MenuSubContent",ZZ=b.forwardRef((e,t)=>{const n=jZ(zs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=nh(zs,e.__scopeMenu),a=hb(zs,e.__scopeMenu),s=KZ(QZ,e.__scopeMenu),l=b.useRef(null),u=zn(t,l);return v.jsx(qw.Provider,{scope:e.__scopeMenu,children:v.jsx(ji,{present:r||i.open,children:v.jsx(qw.Slot,{scope:e.__scopeMenu,children:v.jsx(LL,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;a.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Je(e.onFocusOutside,c=>{c.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Je(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Je(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),h=Y_e[a.dir].includes(c.key);d&&h&&(i.onOpenChange(!1),(p=s.trigger)==null||p.focus(),c.preventDefault())})})})})})});ZZ.displayName=QZ;function JZ(e){return e?"open":"closed"}function UE(e){return e==="indeterminate"}function zL(e){return UE(e)?"indeterminate":e?"checked":"unchecked"}function pEe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function mEe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function gEe(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=mEe(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function vEe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;ir!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}function yEe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return vEe(n,t)}function Uw(e){return t=>t.pointerType==="mouse"?e(t):void 0}var wEe=MZ,xEe=jL,bEe=IZ,SEe=DZ,_Ee=$L,EEe=LZ,CEe=hR,OEe=FZ,REe=zZ,PEe=UZ,TEe=WZ,AEe=HZ,kEe=GZ,NEe=YZ,MEe=XZ,jEe=ZZ,pR="DropdownMenu",[IEe]=fs(pR,[AZ]),Ii=AZ(),[DEe,eJ]=IEe(pR),tJ=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=Ii(t),u=b.useRef(null),[c,d]=Ws({prop:o,defaultProp:i??!1,onChange:a,caller:pR});return v.jsx(DEe,{scope:t,triggerId:Ta(),triggerRef:u,contentId:Ta(),open:c,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),modal:s,children:v.jsx(wEe,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:n})})};tJ.displayName=pR;var nJ="DropdownMenuTrigger",rJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=eJ(nJ,n),a=Ii(n);return v.jsx(xEe,{asChild:!0,...a,children:v.jsx(Jt.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Jx(t,i.triggerRef),onPointerDown:Je(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:Je(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});rJ.displayName=nJ;var LEe="DropdownMenuPortal",oJ=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ii(t);return v.jsx(bEe,{...r,...n})};oJ.displayName=LEe;var iJ="DropdownMenuContent",aJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=eJ(iJ,n),i=Ii(n),a=b.useRef(!1);return v.jsx(SEe,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:Je(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)==null||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Je(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!o.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aJ.displayName=iJ;var $Ee="DropdownMenuGroup",FEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(_Ee,{...o,...r,ref:t})});FEe.displayName=$Ee;var BEe="DropdownMenuLabel",sJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(EEe,{...o,...r,ref:t})});sJ.displayName=BEe;var zEe="DropdownMenuItem",lJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(CEe,{...o,...r,ref:t})});lJ.displayName=zEe;var qEe="DropdownMenuCheckboxItem",uJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(OEe,{...o,...r,ref:t})});uJ.displayName=qEe;var UEe="DropdownMenuRadioGroup",VEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(REe,{...o,...r,ref:t})});VEe.displayName=UEe;var WEe="DropdownMenuRadioItem",cJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(PEe,{...o,...r,ref:t})});cJ.displayName=WEe;var HEe="DropdownMenuItemIndicator",fJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(TEe,{...o,...r,ref:t})});fJ.displayName=HEe;var GEe="DropdownMenuSeparator",dJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(AEe,{...o,...r,ref:t})});dJ.displayName=GEe;var KEe="DropdownMenuArrow",YEe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(kEe,{...o,...r,ref:t})});YEe.displayName=KEe;var XEe=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Ii(t),[s,l]=Ws({prop:r,defaultProp:i??!1,onChange:o,caller:"DropdownMenuSub"});return v.jsx(NEe,{...a,open:s,onOpenChange:l,children:n})},QEe="DropdownMenuSubTrigger",hJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(MEe,{...o,...r,ref:t})});hJ.displayName=QEe;var ZEe="DropdownMenuSubContent",pJ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ii(n);return v.jsx(jEe,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});pJ.displayName=ZEe;var JEe=tJ,eCe=rJ,tCe=oJ,mJ=aJ,gJ=sJ,vJ=lJ,yJ=uJ,wJ=cJ,xJ=fJ,bJ=dJ,nCe=XEe,SJ=hJ,_J=pJ;const qL=JEe,UL=eCe,att=nCe,rCe=b.forwardRef(({className:e,inset:t,children:n,...r},o)=>v.jsxs(SJ,{ref:o,className:je("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,v.jsx(AL,{className:"ml-auto h-4 w-4"})]}));rCe.displayName=SJ.displayName;const oCe=b.forwardRef(({className:e,...t},n)=>v.jsx(_J,{ref:n,className:je("z-[300] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));oCe.displayName=_J.displayName;const iCe=Hl("min-w-[8rem] overflow-hidden rounded-md border p-1 text-popover-foreground shadow-md",{variants:{variant:{default:"z-[300] bg-popover",sidebar:"z-[300] bg-secondary text-secondary-foreground shadow-lg pointer-events-auto"}},defaultVariants:{variant:"default"}}),mR=b.forwardRef(({className:e,sideOffset:t=4,variant:n,...r},o)=>v.jsx(tCe,{children:v.jsx(mJ,{ref:o,sideOffset:t,className:je(iCe({variant:n}),"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));mR.displayName=mJ.displayName;const aCe=Hl("relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"cursor-default focus:bg-accent focus:text-accent-foreground",interactive:"cursor-pointer hover:bg-primary/10 focus:bg-primary/10 focus:text-accent-foreground",static:"cursor-default hover:bg-transparent focus:bg-transparent"}},defaultVariants:{variant:"default"}}),bw=b.forwardRef(({className:e,inset:t,variant:n,...r},o)=>v.jsx(vJ,{ref:o,className:je(aCe({variant:n}),t&&"pl-8",e),...r}));bw.displayName=vJ.displayName;const sCe=b.forwardRef(({className:e,children:t,checked:n,...r},o)=>v.jsxs(yJ,{ref:o,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(xJ,{children:v.jsx(lR,{className:"h-4 w-4"})})}),t]}));sCe.displayName=yJ.displayName;const lCe=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(wJ,{ref:r,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(xJ,{children:v.jsx(KSe,{className:"h-4 w-4 fill-current"})})}),t]}));lCe.displayName=wJ.displayName;const uCe=b.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(gJ,{ref:r,className:je("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));uCe.displayName=gJ.displayName;const EJ=b.forwardRef(({className:e,...t},n)=>v.jsx(bJ,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));EJ.displayName=bJ.displayName;const cCe=({className:e,...t})=>v.jsx("span",{className:je("ml-auto text-xs tracking-widest opacity-60",e),...t});cCe.displayName="DropdownMenuShortcut";function Dr({column:e,title:t,className:n}){return e.getCanSort()?v.jsx("div",{className:je("flex items-center space-x-2",n),children:v.jsxs(qL,{children:[v.jsx(UL,{asChild:!0,children:v.jsx(xt,{variant:"ghost",size:"sm",className:"data-[state=open]:bg-accent",rightIcon:e.getIsSorted()==="desc"?v.jsx(D7,{className:"size-4"}):e.getIsSorted()==="asc"?v.jsx(L7,{className:"size-4"}):v.jsx(LSe,{className:"size-4"}),children:v.jsx("span",{children:t})})}),v.jsxs(mR,{align:"start",children:[v.jsxs(bw,{onClick:()=>e.toggleSorting(!1),children:[v.jsx(L7,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Asc"]}),v.jsxs(bw,{onClick:()=>e.toggleSorting(!0),children:[v.jsx(D7,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Desc"]}),v.jsx(EJ,{}),v.jsxs(bw,{onClick:()=>e.toggleVisibility(!1),children:[v.jsx(n_e,{className:"mr-2 h-3.5 w-3.5 text-gray-600 dark:text-gray-400/70"}),"Hide"]})]})]})}):v.jsx("div",{className:je(n,"text-xs"),children:t})}const CJ=({text:e,className:t,withText:n,onCopy:r})=>{const[o,i]=b.useState(!1);return v.jsxs(xt,{className:je(t,n?"mt-2 flex cursor-pointer flex-row items-center gap-2":"h-6 w-6 cursor-pointer p-0"),variant:n?"default":"ghost",onClick:()=>{navigator.clipboard.writeText(e),i(!0),r&&r(),setTimeout(()=>{i(!1)},2e3)},children:[o?v.jsx(obe,{className:"h-4 w-4"}):v.jsx(WSe,{className:"h-4 w-4"}),n&&(o?"Copied":"Copy to clipboard")]})};function fCe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function dCe(e,t){if(e==null)return{};var n,r,o=fCe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);n=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var X2={};function xCe(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return X2[t]||(X2[t]=wCe(e)),X2[t]}function bCe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(i){return i!=="token"}),o=xCe(r);return o.reduce(function(i,a){return hv(hv({},i),n[a])},t)}function z7(e){return e.join(" ")}function SCe(e,t){var n=0;return function(r){return n+=1,r.map(function(o,i){return RJ({node:o,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function RJ(e){var t=e.node,n=e.stylesheet,r=e.style,o=r===void 0?{}:r,i=e.useInlineStyles,a=e.key,s=t.properties,l=t.type,u=t.tagName,c=t.value;if(l==="text")return c;if(u){var d=SCe(n,i),h;if(!i)h=hv(hv({},s),{},{className:z7(s.className)});else{var p=Object.keys(n).reduce(function(_,C){return C.split(".").forEach(function(O){_.includes(O)||_.push(O)}),_},[]),x=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&x.concat(s.className.filter(function(_){return!p.includes(_)}));h=hv(hv({},s),{},{className:z7(y)||void 0,style:bCe(s.className,Object.assign({},s.style,o),n)})}var w=d(t.children);return J.createElement(u,Ni({key:a},h),w)}}const _Ce=(function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1});var ECe=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function q7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function jd(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=0;r2&&arguments[2]!==void 0?arguments[2]:[];return dE({children:R,lineNumber:T,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:o,lineProps:n,className:k,showLineNumbers:r,wrapLongLines:l,wrapLines:t})}function y(R,T){if(r&&T&&o){var k=TJ(s,T,a);R.unshift(PJ(T,k))}return R}function w(R,T){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||k.length>0?x(R,T,k):y(R,T)}for(var _=function(){var T=c[p],k=T.children[0].value,M=OCe(k);if(M){var j=k.split(` -`);j.forEach(function($,L){var K=r&&d.length+i,H={type:"text",value:"".concat($,` -`)};if(L===0){var D=c.slice(h+1,p).concat(dE({children:[H],className:T.properties.className})),W=w(D,K);d.push(W)}else if(L===j.length-1){var q=c[p+1]&&c[p+1].children&&c[p+1].children[0],Y={type:"text",value:"".concat($)};if(q){var U=dE({children:[Y],className:T.properties.className});c.splice(p+1,0,U)}else{var V=[Y],G=w(V,K,T.properties.className);d.push(G)}}else{var z=[H],X=w(z,K,T.properties.className);d.push(X)}}),h=p}p++};p/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(me,...Ae){const Le=Object.create(null);for(const ze in me)Le[ze]=me[ze];return Ae.forEach(function(ze){for(const Vt in ze)Le[Vt]=ze[Vt]}),Le}const a="",s=me=>!!me.kind;class l{constructor(Ae,Le){this.buffer="",this.classPrefix=Le.classPrefix,Ae.walk(this)}addText(Ae){this.buffer+=o(Ae)}openNode(Ae){if(!s(Ae))return;let Le=Ae.kind;Ae.sublanguage||(Le=`${this.classPrefix}${Le}`),this.span(Le)}closeNode(Ae){s(Ae)&&(this.buffer+=a)}value(){return this.buffer}span(Ae){this.buffer+=``}}class u{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Ae){this.top.children.push(Ae)}openNode(Ae){const Le={kind:Ae,children:[]};this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Ae){return this.constructor._walk(Ae,this.rootNode)}static _walk(Ae,Le){return typeof Le=="string"?Ae.addText(Le):Le.children&&(Ae.openNode(Le),Le.children.forEach(ze=>this._walk(Ae,ze)),Ae.closeNode(Le)),Ae}static _collapse(Ae){typeof Ae!="string"&&Ae.children&&(Ae.children.every(Le=>typeof Le=="string")?Ae.children=[Ae.children.join("")]:Ae.children.forEach(Le=>{u._collapse(Le)}))}}class c extends u{constructor(Ae){super(),this.options=Ae}addKeyword(Ae,Le){Ae!==""&&(this.openNode(Le),this.addText(Ae),this.closeNode())}addText(Ae){Ae!==""&&this.add(Ae)}addSublanguage(Ae,Le){const ze=Ae.root;ze.kind=Le,ze.sublanguage=!0,this.add(ze)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(me){return new RegExp(me.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function h(me){return me?typeof me=="string"?me:me.source:null}function p(...me){return me.map(Le=>h(Le)).join("")}function x(...me){return"("+me.map(Le=>h(Le)).join("|")+")"}function y(me){return new RegExp(me.toString()+"|").exec("").length-1}function w(me,Ae){const Le=me&&me.exec(Ae);return Le&&Le.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(me,Ae="|"){let Le=0;return me.map(ze=>{Le+=1;const Vt=Le;let Ut=h(ze),Sn="";for(;Ut.length>0;){const at=_.exec(Ut);if(!at){Sn+=Ut;break}Sn+=Ut.substring(0,at.index),Ut=Ut.substring(at.index+at[0].length),at[0][0]==="\\"&&at[1]?Sn+="\\"+String(Number(at[1])+Vt):(Sn+=at[0],at[0]==="("&&Le++)}return Sn}).map(ze=>`(${ze})`).join(Ae)}const O=/\b\B/,P="[a-zA-Z]\\w*",R="[a-zA-Z_]\\w*",T="\\b\\d+(\\.\\d+)?",k="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",M="\\b(0b[01]+)",j="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$=(me={})=>{const Ae=/^#![ ]*\//;return me.binary&&(me.begin=p(Ae,/.*\b/,me.binary,/\b.*/)),i({className:"meta",begin:Ae,end:/$/,relevance:0,"on:begin":(Le,ze)=>{Le.index!==0&&ze.ignoreMatch()}},me)},L={begin:"\\\\[\\s\\S]",relevance:0},K={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[L]},H={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[L]},D={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},W=function(me,Ae,Le={}){const ze=i({className:"comment",begin:me,end:Ae,contains:[]},Le);return ze.contains.push(D),ze.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),ze},q=W("//","$"),Y=W("/\\*","\\*/"),U=W("#","$"),V={className:"number",begin:T,relevance:0},G={className:"number",begin:k,relevance:0},z={className:"number",begin:M,relevance:0},X={className:"number",begin:T+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},ee={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[L,{begin:/\[/,end:/\]/,relevance:0,contains:[L]}]}]},ae={className:"title",begin:P,relevance:0},fe={className:"title",begin:R,relevance:0},ie={begin:"\\.\\s*"+R,relevance:0};var de=Object.freeze({__proto__:null,MATCH_NOTHING_RE:O,IDENT_RE:P,UNDERSCORE_IDENT_RE:R,NUMBER_RE:T,C_NUMBER_RE:k,BINARY_NUMBER_RE:M,RE_STARTERS_RE:j,SHEBANG:$,BACKSLASH_ESCAPE:L,APOS_STRING_MODE:K,QUOTE_STRING_MODE:H,PHRASAL_WORDS_MODE:D,COMMENT:W,C_LINE_COMMENT_MODE:q,C_BLOCK_COMMENT_MODE:Y,HASH_COMMENT_MODE:U,NUMBER_MODE:V,C_NUMBER_MODE:G,BINARY_NUMBER_MODE:z,CSS_NUMBER_MODE:X,REGEXP_MODE:ee,TITLE_MODE:ae,UNDERSCORE_TITLE_MODE:fe,METHOD_GUARD:ie,END_SAME_AS_BEGIN:function(me){return Object.assign(me,{"on:begin":(Ae,Le)=>{Le.data._beginMatch=Ae[1]},"on:end":(Ae,Le)=>{Le.data._beginMatch!==Ae[1]&&Le.ignoreMatch()}})}});function se(me,Ae){me.input[me.index-1]==="."&&Ae.ignoreMatch()}function ye(me,Ae){Ae&&me.beginKeywords&&(me.begin="\\b("+me.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",me.__beforeBegin=se,me.keywords=me.keywords||me.beginKeywords,delete me.beginKeywords,me.relevance===void 0&&(me.relevance=0))}function Te(me,Ae){Array.isArray(me.illegal)&&(me.illegal=x(...me.illegal))}function ge(me,Ae){if(me.match){if(me.begin||me.end)throw new Error("begin & end are not supported with match");me.begin=me.match,delete me.match}}function Be(me,Ae){me.relevance===void 0&&(me.relevance=1)}const Ie=["of","and","for","in","not","or","if","then","parent","list","value"],Ve="keyword";function ht(me,Ae,Le=Ve){const ze={};return typeof me=="string"?Vt(Le,me.split(" ")):Array.isArray(me)?Vt(Le,me):Object.keys(me).forEach(function(Ut){Object.assign(ze,ht(me[Ut],Ae,Ut))}),ze;function Vt(Ut,Sn){Ae&&(Sn=Sn.map(at=>at.toLowerCase())),Sn.forEach(function(at){const vt=at.split("|");ze[vt[0]]=[Ut,lt(vt[0],vt[1])]})}}function lt(me,Ae){return Ae?Number(Ae):Ye(me)?0:1}function Ye(me){return Ie.includes(me.toLowerCase())}function Kt(me,{plugins:Ae}){function Le(at,vt){return new RegExp(h(at),"m"+(me.case_insensitive?"i":"")+(vt?"g":""))}class ze{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(vt,Lt){Lt.position=this.position++,this.matchIndexes[this.matchAt]=Lt,this.regexes.push([Lt,vt]),this.matchAt+=y(vt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const vt=this.regexes.map(Lt=>Lt[1]);this.matcherRe=Le(C(vt),!0),this.lastIndex=0}exec(vt){this.matcherRe.lastIndex=this.lastIndex;const Lt=this.matcherRe.exec(vt);if(!Lt)return null;const kt=Lt.findIndex((Xr,na)=>na>0&&Xr!==void 0),Jn=this.matchIndexes[kt];return Lt.splice(0,kt),Object.assign(Lt,Jn)}}class Vt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(vt){if(this.multiRegexes[vt])return this.multiRegexes[vt];const Lt=new ze;return this.rules.slice(vt).forEach(([kt,Jn])=>Lt.addRule(kt,Jn)),Lt.compile(),this.multiRegexes[vt]=Lt,Lt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(vt,Lt){this.rules.push([vt,Lt]),Lt.type==="begin"&&this.count++}exec(vt){const Lt=this.getMatcher(this.regexIndex);Lt.lastIndex=this.lastIndex;let kt=Lt.exec(vt);if(this.resumingScanAtSamePosition()&&!(kt&&kt.index===this.lastIndex)){const Jn=this.getMatcher(0);Jn.lastIndex=this.lastIndex+1,kt=Jn.exec(vt)}return kt&&(this.regexIndex+=kt.position+1,this.regexIndex===this.count&&this.considerAll()),kt}}function Ut(at){const vt=new Vt;return at.contains.forEach(Lt=>vt.addRule(Lt.begin,{rule:Lt,type:"begin"})),at.terminatorEnd&&vt.addRule(at.terminatorEnd,{type:"end"}),at.illegal&&vt.addRule(at.illegal,{type:"illegal"}),vt}function Sn(at,vt){const Lt=at;if(at.isCompiled)return Lt;[ge].forEach(Jn=>Jn(at,vt)),me.compilerExtensions.forEach(Jn=>Jn(at,vt)),at.__beforeBegin=null,[ye,Te,Be].forEach(Jn=>Jn(at,vt)),at.isCompiled=!0;let kt=null;if(typeof at.keywords=="object"&&(kt=at.keywords.$pattern,delete at.keywords.$pattern),at.keywords&&(at.keywords=ht(at.keywords,me.case_insensitive)),at.lexemes&&kt)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return kt=kt||at.lexemes||/\w+/,Lt.keywordPatternRe=Le(kt,!0),vt&&(at.begin||(at.begin=/\B|\b/),Lt.beginRe=Le(at.begin),at.endSameAsBegin&&(at.end=at.begin),!at.end&&!at.endsWithParent&&(at.end=/\B|\b/),at.end&&(Lt.endRe=Le(at.end)),Lt.terminatorEnd=h(at.end)||"",at.endsWithParent&&vt.terminatorEnd&&(Lt.terminatorEnd+=(at.end?"|":"")+vt.terminatorEnd)),at.illegal&&(Lt.illegalRe=Le(at.illegal)),at.contains||(at.contains=[]),at.contains=[].concat(...at.contains.map(function(Jn){return un(Jn==="self"?at:Jn)})),at.contains.forEach(function(Jn){Sn(Jn,Lt)}),at.starts&&Sn(at.starts,vt),Lt.matcher=Ut(Lt),Lt}if(me.compilerExtensions||(me.compilerExtensions=[]),me.contains&&me.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return me.classNameAliases=i(me.classNameAliases||{}),Sn(me)}function vn(me){return me?me.endsWithParent||vn(me.starts):!1}function un(me){return me.variants&&!me.cachedVariants&&(me.cachedVariants=me.variants.map(function(Ae){return i(me,{variants:null},Ae)})),me.cachedVariants?me.cachedVariants:vn(me)?i(me,{starts:me.starts?i(me.starts):null}):Object.isFrozen(me)?i(me):me}var on="10.7.3";function oe(me){return!!(me||me==="")}function he(me){const Ae={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!me.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let ze={};return this.autoDetect?(ze=me.highlightAuto(this.code),this.detectedLanguage=ze.language):(ze=me.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),ze.value},autoDetect(){return!this.language||oe(this.autodetect)},ignoreIllegals(){return!0}},render(ze){return ze("pre",{},[ze("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:Ae,VuePlugin:{install(ze){ze.component("highlightjs",Ae)}}}}const Se={"after:highlightElement":({el:me,result:Ae,text:Le})=>{const ze=Qe(me);if(!ze.length)return;const Vt=document.createElement("div");Vt.innerHTML=Ae.value,Ae.value=Ke(ze,Qe(Vt),Le)}};function Ge(me){return me.nodeName.toLowerCase()}function Qe(me){const Ae=[];return(function Le(ze,Vt){for(let Ut=ze.firstChild;Ut;Ut=Ut.nextSibling)Ut.nodeType===3?Vt+=Ut.nodeValue.length:Ut.nodeType===1&&(Ae.push({event:"start",offset:Vt,node:Ut}),Vt=Le(Ut,Vt),Ge(Ut).match(/br|hr|img|input/)||Ae.push({event:"stop",offset:Vt,node:Ut}));return Vt})(me,0),Ae}function Ke(me,Ae,Le){let ze=0,Vt="";const Ut=[];function Sn(){return!me.length||!Ae.length?me.length?me:Ae:me[0].offset!==Ae[0].offset?me[0].offset"}function vt(kt){Vt+=""}function Lt(kt){(kt.event==="start"?at:vt)(kt.node)}for(;me.length||Ae.length;){let kt=Sn();if(Vt+=o(Le.substring(ze,kt[0].offset)),ze=kt[0].offset,kt===me){Ut.reverse().forEach(vt);do Lt(kt.splice(0,1)[0]),kt=Sn();while(kt===me&&kt.length&&kt[0].offset===ze);Ut.reverse().forEach(at)}else kt[0].event==="start"?Ut.push(kt[0].node):Ut.pop(),Lt(kt.splice(0,1)[0])}return Vt+o(Le.substr(ze))}const nt={},At=me=>{console.error(me)},Rt=(me,...Ae)=>{console.log(`WARN: ${me}`,...Ae)},an=(me,Ae)=>{nt[`${me}/${Ae}`]||(console.log(`Deprecated as of ${me}. ${Ae}`),nt[`${me}/${Ae}`]=!0)},nr=o,$n=i,Mr=Symbol("nomatch");var Ce=function(me){const Ae=Object.create(null),Le=Object.create(null),ze=[];let Vt=!0;const Ut=/(^(<[^>]+>|\t|)+|\n)/gm,Sn="Could not find the language '{}', did you forget to load/include a language module?",at={disableAutodetect:!0,name:"Plain text",contains:[]};let vt={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:c};function Lt(We){return vt.noHighlightRe.test(We)}function kt(We){let gt=We.className+" ";gt+=We.parentNode?We.parentNode.className:"";const nn=vt.languageDetectRe.exec(gt);if(nn){const Wn=li(nn[1]);return Wn||(Rt(Sn.replace("{}",nn[1])),Rt("Falling back to no-highlight mode for this block.",We)),Wn?nn[1]:"no-highlight"}return gt.split(/\s+/).find(Wn=>Lt(Wn)||li(Wn))}function Jn(We,gt,nn,Wn){let er="",il="";typeof gt=="object"?(er=We,nn=gt.ignoreIllegals,il=gt.language,Wn=void 0):(an("10.7.0","highlight(lang, code, ...args) has been deprecated."),an("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),il=We,er=gt);const Li={code:er,language:il};ol("before:highlight",Li);const $i=Li.result?Li.result:Xr(Li.language,Li.code,nn,Wn);return $i.code=Li.code,ol("after:highlight",$i),$i}function Xr(We,gt,nn,Wn){function er(Et,Dt){const rn=Ba.case_insensitive?Dt[0].toLowerCase():Dt[0];return Object.prototype.hasOwnProperty.call(Et.keywords,rn)&&Et.keywords[rn]}function il(){if(!pn.keywords){Fr.addText(ir);return}let Et=0;pn.keywordPatternRe.lastIndex=0;let Dt=pn.keywordPatternRe.exec(ir),rn="";for(;Dt;){rn+=ir.substring(Et,Dt.index);const En=er(pn,Dt);if(En){const[Rr,ys]=En;if(Fr.addText(rn),rn="",sl+=ys,Rr.startsWith("_"))rn+=Dt[0];else{const nu=Ba.classNameAliases[Rr]||Rr;Fr.addKeyword(Dt[0],nu)}}else rn+=Dt[0];Et=pn.keywordPatternRe.lastIndex,Dt=pn.keywordPatternRe.exec(ir)}rn+=ir.substr(Et),Fr.addText(rn)}function Li(){if(ir==="")return;let Et=null;if(typeof pn.subLanguage=="string"){if(!Ae[pn.subLanguage]){Fr.addText(ir);return}Et=Xr(pn.subLanguage,ir,!0,Fn[pn.subLanguage]),Fn[pn.subLanguage]=Et.top}else Et=Qr(ir,pn.subLanguage.length?pn.subLanguage:null);pn.relevance>0&&(sl+=Et.relevance),Fr.addSublanguage(Et.emitter,Et.language)}function $i(){pn.subLanguage!=null?Li():il(),ir=""}function No(Et){return Et.className&&Fr.openNode(Ba.classNameAliases[Et.className]||Et.className),pn=Object.create(Et,{parent:{value:pn}}),pn}function Yo(Et,Dt,rn){let En=w(Et.endRe,rn);if(En){if(Et["on:end"]){const Rr=new r(Et);Et["on:end"](Dt,Rr),Rr.isMatchIgnored&&(En=!1)}if(En){for(;Et.endsParent&&Et.parent;)Et=Et.parent;return Et}}if(Et.endsWithParent)return Yo(Et.parent,Dt,rn)}function cc(Et){return pn.matcher.regexIndex===0?(ir+=Et[0],1):(dc=!0,0)}function fc(Et){const Dt=Et[0],rn=Et.rule,En=new r(rn),Rr=[rn.__beforeBegin,rn["on:begin"]];for(const ys of Rr)if(ys&&(ys(Et,En),En.isMatchIgnored))return cc(Dt);return rn&&rn.endSameAsBegin&&(rn.endRe=d(Dt)),rn.skip?ir+=Dt:(rn.excludeBegin&&(ir+=Dt),$i(),!rn.returnBegin&&!rn.excludeBegin&&(ir=Dt)),No(rn),rn.returnBegin?0:Dt.length}function Of(Et){const Dt=Et[0],rn=gt.substr(Et.index),En=Yo(pn,Et,rn);if(!En)return Mr;const Rr=pn;Rr.skip?ir+=Dt:(Rr.returnEnd||Rr.excludeEnd||(ir+=Dt),$i(),Rr.excludeEnd&&(ir=Dt));do pn.className&&Fr.closeNode(),!pn.skip&&!pn.subLanguage&&(sl+=pn.relevance),pn=pn.parent;while(pn!==En.parent);return En.starts&&(En.endSameAsBegin&&(En.starts.endRe=En.endRe),No(En.starts)),Rr.returnEnd?0:Dt.length}function Mm(){const Et=[];for(let Dt=pn;Dt!==Ba;Dt=Dt.parent)Dt.className&&Et.unshift(Dt.className);Et.forEach(Dt=>Fr.openNode(Dt))}let tu={};function Rf(Et,Dt){const rn=Dt&&Dt[0];if(ir+=Et,rn==null)return $i(),0;if(tu.type==="begin"&&Dt.type==="end"&&tu.index===Dt.index&&rn===""){if(ir+=gt.slice(Dt.index,Dt.index+1),!Vt){const En=new Error("0 width match regex");throw En.languageName=We,En.badRule=tu.rule,En}return 1}if(tu=Dt,Dt.type==="begin")return fc(Dt);if(Dt.type==="illegal"&&!nn){const En=new Error('Illegal lexeme "'+rn+'" for mode "'+(pn.className||"")+'"');throw En.mode=pn,En}else if(Dt.type==="end"){const En=Of(Dt);if(En!==Mr)return En}if(Dt.type==="illegal"&&rn==="")return 1;if(Pf>1e5&&Pf>Dt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ir+=rn,rn.length}const Ba=li(We);if(!Ba)throw At(Sn.replace("{}",We)),new Error('Unknown language: "'+We+'"');const al=Kt(Ba,{plugins:ze});let mh="",pn=Wn||al;const Fn={},Fr=new vt.__emitter(vt);Mm();let ir="",sl=0,vs=0,Pf=0,dc=!1;try{for(pn.matcher.considerAll();;){Pf++,dc?dc=!1:pn.matcher.considerAll(),pn.matcher.lastIndex=vs;const Et=pn.matcher.exec(gt);if(!Et)break;const Dt=gt.substring(vs,Et.index),rn=Rf(Dt,Et);vs=Et.index+rn}return Rf(gt.substr(vs)),Fr.closeAllNodes(),Fr.finalize(),mh=Fr.toHTML(),{relevance:Math.floor(sl),value:mh,language:We,illegal:!1,emitter:Fr,top:pn}}catch(Et){if(Et.message&&Et.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:Et.message,context:gt.slice(vs-100,vs+100),mode:Et.mode},sofar:mh,relevance:0,value:nr(gt),emitter:Fr};if(Vt)return{illegal:!1,relevance:0,value:nr(gt),emitter:Fr,language:We,top:pn,errorRaised:Et};throw Et}}function na(We){const gt={relevance:0,emitter:new vt.__emitter(vt),value:nr(We),illegal:!1,top:at};return gt.emitter.addText(We),gt}function Qr(We,gt){gt=gt||vt.languages||Object.keys(Ae);const nn=na(We),Wn=gt.filter(li).filter(dr).map(No=>Xr(No,We,!1));Wn.unshift(nn);const er=Wn.sort((No,Yo)=>{if(No.relevance!==Yo.relevance)return Yo.relevance-No.relevance;if(No.language&&Yo.language){if(li(No.language).supersetOf===Yo.language)return 1;if(li(Yo.language).supersetOf===No.language)return-1}return 0}),[il,Li]=er,$i=il;return $i.second_best=Li,$i}function Js(We){return vt.tabReplace||vt.useBR?We.replace(Ut,gt=>gt===` -`?vt.useBR?"
    ":gt:vt.tabReplace?gt.replace(/\t/g,vt.tabReplace):gt):We}function ko(We,gt,nn){const Wn=gt?Le[gt]:nn;We.classList.add("hljs"),Wn&&We.classList.add(Wn)}const ra={"before:highlightElement":({el:We})=>{vt.useBR&&(We.innerHTML=We.innerHTML.replace(/\n/g,"").replace(//g,` -`))},"after:highlightElement":({result:We})=>{vt.useBR&&(We.value=We.value.replace(/\n/g,"
    "))}},oa=/^(<[^>]+>|\t)+/gm,ms={"after:highlightElement":({result:We})=>{vt.tabReplace&&(We.value=We.value.replace(oa,gt=>gt.replace(/\t/g,vt.tabReplace)))}};function La(We){let gt=null;const nn=kt(We);if(Lt(nn))return;ol("before:highlightElement",{el:We,language:nn}),gt=We;const Wn=gt.textContent,er=nn?Jn(Wn,{language:nn,ignoreIllegals:!0}):Qr(Wn);ol("after:highlightElement",{el:We,result:er,text:Wn}),We.innerHTML=er.value,ko(We,nn,er.language),We.result={language:er.language,re:er.relevance,relavance:er.relevance},er.second_best&&(We.second_best={language:er.second_best.language,re:er.second_best.relevance,relavance:er.second_best.relevance})}function el(We){We.useBR&&(an("10.3.0","'useBR' will be removed entirely in v11.0"),an("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),vt=$n(vt,We)}const ia=()=>{if(ia.called)return;ia.called=!0,an("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(La)};function Ko(){an("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),$a=!0}let $a=!1;function gs(){if(document.readyState==="loading"){$a=!0;return}document.querySelectorAll("pre code").forEach(La)}function tl(){$a&&gs()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",tl,!1);function Di(We,gt){let nn=null;try{nn=gt(me)}catch(Wn){if(At("Language definition for '{}' could not be registered.".replace("{}",We)),Vt)At(Wn);else throw Wn;nn=at}nn.name||(nn.name=We),Ae[We]=nn,nn.rawDefinition=gt.bind(null,me),nn.aliases&&rl(nn.aliases,{languageName:We})}function Fa(We){delete Ae[We];for(const gt of Object.keys(Le))Le[gt]===We&&delete Le[gt]}function Zl(){return Object.keys(Ae)}function nl(We){an("10.4.0","requireLanguage will be removed entirely in v11."),an("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const gt=li(We);if(gt)return gt;throw new Error("The '{}' language is required, but not loaded.".replace("{}",We))}function li(We){return We=(We||"").toLowerCase(),Ae[We]||Ae[Le[We]]}function rl(We,{languageName:gt}){typeof We=="string"&&(We=[We]),We.forEach(nn=>{Le[nn.toLowerCase()]=gt})}function dr(We){const gt=li(We);return gt&&!gt.disableAutodetect}function Jl(We){We["before:highlightBlock"]&&!We["before:highlightElement"]&&(We["before:highlightElement"]=gt=>{We["before:highlightBlock"](Object.assign({block:gt.el},gt))}),We["after:highlightBlock"]&&!We["after:highlightElement"]&&(We["after:highlightElement"]=gt=>{We["after:highlightBlock"](Object.assign({block:gt.el},gt))})}function lc(We){Jl(We),ze.push(We)}function ol(We,gt){const nn=We;ze.forEach(function(Wn){Wn[nn]&&Wn[nn](gt)})}function eu(We){return an("10.2.0","fixMarkup will be removed entirely in v11.0"),an("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),Js(We)}function uc(We){return an("10.7.0","highlightBlock will be removed entirely in v12.0"),an("10.7.0","Please use highlightElement now."),La(We)}Object.assign(me,{highlight:Jn,highlightAuto:Qr,highlightAll:gs,fixMarkup:eu,highlightElement:La,highlightBlock:uc,configure:el,initHighlighting:ia,initHighlightingOnLoad:Ko,registerLanguage:Di,unregisterLanguage:Fa,listLanguages:Zl,getLanguage:li,registerAliases:rl,requireLanguage:nl,autoDetection:dr,inherit:$n,addPlugin:lc,vuePlugin:he(me).VuePlugin}),me.debugMode=function(){Vt=!1},me.safeMode=function(){Vt=!0},me.versionString=on;for(const We in de)typeof de[We]=="object"&&t(de[We]);return Object.assign(me,de),me.addPlugin(ra),me.addPlugin(Se),me.addPlugin(ms),me}({});return Q2=Ce,Q2}var Z2={exports:{}},V7;function ICe(){return V7||(V7=1,(function(e){(function(){var t;t=e.exports=o,t.format=o,t.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(t.printf=n);function n(){console.log(o.apply(null,arguments))}function r(i,a){return o.apply(null,[i].concat(a))}function o(i){for(var a=1,s=[].slice.call(arguments),l=0,u=i.length,c="",d,h=!1,p,x,y=!1,w,_=function(){return s[a++]},C=function(){for(var O="";/\d/.test(i[l]);)O+=i[l++],d=i[l];return O.length>0?parseInt(O):null};lk.relevance&&(k=M),M.relevance>T.relevance&&(k=T,T=M));return k.language&&(T.secondBest=k),T}function i(w,_){e.registerLanguage(w,_)}function a(){return e.listLanguages()}function s(w,_){var C=w,O;_&&(C={},C[w]=_);for(O in C)e.registerAliases(C[O],{languageName:O})}function l(w){this.options=w,this.rootNode={children:[]},this.stack=[this.rootNode]}function u(w,_){this.openNode(_),this.addText(w),this.closeNode()}function c(w,_){var C=this.stack,O=C[C.length-1],P=w.rootNode.children,R=_?{type:"element",tagName:"span",properties:{className:[_]},children:P}:P;O.children=O.children.concat(R)}function d(w){var _=this.stack,C,O;w!==""&&(C=_[_.length-1],O=C.children[C.children.length-1],O&&O.type==="text"?O.value+=w:C.children.push({type:"text",value:w}))}function h(w){var _=this.stack,C=this.options.classPrefix+w,O=_[_.length-1],P={type:"element",tagName:"span",properties:{className:[C]},children:[]};O.children.push(P),_.push(P)}function p(){this.stack.pop()}function x(){return""}function y(){}return pp}var eA,G7;function $Ce(){if(G7)return eA;G7=1;function e(t){const n={literal:"true false null"},r=[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],o=[t.QUOTE_STRING_MODE,t.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:o,keywords:n},a={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE],illegal:"\\n"},t.inherit(i,{begin:/:/})].concat(r),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[t.inherit(i)],illegal:"\\S"};return o.push(a,s),r.forEach(function(l){o.push(l)}),{name:"JSON",contains:o,keywords:n,illegal:"\\S"}}return eA=e,eA}var tA,K7;function FCe(){if(K7)return tA;K7=1;function e(t){var n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},s=t.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",c="(\\.[0-9]*)?",d="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",h={className:"number",begin:"\\b"+l+u+c+d+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},x={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},y={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},w=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},h,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},x,y,a],_=[...w];return _.pop(),_.push(s),p.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return tA=e,tA}var nA,Y7;function BCe(){if(Y7)return nA;Y7=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],r=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],o=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","module","global"],s=[].concat(i,a,r,o);function l(p){return p?typeof p=="string"?p:p.source:null}function u(p){return c("(?=",p,")")}function c(...p){return p.map(y=>l(y)).join("")}function d(p){const x=(Y,{after:U})=>{const V="",end:""},_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Y,U)=>{const V=Y[0].length+Y.index,G=Y.input[V];if(G==="<"){U.ignoreMatch();return}G===">"&&(x(Y,{after:V})||U.ignoreMatch())}},C={$pattern:e,keyword:t,literal:n,built_in:s},O="[0-9](_?[0-9])*",P=`\\.(${O})`,R="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",T={className:"number",variants:[{begin:`(\\b(${R})((${P})|\\.)?|(${P}))[eE][+-]?(${O})\\b`},{begin:`\\b(${R})\\b((${P})\\b|\\.)?|(${P})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},k={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},M={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,k],subLanguage:"xml"}},j={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,k],subLanguage:"css"}},$={className:"string",begin:"`",end:"`",contains:[p.BACKSLASH_ESCAPE,k]},K={className:"comment",variants:[p.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),p.C_BLOCK_COMMENT_MODE,p.C_LINE_COMMENT_MODE]},H=[p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,M,j,$,T,p.REGEXP_MODE];k.contains=H.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(H)});const D=[].concat(K,k.contains),W=D.concat([{begin:/\(/,end:/\)/,keywords:C,contains:["self"].concat(D)}]),q={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:W};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:W},illegal:/#(?![$_A-z])/,contains:[p.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,M,j,$,K,T,{begin:c(/[{,\n]\s*/,u(c(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,y+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:y+u("\\s*:"),relevance:0}]},{begin:"("+p.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[K,p.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+p.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:p.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:W}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:w.begin,end:w.end},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:C,contains:["self",p.inherit(p.TITLE_MODE,{begin:y}),q],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:p.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[q,p.inherit(p.TITLE_MODE,{begin:y})]},{variants:[{begin:"\\."+y},{begin:"\\$"+y}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},p.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[p.inherit(p.TITLE_MODE,{begin:y}),"self",q]},{begin:"(get|set)\\s+(?="+y+"\\()",end:/\{/,keywords:"get set",contains:[p.inherit(p.TITLE_MODE,{begin:y}),{begin:/\(\)/},q]},{begin:/\$[(.]/}]}}function h(p){const x=e,y={beginKeywords:"namespace",end:/\{/,excludeEnd:!0},w={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},_={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},C=["any","void","number","boolean","string","object","never","enum"],O=["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"],P={$pattern:e,keyword:t.concat(O),literal:n,built_in:s.concat(C)},R={className:"meta",begin:"@"+x},T=(j,$,L)=>{const K=j.contains.findIndex(H=>H.label===$);if(K===-1)throw new Error("can not find mode to replace");j.contains.splice(K,1,L)},k=d(p);Object.assign(k.keywords,P),k.exports.PARAMS_CONTAINS.push(R),k.contains=k.contains.concat([R,y,w]),T(k,"shebang",p.SHEBANG()),T(k,"use_strict",_);const M=k.contains.find(j=>j.className==="function");return M.relevance=0,Object.assign(k,{name:"TypeScript",aliases:["ts","tsx"]}),k}return nA=h,nA}var zCe=LCe();const NJ=Ln(zCe);var pb=MCe(NJ,{});pb.registerLanguage=NJ.registerLanguage;var qCe=$Ce();const UCe=Ln(qCe);var VCe=BCe();const WCe=Ln(VCe);var HCe=FCe();const GCe=Ln(HCe),KCe={"hljs-comment":{color:"#B6B18B"},"hljs-quote":{color:"#B6B18B"},"hljs-variable":{color:"#EB3C54"},"hljs-template-variable":{color:"#EB3C54"},"hljs-tag":{color:"#EB3C54"},"hljs-name":{color:"#EB3C54"},"hljs-selector-id":{color:"#EB3C54"},"hljs-selector-class":{color:"#EB3C54"},"hljs-regexp":{color:"#EB3C54"},"hljs-deletion":{color:"#EB3C54"},"hljs-number":{color:"#E7CE56"},"hljs-built_in":{color:"#E7CE56"},"hljs-builtin-name":{color:"#E7CE56"},"hljs-literal":{color:"#E7CE56"},"hljs-type":{color:"#E7CE56"},"hljs-params":{color:"#E7CE56"},"hljs-meta":{color:"#E7CE56"},"hljs-link":{color:"#E7CE56"},"hljs-attribute":{color:"#EE7C2B"},"hljs-string":{color:"#4FB4D7"},"hljs-symbol":{color:"#4FB4D7"},"hljs-bullet":{color:"#4FB4D7"},"hljs-addition":{color:"#4FB4D7"},"hljs-title":{color:"#78BB65"},"hljs-section":{color:"#78BB65"},"hljs-keyword":{color:"#B45EA4"},"hljs-selector-tag":{color:"#B45EA4"},hljs:{display:"block",overflowX:"auto",background:"#1C1D21",color:"#c0c5ce",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}},YCe={hljs:{display:"block",overflowX:"auto",padding:"0.5em",color:"#383a42",background:"#fafafa"},"hljs-comment":{color:"#a0a1a7",fontStyle:"italic"},"hljs-quote":{color:"#a0a1a7",fontStyle:"italic"},"hljs-doctag":{color:"#a626a4"},"hljs-keyword":{color:"#a626a4"},"hljs-formula":{color:"#a626a4"},"hljs-section":{color:"#e45649"},"hljs-name":{color:"#e45649"},"hljs-selector-tag":{color:"#e45649"},"hljs-deletion":{color:"#e45649"},"hljs-subst":{color:"#e45649"},"hljs-literal":{color:"#0184bb"},"hljs-string":{color:"#50a14f"},"hljs-regexp":{color:"#50a14f"},"hljs-addition":{color:"#50a14f"},"hljs-attribute":{color:"#50a14f"},"hljs-meta-string":{color:"#50a14f"},"hljs-built_in":{color:"#c18401"},"hljs-class .hljs-title":{color:"#c18401"},"hljs-attr":{color:"#986801"},"hljs-variable":{color:"#986801"},"hljs-template-variable":{color:"#986801"},"hljs-type":{color:"#986801"},"hljs-selector-class":{color:"#986801"},"hljs-selector-attr":{color:"#986801"},"hljs-selector-pseudo":{color:"#986801"},"hljs-number":{color:"#986801"},"hljs-symbol":{color:"#4078f2"},"hljs-bullet":{color:"#4078f2"},"hljs-link":{color:"#4078f2",textDecoration:"underline"},"hljs-meta":{color:"#4078f2"},"hljs-selector-id":{color:"#4078f2"},"hljs-title":{color:"#4078f2"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};pb.registerLanguage("typescript",WCe);pb.registerLanguage("yaml",GCe);pb.registerLanguage("json",UCe);function hf({code:e,copyCode:t,language:n,className:r,maxHeight:o,minHeight:i,maxWidth:a,minWidth:s,copy:l=!0,wrapLines:u=!0,onCopy:c}){const{theme:d}=hQ();return v.jsxs("div",{className:je("relative h-fit w-full rounded-lg bg-muted",r),children:[v.jsx(pb,{language:n,style:d=="dark"?KCe:YCe,wrapLines:u,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},customStyle:{cursor:"default",borderRadius:"0.5rem",maxHeight:o,minHeight:i,maxWidth:a,minWidth:s,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",fontSize:"0.75rem",lineHeight:"1rem",padding:"0.5rem",paddingRight:"2rem",flex:"1",background:"transparent"},children:e.trim()}),l&&v.jsx(CJ,{className:"absolute right-2 top-2",text:(t||e).trim(),onCopy:c})]})}const T1={id:"ID",workflowId:"Workflow",scope:"Scope",expression:"Expression",isDeclarative:"Is Declarative"},XCe="id",eD="workflowId",tD="scope",QCe="expression",ZCe="isDeclarative",stt=(e,t)=>[{accessorKey:XCe,header:({column:n})=>v.jsx(Dr,{column:n,title:T1.id}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:v.jsx(xt,{className:"w-fit pl-0",variant:"link",onClick:()=>{t==null||t(n.original)},children:n.original.metadata.id})}),enableSorting:!1,enableHiding:!0},{accessorKey:eD,header:({column:n})=>v.jsx(Dr,{column:n,title:T1.workflowId}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:e[n.original.workflowId]}),enableSorting:!1,enableHiding:!0},{accessorKey:tD,header:({column:n})=>v.jsx(Dr,{column:n,title:T1.scope}),cell:({row:n})=>v.jsx("div",{className:"w-full",children:n.original.scope}),enableSorting:!1,enableHiding:!0},{accessorKey:QCe,header:({column:n})=>v.jsx(Dr,{column:n,title:T1.expression}),cell:({row:n})=>v.jsx(hf,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:n.original.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"}),enableSorting:!1,enableHiding:!0},{accessorKey:ZCe,header:({column:n})=>v.jsx(Dr,{column:n,title:T1.isDeclarative}),cell:({row:n})=>n.original.isDeclarative?v.jsx(yL,{className:"size-4 text-green-600"}):null,enableSorting:!1,enableHiding:!0}],A1=(e,t)=>{const n=e.get(t);if(!n)return{pageIndex:0,pageSize:50};const r=JSON.parse(n);if(!r||typeof r!="object"||!("i"in r)||!("s"in r))return{pageIndex:0,pageSize:50};const{i:o,s:i}=r;return{pageIndex:o,pageSize:i}},k1=(e,t,n,r)=>({...Object.fromEntries(e.entries()),[t]:{i:n,s:r}}),JCe=e=>{if(!e)return"";try{return JSON.stringify(e)}catch{return e.map(t=>String(t)).join("|")}},VL=({key:e,resetPageOnChange:t})=>{const[n,r]=Wy(),o=`pagination-${e}`,i=b.useMemo(()=>A1(n,o),[n,o]),a=JCe(t),s=b.useRef(a);b.useEffect(()=>{s.current!==a&&(s.current=a,i.pageIndex!==0&&r(p=>{const x=A1(p,o);return k1(p,o,0,x.pageSize)}))},[a,i.pageIndex,r,o]);const l=b.useMemo(()=>i?i.pageIndex*i.pageSize:0,[i]),u=b.useMemo(()=>i?i.pageSize:25,[i]),c=b.useCallback(()=>{r(p=>{const x=A1(p,o);return k1(p,o,x.pageIndex+1,x.pageSize)})},[r,o]),d=b.useCallback(()=>{r(p=>{const x=A1(p,o);return k1(p,o,Math.max(0,x.pageIndex-1),x.pageSize)})},[r,o]),h=b.useCallback(p=>{r(x=>k1(x,o,0,p))},[r,o]);return{pagination:i,setPagination:p=>{r(x=>{const y=A1(x,o),w=typeof p=="function"?p(y):p;return k1(x,o,w.pageIndex,w.pageSize)})},offset:l,limit:u,nextPage:c,prevPage:d,setPageSize:h}};function ds(){const{tenantId:e}=rR();return Cr(e),{tenantId:e}}function eOe(){var $,L,K;const e=rR(),t=e.tenantId,n=e.tenant,r=e.membership,{invalidate:o}=nR(),i=rc(),a=LX(),s=Gl(),l=ta({strict:!1}),[u,c]=eQ(SL),d=l.tenant,h=b.useCallback((H,D)=>{if(c(H),(D==null?void 0:D.navigate)===!1)return;if(!!!a({to:ft.tenantRoute.to,params:d?{tenant:d}:void 0,fuzzy:!0})){s({to:ft.tenantRunsRoute.to,params:{tenant:H.metadata.id}});return}s({to:".",params:{tenant:H.metadata.id}})},[a,s,c,d]),p=Ir({mutationKey:["tenant:create"],mutationFn:async({name:H})=>{const D={name:H,slug:H.toLowerCase().replace(/\s+/g,"-")};return(await ot.tenantCreate(D)).data},onSuccess:async H=>(await i.invalidateQueries({queryKey:["user:*"]}),await o(),H.metadata.id&&h(H),H)}),x=Ir({mutationKey:["tenant:update",n==null?void 0:n.metadata.id],mutationFn:async H=>{if(!(n!=null&&n.metadata.id))throw new Error("Tenant not found");return(await ot.tenantUpdate(n.metadata.id,H)).data},onSuccess:()=>{i.invalidateQueries({queryKey:["user:*"]}),i.invalidateQueries({queryKey:["tenant:*"]})}}),y=Mn({queryKey:["tenant-resource-policy:get",n==null?void 0:n.metadata.id],queryFn:async()=>(await ot.tenantResourcePolicyGet((n==null?void 0:n.metadata.id)??"")).data.limits,enabled:!!(n!=null&&n.metadata.id)}),[w,_]=b.useState(!1),{cloud:C,isCloudEnabled:O}=K3(),P=b.useMemo(()=>{var H;if(!(!e.isUserUniverseLoaded||!e.organizations))return(H=e.organizations.find(D=>D.tenants.some(W=>{var q;return W.id===((q=n==null?void 0:n.metadata)==null?void 0:q.id)})))==null?void 0:H.metadata.id},[e.isUserUniverseLoaded,e.organizations,($=n==null?void 0:n.metadata)==null?void 0:$.id]),R=Mn({...Yr.controlPlane.billing(P||""),enabled:!!P&&O&&!!(C!=null&&C.canBill),refetchInterval:w?1e3:!1,retry:!1}),T=Mn({...Yr.controlPlane.paymentMethods(P||""),enabled:!!P&&!!(C!=null&&C.canBill),retry:!1}),k=b.useMemo(()=>{var D,W;const H=(W=(D=R.data)==null?void 0:D.currentSubscription)==null?void 0:W.plan;return H||"free"},[(K=(L=R.data)==null?void 0:L.currentSubscription)==null?void 0:K.plan]),M=b.useMemo(()=>{var W;if(!(C!=null&&C.canBill))return;const H=(((W=T.data)==null?void 0:W.length)||0)>0,D=T.isLoading||R.isLoading;return{state:R.data,setPollBilling:_,plan:k,hasPaymentMethods:H,isLoading:D}},[C==null?void 0:C.canBill,R.data,T.data,T.isLoading,R.isLoading,k]),j=b.useCallback(H=>H({tenant:n,billing:M,meta:C??void 0}),[M,C,n]);return{tenantId:t,tenant:n,isUserUniverseLoaded:e.isUserUniverseLoaded,membership:r,setTenant:h,create:p,update:{mutate:H=>x.mutate(H),mutateAsync:H=>x.mutateAsync(H),isPending:x.isPending},limit:y,billing:M,organizationId:P,can:j,lastTenantId:u==null?void 0:u.metadata.id}}const rA=(e,t)=>{const n=e.get(t);if(!n)return{w:[],s:[]};const r=JSON.parse(n);if(!r||typeof r!="object"||!("w"in r)||!("s"in r))return{w:[],s:[]};const{w:o,s:i}=r;return{w:Array.isArray(o)&&o.length>0?o:void 0,s:Array.isArray(i)&&i.length>0?i:void 0}},MJ=({key:e,scopeOverrides:t})=>{var X;const n=rc(),[r,o]=Wy(),{tenantId:i}=ds(),{refetchInterval:a}=xf(),s=`filters-${e}`,l=b.useMemo(()=>{const{w:ee}=rA(r,s);return ee},[r,s]),u=b.useMemo(()=>{if(t&&t.length>0)return t;const{s:ee}=rA(r,s);return ee},[r,s,t]),{limit:c,offset:d,pagination:h,setPagination:p,setPageSize:x}=VL({key:e,resetPageOnChange:[l,u]}),y=b.useMemo(()=>{const{w:ee,s:ae}=rA(r,s),fe=[];return ee&&ee.length>0&&fe.push({id:eD,value:ee}),ae&&ae.length>0&&fe.push({id:tD,value:ae}),fe},[r,s]),w=b.useCallback(ee=>{o(ae=>{const ie=typeof ee=="function"?ee(y):ee,we=ie.find(ge=>ge.id===eD),de=ie.find(ge=>ge.id===tD),se=we!=null&&we.value?Array.isArray(we.value)?we.value:[we.value]:[],ye=de!=null&&de.value?Array.isArray(de.value)?de.value:[de.value]:[],Te={w:se,s:ye};return{...Object.fromEntries(ae.entries()),[s]:Te}})},[y,s,o]),{data:_,isLoading:C,isRefetching:O,refetch:P,error:R}=Mn({queryKey:["v1:filter:list",i,e,d,c,l,u],queryFn:async()=>(await ot.v1FilterList(i,{offset:d,limit:c,workflowIds:l,scopes:u})).data,refetchInterval:a,placeholderData:ee=>ee}),T=(_==null?void 0:_.rows)??[],k=((X=_==null?void 0:_.pagination)==null?void 0:X.num_pages)??1,{data:M,isLoading:j,error:$}=Mn({...Yr.workflows.list(i,{limit:200})}),L=b.useMemo(()=>{var ee;return((ee=M==null?void 0:M.rows)==null?void 0:ee.map(ae=>({value:ae.metadata.id,label:ae.name})))||[]},[M]),K=b.useMemo(()=>L.reduce((ee,ae)=>(ee[ae.value]=ae.label,ee),{}),[L]),{mutate:H,isPending:D}=Ir({mutationFn:async ee=>(await ot.v1FilterDelete(i,ee)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]})}}),{mutate:W,isPending:q}=Ir({mutationFn:async({filterId:ee,data:ae})=>(await ot.v1FilterUpdate(i,ee,ae)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]}),await n.invalidateQueries({queryKey:["v1:filter:get",i]})}}),{mutate:Y,isPending:U}=Ir({mutationFn:async ee=>(await ot.v1FilterCreate(i,ee)).data,onSuccess:async()=>{await n.invalidateQueries({queryKey:["v1:filter:list",i]})}}),V=b.useCallback(async ee=>H(ee),[H]),G=b.useCallback(async(ee,ae)=>W({filterId:ee,data:ae}),[W]),z=b.useCallback(async ee=>Y(ee),[Y]);return{filters:T,numFilters:k,isLoading:C||j,refetch:P,isRefetching:O,error:R||$,pagination:h,setPagination:p,setPageSize:x,columnFilters:y,setColumnFilters:w,selectedWorkflowIds:l,selectedScopes:u,workflowNameFilters:L,workflowIdToName:K,mutations:{delete:{perform:V,isPending:D},update:{perform:G,isPending:q},create:{perform:z,isPending:U}}}},tOe=e=>{const{tenantId:t}=ds(),{data:n,isLoading:r,error:o,refetch:i}=Mn({queryKey:["v1:filter:get",t,e],queryFn:async()=>(await ot.v1FilterGet(t,e)).data});return{filter:n,isLoading:r,error:o,refetch:i}},nOe="/assets/hatchet-5-DSjVfcvf.svg";function jJ({className:e="h-24 w-auto"}){return v.jsx("img",{src:nOe,alt:"","aria-hidden":"true",className:e})}function rOe(e){if(e===void 0)return"border-transparent rounded-full bg-muted";switch(e){case It.CANCELLED:return"border-transparent rounded-full bg-orange-500";case It.FAILED:return"border-transparent rounded-full bg-red-500";case It.RUNNING:return"border-transparent rounded-full bg-yellow-500";case It.QUEUED:return"border-transparent rounded-full bg-slate-500";case It.COMPLETED:return"border-transparent rounded-full bg-green-500";default:{const t=e;throw new Error(`Unknown status: ${t}`)}}}function IJ({status:e,isSkipped:t}){if(t)return v.jsx(ewe,{className:"h-3 w-3 text-muted-foreground"});const n=rOe(e);return v.jsx("div",{className:je(n,"h-[6px] w-[6px] rounded-full")})}const oOe=({workflow:e,parentTaskExternalId:t,additionalMetadata:n,createdAfter:r,createdBefore:o,showQueueMetrics:i})=>{const{tenantId:a}=ds(),{refetchInterval:s}=xf(),{data:l,isLoading:u,isFetching:c,isRefetching:d,refetch:h}=Mn({...Yr.v1TaskRuns.metrics(a,{since:r||new Date(Date.now()-1440*60*1e3).toISOString(),until:o,parent_task_external_id:t,workflow_ids:e?[e]:[],additional_metadata:n}),placeholderData:_=>_,refetchInterval:s}),p=l||[],{data:x,isLoading:y}=Mn({...Yr.metrics.getStepRunQueueMetrics(a),refetchInterval:5e3,enabled:i}),w=(x==null?void 0:x.queues)||{};return{runStatusCounts:p,isStatusCountsRefetching:d,isStatusCountsLoading:u,isStatusCountsFetching:c,isQueueMetricsLoading:y,refetch:h,queueMetrics:w}},iOe=({key:e,rowSelection:t,createdAfter:n,finishedBefore:r,statuses:o,runningFilter:i,additionalMetadata:a,workerId:s,workflowIds:l,parentTaskExternalId:u,triggeringEventExternalId:c,onlyTasks:d,disablePagination:h=!1})=>{const{tenantId:p}=ds(),{refetchInterval:x}=xf(),{offset:y,pagination:w,setPageSize:_,setPagination:C}=VL({key:"runs-table-"+e,resetPageOnChange:[n,r,o,i,a,s,l,u,c,d]}),[O]=b.useState(new Date(Date.now()-1440*60*1e3).toISOString()),P=b.useMemo(()=>u?new Date(Date.now()-744*60*60*1e3).toISOString():n||O,[n,O,u]),R=Mn({...Yr.v1WorkflowRuns.list(p,{offset:h?0:y,limit:h?500:w.pageSize,statuses:o&&o.length>0?o:void 0,workflow_ids:l&&l.length>0?l:[],parent_task_external_id:u,since:P,until:r,additional_metadata:a,worker_id:s,only_tasks:d,triggering_event_external_id:c,include_payloads:!1,running_filter:i}),refetchInterval:Object.keys(t).length>0?!1:x}),T=R.data,k=b.useMemo(()=>(T==null?void 0:T.rows)||[],[T]),M=b.useMemo(()=>Object.entries(t).filter(([,$])=>!!$).map(([$])=>{const L=K=>{for(const H of K){if(H.metadata.id===$)return H;if(H.children){const D=L(H.children);if(D)return D}}};return L(k)}).filter($=>$!==void 0),[t,k]),j=b.useCallback($=>$.metadata.id,[]);return{numPages:(T==null?void 0:T.pagination.num_pages)||0,tableRows:k,selectedRuns:M,refetch:R.refetch,isLoading:R.isLoading,isError:R.isError,isFetching:R.isFetching,getRowId:j,isRefetching:R.isRefetching,pagination:w,setPagination:C,setPageSize:_}};var gR="Popover",[DJ]=fs(gR,[ic]),mb=ic(),[aOe,rh]=DJ(gR),LJ=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=mb(t),l=b.useRef(null),[u,c]=b.useState(!1),[d,h]=Ws({prop:r,defaultProp:o??!1,onChange:i,caller:gR});return v.jsx(qy,{...s,children:v.jsx(aOe,{scope:t,contentId:Ta(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>c(!0),[]),onCustomAnchorRemove:b.useCallback(()=>c(!1),[]),modal:a,children:n})})};LJ.displayName=gR;var $J="PopoverAnchor",sOe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=rh($J,n),i=mb(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return b.useEffect(()=>(a(),()=>s()),[a,s]),v.jsx(Uy,{...i,...r,ref:t})});sOe.displayName=$J;var FJ="PopoverTrigger",BJ=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=rh(FJ,n),i=mb(n),a=zn(t,o.triggerRef),s=v.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":WJ(o.open),...r,ref:a,onClick:Je(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:v.jsx(Uy,{asChild:!0,...i,children:s})});BJ.displayName=FJ;var WL="PopoverPortal",[lOe,uOe]=DJ(WL,{forceMount:void 0}),zJ=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=rh(WL,t);return v.jsx(lOe,{scope:t,forceMount:n,children:v.jsx(ji,{present:n||i.open,children:v.jsx(bm,{asChild:!0,container:o,children:r})})})};zJ.displayName=WL;var ny="PopoverContent",qJ=b.forwardRef((e,t)=>{const n=uOe(ny,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=rh(ny,e.__scopePopover);return v.jsx(ji,{present:r||i.open,children:i.modal?v.jsx(fOe,{...o,ref:t}):v.jsx(dOe,{...o,ref:t})})});qJ.displayName=ny;var cOe=Zp("PopoverContent.RemoveScroll"),fOe=b.forwardRef((e,t)=>{const n=rh(ny,e.__scopePopover),r=b.useRef(null),o=zn(t,r),i=b.useRef(!1);return b.useEffect(()=>{const a=r.current;if(a)return ab(a)},[]),v.jsx(ib,{as:cOe,allowPinchZoom:!0,children:v.jsx(UJ,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Je(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Je(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),dOe=b.forwardRef((e,t)=>{const n=rh(ny,e.__scopePopover),r=b.useRef(!1),o=b.useRef(!1);return v.jsx(UJ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),UJ=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,h=rh(ny,n),p=mb(n);return oR(),v.jsx(ob,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(th,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:v.jsx(tb,{"data-state":WJ(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),VJ="PopoverClose",hOe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=rh(VJ,n);return v.jsx(Jt.button,{type:"button",...r,ref:t,onClick:Je(e.onClick,()=>o.onOpenChange(!1))})});hOe.displayName=VJ;var pOe="PopoverArrow",mOe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=mb(n);return v.jsx(nb,{...o,...r,ref:t})});mOe.displayName=pOe;function WJ(e){return e?"open":"closed"}var gOe=LJ,vOe=BJ,yOe=zJ,HJ=qJ;const Xy=gOe,Qy=vOe,_m=b.forwardRef(({className:e,container:t,align:n="center",sideOffset:r=4,...o},i)=>v.jsx(yOe,{container:t,children:v.jsx(HJ,{ref:i,align:n,sideOffset:r,className:je("z-[300] w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));_m.displayName=HJ.displayName;const nD=b.memo(function({metadata:t,onClick:n,isOpen:r,onOpenChange:o,title:i="Metadata",align:a="end"}){const s=Object.entries(t||{});if(s.length===0)return null;const l=s.length;return v.jsx("div",{className:"flex max-w-32 items-center justify-start",children:v.jsxs(Xy,{open:r,onOpenChange:o,children:[v.jsx(Qy,{asChild:!0,children:v.jsxs("div",{className:"flex cursor-pointer items-center gap-1 rounded px-2 py-1 transition-colors hover:bg-muted/50",children:[v.jsx(_7,{className:"size-3 flex-shrink-0 text-muted-foreground"}),v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]})}),v.jsx(_m,{className:"w-80 p-0 shadow-md shadow-slate-800/30",align:a,children:v.jsxs("div",{className:"p-3",children:[v.jsxs("div",{className:"mb-3 flex items-center gap-2 border-b pb-2",children:[v.jsx(_7,{className:"size-4 text-muted-foreground"}),v.jsxs("span",{className:"text-sm font-medium",children:[i," (",l," ",l===1?"item":"items",")"]})]}),v.jsx("div",{className:"max-h-60 space-y-2 overflow-y-auto",children:s.sort(([u],[c])=>u.toLowerCase().localeCompare(c.toLowerCase())).map(([u,c])=>v.jsxs("div",{className:"group flex cursor-pointer flex-col gap-1 rounded border p-2 transition-colors hover:bg-muted/30",onClick:()=>n==null?void 0:n({key:u,value:c}),children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:u})}),v.jsx("div",{className:"break-all text-sm",children:v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsx("div",{className:"truncate",children:wOe(c)})}),v.jsx(Hs,{side:"left",className:"max-w-xs",children:v.jsx("pre",{className:"whitespace-pre-wrap text-xs",children:JSON.stringify(c,null,2)})})]})})})]},u))})]})})]})})},(e,t)=>e.isOpen===t.isOpen&&e.onClick===t.onClick&&e.onOpenChange===t.onOpenChange&&JSON.stringify(e.metadata)===JSON.stringify(t.metadata)),wOe=e=>{if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e.length>50?`${e.substring(0,50)}...`:e;if(typeof e=="object"){const t=JSON.stringify(e);return t.length>50?`${t.substring(0,50)}...`:t}return String(e)};var oA,vR="HoverCard",[GJ]=fs(vR,[ic]),yR=ic(),[xOe,HL]=GJ(vR),KJ=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:s=300}=e,l=yR(t),u=b.useRef(0),c=b.useRef(0),d=b.useRef(!1),h=b.useRef(!1),[p,x]=Ws({prop:r,defaultProp:o??!1,onChange:i,caller:vR}),y=b.useCallback(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>x(!0),a)},[a,x]),w=b.useCallback(()=>{clearTimeout(u.current),!d.current&&!h.current&&(c.current=window.setTimeout(()=>x(!1),s))},[s,x]),_=b.useCallback(()=>x(!1),[x]);return b.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),v.jsx(xOe,{scope:t,open:p,onOpenChange:x,onOpen:y,onClose:w,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:h,children:v.jsx(qy,{...l,children:n})})};KJ.displayName=vR;var YJ="HoverCardTrigger",XJ=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=HL(YJ,n),i=yR(n);return v.jsx(Uy,{asChild:!0,...i,children:v.jsx(Jt.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:Je(e.onPointerEnter,WE(o.onOpen)),onPointerLeave:Je(e.onPointerLeave,WE(o.onClose)),onFocus:Je(e.onFocus,o.onOpen),onBlur:Je(e.onBlur,o.onClose),onTouchStart:Je(e.onTouchStart,a=>a.preventDefault())})})});XJ.displayName=YJ;var bOe="HoverCardPortal",[ltt,SOe]=GJ(bOe,{forceMount:void 0}),VE="HoverCardContent",GL=b.forwardRef((e,t)=>{const n=SOe(VE,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=HL(VE,e.__scopeHoverCard);return v.jsx(ji,{present:r||i.open,children:v.jsx(_Oe,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Je(e.onPointerEnter,WE(i.onOpen)),onPointerLeave:Je(e.onPointerLeave,WE(i.onClose)),ref:t})})});GL.displayName=VE;var _Oe=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,l=HL(VE,n),u=yR(n),c=b.useRef(null),d=zn(t,c),[h,p]=b.useState(!1);return b.useEffect(()=>{if(h){const x=document.body;return oA=x.style.userSelect||x.style.webkitUserSelect,x.style.userSelect="none",x.style.webkitUserSelect="none",()=>{x.style.userSelect=oA,x.style.webkitUserSelect=oA}}},[h]),b.useEffect(()=>{if(c.current){const x=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var w;((w=document.getSelection())==null?void 0:w.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",x),()=>{document.removeEventListener("pointerup",x),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),b.useEffect(()=>{c.current&&OOe(c.current).forEach(y=>y.setAttribute("tabindex","-1"))}),v.jsx(th,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Je(i,x=>{x.preventDefault()}),onDismiss:l.onDismiss,children:v.jsx(tb,{...u,...s,onPointerDown:Je(s.onPointerDown,x=>{x.currentTarget.contains(x.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),EOe="HoverCardArrow",COe=b.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=yR(n);return v.jsx(nb,{...o,...r,ref:t})});COe.displayName=EOe;function WE(e){return t=>t.pointerType==="touch"?void 0:e()}function OOe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ROe=KJ,POe=XJ,QJ=GL;const TOe=ROe,AOe=POe,kOe=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>v.jsx(QJ,{ref:o,align:t,sideOffset:n,className:je("z-[300] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));kOe.displayName=QJ.displayName;function NOe(e){switch(e){case"SUCCEEDED":return{text:"Succeeded",variant:"successful"};case"FAILED":return{text:"Failed",variant:"failed"};case"CANCELLED":return{text:"Cancelled",variant:"cancelled"};case"CANCELLING":return{text:"Cancelling",variant:"cancelled"};case"RUNNING":return{text:"Running",variant:"inProgress"};case"QUEUED":return{text:"Queued",variant:"queued"};case"PENDING":return{text:"Pending",variant:"queued"};case"PENDING_ASSIGNMENT":return{text:"Pending",variant:"queued"};case"ASSIGNED":return{text:"Assigned",variant:"inProgress"};case"SCHEDULED":return{text:"Scheduled",variant:"queued"};default:return{text:"Unknown",variant:"outline"}}}function MOe(e){switch(e){case It.COMPLETED:return{text:"Succeeded",variant:"successful"};case It.FAILED:return{text:"Failed",variant:"failed"};case It.CANCELLED:return{text:"Cancelled",variant:"cancelled"};case It.RUNNING:return{text:"Running",variant:"inProgress"};case It.QUEUED:return{text:"Queued",variant:"queued"};default:{const t=e;throw new Error(`Unknown status: ${t}`)}}}const jOe={TIMED_OUT:"Runtime Timed Out",SCHEDULING_TIMED_OUT:"Scheduling Timed Out"},IOe={TIMED_OUT:{text:"Timed Out",variant:"failed"},SCHEDULING_TIMED_OUT:{text:"Timed Out",variant:"failed"}};function DOe({status:e,reason:t,className:n}){const{text:r,variant:o}=NOe(e),{text:i,variant:a}=t&&IOe[t]||{},s=()=>v.jsx(Ti,{variant:a||o,className:n,children:BO(i||r)});return t?v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{children:v.jsx(s,{})}),v.jsx(Hs,{children:jOe[t]||t})]})}):v.jsx(s,{})}function LOe({status:e,errorMessage:t,className:n}){const{text:r,variant:o}=MOe(e),i=()=>v.jsx(Ti,{variant:o,className:n,children:v.jsx("span",{className:"flex items-center gap-1",children:BO(r)})});return t?v.jsxs(TOe,{children:[v.jsx(AOe,{className:"hover:cursor-help",children:v.jsx(i,{})}),v.jsx(GL,{className:"z-10 max-h-96 max-w-96 overflow-auto rounded-md border border-gray-600 border-opacity-50 bg-card p-4 shadow-xl lg:max-w-[500px]",children:v.jsx("p",{className:"text-xs",children:t})})]}):v.jsx(i,{})}function $Oe({row:e,actions:t}){return t!=null&&t.length?v.jsxs(qL,{children:[v.jsx(UL,{asChild:!0,children:v.jsxs(xt,{variant:"ghost",size:"sm",className:"flex data-[state=open]:bg-muted",children:[v.jsx(XSe,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Open menu"})]})}),v.jsx(mR,{align:"end",className:"w-[160px]",children:t==null?void 0:t.map(n=>v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{className:"w-full",children:v.jsx(bw,{onClick:()=>n.onClick(e),disabled:!!n.disabled,className:"w-full hover:cursor-pointer",children:n.label})}),n.disabled&&v.jsx(Hs,{children:n.disabled})]})},n.label))})]}):null}function Qt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ka(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ei(e,t){const n=Qt(e);return isNaN(t)?ka(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Gs(e,t){const n=Qt(e);if(isNaN(t))return ka(e,NaN);if(!t)return n;const r=n.getDate(),o=ka(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function cv(e,t){const{years:n=0,months:r=0,weeks:o=0,days:i=0,hours:a=0,minutes:s=0,seconds:l=0}=t,u=Qt(e),c=r||n?Gs(u,r+n*12):u,d=i||o?Ei(c,i+o*7):c,h=s+a*60,x=(l+h*60)*1e3;return ka(e,d.getTime()+x)}const KL=6048e5,FOe=864e5,YL=6e4,XL=36e5,utt=43200,ctt=1440;let BOe={};function gb(){return BOe}function Ju(e,t){var s,l,u,c;const n=gb(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=Qt(e),i=o.getDay(),a=(i=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function ry(e){const t=Qt(e);return t.setHours(0,0,0,0),t}function HE(e){const t=Qt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jl(e,t){const n=ry(e),r=ry(t),o=+n-HE(n),i=+r-HE(r);return Math.round((o-i)/FOe)}function zOe(e){const t=ZJ(e),n=ka(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),rm(n)}function rD(e,t){const n=t*7;return Ei(e,n)}function qOe(e,t){return Gs(e,t*12)}function UOe(e){let t;return e.forEach(function(n){const r=Qt(n);(t===void 0||t{const r=Qt(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function Sw(e,t){const n=Qt(e),r=Qt(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function Oa(e,t){const n=ry(e),r=ry(t);return+n==+r}function QL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function WOe(e){if(!QL(e)&&typeof e!="number")return!1;const t=Qt(e);return!isNaN(Number(t))}function oy(e,t){const n=Qt(e),r=Qt(t),o=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return o*12+i}function HOe(e,t,n){const r=Ju(e,n),o=Ju(t,n),i=+r-HE(r),a=+o-HE(o);return Math.round((i-a)/KL)}function GOe(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()-r.getFullYear()}function KOe(e,t){const n=Qt(e),r=Qt(t),o=X7(n,r),i=Math.abs(jl(n,r));n.setDate(n.getDate()-o*i);const a=+(X7(n,r)===-o),s=o*(i-a);return s===0?0:s}function X7(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function ZL(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function JL(e,t){return+Qt(e)-+Qt(t)}function YOe(e,t,n){const r=JL(e,t)/XL;return ZL(n==null?void 0:n.roundingMethod)(r)}function XOe(e,t,n){const r=JL(e,t)/YL;return ZL(n==null?void 0:n.roundingMethod)(r)}function QOe(e){const t=Qt(e);return t.setHours(23,59,59,999),t}function wR(e){const t=Qt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function ZOe(e){const t=Qt(e);return+QOe(t)==+wR(t)}function JOe(e,t){const n=Qt(e),r=Qt(t),o=Sw(n,r),i=Math.abs(oy(n,r));let a;if(i<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*i);let s=Sw(n,r)===-o;ZOe(Qt(e))&&i===1&&Sw(e,r)===1&&(s=!1),a=o*(i-Number(s))}return a===0?0:a}function eRe(e,t,n){const r=JL(e,t)/1e3;return ZL(n==null?void 0:n.roundingMethod)(r)}function tRe(e,t){const n=Qt(e),r=Qt(t),o=Sw(n,r),i=Math.abs(GOe(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=Sw(n,r)===-o,s=o*(i-+a);return s===0?0:s}function Aa(e){const t=Qt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JJ(e){const t=Qt(e),n=ka(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function e4(e,t){var s,l,u,c;const n=gb(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=Qt(e),i=o.getDay(),a=(i{let r;const o=nRe[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function iA(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const oRe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iRe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},aRe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sRe={date:iA({formats:oRe,defaultWidth:"full"}),time:iA({formats:iRe,defaultWidth:"full"}),dateTime:iA({formats:aRe,defaultWidth:"full"})},lRe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},uRe=(e,t,n,r)=>lRe[e];function N1(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const cRe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fRe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},dRe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hRe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pRe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},mRe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gRe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vRe={ordinalNumber:gRe,era:N1({values:cRe,defaultWidth:"wide"}),quarter:N1({values:fRe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:N1({values:dRe,defaultWidth:"wide"}),day:N1({values:hRe,defaultWidth:"wide"}),dayPeriod:N1({values:pRe,defaultWidth:"wide",formattingValues:mRe,defaultFormattingWidth:"wide"})};function M1(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?wRe(s,d=>d.test(a)):yRe(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(a.length);return{value:u,rest:c}}}function yRe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wRe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const bRe=/^(\d+)(th|st|nd|rd)?/i,SRe=/\d+/i,_Re={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ERe={any:[/^b/i,/^(a|c)/i]},CRe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ORe={any:[/1/i,/2/i,/3/i,/4/i]},RRe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},PRe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},TRe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ARe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},kRe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},NRe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},MRe={ordinalNumber:xRe({matchPattern:bRe,parsePattern:SRe,valueCallback:e=>parseInt(e,10)}),era:M1({matchPatterns:_Re,defaultMatchWidth:"wide",parsePatterns:ERe,defaultParseWidth:"any"}),quarter:M1({matchPatterns:CRe,defaultMatchWidth:"wide",parsePatterns:ORe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:M1({matchPatterns:RRe,defaultMatchWidth:"wide",parsePatterns:PRe,defaultParseWidth:"any"}),day:M1({matchPatterns:TRe,defaultMatchWidth:"wide",parsePatterns:ARe,defaultParseWidth:"any"}),dayPeriod:M1({matchPatterns:kRe,defaultMatchWidth:"any",parsePatterns:NRe,defaultParseWidth:"any"})},tee={code:"en-US",formatDistance:rRe,formatLong:sRe,formatRelative:uRe,localize:vRe,match:MRe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jRe(e){const t=Qt(e);return jl(t,JJ(t))+1}function nee(e){const t=Qt(e),n=+rm(t)-+zOe(t);return Math.round(n/KL)+1}function ree(e,t){var c,d,h,p;const n=Qt(e),r=n.getFullYear(),o=gb(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=ka(e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Ju(a,t),l=ka(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=Ju(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function IRe(e,t){var s,l,u,c;const n=gb(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=ree(e,t),i=ka(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ju(i,t)}function oee(e,t){const n=Qt(e),r=+Ju(n,t)-+IRe(n,t);return Math.round(r/KL)+1}function fr(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const cd={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return fr(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):fr(n+1,2)},d(e,t){return fr(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return fr(e.getHours()%12||12,t.length)},H(e,t){return fr(e.getHours(),t.length)},m(e,t){return fr(e.getMinutes(),t.length)},s(e,t){return fr(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return fr(o,t.length)}},Xg={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Q7={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return cd.y(e,t)},Y:function(e,t,n,r){const o=ree(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return fr(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):fr(i,t.length)},R:function(e,t){const n=ZJ(e);return fr(n,t.length)},u:function(e,t){const n=e.getFullYear();return fr(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return fr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return fr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return cd.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return fr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=oee(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):fr(o,t.length)},I:function(e,t,n){const r=nee(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):fr(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):cd.d(e,t)},D:function(e,t,n){const r=jRe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):fr(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return fr(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return fr(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return fr(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Xg.noon:r===0?o=Xg.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Xg.evening:r>=12?o=Xg.afternoon:r>=4?o=Xg.morning:o=Xg.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return cd.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):cd.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):fr(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):fr(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):cd.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):cd.s(e,t)},S:function(e,t){return cd.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return J7(r);case"XXXX":case"XX":return gp(r);case"XXXXX":case"XXX":default:return gp(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return J7(r);case"xxxx":case"xx":return gp(r);case"xxxxx":case"xxx":default:return gp(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Z7(r,":");case"OOOO":default:return"GMT"+gp(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Z7(r,":");case"zzzz":default:return"GMT"+gp(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return fr(r,t.length)},T:function(e,t,n){const r=e.getTime();return fr(r,t.length)}};function Z7(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+fr(i,2)}function J7(e,t){return e%60===0?(e>0?"-":"+")+fr(Math.abs(e)/60,2):gp(e,t)}function gp(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=fr(Math.trunc(r/60),2),i=fr(r%60,2);return n+o+t+i}const e9=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},iee=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},DRe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return e9(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",e9(r,t)).replace("{{time}}",iee(o,t))},LRe={p:iee,P:DRe},$Re=/^D+$/,FRe=/^Y+$/,BRe=["D","DD","YY","YYYY"];function zRe(e){return $Re.test(e)}function qRe(e){return FRe.test(e)}function URe(e,t,n){const r=VRe(e,t,n);if(console.warn(r),BRe.includes(e))throw new RangeError(r)}function VRe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const WRe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,HRe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,GRe=/^'([^]*?)'?$/,KRe=/''/g,YRe=/[a-zA-Z]/;function bf(e,t,n){var c,d,h,p,x,y,w,_;const r=gb(),o=(n==null?void 0:n.locale)??r.locale??tee,i=(n==null?void 0:n.firstWeekContainsDate)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((y=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((_=(w=r.locale)==null?void 0:w.options)==null?void 0:_.weekStartsOn)??0,s=Qt(e);if(!WOe(s))throw new RangeError("Invalid time value");let l=t.match(HRe).map(C=>{const O=C[0];if(O==="p"||O==="P"){const P=LRe[O];return P(C,o.formatLong)}return C}).join("").match(WRe).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const O=C[0];if(O==="'")return{isToken:!1,value:XRe(C)};if(Q7[O])return{isToken:!0,value:C};if(O.match(YRe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:C}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(C=>{if(!C.isToken)return C.value;const O=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&qRe(O)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&zRe(O))&&URe(O,t,String(e));const P=Q7[O[0]];return P(s,O,o.localize,u)}).join("")}function XRe(e){const t=e.match(GRe);return t?t[1].replace(KRe,"'"):e}function QRe(e){const t=Qt(e),n=t.getFullYear(),r=t.getMonth(),o=ka(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function ZRe(e){return Math.trunc(+Qt(e)/1e3)}function JRe(e){const t=Qt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function ePe(e,t){return HOe(JRe(e),Aa(e),t)+1}function tPe(e){const t=Qt(e.start),n=Qt(e.end),r={},o=tRe(n,t);o&&(r.years=o);const i=cv(t,{years:r.years}),a=JOe(n,i);a&&(r.months=a);const s=cv(i,{months:r.months}),l=KOe(n,s);l&&(r.days=l);const u=cv(s,{days:r.days}),c=YOe(n,u);c&&(r.hours=c);const d=cv(u,{hours:r.hours}),h=XOe(n,d);h&&(r.minutes=h);const p=cv(d,{minutes:r.minutes}),x=eRe(n,p);return x&&(r.seconds=x),r}function oD(e,t){const n=Qt(e),r=Qt(t);return n.getTime()>r.getTime()}function aee(e,t){const n=Qt(e),r=Qt(t);return+n<+r}function t4(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function nPe(e,t){const n=Qt(e),r=Qt(t);return n.getFullYear()===r.getFullYear()}function aA(e,t){return Ei(e,-t)}function rPe(e,t){const r=sPe(e);let o;if(r.date){const l=lPe(r.date,2);o=uPe(l.restDateString,l.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const i=o.getTime();let a=0,s;if(r.time&&(a=cPe(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=fPe(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(i+a),u=new Date(0);return u.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),u.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),u}return new Date(i+a+s)}const w_={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oPe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,iPe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,aPe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sPe(e){const t={},n=e.split(w_.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],w_.timeZoneDelimiter.test(t.date)&&(t.date=e.split(w_.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const o=w_.timezone.exec(r);o?(t.time=r.replace(o[1],""),t.timezone=o[1]):t.time=r}return t}function lPe(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function uPe(e,t){if(t===null)return new Date(NaN);const n=e.match(oPe);if(!n)return new Date(NaN);const r=!!n[4],o=j1(n[1]),i=j1(n[2])-1,a=j1(n[3]),s=j1(n[4]),l=j1(n[5])-1;if(r)return gPe(t,s,l)?dPe(t,s,l):new Date(NaN);{const u=new Date(0);return!pPe(t,i,a)||!mPe(t,o)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(o,a)),u)}}function j1(e){return e?parseInt(e):1}function cPe(e){const t=e.match(iPe);if(!t)return NaN;const n=sA(t[1]),r=sA(t[2]),o=sA(t[3]);return vPe(n,r,o)?n*XL+r*YL+o*1e3:NaN}function sA(e){return e&&parseFloat(e.replace(",","."))||0}function fPe(e){if(e==="Z")return 0;const t=e.match(aPe);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return yPe(r,o)?n*(r*XL+o*YL):NaN}function dPe(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,i=(t-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const hPe=[31,null,31,30,31,30,31,31,30,31,30,31];function see(e){return e%400===0||e%4===0&&e%100!==0}function pPe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(hPe[t]||(see(e)?29:28))}function mPe(e,t){return t>=1&&t<=(see(e)?366:365)}function gPe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function vPe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function yPe(e,t){return t>=0&&t<=59}function lA(e,t){const n=Qt(e),r=n.getFullYear(),o=n.getDate(),i=ka(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const a=QRe(i);return n.setMonth(t,Math.min(o,a)),n}function t9(e,t){const n=Qt(e);return isNaN(+n)?ka(e,NaN):(n.setFullYear(t),n)}var wPe=["second","minute","hour","day","week","month","year"];function xPe(e,t){if(t===0)return["just now","right now"];var n=wPe[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var bPe=["秒","分钟","小时","天","周","个月","年"];function SPe(e,t){if(t===0)return["刚刚","片刻后"];var n=bPe[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var iD={},lee=function(e,t){iD[e]=t},uee=function(e){return iD[e]||iD.en_US},Ep=[60,60,24,7,365/7/12,12];function n9(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function cee(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Ep[o]&&o(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function fee(e,t){var n=t?n9(t):new Date;return(+n-+n9(e))/1e3}function _Pe(e){for(var t=1,n=0,r=Math.abs(e);e>=Ep[n]&&n{const n=b.useMemo(()=>typeof e=="string"?rPe(e):e,[e]),[r,o]=b.useState("");return b.useEffect(()=>{if(t){const i=()=>{const s=new Date,l=n.getTime()-s.getTime();if(l<=0){o("");return}const u=Math.floor(l/(1e3*3600*24)),c=Math.floor(l%(1e3*3600*24)/(1e3*3600)),d=Math.floor(l%(1e3*3600)/(1e3*60)),h=Math.floor(l%(1e3*60)/1e3),p=[];u>0&&p.push(`${u}d`),(c>0||u>0)&&p.push(`${c}h`),(d>0||c>0||u>0)&&p.push(`${d}m`),p.push(`${h}s`),o(p.join(" "))};i();const a=setInterval(i,1e3);return()=>{clearInterval(a)}}},[n,t]),e=="0001-01-01T00:00:00Z"?null:v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,onFocusCapture:i=>{i.stopPropagation()},children:v.jsx("span",{children:t&&r?r:v.jsx(kPe,{datetime:n})})}),v.jsx(Hs,{side:"top",children:bf(n,"yyyy-MM-dd HH:mm:ss.SSS zzz")})]})})};function o9(e,t){const n=[];if(e.days&&n.push(`${e.days}d`),e.hours&&n.push(`${e.hours}h`),e.minutes&&n.push(`${e.minutes}m`),t<1e4&&e.seconds){const r=Math.floor(t%1e3/10);return n.push(`${e.seconds}.${r.toString().padStart(2,"0")}s`),n.join(" ")}if(e.seconds&&n.push(`${e.seconds}s`),t<1e3){const r=t%1e3;n.push(`${r}ms`)}return n.join(" ")}const i9=e=>{if(!e)return!1;const t=typeof e=="string"?new Date(e):e;return t.getFullYear()<=1?!1:!isNaN(t.getTime())&&t.getFullYear()>1970},uA=Hl("text-sm",{variants:{variant:{default:"text-muted-foreground",compact:"font-mono text-xs"}},defaultVariants:{variant:"default"}});function NPe({className:e,variant:t,start:n,end:r,status:o,showIcon:i=!0,asChild:a,...s}){if(!i9(n))return v.jsx("span",{className:je(!a&&uA({variant:t}),e),...s,children:"-"});const l=typeof n=="string"?new Date(n):n,u=i9(r)?new Date(r):new Date,c=tPe({start:l,end:u}),d=u.getTime()-l.getTime(),h=o==="RUNNING",p=v.jsxs("span",{className:"flex items-center gap-1",children:[i?v.jsx(owe,{className:"h-3.5 w-3.5"}):null,v.jsxs("span",{className:h?"animate-pulse":"",children:[o9(c,d),h?"...":null]})]});return t==="compact"?v.jsx("span",{className:je(!a&&uA({variant:t}),e),...s,children:p}):v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsx("span",{className:je(!a&&uA({variant:t}),e),...s,children:p})}),v.jsxs(Hs,{children:[h?"Running for ":"",o9(c,d)]})]})})}function mee(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xR="Checkbox",[MPe]=fs(xR),[jPe,r4]=MPe(xR);function IPe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[h,p]=Ws({prop:n,defaultProp:o??!1,onChange:l,caller:xR}),[x,y]=b.useState(null),[w,_]=b.useState(null),C=b.useRef(!1),O=x?!!a||!!x.closest("form"):!0,P={checked:h,disabled:i,setChecked:p,control:x,setControl:y,name:s,form:a,value:c,hasConsumerStoppedPropagationRef:C,required:u,defaultChecked:qd(o)?!1:o,isFormControl:O,bubbleInput:w,setBubbleInput:_};return v.jsx(jPe,{scope:t,...P,children:DPe(d)?d(P):r})}var gee="CheckboxTrigger",vee=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:a,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:x}=r4(gee,e),y=zn(o,c),w=b.useRef(l);return b.useEffect(()=>{const _=i==null?void 0:i.form;if(_){const C=()=>d(w.current);return _.addEventListener("reset",C),()=>_.removeEventListener("reset",C)}},[i,d]),v.jsx(Jt.button,{type:"button",role:"checkbox","aria-checked":qd(l)?"mixed":l,"aria-required":u,"data-state":See(l),"data-disabled":s?"":void 0,disabled:s,value:a,...r,ref:y,onKeyDown:Je(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Je(n,_=>{d(C=>qd(C)?!0:!C),x&&p&&(h.current=_.isPropagationStopped(),h.current||_.stopPropagation())})})});vee.displayName=gee;var o4=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return v.jsx(IPe,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:s,required:a,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:h})=>v.jsxs(v.Fragment,{children:[v.jsx(vee,{...d,ref:t,__scopeCheckbox:n}),h&&v.jsx(bee,{__scopeCheckbox:n})]})})});o4.displayName=xR;var yee="CheckboxIndicator",wee=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=r4(yee,n);return v.jsx(ji,{present:r||qd(i.checked)||i.checked===!0,children:v.jsx(Jt.span,{"data-state":See(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});wee.displayName=yee;var xee="CheckboxBubbleInput",bee=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:h,setBubbleInput:p}=r4(xee,e),x=zn(n,p),y=mee(i),w=XY(r);b.useEffect(()=>{const C=h;if(!C)return;const O=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(O,"checked").set,T=!o.current;if(y!==i&&R){const k=new Event("click",{bubbles:T});C.indeterminate=qd(i),R.call(C,qd(i)?!1:i),C.dispatchEvent(k)}},[h,y,i,o]);const _=b.useRef(qd(i)?!1:i);return v.jsx(Jt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??_.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bee.displayName=xee;function DPe(e){return typeof e=="function"}function qd(e){return e==="indeterminate"}function See(e){return qd(e)?"indeterminate":e?"checked":"unchecked"}const Hp=b.forwardRef(({className:e,...t},n)=>v.jsx(o4,{ref:n,className:je("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:v.jsx(wee,{className:je("flex items-center justify-center text-current"),children:v.jsx(lR,{className:"h-4 w-4"})})}));Hp.displayName=o4.displayName;const ks={taskName:"Task Name",status:"Status",workflow:"Workflow",parentTaskExternalId:"Parent Task External ID",flattenDAGs:"Flatten DAGs",runningFilter:"Running Filter",createdAt:"Created At",startedAt:"Started At",finishedAt:"Finished At",duration:"Duration",additionalMetadata:"Metadata"},i4="workflow",LPe="parentTaskExternalId",vb="flattenDAGs",_ee="createdAt",$Pe="startedAt",FPe="finishedAt",BPe="duration",_w="additionalMetadata",zPe="taskName",Gp="status",Eee="createdAfter",Cee="finishedBefore",Oee="isCustomTimeRange",Ree="timeWindow",bR="runningFilter",qPe=(e,t,n,r,o)=>[{id:"select",header:({table:i})=>v.jsx(Hp,{checked:i.getIsAllPageRowsSelected()||i.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:a=>i.toggleAllPageRowsSelected(!!a),"aria-label":"Select all",className:"translate-y-[2px]"}),cell:({row:i})=>v.jsxs("div",{className:je(`pl-${i.depth*4}`,"flex flex-row items-center justify-start gap-x-2"),children:[v.jsx(Hp,{checked:i.getIsSelected(),onCheckedChange:a=>i.toggleSelected(!!a),"aria-label":"Select row"}),i.getCanExpand()&&v.jsx(xt,{onClick:()=>i.toggleExpanded(),variant:"icon",className:"px-2",hoverText:"Show tasks",children:i.getIsExpanded()?v.jsx(iQ,{className:"size-4"}):v.jsx(aQ,{className:"size-4"})})]}),enableSorting:!1,enableHiding:!1},{accessorKey:zPe,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.taskName}),cell:({row:i})=>i.getCanExpand()?v.jsx(Ul,{to:ft.tenantRunRoute.to,params:{tenant:e,run:i.original.metadata.id},children:v.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:i.original.displayName})}):v.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",onClick:()=>r(i.original.metadata.id),children:i.original.displayName}),enableSorting:!1,enableHiding:!1},{accessorKey:Gp,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.status}),cell:({row:i})=>v.jsx(LOe,{className:"items-center justify-center px-2 text-center",status:i.original.status,errorMessage:i.original.errorMessage}),enableSorting:!1,enableHiding:!1},{accessorKey:i4,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.workflow}),cell:({row:i})=>{const a=i.original.workflowId,s=i.original.workflowName;return v.jsx("div",{className:"min-w-fit whitespace-nowrap",children:a&&s&&v.jsx(Ul,{to:ft.tenantWorkflowRoute.to,params:{tenant:e,workflow:a},children:s})||"N/A"})},show:!1,enableSorting:!1,enableHiding:!0},{accessorKey:LPe,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.parentTaskExternalId}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:vb,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.flattenDAGs}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:bR,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.runningFilter}),cell:()=>null,enableSorting:!1,enableHiding:!1},{accessorKey:_ee,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.createdAt,className:"whitespace-nowrap"}),cell:({row:i})=>v.jsx("div",{className:"whitespace-nowrap",children:i.original.metadata.createdAt?v.jsx(Dl,{date:i.original.metadata.createdAt}):"N/A"}),enableSorting:!1,enableHiding:!0},{accessorKey:$Pe,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.startedAt,className:"whitespace-nowrap"}),cell:({row:i})=>v.jsx("div",{className:"whitespace-nowrap",children:i.original.startedAt?v.jsx(Dl,{date:i.original.startedAt}):"N/A"}),enableSorting:!1,enableHiding:!0},{accessorKey:FPe,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.finishedAt,className:"whitespace-nowrap"}),cell:({row:i})=>{const a=i.original.finishedAt?v.jsx(Dl,{date:i.original.finishedAt}):"N/A";return v.jsx("div",{className:"whitespace-nowrap",children:a})},enableSorting:!1,enableHiding:!0},{accessorKey:BPe,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.duration}),cell:({row:i})=>{const a=i.original.startedAt,s=i.original.finishedAt,l=i.getValue(Gp);return v.jsx(NPe,{start:a,end:s,status:l,variant:"compact"})},enableSorting:!1,enableHiding:!0},{accessorKey:_w,header:({column:i})=>v.jsx(Dr,{column:i,title:ks.additionalMetadata}),cell:({row:i})=>i.original.additionalMetadata?v.jsx(nD,{metadata:i.original.additionalMetadata,onClick:n,isOpen:t===i.original.metadata.id,onOpenChange:a=>{o(i.original.metadata.id,a)}}):v.jsx("div",{}),enableSorting:!1},{id:"actions",cell:({row:i})=>v.jsx($Oe,{row:i.original,actions:[{label:"Copy Run Id",onClick:()=>{navigator.clipboard.writeText(i.original.metadata.id)}}]})}];function Pee(e,t,n){const[r,o]=Wy(),i=b.useMemo(()=>{const c=r.get(t);if(!c)return e.parse({});try{const d=typeof c=="string"?JSON.parse(c):c;return e.parse(d)}catch{return e.parse({})}},[r,t,e]),a=b.useCallback(c=>{o(d=>({...Object.fromEntries(d.entries()),[t]:c}))},[t,o]),s=b.useMemo(()=>{const c=[];return Object.entries(n).forEach(([d,h])=>{const p=i[d];p!=null&&(Array.isArray(p)&&p.length>0?c.push({id:h,value:p}):typeof p=="string"&&p.length>0?c.push({id:h,value:p}):(typeof p=="number"||typeof p=="boolean")&&c.push({id:h,value:p}))}),c},[i,n]),l=b.useCallback(c=>{const h=typeof c=="function"?c(s):c,p={...i};Object.keys(n).forEach(x=>{const y=i[x];Array.isArray(y)?p[x]=[]:p[x]=void 0}),h.forEach(x=>{var w;const y=(w=Object.entries(n).find(([,_])=>_===x.id))==null?void 0:w[0];y&&(p[y]=x.value)}),a(p)},[s,i,a,n]),u=b.useCallback(()=>{const c=e.parse({});a(c)},[e,a]);return{state:i,columnFilters:s,setColumnFilters:l,resetFilters:u}}var Zn;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Zn||(Zn={}));var a9;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(a9||(a9={}));const Ot=Zn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),md=e=>{switch(typeof e){case"undefined":return Ot.undefined;case"string":return Ot.string;case"number":return Number.isNaN(e)?Ot.nan:Ot.number;case"boolean":return Ot.boolean;case"function":return Ot.function;case"bigint":return Ot.bigint;case"symbol":return Ot.symbol;case"object":return Array.isArray(e)?Ot.array:e===null?Ot.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ot.promise:typeof Map<"u"&&e instanceof Map?Ot.map:typeof Set<"u"&&e instanceof Set?Ot.set:typeof Date<"u"&&e instanceof Date?Ot.date:Ot.object;default:return Ot.unknown}},et=Zn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pf extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;ln.message){const n={},r=[];for(const o of this.issues)if(o.path.length>0){const i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}pf.create=e=>new pf(e);const lD=(e,t)=>{let n;switch(e.code){case et.invalid_type:e.received===Ot.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case et.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Zn.jsonStringifyReplacer)}`;break;case et.unrecognized_keys:n=`Unrecognized key(s) in object: ${Zn.joinValues(e.keys,", ")}`;break;case et.invalid_union:n="Invalid input";break;case et.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Zn.joinValues(e.options)}`;break;case et.invalid_enum_value:n=`Invalid enum value. Expected ${Zn.joinValues(e.options)}, received '${e.received}'`;break;case et.invalid_arguments:n="Invalid function arguments";break;case et.invalid_return_type:n="Invalid function return type";break;case et.invalid_date:n="Invalid date";break;case et.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Zn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case et.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case et.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case et.custom:n="Invalid input";break;case et.invalid_intersection_types:n="Intersection results could not be merged";break;case et.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case et.not_finite:n="Number must be finite";break;default:n=t.defaultError,Zn.assertNever(e)}return{message:n}};let UPe=lD;function VPe(){return UPe}const WPe=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function pt(e,t){const n=VPe(),r=WPe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===lD?void 0:lD].filter(o=>!!o)});e.common.issues.push(r)}class ls{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return dn;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return ls.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return dn;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const dn=Object.freeze({status:"aborted"}),rw=e=>({status:"dirty",value:e}),Ys=e=>({status:"valid",value:e}),s9=e=>e.status==="aborted",l9=e=>e.status==="dirty",iy=e=>e.status==="valid",GE=e=>typeof Promise<"u"&&e instanceof Promise;var jt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(jt||(jt={}));class Xd{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const u9=(e,t)=>{if(iy(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new pf(e.common.issues);return this._error=n,this._error}}};function Rn(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Yn{get description(){return this._def.description}_getType(t){return md(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:md(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ls,ctx:{common:t.parent.common,data:t.data,parsedType:md(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(GE(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:md(t)},o=this._parseSync({data:t,path:r.path,parent:r});return u9(r,o)}"~validate"(t){var r,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:md(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return iy(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>iy(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:md(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(GE(o)?o:Promise.resolve(o));return u9(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:et.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new am({schema:this,typeName:hn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return of.create(this,this._def)}nullable(){return sm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ku.create(this)}promise(){return JE.create(this,this._def)}or(t){return YE.create([this,t],this._def)}and(t){return XE.create(this,t,this._def)}transform(t){return new am({...Rn(this._def),schema:this,typeName:hn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new eC({...Rn(this._def),innerType:this,defaultValue:n,typeName:hn.ZodDefault})}brand(){return new Nee({typeName:hn.ZodBranded,type:this,...Rn(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new tC({...Rn(this._def),innerType:this,catchValue:n,typeName:hn.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return s4.create(this,t)}readonly(){return nC.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const HPe=/^c[^\s-]{8,}$/i,GPe=/^[0-9a-z]+$/,KPe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YPe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,XPe=/^[a-z0-9_-]{21}$/i,QPe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ZPe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,JPe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eTe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cA;const tTe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nTe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rTe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,oTe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,iTe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aTe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Tee="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",sTe=new RegExp(`^${Tee}$`);function Aee(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function lTe(e){return new RegExp(`^${Aee(e)}$`)}function uTe(e){let t=`${Tee}T${Aee(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function cTe(e,t){return!!((t==="v4"||!t)&&tTe.test(e)||(t==="v6"||!t)&&rTe.test(e))}function fTe(e,t){if(!QPe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function dTe(e,t){return!!((t==="v4"||!t)&&nTe.test(e)||(t==="v6"||!t)&&oTe.test(e))}class Id extends Yn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ot.string){const i=this._getOrReturnCtx(t);return pt(i,{code:et.invalid_type,expected:Ot.string,received:i.parsedType}),dn}const r=new ls;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(o=this._getOrReturnCtx(t,o),pt(o,{code:et.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.lengtht.test(o),{validation:n,code:et.invalid_string,...jt.errToObj(r)})}_addCheck(t){return new Id({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...jt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...jt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...jt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...jt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...jt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...jt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...jt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...jt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...jt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...jt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...jt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...jt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...jt.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...jt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...jt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...jt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...jt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...jt.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...jt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...jt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...jt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...jt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...jt.errToObj(n)})}nonempty(t){return this.min(1,jt.errToObj(t))}trim(){return new Id({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Id({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Id({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Id({checks:[],typeName:hn.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Rn(e)});function hTe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class ay extends Yn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ot.number){const i=this._getOrReturnCtx(t);return pt(i,{code:et.invalid_type,expected:Ot.number,received:i.parsedType}),dn}let r;const o=new ls;for(const i of this._def.checks)i.kind==="int"?Zn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),pt(r,{code:et.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),pt(r,{code:et.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?hTe(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),pt(r,{code:et.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),pt(r,{code:et.not_finite,message:i.message}),o.dirty()):Zn.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,jt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,jt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,jt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,jt.toString(n))}setLimit(t,n,r,o){return new ay({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:jt.toString(o)}]})}_addCheck(t){return new ay({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:jt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:jt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:jt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:jt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:jt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:jt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:jt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:jt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:jt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&Zn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ay({checks:[],typeName:hn.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Rn(e)});class Ww extends Yn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ot.bigint)return this._getInvalidInput(t);let r;const o=new ls;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),pt(r,{code:et.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),pt(r,{code:et.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Zn.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return pt(n,{code:et.invalid_type,expected:Ot.bigint,received:n.parsedType}),dn}gte(t,n){return this.setLimit("min",t,!0,jt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,jt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,jt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,jt.toString(n))}setLimit(t,n,r,o){return new Ww({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:jt.toString(o)}]})}_addCheck(t){return new Ww({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:jt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:jt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:jt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:jt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:jt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Ww({checks:[],typeName:hn.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Rn(e)});class uD extends Yn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ot.boolean){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.boolean,received:r.parsedType}),dn}return Ys(t.data)}}uD.create=e=>new uD({typeName:hn.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Rn(e)});class KE extends Yn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ot.date){const i=this._getOrReturnCtx(t);return pt(i,{code:et.invalid_type,expected:Ot.date,received:i.parsedType}),dn}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return pt(i,{code:et.invalid_date}),dn}const r=new ls;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(o=this._getOrReturnCtx(t,o),pt(o,{code:et.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Zn.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new KE({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:jt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:jt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew KE({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:hn.ZodDate,...Rn(e)});class c9 extends Yn{_parse(t){if(this._getType(t)!==Ot.symbol){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.symbol,received:r.parsedType}),dn}return Ys(t.data)}}c9.create=e=>new c9({typeName:hn.ZodSymbol,...Rn(e)});class cD extends Yn{_parse(t){if(this._getType(t)!==Ot.undefined){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.undefined,received:r.parsedType}),dn}return Ys(t.data)}}cD.create=e=>new cD({typeName:hn.ZodUndefined,...Rn(e)});class fD extends Yn{_parse(t){if(this._getType(t)!==Ot.null){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.null,received:r.parsedType}),dn}return Ys(t.data)}}fD.create=e=>new fD({typeName:hn.ZodNull,...Rn(e)});class f9 extends Yn{constructor(){super(...arguments),this._any=!0}_parse(t){return Ys(t.data)}}f9.create=e=>new f9({typeName:hn.ZodAny,...Rn(e)});class d9 extends Yn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ys(t.data)}}d9.create=e=>new d9({typeName:hn.ZodUnknown,...Rn(e)});class Qd extends Yn{_parse(t){const n=this._getOrReturnCtx(t);return pt(n,{code:et.invalid_type,expected:Ot.never,received:n.parsedType}),dn}}Qd.create=e=>new Qd({typeName:hn.ZodNever,...Rn(e)});class h9 extends Yn{_parse(t){if(this._getType(t)!==Ot.undefined){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.void,received:r.parsedType}),dn}return Ys(t.data)}}h9.create=e=>new h9({typeName:hn.ZodVoid,...Rn(e)});class Ku extends Yn{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ot.array)return pt(n,{code:et.invalid_type,expected:Ot.array,received:n.parsedType}),dn;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.lengtho.maxLength.value&&(pt(n,{code:et.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Xd(n,a,n.path,s)))).then(a=>ls.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Xd(n,a,n.path,s)));return ls.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Ku({...this._def,minLength:{value:t,message:jt.toString(n)}})}max(t,n){return new Ku({...this._def,maxLength:{value:t,message:jt.toString(n)}})}length(t,n){return new Ku({...this._def,exactLength:{value:t,message:jt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ku.create=(e,t)=>new Ku({type:e,minLength:null,maxLength:null,exactLength:null,typeName:hn.ZodArray,...Rn(t)});function fv(e){if(e instanceof go){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=of.create(fv(r))}return new go({...e._def,shape:()=>t})}else return e instanceof Ku?new Ku({...e._def,type:fv(e.element)}):e instanceof of?of.create(fv(e.unwrap())):e instanceof sm?sm.create(fv(e.unwrap())):e instanceof om?om.create(e.items.map(t=>fv(t))):e}class go extends Yn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Zn.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ot.object){const u=this._getOrReturnCtx(t);return pt(u,{code:et.invalid_type,expected:Ot.object,received:u.parsedType}),dn}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Qd&&this._def.unknownKeys==="strip"))for(const u in o.data)a.includes(u)||s.push(u);const l=[];for(const u of a){const c=i[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Xd(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Qd){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")s.length>0&&(pt(o,{code:et.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Xd(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>ls.mergeObjectSync(r,u)):ls.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return jt.errToObj,new go({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a;const o=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:jt.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new go({...this._def,unknownKeys:"strip"})}passthrough(){return new go({...this._def,unknownKeys:"passthrough"})}extend(t){return new go({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new go({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:hn.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new go({...this._def,catchall:t})}pick(t){const n={};for(const r of Zn.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new go({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Zn.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new go({...this._def,shape:()=>n})}deepPartial(){return fv(this)}partial(t){const n={};for(const r of Zn.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new go({...this._def,shape:()=>n})}required(t){const n={};for(const r of Zn.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof of;)i=i._def.innerType;n[r]=i}return new go({...this._def,shape:()=>n})}keyof(){return kee(Zn.objectKeys(this.shape))}}go.create=(e,t)=>new go({shape:()=>e,unknownKeys:"strip",catchall:Qd.create(),typeName:hn.ZodObject,...Rn(t)});go.strictCreate=(e,t)=>new go({shape:()=>e,unknownKeys:"strict",catchall:Qd.create(),typeName:hn.ZodObject,...Rn(t)});go.lazycreate=(e,t)=>new go({shape:e,unknownKeys:"strip",catchall:Qd.create(),typeName:hn.ZodObject,...Rn(t)});class YE extends Yn{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new pf(s.ctx.common.issues));return pt(n,{code:et.invalid_union,unionErrors:a}),dn}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new pf(l));return pt(n,{code:et.invalid_union,unionErrors:s}),dn}}get options(){return this._def.options}}YE.create=(e,t)=>new YE({options:e,typeName:hn.ZodUnion,...Rn(t)});const Hc=e=>e instanceof hD?Hc(e.schema):e instanceof am?Hc(e.innerType()):e instanceof QE?[e.value]:e instanceof im?e.options:e instanceof ZE?Zn.objectValues(e.enum):e instanceof eC?Hc(e._def.innerType):e instanceof cD?[void 0]:e instanceof fD?[null]:e instanceof of?[void 0,...Hc(e.unwrap())]:e instanceof sm?[null,...Hc(e.unwrap())]:e instanceof Nee||e instanceof nC?Hc(e.unwrap()):e instanceof tC?Hc(e._def.innerType):[];class a4 extends Yn{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ot.object)return pt(n,{code:et.invalid_type,expected:Ot.object,received:n.parsedType}),dn;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(pt(n,{code:et.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),dn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Hc(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new a4({typeName:hn.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Rn(r)})}}function dD(e,t){const n=md(e),r=md(t);if(e===t)return{valid:!0,data:e};if(n===Ot.object&&r===Ot.object){const o=Zn.objectKeys(t),i=Zn.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=dD(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ot.array&&r===Ot.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i{if(s9(i)||s9(a))return dn;const s=dD(i.value,a.value);return s.valid?((l9(i)||l9(a))&&n.dirty(),{status:n.value,value:s.data}):(pt(r,{code:et.invalid_intersection_types}),dn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}XE.create=(e,t,n)=>new XE({left:e,right:t,typeName:hn.ZodIntersection,...Rn(n)});class om extends Yn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ot.array)return pt(r,{code:et.invalid_type,expected:Ot.array,received:r.parsedType}),dn;if(r.data.lengththis._def.items.length&&(pt(r,{code:et.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Xd(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ls.mergeArray(n,a)):ls.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new om({...this._def,rest:t})}}om.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new om({items:e,typeName:hn.ZodTuple,rest:null,...Rn(t)})};class p9 extends Yn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ot.map)return pt(r,{code:et.invalid_type,expected:Ot.map,received:r.parsedType}),dn;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],u)=>({key:o._parse(new Xd(r,s,r.path,[u,"key"])),value:i._parse(new Xd(r,l,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return dn;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return dn;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}p9.create=(e,t,n)=>new p9({valueType:t,keyType:e,typeName:hn.ZodMap,...Rn(n)});class Hw extends Yn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ot.set)return pt(r,{code:et.invalid_type,expected:Ot.set,received:r.parsedType}),dn;const o=this._def;o.minSize!==null&&r.data.sizeo.maxSize.value&&(pt(r,{code:et.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const u=new Set;for(const c of l){if(c.status==="aborted")return dn;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((l,u)=>i._parse(new Xd(r,l,r.path,u)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Hw({...this._def,minSize:{value:t,message:jt.toString(n)}})}max(t,n){return new Hw({...this._def,maxSize:{value:t,message:jt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Hw.create=(e,t)=>new Hw({valueType:e,minSize:null,maxSize:null,typeName:hn.ZodSet,...Rn(t)});class hD extends Yn{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}hD.create=(e,t)=>new hD({getter:e,typeName:hn.ZodLazy,...Rn(t)});class QE extends Yn{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return pt(n,{received:n.data,code:et.invalid_literal,expected:this._def.value}),dn}return{status:"valid",value:t.data}}get value(){return this._def.value}}QE.create=(e,t)=>new QE({value:e,typeName:hn.ZodLiteral,...Rn(t)});function kee(e,t){return new im({values:e,typeName:hn.ZodEnum,...Rn(t)})}class im extends Yn{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return pt(n,{expected:Zn.joinValues(r),received:n.parsedType,code:et.invalid_type}),dn}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return pt(n,{received:n.data,code:et.invalid_enum_value,options:r}),dn}return Ys(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return im.create(t,{...this._def,...n})}exclude(t,n=this._def){return im.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}im.create=kee;class ZE extends Yn{_parse(t){const n=Zn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ot.string&&r.parsedType!==Ot.number){const o=Zn.objectValues(n);return pt(r,{expected:Zn.joinValues(o),received:r.parsedType,code:et.invalid_type}),dn}if(this._cache||(this._cache=new Set(Zn.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Zn.objectValues(n);return pt(r,{received:r.data,code:et.invalid_enum_value,options:o}),dn}return Ys(t.data)}get enum(){return this._def.values}}ZE.create=(e,t)=>new ZE({values:e,typeName:hn.ZodNativeEnum,...Rn(t)});class JE extends Yn{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ot.promise&&n.common.async===!1)return pt(n,{code:et.invalid_type,expected:Ot.promise,received:n.parsedType}),dn;const r=n.parsedType===Ot.promise?n.data:Promise.resolve(n.data);return Ys(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}JE.create=(e,t)=>new JE({type:e,typeName:hn.ZodPromise,...Rn(t)});class am extends Yn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===hn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{pt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return dn;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?dn:l.status==="dirty"||n.value==="dirty"?rw(l.value):l});{if(n.value==="aborted")return dn;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?dn:s.status==="dirty"||n.value==="dirty"?rw(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?dn:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?dn:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!iy(a))return dn;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>iy(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):dn);Zn.assertNever(o)}}am.create=(e,t,n)=>new am({schema:e,typeName:hn.ZodEffects,effect:t,...Rn(n)});am.createWithPreprocess=(e,t,n)=>new am({schema:t,effect:{type:"preprocess",transform:e},typeName:hn.ZodEffects,...Rn(n)});class of extends Yn{_parse(t){return this._getType(t)===Ot.undefined?Ys(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}of.create=(e,t)=>new of({innerType:e,typeName:hn.ZodOptional,...Rn(t)});class sm extends Yn{_parse(t){return this._getType(t)===Ot.null?Ys(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}sm.create=(e,t)=>new sm({innerType:e,typeName:hn.ZodNullable,...Rn(t)});class eC extends Yn{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ot.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}eC.create=(e,t)=>new eC({innerType:e,typeName:hn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Rn(t)});class tC extends Yn{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return GE(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pf(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new pf(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}tC.create=(e,t)=>new tC({innerType:e,typeName:hn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Rn(t)});class m9 extends Yn{_parse(t){if(this._getType(t)!==Ot.nan){const r=this._getOrReturnCtx(t);return pt(r,{code:et.invalid_type,expected:Ot.nan,received:r.parsedType}),dn}return{status:"valid",value:t.data}}}m9.create=e=>new m9({typeName:hn.ZodNaN,...Rn(e)});class Nee extends Yn{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class s4 extends Yn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?dn:i.status==="dirty"?(n.dirty(),rw(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?dn:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new s4({in:t,out:n,typeName:hn.ZodPipeline})}}class nC extends Yn{_parse(t){const n=this._def.innerType._parse(t),r=o=>(iy(o)&&(o.value=Object.freeze(o.value)),o);return GE(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}nC.create=(e,t)=>new nC({innerType:e,typeName:hn.ZodReadonly,...Rn(t)});var hn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(hn||(hn={}));const io=Id.create,ftt=ay.create,g9=uD.create;Qd.create;const Yc=Ku.create,Em=go.create,dtt=YE.create,htt=a4.create;XE.create;om.create;const ptt=QE.create,Mee=im.create,pD=ZE.create;JE.create;of.create;sm.create;const I1=e=>{switch(e){case"1h":return new Date(Date.now()-3600*1e3).toISOString();case"6h":return new Date(Date.now()-360*60*1e3).toISOString();case"1d":return new Date(Date.now()-1440*60*1e3).toISOString();case"7d":return new Date(Date.now()-10080*60*1e3).toISOString();default:{const t=e;throw new Error(`Unhandled time range: ${t}`)}}},pTe=e=>Em({tw:Mee(["1h","6h","1d","7d"]).default("1d"),ctr:g9().default(!1),s:io().optional(),u:io().optional(),st:Yc(pD(It)).default(()=>Object.values(It)),w:Yc(io()).optional().default(()=>{var t;return(t=e==null?void 0:e.workflowIds)!=null&&t.length?e.workflowIds:[]}),m:Yc(io()).optional(),f:g9().default(!1),rf:pD($E).optional()}),mTe=(e,t)=>{const n=e+"-workflow-runs-filters",r=pTe(t),[,o]=Wy(),i=Pee(r,n,{tw:Ree,ctr:Oee,u:Cee,s:Eee,st:Gp,w:i4,m:_w,f:vb,rf:bR}),{state:a,columnFilters:s,setColumnFilters:l,resetFilters:u}=i,{tw:c,ctr:d,s:h,u:p,st:x,w:y,m:w,f:_,rf:C}=a,O=b.useMemo(()=>h||I1(c),[h,c]),P=b.useCallback(L=>{const K={...a,...L};o(H=>({...Object.fromEntries(H.entries()),[n]:K}))},[a,o,n]),R=b.useCallback(L=>{P({tw:L,ctr:!1,s:I1(L),u:void 0})},[P]),T=b.useCallback(()=>{d||P({...a,s:I1(c)})},[d,c,P,a]),k=b.useCallback(L=>{P(L?{ctr:!0,s:L.start,u:L.end}:{ctr:!1,s:I1(c),u:void 0})},[P,c]),M=b.useCallback(L=>{const K=L.length>0?L:Object.values(It),H=s.filter(D=>D.id!==Gp).concat([{id:Gp,value:K}]);l(H)},[l,s]),j=b.useCallback(({key:L,value:K})=>{const W=[...(w||[]).filter(Y=>Y.split(":")[0]!==L),`${L}:${K}`],q=s.filter(Y=>Y.id!==_w).concat([{id:_w,value:W}]);l(q)},[l,s,w]),$=b.useMemo(()=>({since:O||I1("1d"),until:p,statuses:x,workflowIds:y,additionalMetadata:w,flattenDAGs:_||!1,runningFilter:C}),[O,p,x,y,w,_,C]);return{columnFilters:s,timeWindow:c,isCustomTimeRange:d,apiFilters:$,setTimeWindow:R,setCustomTimeRange:k,updateCurrentTimeWindow:T,setStatuses:M,setAdditionalMetadata:j,setColumnFilters:l,resetFilters:u}};function gTe(e,t,n,r){var o=this,i=b.useRef(null),a=b.useRef(0),s=b.useRef(0),l=b.useRef(null),u=b.useRef([]),c=b.useRef(),d=b.useRef(),h=b.useRef(e),p=b.useRef(!0),x=b.useRef(),y=b.useRef();h.current=e;var w=typeof window<"u",_=!t&&t!==0&&w;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var C=!!(n=n||{}).leading,O=!("trailing"in n)||!!n.trailing,P=!!n.flushOnExit&&O,R="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,k=R?Math.max(+n.maxWait||0,t):null,M=b.useMemo(function(){var j=function(q){var Y=u.current,U=c.current;return u.current=c.current=null,a.current=q,s.current=s.current||q,d.current=h.current.apply(U,Y)},$=function(q,Y){_&&cancelAnimationFrame(l.current),l.current=_?requestAnimationFrame(q):setTimeout(q,Y)},L=function(q){if(!p.current)return!1;var Y=q-i.current;return!i.current||Y>=t||Y<0||R&&q-a.current>=k},K=function(q){return l.current=null,O&&u.current?j(q):(u.current=c.current=null,d.current)},H=function q(){var Y=Date.now();if(C&&s.current===a.current&&D(),L(Y))return K(Y);if(p.current){var U=t-(Y-i.current),V=R?Math.min(U,k-(Y-a.current)):U;$(q,V)}},D=function(){r&&r({})},W=function(){if(w||T){var q,Y=Date.now(),U=L(Y);if(u.current=[].slice.call(arguments),c.current=o,i.current=Y,P&&!x.current&&(x.current=function(){var V;((V=globalThis.document)==null?void 0:V.visibilityState)==="hidden"&&y.current.flush()},(q=globalThis.document)==null||q.addEventListener==null||q.addEventListener("visibilitychange",x.current)),U){if(!l.current&&p.current)return a.current=i.current,$(H,t),C?j(i.current):d.current;if(R)return $(H,t),j(i.current)}return l.current||$(H,t),d.current}};return W.cancel=function(){var q=l.current;q&&(_?cancelAnimationFrame(l.current):clearTimeout(l.current)),a.current=0,u.current=i.current=c.current=l.current=null,q&&r&&r({})},W.isPending=function(){return!!l.current},W.flush=function(){return l.current?K(Date.now()):d.current},W},[C,R,t,k,O,P,_,w,T,r]);return y.current=M,b.useEffect(function(){return p.current=!0,function(){var j;P&&y.current.flush(),x.current&&((j=globalThis.document)==null||j.removeEventListener==null||j.removeEventListener("visibilitychange",x.current),x.current=null),p.current=!1}},[P]),M}function vTe(e,t){return e===t}function yTe(e,t,n){var r=vTe,o=b.useRef(e),i=b.useState({})[1],a=gTe(b.useCallback(function(l){o.current=l,i({})},[i]),t,n,i),s=b.useRef(e);return r(s.current,e)||(a(e),s.current=e),[o.current,a]}const wTe=e=>{const{tenantId:t}=ds(),[n]=yTe(e,300),{data:r}=Mn({...Yr.workflows.list(t,{limit:200,name:n||void 0}),staleTime:3e4});return(r==null?void 0:r.rows)??[]};var SR="Tabs",[xTe]=fs(SR,[dR]),jee=dR(),[bTe,l4]=xTe(SR),Iee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=fR(s),[d,h]=Ws({prop:r,onChange:o,defaultProp:i??"",caller:SR});return v.jsx(bTe,{scope:n,baseId:Ta(),value:d,onValueChange:h,orientation:a,dir:c,activationMode:l,children:v.jsx(Jt.div,{dir:c,"data-orientation":a,...u,ref:t})})});Iee.displayName=SR;var Dee="TabsList",Lee=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=l4(Dee,n),a=jee(n);return v.jsx(RZ,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:v.jsx(Jt.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Lee.displayName=Dee;var $ee="TabsTrigger",Fee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=l4($ee,n),s=jee(n),l=qee(a.baseId,r),u=Uee(a.baseId,r),c=r===a.value;return v.jsx(PZ,{asChild:!0,...s,focusable:!o,active:c,children:v.jsx(Jt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:Je(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:Je(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:Je(e.onFocus,()=>{const d=a.activationMode!=="manual";!c&&!o&&d&&a.onValueChange(r)})})})});Fee.displayName=$ee;var Bee="TabsContent",zee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=l4(Bee,n),l=qee(s.baseId,r),u=Uee(s.baseId,r),c=r===s.value,d=b.useRef(c);return b.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),v.jsx(ji,{present:o||c,children:({present:h})=>v.jsx(Jt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&i})})});zee.displayName=Bee;function qee(e,t){return`${e}-trigger-${t}`}function Uee(e,t){return`${e}-content-${t}`}var STe=Iee,Vee=Lee,Wee=Fee,Hee=zee;const rC=STe,_Te=Hl("",{variants:{layout:{default:"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-gray-700 dark:text-gray-300",underlined:"w-full justify-start rounded-none border-b bg-transparent p-0"}},defaultVariants:{layout:"default"}}),Gw=b.forwardRef(({className:e,layout:t="default",...n},r)=>v.jsx(Vee,{ref:r,className:je(_Te({layout:t}),e),...n}));Gw.displayName=Vee.displayName;const ETe=Hl("",{variants:{variant:{underlined:"relative rounded-none border-b-2 border-b-transparent bg-transparent px-3 py-1 text-sm font-medium text-gray-700 dark:text-gray-300 shadow-none transition-none focus-visible:ring-0 data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none ",default:"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow"}},defaultVariants:{variant:"default"}}),_a=b.forwardRef(({className:e,variant:t="default",...n},r)=>v.jsx(Wee,{ref:r,className:je(ETe({variant:t}),e),...n}));_a.displayName=Wee.displayName;const Ea=b.forwardRef(({className:e,...t},n)=>v.jsx(Hee,{ref:n,className:je("data-[state=inactive]:!hidden",e),...t}));Ea.displayName=Hee.displayName;function CTe(e){return/^(0[0-9]|1[0-9]|2[0-3])$/.test(e)}function OTe(e){return/^(0[1-9]|1[0-2])$/.test(e)}function RTe(e){return/^[0-5][0-9]$/.test(e)}function _R(e,{max:t,min:n=0,loop:r=!1}){let o=parseInt(e,10);return isNaN(o)?"00":(r?(o>t&&(o=n),ot&&(o=t),o=22?`${e-12}`:e%12>9?`${e}`:`0${e%12}`}const ri=b.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));ri.displayName="Input";const hE=J.forwardRef(({className:e,value:t,id:n,name:r,date:o=new Date(new Date().setHours(0,0,0,0)),setDate:i,onChange:a,onKeyDown:s,picker:l,period:u,onLeftFocus:c,onRightFocus:d,...h},p)=>{const[x,y]=J.useState(!1),[w,_]=J.useState("0");J.useEffect(()=>{if(x){const T=setTimeout(()=>{y(!1)},2e3);return()=>clearTimeout(T)}},[x]);const C=J.useMemo(()=>jTe(o,l),[o,l]),O=T=>l==="12hours"&&x&&C.slice(1,2)==="1"&&w==="0"?"0"+T:x?C.slice(1,2)+T:"0"+T,P=T=>{if(T.key!=="Tab"){if(T.preventDefault(),T.key==="ArrowRight"&&(d==null||d()),T.key==="ArrowLeft"&&(c==null||c()),["ArrowUp","ArrowDown"].includes(T.key)){const k=T.key==="ArrowUp"?1:-1,M=ITe(C,k,l);x&&y(!1);const j=new Date(o);i(y9(j,M,l,u))}if(T.key>="0"&&T.key<="9"){l==="12hours"&&_(T.key);const k=O(T.key);x&&(d==null||d()),y(j=>!j);const M=new Date(o);i(y9(M,k,l,u))}}},R=T=>T<10?`0${T}`:T;return v.jsx(ri,{ref:p,id:n||l,name:r||l,className:je("w-[48px] text-center font-mono text-xs tabular-nums caret-transparent focus:bg-accent focus:text-accent-foreground [&::-webkit-inner-spin-button]:appearance-none",e),value:t||R(parseInt(C)),onChange:T=>{T.preventDefault(),a==null||a(T)},min:0,max:59,type:"number",inputMode:"numeric",onKeyDown:T=>{s==null||s(T),P(T)},...h})});hE.displayName="TimePickerInput";var $Te=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yee=$Te.reduce((e,t)=>{const n=vX(`Primitive.${t}`),r=b.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),FTe="Label",c4=b.forwardRef((e,t)=>v.jsx(Yee.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));c4.displayName=FTe;var Xee=c4;const BTe=Hl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),is=b.forwardRef(({className:e,...t},n)=>v.jsx(Xee,{ref:n,className:je(BTe(),e),...t}));is.displayName=Xee.displayName;function zTe({date:e,setDate:t}){const n=b.useRef(null),r=b.useRef(null),o=b.useRef(null);return v.jsxs("div",{className:"flex items-end gap-2",children:[v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"hours",className:"text-xs",children:"Hours"}),v.jsx(hE,{picker:"hours",date:e,setDate:t,ref:r,onRightFocus:()=>{var i;return(i=n.current)==null?void 0:i.focus()}})]}),v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),v.jsx(hE,{picker:"minutes",date:e,setDate:t,ref:n,onLeftFocus:()=>{var i;return(i=r.current)==null?void 0:i.focus()},onRightFocus:()=>{var i;return(i=o.current)==null?void 0:i.focus()}})]}),v.jsxs("div",{className:"grid gap-1 text-center",children:[v.jsx(is,{htmlFor:"seconds",className:"text-xs",children:"Seconds"}),v.jsx(hE,{picker:"seconds",date:e,setDate:t,ref:o,onLeftFocus:()=>{var i;return(i=n.current)==null?void 0:i.focus()}})]})]})}var ln=function(){return ln=Object.assign||function(t){for(var n,r=1,o=arguments.length;r1&&(l||!u),d=t>1&&(u||!l),h=function(){r&&i(r)},p=function(){o&&i(o)};return v.jsx(x2e,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:o,previousMonth:r,onPreviousClick:h,onNextClick:p})}function b2e(e){var t,n=Or(),r=n.classNames,o=n.disableNavigation,i=n.styles,a=n.captionLayout,s=n.components,l=(t=s==null?void 0:s.CaptionLabel)!==null&&t!==void 0?t:Jee,u;return o?u=v.jsx(l,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?u=v.jsx(w9,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?u=v.jsxs(v.Fragment,{children:[v.jsx(w9,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),v.jsx(x9,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=v.jsxs(v.Fragment,{children:[v.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),v.jsx(x9,{displayMonth:e.displayMonth,id:e.id})]}),v.jsx("div",{className:r.caption,style:i.caption,children:u})}function S2e(e){var t=Or(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?v.jsx("tfoot",{className:o,style:r.tfoot,children:v.jsx("tr",{children:v.jsx("td",{colSpan:8,children:n})})}):v.jsx(v.Fragment,{})}function _2e(e,t,n){for(var r=n?rm(new Date):Ju(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Ei(r,i);o.push(a)}return o}function E2e(){var e=Or(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=_2e(o,i,a);return v.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&v.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(c,d){return v.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(c,{locale:o}),children:s(c,{locale:o})},d)})]})}function C2e(){var e,t=Or(),n=t.classNames,r=t.styles,o=t.components,i=(e=o==null?void 0:o.HeadRow)!==null&&e!==void 0?e:E2e;return v.jsx("thead",{style:r.head,className:n.head,children:v.jsx(i,{})})}function O2e(e){var t=Or(),n=t.locale,r=t.formatters.formatDay;return v.jsx(v.Fragment,{children:r(e.date,{locale:n})})}var f4=b.createContext(void 0);function R2e(e){if(!yb(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return v.jsx(f4.Provider,{value:t,children:e.children})}return v.jsx(P2e,{initialProps:e.initialProps,children:e.children})}function P2e(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a=function(u,c,d){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,u,c,d);var x=!!(c.selected&&o&&(r==null?void 0:r.length)===o);if(!x){var y=!!(!c.selected&&i&&(r==null?void 0:r.length)===i);if(!y){var w=r?Qee([],r):[];if(c.selected){var _=w.findIndex(function(C){return Oa(u,C)});w.splice(_,1)}else w.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,w,u,c,d)}}},s={disabled:[]};r&&s.disabled.push(function(u){var c=i&&r.length>i-1,d=r.some(function(h){return Oa(h,u)});return!!(c&&!d)});var l={selected:r,onDayClick:a,modifiers:s};return v.jsx(f4.Provider,{value:l,children:n})}function d4(){var e=b.useContext(f4);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function T2e(e,t){var n=t||{},r=n.from,o=n.to;return r&&o?Oa(o,e)&&Oa(r,e)?void 0:Oa(o,e)?{from:o,to:void 0}:Oa(r,e)?void 0:oD(r,e)?{from:e,to:o}:{from:r,to:e}:o?oD(e,o)?{from:o,to:e}:{from:e,to:o}:r?aee(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var h4=b.createContext(void 0);function A2e(e){if(!wb(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return v.jsx(h4.Provider,{value:t,children:e.children})}return v.jsx(k2e,{initialProps:e.initialProps,children:e.children})}function k2e(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,s=t.min,l=t.max,u=function(p,x,y){var w,_;(w=t.onDayClick)===null||w===void 0||w.call(t,p,x,y);var C=T2e(p,r);(_=t.onSelect)===null||_===void 0||_.call(t,C,p,x,y)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],a?(c.range_end=[a],Oa(i,a)||(c.range_middle=[{after:i,before:a}])):c.range_end=[i]):a&&(c.range_start=[a],c.range_end=[a]),s&&(i&&!a&&c.disabled.push({after:aA(i,s-1),before:Ei(i,s-1)}),i&&a&&c.disabled.push({after:i,before:Ei(i,s-1)}),!i&&a&&c.disabled.push({after:aA(a,s-1),before:Ei(a,s-1)})),l){if(i&&!a&&(c.disabled.push({before:Ei(i,-l+1)}),c.disabled.push({after:Ei(i,l-1)})),i&&a){var d=jl(a,i)+1,h=l-d;c.disabled.push({before:aA(i,h)}),c.disabled.push({after:Ei(a,h)})}!i&&a&&(c.disabled.push({before:Ei(a,-l+1)}),c.disabled.push({after:Ei(a,l-1)}))}return v.jsx(h4.Provider,{value:{selected:r,onDayClick:u,modifiers:c},children:n})}function p4(){var e=b.useContext(h4);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function pE(e){return Array.isArray(e)?Qee([],e):e!==void 0?[e]:[]}function N2e(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],o=n[1];t[r]=pE(o)}),t}var Vl;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Vl||(Vl={}));var M2e=Vl.Selected,qc=Vl.Disabled,j2e=Vl.Hidden,I2e=Vl.Today,fA=Vl.RangeEnd,dA=Vl.RangeMiddle,hA=Vl.RangeStart,D2e=Vl.Outside;function L2e(e,t,n){var r,o=(r={},r[M2e]=pE(e.selected),r[qc]=pE(e.disabled),r[j2e]=pE(e.hidden),r[I2e]=[e.today],r[fA]=[],r[dA]=[],r[hA]=[],r[D2e]=[],r);return e.fromDate&&o[qc].push({before:e.fromDate}),e.toDate&&o[qc].push({after:e.toDate}),yb(e)?o[qc]=o[qc].concat(t.modifiers[qc]):wb(e)&&(o[qc]=o[qc].concat(n.modifiers[qc]),o[hA]=n.modifiers[hA],o[dA]=n.modifiers[dA],o[fA]=n.modifiers[fA]),o}var nte=b.createContext(void 0);function $2e(e){var t=Or(),n=d4(),r=p4(),o=L2e(t,n,r),i=N2e(t.modifiers),a=ln(ln({},o),i);return v.jsx(nte.Provider,{value:a,children:e.children})}function rte(){var e=b.useContext(nte);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function F2e(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function B2e(e){return!!(e&&typeof e=="object"&&"from"in e)}function z2e(e){return!!(e&&typeof e=="object"&&"after"in e)}function q2e(e){return!!(e&&typeof e=="object"&&"before"in e)}function U2e(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function V2e(e,t){var n,r=t.from,o=t.to;if(r&&o){var i=jl(o,r)<0;i&&(n=[o,r],r=n[0],o=n[1]);var a=jl(e,r)>=0&&jl(o,e)>=0;return a}return o?Oa(o,e):r?Oa(r,e):!1}function W2e(e){return QL(e)}function H2e(e){return Array.isArray(e)&&e.every(QL)}function G2e(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(W2e(n))return Oa(e,n);if(H2e(n))return n.includes(e);if(B2e(n))return V2e(e,n);if(U2e(n))return n.dayOfWeek.includes(e.getDay());if(F2e(n)){var r=jl(n.before,e),o=jl(n.after,e),i=r>0,a=o<0,s=oD(n.before,n.after);return s?a&&i:i||a}return z2e(n)?jl(e,n.after)>0:q2e(n)?jl(n.before,e)>0:typeof n=="function"?n(e):!1})}function m4(e,t,n){var r=Object.keys(t).reduce(function(i,a){var s=t[a];return G2e(e,s)&&i.push(a),i},[]),o={};return r.forEach(function(i){return o[i]=!0}),n&&!t4(e,n)&&(o.outside=!0),o}function K2e(e,t){for(var n=Aa(e[0]),r=wR(e[e.length-1]),o,i,a=n;a<=r;){var s=m4(a,t),l=!s.disabled&&!s.hidden;if(!l){a=Ei(a,1);continue}if(s.selected)return a;s.today&&!i&&(i=a),o||(o=a),a=Ei(a,1)}return i||o}var Y2e=365;function ote(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,l=o.weekStartsOn,u=o.fromDate,c=o.toDate,d=o.locale,h={day:Ei,week:rD,month:Gs,year:qOe,startOfWeek:function(w){return o.ISOWeek?rm(w):Ju(w,{locale:d,weekStartsOn:l})},endOfWeek:function(w){return o.ISOWeek?eee(w):e4(w,{locale:d,weekStartsOn:l})}},p=h[n](e,r==="after"?1:-1);r==="before"&&u?p=UOe([u,p]):r==="after"&&c&&(p=VOe([c,p]));var x=!0;if(i){var y=m4(p,i);x=!y.disabled&&!y.hidden}return x?p:s.count>Y2e?s.lastFocused:ote(p,{moveBy:n,direction:r,context:o,modifiers:i,retry:ln(ln({},s),{count:s.count+1})})}var ite=b.createContext(void 0);function X2e(e){var t=xb(),n=rte(),r=b.useState(),o=r[0],i=r[1],a=b.useState(),s=a[0],l=a[1],u=K2e(t.displayMonths,n),c=o??(s&&t.isDateDisplayed(s))?s:u,d=function(){l(o),i(void 0)},h=function(w){i(w)},p=Or(),x=function(w,_){if(o){var C=ote(o,{moveBy:w,direction:_,context:p,modifiers:n});Oa(o,C)||(t.goToDate(C,o),h(C))}},y={focusedDay:o,focusTarget:c,blur:d,focus:h,focusDayAfter:function(){return x("day","after")},focusDayBefore:function(){return x("day","before")},focusWeekAfter:function(){return x("week","after")},focusWeekBefore:function(){return x("week","before")},focusMonthBefore:function(){return x("month","before")},focusMonthAfter:function(){return x("month","after")},focusYearBefore:function(){return x("year","before")},focusYearAfter:function(){return x("year","after")},focusStartOfWeek:function(){return x("startOfWeek","before")},focusEndOfWeek:function(){return x("endOfWeek","after")}};return v.jsx(ite.Provider,{value:y,children:e.children})}function g4(){var e=b.useContext(ite);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Q2e(e,t){var n=rte(),r=m4(e,n,t);return r}var v4=b.createContext(void 0);function Z2e(e){if(!ER(e.initialProps)){var t={selected:void 0};return v.jsx(v4.Provider,{value:t,children:e.children})}return v.jsx(J2e,{initialProps:e.initialProps,children:e.children})}function J2e(e){var t=e.initialProps,n=e.children,r=function(i,a,s){var l,u,c;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,a,s),a.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,i,i,a,s)},o={selected:t.selected,onDayClick:r};return v.jsx(v4.Provider,{value:o,children:n})}function ate(){var e=b.useContext(v4);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function eAe(e,t){var n=Or(),r=ate(),o=d4(),i=p4(),a=g4(),s=a.focusDayAfter,l=a.focusDayBefore,u=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,h=a.focus,p=a.focusMonthBefore,x=a.focusMonthAfter,y=a.focusYearBefore,w=a.focusYearAfter,_=a.focusStartOfWeek,C=a.focusEndOfWeek,O=function(Y){var U,V,G,z;ER(n)?(U=r.onDayClick)===null||U===void 0||U.call(r,e,t,Y):yb(n)?(V=o.onDayClick)===null||V===void 0||V.call(o,e,t,Y):wb(n)?(G=i.onDayClick)===null||G===void 0||G.call(i,e,t,Y):(z=n.onDayClick)===null||z===void 0||z.call(n,e,t,Y)},P=function(Y){var U;h(e),(U=n.onDayFocus)===null||U===void 0||U.call(n,e,t,Y)},R=function(Y){var U;d(),(U=n.onDayBlur)===null||U===void 0||U.call(n,e,t,Y)},T=function(Y){var U;(U=n.onDayMouseEnter)===null||U===void 0||U.call(n,e,t,Y)},k=function(Y){var U;(U=n.onDayMouseLeave)===null||U===void 0||U.call(n,e,t,Y)},M=function(Y){var U;(U=n.onDayPointerEnter)===null||U===void 0||U.call(n,e,t,Y)},j=function(Y){var U;(U=n.onDayPointerLeave)===null||U===void 0||U.call(n,e,t,Y)},$=function(Y){var U;(U=n.onDayTouchCancel)===null||U===void 0||U.call(n,e,t,Y)},L=function(Y){var U;(U=n.onDayTouchEnd)===null||U===void 0||U.call(n,e,t,Y)},K=function(Y){var U;(U=n.onDayTouchMove)===null||U===void 0||U.call(n,e,t,Y)},H=function(Y){var U;(U=n.onDayTouchStart)===null||U===void 0||U.call(n,e,t,Y)},D=function(Y){var U;(U=n.onDayKeyUp)===null||U===void 0||U.call(n,e,t,Y)},W=function(Y){var U;switch(Y.key){case"ArrowLeft":Y.preventDefault(),Y.stopPropagation(),n.dir==="rtl"?s():l();break;case"ArrowRight":Y.preventDefault(),Y.stopPropagation(),n.dir==="rtl"?l():s();break;case"ArrowDown":Y.preventDefault(),Y.stopPropagation(),u();break;case"ArrowUp":Y.preventDefault(),Y.stopPropagation(),c();break;case"PageUp":Y.preventDefault(),Y.stopPropagation(),Y.shiftKey?y():p();break;case"PageDown":Y.preventDefault(),Y.stopPropagation(),Y.shiftKey?w():x();break;case"Home":Y.preventDefault(),Y.stopPropagation(),_();break;case"End":Y.preventDefault(),Y.stopPropagation(),C();break}(U=n.onDayKeyDown)===null||U===void 0||U.call(n,e,t,Y)},q={onClick:O,onFocus:P,onBlur:R,onKeyDown:W,onKeyUp:D,onMouseEnter:T,onMouseLeave:k,onPointerEnter:M,onPointerLeave:j,onTouchCancel:$,onTouchEnd:L,onTouchMove:K,onTouchStart:H};return q}function tAe(){var e=Or(),t=ate(),n=d4(),r=p4(),o=ER(e)?t.selected:yb(e)?n.selected:wb(e)?r.selected:void 0;return o}function nAe(e){return Object.values(Vl).includes(e)}function rAe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var o=e.modifiersClassNames[r];if(o)n.push(o);else if(nAe(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function oAe(e,t){var n=ln({},e.styles.day);return Object.keys(t).forEach(function(r){var o;n=ln(ln({},n),(o=e.modifiersStyles)===null||o===void 0?void 0:o[r])}),n}function iAe(e,t,n){var r,o,i,a=Or(),s=g4(),l=Q2e(e,t),u=eAe(e,l),c=tAe(),d=!!(a.onDayClick||a.mode!=="default");b.useEffect(function(){var T;l.outside||s.focusedDay&&d&&Oa(s.focusedDay,e)&&((T=n.current)===null||T===void 0||T.focus())},[s.focusedDay,e,n,d,l.outside]);var h=rAe(a,l).join(" "),p=oAe(a,l),x=!!(l.outside&&!a.showOutsideDays||l.hidden),y=(i=(o=a.components)===null||o===void 0?void 0:o.DayContent)!==null&&i!==void 0?i:O2e,w=v.jsx(y,{date:e,displayMonth:t,activeModifiers:l}),_={style:p,className:h,children:w,role:"gridcell"},C=s.focusTarget&&Oa(s.focusTarget,e)&&!l.outside,O=s.focusedDay&&Oa(s.focusedDay,e),P=ln(ln(ln({},_),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=O||C?0:-1,r)),u),R={isButton:d,isHidden:x,activeModifiers:l,selectedDays:c,buttonProps:P,divProps:_};return R}function aAe(e){var t=b.useRef(null),n=iAe(e.date,e.displayMonth,t);return n.isHidden?v.jsx("div",{role:"gridcell"}):n.isButton?v.jsx(iC,ln({name:"day",ref:t},n.buttonProps)):v.jsx("div",ln({},n.divProps))}function sAe(e){var t=e.number,n=e.dates,r=Or(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,s=r.locale,l=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,c=u(Number(t),{locale:s});if(!o)return v.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var d=l(Number(t),{locale:s}),h=function(p){o(t,n,p)};return v.jsx(iC,{name:"week-number","aria-label":d,className:a.weeknumber,style:i.weeknumber,onClick:h,children:c})}function lAe(e){var t,n,r=Or(),o=r.styles,i=r.classNames,a=r.showWeekNumber,s=r.components,l=(t=s==null?void 0:s.Day)!==null&&t!==void 0?t:aAe,u=(n=s==null?void 0:s.WeekNumber)!==null&&n!==void 0?n:sAe,c;return a&&(c=v.jsx("td",{className:i.cell,style:o.cell,children:v.jsx(u,{number:e.weekNumber,dates:e.dates})})),v.jsxs("tr",{className:i.row,style:o.row,children:[c,e.dates.map(function(d){return v.jsx("td",{className:i.cell,style:o.cell,role:"presentation",children:v.jsx(l,{displayMonth:e.displayMonth,date:d})},ZRe(d))})]})}function b9(e,t,n){for(var r=n!=null&&n.ISOWeek?eee(t):e4(t,n),o=n!=null&&n.ISOWeek?rm(e):Ju(e,n),i=jl(r,o),a=[],s=0;s<=i;s++)a.push(Ei(o,s));var l=a.reduce(function(u,c){var d=n!=null&&n.ISOWeek?nee(c):oee(c,n),h=u.find(function(p){return p.weekNumber===d});return h?(h.dates.push(c),u):(u.push({weekNumber:d,dates:[c]}),u)},[]);return l}function uAe(e,t){var n=b9(Aa(e),wR(e),t);if(t!=null&&t.useFixedWeeks){var r=ePe(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=rD(i,6-r),s=b9(rD(i,1),a,t);n.push.apply(n,s)}}return n}function cAe(e){var t,n,r,o=Or(),i=o.locale,a=o.classNames,s=o.styles,l=o.hideHead,u=o.fixedWeeks,c=o.components,d=o.weekStartsOn,h=o.firstWeekContainsDate,p=o.ISOWeek,x=uAe(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:h}),y=(t=c==null?void 0:c.Head)!==null&&t!==void 0?t:C2e,w=(n=c==null?void 0:c.Row)!==null&&n!==void 0?n:lAe,_=(r=c==null?void 0:c.Footer)!==null&&r!==void 0?r:S2e;return v.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&v.jsx(y,{}),v.jsx("tbody",{className:a.tbody,style:s.tbody,children:x.map(function(C){return v.jsx(w,{displayMonth:e.displayMonth,dates:C.dates,weekNumber:C.weekNumber},C.weekNumber)})}),v.jsx(_,{displayMonth:e.displayMonth})]})}function fAe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var dAe=fAe()?b.useLayoutEffect:b.useEffect,pA=!1,hAe=0;function S9(){return"react-day-picker-".concat(++hAe)}function pAe(e){var t,n=e??(pA?S9():null),r=b.useState(n),o=r[0],i=r[1];return dAe(function(){o===null&&i(S9())},[]),b.useEffect(function(){pA===!1&&(pA=!0)},[]),(t=e??o)!==null&&t!==void 0?t:void 0}function mAe(e){var t,n,r=Or(),o=r.dir,i=r.classNames,a=r.styles,s=r.components,l=xb().displayMonths,u=pAe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],h=a.month,p=e.displayIndex===0,x=e.displayIndex===l.length-1,y=!p&&!x;o==="rtl"&&(t=[p,x],x=t[0],p=t[1]),p&&(d.push(i.caption_start),h=ln(ln({},h),a.caption_start)),x&&(d.push(i.caption_end),h=ln(ln({},h),a.caption_end)),y&&(d.push(i.caption_between),h=ln(ln({},h),a.caption_between));var w=(n=s==null?void 0:s.Caption)!==null&&n!==void 0?n:b2e;return v.jsxs("div",{className:d.join(" "),style:h,children:[v.jsx(w,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),v.jsx(cAe,{id:c,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function gAe(e){var t=Or(),n=t.classNames,r=t.styles;return v.jsx("div",{className:n.months,style:r.months,children:e.children})}function vAe(e){var t,n,r=e.initialProps,o=Or(),i=g4(),a=xb(),s=b.useState(!1),l=s[0],u=s[1];b.useEffect(function(){o.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),u(!0)))},[o.initialFocus,l,i.focus,i.focusTarget,i]);var c=[o.classNames.root,o.className];o.numberOfMonths>1&&c.push(o.classNames.multiple_months),o.showWeekNumber&&c.push(o.classNames.with_weeknumber);var d=ln(ln({},o.styles.root),o.style),h=Object.keys(r).filter(function(x){return x.startsWith("data-")}).reduce(function(x,y){var w;return ln(ln({},x),(w={},w[y]=r[y],w))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:gAe;return v.jsx("div",ln({className:c.join(" "),style:d,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:v.jsx(p,{children:a.displayMonths.map(function(x,y){return v.jsx(mAe,{displayIndex:y,displayMonth:x},y)})})}))}function yAe(e){var t=e.children,n=qTe(e,["children"]);return v.jsx(s2e,{initialProps:n,children:v.jsx(v2e,{children:v.jsx(Z2e,{initialProps:n,children:v.jsx(R2e,{initialProps:n,children:v.jsx(A2e,{initialProps:n,children:v.jsx($2e,{children:v.jsx(X2e,{children:t})})})})})})})}function wAe(e){return v.jsx(yAe,ln({},e,{children:v.jsx(vAe,{initialProps:e})}))}function ste({className:e,classNames:t,showOutsideDays:n=!0,...r}){return v.jsx(wAe,{showOutsideDays:n,className:je("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:je(DI({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:je("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:je(DI({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:()=>v.jsx(KQ,{className:"h-4 w-4"}),IconRight:()=>v.jsx(AL,{className:"h-4 w-4"})},...r})}ste.displayName="Calendar";function mD({date:e,setDate:t,label:n,triggerClassName:r}){const o=i=>{if(!i)return;if(!e){t(i);return}const s=(i.getTime()-e.getTime())/(1e3*60*60*24),l=cv(e,{days:Math.ceil(s)});t(l)};return v.jsxs(Xy,{children:[v.jsx(Qy,{asChild:!0,children:v.jsxs(xt,{variant:"outline",className:je("w-fit justify-start text-left text-xs font-normal",!e&&"text-muted-foreground",r),children:[v.jsx(ISe,{className:"mr-2 size-4"}),e?n+": "+bf(e,"PPP HH:mm:ss"):v.jsx("span",{children:n})]})}),v.jsxs(_m,{className:"w-auto p-0",children:[v.jsx(ste,{mode:"single",selected:e,onSelect:i=>o(i),initialFocus:!0}),v.jsx("div",{className:"border-t border-border p-3",children:v.jsx(zTe,{setDate:t,date:e})})]})]})}function _9(e,[t,n]){return Math.min(n,Math.max(t,e))}var xAe=[" ","Enter","ArrowUp","ArrowDown"],bAe=[" ","Enter"],lm="Select",[CR,OR,SAe]=uR(lm),[Zy]=fs(lm,[SAe,ic]),RR=ic(),[_Ae,oh]=Zy(lm),[EAe,CAe]=Zy(lm),lte=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:h,required:p,form:x}=e,y=RR(t),[w,_]=b.useState(null),[C,O]=b.useState(null),[P,R]=b.useState(!1),T=fR(u),[k,M]=Ws({prop:r,defaultProp:o??!1,onChange:i,caller:lm}),[j,$]=Ws({prop:a,defaultProp:s,onChange:l,caller:lm}),L=b.useRef(null),K=w?x||!!w.closest("form"):!0,[H,D]=b.useState(new Set),W=Array.from(H).map(q=>q.props.value).join(";");return v.jsx(qy,{...y,children:v.jsxs(_Ae,{required:p,scope:t,trigger:w,onTriggerChange:_,valueNode:C,onValueNodeChange:O,valueNodeHasChildren:P,onValueNodeHasChildrenChange:R,contentId:Ta(),value:j,onValueChange:$,open:k,onOpenChange:M,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[v.jsx(CR.Provider,{scope:t,children:v.jsx(EAe,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(q=>{D(Y=>new Set(Y).add(q))},[]),onNativeOptionRemove:b.useCallback(q=>{D(Y=>{const U=new Set(Y);return U.delete(q),U})},[]),children:n})}),K?v.jsxs(Nte,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:j,onChange:q=>$(q.target.value),disabled:h,form:x,children:[j===void 0?v.jsx("option",{value:""}):null,Array.from(H)]},W):null]})})};lte.displayName=lm;var ute="SelectTrigger",cte=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=RR(n),a=oh(ute,n),s=a.disabled||r,l=zn(t,a.onTriggerChange),u=OR(n),c=b.useRef("touch"),[d,h,p]=jte(y=>{const w=u().filter(O=>!O.disabled),_=w.find(O=>O.value===a.value),C=Ite(w,y,_);C!==void 0&&a.onValueChange(C.value)}),x=y=>{s||(a.onOpenChange(!0),p()),y&&(a.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return v.jsx(Uy,{asChild:!0,...i,children:v.jsx(Jt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Mte(a.value)?"":void 0,...o,ref:l,onClick:Je(o.onClick,y=>{y.currentTarget.focus(),c.current!=="mouse"&&x(y)}),onPointerDown:Je(o.onPointerDown,y=>{c.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(x(y),y.preventDefault())}),onKeyDown:Je(o.onKeyDown,y=>{const w=d.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&h(y.key),!(w&&y.key===" ")&&xAe.includes(y.key)&&(x(),y.preventDefault())})})})});cte.displayName=ute;var fte="SelectValue",dte=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=oh(fte,n),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,d=zn(t,l.onValueNodeChange);return ii(()=>{u(c)},[u,c]),v.jsx(Jt.span,{...s,ref:d,style:{pointerEvents:"none"},children:Mte(l.value)?v.jsx(v.Fragment,{children:a}):i})});dte.displayName=fte;var OAe="SelectIcon",hte=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.jsx(Jt.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});hte.displayName=OAe;var RAe="SelectPortal",pte=e=>v.jsx(bm,{asChild:!0,...e});pte.displayName=RAe;var um="SelectContent",mte=b.forwardRef((e,t)=>{const n=oh(um,e.__scopeSelect),[r,o]=b.useState();if(ii(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Vs.createPortal(v.jsx(gte,{scope:e.__scopeSelect,children:v.jsx(CR.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),i):null}return v.jsx(vte,{...e,ref:t})});mte.displayName=um;var _l=10,[gte,ih]=Zy(um),PAe="SelectContentImpl",TAe=Zp("SelectContent.RemoveScroll"),vte=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:y,avoidCollisions:w,..._}=e,C=oh(um,n),[O,P]=b.useState(null),[R,T]=b.useState(null),k=zn(t,we=>P(we)),[M,j]=b.useState(null),[$,L]=b.useState(null),K=OR(n),[H,D]=b.useState(!1),W=b.useRef(!1);b.useEffect(()=>{if(O)return ab(O)},[O]),oR();const q=b.useCallback(we=>{const[de,...se]=K().map(ge=>ge.ref.current),[ye]=se.slice(-1),Te=document.activeElement;for(const ge of we)if(ge===Te||(ge==null||ge.scrollIntoView({block:"nearest"}),ge===de&&R&&(R.scrollTop=0),ge===ye&&R&&(R.scrollTop=R.scrollHeight),ge==null||ge.focus(),document.activeElement!==Te))return},[K,R]),Y=b.useCallback(()=>q([M,O]),[q,M,O]);b.useEffect(()=>{H&&Y()},[H,Y]);const{onOpenChange:U,triggerPointerDownPosRef:V}=C;b.useEffect(()=>{if(O){let we={x:0,y:0};const de=ye=>{var Te,ge;we={x:Math.abs(Math.round(ye.pageX)-(((Te=V.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((ge=V.current)==null?void 0:ge.y)??0))}},se=ye=>{we.x<=10&&we.y<=10?ye.preventDefault():O.contains(ye.target)||U(!1),document.removeEventListener("pointermove",de),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",se,{capture:!0})}}},[O,U,V]),b.useEffect(()=>{const we=()=>U(!1);return window.addEventListener("blur",we),window.addEventListener("resize",we),()=>{window.removeEventListener("blur",we),window.removeEventListener("resize",we)}},[U]);const[G,z]=jte(we=>{const de=K().filter(Te=>!Te.disabled),se=de.find(Te=>Te.ref.current===document.activeElement),ye=Ite(de,we,se);ye&&setTimeout(()=>ye.ref.current.focus())}),X=b.useCallback((we,de,se)=>{const ye=!W.current&&!se;(C.value!==void 0&&C.value===de||ye)&&(j(we),ye&&(W.current=!0))},[C.value]),ee=b.useCallback(()=>O==null?void 0:O.focus(),[O]),ae=b.useCallback((we,de,se)=>{const ye=!W.current&&!se;(C.value!==void 0&&C.value===de||ye)&&L(we)},[C.value]),fe=r==="popper"?gD:yte,ie=fe===gD?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:y,avoidCollisions:w}:{};return v.jsx(gte,{scope:n,content:O,viewport:R,onViewportChange:T,itemRefCallback:X,selectedItem:M,onItemLeave:ee,itemTextRefCallback:ae,focusSelectedItem:Y,selectedItemText:$,position:r,isPositioned:H,searchRef:G,children:v.jsx(ib,{as:TAe,allowPinchZoom:!0,children:v.jsx(ob,{asChild:!0,trapped:C.open,onMountAutoFocus:we=>{we.preventDefault()},onUnmountAutoFocus:Je(o,we=>{var de;(de=C.trigger)==null||de.focus({preventScroll:!0}),we.preventDefault()}),children:v.jsx(th,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:we=>we.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:v.jsx(fe,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:we=>we.preventDefault(),..._,...ie,onPlaced:()=>D(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Je(_.onKeyDown,we=>{const de=we.ctrlKey||we.altKey||we.metaKey;if(we.key==="Tab"&&we.preventDefault(),!de&&we.key.length===1&&z(we.key),["ArrowUp","ArrowDown","Home","End"].includes(we.key)){let ye=K().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(we.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(we.key)){const Te=we.target,ge=ye.indexOf(Te);ye=ye.slice(ge+1)}setTimeout(()=>q(ye)),we.preventDefault()}})})})})})})});vte.displayName=PAe;var AAe="SelectItemAlignedPosition",yte=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=oh(um,n),a=ih(um,n),[s,l]=b.useState(null),[u,c]=b.useState(null),d=zn(t,k=>c(k)),h=OR(n),p=b.useRef(!1),x=b.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:_,focusSelectedItem:C}=a,O=b.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&w&&_){const k=i.trigger.getBoundingClientRect(),M=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),$=_.getBoundingClientRect();if(i.dir!=="rtl"){const Te=$.left-M.left,ge=j.left-Te,Be=k.left-ge,Ie=k.width+Be,Ve=Math.max(Ie,M.width),ht=window.innerWidth-_l,lt=_9(ge,[_l,Math.max(_l,ht-Ve)]);s.style.minWidth=Ie+"px",s.style.left=lt+"px"}else{const Te=M.right-$.right,ge=window.innerWidth-j.right-Te,Be=window.innerWidth-k.right-ge,Ie=k.width+Be,Ve=Math.max(Ie,M.width),ht=window.innerWidth-_l,lt=_9(ge,[_l,Math.max(_l,ht-Ve)]);s.style.minWidth=Ie+"px",s.style.right=lt+"px"}const L=h(),K=window.innerHeight-_l*2,H=y.scrollHeight,D=window.getComputedStyle(u),W=parseInt(D.borderTopWidth,10),q=parseInt(D.paddingTop,10),Y=parseInt(D.borderBottomWidth,10),U=parseInt(D.paddingBottom,10),V=W+q+H+U+Y,G=Math.min(w.offsetHeight*5,V),z=window.getComputedStyle(y),X=parseInt(z.paddingTop,10),ee=parseInt(z.paddingBottom,10),ae=k.top+k.height/2-_l,fe=K-ae,ie=w.offsetHeight/2,we=w.offsetTop+ie,de=W+q+we,se=V-de;if(de<=ae){const Te=L.length>0&&w===L[L.length-1].ref.current;s.style.bottom="0px";const ge=u.clientHeight-y.offsetTop-y.offsetHeight,Be=Math.max(fe,ie+(Te?ee:0)+ge+Y),Ie=de+Be;s.style.height=Ie+"px"}else{const Te=L.length>0&&w===L[0].ref.current;s.style.top="0px";const Be=Math.max(ae,W+y.offsetTop+(Te?X:0)+ie)+se;s.style.height=Be+"px",y.scrollTop=de-ae+y.offsetTop}s.style.margin=`${_l}px 0`,s.style.minHeight=G+"px",s.style.maxHeight=K+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,s,u,y,w,_,i.dir,r]);ii(()=>O(),[O]);const[P,R]=b.useState();ii(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const T=b.useCallback(k=>{k&&x.current===!0&&(O(),C==null||C(),x.current=!1)},[O,C]);return v.jsx(NAe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:T,children:v.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:v.jsx(Jt.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yte.displayName=AAe;var kAe="SelectPopperPosition",gD=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_l,...i}=e,a=RR(n);return v.jsx(tb,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gD.displayName=kAe;var[NAe,y4]=Zy(um,{}),vD="SelectViewport",wte=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=ih(vD,n),a=y4(vD,n),s=zn(t,i.onViewportChange),l=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(CR.Slot,{scope:n,children:v.jsx(Jt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Je(o.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&d){const p=Math.abs(l.current-c.scrollTop);if(p>0){const x=window.innerHeight-_l*2,y=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),_=Math.max(y,w);if(_0?P:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});wte.displayName=vD;var xte="SelectGroup",[MAe,jAe]=Zy(xte),IAe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ta();return v.jsx(MAe,{scope:n,id:o,children:v.jsx(Jt.div,{role:"group","aria-labelledby":o,...r,ref:t})})});IAe.displayName=xte;var bte="SelectLabel",Ste=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=jAe(bte,n);return v.jsx(Jt.div,{id:o.id,...r,ref:t})});Ste.displayName=bte;var aC="SelectItem",[DAe,_te]=Zy(aC),Ete=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=oh(aC,n),l=ih(aC,n),u=s.value===r,[c,d]=b.useState(i??""),[h,p]=b.useState(!1),x=zn(t,C=>{var O;return(O=l.itemRefCallback)==null?void 0:O.call(l,C,r,o)}),y=Ta(),w=b.useRef("touch"),_=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(DAe,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:b.useCallback(C=>{d(O=>O||((C==null?void 0:C.textContent)??"").trim())},[]),children:v.jsx(CR.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:v.jsx(Jt.div,{role:"option","aria-labelledby":y,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:x,onFocus:Je(a.onFocus,()=>p(!0)),onBlur:Je(a.onBlur,()=>p(!1)),onClick:Je(a.onClick,()=>{w.current!=="mouse"&&_()}),onPointerUp:Je(a.onPointerUp,()=>{w.current==="mouse"&&_()}),onPointerDown:Je(a.onPointerDown,C=>{w.current=C.pointerType}),onPointerMove:Je(a.onPointerMove,C=>{var O;w.current=C.pointerType,o?(O=l.onItemLeave)==null||O.call(l):w.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(a.onPointerLeave,C=>{var O;C.currentTarget===document.activeElement&&((O=l.onItemLeave)==null||O.call(l))}),onKeyDown:Je(a.onKeyDown,C=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&C.key===" "||(bAe.includes(C.key)&&_(),C.key===" "&&C.preventDefault())})})})})});Ete.displayName=aC;var ow="SelectItemText",Cte=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=oh(ow,n),s=ih(ow,n),l=_te(ow,n),u=CAe(ow,n),[c,d]=b.useState(null),h=zn(t,_=>d(_),l.onItemTextChange,_=>{var C;return(C=s.itemTextRefCallback)==null?void 0:C.call(s,_,l.value,l.disabled)}),p=c==null?void 0:c.textContent,x=b.useMemo(()=>v.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=u;return ii(()=>(y(x),()=>w(x)),[y,w,x]),v.jsxs(v.Fragment,{children:[v.jsx(Jt.span,{id:l.textId,...i,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Vs.createPortal(i.children,a.valueNode):null]})});Cte.displayName=ow;var Ote="SelectItemIndicator",Rte=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _te(Ote,n).isSelected?v.jsx(Jt.span,{"aria-hidden":!0,...r,ref:t}):null});Rte.displayName=Ote;var yD="SelectScrollUpButton",Pte=b.forwardRef((e,t)=>{const n=ih(yD,e.__scopeSelect),r=y4(yD,e.__scopeSelect),[o,i]=b.useState(!1),a=zn(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?v.jsx(Ate,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});Pte.displayName=yD;var wD="SelectScrollDownButton",Tte=b.forwardRef((e,t)=>{const n=ih(wD,e.__scopeSelect),r=y4(wD,e.__scopeSelect),[o,i]=b.useState(!1),a=zn(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?v.jsx(Ate,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});Tte.displayName=wD;var Ate=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=ih("SelectScrollButton",n),a=b.useRef(null),s=OR(n),l=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>l(),[l]),ii(()=>{var c;const u=s().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[s]),v.jsx(Jt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Je(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Je(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Je(o.onPointerLeave,()=>{l()})})}),LAe="SelectSeparator",kte=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(Jt.div,{"aria-hidden":!0,...r,ref:t})});kte.displayName=LAe;var xD="SelectArrow",$Ae=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=RR(n),i=oh(xD,n),a=ih(xD,n);return i.open&&a.position==="popper"?v.jsx(nb,{...o,...r,ref:t}):null});$Ae.displayName=xD;var FAe="SelectBubbleInput",Nte=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=b.useRef(null),i=zn(r,o),a=mee(t);return b.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&c){const d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx(Jt.select,{...n,style:{...aX,...n.style},ref:i,defaultValue:t})});Nte.displayName=FAe;function Mte(e){return e===""||e===void 0}function jte(e){const t=Ji(e),n=b.useRef(""),r=b.useRef(0),o=b.useCallback(a=>{const s=n.current+a;t(s),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Ite(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=BAe(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function BAe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zAe=lte,Dte=cte,qAe=dte,UAe=hte,VAe=pte,Lte=mte,WAe=wte,$te=Ste,Fte=Ete,HAe=Cte,GAe=Rte,Bte=Pte,zte=Tte,qte=kte;const w4=zAe,x4=qAe,PR=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Dte,{ref:r,className:je("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,v.jsx(UAe,{asChild:!0,children:v.jsx(TL,{className:"h-4 w-4 opacity-50"})})]}));PR.displayName=Dte.displayName;const Ute=b.forwardRef(({className:e,...t},n)=>v.jsx(Bte,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(USe,{})}));Ute.displayName=Bte.displayName;const Vte=b.forwardRef(({className:e,...t},n)=>v.jsx(zte,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(TL,{})}));Vte.displayName=zte.displayName;const TR=b.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>v.jsx(VAe,{children:v.jsxs(Lte,{ref:o,className:je("relative z-[300] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[v.jsx(Ute,{}),v.jsx(WAe,{className:je("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(Vte,{})]})}));TR.displayName=Lte.displayName;const KAe=b.forwardRef(({className:e,...t},n)=>v.jsx($te,{ref:n,className:je("px-2 py-1.5 text-sm font-semibold",e),...t}));KAe.displayName=$te.displayName;const wd=b.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Fte,{ref:r,className:je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(GAe,{children:v.jsx(lR,{className:"h-4 w-4"})})}),v.jsx(HAe,{children:t})]}));wd.displayName=Fte.displayName;const YAe=b.forwardRef(({className:e,...t},n)=>v.jsx(qte,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));YAe.displayName=qte.displayName;function XAe({table:e,column:t,filter:n}){const r=t==null?void 0:t.getFilterValue(),[o,i]=b.useState(""),a=b.useRef(null),s=b.useRef(null),l=b.useRef(null),[u,c]=b.useState(""),[d,h]=b.useState(""),[p,x]=b.useState("");if(!n.type)return null;switch(n.type){case Bn.TimeRange:const y=n.timeRangeConfig;return y?v.jsxs("div",{className:"space-y-3",children:[y.isCustomTimeRange&&v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Custom Range"}),v.jsx(xt,{onClick:y.onClearTimeRange,variant:"ghost",size:"sm",leftIcon:v.jsx(sQ,{className:"size-4"}),children:"Clear"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"w-full space-y-1",children:v.jsx(mD,{label:"After",date:y.createdAfter?new Date(y.createdAfter):void 0,setDate:j=>{var $;return($=y.onCreatedAfterChange)==null?void 0:$.call(y,j==null?void 0:j.toISOString())},triggerClassName:"w-full"})}),v.jsx("div",{className:"w-full space-y-1",children:v.jsx(mD,{label:"Before",date:y.finishedBefore?new Date(y.finishedBefore):void 0,setDate:j=>{var $;return($=y.onFinishedBeforeChange)==null?void 0:$.call(y,j==null?void 0:j.toISOString())},triggerClassName:"w-full"})})]})]}),!y.isCustomTimeRange&&v.jsx("div",{className:"space-y-1",children:v.jsxs(w4,{value:y.isCustomTimeRange?"custom":y.currentTimeWindow,onValueChange:j=>{var $;return($=y.onTimeWindowChange)==null?void 0:$.call(y,j)},children:[v.jsx(PR,{className:"h-8 text-xs",children:v.jsx(x4,{placeholder:"Choose time range"})}),v.jsxs(TR,{children:[v.jsx(wd,{value:"1h",children:"1 hour"}),v.jsx(wd,{value:"6h",children:"6 hours"}),v.jsx(wd,{value:"1d",children:"1 day"}),v.jsx(wd,{value:"7d",children:"7 days"}),v.jsx(wd,{value:"custom",children:"Custom"})]})]})})]}):null;case Bn.Switch:return v.jsxs("div",{className:"flex items-center justify-between rounded-md border bg-muted/10 px-3 py-2 hover:bg-muted/50",children:[v.jsx(is,{htmlFor:`filter-${n.columnId}`,className:"flex-1 cursor-pointer text-sm font-medium",children:n.title}),v.jsx(Hp,{id:`filter-${n.columnId}`,checked:!!r,onCheckedChange:j=>t==null?void 0:t.setFilterValue(j===!0?!0:void 0)})]});case Bn.KeyValue:const w=Array.isArray(r)?r:r?[r]:[],_=()=>{if(u.trim()&&d.trim()){const j=`${u.trim()}:${d.trim()}`;t==null||t.setFilterValue([...w,j]),c(""),h("")}};return v.jsxs("div",{className:"space-y-3",children:[w.length>0&&v.jsx("div",{className:"space-y-2",children:w.map((j,$)=>{const L=j.includes(":")?":":"=",[K,H]=j.split(L);return v.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-2 py-1 text-xs",children:[v.jsxs("div",{className:"flex items-center gap-1 font-mono",children:[v.jsx("span",{className:"font-medium text-blue-600",children:K}),v.jsx("span",{className:"text-muted-foreground",children:L}),v.jsx("span",{className:"text-green-600",children:H})]}),v.jsx(xt,{variant:"icon",size:"xs",onClick:()=>{const D=w.filter((W,q)=>q!==$);t==null||t.setFilterValue(D.length>0?D:void 0)},children:v.jsx(ty,{className:"size-3"})})]},$)})}),v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[v.jsxs("div",{className:"space-y-1",children:[v.jsx("label",{className:"text-xs text-muted-foreground",children:"Key"}),v.jsx(ri,{ref:a,placeholder:"ENV",value:u,onChange:j=>c(j.target.value),onKeyDown:j=>{var $;j.key==="Enter"?_():j.key==="Tab"&&!j.shiftKey&&(j.preventDefault(),($=s.current)==null||$.focus())},className:"h-8 text-xs placeholder:text-muted-foreground/50"})]}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("label",{className:"text-xs text-muted-foreground",children:"Value"}),v.jsx(ri,{ref:s,placeholder:"PRODUCTION",value:d,onChange:j=>h(j.target.value),onKeyDown:j=>{var $;j.key==="Enter"?_():j.key==="Tab"&&j.shiftKey&&(j.preventDefault(),($=a.current)==null||$.focus())},className:"h-8 text-xs placeholder:text-muted-foreground/50"})]})]}),v.jsx(xt,{variant:"outline",size:"sm",disabled:!u.trim()||!d.trim(),onClick:_,className:"w-full",children:"Add Filter"})]})]});case Bn.Array:const C=Array.isArray(r)?r:r?[r]:[],O=()=>{p.trim()&&(t==null||t.setFilterValue([...C,p]),x(""))};return v.jsxs("div",{className:"space-y-3",children:[C.length>0&&v.jsx("div",{className:"space-y-2",children:C.map((j,$)=>v.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-2 py-1 text-xs",children:[v.jsx("div",{className:"flex items-center gap-1 font-mono",children:v.jsx("span",{className:"text-muted-foreground",children:j})}),v.jsx(xt,{variant:"icon",size:"xs",onClick:()=>{const L=C.filter((K,H)=>H!==$);t==null||t.setFilterValue(L.length>0?L:void 0)},children:v.jsx(ty,{className:"size-3"})})]},$))}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(ri,{ref:l,placeholder:"foobar",value:p,onChange:j=>x(j.target.value),onKeyDown:j=>{j.key==="Enter"&&O()},className:"h-8 w-full text-xs placeholder:text-muted-foreground/50"}),v.jsx(xt,{variant:"outline",size:"sm",disabled:!p.trim(),onClick:O,className:"w-full",children:"Add Filter"})]})]});case Bn.Checkbox:case Bn.Radio:if(!n.options)return null;const P=Array.isArray(r)?r:r?[r]:[],R=n.searchConfig?n.options:n.options.filter(j=>j.label.toLowerCase().includes(o.toLowerCase())),T=j=>{i(j),b.startTransition(()=>{var $;($=n.searchConfig)==null||$.onSearch(j)})};return v.jsxs("div",{className:"space-y-2",children:[(n.searchConfig||n.options.length>5)&&v.jsx(ri,{placeholder:`Search ${n.title.toLowerCase()}...`,value:o,onChange:j=>T(j.target.value),className:"h-8 text-xs"}),v.jsx("div",{className:"max-h-56 space-y-1 overflow-y-auto rounded-md border bg-muted/10 p-2",children:R.length>0?R.map(j=>{var D;const $=P.includes(j.value),L=j.subFilterColumnId?e.getColumn(j.subFilterColumnId):void 0,K=L==null?void 0:L.getFilterValue(),H=((D=j.subOptions)==null?void 0:D.map(W=>W.value))||[];return v.jsxs(b.Fragment,{children:[v.jsxs("div",{className:"flex items-center space-x-2 rounded-md px-2 py-1.5 hover:bg-muted/50",children:[v.jsx(Hp,{id:`${n.columnId}-${j.value}`,checked:$,onCheckedChange:W=>{let q;W?(q=[...P,j.value],L&&j.subOptions&&L.setFilterValue(void 0)):(q=P.filter(Y=>Y!==j.value),L&&L.setFilterValue(void 0)),t==null||t.setFilterValue(q.length>0?q:void 0)}}),v.jsx(is,{htmlFor:`${n.columnId}-${j.value}`,className:"flex-1 cursor-pointer truncate text-sm",children:j.label})]}),j.subOptions&&j.subFilterColumnId&&j.subOptions.map(W=>{const q=H.find(U=>U!==W.value),Y=$&&(K===void 0||K===W.value);return v.jsxs("div",{className:"flex items-center space-x-2 rounded-md py-1.5 pl-8 pr-2 hover:bg-muted/50",children:[v.jsx(Hp,{id:`${n.columnId}-${j.value}-${W.value}`,checked:Y,onCheckedChange:U=>{const V=j.subFilterColumnId;e.setColumnFilters(G=>{const z=G.filter(X=>X.id!==n.columnId&&X.id!==V);if(U){const X=$?P:[...P,j.value];z.push({id:n.columnId,value:X}),$||z.push({id:V,value:W.value})}else if(K===void 0)z.push({id:n.columnId,value:P}),z.push({id:V,value:q});else{const X=P.filter(ee=>ee!==j.value);X.length>0&&z.push({id:n.columnId,value:X})}return z})}}),v.jsx(is,{htmlFor:`${n.columnId}-${j.value}-${W.value}`,className:"flex-1 cursor-pointer truncate text-xs text-muted-foreground",children:W.label})]},W.value)})]},j.value)}):v.jsx("div",{className:"py-3 text-center text-xs text-muted-foreground",children:"No options found"})})]});case Bn.Search:const k=r&&String(r)||"";return v.jsx(ri,{ref:a,placeholder:`Search ${n.title.toLowerCase()}...`,value:k,onChange:j=>t==null?void 0:t.setFilterValue(j.target.value),onKeyDown:j=>{j.key==="Escape"&&(t==null||t.setFilterValue(void 0))},className:"h-8 w-full text-xs placeholder:text-muted-foreground/50"});default:return n.type}}function QAe(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,r)=>n===t[r])}function ZAe({table:e,filters:t,hiddenFilters:n,columnKeyToName:r,onResetFilters:o}){const i=e.getState().columnFilters,a=b.useMemo(()=>{var c;return((c=i==null?void 0:i.filter(d=>!(d.id===Gp&&QAe(d.value,Object.values(It))||d.id===Eee||d.id===Cee||d.id===Oee&&d.value!==!0||d.id===Ree&&d.value==="1d"||d.id===vb&&!d.value||d.id===bR||n.includes(d.id)||d.value===void 0||d.value===null||d.value===""||Array.isArray(d.value)&&d.value.length===0)))==null?void 0:c.length)||0},[n,i]),l=t.filter(c=>!n.includes(c.columnId)).length>0,u=e.getAllColumns().filter(c=>typeof c.accessorFn<"u"&&c.getCanHide()).length>0;return!l&&!u?null:v.jsxs(qL,{children:[v.jsx(UL,{asChild:!0,children:v.jsxs(xt,{variant:"outline",size:"sm",className:"flex-shrink-0",children:[v.jsx(s_e,{className:"size-4"}),v.jsx("span",{className:"cq-xl:inline ml-2 hidden text-sm",children:"Filters"}),a>0&&v.jsx(Ti,{variant:"secondary",className:"ml-2 px-1 py-0 text-xs",children:a}),v.jsx(TL,{className:"cq-xl:inline ml-2 hidden size-4"})]})}),v.jsx(mR,{align:"end",className:"max-h-[32rem] w-96 overflow-y-auto p-0 shadow-lg",children:v.jsx(Wte,{table:e,filters:t,hiddenFilters:n,columnKeyToName:r,showColumnVisibility:!0,onResetFilters:o,activeFiltersCount:a})})]})}function E9({table:e,filters:t,hiddenFilters:n,onResetFilters:r,activeFiltersCount:o=0}){const i=t.filter(a=>!n.includes(a.columnId));return v.jsxs("div",{className:"space-y-0",children:[r&&o>0&&v.jsx("div",{className:"border-b bg-muted/10 p-3",children:v.jsxs(xt,{variant:"outline",size:"sm",onClick:r,className:"w-full",children:[v.jsx(ty,{className:"mr-2 size-3"}),"Clear All Filters"]})}),v.jsx("div",{className:"max-h-96 overflow-y-auto",children:v.jsx("div",{className:"space-y-4 p-3",children:i.map((a,s)=>{var l;return v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("label",{className:"text-sm font-medium text-foreground",children:a.title}),((l=e.getColumn(a.columnId))==null?void 0:l.getFilterValue())!==void 0&&[Bn.Array,Bn.KeyValue,Bn.Checkbox,Bn.TimeRange,Bn.Radio].includes(a.type)&&v.jsx(xt,{variant:"icon",size:"xs",onClick:()=>{var u;return(u=e.getColumn(a.columnId))==null?void 0:u.setFilterValue(void 0)},children:v.jsx(ty,{className:"size-3"})})]}),v.jsx(XAe,{table:e,column:e.getColumn(a.columnId),filter:a}),stypeof n.accessorFn<"u"&&n.getCanHide()).map(n=>{const r=(t??{})[n.id]||n.id;return v.jsxs("div",{className:"flex items-center space-x-3 rounded-md px-2 py-2 transition-colors hover:bg-muted/50",children:[v.jsx(Hp,{id:`column-${n.id}`,checked:n.getIsVisible(),onCheckedChange:o=>n.toggleVisibility(!!o)}),v.jsx(is,{htmlFor:`column-${n.id}`,className:"flex-1 cursor-pointer truncate text-sm font-medium",children:r})]},n.id)})})}),v.jsx("div",{className:"border-t p-3",children:v.jsxs("div",{className:"flex w-full gap-1",children:[v.jsx(xt,{variant:"ghost",size:"sm",onClick:()=>e.toggleAllColumnsVisible(!1),className:"flex-1",children:"Hide All"}),v.jsx(xt,{variant:"ghost",size:"sm",onClick:()=>e.toggleAllColumnsVisible(!0),className:"flex-1",children:"Show All"})]})})]})}function Wte({table:e,filters:t,columnKeyToName:n,hiddenFilters:r,showColumnVisibility:o,onResetFilters:i,activeFiltersCount:a=0}){const[s,l]=b.useState("filters"),c=t.filter(p=>!r.includes(p.columnId)).length>0,d=e.getAllColumns().filter(p=>typeof p.accessorFn<"u"&&p.getCanHide()).length>0;return c&&d&&o?v.jsxs(rC,{value:s,onValueChange:p=>l(p),className:"w-full rounded-none p-0",children:[v.jsxs(Gw,{className:"grid w-full grid-cols-2 rounded-none bg-muted/30 px-2",children:[v.jsx(_a,{value:"filters",className:"text-xs font-medium data-[state=active]:bg-background data-[state=active]:text-foreground",children:v.jsxs("div",{className:"flex items-center gap-2",children:["Filters",a>0&&v.jsx(Ti,{variant:"secondary",className:"h-4 px-1.5 text-[10px] leading-none",children:a})]})}),v.jsx(_a,{value:"columns",className:"text-xs font-medium data-[state=active]:bg-background data-[state=active]:text-foreground",children:"Column Visibility"})]}),v.jsx(Ea,{value:"filters",className:"mt-0 space-y-0",children:v.jsx(E9,{table:e,filters:t,hiddenFilters:r,onResetFilters:i,activeFiltersCount:a})}),v.jsx(Ea,{value:"columns",className:"mt-0",children:v.jsx(C9,{table:e,columnKeyToName:n})})]}):v.jsx("div",{className:"w-full",children:c?v.jsx(E9,{table:e,filters:t,hiddenFilters:r,onResetFilters:i,activeFiltersCount:a}):d&&o?v.jsx(C9,{table:e,columnKeyToName:n}):v.jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:"No options available"})})}const JAe=({isRefetching:e,onRefetch:t})=>{const{userRefetchIntervalPreference:n,setRefetchInterval:r}=xf(),o=b.useMemo(()=>Object.entries(xw).map(([s,l])=>({key:s,...l})),[]),i=s=>{const u=xw[s];r(u)},a=b.useMemo(()=>{var s;return((s=Object.entries(xw).find(([,l])=>l.value===n.value))==null?void 0:s[0])||"off"},[n]);return v.jsxs("div",{className:"flex h-8 flex-row items-center",children:[v.jsxs(xt,{className:"flex h-full flex-row gap-x-2 rounded-l-md rounded-r-none pl-3",variant:"outline",onClick:t,children:[v.jsx(zX,{"data-is-refetching":e,className:"size-4 data-[is-refetching=true]:animate-spin"}),v.jsx("span",{className:"cq-xl:inline hidden",children:"Refresh"})]}),v.jsxs(w4,{value:a,onValueChange:i,children:[v.jsx(PR,{className:"flex h-full flex-row items-center gap-x-2 rounded-l-none rounded-r-md border-l-0 hover:bg-accent",children:a!=="off"&&v.jsx(x4,{})}),v.jsx(TR,{children:o.map(({key:s,label:l})=>v.jsx(wd,{value:s,children:l},s))})]})]})},eke={gitHub:e=>v.jsx("svg",{viewBox:"0 0 438.549 438.549",...e,children:v.jsx("path",{fill:"currentColor",d:"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"})}),google:e=>v.jsx("svg",{role:"img",viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"})}),spinner:e=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})};function Hte({className:e}){return v.jsx(eke.spinner,{className:je("mr-2 h-4 w-4 animate-spin",e)})}function Jy({className:e}){return v.jsx("div",{className:je("flex h-full w-full flex-1 flex-row",e),children:v.jsx(Hte,{})})}var iw={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */var tke=iw.exports,O9;function nke(){return O9||(O9=1,(function(e,t){(function(){var n,r="4.18.1",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",h=1,p=2,x=4,y=1,w=2,_=1,C=2,O=4,P=8,R=16,T=32,k=64,M=128,j=256,$=512,L=30,K="...",H=800,D=16,W=1,q=2,Y=3,U=1/0,V=9007199254740991,G=17976931348623157e292,z=NaN,X=4294967295,ee=X-1,ae=X>>>1,fe=[["ary",M],["bind",_],["bindKey",C],["curry",P],["curryRight",R],["flip",$],["partial",T],["partialRight",k],["rearg",j]],ie="[object Arguments]",we="[object Array]",de="[object AsyncFunction]",se="[object Boolean]",ye="[object Date]",Te="[object DOMException]",ge="[object Error]",Be="[object Function]",Ie="[object GeneratorFunction]",Ve="[object Map]",ht="[object Number]",lt="[object Null]",Ye="[object Object]",Kt="[object Promise]",vn="[object Proxy]",un="[object RegExp]",on="[object Set]",oe="[object String]",he="[object Symbol]",Se="[object Undefined]",Ge="[object WeakMap]",Qe="[object WeakSet]",Ke="[object ArrayBuffer]",nt="[object DataView]",At="[object Float32Array]",Rt="[object Float64Array]",an="[object Int8Array]",nr="[object Int16Array]",$n="[object Int32Array]",Mr="[object Uint8Array]",Ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",me="[object Uint32Array]",Ae=/\b__p \+= '';/g,Le=/\b(__p \+=) '' \+/g,ze=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,Ut=/[&<>"']/g,Sn=RegExp(Vt.source),at=RegExp(Ut.source),vt=/<%-([\s\S]+?)%>/g,Lt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,Jn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xr=/^\w*$/,na=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qr=/[\\^$.*+?()[\]{}|]/g,Js=RegExp(Qr.source),ko=/^\s+/,ra=/\s/,oa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ms=/\{\n\/\* \[wrapped with (.+)\] \*/,La=/,? & /,el=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ia=/[()=,{}\[\]\/\s]/,Ko=/\\(\\)?/g,$a=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gs=/\w*$/,tl=/^[-+]0x[0-9a-f]+$/i,Di=/^0b[01]+$/i,Fa=/^\[object .+?Constructor\]$/,Zl=/^0o[0-7]+$/i,nl=/^(?:0|[1-9]\d*)$/,li=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rl=/($^)/,dr=/['\n\r\u2028\u2029\\]/g,Jl="\\ud800-\\udfff",lc="\\u0300-\\u036f",ol="\\ufe20-\\ufe2f",eu="\\u20d0-\\u20ff",uc=lc+ol+eu,We="\\u2700-\\u27bf",gt="a-z\\xdf-\\xf6\\xf8-\\xff",nn="\\xac\\xb1\\xd7\\xf7",Wn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",il=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Li="A-Z\\xc0-\\xd6\\xd8-\\xde",$i="\\ufe0e\\ufe0f",No=nn+Wn+er+il,Yo="['’]",cc="["+Jl+"]",fc="["+No+"]",Of="["+uc+"]",Mm="\\d+",tu="["+We+"]",Rf="["+gt+"]",Ba="[^"+Jl+No+Mm+We+gt+Li+"]",al="\\ud83c[\\udffb-\\udfff]",mh="(?:"+Of+"|"+al+")",pn="[^"+Jl+"]",Fn="(?:\\ud83c[\\udde6-\\uddff]){2}",Fr="[\\ud800-\\udbff][\\udc00-\\udfff]",ir="["+Li+"]",sl="\\u200d",vs="(?:"+Rf+"|"+Ba+")",Pf="(?:"+ir+"|"+Ba+")",dc="(?:"+Yo+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+Yo+"(?:D|LL|M|RE|S|T|VE))?",Dt=mh+"?",rn="["+$i+"]?",En="(?:"+sl+"(?:"+[pn,Fn,Fr].join("|")+")"+rn+Dt+")*",Rr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ys="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nu=rn+Dt+En,ru="(?:"+[tu,Fn,Fr].join("|")+")"+nu,xP="(?:"+[pn+Of+"?",Of,Fn,Fr,cc].join("|")+")",$b=RegExp(Yo,"g"),gh=RegExp(Of,"g"),h0=RegExp(al+"(?="+al+")|"+xP+nu,"g"),Fb=RegExp([ir+"?"+Rf+"+"+dc+"(?="+[fc,ir,"$"].join("|")+")",Pf+"+"+Et+"(?="+[fc,ir+vs,"$"].join("|")+")",ir+"?"+vs+"+"+dc,ir+"+"+Et,ys,Rr,Mm,ru].join("|"),"g"),jm=RegExp("["+sl+Jl+uc+$i+"]"),Bb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bP=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vh=-1,rr={};rr[At]=rr[Rt]=rr[an]=rr[nr]=rr[$n]=rr[Mr]=rr[Ee]=rr[Ce]=rr[me]=!0,rr[ie]=rr[we]=rr[Ke]=rr[se]=rr[nt]=rr[ye]=rr[ge]=rr[Be]=rr[Ve]=rr[ht]=rr[Ye]=rr[un]=rr[on]=rr[oe]=rr[Ge]=!1;var Xn={};Xn[ie]=Xn[we]=Xn[Ke]=Xn[nt]=Xn[se]=Xn[ye]=Xn[At]=Xn[Rt]=Xn[an]=Xn[nr]=Xn[$n]=Xn[Ve]=Xn[ht]=Xn[Ye]=Xn[un]=Xn[on]=Xn[oe]=Xn[he]=Xn[Mr]=Xn[Ee]=Xn[Ce]=Xn[me]=!0,Xn[ge]=Xn[Be]=Xn[Ge]=!1;var Im={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},SP={"&":"&","<":"<",">":">",'"':""","'":"'"},_P={"&":"&","<":"<",">":">",""":'"',"'":"'"},p0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dm=parseFloat,m0=parseInt,g0=typeof qu=="object"&&qu&&qu.Object===Object&&qu,ou=typeof self=="object"&&self&&self.Object===Object&&self,Zr=g0||ou||Function("return this")(),Tf=t&&!t.nodeType&&t,iu=Tf&&!0&&e&&!e.nodeType&&e,yh=iu&&iu.exports===Tf,Af=yh&&g0.process,Fi=(function(){try{var be=iu&&iu.require&&iu.require("util").types;return be||Af&&Af.binding&&Af.binding("util")}catch{}})(),ui=Fi&&Fi.isArrayBuffer,hc=Fi&&Fi.isDate,Lm=Fi&&Fi.isMap,kf=Fi&&Fi.isRegExp,zb=Fi&&Fi.isSet,$m=Fi&&Fi.isTypedArray;function Xo(be,Me,Ne){switch(Ne.length){case 0:return be.call(Me);case 1:return be.call(Me,Ne[0]);case 2:return be.call(Me,Ne[0],Ne[1]);case 3:return be.call(Me,Ne[0],Ne[1],Ne[2])}return be.apply(Me,Ne)}function wh(be,Me,Ne,mt){for(var sn=-1,Hn=be==null?0:be.length;++sn-1}function xh(be,Me,Ne){for(var mt=-1,sn=be==null?0:be.length;++mt-1;);return Ne}function _0(be,Me){for(var Ne=be.length;Ne--&&lu(Me,be[Ne],0)>-1;);return Ne}function Xb(be,Me){for(var Ne=be.length,mt=0;Ne--;)be[Ne]===Me&&++mt;return mt}var Qb=w0(Im),Zb=w0(SP);function Nf(be){return"\\"+p0[be]}function AP(be,Me){return be==null?n:be[Me]}function Mf(be){return jm.test(be)}function kP(be){return Bb.test(be)}function Jb(be){for(var Me,Ne=[];!(Me=be.next()).done;)Ne.push(Me.value);return Ne}function qm(be){var Me=-1,Ne=Array(be.size);return be.forEach(function(mt,sn){Ne[++Me]=[sn,mt]}),Ne}function jf(be,Me){return function(Ne){return be(Me(Ne))}}function aa(be,Me){for(var Ne=-1,mt=be.length,sn=0,Hn=[];++Ne-1}function Qm(g,S){var N=this.__data__,F=Do(N,g);return F<0?(++this.size,N.push([g,S])):N[F][1]=S,this}fi.prototype.clear=di,fi.prototype.delete=Xm,fi.prototype.get=fS,fi.prototype.has=dS,fi.prototype.set=Qm;function xs(g){var S=-1,N=g==null?0:g.length;for(this.clear();++S=S?g:S)),g}function zi(g,S,N,F,Q,ne){var ce,ve=S&h,_e=S&p,$e=S&x;if(N&&(ce=Q?N(g,F,Q,ne):N(g)),ce!==n)return ce;if(!jr(g))return g;var Fe=mn(g);if(Fe){if(ce=Fo(g),!ve)return Jo(g,ce)}else{var He=uo(g),ct=He==Be||He==Ie;if(sd(g))return fg(g,ve);if(He==Ye||He==ie||ct&&!Q){if(ce=_e||ct?{}:NS(g),!ve)return _e?zP(g,mS(ce,g)):BP(g,fa(ce,g))}else{if(!Xn[He])return Q?g:{};ce=qP(g,He,ve)}}ne||(ne=new pi);var Nt=ne.get(g);if(Nt)return Nt;ne.set(g,ce),$8(g)?g.forEach(function(Wt){ce.add(zi(Wt,S,N,Wt,g,ne))}):D8(g)&&g.forEach(function(Wt,In){ce.set(In,zi(Wt,S,N,In,g,ne))});var en=$e?_e?Sg:np:_e?ya:Uo,_n=Fe?n:en(g);return Mo(_n||g,function(Wt,In){_n&&(In=Wt,Wt=g[In]),xo(ce,In,zi(Wt,S,N,In,g,ne))}),ce}function eg(g){var S=Uo(g);return function(N){return M0(N,g,S)}}function M0(g,S,N){var F=N.length;if(g==null)return!F;for(g=or(g);F--;){var Q=N[F],ne=S[Q],ce=g[Q];if(ce===n&&!(Q in g)||!ne(ce))return!1}return!0}function bc(g,S,N){if(typeof g!="function")throw new yo(a);return ei(function(){g.apply(n,N)},S)}function Sc(g,S,N,F){var Q=-1,ne=Fm,ce=!0,ve=g.length,_e=[],$e=S.length;if(!ve)return _e;N&&(S=yr(S,Qo(N))),F?(ne=xh,ce=!1):S.length>=o&&(ne=bh,ce=!1,S=new hi(S));e:for(;++QQ?0:Q+N),F=F===n||F>Q?Q:wn(F),F<0&&(F+=Q),F=N>F?0:B8(F);N0&&N(ve)?S>1?lo(ve,S-1,N,F,Q):su(Q,ve):F||(Q[Q.length]=ve)}return Q}var Gf=Jh(),Bh=Jh(!0);function Zo(g,S){return g&&Gf(g,S,Uo)}function zh(g,S){return g&&Bh(g,S,Uo)}function Kf(g,S){return au(S,function(N){return $c(g[N])})}function hl(g,S){S=gl(S,g);for(var N=0,F=S.length;g!=null&&NS}function Ec(g,S){return g!=null&&jn.call(g,S)}function j0(g,S){return g!=null&&S in or(g)}function vS(g,S,N){return g>=jo(S,N)&&g=120&&Fe.length>=120)?new hi(ce&&Fe):n}Fe=g[0];var He=-1,ct=ve[0];e:for(;++He-1;)ve!==g&&Hm.call(ve,_e,1),Hm.call(g,_e,1);return g}function Gh(g,S){for(var N=g?S.length:0,F=N-1;N--;){var Q=S[N];if(N==F||Q!==ne){var ne=Q;wl(Q)?Hm.call(g,Q,1):ug(g,Q)}}return g}function Rc(g,S){return g+Ph(Nh()*(S-g+1))}function Kh(g,S,N,F){for(var Q=-1,ne=Jr(du((S-g)/(N||1)),0),ce=Ne(ne);ne--;)ce[F?ne:++Q]=g,g+=N;return ce}function L0(g,S){var N="";if(!g||S<1||S>V)return N;do S%2&&(N+=g),S=Ph(S/2),S&&(g+=g);while(S);return N}function $t(g,S){return Pg(co(g,S,wa),g+"")}function $0(g){return yu(Wg(g))}function F0(g,S){var N=Wg(g);return ip(N,dl(S,0,N.length))}function Pc(g,S,N,F){if(!jr(g))return g;S=gl(S,g);for(var Q=-1,ne=S.length,ce=ne-1,ve=g;ve!=null&&++QQ?0:Q+S),N=N>Q?Q:N,N<0&&(N+=Q),Q=S>N?0:N-S>>>0,S>>>=0;for(var ne=Ne(Q);++F>>1,ce=g[ne];ce!==null&&!Ga(ce)&&(N?ce<=S:ce=o){var $e=S?null:OS(g);if($e)return Um($e);ce=!1,Q=bh,_e=new hi}else _e=S?[]:ve;e:for(;++F=F?g:gi(g,S,N)}var W0=gr||function(g){return Zr.clearTimeout(g)};function fg(g,S){if(S)return g.slice();var N=g.length,F=ul?ul(N):new g.constructor(N);return g.copy(F),F}function dg(g){var S=new g.constructor(g.byteLength);return new Ch(S).set(new Ch(g)),S}function xS(g,S){var N=S?dg(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.byteLength)}function bS(g){var S=new g.constructor(g.source,gs.exec(g));return S.lastIndex=g.lastIndex,S}function $P(g){return yc?or(yc.call(g)):{}}function H0(g,S){var N=S?dg(g.buffer):g.buffer;return new g.constructor(N,g.byteOffset,g.length)}function SS(g,S){if(g!==S){var N=g!==n,F=g===null,Q=g===g,ne=Ga(g),ce=S!==n,ve=S===null,_e=S===S,$e=Ga(S);if(!ve&&!$e&&!ne&&g>S||ne&&ce&&_e&&!ve&&!$e||F&&ce&&_e||!N&&_e||!Q)return 1;if(!F&&!ne&&!$e&&g=ve)return _e;var $e=N[F];return _e*($e=="desc"?-1:1)}}return g.index-S.index}function G0(g,S,N,F){for(var Q=-1,ne=g.length,ce=N.length,ve=-1,_e=S.length,$e=Jr(ne-ce,0),Fe=Ne(_e+$e),He=!F;++ve<_e;)Fe[ve]=S[ve];for(;++Q1?N[Q-1]:n,ce=Q>2?N[2]:n;for(ne=g.length>3&&typeof ne=="function"?(Q--,ne):n,ce&&st(N[0],N[1],ce)&&(ne=Q<3?n:ne,Q=1),S=or(S);++F-1?Q[ne?S[ce]:ce]:n}}function gg(g){return Va(function(S){var N=S.length,F=N,Q=wo.prototype.thru;for(g&&S.reverse();F--;){var ne=S[F];if(typeof ne!="function")throw new yo(a);if(Q&&!ce&&kc(ne)=="wrapper")var ce=new wo([],!0)}for(F=ce?F:N;++F1&&Un.reverse(),Fe&&_eve))return!1;var $e=ne.get(g),Fe=ne.get(S);if($e&&Fe)return $e==S&&Fe==g;var He=-1,ct=!0,Nt=N&w?new hi:n;for(ne.set(g,S),ne.set(S,g);++He1?"& ":"")+S[F],S=S.join(N>2?", ":" "),g.replace(oa,`{ -/* [wrapped with `+S+`] */ -`)}function Bo(g){return mn(g)||dp(g)||!!($f&&g&&g[$f])}function wl(g,S){var N=typeof g;return S=S??V,!!S&&(N=="number"||N!="symbol"&&nl.test(g))&&g>-1&&g%1==0&&g0){if(++S>=H)return arguments[0]}else S=0;return g.apply(n,arguments)}}function ip(g,S){var N=-1,F=g.length,Q=F-1;for(S=S===n?F:S;++N1?g[S-1]:n;return N=typeof N=="function"?(g.pop(),N):n,US(g,N)});function GS(g){var S=te(g);return S.__chain__=!0,S}function Mu(g,S){return S(g),g}function Dc(g,S){return S(g)}var Lc=Va(function(g){var S=g.length,N=S?g[0]:0,F=this.__wrapped__,Q=function(ne){return $h(ne,g)};return S>1||this.__actions__.length||!(F instanceof yn)||!wl(N)?this.thru(Q):(F=F.slice(N,+N+(S?1:0)),F.__actions__.push({func:Dc,args:[Q],thisArg:n}),new wo(F,this.__chain__).thru(function(ne){return S&&!ne.length&&ne.push(n),ne}))});function Dg(){return GS(this)}function g1(){return new wo(this.value(),this.__chain__)}function v1(){this.__values__===n&&(this.__values__=F8(this.value()));var g=this.__index__>=this.__values__.length,S=g?n:this.__values__[this.__index__++];return{done:g,value:S}}function ZP(){return this}function y1(g){for(var S,N=this;N instanceof mu;){var F=ap(N);F.__index__=0,F.__values__=n,S?Q.__wrapped__=F:S=F;var Q=F;N=N.__wrapped__}return Q.__wrapped__=g,S}function JP(){var g=this.__wrapped__;if(g instanceof yn){var S=g;return this.__actions__.length&&(S=new yn(this)),S=S.reverse(),S.__actions__.push({func:Dc,args:[up],thisArg:n}),new wo(S,this.__chain__)}return this.thru(up)}function KS(){return V0(this.__wrapped__,this.__actions__)}var YS=hg(function(g,S,N){jn.call(g,N)?++g[N]:za(g,N,1)});function Lg(g,S,N){var F=mn(g)?Ub:tg;return N&&st(g,S,N)&&(S=n),F(g,Bt(S,3))}function $g(g,S){var N=mn(g)?au:_c;return N(g,Bt(S,3))}var XS=mg(lp),w1=mg(Tg);function eT(g,S){return lo(qg(g,S),1)}function QS(g,S){return lo(qg(g,S),U)}function x1(g,S,N){return N=N===n?1:wn(N),lo(qg(g,S),N)}function cp(g,S){var N=mn(g)?Mo:wu;return N(g,Bt(S,3))}function Fg(g,S){var N=mn(g)?qb:Hf;return N(g,Bt(S,3))}var Bg=hg(function(g,S,N){jn.call(g,N)?g[N].push(S):za(g,N,[S])});function ZS(g,S,N,F){g=va(g)?g:Wg(g),N=N&&!F?wn(N):0;var Q=g.length;return N<0&&(N=Jr(Q+N,0)),e_(g)?N<=Q&&g.indexOf(S,N)>-1:!!Q&&lu(g,S,N)>-1}var tT=$t(function(g,S,N){var F=-1,Q=typeof S=="function",ne=va(g)?Ne(g.length):[];return wu(g,function(ce){ne[++F]=Q?Xo(S,ce,N):Cc(ce,S,N)}),ne}),zg=hg(function(g,S,N){za(g,N,S)});function qg(g,S){var N=mn(g)?yr:ag;return N(g,Bt(S,3))}function fp(g,S,N,F){return g==null?[]:(mn(S)||(S=S==null?[]:[S]),N=F?n:N,mn(N)||(N=N==null?[]:[N]),sg(g,S,N))}var nT=hg(function(g,S,N){g[N?0:1].push(S)},function(){return[[],[]]});function Ug(g,S,N){var F=mn(g)?v0:Kb,Q=arguments.length<3;return F(g,Bt(S,4),N,Q,wu)}function f(g,S,N){var F=mn(g)?EP:Kb,Q=arguments.length<3;return F(g,Bt(S,4),N,Q,Hf)}function m(g,S){var N=mn(g)?au:_c;return N(g,_t(Bt(S,3)))}function E(g){var S=mn(g)?yu:$0;return S(g)}function A(g,S,N){(N?st(g,S,N):S===n)?S=1:S=wn(S);var F=mn(g)?pS:F0;return F(g,S)}function I(g){var S=mn(g)?N0:Yh;return S(g)}function B(g){if(g==null)return 0;if(va(g))return e_(g)?uu(g):g.length;var S=uo(g);return S==Ve||S==on?g.size:Vh(g).length}function Z(g,S,N){var F=mn(g)?y0:B0;return N&&st(g,S,N)&&(S=n),F(g,Bt(S,3))}var le=$t(function(g,S){if(g==null)return[];var N=S.length;return N>1&&st(g,S[0],S[1])?S=[]:N>2&&st(S[0],S[1],S[2])&&(S=[S[0]]),sg(g,lo(S,1),[])}),pe=P0||function(){return Zr.Date.now()};function ke(g,S){if(typeof S!="function")throw new yo(a);return g=wn(g),function(){if(--g<1)return S.apply(this,arguments)}}function Ue(g,S,N){return S=N?n:S,S=g&&S==null?g.length:S,_s(g,M,n,n,n,n,S)}function Xe(g,S){var N;if(typeof S!="function")throw new yo(a);return g=wn(g),function(){return--g>0&&(N=S.apply(this,arguments)),g<=1&&(S=n),N}}var qe=$t(function(g,S,N){var F=_;if(N.length){var Q=aa(N,ed(qe));F|=T}return _s(g,F,S,N,Q)}),dt=$t(function(g,S,N){var F=_|C;if(N.length){var Q=aa(N,ed(dt));F|=T}return _s(S,F,g,N,Q)});function yt(g,S,N){S=N?n:S;var F=_s(g,P,n,n,n,n,n,S);return F.placeholder=yt.placeholder,F}function St(g,S,N){S=N?n:S;var F=_s(g,R,n,n,n,n,n,S);return F.placeholder=St.placeholder,F}function Ar(g,S,N){var F,Q,ne,ce,ve,_e,$e=0,Fe=!1,He=!1,ct=!0;if(typeof g!="function")throw new yo(a);S=Os(S)||0,jr(N)&&(Fe=!!N.leading,He="maxWait"in N,ne=He?Jr(Os(N.maxWait)||0,S):ne,ct="trailing"in N?!!N.trailing:ct);function Nt(oo){var bl=F,Bc=Q;return F=Q=n,$e=oo,ce=g.apply(Bc,bl),ce}function en(oo){return $e=oo,ve=ei(In,S),Fe?Nt(oo):ce}function _n(oo){var bl=oo-_e,Bc=oo-$e,J8=S-bl;return He?jo(J8,ne-Bc):J8}function Wt(oo){var bl=oo-_e,Bc=oo-$e;return _e===n||bl>=S||bl<0||He&&Bc>=ne}function In(){var oo=pe();if(Wt(oo))return Un(oo);ve=ei(In,_n(oo))}function Un(oo){return ve=n,ct&&F?Nt(oo):(F=Q=n,ce)}function Ka(){ve!==n&&W0(ve),$e=0,F=_e=Q=ve=n}function Vi(){return ve===n?ce:Un(pe())}function Ya(){var oo=pe(),bl=Wt(oo);if(F=arguments,Q=this,_e=oo,bl){if(ve===n)return en(_e);if(He)return W0(ve),ve=ei(In,S),Nt(_e)}return ve===n&&(ve=ei(In,S)),ce}return Ya.cancel=Ka,Ya.flush=Vi,Ya}var Oe=$t(function(g,S){return bc(g,1,S)}),xe=$t(function(g,S,N){return bc(g,Os(S)||0,N)});function Pe(g){return _s(g,$)}function Ze(g,S){if(typeof g!="function"||S!=null&&typeof S!="function")throw new yo(a);var N=function(){var F=arguments,Q=S?S.apply(this,F):F[0],ne=N.cache;if(ne.has(Q))return ne.get(Q);var ce=g.apply(this,F);return N.cache=ne.set(Q,ce)||ne,ce};return N.cache=new(Ze.Cache||xs),N}Ze.Cache=xs;function _t(g){if(typeof g!="function")throw new yo(a);return function(){var S=arguments;switch(S.length){case 0:return!g.call(this);case 1:return!g.call(this,S[0]);case 2:return!g.call(this,S[0],S[1]);case 3:return!g.call(this,S[0],S[1],S[2])}return!g.apply(this,S)}}function zt(g){return Xe(2,g)}var qt=wS(function(g,S){S=S.length==1&&mn(S[0])?yr(S[0],Qo(Bt())):yr(lo(S,1),Qo(Bt()));var N=S.length;return $t(function(F){for(var Q=-1,ne=jo(F.length,N);++Q=S}),dp=I0((function(){return arguments})())?I0:function(g){return Vr(g)&&jn.call(g,"callee")&&!aS.call(g,"callee")},mn=Ne.isArray,Lue=ui?Qo(ui):pl;function va(g){return g!=null&&JS(g.length)&&!$c(g)}function ro(g){return Vr(g)&&va(g)}function $ue(g){return g===!0||g===!1||Vr(g)&&zr(g)==se}var sd=Ah||mT,Fue=hc?Qo(hc):bu;function Bue(g){return Vr(g)&&g.nodeType===1&&!b1(g)}function zue(g){if(g==null)return!0;if(va(g)&&(mn(g)||typeof g=="string"||typeof g.splice=="function"||sd(g)||Vg(g)||dp(g)))return!g.length;var S=uo(g);if(S==Ve||S==on)return!g.size;if(Ou(g))return!Vh(g).length;for(var N in g)if(jn.call(g,N))return!1;return!0}function que(g,S){return Su(g,S)}function Uue(g,S,N){N=typeof N=="function"?N:n;var F=N?N(g,S):n;return F===n?Su(g,S,n,N):!!F}function oT(g){if(!Vr(g))return!1;var S=zr(g);return S==ge||S==Te||typeof g.message=="string"&&typeof g.name=="string"&&!b1(g)}function Vue(g){return typeof g=="number"&&kh(g)}function $c(g){if(!jr(g))return!1;var S=zr(g);return S==Be||S==Ie||S==de||S==vn}function I8(g){return typeof g=="number"&&g==wn(g)}function JS(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=V}function jr(g){var S=typeof g;return g!=null&&(S=="object"||S=="function")}function Vr(g){return g!=null&&typeof g=="object"}var D8=Lm?Qo(Lm):rg;function Wue(g,S){return g===S||og(g,S,_g(S))}function Hue(g,S,N){return N=typeof N=="function"?N:n,og(g,S,_g(S),N)}function Gue(g){return L8(g)&&g!=+g}function Kue(g){if(op(g))throw new sn(i);return Yf(g)}function Yue(g){return g===null}function Xue(g){return g==null}function L8(g){return typeof g=="number"||Vr(g)&&zr(g)==ht}function b1(g){if(!Vr(g)||zr(g)!=Ye)return!1;var S=Lf(g);if(S===null)return!0;var N=jn.call(S,"constructor")&&S.constructor;return typeof N=="function"&&N instanceof N&&mc.call(N)==rS}var iT=kf?Qo(kf):Ss;function Que(g){return I8(g)&&g>=-V&&g<=V}var $8=zb?Qo(zb):qh;function e_(g){return typeof g=="string"||!mn(g)&&Vr(g)&&zr(g)==oe}function Ga(g){return typeof g=="symbol"||Vr(g)&&zr(g)==he}var Vg=$m?Qo($m):Uh;function Zue(g){return g===n}function Jue(g){return Vr(g)&&uo(g)==Ge}function ece(g){return Vr(g)&&zr(g)==Qe}var tce=bo(ig),nce=bo(function(g,S){return g<=S});function F8(g){if(!g)return[];if(va(g))return e_(g)?Bi(g):Jo(g);if(Oh&&g[Oh])return Jb(g[Oh]());var S=uo(g),N=S==Ve?qm:S==on?Um:Wg;return N(g)}function Fc(g){if(!g)return g===0?g:0;if(g=Os(g),g===U||g===-U){var S=g<0?-1:1;return S*G}return g===g?g:0}function wn(g){var S=Fc(g),N=S%1;return S===S?N?S-N:S:0}function B8(g){return g?dl(wn(g),0,X):0}function Os(g){if(typeof g=="number")return g;if(Ga(g))return z;if(jr(g)){var S=typeof g.valueOf=="function"?g.valueOf():g;g=jr(S)?S+"":S}if(typeof g!="string")return g===0?g:+g;g=Yb(g);var N=Di.test(g);return N||Zl.test(g)?m0(g.slice(2),N?2:8):tl.test(g)?z:+g}function z8(g){return qi(g,ya(g))}function rce(g){return g?dl(wn(g),-V,V):g===0?g:0}function ar(g){return g==null?"":vi(g)}var oce=Lo(function(g,S){if(Ou(S)||va(S)){qi(S,Uo(S),g);return}for(var N in S)jn.call(S,N)&&xo(g,N,S[N])}),q8=Lo(function(g,S){qi(S,ya(S),g)}),U8=Lo(function(g,S,N,F){qi(S,ya(S),g,F)}),aT=Lo(function(g,S,N,F){qi(S,Uo(S),g,F)}),ice=Va($h);function ace(g,S){var N=la(g);return S==null?N:fa(N,S)}var sce=$t(function(g,S){g=or(g);var N=-1,F=S.length,Q=F>2?S[2]:n;for(Q&&st(S[0],S[1],Q)&&(F=1);++N1),ne}),qi(g,Sg(g),N),F&&(N=zi(N,h|p|x,RS));for(var Q=S.length;Q--;)ug(N,S[Q]);return N});function Cce(g,S){return W8(g,_t(Bt(S)))}var Oce=Va(function(g,S){return g==null?{}:Oc(g,S)});function W8(g,S){if(g==null)return{};var N=yr(Sg(g),function(F){return[F]});return S=Bt(S),br(g,N,function(F,Q){return S(F,Q[0])})}function Rce(g,S,N){S=gl(S,g);var F=-1,Q=S.length;for(Q||(Q=1,g=n);++FS){var F=g;g=S,S=F}if(N||g%1||S%1){var Q=Nh();return jo(g+Q*(S-g+Dm("1e-"+((Q+"").length-1))),S)}return Rc(g,S)}var $ce=Tc(function(g,S,N){return S=S.toLowerCase(),g+(N?K8(S):S)});function K8(g){return uT(ar(g).toLowerCase())}function Y8(g){return g=ar(g),g&&g.replace(li,Qb).replace(gh,"")}function Fce(g,S,N){g=ar(g),S=vi(S);var F=g.length;N=N===n?F:dl(wn(N),0,F);var Q=N;return N-=S.length,N>=0&&g.slice(N,Q)==S}function Bce(g){return g=ar(g),g&&at.test(g)?g.replace(Ut,Zb):g}function zce(g){return g=ar(g),g&&Js.test(g)?g.replace(Qr,"\\$&"):g}var qce=Tc(function(g,S,N){return g+(N?"-":"")+S.toLowerCase()}),Uce=Tc(function(g,S,N){return g+(N?" ":"")+S.toLowerCase()}),Vce=Y0("toLowerCase");function Wce(g,S,N){g=ar(g),S=wn(S);var F=S?uu(g):0;if(!S||F>=S)return g;var Q=(S-F)/2;return tp(Ph(Q),N)+g+tp(du(Q),N)}function Hce(g,S,N){g=ar(g),S=wn(S);var F=S?uu(g):0;return S&&F>>0,N?(g=ar(g),g&&(typeof S=="string"||S!=null&&!iT(S))&&(S=vi(S),!S&&Mf(g))?vl(Bi(g),0,N):g.split(S,N)):[]}var Jce=Tc(function(g,S,N){return g+(N?" ":"")+uT(S)});function efe(g,S,N){return g=ar(g),N=N==null?0:dl(wn(N),0,g.length),S=vi(S),g.slice(N,N+S.length)==S}function tfe(g,S,N){var F=te.templateSettings;N&&st(g,S,N)&&(S=n),g=ar(g),S=aT({},S,F,Z0);var Q=aT({},S.imports,F.imports,Z0),ne=Uo(Q),ce=pc(Q,ne);Mo(ne,function(Wt){if(ia.test(Wt))throw new sn(l)});var ve,_e,$e=0,Fe=S.interpolate||rl,He="__p += '",ct=C0((S.escape||rl).source+"|"+Fe.source+"|"+(Fe===kt?$a:rl).source+"|"+(S.evaluate||rl).source+"|$","g"),Nt="//# sourceURL="+(jn.call(S,"sourceURL")?(S.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vh+"]")+` -`;g.replace(ct,function(Wt,In,Un,Ka,Vi,Ya){return Un||(Un=Ka),He+=g.slice($e,Ya).replace(dr,Nf),In&&(ve=!0,He+=`' + -__e(`+In+`) + -'`),Vi&&(_e=!0,He+=`'; -`+Vi+`; -__p += '`),Un&&(He+=`' + -((__t = (`+Un+`)) == null ? '' : __t) + -'`),$e=Ya+Wt.length,Wt}),He+=`'; -`;var en=jn.call(S,"variable")&&S.variable;if(!en)He=`with (obj) { -`+He+` -} -`;else if(ia.test(en))throw new sn(s);He=(_e?He.replace(Ae,""):He).replace(Le,"$1").replace(ze,"$1;"),He="function("+(en||"obj")+`) { -`+(en?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(_e?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+He+`return __p -}`;var _n=Q8(function(){return Hn(ne,Nt+"return "+He).apply(n,ce)});if(_n.source=He,oT(_n))throw _n;return _n}function nfe(g){return ar(g).toLowerCase()}function rfe(g){return ar(g).toUpperCase()}function ofe(g,S,N){if(g=ar(g),g&&(N||S===n))return Yb(g);if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=Bi(S),ne=S0(F,Q),ce=_0(F,Q)+1;return vl(F,ne,ce).join("")}function ife(g,S,N){if(g=ar(g),g&&(N||S===n))return g.slice(0,E0(g)+1);if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=_0(F,Bi(S))+1;return vl(F,0,Q).join("")}function afe(g,S,N){if(g=ar(g),g&&(N||S===n))return g.replace(ko,"");if(!g||!(S=vi(S)))return g;var F=Bi(g),Q=S0(F,Bi(S));return vl(F,Q).join("")}function sfe(g,S){var N=L,F=K;if(jr(S)){var Q="separator"in S?S.separator:Q;N="length"in S?wn(S.length):N,F="omission"in S?vi(S.omission):F}g=ar(g);var ne=g.length;if(Mf(g)){var ce=Bi(g);ne=ce.length}if(N>=ne)return g;var ve=N-uu(F);if(ve<1)return F;var _e=ce?vl(ce,0,ve).join(""):g.slice(0,ve);if(Q===n)return _e+F;if(ce&&(ve+=_e.length-ve),iT(Q)){if(g.slice(ve).search(Q)){var $e,Fe=_e;for(Q.global||(Q=C0(Q.source,ar(gs.exec(Q))+"g")),Q.lastIndex=0;$e=Q.exec(Fe);)var He=$e.index;_e=_e.slice(0,He===n?ve:He)}}else if(g.indexOf(vi(Q),ve)!=ve){var ct=_e.lastIndexOf(Q);ct>-1&&(_e=_e.slice(0,ct))}return _e+F}function lfe(g){return g=ar(g),g&&Sn.test(g)?g.replace(Vt,tS):g}var ufe=Tc(function(g,S,N){return g+(N?" ":"")+S.toUpperCase()}),uT=Y0("toUpperCase");function X8(g,S,N){return g=ar(g),S=N?n:S,S===n?kP(g)?jP(g):OP(g):g.match(S)||[]}var Q8=$t(function(g,S){try{return Xo(g,n,S)}catch(N){return oT(N)?N:new sn(N)}}),cfe=Va(function(g,S){return Mo(S,function(N){N=pa(N),za(g,N,qe(g[N],g))}),g});function ffe(g){var S=g==null?0:g.length,N=Bt();return g=S?yr(g,function(F){if(typeof F[1]!="function")throw new yo(a);return[N(F[0]),F[1]]}):[],$t(function(F){for(var Q=-1;++QV)return[];var N=X,F=jo(g,X);S=Bt(S),g-=X;for(var Q=b0(F,S);++N0||S<0)?new yn(N):(g<0?N=N.takeRight(-g):g&&(N=N.drop(g)),S!==n&&(S=wn(S),N=S<0?N.dropRight(-S):N.take(S-g)),N)},yn.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},yn.prototype.toArray=function(){return this.take(X)},Zo(yn.prototype,function(g,S){var N=/^(?:filter|find|map|reject)|While$/.test(S),F=/^(?:head|last)$/.test(S),Q=te[F?"take"+(S=="last"?"Right":""):S],ne=F||/^find/.test(S);Q&&(te.prototype[S]=function(){var ce=this.__wrapped__,ve=F?[1]:arguments,_e=ce instanceof yn,$e=ve[0],Fe=_e||mn(ce),He=function(In){var Un=Q.apply(te,su([In],ve));return F&&ct?Un[0]:Un};Fe&&N&&typeof $e=="function"&&$e.length!=1&&(_e=Fe=!1);var ct=this.__chain__,Nt=!!this.__actions__.length,en=ne&&!ct,_n=_e&&!Nt;if(!ne&&Fe){ce=_n?ce:new yn(this);var Wt=g.apply(ce,ve);return Wt.__actions__.push({func:Dc,args:[He],thisArg:n}),new wo(Wt,ct)}return en&&_n?g.apply(this,ve):(Wt=this.thru(He),en?F?Wt.value()[0]:Wt.value():Wt)})}),Mo(["pop","push","shift","sort","splice","unshift"],function(g){var S=Df[g],N=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",F=/^(?:pop|shift)$/.test(g);te.prototype[g]=function(){var Q=arguments;if(F&&!this.__chain__){var ne=this.value();return S.apply(mn(ne)?ne:[],Q)}return this[N](function(ce){return S.apply(mn(ce)?ce:[],Q)})}}),Zo(yn.prototype,function(g,S){var N=te[S];if(N){var F=N.name+"";jn.call(hu,F)||(hu[F]=[]),hu[F].push({name:S,func:N})}}),hu[vg(n,C).name]=[{name:"wrapper",func:n}],yn.prototype.clone=A0,yn.prototype.reverse=Uf,yn.prototype.value=gu,te.prototype.at=Lc,te.prototype.chain=Dg,te.prototype.commit=g1,te.prototype.next=v1,te.prototype.plant=y1,te.prototype.reverse=JP,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=KS,te.prototype.first=te.prototype.head,Oh&&(te.prototype[Oh]=ZP),te}),If=IP();iu?((iu.exports=If)._=If,Tf._=If):Zr._=If}).call(tke)})(iw,iw.exports)),iw.exports}var bD=nke();const Gte=()=>{const{tenantId:e}=ds(),{toast:t}=wL(),{handleApiError:n}=tR({}),r=b.useCallback(l=>{t({title:`${bD.capitalize(l)} request submitted`,description:`No need to hit '${bD.capitalize(l)}' again.`})},[t]),o=b.useCallback((l,u)=>{const c=l==="cancel"?"Canceling":"Replaying",d=u.length,h=t({title:`${c} ${d} task run${d>1?"s":""}`,description:`This may take a few seconds. You don't need to hit ${l} again.`});setTimeout(()=>{h.dismiss()},5e3)},[t]),{mutateAsync:i}=Ir({mutationKey:["task-run:action"],mutationFn:async l=>{const u=l.actionType;switch(u){case"cancel":return ot.v1TaskCancel(e,l);case"replay":return ot.v1TaskReplay(e,l);default:const c=u;throw new Error(`Unhandled action type: ${c}`)}},onError:n,onMutate:l=>{r(l.actionType)}}),a=b.useCallback(async l=>{var c;const u=await i(l);(c=u.data)!=null&&c.ids&&o(l.actionType,u.data.ids)},[i,o]);return{handleTaskRunAction:b.useCallback(l=>{var u;(u=l.externalIds)!=null&&u.length?a({actionType:l.actionType,externalIds:l.externalIds}):l.filter&&Object.values(l.filter).some(c=>!!c)&&a({actionType:l.actionType,filter:l.filter})},[a])}},rke=e=>{switch(e){case"cancel":return"Cancel";case"replay":return"Replay";default:const t=e;throw new Error(`Unhandled action type: ${t}`)}},oke=({label:e,params:t})=>{const{tenantId:n}=ds(),{data:r,isLoading:o,isError:i}=Mn({...Yr.v1WorkflowRuns.listDisplayNames(n,t.externalIds||[]),enabled:!!t.externalIds});if(o||i)return null;const a=(r==null?void 0:r.rows)||[];return v.jsxs("div",{className:"flex flex-col gap-y-4",children:[v.jsxs("p",{className:"text-md",children:["Confirm to ",e.toLowerCase()," the following runs:"]}),v.jsxs("ul",{className:"ml-4 list-disc pl-4",children:[a==null?void 0:a.slice(0,10).map(s=>v.jsx("li",{className:"font-semibold",children:s.displayName},s.metadata.id)),(a.length||0)>10&&v.jsxs("li",{children:[(a.length||0)-10," more"]})]})]})};function ike({label:e,params:t,table:n,columnKeyToName:r,filters:o,hiddenFilters:i}){var a;if((a=t.externalIds)!=null&&a.length)return v.jsx(oke,{label:e,params:t});if(t.filter)return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Confirm to ",e.toLowerCase()," all runs matching the following filters:"]}),v.jsx(Wte,{table:n,filters:o,columnKeyToName:r,hiddenFilters:i,showColumnVisibility:!1})]});throw new Error(`Unhandled case: ${t}`)}function ake({actionType:e,params:t,table:n,columnKeyToName:r,filters:o,hiddenFilters:i}){const a=rke(e),{handleTaskRunAction:s}=Gte(),{isActionModalOpen:l,actions:{setIsActionModalOpen:u}}=ah();return v.jsx(sb,{open:l,onOpenChange:u,children:v.jsxs(Ky,{className:"max-h-[90%] overflow-auto py-8 sm:max-w-[700px]",children:[v.jsx(lb,{className:"gap-2",children:v.jsx("div",{className:"flex w-full flex-row items-center justify-between",children:v.jsxs(Yy,{children:[a," runs"]})})}),v.jsxs("div",{className:"flex flex-col space-y-4",children:[v.jsx("div",{className:"text-sm text-muted-foreground",children:v.jsx(ike,{label:a,params:t,table:n,filters:o,columnKeyToName:r,hiddenFilters:i,showColumnVisibility:!1})}),v.jsxs("div",{className:"flex flex-row items-center justify-end gap-3 border-t pt-4",children:[v.jsx(xt,{onClick:()=>{u(!1)},variant:"outline",children:"Close"}),v.jsx(xt,{onClick:()=>{s({...t,actionType:e}),u(!1)},children:"Confirm"})]})]})]})})}const R9=({disabled:e,params:t,icon:n,label:r,showModal:o,showLabel:i,className:a})=>{const{handleTaskRunAction:s}=Gte(),{actions:{setIsActionModalOpen:l,setSelectedActionType:u}}=ah();return v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsxs(xt,{size:"sm",className:je("text-sm gap-2",a),variant:"outline",disabled:e,onClick:()=>{if(u(t.actionType),!o){s(t);return}l(!0)},children:[n,i&&r]})}),v.jsx(Hs,{children:r})]})})},sC=({actionType:e,disabled:t,paramOverrides:n,showModal:r,showLabel:o,className:i})=>{const{actionModalParams:a}=ah(),s=n||a;switch(e){case"cancel":return v.jsx(R9,{disabled:t,params:{...s,actionType:"cancel"},icon:v.jsx(sQ,{className:"size-4"}),label:"Cancel",showModal:r,className:i,showLabel:o});case"replay":return v.jsx(R9,{disabled:t,params:{...s,actionType:"replay"},icon:v.jsx(Swe,{className:"size-4"}),label:"Replay",showModal:r,className:i,showLabel:o});default:const l=e;throw new Error(`Unhandled action type: ${l}`)}},ske=({onTriggerWorkflow:e})=>{const{display:{hideTriggerRunButton:t,hideCancelAndReplayButtons:n}}=ah(),r=b.useMemo(()=>{let o=[!n&&v.jsxs("div",{className:"flex flex-row gap-x-1",children:[v.jsx(sC,{actionType:"replay",disabled:!1,showModal:!0,showLabel:!1}),v.jsx(sC,{actionType:"cancel",disabled:!1,showModal:!0,showLabel:!1})]},"bulk-actions")];return t||(o=[v.jsxs(xt,{size:"sm",onClick:e,children:[v.jsx("span",{className:"cq-xl:inline hidden text-sm",children:"Trigger Run"}),v.jsx(BX,{className:"cq-xl:hidden size-4"})]},"trigger"),...o]),o},[e,t,n]);return v.jsx(v.Fragment,{children:r})};var Bn=(e=>(e.Checkbox="checkbox",e.Radio="radio",e.KeyValue="key-value",e.Array="array",e.Switch="switch",e.TimeRange="time-range",e.Search="search",e))(Bn||{});function lke({table:e,filters:t,leftActions:n,rightActions:r=[],searchBar:o,showColumnToggle:i,isLoading:a=!1,hiddenFilters:s,columnKeyToName:l,refetchProps:u,tableActions:c,onResetFilters:d}){const h=t.filter(x=>!s.includes(x.columnId)),p=h.length>0;return c&&r.push(v.jsx(ske,{onTriggerWorkflow:c.onTriggerWorkflow},"table-actions")),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex w-full flex-row items-center gap-2",children:[v.jsxs("div",{className:"flex min-w-0 flex-shrink-0 items-center gap-2",children:[!n&&a&&v.jsx(Hte,{}),n]}),o&&v.jsx("div",{className:"min-w-0 flex-1",children:o}),v.jsxs("div",{className:"ml-auto flex flex-shrink-0 flex-row items-center gap-2",children:[r,u&&v.jsx(JAe,{isRefetching:u.isRefetching,onRefetch:u.onRefetch}),(p||i)&&v.jsx(ZAe,{table:e,filters:h,hiddenFilters:s,columnKeyToName:l,onResetFilters:d})]})]})})}const uke=[{value:It.COMPLETED,label:"Succeeded"},{value:It.FAILED,label:"Failed"},{value:It.RUNNING,label:"Running",subFilterColumnId:bR,subOptions:[{value:$E.ON_WORKER,label:"On Worker"},{value:$E.EVICTED,label:"Evicted"}]},{value:It.QUEUED,label:"Queued"},{value:It.CANCELLED,label:"Cancelled"}],cke=({filterVisibility:e,filterActions:t})=>{const[n,r]=b.useState(""),o=wTe(n),i=b.useMemo(()=>o.map(s=>({value:s.metadata.id,label:s.name}))||[],[o]),a={onTimeWindowChange:s=>{s!=="custom"?t.setTimeWindow(s):t.setCustomTimeRange({start:t.apiFilters.since||new Date(Date.now()-1440*60*1e3).toISOString(),end:t.apiFilters.until||new Date().toISOString()})},onCreatedAfterChange:s=>{t.isCustomTimeRange&&t.apiFilters.until&&t.setCustomTimeRange({start:s||new Date(Date.now()-1440*60*1e3).toISOString(),end:t.apiFilters.until})},onFinishedBeforeChange:s=>{t.isCustomTimeRange&&t.apiFilters.since&&t.setCustomTimeRange({start:t.apiFilters.since,end:s||new Date().toISOString()})},onClearTimeRange:()=>t.setCustomTimeRange(null),currentTimeWindow:t.timeWindow,isCustomTimeRange:t.isCustomTimeRange,createdAfter:t.apiFilters.since,finishedBefore:t.apiFilters.until};return[{columnId:_ee,title:"Time Range",type:Bn.TimeRange,timeRangeConfig:a},{columnId:i4,title:"Workflow",options:i,type:Bn.Checkbox,searchConfig:{onSearch:r}},{columnId:Gp,title:"Status",options:uke,type:Bn.Checkbox},{columnId:_w,title:"Metadata",type:Bn.KeyValue},{columnId:vb,title:"Flatten DAGs",type:Bn.Switch,options:[{value:"true",label:"Flatten"},{value:"false",label:"All"}]}].filter(s=>e[s.columnId]!=!1)},x_={parentTaskExternalId:!1,flattenDAGs:!1,runningFilter:!1},Kte=b.createContext(null),SD=({tableKey:e,children:t,initColumnVisibility:n={},filterVisibility:r={},display:o,runFilters:i,persistColumnVisibilityKey:a})=>{const[s,l]=b.useState(!1),[u,c]=b.useState(null),[d,h]=b.useState({}),[p,x]=b.useState(!1),[y,w]=b.useState(!1),_=b.useMemo(()=>({...n,...x_}),[n]),[C,O]=ey(`hatchet:columns:${a??"__none__"}`,_),[P,R]=b.useState(_),T=b.useMemo(()=>a?{...C,...x_}:P,[a,C,P]),k=b.useCallback(he=>{a?O(Se=>({...typeof he=="function"?he(Se):he,...x_})):R(Se=>({...typeof he=="function"?he(Se):he,...x_}))},[a,O]),{workflowId:M,parentTaskExternalId:j,workerId:$,triggeringEventExternalId:L}=i??{},{hideMetrics:K=!1,hideCounts:H=!1,hideDateFilter:D=!1,hideTriggerRunButton:W=!1,hideCancelAndReplayButtons:q=!1,hideColumnToggle:Y=!1,hiddenFilters:U=[]}=o??{},V=mTe(e,{workflowIds:M?[M]:void 0}),G=cke({filterVisibility:r,filterActions:V}),z=M||(V.apiFilters.workflowIds??[])[0],X=V.apiFilters.flattenDAGs,{tableRows:ee,selectedRuns:ae,numPages:fe,isLoading:ie,isFetching:we,refetch:de,getRowId:se,isRefetching:ye,pagination:Te,setPagination:ge,setPageSize:Be}=iOe({key:e,rowSelection:d,createdAfter:V.apiFilters.since,finishedBefore:V.apiFilters.until,statuses:V.apiFilters.statuses,runningFilter:V.apiFilters.runningFilter,additionalMetadata:V.apiFilters.additionalMetadata,workerId:$,workflowIds:V.apiFilters.workflowIds||(z?[z]:void 0),parentTaskExternalId:j,triggeringEventExternalId:L,onlyTasks:!!$||X}),Ie=b.useMemo(()=>ae.length>0?{externalIds:ae.map(he=>he==null?void 0:he.metadata.id)}:{filter:{...V.apiFilters,since:V.apiFilters.since||""}},[ae,V.apiFilters]),{runStatusCounts:Ve,queueMetrics:ht,isStatusCountsLoading:lt,isStatusCountsFetching:Ye,refetch:Kt,isStatusCountsRefetching:vn,isQueueMetricsLoading:un}=oOe({workflow:z,parentTaskExternalId:j,createdAfter:V.apiFilters.since,createdBefore:V.apiFilters.until,additionalMetadata:V.apiFilters.additionalMetadata,showQueueMetrics:p}),on=ye||vn,oe=b.useMemo(()=>({filters:V,toolbarFilters:G,tableRows:ee,selectedRuns:ae,numPages:fe,isRunsLoading:ie,isRunsFetching:we,isStatusCountsFetching:Ye,isStatusCountsLoading:lt,isQueueMetricsLoading:un,isRefetching:on,runStatusCounts:Ve,queueMetrics:ht,isActionModalOpen:s,actionModalParams:Ie,selectedActionType:u,pagination:Te,columnVisibility:T,rowSelection:d,showTriggerWorkflow:y,showQueueMetrics:p,display:{hideMetrics:K,hideCounts:H,hideDateFilter:D,hideTriggerRunButton:W,hideCancelAndReplayButtons:q,hideColumnToggle:Y,hiddenFilters:U},actions:{setIsActionModalOpen:l,setSelectedActionType:c,refetchRuns:de,refetchMetrics:Kt,getRowId:se,setPagination:ge,setPageSize:Be,setColumnVisibility:k,setRowSelection:h,setShowQueueMetrics:x,setShowTriggerWorkflow:w}}),[V,G,ee,ae,fe,ie,we,Ye,lt,un,Ve,ht,s,K,H,D,W,U,Ie,u,l,c,de,Kt,se,Be,Te,ge,q,Y,on,x,p,w,h,T,k,d,y]);return v.jsx(Kte.Provider,{value:oe,children:t})},ah=()=>{const e=b.useContext(Kte);if(!e)throw new Error("useRunsContext must be used within a RunsProvider");return e},b4=({taskRunId:e,limit:t=50})=>{var i,a;const{tenant:n}=ta({from:ft.tenantRoute.to}),r=Mn({...Yr.v1TaskEvents.list(n,{limit:t,offset:0},e)});return{isSkipped:((a=(i=r.data)==null?void 0:i.rows)==null?void 0:a.some(s=>s.eventType===Nn.SKIPPED))??!1,isLoading:r.isLoading}},b_="rd",S4=b.createContext(null);function fke(e){const t={};let n=!1;for(const[r,o]of Object.entries(e))o!=null&&o!==""&&(t[r]=o,n=!0);return n?t:void 0}function dke(e){const t={};return"tab"in e&&(t.tab=e.tab),"focusedTaskRunId"in e&&(t.task=e.focusedTaskRunId),"selectedSpanId"in e&&(t.span=e.selectedSpanId,e.selectedSpanId&&(t.group=void 0)),"selectedGroupId"in e&&(t.group=e.selectedGroupId,e.selectedGroupId&&(t.span=void 0)),"queryString"in e&&(t.q=e.queryString||void 0),t}function mtt({children:e}){const[t,n]=Wy(),r=t.get(b_),o=b.useMemo(()=>{if(!r)return{};try{const s=typeof r=="string"?JSON.parse(r):r;return s&&typeof s=="object"?s:{}}catch{return{}}},[r]),i=b.useCallback(s=>{n(l=>{const u=l.get(b_);let c={};if(u)try{const p=typeof u=="string"?JSON.parse(u):u;c=p&&typeof p=="object"?p:{}}catch{}const d=fke({...c,...s}),h={};return l.forEach((p,x)=>{if(x!==b_)try{h[x]=JSON.parse(p)}catch{h[x]=p}}),d&&(h[b_]=d),h},{replace:!0})},[n]),a=b.useMemo(()=>({tab:o.tab,focusedTaskRunId:o.task,selectedSpanId:o.span,selectedGroupId:o.group,queryString:o.q??"",setTab:s=>i({tab:s}),setFocusedTaskRunId:s=>i({task:s}),setSelectedSpanId:s=>i({span:s,group:void 0}),setSelectedGroupId:s=>i({group:s,span:void 0}),setQueryString:s=>i({q:s||void 0}),set:s=>i(dke(s))}),[o,i]);return v.jsx(S4.Provider,{value:a,children:e})}function hke({children:e}){const[t,n]=b.useState(),[r,o]=b.useState(),[i,a]=b.useState(),[s,l]=b.useState(),[u,c]=b.useState(""),d=b.useMemo(()=>({tab:t,focusedTaskRunId:r,selectedSpanId:i,selectedGroupId:s,queryString:u,setTab:n,setFocusedTaskRunId:o,setSelectedSpanId:h=>{a(h),l(void 0)},setSelectedGroupId:h=>{l(h),a(void 0)},setQueryString:c,set:h=>{"tab"in h&&n(h.tab),"focusedTaskRunId"in h&&o(h.focusedTaskRunId),"selectedSpanId"in h&&(a(h.selectedSpanId),h.selectedSpanId&&l(void 0)),"selectedGroupId"in h&&(l(h.selectedGroupId),h.selectedGroupId&&a(void 0)),"queryString"in h&&c(h.queryString??"")}}),[t,r,i,s,u]);return v.jsx(S4.Provider,{value:d,children:e})}function _4(){const e=b.useContext(S4);if(!e)throw new Error("useRunDetailSearch must be used within a RunDetailSearchProvider");return e}function Yte(e){return e?[It.COMPLETED,It.FAILED,It.CANCELLED].includes(e):!1}const pke=()=>{const e=ta({from:ft.tenantRunRoute.to}),{data:t,isLoading:n,isError:r,error:o}=Mn({retry:AK,refetchInterval:d=>{var p;const h=d.state.data;return Yte((p=h==null?void 0:h.run)==null?void 0:p.status)?5e3:1e3},...Yr.v1WorkflowRuns.details(e.run)}),i=(t==null?void 0:t.shape)||[],a=(t==null?void 0:t.tasks)||[],s=(t==null?void 0:t.taskEvents)||[],l=t==null?void 0:t.run,u=t==null?void 0:t.workflowConfig,c=_L(o);return{shape:i,taskRuns:a,taskEvents:s,workflowRun:l,workflowConfig:u,isLoading:n,isError:r,errStatusCode:c}};function Xs(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{let t;const n=new Set,r=(c,d)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(x=>x(t,p))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(mke?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,l);return l},gke=e=>e?P9(e):P9,{useDebugValue:vke}=J,{useSyncExternalStoreWithSelector:yke}=J0e,wke=e=>e;function Xte(e,t=wke,n){const r=yke(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vke(r),r}const T9=(e,t)=>{const n=gke(e),r=(o,i=t)=>Xte(n,o,i);return Object.assign(r,n),r},xke=(e,t)=>e?T9(e,t):T9;function Na(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var bke={value:()=>{}};function AR(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}mE.prototype=AR.prototype={constructor:mE,on:function(e,t){var n=this._,r=Ske(e+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var n=new Array(o),r=0,o,i;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),k9.hasOwnProperty(t)?{space:k9[t],local:e}:e}function Eke(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===_D&&t.documentElement.namespaceURI===_D?t.createElement(e):t.createElementNS(n,e)}}function Cke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qte(e){var t=kR(e);return(t.local?Cke:Eke)(t)}function Oke(){}function E4(e){return e==null?Oke:function(){return this.querySelector(e)}}function Rke(e){typeof e!="function"&&(e=E4(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=O&&(O=C+1);!(R=w[O])&&++O=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Zke(e){e||(e=Jke);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,o=new Array(r),i=0;it?1:e>=t?0:NaN}function eNe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function tNe(){return Array.from(this)}function nNe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?hNe:typeof t=="function"?mNe:pNe)(e,t,n??"")):sy(this.node(),e)}function sy(e,t){return e.style.getPropertyValue(t)||nne(e).getComputedStyle(e,null).getPropertyValue(t)}function vNe(e){return function(){delete this[e]}}function yNe(e,t){return function(){this[e]=t}}function wNe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function xNe(e,t){return arguments.length>1?this.each((t==null?vNe:typeof t=="function"?wNe:yNe)(e,t)):this.node()[e]}function rne(e){return e.trim().split(/^|\s+/)}function C4(e){return e.classList||new one(e)}function one(e){this._node=e,this._names=rne(e.getAttribute("class")||"")}one.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ine(e,t){for(var n=C4(e),r=-1,o=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function KNe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n()=>e;function ED(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}ED.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function oMe(e){return!e.ctrlKey&&!e.button}function iMe(){return this.parentNode}function aMe(e,t){return t??{x:e.x,y:e.y}}function sMe(){return navigator.maxTouchPoints||"ontouchstart"in this}function lMe(){var e=oMe,t=iMe,n=aMe,r=sMe,o={},i=AR("start","drag","end"),a=0,s,l,u,c,d=0;function h(P){P.on("mousedown.drag",p).filter(r).on("touchstart.drag",w).on("touchmove.drag",_,rMe).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(P,R){if(!(c||!e.call(this,P,R))){var T=O(this,t.call(this,P,R),P,R,"mouse");T&&(Tl(P.view).on("mousemove.drag",x,Kw).on("mouseup.drag",y,Kw),une(P.view),mA(P),u=!1,s=P.clientX,l=P.clientY,T("start",P))}}function x(P){if(_v(P),!u){var R=P.clientX-s,T=P.clientY-l;u=R*R+T*T>d}o.mouse("drag",P)}function y(P){Tl(P.view).on("mousemove.drag mouseup.drag",null),cne(P.view,u),_v(P),o.mouse("end",P)}function w(P,R){if(e.call(this,P,R)){var T=P.changedTouches,k=t.call(this,P,R),M=T.length,j,$;for(j=0;j>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?__(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?__(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=cMe.exec(e))?new Ra(t[1],t[2],t[3],1):(t=fMe.exec(e))?new Ra(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dMe.exec(e))?__(t[1],t[2],t[3],t[4]):(t=hMe.exec(e))?__(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=pMe.exec(e))?$9(t[1],t[2]/100,t[3]/100,1):(t=mMe.exec(e))?$9(t[1],t[2]/100,t[3]/100,t[4]):N9.hasOwnProperty(e)?I9(N9[e]):e==="transparent"?new Ra(NaN,NaN,NaN,0):null}function I9(e){return new Ra(e>>16&255,e>>8&255,e&255,1)}function __(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ra(e,t,n,r)}function yMe(e){return e instanceof Sb||(e=cm(e)),e?(e=e.rgb(),new Ra(e.r,e.g,e.b,e.opacity)):new Ra}function CD(e,t,n,r){return arguments.length===1?yMe(e):new Ra(e,t,n,r??1)}function Ra(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}O4(Ra,CD,fne(Sb,{brighter(e){return e=e==null?uC:Math.pow(uC,e),new Ra(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yw:Math.pow(Yw,e),new Ra(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ra(Kp(this.r),Kp(this.g),Kp(this.b),cC(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D9,formatHex:D9,formatHex8:wMe,formatRgb:L9,toString:L9}));function D9(){return`#${Cp(this.r)}${Cp(this.g)}${Cp(this.b)}`}function wMe(){return`#${Cp(this.r)}${Cp(this.g)}${Cp(this.b)}${Cp((isNaN(this.opacity)?1:this.opacity)*255)}`}function L9(){const e=cC(this.opacity);return`${e===1?"rgb(":"rgba("}${Kp(this.r)}, ${Kp(this.g)}, ${Kp(this.b)}${e===1?")":`, ${e})`}`}function cC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cp(e){return e=Kp(e),(e<16?"0":"")+e.toString(16)}function $9(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Al(e,t,n,r)}function dne(e){if(e instanceof Al)return new Al(e.h,e.s,e.l,e.opacity);if(e instanceof Sb||(e=cm(e)),!e)return new Al;if(e instanceof Al)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new Al(a,s,l,e.opacity)}function xMe(e,t,n,r){return arguments.length===1?dne(e):new Al(e,t,n,r??1)}function Al(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}O4(Al,xMe,fne(Sb,{brighter(e){return e=e==null?uC:Math.pow(uC,e),new Al(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yw:Math.pow(Yw,e),new Al(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ra(gA(e>=240?e-240:e+120,o,r),gA(e,o,r),gA(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Al(F9(this.h),E_(this.s),E_(this.l),cC(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cC(this.opacity);return`${e===1?"hsl(":"hsla("}${F9(this.h)}, ${E_(this.s)*100}%, ${E_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function F9(e){return e=(e||0)%360,e<0?e+360:e}function E_(e){return Math.max(0,Math.min(1,e||0))}function gA(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const R4=e=>()=>e;function bMe(e,t){return function(n){return e+n*t}}function SMe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function _Me(e){return(e=+e)==1?hne:function(t,n){return n-t?SMe(t,n,e):R4(isNaN(t)?n:t)}}function hne(e,t){var n=t-e;return n?bMe(e,n):R4(isNaN(e)?t:e)}const fC=(function e(t){var n=_Me(t);function r(o,i){var a=n((o=CD(o)).r,(i=CD(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),u=hne(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=s(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function EMe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Pl(r,o)})),n=vA.lastIndex;return n180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(o(d)+"rotate(",null,r)-2,x:Pl(u,c)})):c&&d.push(o(d)+"rotate("+c+r)}function s(u,c,d,h){u!==c?h.push({i:d.push(o(d)+"skewX(",null,r)-2,x:Pl(u,c)}):c&&d.push(o(d)+"skewX("+c+r)}function l(u,c,d,h,p,x){if(u!==d||c!==h){var y=p.push(o(p)+"scale(",null,",",null,")");x.push({i:y-4,x:Pl(u,d)},{i:y-2,x:Pl(c,h)})}else(d!==1||h!==1)&&p.push(o(p)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,h),a(u.rotate,c.rotate,d,h),s(u.skewX,c.skewX,d,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(p){for(var x=-1,y=h.length,w;++x=0&&e._call.call(void 0,t),e=e._next;--ly}function q9(){fm=(hC=Qw.now())+NR,ly=aw=0;try{zMe()}finally{ly=0,UMe(),fm=0}}function qMe(){var e=Qw.now(),t=e-hC;t>vne&&(NR-=t,hC=e)}function UMe(){for(var e,t=dC,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dC=n);sw=e,PD(r)}function PD(e){if(!ly){aw&&(aw=clearTimeout(aw));var t=e-fm;t>24?(e<1/0&&(aw=setTimeout(q9,e-Qw.now()-NR)),D1&&(D1=clearInterval(D1))):(D1||(hC=Qw.now(),D1=setInterval(qMe,vne)),ly=1,yne(q9))}}function U9(e,t,n){var r=new pC;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var VMe=AR("start","end","cancel","interrupt"),WMe=[],xne=0,V9=1,TD=2,gE=3,W9=4,AD=5,vE=6;function MR(e,t,n,r,o,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;HMe(e,n,{name:t,index:r,group:o,on:VMe,tween:WMe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:xne})}function A4(e,t){var n=Yl(e,t);if(n.state>xne)throw new Error("too late; already scheduled");return n}function ac(e,t){var n=Yl(e,t);if(n.state>gE)throw new Error("too late; already running");return n}function Yl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function HMe(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=wne(i,0,n.time);function i(u){n.state=V9,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,h,p;if(n.state!==V9)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===gE)return U9(a);p.state===W9?(p.state=vE,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+cTD&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Sje(e,t,n){var r,o,i=bje(t)?A4:ac;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}function _je(e,t){var n=this._id;return arguments.length<2?Yl(this.node(),n).on.on(e):this.each(Sje(n,e,t))}function Eje(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Cje(){return this.on("end.remove",Eje(this._id))}function Oje(e){var t=this._name,n=this._id;typeof e!="function"&&(e=E4(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a()=>e;function Qje(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function ef(e,t,n){this.k=e,this.x=t,this.y=n}ef.prototype={constructor:ef,scale:function(e){return e===1?this:new ef(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ef(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ud=new ef(1,0,0);ef.prototype;function yA(e){e.stopImmediatePropagation()}function L1(e){e.preventDefault(),e.stopImmediatePropagation()}function Zje(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Jje(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function H9(){return this.__zoom||Ud}function eIe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function tIe(){return navigator.maxTouchPoints||"ontouchstart"in this}function nIe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function rIe(){var e=Zje,t=Jje,n=nIe,r=eIe,o=tIe,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=$Me,u=AR("start","zoom","end"),c,d,h,p=500,x=150,y=0,w=10;function _(D){D.property("__zoom",H9).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",$).filter(o).on("touchstart.zoom",L).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,W,q,Y){var U=D.selection?D.selection():D;U.property("__zoom",H9),D!==U?R(D,W,q,Y):U.interrupt().each(function(){T(this,arguments).event(Y).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},_.scaleBy=function(D,W,q,Y){_.scaleTo(D,function(){var U=this.__zoom.k,V=typeof W=="function"?W.apply(this,arguments):W;return U*V},q,Y)},_.scaleTo=function(D,W,q,Y){_.transform(D,function(){var U=t.apply(this,arguments),V=this.__zoom,G=q==null?P(U):typeof q=="function"?q.apply(this,arguments):q,z=V.invert(G),X=typeof W=="function"?W.apply(this,arguments):W;return n(O(C(V,X),G,z),U,a)},q,Y)},_.translateBy=function(D,W,q,Y){_.transform(D,function(){return n(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,Y)},_.translateTo=function(D,W,q,Y,U){_.transform(D,function(){var V=t.apply(this,arguments),G=this.__zoom,z=Y==null?P(V):typeof Y=="function"?Y.apply(this,arguments):Y;return n(Ud.translate(z[0],z[1]).scale(G.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof q=="function"?-q.apply(this,arguments):-q),V,a)},Y,U)};function C(D,W){return W=Math.max(i[0],Math.min(i[1],W)),W===D.k?D:new ef(W,D.x,D.y)}function O(D,W,q){var Y=W[0]-q[0]*D.k,U=W[1]-q[1]*D.k;return Y===D.x&&U===D.y?D:new ef(D.k,Y,U)}function P(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function R(D,W,q,Y){D.on("start.zoom",function(){T(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(Y).end()}).tween("zoom",function(){var U=this,V=arguments,G=T(U,V).event(Y),z=t.apply(U,V),X=q==null?P(z):typeof q=="function"?q.apply(U,V):q,ee=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),ae=U.__zoom,fe=typeof W=="function"?W.apply(U,V):W,ie=l(ae.invert(X).concat(ee/ae.k),fe.invert(X).concat(ee/fe.k));return function(we){if(we===1)we=fe;else{var de=ie(we),se=ee/de[2];we=new ef(se,X[0]-de[0]*se,X[1]-de[1]*se)}G.zoom(null,we)}})}function T(D,W,q){return!q&&D.__zooming||new k(D,W)}function k(D,W){this.that=D,this.args=W,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,W),this.taps=0}k.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,W){return this.mouse&&D!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var W=Tl(this.that).datum();u.call(D,this.that,new Qje(D,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:u}),W)}};function M(D,...W){if(!e.apply(this,arguments))return;var q=T(this,W).event(D),Y=this.__zoom,U=Math.max(i[0],Math.min(i[1],Y.k*Math.pow(2,r.apply(this,arguments)))),V=Iu(D);if(q.wheel)(q.mouse[0][0]!==V[0]||q.mouse[0][1]!==V[1])&&(q.mouse[1]=Y.invert(q.mouse[0]=V)),clearTimeout(q.wheel);else{if(Y.k===U)return;q.mouse=[V,Y.invert(V)],yE(this),q.start()}L1(D),q.wheel=setTimeout(G,x),q.zoom("mouse",n(O(C(Y,U),q.mouse[0],q.mouse[1]),q.extent,a));function G(){q.wheel=null,q.end()}}function j(D,...W){if(h||!e.apply(this,arguments))return;var q=D.currentTarget,Y=T(this,W,!0).event(D),U=Tl(D.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",ee,!0),V=Iu(D,q),G=D.clientX,z=D.clientY;une(D.view),yA(D),Y.mouse=[V,this.__zoom.invert(V)],yE(this),Y.start();function X(ae){if(L1(ae),!Y.moved){var fe=ae.clientX-G,ie=ae.clientY-z;Y.moved=fe*fe+ie*ie>y}Y.event(ae).zoom("mouse",n(O(Y.that.__zoom,Y.mouse[0]=Iu(ae,q),Y.mouse[1]),Y.extent,a))}function ee(ae){U.on("mousemove.zoom mouseup.zoom",null),cne(ae.view,Y.moved),L1(ae),Y.event(ae).end()}}function $(D,...W){if(e.apply(this,arguments)){var q=this.__zoom,Y=Iu(D.changedTouches?D.changedTouches[0]:D,this),U=q.invert(Y),V=q.k*(D.shiftKey?.5:2),G=n(O(C(q,V),Y,U),t.apply(this,W),a);L1(D),s>0?Tl(this).transition().duration(s).call(R,G,Y,D):Tl(this).call(_.transform,G,Y,D)}}function L(D,...W){if(e.apply(this,arguments)){var q=D.touches,Y=q.length,U=T(this,W,D.changedTouches.length===Y).event(D),V,G,z,X;for(yA(D),G=0;G"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Ene=gf.error001();function so(e,t){const n=b.useContext(jR);if(n===null)throw new Error(Ene);return Xte(n,e,t)}const si=()=>{const e=b.useContext(jR);if(e===null)throw new Error(Ene);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},iIe=e=>e.userSelectionActive?"none":"all";function aIe({position:e,children:t,className:n,style:r,...o}){const i=so(iIe),a=`${e}`.split("-");return J.createElement("div",{className:Xs(["react-flow__panel",n,...a]),style:{...r,pointerEvents:i},...o},t)}function sIe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:J.createElement(aIe,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},J.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const lIe=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const d=b.useRef(null),[h,p]=b.useState({x:0,y:0,width:0,height:0}),x=Xs(["react-flow__edge-textwrapper",u]);return b.useEffect(()=>{if(d.current){const y=d.current.getBBox();p({x:y.x,y:y.y,width:y.width,height:y.height})}},[n]),typeof n>"u"||!n?null:J.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:x,visibility:h.width?"visible":"hidden",...c},o&&J.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:s,ry:s}),J.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:d,style:r},n),l)};var uIe=b.memo(lIe);const N4=e=>({width:e.offsetWidth,height:e.offsetHeight}),uy=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),M4=(e={x:0,y:0},t)=>({x:uy(e.x,t[0][0],t[1][0]),y:uy(e.y,t[0][1],t[1][1])}),G9=(e,t,n)=>en?-uy(Math.abs(e-n),1,50)/50:0,Cne=(e,t)=>{const n=G9(e.x,35,t.width-35)*20,r=G9(e.y,35,t.height-35)*20;return[n,r]},One=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},cIe=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),j4=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),fIe=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),K9=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),kD=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},dIe=e=>Ds(e.width)&&Ds(e.height)&&Ds(e.x)&&Ds(e.y),Ds=e=>!isNaN(e)&&isFinite(e),Kr=Symbol.for("internals"),Rne=["Enter"," ","Escape"],hIe=(e,t)=>{},pIe=e=>"nativeEvent"in e;function ND(e){var o,i;const t=pIe(e)?e.nativeEvent:e,n=((i=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:i[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const Pne=e=>"clientX"in e,Vd=(e,t)=>{var i,a;const n=Pne(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},mC=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},_b=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p=20})=>J.createElement(J.Fragment,null,J.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:d,markerStart:h}),p&&J.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),o&&Ds(n)&&Ds(r)?J.createElement(uIe,{x:n,y:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null);_b.displayName="BaseEdge";function $1(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(i=>i.id===e);o&&n(r,{...o})}}function Tne({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n{const[w,_,C]=kne({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return J.createElement(_b,{path:w,labelX:_,labelY:C,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,interactionWidth:y})});I4.displayName="SimpleBezierEdge";const X9={[Ft.Left]:{x:-1,y:0},[Ft.Right]:{x:1,y:0},[Ft.Top]:{x:0,y:-1},[Ft.Bottom]:{x:0,y:1}},mIe=({source:e,sourcePosition:t=Ft.Bottom,target:n})=>t===Ft.Left||t===Ft.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function gIe({source:e,sourcePosition:t=Ft.Bottom,target:n,targetPosition:r=Ft.Top,center:o,offset:i}){const a=X9[t],s=X9[r],l={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+s.x*i,y:n.y+s.y*i},c=mIe({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",h=c[d];let p=[],x,y;const w={x:0,y:0},_={x:0,y:0},[C,O,P,R]=Tne({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){x=o.x??C,y=o.y??O;const k=[{x,y:l.y},{x,y:u.y}],M=[{x:l.x,y},{x:u.x,y}];a[d]===h?p=d==="x"?k:M:p=d==="x"?M:k}else{const k=[{x:l.x,y:u.y}],M=[{x:u.x,y:l.y}];if(d==="x"?p=a.x===h?M:k:p=a.y===h?k:M,t===r){const H=Math.abs(e[d]-n[d]);if(H<=i){const D=Math.min(i-1,i-H);a[d]===h?w[d]=(l[d]>e[d]?-1:1)*D:_[d]=(u[d]>n[d]?-1:1)*D}}if(t!==r){const H=d==="x"?"y":"x",D=a[d]===s[H],W=l[H]>u[H],q=l[H]=K?(x=(j.x+$.x)/2,y=p[0].y):(x=p[0].x,y=(j.y+$.y)/2)}return[[e,{x:l.x+w.x,y:l.y+w.y},...p,{x:u.x+_.x,y:u.y+_.y},n],x,y,P,R]}function vIe(e,t,n,r){const o=Math.min(Q9(e,t)/2,Q9(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x{let O="";return C>0&&C{const[_,C,O]=MD({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:h,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset});return J.createElement(_b,{path:_,labelX:C,labelY:O,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:p,markerStart:x,interactionWidth:w})});IR.displayName="SmoothStepEdge";const D4=b.memo(e=>{var t;return J.createElement(IR,{...e,pathOptions:b.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});D4.displayName="StepEdge";function yIe({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=Tne({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}const L4=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p})=>{const[x,y,w]=yIe({sourceX:e,sourceY:t,targetX:n,targetY:r});return J.createElement(_b,{path:x,labelX:y,labelY:w,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:h,interactionWidth:p})});L4.displayName="StraightEdge";function R_(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Z9({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Ft.Left:return[t-R_(t-r,i),n];case Ft.Right:return[t+R_(r-t,i),n];case Ft.Top:return[t,n-R_(n-o,i)];case Ft.Bottom:return[t,n+R_(o-n,i)]}}function Nne({sourceX:e,sourceY:t,sourcePosition:n=Ft.Bottom,targetX:r,targetY:o,targetPosition:i=Ft.Top,curvature:a=.25}){const[s,l]=Z9({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[u,c]=Z9({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,h,p,x]=Ane({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${o}`,d,h,p,x]}const vC=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=Ft.Bottom,targetPosition:i=Ft.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,pathOptions:y,interactionWidth:w})=>{const[_,C,O]=Nne({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:y==null?void 0:y.curvature});return J.createElement(_b,{path:_,labelX:C,labelY:O,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:x,interactionWidth:w})});vC.displayName="BezierEdge";const $4=b.createContext(null),wIe=$4.Provider;$4.Consumer;const xIe=()=>b.useContext($4),bIe=e=>"id"in e&&"source"in e&&"target"in e,SIe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,jD=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,_Ie=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),EIe=(e,t)=>{if(!e.source||!e.target)return t;let n;return bIe(e)?n={...e}:n={...e,id:SIe(e)},_Ie(n,t)?t:t.concat(n)},ID=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},Mne=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Cv=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},F4=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:i,y:a}=Cv(o,t).positionAbsolute;return cIe(r,j4({x:i,y:a,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fIe(n)},jne=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},u=[];return e.forEach(c=>{const{width:d,height:h,selectable:p=!0,hidden:x=!1}=c;if(a&&!p||x)return!1;const{positionAbsolute:y}=Cv(c,s),w={x:y.x,y:y.y,width:d||0,height:h||0},_=kD(l,w),C=typeof d>"u"||typeof h>"u"||d===null||h===null,O=i&&_>0,P=(d||0)*(h||0);(C||O||_>=P||c.dragging)&&u.push(c)}),u},Ine=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},Dne=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),u=uy(l,r,o),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*u,p=n/2-d*u;return{x:h,y:p,zoom:u}},vp=(e,t=0)=>e.transition().duration(t);function J9(e,t,n,r){return(t[n]||[]).reduce((o,i)=>{var a,s;return`${e.id}-${i.id}-${n}`!==r&&o.push({id:i.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+i.x+i.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+i.y+i.height/2}),o},[])}function CIe(e,t,n,r,o,i){const{x:a,y:s}=Vd(e),u=t.elementsFromPoint(a,s).find(x=>x.classList.contains("react-flow__handle"));if(u){const x=u.getAttribute("data-nodeid");if(x){const y=B4(void 0,u),w=u.getAttribute("data-handleid"),_=i({nodeId:x,id:w,type:y});if(_){const C=o.find(O=>O.nodeId===x&&O.type===y&&O.id===w);return{handle:{id:w,type:y,nodeId:x,x:(C==null?void 0:C.x)||n.x,y:(C==null?void 0:C.y)||n.y},validHandleResult:_}}}}let c=[],d=1/0;if(o.forEach(x=>{const y=Math.sqrt((x.x-n.x)**2+(x.y-n.y)**2);if(y<=r){const w=i(x);y<=d&&(yx.isValid),p=c.some(({handle:x})=>x.type==="target");return c.find(({handle:x,validHandleResult:y})=>p?x.type==="target":h?y.isValid:!0)||c[0]}const OIe={source:null,target:null,sourceHandle:null,targetHandle:null},Lne=()=>({handleDomNode:null,isValid:!1,connection:OIe,endHandle:null});function $ne(e,t,n,r,o,i,a){const s=o==="target",l=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...Lne(),handleDomNode:l};if(l){const c=B4(void 0,l),d=l.getAttribute("data-nodeid"),h=l.getAttribute("data-handleid"),p=l.classList.contains("connectable"),x=l.classList.contains("connectableend"),y={source:s?d:n,sourceHandle:s?h:r,target:s?n:d,targetHandle:s?r:h};u.connection=y,p&&x&&(t===dm.Strict?s&&c==="source"||!s&&c==="target":d!==n||h!==r)&&(u.endHandle={nodeId:d,handleId:h,type:c},u.isValid=i(y))}return u}function RIe({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,i)=>{if(i[Kr]){const{handleBounds:a}=i[Kr];let s=[],l=[];a&&(s=J9(i,a,"source",`${t}-${n}-${r}`),l=J9(i,a,"target",`${t}-${n}-${r}`)),o.push(...s,...l)}return o},[])}function B4(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function wA(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function PIe(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Fne({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:u}){const c=One(e.target),{connectionMode:d,domNode:h,autoPanOnConnect:p,connectionRadius:x,onConnectStart:y,panBy:w,getNodes:_,cancelConnection:C}=i();let O=0,P;const{x:R,y:T}=Vd(e),k=c==null?void 0:c.elementFromPoint(R,T),M=B4(l,k),j=h==null?void 0:h.getBoundingClientRect();if(!j||!M)return;let $,L=Vd(e,j),K=!1,H=null,D=!1,W=null;const q=RIe({nodes:_(),nodeId:n,handleId:t,handleType:M}),Y=()=>{if(!p)return;const[G,z]=Cne(L,j);w({x:G,y:z}),O=requestAnimationFrame(Y)};a({connectionPosition:L,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:M,connectionStartHandle:{nodeId:n,handleId:t,type:M},connectionEndHandle:null}),y==null||y(e,{nodeId:n,handleId:t,handleType:M});function U(G){const{transform:z}=i();L=Vd(G,j);const{handle:X,validHandleResult:ee}=CIe(G,c,ID(L,z,!1,[1,1]),x,q,ae=>$ne(ae,d,n,t,o?"target":"source",s,c));if(P=X,K||(Y(),K=!0),W=ee.handleDomNode,H=ee.connection,D=ee.isValid,a({connectionPosition:P&&D?Mne({x:P.x,y:P.y},z):L,connectionStatus:PIe(!!P,D),connectionEndHandle:ee.endHandle}),!P&&!D&&!W)return wA($);H.source!==H.target&&W&&(wA($),$=W,W.classList.add("connecting","react-flow__handle-connecting"),W.classList.toggle("valid",D),W.classList.toggle("react-flow__handle-valid",D))}function V(G){var z,X;(P||W)&&H&&D&&(r==null||r(H)),(X=(z=i()).onConnectEnd)==null||X.call(z,G),l&&(u==null||u(G)),wA($),C(),cancelAnimationFrame(O),K=!1,D=!1,H=null,W=null,c.removeEventListener("mousemove",U),c.removeEventListener("mouseup",V),c.removeEventListener("touchmove",U),c.removeEventListener("touchend",V)}c.addEventListener("mousemove",U),c.addEventListener("mouseup",V),c.addEventListener("touchmove",U),c.addEventListener("touchend",V)}const eB=()=>!0,TIe=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),AIe=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:a}=r;return{connecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n||(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===n}},Bne=b.forwardRef(({type:e="source",position:t=Ft.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:a,onConnect:s,children:l,className:u,onMouseDown:c,onTouchStart:d,...h},p)=>{var j,$;const x=a||null,y=e==="target",w=si(),_=xIe(),{connectOnClick:C,noPanClassName:O}=so(TIe,Na),{connecting:P,clickConnecting:R}=so(AIe(_,x,e),Na);_||($=(j=w.getState()).onError)==null||$.call(j,"010",gf.error010());const T=L=>{const{defaultEdgeOptions:K,onConnect:H,hasDefaultEdges:D}=w.getState(),W={...K,...L};if(D){const{edges:q,setEdges:Y}=w.getState();Y(EIe(W,q))}H==null||H(W),s==null||s(W)},k=L=>{if(!_)return;const K=Pne(L);o&&(K&&L.button===0||!K)&&Fne({event:L,handleId:x,nodeId:_,onConnect:T,isTarget:y,getState:w.getState,setState:w.setState,isValidConnection:n||w.getState().isValidConnection||eB}),K?c==null||c(L):d==null||d(L)},M=L=>{const{onClickConnectStart:K,onClickConnectEnd:H,connectionClickStartHandle:D,connectionMode:W,isValidConnection:q}=w.getState();if(!_||!D&&!o)return;if(!D){K==null||K(L,{nodeId:_,handleId:x,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:_,type:e,handleId:x}});return}const Y=One(L.target),U=n||q||eB,{connection:V,isValid:G}=$ne({nodeId:_,id:x,type:e},W,D.nodeId,D.handleId||null,D.type,U,Y);G&&T(V),H==null||H(L),w.setState({connectionClickStartHandle:null})};return J.createElement("div",{"data-handleid":x,"data-nodeid":_,"data-handlepos":t,"data-id":`${_}-${x}-${e}`,className:Xs(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",O,u,{source:!y,target:y,connectable:r,connectablestart:o,connectableend:i,connecting:R,connectionindicator:r&&(o&&!P||i&&P)}]),onMouseDown:k,onTouchStart:k,onClick:C?M:void 0,ref:p,...h},l)});Bne.displayName="Handle";var cy=b.memo(Bne);const zne=({data:e,isConnectable:t,targetPosition:n=Ft.Top,sourcePosition:r=Ft.Bottom})=>J.createElement(J.Fragment,null,J.createElement(cy,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,J.createElement(cy,{type:"source",position:r,isConnectable:t}));zne.displayName="DefaultNode";var DD=b.memo(zne);const qne=({data:e,isConnectable:t,sourcePosition:n=Ft.Bottom})=>J.createElement(J.Fragment,null,e==null?void 0:e.label,J.createElement(cy,{type:"source",position:n,isConnectable:t}));qne.displayName="InputNode";var Une=b.memo(qne);const Vne=({data:e,isConnectable:t,targetPosition:n=Ft.Top})=>J.createElement(J.Fragment,null,J.createElement(cy,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);Vne.displayName="OutputNode";var Wne=b.memo(Vne);const z4=()=>null;z4.displayName="GroupNode";const kIe=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),P_=e=>e.id;function NIe(e,t){return Na(e.selectedNodes.map(P_),t.selectedNodes.map(P_))&&Na(e.selectedEdges.map(P_),t.selectedEdges.map(P_))}const Hne=b.memo(({onSelectionChange:e})=>{const t=si(),{selectedNodes:n,selectedEdges:r}=so(kIe,NIe);return b.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChange.forEach(i=>i(o))},[n,r,e]),null});Hne.displayName="SelectionListener";const MIe=e=>!!e.onSelectionChange;function jIe({onSelectionChange:e}){const t=so(MIe);return e||t?J.createElement(Hne,{onSelectionChange:e}):null}const IIe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Qg(e,t){b.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function kn(e,t,n){b.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const DIe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:x,minZoom:y,maxZoom:w,nodeExtent:_,onNodesChange:C,onEdgesChange:O,elementsSelectable:P,connectionMode:R,snapGrid:T,snapToGrid:k,translateExtent:M,connectOnClick:j,defaultEdgeOptions:$,fitView:L,fitViewOptions:K,onNodesDelete:H,onEdgesDelete:D,onNodeDrag:W,onNodeDragStart:q,onNodeDragStop:Y,onSelectionDrag:U,onSelectionDragStart:V,onSelectionDragStop:G,noPanClassName:z,nodeOrigin:X,rfId:ee,autoPanOnConnect:ae,autoPanOnNodeDrag:fe,onError:ie,connectionRadius:we,isValidConnection:de,nodeDragThreshold:se})=>{const{setNodes:ye,setEdges:Te,setDefaultNodesAndEdges:ge,setMinZoom:Be,setMaxZoom:Ie,setTranslateExtent:Ve,setNodeExtent:ht,reset:lt}=so(IIe,Na),Ye=si();return b.useEffect(()=>{const Kt=r==null?void 0:r.map(vn=>({...vn,...$}));return ge(n,Kt),()=>{lt()}},[]),kn("defaultEdgeOptions",$,Ye.setState),kn("connectionMode",R,Ye.setState),kn("onConnect",o,Ye.setState),kn("onConnectStart",i,Ye.setState),kn("onConnectEnd",a,Ye.setState),kn("onClickConnectStart",s,Ye.setState),kn("onClickConnectEnd",l,Ye.setState),kn("nodesDraggable",u,Ye.setState),kn("nodesConnectable",c,Ye.setState),kn("nodesFocusable",d,Ye.setState),kn("edgesFocusable",h,Ye.setState),kn("edgesUpdatable",p,Ye.setState),kn("elementsSelectable",P,Ye.setState),kn("elevateNodesOnSelect",x,Ye.setState),kn("snapToGrid",k,Ye.setState),kn("snapGrid",T,Ye.setState),kn("onNodesChange",C,Ye.setState),kn("onEdgesChange",O,Ye.setState),kn("connectOnClick",j,Ye.setState),kn("fitViewOnInit",L,Ye.setState),kn("fitViewOnInitOptions",K,Ye.setState),kn("onNodesDelete",H,Ye.setState),kn("onEdgesDelete",D,Ye.setState),kn("onNodeDrag",W,Ye.setState),kn("onNodeDragStart",q,Ye.setState),kn("onNodeDragStop",Y,Ye.setState),kn("onSelectionDrag",U,Ye.setState),kn("onSelectionDragStart",V,Ye.setState),kn("onSelectionDragStop",G,Ye.setState),kn("noPanClassName",z,Ye.setState),kn("nodeOrigin",X,Ye.setState),kn("rfId",ee,Ye.setState),kn("autoPanOnConnect",ae,Ye.setState),kn("autoPanOnNodeDrag",fe,Ye.setState),kn("onError",ie,Ye.setState),kn("connectionRadius",we,Ye.setState),kn("isValidConnection",de,Ye.setState),kn("nodeDragThreshold",se,Ye.setState),Qg(e,ye),Qg(t,Te),Qg(y,Be),Qg(w,Ie),Qg(M,Ve),Qg(_,ht),null},tB={display:"none"},LIe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Gne="react-flow__node-desc",Kne="react-flow__edge-desc",$Ie="react-flow__aria-live",FIe=e=>e.ariaLiveMessage;function BIe({rfId:e}){const t=so(FIe);return J.createElement("div",{id:`${$Ie}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:LIe},t)}function zIe({rfId:e,disableKeyboardA11y:t}){return J.createElement(J.Fragment,null,J.createElement("div",{id:`${Gne}-${e}`,style:tB},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),J.createElement("div",{id:`${Kne}-${e}`,style:tB},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&J.createElement(BIe,{rfId:e}))}var Jw=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=b.useState(!1),o=b.useRef(!1),i=b.useRef(new Set([])),[a,s]=b.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,h)=>d.concat(...h),[]);return[u,c]}return[[],[]]},[e]);return b.useEffect(()=>{const l=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||l;if(e!==null){const c=p=>{if(o.current=p.ctrlKey||p.metaKey||p.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&ND(p))return!1;const y=rB(p.code,s);i.current.add(p[y]),nB(a,i.current,!1)&&(p.preventDefault(),r(!0))},d=p=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&ND(p))return!1;const y=rB(p.code,s);nB(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(p[y]),p.key==="Meta"&&i.current.clear(),o.current=!1},h=()=>{i.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",c),u==null||u.addEventListener("keyup",d),window.addEventListener("blur",h),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",d),window.removeEventListener("blur",h)}}},[e,r]),n};function nB(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function rB(e,t){return t.includes(e)?"code":"key"}function Yne(e,t,n,r){var s,l;const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=Cv(i,r);return Yne(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(((s=i[Kr])==null?void 0:s.z)??0)>(n.z??0)?((l=i[Kr])==null?void 0:l.z)??0:n.z??0},r)}function Xne(e,t,n){e.forEach(r=>{var i;const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n!=null&&n[r.id]){const{x:a,y:s,z:l}=Yne(r,e,{...r.position,z:((i=r[Kr])==null?void 0:i.z)??0},t);r.positionAbsolute={x:a,y:s},r[Kr].z=l,n!=null&&n[r.id]&&(r[Kr].isParent=!0)}})}function xA(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach(s=>{var p;const l=(Ds(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={...s,positionAbsolute:{x:s.position.x,y:s.position.y}},d=s.parentNode||s.parentId;d&&(i[d]=!0);const h=(u==null?void 0:u.type)&&(u==null?void 0:u.type)!==s.type;Object.defineProperty(c,Kr,{enumerable:!1,value:{handleBounds:h||(p=u==null?void 0:u[Kr])==null?void 0:p.handleBounds,z:l}}),o.set(s.id,c)}),Xne(o,n,i),o}function Qne(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),h=t.initial&&!u&&c;if(s&&l&&(h||!t.initial)){const x=n().filter(w=>{var C;const _=t.includeHiddenNodes?w.width&&w.height:!w.hidden;return(C=t.nodes)!=null&&C.length?_&&t.nodes.some(O=>O.id===w.id):_}),y=x.every(w=>w.width&&w.height);if(x.length>0&&y){const w=F4(x,d),{x:_,y:C,zoom:O}=Dne(w,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),P=Ud.translate(_,C).scale(O);return typeof t.duration=="number"&&t.duration>0?s.transform(vp(l,t.duration),P):s.transform(l,P),!0}}return!1}function qIe(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Kr]:r[Kr],selected:n.selected})}),new Map(t)}function UIe(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function T_({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:qIe(e,o)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:UIe(t,i)}),s==null||s(t))}const Zg=()=>{},VIe={zoomIn:Zg,zoomOut:Zg,zoomTo:Zg,getZoom:()=>1,setViewport:Zg,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Zg,fitBounds:Zg,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},WIe=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),HIe=()=>{const e=si(),{d3Zoom:t,d3Selection:n}=so(WIe,Na);return b.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(vp(n,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(vp(n,o==null?void 0:o.duration),1/1.2),zoomTo:(o,i)=>t.scaleTo(vp(n,i==null?void 0:i.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,i)=>{const[a,s,l]=e.getState().transform,u=Ud.translate(o.x??a,o.y??s).scale(o.zoom??l);t.transform(vp(n,i==null?void 0:i.duration),u)},getViewport:()=>{const[o,i,a]=e.getState().transform;return{x:o,y:i,zoom:a}},fitView:o=>Qne(e.getState,o),setCenter:(o,i,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,d=s/2-o*c,h=l/2-i*c,p=Ud.translate(d,h).scale(c);t.transform(vp(n,a==null?void 0:a.duration),p)},fitBounds:(o,i)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),{x:c,y:d,zoom:h}=Dne(o,a,s,l,u,(i==null?void 0:i.padding)??.1),p=Ud.translate(c,d).scale(h);t.transform(vp(n,i==null?void 0:i.duration),p)},project:o=>{const{transform:i,snapToGrid:a,snapGrid:s}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),ID(o,i,a,s)},screenToFlowPosition:o=>{const{transform:i,snapToGrid:a,snapGrid:s,domNode:l}=e.getState();if(!l)return o;const{x:u,y:c}=l.getBoundingClientRect(),d={x:o.x-u,y:o.y-c};return ID(d,i,a,s)},flowToScreenPosition:o=>{const{transform:i,domNode:a}=e.getState();if(!a)return o;const{x:s,y:l}=a.getBoundingClientRect(),u=Mne(o,i);return{x:u.x+s,y:u.y+l}},viewportInitialized:!0}:VIe,[t,n])};function Zne(){const e=HIe(),t=si(),n=b.useCallback(()=>t.getState().getNodes().map(y=>({...y})),[]),r=b.useCallback(y=>t.getState().nodeInternals.get(y),[]),o=b.useCallback(()=>{const{edges:y=[]}=t.getState();return y.map(w=>({...w}))},[]),i=b.useCallback(y=>{const{edges:w=[]}=t.getState();return w.find(_=>_.id===y)},[]),a=b.useCallback(y=>{const{getNodes:w,setNodes:_,hasDefaultNodes:C,onNodesChange:O}=t.getState(),P=w(),R=typeof y=="function"?y(P):y;if(C)_(R);else if(O){const T=R.length===0?P.map(k=>({type:"remove",id:k.id})):R.map(k=>({item:k,type:"reset"}));O(T)}},[]),s=b.useCallback(y=>{const{edges:w=[],setEdges:_,hasDefaultEdges:C,onEdgesChange:O}=t.getState(),P=typeof y=="function"?y(w):y;if(C)_(P);else if(O){const R=P.length===0?w.map(T=>({type:"remove",id:T.id})):P.map(T=>({item:T,type:"reset"}));O(R)}},[]),l=b.useCallback(y=>{const w=Array.isArray(y)?y:[y],{getNodes:_,setNodes:C,hasDefaultNodes:O,onNodesChange:P}=t.getState();if(O){const T=[..._(),...w];C(T)}else if(P){const R=w.map(T=>({item:T,type:"add"}));P(R)}},[]),u=b.useCallback(y=>{const w=Array.isArray(y)?y:[y],{edges:_=[],setEdges:C,hasDefaultEdges:O,onEdgesChange:P}=t.getState();if(O)C([..._,...w]);else if(P){const R=w.map(T=>({item:T,type:"add"}));P(R)}},[]),c=b.useCallback(()=>{const{getNodes:y,edges:w=[],transform:_}=t.getState(),[C,O,P]=_;return{nodes:y().map(R=>({...R})),edges:w.map(R=>({...R})),viewport:{x:C,y:O,zoom:P}}},[]),d=b.useCallback(({nodes:y,edges:w})=>{const{nodeInternals:_,getNodes:C,edges:O,hasDefaultNodes:P,hasDefaultEdges:R,onNodesDelete:T,onEdgesDelete:k,onNodesChange:M,onEdgesChange:j}=t.getState(),$=(y||[]).map(W=>W.id),L=(w||[]).map(W=>W.id),K=C().reduce((W,q)=>{const Y=q.parentNode||q.parentId,U=!$.includes(q.id)&&Y&&W.find(G=>G.id===Y);return(typeof q.deletable=="boolean"?q.deletable:!0)&&($.includes(q.id)||U)&&W.push(q),W},[]),H=O.filter(W=>typeof W.deletable=="boolean"?W.deletable:!0),D=H.filter(W=>L.includes(W.id));if(K||D){const W=Ine(K,H),q=[...D,...W],Y=q.reduce((U,V)=>(U.includes(V.id)||U.push(V.id),U),[]);if((R||P)&&(R&&t.setState({edges:O.filter(U=>!Y.includes(U.id))}),P&&(K.forEach(U=>{_.delete(U.id)}),t.setState({nodeInternals:new Map(_)}))),Y.length>0&&(k==null||k(q),j&&j(Y.map(U=>({id:U,type:"remove"})))),K.length>0&&(T==null||T(K),M)){const U=K.map(V=>({id:V.id,type:"remove"}));M(U)}}},[]),h=b.useCallback(y=>{const w=dIe(y),_=w?null:t.getState().nodeInternals.get(y.id);return!w&&!_?[null,null,w]:[w?y:K9(_),_,w]},[]),p=b.useCallback((y,w=!0,_)=>{const[C,O,P]=h(y);return C?(_||t.getState().getNodes()).filter(R=>{if(!P&&(R.id===O.id||!R.positionAbsolute))return!1;const T=K9(R),k=kD(T,C);return w&&k>0||k>=C.width*C.height}):[]},[]),x=b.useCallback((y,w,_=!0)=>{const[C]=h(y);if(!C)return!1;const O=kD(C,w);return _&&O>0||O>=C.width*C.height},[]);return b.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:p,isNodeIntersecting:x}),[e,n,r,o,i,a,s,l,u,c,d,p,x])}const GIe={actInsideInputWithModifier:!1};var KIe=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=si(),{deleteElements:r}=Zne(),o=Jw(e,GIe),i=Jw(t);b.useEffect(()=>{if(o){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[o]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])};function YIe(e){const t=si();b.useEffect(()=>{let n;const r=()=>{var i,a;if(!e.current)return;const o=N4(e.current);(o.height===0||o.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",gf.error004())),t.setState({width:o.width||500,height:o.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const q4={position:"absolute",width:"100%",height:"100%",top:0,left:0},XIe=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,A_=e=>({x:e.x,y:e.y,zoom:e.k}),Jg=(e,t)=>e.target.closest(`.${t}`),oB=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),iB=e=>{const t=e.ctrlKey&&mC()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},QIe=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ZIe=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=Op.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:h,translateExtent:p,minZoom:x,maxZoom:y,zoomActivationKeyCode:w,preventScrolling:_=!0,children:C,noWheelClassName:O,noPanClassName:P})=>{const R=b.useRef(),T=si(),k=b.useRef(!1),M=b.useRef(!1),j=b.useRef(null),$=b.useRef({x:0,y:0,zoom:0}),{d3Zoom:L,d3Selection:K,d3ZoomHandler:H,userSelectionActive:D}=so(QIe,Na),W=Jw(w),q=b.useRef(0),Y=b.useRef(!1),U=b.useRef();return YIe(j),b.useEffect(()=>{if(j.current){const V=j.current.getBoundingClientRect(),G=rIe().scaleExtent([x,y]).translateExtent(p),z=Tl(j.current).call(G),X=Ud.translate(h.x,h.y).scale(uy(h.zoom,x,y)),ee=[[0,0],[V.width,V.height]],ae=G.constrain()(X,ee,p);G.transform(z,ae),G.wheelDelta(iB),T.setState({d3Zoom:G,d3Selection:z,d3ZoomHandler:z.on("wheel.zoom"),transform:[ae.x,ae.y,ae.k],domNode:j.current.closest(".react-flow")})}},[]),b.useEffect(()=>{K&&L&&(a&&!W&&!D?K.on("wheel.zoom",V=>{if(Jg(V,O))return!1;V.preventDefault(),V.stopImmediatePropagation();const G=K.property("__zoom").k||1;if(V.ctrlKey&&i){const de=Iu(V),se=iB(V),ye=G*Math.pow(2,se);L.scaleTo(K,ye,de,V);return}const z=V.deltaMode===1?20:1;let X=l===Op.Vertical?0:V.deltaX*z,ee=l===Op.Horizontal?0:V.deltaY*z;!mC()&&V.shiftKey&&l!==Op.Vertical&&(X=V.deltaY*z,ee=0),L.translateBy(K,-(X/G)*s,-(ee/G)*s,{internal:!0});const ae=A_(K.property("__zoom")),{onViewportChangeStart:fe,onViewportChange:ie,onViewportChangeEnd:we}=T.getState();clearTimeout(U.current),Y.current||(Y.current=!0,t==null||t(V,ae),fe==null||fe(ae)),Y.current&&(e==null||e(V,ae),ie==null||ie(ae),U.current=setTimeout(()=>{n==null||n(V,ae),we==null||we(ae),Y.current=!1},150))},{passive:!1}):typeof H<"u"&&K.on("wheel.zoom",function(V,G){if(!_&&V.type==="wheel"&&!V.ctrlKey||Jg(V,O))return null;V.preventDefault(),H.call(this,V,G)},{passive:!1}))},[D,a,l,K,L,H,W,i,_,O,t,e,n]),b.useEffect(()=>{L&&L.on("start",V=>{var X,ee;if(!V.sourceEvent||V.sourceEvent.internal)return null;q.current=(X=V.sourceEvent)==null?void 0:X.button;const{onViewportChangeStart:G}=T.getState(),z=A_(V.transform);k.current=!0,$.current=z,((ee=V.sourceEvent)==null?void 0:ee.type)==="mousedown"&&T.setState({paneDragging:!0}),G==null||G(z),t==null||t(V.sourceEvent,z)})},[L,t]),b.useEffect(()=>{L&&(D&&!k.current?L.on("zoom",null):D||L.on("zoom",V=>{var z;const{onViewportChange:G}=T.getState();if(T.setState({transform:[V.transform.x,V.transform.y,V.transform.k]}),M.current=!!(r&&oB(d,q.current??0)),(e||G)&&!((z=V.sourceEvent)!=null&&z.internal)){const X=A_(V.transform);G==null||G(X),e==null||e(V.sourceEvent,X)}}))},[D,L,e,d,r]),b.useEffect(()=>{L&&L.on("end",V=>{if(!V.sourceEvent||V.sourceEvent.internal)return null;const{onViewportChangeEnd:G}=T.getState();if(k.current=!1,T.setState({paneDragging:!1}),r&&oB(d,q.current??0)&&!M.current&&r(V.sourceEvent),M.current=!1,(n||G)&&XIe($.current,V.transform)){const z=A_(V.transform);$.current=z,clearTimeout(R.current),R.current=setTimeout(()=>{G==null||G(z),n==null||n(V.sourceEvent,z)},a?150:0)}})},[L,a,d,n,r]),b.useEffect(()=>{L&&L.filter(V=>{const G=W||o,z=i&&V.ctrlKey;if((d===!0||Array.isArray(d)&&d.includes(1))&&V.button===1&&V.type==="mousedown"&&(Jg(V,"react-flow__node")||Jg(V,"react-flow__edge")))return!0;if(!d&&!G&&!a&&!u&&!i||D||!u&&V.type==="dblclick"||Jg(V,O)&&V.type==="wheel"||Jg(V,P)&&(V.type!=="wheel"||a&&V.type==="wheel"&&!W)||!i&&V.ctrlKey&&V.type==="wheel"||!G&&!a&&!z&&V.type==="wheel"||!d&&(V.type==="mousedown"||V.type==="touchstart")||Array.isArray(d)&&!d.includes(V.button)&&V.type==="mousedown")return!1;const X=Array.isArray(d)&&d.includes(V.button)||!V.button||V.button<=1;return(!V.ctrlKey||V.type==="wheel")&&X})},[D,L,o,i,a,u,d,c,W]),J.createElement("div",{className:"react-flow__renderer",ref:j,style:q4},C)},JIe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function eDe(){const{userSelectionActive:e,userSelectionRect:t}=so(JIe,Na);return e&&t?J.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function aB(e,t){const n=t.parentNode||t.parentId,r=e.find(o=>o.id===n);if(r){const o=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(o>0||i>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,o>0&&(r.style.width+=o),i>0&&(r.style.height+=i),t.position.x<0){const a=Math.abs(t.position.x);r.position.x=r.position.x-a,r.style.width+=a,t.position.x=0}if(t.position.y<0){const a=Math.abs(t.position.y);r.position.y=r.position.y-a,r.style.height+=a,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function tDe(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,o)=>{const i=e.filter(s=>s.id===o.id);if(i.length===0)return r.push(o),r;const a={...o};for(const s of i)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&aB(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&aB(r,a);break}case"remove":return r}return r.push(a),r},n)}function nDe(e,t){return tDe(e,t)}const gd=(e,t)=>({id:e,type:"select",selected:t});function pv(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(gd(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(gd(r.id,!1))),n},[])}const bA=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},rDe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Jne=b.memo(({isSelecting:e,selectionMode:t=Zw.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const h=b.useRef(null),p=si(),x=b.useRef(0),y=b.useRef(0),w=b.useRef(),{userSelectionActive:_,elementsSelectable:C,dragging:O}=so(rDe,Na),P=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),x.current=0,y.current=0},R=H=>{i==null||i(H),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},T=H=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){H.preventDefault();return}a==null||a(H)},k=s?H=>s(H):void 0,M=H=>{const{resetSelectedElements:D,domNode:W}=p.getState();if(w.current=W==null?void 0:W.getBoundingClientRect(),!C||!e||H.button!==0||H.target!==h.current||!w.current)return;const{x:q,y:Y}=Vd(H,w.current);D(),p.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Y,x:q,y:Y}}),r==null||r(H)},j=H=>{const{userSelectionRect:D,nodeInternals:W,edges:q,transform:Y,onNodesChange:U,onEdgesChange:V,nodeOrigin:G,getNodes:z}=p.getState();if(!e||!w.current||!D)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const X=Vd(H,w.current),ee=D.startX??0,ae=D.startY??0,fe={...D,x:X.xye.id),se=we.map(ye=>ye.id);if(x.current!==se.length){x.current=se.length;const ye=pv(ie,se);ye.length&&(U==null||U(ye))}if(y.current!==de.length){y.current=de.length;const ye=pv(q,de);ye.length&&(V==null||V(ye))}p.setState({userSelectionRect:fe})},$=H=>{if(H.button!==0)return;const{userSelectionRect:D}=p.getState();!_&&D&&H.target===h.current&&(R==null||R(H)),p.setState({nodesSelectionActive:x.current>0}),P(),o==null||o(H)},L=H=>{_&&(p.setState({nodesSelectionActive:x.current>0}),o==null||o(H)),P()},K=C&&(e||_);return J.createElement("div",{className:Xs(["react-flow__pane",{dragging:O,selection:e}]),onClick:K?void 0:bA(R,h),onContextMenu:bA(T,h),onWheel:bA(k,h),onMouseEnter:K?void 0:l,onMouseDown:K?M:void 0,onMouseMove:K?j:u,onMouseUp:K?$:void 0,onMouseLeave:K?L:c,ref:h,style:q4},d,J.createElement(eDe,null))});Jne.displayName="Pane";function ere(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:ere(r,t):!1}function sB(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function oDe(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||o.parentId||!ere(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>{var i,a;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((i=o.positionAbsolute)==null?void 0:i.x)??0),y:n.y-(((a=o.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode||o.parentId,parentId:o.parentNode||o.parentId,width:o.width,height:o.height,expandParent:o.expandParent}})}function iDe(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function tre(e,t,n,r,o=[0,0],i){const a=iDe(e,e.extent||r);let s=a;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const d=n.get(l),{x:h,y:p}=Cv(d,o).positionAbsolute;s=d&&Ds(h)&&Ds(p)&&Ds(d.width)&&Ds(d.height)?[[h+e.width*o[0],p+e.height*o[1]],[h+d.width-e.width+e.width*o[0],p+d.height-e.height+e.height*o[1]]]:s}else i==null||i("005",gf.error005()),s=a;else if(e.extent&&l&&e.extent!=="parent"){const d=n.get(l),{x:h,y:p}=Cv(d,o).positionAbsolute;s=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let u={x:0,y:0};if(l){const d=n.get(l);u=Cv(d,o).positionAbsolute}const c=s&&s!=="parent"?M4(t,s):t;return{position:{x:c.x-u.x,y:c.y-u.y},positionAbsolute:c}}function SA({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const lB=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return i.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...N4(l)}})};function F1(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function LD({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),u=s.get(e);if(!u){l==null||l("012",gf.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):o([e])}function aDe(){const e=si();return b.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:i}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:i?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:i?o[1]*Math.round(l.y/o[1]):l.y,...l}},[])}function _A(e){return(t,n,r)=>e==null?void 0:e(t,r)}function nre({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const s=si(),[l,u]=b.useState(!1),c=b.useRef([]),d=b.useRef({x:null,y:null}),h=b.useRef(0),p=b.useRef(null),x=b.useRef({x:0,y:0}),y=b.useRef(null),w=b.useRef(!1),_=b.useRef(!1),C=b.useRef(!1),O=aDe();return b.useEffect(()=>{if(e!=null&&e.current){const P=Tl(e.current),R=({x:M,y:j})=>{const{nodeInternals:$,onNodeDrag:L,onSelectionDrag:K,updateNodePositions:H,nodeExtent:D,snapGrid:W,snapToGrid:q,nodeOrigin:Y,onError:U}=s.getState();d.current={x:M,y:j};let V=!1,G={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&D){const X=F4(c.current,Y);G=j4(X)}if(c.current=c.current.map(X=>{const ee={x:M-X.distance.x,y:j-X.distance.y};q&&(ee.x=W[0]*Math.round(ee.x/W[0]),ee.y=W[1]*Math.round(ee.y/W[1]));const ae=[[D[0][0],D[0][1]],[D[1][0],D[1][1]]];c.current.length>1&&D&&!X.extent&&(ae[0][0]=X.positionAbsolute.x-G.x+D[0][0],ae[1][0]=X.positionAbsolute.x+(X.width??0)-G.x2+D[1][0],ae[0][1]=X.positionAbsolute.y-G.y+D[0][1],ae[1][1]=X.positionAbsolute.y+(X.height??0)-G.y2+D[1][1]);const fe=tre(X,ee,$,ae,Y,U);return V=V||X.position.x!==fe.position.x||X.position.y!==fe.position.y,X.position=fe.position,X.positionAbsolute=fe.positionAbsolute,X}),!V)return;H(c.current,!0,!0),u(!0);const z=o?L:_A(K);if(z&&y.current){const[X,ee]=SA({nodeId:o,dragItems:c.current,nodeInternals:$});z(y.current,X,ee)}},T=()=>{if(!p.current)return;const[M,j]=Cne(x.current,p.current);if(M!==0||j!==0){const{transform:$,panBy:L}=s.getState();d.current.x=(d.current.x??0)-M/$[2],d.current.y=(d.current.y??0)-j/$[2],L({x:M,y:j})&&R(d.current)}h.current=requestAnimationFrame(T)},k=M=>{var Y;const{nodeInternals:j,multiSelectionActive:$,nodesDraggable:L,unselectNodesAndEdges:K,onNodeDragStart:H,onSelectionDragStart:D}=s.getState();_.current=!0;const W=o?H:_A(D);(!a||!i)&&!$&&o&&((Y=j.get(o))!=null&&Y.selected||K()),o&&i&&a&&LD({id:o,store:s,nodeRef:e});const q=O(M);if(d.current=q,c.current=oDe(j,L,q,o),W&&c.current){const[U,V]=SA({nodeId:o,dragItems:c.current,nodeInternals:j});W(M.sourceEvent,U,V)}};if(t)P.on(".drag",null);else{const M=lMe().on("start",j=>{const{domNode:$,nodeDragThreshold:L}=s.getState();L===0&&k(j),C.current=!1;const K=O(j);d.current=K,p.current=($==null?void 0:$.getBoundingClientRect())||null,x.current=Vd(j.sourceEvent,p.current)}).on("drag",j=>{var H,D;const $=O(j),{autoPanOnNodeDrag:L,nodeDragThreshold:K}=s.getState();if(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1&&(C.current=!0),!C.current){if(!w.current&&_.current&&L&&(w.current=!0,T()),!_.current){const W=$.xSnapped-(((H=d==null?void 0:d.current)==null?void 0:H.x)??0),q=$.ySnapped-(((D=d==null?void 0:d.current)==null?void 0:D.y)??0);Math.sqrt(W*W+q*q)>K&&k(j)}(d.current.x!==$.xSnapped||d.current.y!==$.ySnapped)&&c.current&&_.current&&(y.current=j.sourceEvent,x.current=Vd(j.sourceEvent,p.current),R($))}}).on("end",j=>{if(!(!_.current||C.current)&&(u(!1),w.current=!1,_.current=!1,cancelAnimationFrame(h.current),c.current)){const{updateNodePositions:$,nodeInternals:L,onNodeDragStop:K,onSelectionDragStop:H}=s.getState(),D=o?K:_A(H);if($(c.current,!1,!1),D){const[W,q]=SA({nodeId:o,dragItems:c.current,nodeInternals:L});D(j.sourceEvent,W,q)}}}).filter(j=>{const $=j.target;return!j.button&&(!n||!sB($,`.${n}`,e))&&(!r||sB($,r,e))});return P.call(M),()=>{P.on(".drag",null)}}}},[e,t,n,r,i,s,o,a,O]),l}function rre(){const e=si();return b.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:i,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=a().filter(C=>C.selected&&(C.draggable||c&&typeof C.draggable>"u")),h=s?l[0]:5,p=s?l[1]:5,x=n.isShiftPressed?4:1,y=n.x*h*x,w=n.y*p*x,_=d.map(C=>{if(C.positionAbsolute){const O={x:C.positionAbsolute.x+y,y:C.positionAbsolute.y+w};s&&(O.x=l[0]*Math.round(O.x/l[0]),O.y=l[1]*Math.round(O.y/l[1]));const{positionAbsolute:P,position:R}=tre(C,O,r,o,void 0,u);C.position=R,C.positionAbsolute=P}return C});i(_,!0,!1)},[])}const Ov={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var B1=e=>{const t=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:h,onMouseLeave:p,onContextMenu:x,onDoubleClick:y,style:w,className:_,isDraggable:C,isSelectable:O,isConnectable:P,isFocusable:R,selectNodesOnDrag:T,sourcePosition:k,targetPosition:M,hidden:j,resizeObserver:$,dragHandle:L,zIndex:K,isParent:H,noDragClassName:D,noPanClassName:W,initialized:q,disableKeyboardA11y:Y,ariaLabel:U,rfId:V,hasHandleBounds:G})=>{const z=si(),X=b.useRef(null),ee=b.useRef(null),ae=b.useRef(k),fe=b.useRef(M),ie=b.useRef(r),we=O||C||c||d||h||p,de=rre(),se=F1(n,z.getState,d),ye=F1(n,z.getState,h),Te=F1(n,z.getState,p),ge=F1(n,z.getState,x),Be=F1(n,z.getState,y),Ie=lt=>{const{nodeDragThreshold:Ye}=z.getState();if(O&&(!T||!C||Ye>0)&&LD({id:n,store:z,nodeRef:X}),c){const Kt=z.getState().nodeInternals.get(n);Kt&&c(lt,{...Kt})}},Ve=lt=>{if(!ND(lt)&&!Y)if(Rne.includes(lt.key)&&O){const Ye=lt.key==="Escape";LD({id:n,store:z,unselect:Ye,nodeRef:X})}else C&&u&&Object.prototype.hasOwnProperty.call(Ov,lt.key)&&(z.setState({ariaLiveMessage:`Moved selected node ${lt.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),de({x:Ov[lt.key].x,y:Ov[lt.key].y,isShiftPressed:lt.shiftKey}))};b.useEffect(()=>()=>{ee.current&&($==null||$.unobserve(ee.current),ee.current=null)},[]),b.useEffect(()=>{if(X.current&&!j){const lt=X.current;(!q||!G||ee.current!==lt)&&(ee.current&&($==null||$.unobserve(ee.current)),$==null||$.observe(lt),ee.current=lt)}},[j,q,G]),b.useEffect(()=>{const lt=ie.current!==r,Ye=ae.current!==k,Kt=fe.current!==M;X.current&&(lt||Ye||Kt)&&(lt&&(ie.current=r),Ye&&(ae.current=k),Kt&&(fe.current=M),z.getState().updateNodeDimensions([{id:n,nodeElement:X.current,forceUpdate:!0}]))},[n,r,k,M]);const ht=nre({nodeRef:X,disabled:j||!C,noDragClassName:D,handleSelector:L,nodeId:n,isSelectable:O,selectNodesOnDrag:T});return j?null:J.createElement("div",{className:Xs(["react-flow__node",`react-flow__node-${r}`,{[W]:C},_,{selected:u,selectable:O,parent:H,dragging:ht}]),ref:X,style:{zIndex:K,transform:`translate(${s}px,${l}px)`,pointerEvents:we?"all":"none",visibility:q?"visible":"hidden",...w},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:se,onMouseMove:ye,onMouseLeave:Te,onContextMenu:ge,onClick:Ie,onDoubleClick:Be,onKeyDown:R?Ve:void 0,tabIndex:R?0:void 0,role:R?"button":void 0,"aria-describedby":Y?void 0:`${Gne}-${V}`,"aria-label":U},J.createElement(wIe,{value:n},J.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:u,isConnectable:P,sourcePosition:k,targetPosition:M,dragging:ht,dragHandle:L,zIndex:K})))};return t.displayName="NodeWrapper",b.memo(t)};const sDe=e=>{const t=e.getNodes().filter(n=>n.selected);return{...F4(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function lDe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=si(),{width:o,height:i,x:a,y:s,transformString:l,userSelectionActive:u}=so(sDe,Na),c=rre(),d=b.useRef(null);if(b.useEffect(()=>{var x;n||(x=d.current)==null||x.focus({preventScroll:!0})},[n]),nre({nodeRef:d}),u||!o||!i)return null;const h=e?x=>{const y=r.getState().getNodes().filter(w=>w.selected);e(x,y)}:void 0,p=x=>{Object.prototype.hasOwnProperty.call(Ov,x.key)&&c({x:Ov[x.key].x,y:Ov[x.key].y,isShiftPressed:x.shiftKey})};return J.createElement("div",{className:Xs(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},J.createElement("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:o,height:i,top:s,left:a}}))}var uDe=b.memo(lDe);const cDe=e=>e.nodesSelectionActive,ore=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:h,selectionMode:p,onSelectionStart:x,onSelectionEnd:y,multiSelectionKeyCode:w,panActivationKeyCode:_,zoomActivationKeyCode:C,elementsSelectable:O,zoomOnScroll:P,zoomOnPinch:R,panOnScroll:T,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:$,defaultViewport:L,translateExtent:K,minZoom:H,maxZoom:D,preventScrolling:W,onSelectionContextMenu:q,noWheelClassName:Y,noPanClassName:U,disableKeyboardA11y:V})=>{const G=so(cDe),z=Jw(d),X=Jw(_),ee=X||$,ae=X||T,fe=z||h&&ee!==!0;return KIe({deleteKeyCode:s,multiSelectionKeyCode:w}),J.createElement(ZIe,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:i,elementsSelectable:O,zoomOnScroll:P,zoomOnPinch:R,panOnScroll:ae,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:j,panOnDrag:!z&&ee,defaultViewport:L,translateExtent:K,minZoom:H,maxZoom:D,zoomActivationKeyCode:C,preventScrolling:W,noWheelClassName:Y,noPanClassName:U},J.createElement(Jne,{onSelectionStart:x,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ee,isSelecting:!!fe,selectionMode:p},e,G&&J.createElement(uDe,{onSelectionContextMenu:q,noPanClassName:U,disableKeyboardA11y:V})))};ore.displayName="FlowRenderer";var fDe=b.memo(ore);function dDe(e){return so(b.useCallback(n=>e?jne(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function hDe(e){const t={input:B1(e.input||Une),default:B1(e.default||DD),output:B1(e.output||Wne),group:B1(e.group||z4)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,i)=>(o[i]=B1(e[i]||DD),o),n);return{...t,...r}}const pDe=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},mDe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),ire=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:a}=so(mDe,Na),s=dDe(e.onlyRenderVisibleElements),l=b.useRef(),u=b.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const h=d.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));i(h)});return l.current=c,c},[]);return b.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),J.createElement("div",{className:"react-flow__nodes",style:q4},s.map(c=>{var R,T,k;let d=c.type||"default";e.nodeTypes[d]||(a==null||a("003",gf.error003(d)),d="default");const h=e.nodeTypes[d]||e.nodeTypes.default,p=!!(c.draggable||t&&typeof c.draggable>"u"),x=!!(c.selectable||o&&typeof c.selectable>"u"),y=!!(c.connectable||n&&typeof c.connectable>"u"),w=!!(c.focusable||r&&typeof c.focusable>"u"),_=e.nodeExtent?M4(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,C=(_==null?void 0:_.x)??0,O=(_==null?void 0:_.y)??0,P=pDe({x:C,y:O,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return J.createElement(h,{key:c.id,id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||Ft.Bottom,targetPosition:c.targetPosition||Ft.Top,hidden:c.hidden,xPos:C,yPos:O,xPosOrigin:P.x,yPosOrigin:P.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:p,isSelectable:x,isConnectable:y,isFocusable:w,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((R=c[Kr])==null?void 0:R.z)??0,isParent:!!((T=c[Kr])!=null&&T.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel,hasHandleBounds:!!((k=c[Kr])!=null&&k.handleBounds)})}))};ire.displayName="NodeRenderer";var gDe=b.memo(ire);const vDe=(e,t,n)=>n===Ft.Left?e-t:n===Ft.Right?e+t:e,yDe=(e,t,n)=>n===Ft.Top?e-t:n===Ft.Bottom?e+t:e,uB="react-flow__edgeupdater",cB=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:a,type:s})=>J.createElement("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:a,className:Xs([uB,`${uB}-${s}`]),cx:vDe(t,r,e),cy:yDe(n,r,e),r,stroke:"transparent",fill:"transparent"}),wDe=()=>!0;var ev=e=>{const t=({id:n,className:r,type:o,data:i,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:w,source:_,target:C,sourceX:O,sourceY:P,targetX:R,targetY:T,sourcePosition:k,targetPosition:M,elementsSelectable:j,hidden:$,sourceHandleId:L,targetHandleId:K,onContextMenu:H,onMouseEnter:D,onMouseMove:W,onMouseLeave:q,reconnectRadius:Y,onReconnect:U,onReconnectStart:V,onReconnectEnd:G,markerEnd:z,markerStart:X,rfId:ee,ariaLabel:ae,isFocusable:fe,isReconnectable:ie,pathOptions:we,interactionWidth:de,disableKeyboardA11y:se})=>{const ye=b.useRef(null),[Te,ge]=b.useState(!1),[Be,Ie]=b.useState(!1),Ve=si(),ht=b.useMemo(()=>`url('#${jD(X,ee)}')`,[X,ee]),lt=b.useMemo(()=>`url('#${jD(z,ee)}')`,[z,ee]);if($)return null;const Ye=Rt=>{var Ce;const{edges:an,addSelectedEdges:nr,unselectNodesAndEdges:$n,multiSelectionActive:Mr}=Ve.getState(),Ee=an.find(me=>me.id===n);Ee&&(j&&(Ve.setState({nodesSelectionActive:!1}),Ee.selected&&Mr?($n({nodes:[],edges:[Ee]}),(Ce=ye.current)==null||Ce.blur()):nr([n])),a&&a(Rt,Ee))},Kt=$1(n,Ve.getState,s),vn=$1(n,Ve.getState,H),un=$1(n,Ve.getState,D),on=$1(n,Ve.getState,W),oe=$1(n,Ve.getState,q),he=(Rt,an)=>{if(Rt.button!==0)return;const{edges:nr,isValidConnection:$n}=Ve.getState(),Mr=an?C:_,Ee=(an?K:L)||null,Ce=an?"target":"source",me=$n||wDe,Ae=an,Le=nr.find(Ut=>Ut.id===n);Ie(!0),V==null||V(Rt,Le,Ce);const ze=Ut=>{Ie(!1),G==null||G(Ut,Le,Ce)};Fne({event:Rt,handleId:Ee,nodeId:Mr,onConnect:Ut=>U==null?void 0:U(Le,Ut),isTarget:Ae,getState:Ve.getState,setState:Ve.setState,isValidConnection:me,edgeUpdaterType:Ce,onReconnectEnd:ze})},Se=Rt=>he(Rt,!0),Ge=Rt=>he(Rt,!1),Qe=()=>ge(!0),Ke=()=>ge(!1),nt=!j&&!a,At=Rt=>{var an;if(!se&&Rne.includes(Rt.key)&&j){const{unselectNodesAndEdges:nr,addSelectedEdges:$n,edges:Mr}=Ve.getState();Rt.key==="Escape"?((an=ye.current)==null||an.blur(),nr({edges:[Mr.find(Ce=>Ce.id===n)]})):$n([n])}};return J.createElement("g",{className:Xs(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:l,animated:u,inactive:nt,updating:Te}]),onClick:Ye,onDoubleClick:Kt,onContextMenu:vn,onMouseEnter:un,onMouseMove:on,onMouseLeave:oe,onKeyDown:fe?At:void 0,tabIndex:fe?0:void 0,role:fe?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":ae===null?void 0:ae||`Edge from ${_} to ${C}`,"aria-describedby":fe?`${Kne}-${ee}`:void 0,ref:ye},!Be&&J.createElement(e,{id:n,source:_,target:C,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,data:i,style:w,sourceX:O,sourceY:P,targetX:R,targetY:T,sourcePosition:k,targetPosition:M,sourceHandleId:L,targetHandleId:K,markerStart:ht,markerEnd:lt,pathOptions:we,interactionWidth:de}),ie&&J.createElement(J.Fragment,null,(ie==="source"||ie===!0)&&J.createElement(cB,{position:k,centerX:O,centerY:P,radius:Y,onMouseDown:Se,onMouseEnter:Qe,onMouseOut:Ke,type:"source"}),(ie==="target"||ie===!0)&&J.createElement(cB,{position:M,centerX:R,centerY:T,radius:Y,onMouseDown:Ge,onMouseEnter:Qe,onMouseOut:Ke,type:"target"})))};return t.displayName="EdgeWrapper",b.memo(t)};function xDe(e){const t={default:ev(e.default||vC),straight:ev(e.bezier||L4),step:ev(e.step||D4),smoothstep:ev(e.step||IR),simplebezier:ev(e.simplebezier||I4)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,i)=>(o[i]=ev(e[i]||vC),o),n);return{...t,...r}}function fB(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,o=((n==null?void 0:n.y)||0)+t.y,i=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case Ft.Top:return{x:r+i/2,y:o};case Ft.Right:return{x:r+i,y:o+a/2};case Ft.Bottom:return{x:r+i/2,y:o+a};case Ft.Left:return{x:r,y:o+a/2}}}function dB(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const bDe=(e,t,n,r,o,i)=>{const a=fB(n,e,t),s=fB(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function SDe({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=j4({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),h=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*h)>0}function hB(e){var r,o,i,a,s;const t=((r=e==null?void 0:e[Kr])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const _De=[{level:0,isMaxLevel:!0,edges:[]}];function EDe(e,t,n=!1){let r=-1;const o=e.reduce((a,s)=>{var c,d;const l=Ds(s.zIndex);let u=l?s.zIndex:0;if(n){const h=t.get(s.target),p=t.get(s.source),x=s.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),y=Math.max(((c=p==null?void 0:p[Kr])==null?void 0:c.z)||0,((d=h==null?void 0:h[Kr])==null?void 0:d.z)||0,1e3);u=(l?s.zIndex:0)+(x?y:0)}return a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),i=Object.entries(o).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return i.length===0?_De:i}function CDe(e,t,n){const r=so(b.useCallback(o=>e?o.edges.filter(i=>{const a=t.get(i.source),s=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&SDe({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return EDe(r,t,n)}const ODe=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),RDe=({color:e="none",strokeWidth:t=1})=>J.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),pB={[gC.Arrow]:ODe,[gC.ArrowClosed]:RDe};function PDe(e){const t=si();return b.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(pB,e)?pB[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",gf.error009(e)),null)},[e])}const TDe=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=PDe(t);return l?J.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:s,refX:"0",refY:"0"},J.createElement(l,{color:n,strokeWidth:a})):null},ADe=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,i)=>([i.markerStart,i.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=jD(a,t);r.includes(s)||(o.push({id:s,color:a.color||e,...a}),r.push(s))}}),o),[]).sort((o,i)=>o.id.localeCompare(i.id))},are=({defaultColor:e,rfId:t})=>{const n=so(b.useCallback(ADe({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((i,a)=>i.id!==o[a].id)));return J.createElement("defs",null,n.map(r=>J.createElement(TDe,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};are.displayName="MarkerDefinitions";var kDe=b.memo(are);const NDe=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),sre=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeContextMenu:a,onEdgeMouseEnter:s,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:c,onEdgeDoubleClick:d,onReconnect:h,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:y,children:w,disableKeyboardA11y:_})=>{const{edgesFocusable:C,edgesUpdatable:O,elementsSelectable:P,width:R,height:T,connectionMode:k,nodeInternals:M,onError:j}=so(NDe,Na),$=CDe(t,M,n);return R?J.createElement(J.Fragment,null,$.map(({level:L,edges:K,isMaxLevel:H})=>J.createElement("svg",{key:L,style:{zIndex:L},width:R,height:T,className:"react-flow__edges react-flow__container"},H&&J.createElement(kDe,{defaultColor:e,rfId:r}),J.createElement("g",null,K.map(D=>{const[W,q,Y]=hB(M.get(D.source)),[U,V,G]=hB(M.get(D.target));if(!Y||!G)return null;let z=D.type||"default";o[z]||(j==null||j("011",gf.error011(z)),z="default");const X=o[z]||o.default,ee=k===dm.Strict?V.target:(V.target??[]).concat(V.source??[]),ae=dB(q.source,D.sourceHandle),fe=dB(ee,D.targetHandle),ie=(ae==null?void 0:ae.position)||Ft.Bottom,we=(fe==null?void 0:fe.position)||Ft.Top,de=!!(D.focusable||C&&typeof D.focusable>"u"),se=D.reconnectable||D.updatable,ye=typeof h<"u"&&(se||O&&typeof se>"u");if(!ae||!fe)return j==null||j("008",gf.error008(ae,D)),null;const{sourceX:Te,sourceY:ge,targetX:Be,targetY:Ie}=bDe(W,ae,ie,U,fe,we);return J.createElement(X,{key:D.id,id:D.id,className:Xs([D.className,i]),type:z,data:D.data,selected:!!D.selected,animated:!!D.animated,hidden:!!D.hidden,label:D.label,labelStyle:D.labelStyle,labelShowBg:D.labelShowBg,labelBgStyle:D.labelBgStyle,labelBgPadding:D.labelBgPadding,labelBgBorderRadius:D.labelBgBorderRadius,style:D.style,source:D.source,target:D.target,sourceHandleId:D.sourceHandle,targetHandleId:D.targetHandle,markerEnd:D.markerEnd,markerStart:D.markerStart,sourceX:Te,sourceY:ge,targetX:Be,targetY:Ie,sourcePosition:ie,targetPosition:we,elementsSelectable:P,onContextMenu:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:u,onClick:c,onEdgeDoubleClick:d,onReconnect:h,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:y,rfId:r,ariaLabel:D.ariaLabel,isFocusable:de,isReconnectable:ye,pathOptions:"pathOptions"in D?D.pathOptions:void 0,interactionWidth:D.interactionWidth,disableKeyboardA11y:_})})))),w):null};sre.displayName="EdgeRenderer";var MDe=b.memo(sre);const jDe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function IDe({children:e}){const t=so(jDe);return J.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function DDe(e){const t=Zne(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const LDe={[Ft.Left]:Ft.Right,[Ft.Right]:Ft.Left,[Ft.Top]:Ft.Bottom,[Ft.Bottom]:Ft.Top},lre=({nodeId:e,handleType:t,style:n,type:r=xd.Bezier,CustomComponent:o,connectionStatus:i})=>{var T,k,M;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=so(b.useCallback(j=>({fromNode:j.nodeInternals.get(e),handleId:j.connectionHandleId,toX:(j.connectionPosition.x-j.transform[0])/j.transform[2],toY:(j.connectionPosition.y-j.transform[1])/j.transform[2],connectionMode:j.connectionMode}),[e]),Na),d=(T=a==null?void 0:a[Kr])==null?void 0:T.handleBounds;let h=d==null?void 0:d[t];if(c===dm.Loose&&(h=h||(d==null?void 0:d[t==="source"?"target":"source"])),!a||!h)return null;const p=s?h.find(j=>j.id===s):h[0],x=p?p.x+p.width/2:(a.width??0)/2,y=p?p.y+p.height/2:a.height??0,w=(((k=a.positionAbsolute)==null?void 0:k.x)??0)+x,_=(((M=a.positionAbsolute)==null?void 0:M.y)??0)+y,C=p==null?void 0:p.position,O=C?LDe[C]:null;if(!C||!O)return null;if(o)return J.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:p,fromX:w,fromY:_,toX:l,toY:u,fromPosition:C,toPosition:O,connectionStatus:i});let P="";const R={sourceX:w,sourceY:_,sourcePosition:C,targetX:l,targetY:u,targetPosition:O};return r===xd.Bezier?[P]=Nne(R):r===xd.Step?[P]=MD({...R,borderRadius:0}):r===xd.SmoothStep?[P]=MD(R):r===xd.SimpleBezier?[P]=kne(R):P=`M${w},${_} ${l},${u}`,J.createElement("path",{d:P,fill:"none",className:"react-flow__connection-path",style:n})};lre.displayName="ConnectionLine";const $De=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function FDe({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:a,width:s,height:l,connectionStatus:u}=so($De,Na);return!(o&&i&&s&&a)?null:J.createElement("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},J.createElement("g",{className:Xs(["react-flow__connection",u])},J.createElement(lre,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function mB(e,t){return b.useRef(null),si(),b.useMemo(()=>t(e),[e])}const ure=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:x,onSelectionStart:y,onSelectionEnd:w,connectionLineType:_,connectionLineStyle:C,connectionLineComponent:O,connectionLineContainerStyle:P,selectionKeyCode:R,selectionOnDrag:T,selectionMode:k,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:$,deleteKeyCode:L,onlyRenderVisibleElements:K,elementsSelectable:H,selectNodesOnDrag:D,defaultViewport:W,translateExtent:q,minZoom:Y,maxZoom:U,preventScrolling:V,defaultMarkerColor:G,zoomOnScroll:z,zoomOnPinch:X,panOnScroll:ee,panOnScrollSpeed:ae,panOnScrollMode:fe,zoomOnDoubleClick:ie,panOnDrag:we,onPaneClick:de,onPaneMouseEnter:se,onPaneMouseMove:ye,onPaneMouseLeave:Te,onPaneScroll:ge,onPaneContextMenu:Be,onEdgeContextMenu:Ie,onEdgeMouseEnter:Ve,onEdgeMouseMove:ht,onEdgeMouseLeave:lt,onReconnect:Ye,onReconnectStart:Kt,onReconnectEnd:vn,reconnectRadius:un,noDragClassName:on,noWheelClassName:oe,noPanClassName:he,elevateEdgesOnSelect:Se,disableKeyboardA11y:Ge,nodeOrigin:Qe,nodeExtent:Ke,rfId:nt})=>{const At=mB(e,hDe),Rt=mB(t,xDe);return DDe(i),J.createElement(fDe,{onPaneClick:de,onPaneMouseEnter:se,onPaneMouseMove:ye,onPaneMouseLeave:Te,onPaneContextMenu:Be,onPaneScroll:ge,deleteKeyCode:L,selectionKeyCode:R,selectionOnDrag:T,selectionMode:k,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:M,panActivationKeyCode:j,zoomActivationKeyCode:$,elementsSelectable:H,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:z,zoomOnPinch:X,zoomOnDoubleClick:ie,panOnScroll:ee,panOnScrollSpeed:ae,panOnScrollMode:fe,panOnDrag:we,defaultViewport:W,translateExtent:q,minZoom:Y,maxZoom:U,onSelectionContextMenu:x,preventScrolling:V,noDragClassName:on,noWheelClassName:oe,noPanClassName:he,disableKeyboardA11y:Ge},J.createElement(IDe,null,J.createElement(MDe,{edgeTypes:Rt,onEdgeClick:s,onEdgeDoubleClick:u,onlyRenderVisibleElements:K,onEdgeContextMenu:Ie,onEdgeMouseEnter:Ve,onEdgeMouseMove:ht,onEdgeMouseLeave:lt,onReconnect:Ye,onReconnectStart:Kt,onReconnectEnd:vn,reconnectRadius:un,defaultMarkerColor:G,noPanClassName:he,elevateEdgesOnSelect:!!Se,disableKeyboardA11y:Ge,rfId:nt},J.createElement(FDe,{style:C,type:_,component:O,containerStyle:P})),J.createElement("div",{className:"react-flow__edgelabel-renderer"}),J.createElement(gDe,{nodeTypes:At,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:D,onlyRenderVisibleElements:K,noPanClassName:he,noDragClassName:on,disableKeyboardA11y:Ge,nodeOrigin:Qe,nodeExtent:Ke,rfId:nt})))};ure.displayName="GraphView";var BDe=b.memo(ure);const $D=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],fd={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:$D,nodeExtent:$D,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:dm.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:hIe,isValidConnection:void 0},zDe=()=>xke((e,t)=>({...fd,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:xA(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",i=typeof r<"u",a=o?xA(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:h}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce((y,w)=>{const _=o.get(w.id);if(_!=null&&_.hidden)o.set(_.id,{..._,[Kr]:{..._[Kr],handleBounds:void 0}});else if(_){const C=N4(w.nodeElement);!!(C.width&&C.height&&(_.width!==C.width||_.height!==C.height||w.forceUpdate))&&(o.set(_.id,{..._,[Kr]:{..._[Kr],handleBounds:{source:lB(".source",w.nodeElement,h,u),target:lB(".target",w.nodeElement,h,u)}},...C}),y.push({id:_.id,type:"dimensions",dimensions:C}))}return y},[]);Xne(o,u);const x=a||i&&!a&&Qne(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:x}),(p==null?void 0:p.length)>0&&(r==null||r(p))},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:i}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:o};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});i(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(i){const u=nDe(n,s()),c=xA(u,o,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>gd(l,!0)):(a=pv(i(),n),s=pv(o,[])),T_({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>gd(l,!0)):(a=pv(o,n),s=pv(i(),[])),T_({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=n||i(),s=r||o,l=a.map(c=>(c.selected=!1,gd(c.id,!1))),u=s.map(c=>gd(c.id,!1));T_({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r==null||r.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r==null||r.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),i=r().filter(s=>s.selected).map(s=>gd(s.id,!1)),a=n.filter(s=>s.selected).map(s=>gd(s.id,!1));T_({changedNodes:i,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=M4(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:i,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return!1;const u=Ud.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[o,i]],d=a==null?void 0:a.constrain()(u,c,l);return a.transform(s,d),r[0]!==d.x||r[1]!==d.y||r[2]!==d.k},cancelConnection:()=>e({connectionNodeId:fd.connectionNodeId,connectionHandleId:fd.connectionHandleId,connectionHandleType:fd.connectionHandleType,connectionStatus:fd.connectionStatus,connectionStartHandle:fd.connectionStartHandle,connectionEndHandle:fd.connectionEndHandle}),reset:()=>e({...fd})}),Object.is),cre=({children:e})=>{const t=b.useRef(null);return t.current||(t.current=zDe()),J.createElement(oIe,{value:t.current},e)};cre.displayName="ReactFlowProvider";const fre=({children:e})=>b.useContext(jR)?J.createElement(J.Fragment,null,e):J.createElement(cre,null,e);fre.displayName="ReactFlowWrapper";const qDe={input:Une,default:DD,output:Wne,group:z4},UDe={default:vC,straight:L4,step:D4,smoothstep:IR,simplebezier:I4},VDe=[0,0],WDe=[15,15],HDe={x:0,y:0,zoom:1},GDe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},KDe=b.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=qDe,edgeTypes:a=UDe,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:h,onConnect:p,onConnectStart:x,onConnectEnd:y,onClickConnectStart:w,onClickConnectEnd:_,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:T,onNodeDragStart:k,onNodeDrag:M,onNodeDragStop:j,onNodesDelete:$,onEdgesDelete:L,onSelectionChange:K,onSelectionDragStart:H,onSelectionDrag:D,onSelectionDragStop:W,onSelectionContextMenu:q,onSelectionStart:Y,onSelectionEnd:U,connectionMode:V=dm.Strict,connectionLineType:G=xd.Bezier,connectionLineStyle:z,connectionLineComponent:X,connectionLineContainerStyle:ee,deleteKeyCode:ae="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ie=!1,selectionMode:we=Zw.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:se=mC()?"Meta":"Control",zoomActivationKeyCode:ye=mC()?"Meta":"Control",snapToGrid:Te=!1,snapGrid:ge=WDe,onlyRenderVisibleElements:Be=!1,selectNodesOnDrag:Ie=!0,nodesDraggable:Ve,nodesConnectable:ht,nodesFocusable:lt,nodeOrigin:Ye=VDe,edgesFocusable:Kt,edgesUpdatable:vn,elementsSelectable:un,defaultViewport:on=HDe,minZoom:oe=.5,maxZoom:he=2,translateExtent:Se=$D,preventScrolling:Ge=!0,nodeExtent:Qe,defaultMarkerColor:Ke="#b1b1b7",zoomOnScroll:nt=!0,zoomOnPinch:At=!0,panOnScroll:Rt=!1,panOnScrollSpeed:an=.5,panOnScrollMode:nr=Op.Free,zoomOnDoubleClick:$n=!0,panOnDrag:Mr=!0,onPaneClick:Ee,onPaneMouseEnter:Ce,onPaneMouseMove:me,onPaneMouseLeave:Ae,onPaneScroll:Le,onPaneContextMenu:ze,children:Vt,onEdgeContextMenu:Ut,onEdgeDoubleClick:Sn,onEdgeMouseEnter:at,onEdgeMouseMove:vt,onEdgeMouseLeave:Lt,onEdgeUpdate:kt,onEdgeUpdateStart:Jn,onEdgeUpdateEnd:Xr,onReconnect:na,onReconnectStart:Qr,onReconnectEnd:Js,reconnectRadius:ko=10,edgeUpdaterRadius:ra=10,onNodesChange:oa,onEdgesChange:ms,noDragClassName:La="nodrag",noWheelClassName:el="nowheel",noPanClassName:ia="nopan",fitView:Ko=!1,fitViewOptions:$a,connectOnClick:gs=!0,attributionPosition:tl,proOptions:Di,defaultEdgeOptions:Fa,elevateNodesOnSelect:Zl=!0,elevateEdgesOnSelect:nl=!1,disableKeyboardA11y:li=!1,autoPanOnConnect:rl=!0,autoPanOnNodeDrag:dr=!0,connectionRadius:Jl=20,isValidConnection:lc,onError:ol,style:eu,id:uc,nodeDragThreshold:We,...gt},nn)=>{const Wn=uc||"1";return J.createElement("div",{...gt,style:{...eu,...GDe},ref:nn,className:Xs(["react-flow",o]),"data-testid":"rf__wrapper",id:uc},J.createElement(fre,null,J.createElement(BDe,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:h,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:T,nodeTypes:i,edgeTypes:a,connectionLineType:G,connectionLineStyle:z,connectionLineComponent:X,connectionLineContainerStyle:ee,selectionKeyCode:fe,selectionOnDrag:ie,selectionMode:we,deleteKeyCode:ae,multiSelectionKeyCode:se,panActivationKeyCode:de,zoomActivationKeyCode:ye,onlyRenderVisibleElements:Be,selectNodesOnDrag:Ie,defaultViewport:on,translateExtent:Se,minZoom:oe,maxZoom:he,preventScrolling:Ge,zoomOnScroll:nt,zoomOnPinch:At,zoomOnDoubleClick:$n,panOnScroll:Rt,panOnScrollSpeed:an,panOnScrollMode:nr,panOnDrag:Mr,onPaneClick:Ee,onPaneMouseEnter:Ce,onPaneMouseMove:me,onPaneMouseLeave:Ae,onPaneScroll:Le,onPaneContextMenu:ze,onSelectionContextMenu:q,onSelectionStart:Y,onSelectionEnd:U,onEdgeContextMenu:Ut,onEdgeDoubleClick:Sn,onEdgeMouseEnter:at,onEdgeMouseMove:vt,onEdgeMouseLeave:Lt,onReconnect:na??kt,onReconnectStart:Qr??Jn,onReconnectEnd:Js??Xr,reconnectRadius:ko??ra,defaultMarkerColor:Ke,noDragClassName:La,noWheelClassName:el,noPanClassName:ia,elevateEdgesOnSelect:nl,rfId:Wn,disableKeyboardA11y:li,nodeOrigin:Ye,nodeExtent:Qe}),J.createElement(DIe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:x,onConnectEnd:y,onClickConnectStart:w,onClickConnectEnd:_,nodesDraggable:Ve,nodesConnectable:ht,nodesFocusable:lt,edgesFocusable:Kt,edgesUpdatable:vn,elementsSelectable:un,elevateNodesOnSelect:Zl,minZoom:oe,maxZoom:he,nodeExtent:Qe,onNodesChange:oa,onEdgesChange:ms,snapToGrid:Te,snapGrid:ge,connectionMode:V,translateExtent:Se,connectOnClick:gs,defaultEdgeOptions:Fa,fitView:Ko,fitViewOptions:$a,onNodesDelete:$,onEdgesDelete:L,onNodeDragStart:k,onNodeDrag:M,onNodeDragStop:j,onSelectionDrag:D,onSelectionDragStart:H,onSelectionDragStop:W,noPanClassName:ia,nodeOrigin:Ye,rfId:Wn,autoPanOnConnect:rl,autoPanOnNodeDrag:dr,onError:ol,connectionRadius:Jl,isValidConnection:lc,nodeDragThreshold:We}),J.createElement(jIe,{onSelectionChange:K}),Vt,J.createElement(sIe,{proOptions:Di,position:tl}),J.createElement(zIe,{rfId:Wn,disableKeyboardA11y:li})))});KDe.displayName="ReactFlow";const dre=b.memo(({data:e})=>{var o,i,a,s,l,u;const t=e.graphVariant,n=(o=e.taskRun)!=null&&o.startedAt?new Date(e.taskRun.startedAt).getTime():0,r=(i=e.taskRun)!=null&&i.finishedAt?new Date(e.taskRun.finishedAt).getTime():0;return v.jsxs("div",{className:"flex min-w-fit grow flex-col justify-start",children:[(t=="default"||t=="input_only")&&v.jsx(cy,{type:"target",position:Ft.Left,style:{visibility:"hidden"},isConnectable:!1}),v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{children:v.jsxs("div",{className:je("step-run-card mb-1 w-full rounded-sm px-2 py-3 font-mono text-xs font-semibold text-[#050c1c] shadow-md dark:text-[#ffffff]","transition-all duration-300 ease-in-out","cursor-pointer","flex flex-row items-center justify-between gap-4 border-2 dark:border-[1px]","bg-[#ffffff] dark:bg-[#050c1c]","opacity-80 hover:opacity-100","h-[30px]"),onClick:()=>e.onClick(),children:[((a=e.taskRun)==null?void 0:a.status)==It.RUNNING&&v.jsx("span",{className:"spark mask-gradient absolute inset-0 h-[100%] w-[100%] animate-flip overflow-hidden [mask:linear-gradient(#ccc,_transparent_50%)] before:absolute before:aspect-square before:w-[200%] before:rotate-[-90deg] before:animate-rotate before:bg-[conic-gradient(from_0deg,transparent_0_340deg,#ccc_360deg)] before:content-[''] before:[inset:0_auto_auto_50%] before:[translate:-50%_-15%]"}),v.jsx("span",{className:"step-run-backdrop absolute inset-[1px] bg-background transition-colors duration-200"}),v.jsxs("div",{className:"z-10 flex w-full flex-row items-center justify-between gap-4",children:[v.jsxs("div",{className:"z-10 flex flex-row items-center justify-start gap-2",children:[v.jsx(IJ,{status:(s=e.taskRun)==null?void 0:s.status,isSkipped:e.isSkipped}),v.jsx("div",{className:"max-w-[160px] flex-grow truncate",children:e.taskName})]}),((l=e.taskRun)==null?void 0:l.finishedAt)&&((u=e.taskRun)==null?void 0:u.startedAt)&&v.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:OY(r-n)})]}),(t=="default"||t=="output_only")&&v.jsx(cy,{type:"source",position:Ft.Right,style:{visibility:"hidden"},isConnectable:!1})]})}),v.jsx(Hs,{children:e.taskName})]})})]})}),gtt=({onClick:e})=>{const{shape:t,taskRuns:n,taskEvents:r,isLoading:o,isError:i}=pke(),a=b.useMemo(()=>{const u=new Set;for(const c of r)c.eventType===Nn.SKIPPED&&u.add(c.taskId);return u},[r]),s=b.useMemo(()=>!t||!n?[]:t.map(u=>{const c=u.stepId??"placeholder",d=(u==null?void 0:u.childrenStepIds)||[],h=t.filter(p=>c&&p.childrenStepIds.includes(c)).map(p=>p.stepId);return{node:c,children:d,parents:h}}),[t,n]),l=b.useMemo(()=>{const u=[],c=new Set,d=(x,y)=>{u[y]||(u[y]=[]),u[y].push(x),c.add(x.stepId)},h=x=>{if(c.has(x.stepId))return;const y=s.find(w=>w.node==x.stepId);if(!y||y.parents.length===0)d(x,0);else{const w=Math.max(...y.parents.map(_=>{const C=t.find(O=>O.stepId===_);return C?u.findIndex(O=>O.includes(C)):-1}));w>-1&&d(x,w+1)}};let p=100;for(;c.sizev.jsx("div",{className:"flex h-full min-w-fit grow flex-col justify-start",children:u.map(d=>{const h=n.find(p=>p.metadata.id===d.taskExternalId);return v.jsx(dre,{data:{taskRun:h,graphVariant:"none",onClick:()=>e(h==null?void 0:h.metadata.id),childWorkflowsCount:(h==null?void 0:h.numSpawnedChildren)||0,taskName:d.taskName,isSkipped:h?a.has(h.metadata.id):!1}},d.stepId)})},c))})},YDe=({taskRunId:e})=>{const{refetchInterval:t}=xf(),n=Mn({...Yr.v1Tasks.get(e),refetchInterval:t});return{taskRun:n.data,isLoading:n.isLoading,isError:n.isError}},XDe=({onClick:e,taskRunId:t})=>{const{taskRun:n,isLoading:r,isError:o}=YDe({taskRunId:t}),{isSkipped:i}=b4({taskRunId:t,limit:1});return r||o||!n?null:v.jsx("div",{className:"relative flex flex-1 flex-row gap-1 rounded-sm p-4",children:v.jsx("div",{className:"flex h-fit w-full grow flex-col justify-start",children:v.jsx(dre,{data:{taskRun:n,graphVariant:"none",onClick:()=>e(n.metadata.id),childWorkflowsCount:n.numSpawnedChildren,taskName:n.displayName,isSkipped:i}})})})};function QDe(e){switch(e){case Nn.FAILED:case Nn.RATE_LIMIT_ERROR:case Nn.SCHEDULING_TIMED_OUT:case Nn.TIMED_OUT:case Nn.CANCELLED:return lE.CRITICAL;case Nn.REASSIGNED:case Nn.REQUEUED_NO_WORKER:case Nn.REQUEUED_RATE_LIMIT:case Nn.RETRIED_BY_USER:case Nn.RETRYING:case Nn.DURABLE_RESTORING:return lE.WARNING;case Nn.DURABLE_EVICTED:return"EVICTION";default:return lE.INFO}}function ZDe(e){switch(e){case Nn.ASSIGNED:return"Assigned to worker";case Nn.STARTED:return"Started";case Nn.FINISHED:return"Completed";case Nn.FAILED:return"Failed";case Nn.CANCELLED:return"Cancelled";case Nn.RETRYING:return"Retrying";case Nn.REQUEUED_NO_WORKER:return"Requeuing (no worker available)";case Nn.REQUEUED_RATE_LIMIT:return"Requeuing (rate limit)";case Nn.SCHEDULING_TIMED_OUT:return"Scheduling timed out";case Nn.TIMEOUT_REFRESHED:return"Timeout refreshed";case Nn.REASSIGNED:return"Reassigned";case Nn.TIMED_OUT:return"Execution timed out";case Nn.SLOT_RELEASED:return"Slot released";case Nn.RETRIED_BY_USER:return"Replayed by user";case Nn.ACKNOWLEDGED:return"Acknowledged by worker";case Nn.CREATED:return"Created";case Nn.RATE_LIMIT_ERROR:return"Rate limit error";case Nn.SENT_TO_WORKER:return"Sent to worker";case Nn.QUEUED:return"Queued";case Nn.SKIPPED:return"Skipped";case Nn.COULD_NOT_SEND_TO_WORKER:return"Could not send to worker";case Nn.DURABLE_EVICTED:return"Durable task evicted";case Nn.DURABLE_RESTORING:return"Durable task restoring";case void 0:return"Unknown";default:const t=e;throw new Error(`Unhandled case: ${t}`)}}const gB={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",90:"grey"},vB={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"};function JDe(e){let t=null,n=null,r="",o=[];const i=[];let a={};for(let s=0;s{const o=t5e(n);return o?v.jsx("span",{style:o,children:n.text},r):n.text})})}function r5e(e){return!!e&&Object.keys(e).length>0}function o5e(e){return JSON.stringify(e,null,2)}const i5e={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},a5e=e=>{if(e=="EVICTION_NOTICE")return{bg:"bg-indigo-500/20",text:"text-indigo-800 dark:text-indigo-300",dot:"bg-indigo-500",content:"info"};if(e=="RESTORE_NOTICE")return{bg:"bg-indigo-500/20",text:"text-indigo-800 dark:text-indigo-300",dot:"bg-indigo-500",content:"info"};switch(e){case Xi.ERROR:return{bg:"bg-red-500/10",text:"text-red-600 dark:text-red-400",dot:"bg-red-500",content:"error"};case Xi.WARN:return{bg:"bg-yellow-500/10",text:"text-yellow-600 dark:text-yellow-400",dot:"bg-yellow-500",content:"warn"};case Xi.INFO:return{bg:"bg-green-500/10",text:"text-green-600 dark:text-green-400",dot:"bg-green-500",content:"info"};case Xi.DEBUG:return{bg:"bg-gray-500/10",text:"text-gray-500 dark:text-gray-400",dot:"bg-gray-500",content:"debug"};default:const t=e;throw new Error(`Unhandled log level: ${t}`)}},s5e=e=>new Date(e).toLocaleString("sv",i5e).replace(",",".");function l5e(e,t){if(t)return t;switch(e){case It.COMPLETED:return"Task completed with no logs.";case It.FAILED:return"Task failed with no logs.";case It.CANCELLED:return"Task was cancelled with no logs.";case It.RUNNING:case It.QUEUED:return"Waiting for logs...";default:return"No logs available."}}const u5e=({level:e})=>{const t=a5e(e);return v.jsxs("span",{className:je("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-[11px] font-medium leading-none uppercase tracking-wide",t.bg,t.text),children:[v.jsx("span",{className:je("size-1.5 rounded-full",t.dot)}),t.content]})};function c5e(e){return e!=null}function f5e({error:e}){return v.jsxs(Xy,{children:[v.jsx(Qy,{onClick:t=>t.stopPropagation(),className:"ml-2 shrink-0 inline-flex items-center rounded border border-red-500/30 px-1.5 py-0.5 font-mono text-[10px] text-red-500 dark:text-red-400 hover:border-red-500/60 hover:bg-red-500/5 transition-colors cursor-pointer",children:"View Error"}),v.jsx(_m,{className:"w-[300px] max-w-[90vw] border-border bg-popover p-0 shadow-lg sm:w-[400px] md:w-[500px] lg:w-[600px]",align:"start",children:v.jsx("div",{className:"w-[300px] max-w-[90vw] p-4 sm:w-[400px] md:w-[500px] lg:w-[600px]",children:v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center gap-2 border-b border-border pb-2",children:[v.jsx(nwe,{className:"h-5 w-5 text-destructive"}),v.jsx("h3",{className:"font-medium text-foreground",children:"Error Details"})]}),v.jsx("div",{className:"h-[400px] overflow-hidden rounded-md border border-border bg-muted/50",children:v.jsx("div",{className:"scrollbar-thin scrollbar-track-muted scrollbar-thumb-muted-foreground h-full overflow-x-hidden overflow-y-scroll p-4 font-mono text-sm text-foreground",children:v.jsx("pre",{className:"min-h-[500px] whitespace-pre-wrap break-words",children:e||"No error message found"})})})]})})})]})}function d5e({metadata:e}){const t=o5e(e);return v.jsxs(Xy,{children:[v.jsxs(Qy,{onClick:n=>n.stopPropagation(),className:"ml-2 shrink-0 inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground transition-colors hover:border-foreground/40 hover:bg-muted hover:text-foreground",children:[v.jsx("span",{"aria-hidden":"true",children:"{}"}),"Fields"]}),v.jsx(_m,{className:"w-[320px] max-w-[90vw] border-border bg-popover p-0 text-left shadow-lg sm:w-[460px] md:w-[560px] lg:w-[680px]",align:"start",children:v.jsxs("div",{className:"space-y-3 p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 border-b border-border pb-2",children:[v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:"{}"}),v.jsx("h3",{className:"font-medium text-foreground",children:"Log Fields"})]}),v.jsx("div",{className:"max-h-[420px] overflow-auto rounded-md border border-border bg-muted/50",children:b.createElement("pre",{className:"m-0 whitespace-pre-wrap break-words p-4 text-left font-mono text-xs leading-relaxed text-foreground"},t)})]})})]})}function hre({logs:e,onScrollToBottom:t,onScrollToTop:n,onAtTopChange:r,isLoading:o,taskStatus:i,onViewRun:a,emptyMessage:s,emptyComponent:l,showAttempt:u=!0,showTaskName:c=!1}){const[d,h]=b.useState(!0),p=b.useRef(null),x=b.useRef(0),y=b.useRef(!0),w=b.useRef(!1),_=b.useRef(!1),[C,O]=b.useState(),P=b.useMemo(()=>e.length===0?[]:[...e].sort((H,D)=>!H.timestamp||!D.timestamp?0:new Date(D.timestamp).getTime()-new Date(H.timestamp).getTime()),[e]),{hasInstance:R,hasAttempt:T}=b.useMemo(()=>{let H=!1,D=!1;for(const W of P)if(W.instance&&(H=!0),u&&W.attempt!==void 0&&(D=!0),H&&D)break;return{hasInstance:H,hasAttempt:D}},[P,u]),k=b.useCallback(()=>{const H=p.current;if(!H)return;const{scrollTop:D,scrollHeight:W,clientHeight:q}=H,Y=W-q;if(Y<=0)return;const U=D/Y,V=Dx.current,z=U<.05;r&&z!==y.current&&(y.current=z,r(z));const X=V&&U<.3;X&&!w.current&&n&&n(),w.current=X;const ee=G&&U>.7;ee&&!_.current&&t&&t(),_.current=ee,x.current=D},[n,t,r]),M=i===It.RUNNING,j="flex-1 min-h-0",$=["auto","72px",R&&"minmax(100px, 200px)",T&&"auto",c&&"minmax(100px, 200px)","minmax(0, 1fr)"].filter(Boolean).join(" ");if(o)return v.jsx("div",{className:je(j,"rounded-lg border bg-background flex items-center justify-center"),children:v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading logs..."})});if(e.length===0)return l?v.jsx("div",{className:je(j,"flex items-center justify-center"),children:l}):v.jsx("div",{className:je(j,"rounded-lg border bg-background flex items-center justify-center"),children:v.jsx("span",{className:"text-sm text-muted-foreground",children:l5e(i,s)})});const K=3+(R?1:0)+(T?1:0)+(c?1:0);return v.jsxs("div",{className:"relative rounded-lg border bg-background overflow-hidden flex flex-col flex-1 min-h-0",children:[M&&v.jsxs("div",{className:"absolute top-2 right-4 z-20 flex items-center gap-2 text-xs text-muted-foreground bg-background/80 px-2 py-1 rounded-md",children:[v.jsxs("span",{className:"relative flex h-2 w-2",children:[v.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),v.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),v.jsx("span",{children:"Live"})]}),v.jsxs("div",{className:je("grid overflow-y-auto",j),style:{gridTemplateColumns:$,alignContent:"start"},ref:p,onScroll:k,children:[v.jsxs("div",{className:"col-span-full grid grid-cols-subgrid sticky top-0 z-10 bg-gradient-to-b from-background/95 to-background/0 from-75%",style:{gridColumn:`1 / span ${K}`},children:[v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>h(H=>!H),children:"Timestamp"}),v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Level"}),R&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Instance"}),T&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Attempt"}),c&&v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Task"}),v.jsx("div",{className:"px-2 py-3 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Message"})]}),P.filter(H=>c5e(H.line)).map((H,D)=>v.jsxs("div",{className:"col-span-full items-baseline grid grid-cols-subgrid border-b border-border/40 hover:bg-muted/30 transition-colors group",style:{gridColumn:`1 / span ${K}`},children:[v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground whitespace-nowrap tabular-nums",children:H.timestamp?d?v.jsx(Dl,{date:H.timestamp}):s5e(H.timestamp):"—"}),v.jsx("div",{className:"px-3 py-1.5 flex items-center",children:H.level?v.jsx(u5e,{level:H.level}):v.jsx("span",{className:"text-xs text-muted-foreground/50",children:"—"})}),R&&v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground truncate",children:H.instance||"—"}),T&&v.jsx("div",{className:"px-3 py-1.5 font-mono text-xs text-muted-foreground text-center tabular-nums",children:H.attempt??"—"}),c&&v.jsx("div",{className:je("px-3 py-1.5 font-mono text-xs text-muted-foreground truncate",a&&H.taskExternalId&&"cursor-pointer hover:text-foreground hover:underline"),onClick:a&&H.taskExternalId?()=>a(H.taskExternalId):void 0,children:H.taskDisplayName||"—"}),v.jsxs("div",{className:je("px-3 py-1.5 font-mono text-xs text-foreground flex flex-row items-baseline gap-x-1 min-w-0"),onClick:()=>{O(W=>W===D?void 0:D)},onMouseEnter:W=>{const q=W.currentTarget;q.scrollWidth>q.clientWidth?q.style.cursor="pointer":q.style.cursor="default"},children:[v.jsx("span",{className:je("min-w-0",C===D?"whitespace-normal break-words":"truncate",H.linkTo&&C!==D&&"max-w-[calc(100%-1rem)]"),children:v.jsx(n5e,{text:H.line})}),r5e(H.metadata)&&v.jsx(d5e,{metadata:H.metadata}),H.error&&v.jsx(f5e,{error:H.error}),H.linkTo&&v.jsx(Bl,{children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsx(Ul,{to:H.linkTo.destination,params:H.linkTo.params,className:"ml-1 shrink-0 text-muted-foreground hover:text-foreground transition-colors",onClick:W=>{W.stopPropagation()},children:v.jsx(Wp,{className:"size-3"})})}),v.jsx(Hs,{children:H.linkTo.hoverText})]})})]})]},`${H.timestamp}-${H.instance??""}-${H.attempt??""}`))]})]})}const h5e=1e3;function p5e({taskRunId:e,workflowRunId:t,isDurable:n,durableTaskIds:r}){const o=!e&&!!t||!!e&&!!t&&e!==t,{tenantId:i}=ds(),{refetchInterval:a}=xf(),{open:s}=d0(),l=b.useRef(!1),u=Mn({...Yr.v1TaskEvents.list(i,{limit:50,offset:0},e,t),refetchInterval:a}),c=Tpe({queries:[...r??[],...e?[e]:[]].map(p=>({...Yr.v1DurableTasks.eventLog(i,p),refetchInterval:5e3}))}),d=b.useMemo(()=>{var y;const p=g5e(((y=u.data)==null?void 0:y.rows)??[],o,i),x=c.flatMap(w=>E5e(w.data??[]));return m5e(p,x)},[u.data,o,i,c]),h=b.useCallback(p=>{l.current||(l.current=!0,s({type:"task-run-details",content:{taskRunId:p,defaultOpenTab:J4.Activity,showViewTaskRunButton:!0}}),setTimeout(()=>{l.current=!1},100))},[s]);return u.isLoading?v.jsx(Jy,{}):v.jsx("div",{className:"flex flex-1 min-h-0 flex-col",children:v.jsx(hre,{logs:d,emptyMessage:"No events found.",showTaskName:o,onViewRun:p=>{p&&h(p)}})})}function m5e(e,t){const n=[...e,...t];return n.sort((r,o)=>r.timestamp?o.timestamp?r.timestampo.timestamp?1:0:1:-1),n}function g5e(e,t,n){return e.map(r=>{const o=QDe(r.eventType);let i;if(r.eventType==="DURABLE_EVICTED")i="EVICTION_NOTICE";else if(r.eventType==="DURABLE_RESTORING")i="RESTORE_NOTICE";else switch(o){case"CRITICAL":i=Xi.ERROR;break;case"WARNING":i=Xi.WARN;break;case"INFO":i=Xi.INFO;break;default:i=Xi.DEBUG;break}let a=ZDe(r.eventType);r.message&&(a+=`: ${r.message}`);const s=r.workerId&&r.workerId!==RY?{destination:ft.tenantWorkerRoute.to,params:{tenant:n,worker:r.workerId},hoverText:"View worker"}:void 0;return{timestamp:r.timestamp,level:i,line:a,taskDisplayName:r.taskDisplayName,taskExternalId:r.taskId,error:r.errorMessage,linkTo:s}})}const fy=3;function v5e(e){return e===0?"0s":e%36e5===0?`${e/36e5}h`:e%6e4===0?`${e/6e4}m`:e%1e3===0?`${e/1e3}s`:`${e}ms`}function yB(e){switch(e.kind){case Gu.SLEEP:return e.sleepDurationMs!=null?`sleeping for ${v5e(e.sleepDurationMs)}`:"sleeping";case Gu.USER_EVENT:return e.eventKey?`waiting for event ${e.eventKey}`:"waiting for event";case Gu.CHILD_WORKFLOW:return e.workflowName?`waiting for child ${e.workflowName} to complete`:"waiting for child to complete";default:return String(e.kind??"unknown").toLowerCase()}}function y5e(e){switch(e.kind){case Gu.SLEEP:return"sleep completed";case Gu.USER_EVENT:return e.eventKey?`received event ${e.eventKey}`:"event received";case Gu.CHILD_WORKFLOW:return e.workflowName?`child ${e.workflowName} completed`:"child completed";default:return"completed"}}function wB(e){if(e.or&&e.or.length>0){const t=e.or.slice(0,fy).map(yB),n=e.or.length-fy;return n>0&&t.push(`${n} more`),`any of: ${t.join(", ")}`}return e.kind?yB(e):"waiting"}function w5e(e){if(e.length===0)return"waiting";if(e.length===1)return wB(e[0]);const t=e.slice(0,fy).map(wB),n=e.length-fy;return n>0?`${t.join(", ")}, and ${n} more`:`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function x5e(e){if(e.length===0)return"completed";if(e.length===1){const t=e[0];return t.or&&t.or.length>0?"condition satisfied":y5e(t)}return"all conditions satisfied"}function k_(e,t){const n=e.kind===Hy.WAIT_FOR?"durable wait":"durable run",r=e.branchId>1?` b${e.branchId}`:"";return`[${n}${r}] ${t}`}function pre(e){var n,r,o;const t=(n=e.userMessage)==null?void 0:n.trim();if(e.kind===Hy.RUN){const i=(r=e.waitData)==null?void 0:r[0];return((o=e.waitData)==null?void 0:o.length)===1&&!(i!=null&&i.or)&&(i==null?void 0:i.kind)===Gu.CHILD_WORKFLOW?i.workflowName?`spawned child ${i.workflowName}`:"spawned child":t||"spawned child"}return t||(e.waitData&&e.waitData.length>0?w5e(e.waitData):"waiting")}function mre(e){var t,n;if(e.kind===Hy.RUN){const r=(t=e.waitData)==null?void 0:t[0];return((n=e.waitData)==null?void 0:n.length)===1&&!(r!=null&&r.or)&&(r==null?void 0:r.kind)===Gu.CHILD_WORKFLOW?r.workflowName?`child ${r.workflowName} completed`:"child completed":"completed"}return e.waitData&&e.waitData.length>0?x5e(e.waitData):"completed"}function b5e(e){const t=[];let n=null;for(const r of e)if(r.kind===Hy.RUN){if(n){const o=n.entries[n.entries.length-1];if(new Date(r.insertedAt).getTime()-new Date(o.insertedAt).getTime()<=h5e){n.entries.push(r);continue}t.push(n)}n={entries:[r]}}else n&&(t.push(n),n=null),t.push(r);return n&&t.push(n),t}function gre(e){return e.map(t=>{var r,o;const n=(r=t.waitData)==null?void 0:r[0];return((o=t.waitData)==null?void 0:o.length)===1&&!(n!=null&&n.or)&&(n==null?void 0:n.kind)===Gu.CHILD_WORKFLOW?n.workflowName??null:null})}function S5e(e){if(e.length===1)return pre(e[0]);const t=gre(e);if(t.every(i=>i===t[0])&&t[0]!==null)return`spawned ${e.length}x ${t[0]} children`;const r=t.slice(0,fy).map(i=>i??"unknown"),o=t.length-fy;return o>0?`spawned children: ${r.join(", ")}, and ${o} more`:`spawned children: ${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`}function _5e(e){if(e.length===1)return mre(e[0]);const t=gre(e);return t.every(r=>r===t[0])&&t[0]!==null?`${e.length}x ${t[0]} children completed`:"children completed"}function E5e(e){const t=[],n=e.filter(o=>o.kind!==Hy.MEMO),r=b5e(n);for(const o of r)if("entries"in o){const{entries:i}=o,a=i[0];t.push({timestamp:a.insertedAt,level:"EVICTION_NOTICE",line:k_(a,S5e(i)),taskDisplayName:a.taskDisplayName,taskExternalId:a.taskExternalId});const s=i.filter(l=>l.isSatisfied&&l.satisfiedAt);if(s.length>0){const l=s.reduce((u,c)=>c.satisfiedAt>u?c.satisfiedAt:u,s[0].satisfiedAt);t.push({timestamp:l,level:Xi.INFO,line:k_(a,_5e(i)),taskDisplayName:a.taskDisplayName,taskExternalId:a.taskExternalId})}}else t.push({timestamp:o.insertedAt,level:"EVICTION_NOTICE",line:k_(o,pre(o)),taskDisplayName:o.taskDisplayName,taskExternalId:o.taskExternalId}),o.isSatisfied&&o.satisfiedAt&&t.push({timestamp:o.satisfiedAt,level:Xi.INFO,line:k_(o,mre(o)),taskDisplayName:o.taskDisplayName,taskExternalId:o.taskExternalId});return t}function Ro(e,t={}){const{unit:n="ms",precise:r=!1}=t,o=n==="ns"?e/1e6:e;if(r){if(n==="ns"&&o<1){const u=e/1e3;return u<1?"<1µs":`${Math.round(u)}µs`}if(o<1)return"<1ms";if(o<1e3)return`${Math.round(o)}ms`;if(o<6e4)return`${(o/1e3).toFixed(2)}s`;const s=Math.floor(o/6e4),l=(o%6e4/1e3).toFixed(1);return`${s}m ${l}s`}if(o<=0)return"0s";if(o<1)return"<1ms";if(o<1e3)return`${Math.round(o)}ms`;if(o<6e4)return`${(o/1e3).toFixed(1)}s`;const i=Math.floor(o/6e4),a=Math.floor(o%6e4/1e3);return a>0?`${i}m${a}s`:`${i}m`}function vre(e,t){const n=new Date(e),r=(a,s=2)=>String(a).padStart(s,"0"),o=`${n.getUTCFullYear()}-${r(n.getUTCMonth()+1)}-${r(n.getUTCDate())}`,i=`${r(n.getUTCHours())}:${r(n.getUTCMinutes())}:${r(n.getUTCSeconds())}`;return t!=null&&t.ms?`${o} ${i}.${r(n.getUTCMilliseconds(),3)} UTC`:`${o} ${i} UTC`}function yre({ticks:e,totalMs:t,offsetMs:n=0}){return v.jsxs("div",{className:"relative h-5 overflow-hidden",children:[e.map(r=>r>=t||r/t>.85?null:v.jsx("div",{className:"absolute flex h-full items-center",style:{left:`${t>0?r/t*100:0}%`},children:v.jsx("span",{className:"whitespace-nowrap font-mono text-xs uppercase tracking-wider text-muted-foreground",children:Ro(r+n)})},r)),v.jsx("div",{className:"absolute right-0 z-10 flex h-full items-center",children:v.jsx("span",{className:"whitespace-nowrap rounded-sm bg-background px-1 font-mono text-xs uppercase tracking-wider text-muted-foreground",children:Ro(t+n)})})]})}const Mi={START_STEP_RUN:"hatchet.start_step_run",ENGINE_START_STEP_RUN:"hatchet.engine.start_step_run",ENGINE_QUEUED:"hatchet.engine.queued",ENGINE_WORKFLOW_RUN:"hatchet.engine.workflow_run",ENGINE_EVENT:"hatchet.engine.event",RUN_WORKFLOW:"hatchet.run_workflow",START_WORKFLOW:"hatchet.start_workflow"},ki={STEP_RUN_ID:"hatchet.step_run_id",STEP_NAME:"hatchet.step_name",SPAN_SOURCE:"hatchet.span_source",ACTION_ID:"hatchet.action_id",WORKFLOW_NAME:"hatchet.workflow_name",WORKFLOW_RUN_ID:"hatchet.workflow_run_id",INSTRUMENTOR:"instrumentor",CHILD_WORKFLOW_RUN_ID:"hatchet.child_workflow_run_id"};function ec(e){var t;return(t=e.spanAttributes)==null?void 0:t[ki.STEP_RUN_ID]}function wre(e){var t;return((t=e.spanAttributes)==null?void 0:t[ki.SPAN_SOURCE])==="engine"}function t0(e){return e.spanName===Mi.START_STEP_RUN||e.spanName===Mi.ENGINE_START_STEP_RUN}function Eb(e,t){let n=0;for(let r=0;r0&&Eb(e,n=>t.has(n.spanId))}function bre(e){const t=new Map;for(const n of e)n.parentSpanId&&t.set(n.parentSpanId,(t.get(n.parentSpanId)??0)+1);return t}function Sre(e,t){let n=Date.now();for(const r of e){const o=new Date(r.createdAt).getTime();oa.spanId===i.spanId)||r.children.push(i);n.add(o.spanId)}xre(e,n);for(const r of e)_re(r.children)}function Ere(e){const t=new Map;for(const n of e){const r=ec(n);n.spanName===Mi.ENGINE_QUEUED&&r&&t.set(r,n)}if(t.size>0){const n=new Set;for(const r of e)if(t0(r)){const o=ec(r);o&&t.has(o)&&(r.queuedPhase=t.get(o),n.add(r.queuedPhase.spanId))}xre(e,n)}for(const n of e)Ere(n.children)}function Cre(e){var n,r;const t=new Map;for(const o of e)if(o.spanName===Mi.RUN_WORKFLOW){const i=(n=o.spanAttributes)==null?void 0:n[ki.CHILD_WORKFLOW_RUN_ID];i&&t.set(i,o)}if(t.size>0){const o=new Set;for(const i of e){if(i.spanName!==Mi.ENGINE_WORKFLOW_RUN)continue;const a=(r=i.spanAttributes)==null?void 0:r[ki.WORKFLOW_RUN_ID];if(!a)continue;const s=t.get(a);s&&(s.children.push(i),o.add(i.spanId))}o.size>0&&Eb(e,i=>o.has(i.spanId))}for(const o of e)Cre(o.children)}function Ore(e){Eb(e,t=>t.spanName===Mi.ENGINE_QUEUED);for(const t of e)Ore(t.children)}function Rre(e,t){const n=new Set;for(const i of e)if(t0(i)){const a=ec(i);a&&n.add(a)}const r=bre(e);let o=0;for(let i=0;i{const i=new Set;for(const a of o){if(!a.parentSpanId)continue;const s=ec(a);if(!s)continue;const l=t.get(s);l&&l.spanId!==a.spanId&&!n.has(l.spanId)&&(l.children.push(a),i.add(a.spanId))}i.size>0&&Eb(o,a=>i.has(a.spanId));for(const a of o)n.add(a.spanId),r(a.children),n.delete(a.spanId)};r(e)}function O5e(e,t){if(e.length<=1)return;const n=bre(e);Eb(e,r=>{if(!r.parentSpanId||t.has(r.parentSpanId))return!1;const o=(n.get(r.parentSpanId)??0)<=1,i=r.spanName===Mi.RUN_WORKFLOW;return o||i})}function Tre(e,t){for(const n of e){const r=ec(n);r&&t.add(r),Tre(n.children,t)}}function R5e(e,t){const n=new Set;for(const o of t)o.status==="RUNNING"&&n.add(o.externalId);if(n.size===0)return;const r=o=>{for(const i of o){if(t0(i)&&wre(i)){const a=ec(i);a&&n.has(a)&&(i.inProgress=!0)}r(i.children)}};r(e)}const P5e=new Date("2020-01-01").getTime();function T5e(e){return{[ki.SPAN_SOURCE]:"engine",[ki.STEP_RUN_ID]:e.externalId,[ki.STEP_NAME]:e.displayName}}function Are(e,t,n){const r=new Set;Tre(e,r);for(const o of t){if(r.has(o.externalId)||o.status!=="QUEUED"&&o.status!=="RUNNING")continue;const i=new Date(o.createdAt).getTime();if(!i||i{const r=(t.queuedPhase??t).createdAt,o=(n.queuedPhase??n).createdAt;return ro?1:0});for(const t of e)t.children.length>1&&kre(t.children)}function yC(e,t){const n=new Date(t.createdAt).getTime();if(Number.isNaN(n))return;let r;if(t.startedAt){const i=new Date(t.startedAt).getTime();if(!Number.isNaN(i)&&i>=n)r=i;else{const a=new Date(e.createdAt).getTime();r=Number.isNaN(a)?Date.now():a}}else{const i=new Date(e.createdAt).getTime();r=Number.isNaN(i)?Date.now():i}const o=r-n;o<=0||(e.queuedPhase={spanId:"__synthetic_workflow_queued__",parentSpanId:e.spanId,spanName:Mi.ENGINE_QUEUED,statusCode:Lr.OK,durationNs:o*1e6,createdAt:t.createdAt,spanAttributes:{[ki.SPAN_SOURCE]:"engine"},children:[]})}function ex(e){let t=!1,n=!1;for(const r of e.children)ex(r)&&(n=!0),r.hasErrorInSubtree&&(t=!0);return e.hasErrorInSubtree=e.statusCode===Lr.ERROR||t,e.inProgress===!0||n}function A5e(e){const t=new Map;for(const r of e)t.set(r.spanId,{spanId:r.spanId,parentSpanId:r.parentSpanId,spanName:r.spanName,statusCode:r.statusCode,statusMessage:r.statusMessage,durationNs:r.durationNs,createdAt:r.createdAt,spanAttributes:r.spanAttributes,children:[]});const n=[];for(const r of e){const o=t.get(r.spanId);if(r.parentSpanId&&r.parentSpanId!==r.spanId){const i=t.get(r.parentSpanId);i?i.children.push(o):n.push(o)}else n.push(o)}return Cr(n.length>0),{rootSpans:n,spanMap:t}}function Nre(e,t){if(e.length<=1){t&&e.length>0&&yC(e[0],t);for(const l of e)ex(l)&&(l.inProgress=!0);return e}let n=1/0,r=-1/0;for(const l of e){const u=new Date(l.createdAt).getTime();ur&&(r=c)}const o=e.some(l=>l.statusCode===Lr.ERROR),i=e.map(l=>{var u;return(u=l.spanAttributes)==null?void 0:u[ki.ACTION_ID]}).find(l=>l==null?void 0:l.includes(":")),a=i?i.split(":")[0]:void 0,s=Sre(e,{statusCode:o?Lr.ERROR:Lr.OK,durationNs:(r-n)*1e6,createdAt:new Date(n).toISOString(),spanAttributes:{[ki.INSTRUMENTOR]:"hatchet",...a&&{[ki.WORKFLOW_NAME]:a}}});return t&&yC(s,t),ex(s)&&(s.inProgress=!0),[s]}function EA(e){return e.spanName===Mi.ENGINE_WORKFLOW_RUN||e.spanName===Mi.ENGINE_EVENT}function k5e(e){if(e.durationNs>0||e.children.length===0)return;const t=new Date(e.createdAt).getTime();let n=t;for(const r of e.children){if(r.durationNs<=0)continue;const i=new Date(r.createdAt).getTime()+r.durationNs/1e6;i>n&&(n=i)}n>t&&(e.durationNs=(n-t)*1e6)}function N5e(e,t){if(e.some(EA)||e.length<=1){if(t&&e.length>0){const r=e.find(EA)??e[0];yC(r,t)}for(const r of e)EA(r)&&k5e(r),ex(r)&&(r.inProgress=!0);return e}return Nre(e,t)}function M5e(e,t){const n=[];if(e!=null&&e.length&&Are(n,e,void 0),n.length===0){if(t){const r=Sre([],{createdAt:new Date().toISOString()});if(yC(r,t),r.queuedPhase)return ex(r),[r]}return[]}return Nre(n,t)}const bB=(e,t,n,r)=>{if(!e)return M5e(t,n);const o=(r==null?void 0:r.enableTraceInProgressSynthesis)??!0,{rootSpans:i,spanMap:a}=A5e(e);if(_re(i),Ere(i),Cre(i),o?Rre(i,a):Ore(i),C5e(i),O5e(i,a),t!=null&&t.length){const s=i.length===1?i[0].spanId:void 0,l=i.length===1?i[0].children:i;Are(l,t,s),R5e(l,t)}return kre(i),N5e(i,n)};function Mre(e,t){var n;for(const r of e){if(ec(r)===t||r.spanName===Mi.ENGINE_WORKFLOW_RUN&&((n=r.spanAttributes)==null?void 0:n[ki.WORKFLOW_RUN_ID])===t)return r;const o=Mre(r.children,t);if(o)return o}}function Zd(e){return e.hasErrorInSubtree!==void 0?e.hasErrorInSubtree:e.statusCode===Lr.ERROR?!0:e.children.some(Zd)}function Cb(e){var t;return((t=e.spanAttributes)==null?void 0:t["hatchet.span_source"])==="engine"}function j5e(e){const t=[...e];let n=0,r=!1;for(;t.length>0;){const o=t.pop();if(t.push(...o.children),!o.spanId.startsWith("__synthetic_")){if(n++,!Cb(o))return!1;o.statusCode===Lr.OK&&(r=!0)}}return n>0&&r}function Ls(e){return!e.spanId.startsWith("__synthetic_")||!e.queuedPhase?!1:!e.children.some(n=>n.inProgress)&&!e.inProgress}function tx(e){return!!e.queuedPhase&&e.durationNs<=0&&!e.inProgress}function I5e(e){var t,n;return((t=e.spanAttributes)==null?void 0:t["hatchet.task_name"])??((n=e.spanAttributes)==null?void 0:n["hatchet.step_name"])}function zu(e){var t;return t0(e)&&((t=e.spanAttributes)!=null&&t["hatchet.step_run_id"])?e.spanAttributes["hatchet.step_run_id"]:e.spanId}function U4(e){return e.inProgress||Ls(e)||tx(e)?"bg-yellow-500":Zd(e)?"bg-red-500":"bg-green-500"}function D5e(e){return Cb(e)&&e.spanName==="hatchet.engine.queued"}function jre(e){switch(e){case Lr.OK:return"OK";case Lr.ERROR:return"Error";default:return"Unset"}}function L5e(e,t){return t?"Queued":e.inProgress?"In Progress":e.statusCode!==Lr.ERROR&&Zd(e)?"Error (child)":jre(e.statusCode)}function $5e(e){return e.inProgress||Ls(e)||tx(e)?"bg-yellow-500":Cb(e)?e.statusCode===Lr.ERROR?"bg-red-500":"bg-green-500":Zd(e)?"bg-red-500":"bg-green-500"}const SB=5,F5e=20;function BD(e){return new Date(e.createdAt).getTime()}function _B(e,t){return BD(e)-BD(t)}function B5e(e){return e.matchesFilter??!0}function z5e(e){return e.isContextOnly??!1}const n0=40,wC=12,zD=8,CA=50;function Ire(e,t){if(e.length<=SB)return e.map(i=>({kind:"span",span:i}));const n=new Map;for(const i of e){const a=i.spanName;n.has(a)||n.set(a,[]),n.get(a).push(i)}const r=[],o=new Set;for(const i of e){const a=i.spanName,s=n.get(a);if(s.length<=SB)r.push({kind:"span",span:i});else if(!o.has(a)){o.add(a);const l=s.filter(p=>Zd(p)),u=s.filter(p=>!Zd(p));l.sort(_B),u.sort(_B);const c=[...l,...u];let d=1/0,h=-1/0;for(const p of c){const x=BD(p);d=Math.min(d,x),h=Math.max(h,x+p.durationNs/1e6)}r.push({kind:"group",group:{groupId:`__group_${t||"root"}_${a}`,groupName:a,spans:c,errorCount:l.length,totalCount:c.length,earliestStartMs:d,latestEndMs:h}})}}return r}function Dre(e,t,n,r=0,o=[],i){const a=[],s=Ire(e,i);function l(u,c,d,h){const p=u.children.length>0,x=zu(u),y=t.has(x)&&p;a.push({kind:"span",rowKey:x,span:u,depth:c,isLastChild:d,connectorFlags:[...h],hasChildren:p,isExpanded:y,matchesFilter:B5e(u),isContextOnly:z5e(u)}),y&&a.push(...Dre(u.children,t,n,c+1,[...h,!d],u.spanId))}return s.forEach((u,c)=>{const d=c===s.length-1;if(u.kind==="span")l(u.span,r,d,o);else{const{group:h}=u,p=t.has(h.groupId);if(a.push({kind:"group",rowKey:h.groupId,group:h,depth:r,isLastChild:d,connectorFlags:[...o],isExpanded:p}),p){const x=n[h.groupId]??F5e,y=Math.min(x,h.spans.length),w=h.spans.slice(0,y),_=h.totalCount-y,C=[...o,!d];w.forEach((O,P)=>{const R=P===w.length-1&&_<=0;l(O,r+1,R,C)}),_>0&&a.push({kind:"show-more",rowKey:`${h.groupId}__show-more`,groupId:h.groupId,remaining:_,currentVisible:y,depth:r+1,connectorFlags:C})}}}),a}function q5e(e){const t=new Set;return(function n(r){for(const o of r)t.add(o.spanId),n(o.children)})(e.children),t}function V4({hovered:e,selected:t,childOfSelected:n}){return t?"bg-primary/10":e?"bg-muted/40":n?"bg-primary/5":""}function xC(e){if(e<=0)return{ticks:[0],maxTick:0};const t=[1,2,5,10,20,50,100,200,500,1e3,2e3,5e3,1e4,2e4,3e4,6e4,12e4,3e5,6e5],r=e/5;let o=t[t.length-1];for(const s of t)if(s>=r){o=s;break}const i=[];for(let s=0;s20));s+=o);const a=i[i.length-1]||0;return e-a>o*.3&&i.push(e),{ticks:i,maxTick:i[i.length-1]||e}}const U5e=30;function W4(e){const[t,n]=b.useState(Date.now);return b.useEffect(()=>{if(!e)return;n(Date.now());const r=setInterval(()=>n(Date.now()),U5e);return()=>clearInterval(r)},[e]),t}function V5e({activePct:e,totalMs:t}){return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/60",style:{left:`${e*100}%`}}),v.jsx("div",{className:"pointer-events-none absolute top-0.5 z-[7] whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",style:{left:`${e*100}%`,transform:e<.08?"none":e>.92?"translateX(-100%)":"translateX(-50%)"},children:Ro(t*e)})]})}function W5e({visibleRange:e,totalMs:t}){return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/70",style:{left:`${e.startPct*100}%`}}),v.jsx("div",{className:"pointer-events-none absolute inset-y-0 z-[5] w-px bg-foreground/70",style:{left:`${e.endPct*100}%`}}),v.jsxs("div",{className:"pointer-events-none absolute z-[8] flex items-center",style:{left:`${e.startPct*100}%`,width:`${(e.endPct-e.startPct)*100}%`,top:"50%",transform:"translateY(-50%)"},children:[v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",children:Ro(t*e.startPct)}),v.jsxs("div",{className:"flex min-w-1 flex-1 items-center",children:[v.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",className:"shrink-0 fill-primary",children:v.jsx("path",{d:"M5 0L0 3L5 6Z"})}),v.jsx("div",{className:"h-px flex-1 bg-primary"})]}),v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-primary px-1.5 py-0.5 font-mono text-[10px] font-medium leading-tight text-primary-foreground",children:Ro(t*(e.endPct-e.startPct))}),v.jsxs("div",{className:"flex min-w-1 flex-1 items-center",children:[v.jsx("div",{className:"h-px flex-1 bg-primary"}),v.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",className:"shrink-0 fill-primary",children:v.jsx("path",{d:"M0 0L5 3L0 6Z"})})]}),v.jsx("span",{className:"shrink-0 whitespace-nowrap rounded bg-foreground/90 px-1 py-px font-mono text-[10px] leading-tight text-background",children:Ro(t*e.endPct)})]})]})}function H5e({marker:e,position:t}){return Vs.createPortal(v.jsxs("div",{className:"z-50 overflow-hidden rounded-lg border border-border bg-popover py-1 shadow-lg",style:{position:"fixed",left:Math.min(t.x+12,window.innerWidth-220),top:t.y+16,minWidth:180,pointerEvents:"none"},children:[v.jsx("div",{className:"truncate px-3 py-1.5 font-mono text-xs text-foreground",children:e.spanName}),v.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[v.jsx("span",{className:je("size-2 shrink-0 rounded-full",U4(e.span))}),v.jsx("span",{className:"flex-1 font-mono text-xs text-muted-foreground",children:e.inProgress?"In Progress":e.hasErrorInTree?"Error":"OK"}),v.jsx("span",{className:"font-mono text-xs text-foreground",children:Ro(e.durationMs)})]})]}),document.body)}function G5e(e,t,n,r){const o=[],i=(a,s,l)=>{var p;if(Ls(a)||tx(a))return;const u=new Date(a.createdAt).getTime(),c=n>0?(u-t)/n:0;o.push({pct:Math.max(0,Math.min(1,c)),statusCode:a.statusCode,hasErrorInTree:Zd(a),inProgress:!!a.inProgress,spanName:a.spanName,durationMs:a.durationNs/1e6,visible:s,span:a,ancestorSpanIds:l});const d=s&&(!r||r.has(a.spanId)),h=[...l,a.spanId];(p=a.children)==null||p.forEach(x=>i(x,d,h))};return e.forEach(a=>i(a,!0,[])),o.sort((a,s)=>a.pct-s.pct)}function qD(e,t){const n=t.getBoundingClientRect();return Math.max(0,Math.min(1,(e.clientX-n.left)/n.width))}function K5e({visibleRange:e,dragging:t,startDrag:n}){const r=e.startPct*100,o=e.endPct*100;return v.jsxs(v.Fragment,{children:[t!=="brush"&&v.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-[1] bg-background/70",style:{width:`${r}%`}}),t!=="brush"&&v.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-[1] bg-background/70",style:{width:`${100-o}%`}}),v.jsxs("div",{className:je("pointer-events-none absolute inset-y-0 z-[3] transition-opacity duration-150",t==="brush"?"opacity-0":t?"opacity-100":"opacity-0 group-hover:opacity-100"),style:{left:`${r}%`,right:`${100-o}%`},children:[v.jsx("div",{className:"pointer-events-auto absolute inset-y-[3px] left-0 flex w-[20px] items-center justify-center rounded-full border border-border/40 bg-muted",style:{cursor:"ew-resize"},onPointerDown:i=>n("left",i),children:v.jsx("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",className:"text-muted-foreground/80",children:v.jsx("path",{d:"M4 1L1 5L4 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v.jsx("div",{className:"pointer-events-auto absolute inset-y-[3px] right-0 flex w-[20px] items-center justify-center rounded-full border border-border/40 bg-muted",style:{cursor:"ew-resize"},onPointerDown:i=>n("right",i),children:v.jsx("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",className:"text-muted-foreground/80",children:v.jsx("path",{d:"M2 1L5 5L2 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}function Y5e({markers:e,hoveredIdx:t,onHoveredIdxChange:n,onTooltipPosChange:r,onSpanSelect:o}){return v.jsx(v.Fragment,{children:e.map((i,a)=>v.jsx("div",{className:je("absolute inset-y-[6px] flex -translate-x-1/2 cursor-pointer flex-col justify-center transition-[transform,opacity]",i.hasErrorInTree?"z-[3]":"z-[2]",t===a&&"z-[5] scale-x-150",!i.visible&&"opacity-[0.01]"),style:{left:`${i.pct*100}%`,width:6},onPointerDown:s=>{o&&s.stopPropagation()},onClick:()=>{o==null||o(i.span,i.ancestorSpanIds)},onMouseEnter:s=>{n(a),r({x:s.clientX,y:s.clientY})},onMouseMove:s=>{r({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{n(null),r(null)},children:v.jsx("div",{className:je("flex-1 rounded-full",U4(i.span))})},a))})}const tv=.05;function X5e(e,t,n){const[r,o]=b.useState(null),i=b.useRef(null),a=b.useCallback((u,c,d)=>{c.preventDefault(),c.stopPropagation(),o(u),i.current={mouseX:c.clientX,startPct:t.startPct,endPct:t.endPct,anchorPct:d}},[t]),s=b.useCallback(u=>{if(!e.current)return;const c=qD(u,e.current);n({startPct:c,endPct:Math.min(1,c+tv)}),a("brush",u,c)},[e,a,n]),l=b.useCallback(()=>{n({startPct:0,endPct:1})},[n]);return b.useEffect(()=>{if(!r)return;const u=d=>{if(!i.current||!e.current)return;const h=e.current.getBoundingClientRect().width;if(h<=0)return;const{startPct:p,endPct:x}=i.current;if(r==="brush"){const w=i.current.anchorPct,_=qD(d,e.current);let C=Math.min(w,_),O=Math.max(w,_);O-C=w?O=Math.min(1,C+tv):C=Math.max(0,O-tv)),n({startPct:C,endPct:O});return}const y=(d.clientX-i.current.mouseX)/h;if(r==="left"){const w=Math.max(0,Math.min(x-tv,p+y));n({startPct:w,endPct:x})}else if(r==="right"){const w=Math.min(1,Math.max(p+tv,x+y));n({startPct:p,endPct:w})}},c=()=>{o(null),i.current=null};return document.addEventListener("pointermove",u),document.addEventListener("pointerup",c),()=>{document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",c)}},[r,e,n]),{dragging:r,startDrag:a,handleTrackDown:s,handleDoubleClick:l}}function Lre(e){return e.some(t=>t.inProgress||Ls(t)||Lre(t.children))}function Q5e({spanTrees:e,minMs:t,maxMs:n,isRunning:r,visibleRange:o,onRangeChange:i,expandedSpanIds:a,onSpanSelect:s,externalHoverPct:l,onHoverPctChange:u}){const c=b.useRef(null),[d,h]=b.useState(null),[p,x]=b.useState(null),[y,w]=b.useState(null),_=b.useMemo(()=>Lre(e),[e]),C=W4(!!r&&_),P=(_?Math.max(n,C):n)-t,R=b.useMemo(()=>G5e(e,t,P,a),[e,t,P,a]),T=b.useMemo(()=>xC(P).ticks,[P]),{dragging:k,startDrag:M,handleTrackDown:j,handleDoubleClick:$}=X5e(c,o,i),L=d!==null?R[d]:null,K=k==="left"||k==="right"?"ew-resize":"crosshair",H=y??l??null;return v.jsxs("div",{children:[v.jsx(yre,{ticks:T,totalMs:P}),v.jsxs("div",{ref:c,className:"group relative h-[43px] overflow-hidden rounded-lg border border-border/50 bg-muted/30",style:{cursor:K},onPointerDown:j,onDoubleClick:$,onMouseMove:D=>{if(!c.current)return;const W=qD(D,c.current);w(W),u==null||u(W)},onMouseLeave:()=>{w(null),u==null||u(null)},children:[v.jsx(Y5e,{markers:R,hoveredIdx:d,onHoveredIdxChange:h,onTooltipPosChange:x,onSpanSelect:s}),v.jsx(K5e,{visibleRange:o,dragging:k,startDrag:M}),H!==null&&!k&&v.jsx(V5e,{activePct:H,totalMs:P}),k&&v.jsx(W5e,{visibleRange:o,totalMs:P}),v.jsx("div",{className:"pointer-events-none absolute inset-0 z-[4] rounded-[inherit] shadow-[inset_0px_7px_10px_0px_rgba(0,0,0,0.01),inset_0px_1px_3px_0px_rgba(0,0,0,0.01)]"}),L&&p&&!k&&v.jsx(H5e,{marker:L,position:p})]})]})}const Z5e=b.memo(function({row:t,timelineMaxMs:n,visMinStart:r,hasAnyInProgress:o,hasAnyLiveQueued:i,isSelected:a,isHovered:s,onHover:l,onMouseMove:u,onGroupSelect:c,expandOnly:d}){const h=t.group.latestEndMs-t.group.earliestStartMs,p=n>0?(t.group.earliestStartMs-r)/n*100:0,x=n>0?h/n*100:0,y=t.group.errorCount>0,w=o||i;return v.jsx("div",{className:je("relative shrink-0 transition-colors",V4({hovered:s,selected:a})),style:{height:n0},children:v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px]",!w&&"transition-all",y?"bg-red-500":"bg-green-500",a?"ring-2 ring-primary ring-offset-1 ring-offset-background":s?"ring-1 ring-foreground/20":""),style:{left:`${p}%`,width:`${Math.max(x,.3)}%`,minWidth:2},onMouseEnter:_=>l(t.rowKey,_),onMouseMove:u,onMouseLeave:()=>l(null),onClick:()=>{d(t.group.groupId),c==null||c(t.group)}})})}),J5e=b.memo(function({row:t,now:n,isRunning:r,timelineMaxMs:o,visMinStart:i,hasAnyInProgress:a,hasAnyLiveQueued:s,isSelected:l,isChildOfSelected:u,isHovered:c,onHover:d,onMouseMove:h,onSpanSelect:p,expandOnly:x}){const y=new Date(t.span.createdAt).getTime(),w=t.span.inProgress?Math.max(0,n-y):t.span.durationNs/1e6,_=Ls(t.span)&&w<=0,C=o>0?(y-i)/o*100:0,O=o>0?w/o*100:0,P=!t.matchesFilter,R=t.isContextOnly,T=a||s,k=t.span.queuedPhase;let M=0,j=0;if(k){const L=new Date(k.createdAt).getTime(),H=(r&&Ls(t.span)?n:y)-L;M=o>0?(L-i)/o*100:0,j=o>0?H/o*100:0}const $=()=>{t.hasChildren&&x(t.rowKey),p==null||p(t.span)};return v.jsxs("div",{className:je("relative shrink-0 transition-colors",V4({hovered:c,selected:l,childOfSelected:u}),P?"opacity-40":R&&"opacity-50"),style:{height:n0},children:[k&&v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px] border border-dashed",!T&&"transition-all",(t.span.inProgress||Ls(t.span))&&"animate-pulse",t.span.inProgress||Ls(t.span)?"border-yellow-500 bg-yellow-500/10":Zd(t.span)?"border-red-500 bg-red-500/10":"border-green-500 bg-green-500/10"),style:{left:`${M}%`,width:`${Math.max(j,.3)}%`,minWidth:2},onMouseEnter:L=>d(t.rowKey,L),onMouseMove:h,onMouseLeave:()=>d(null),onClick:$}),!_&&v.jsx("div",{className:je("absolute bottom-[10px] top-[10px] cursor-pointer rounded-[2px]",$5e(t.span),!T&&"transition-all",t.span.inProgress&&"animate-pulse",l?"ring-2 ring-primary ring-offset-1 ring-offset-background":c?"ring-1 ring-foreground/20":""),style:{left:`min(${C}%, calc(100% - 4px))`,width:`${Math.max(O,.3)}%`,minWidth:4},onMouseEnter:L=>d(t.rowKey,L),onMouseMove:h,onMouseLeave:()=>d(null),onClick:$})]})}),$re=420,e3e=20,EB=$re+e3e;function Fre({title:e,subtitle:t,style:n,children:r}){return v.jsxs("div",{className:"pointer-events-none z-50 overflow-hidden rounded-lg border border-border bg-popover shadow-lg",style:{maxWidth:$re,...n},children:[v.jsxs("div",{className:"border-b border-border px-3 py-2",children:[v.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:e}),t&&v.jsx("div",{className:"mt-0.5 truncate font-mono text-xs text-muted-foreground",children:t})]}),v.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 px-3 py-2 text-xs",children:r})]})}function t3e({row:e,now:t,style:n}){const r=e.span,o=new Date(r.createdAt).getTime(),i=Ls(r)&&r.durationNs<=0,a=r.inProgress?Math.max(0,t-o):r.durationNs/1e6,s=r.spanName,l=vre(r.createdAt,{ms:!0}),u=r.queuedPhase;let c=0;if(u){const d=new Date(u.createdAt).getTime();c=i?Math.max(0,t-d):u.durationNs/1e6}return v.jsxs(Fre,{title:s,subtitle:s!==r.spanName?r.spanName:void 0,style:n,children:[u?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Queue Time"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(c,{precise:!0})}),v.jsx("span",{className:"text-muted-foreground",children:"Execution"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:i?"–":Ro(a,{precise:!0})}),v.jsx("span",{className:"text-muted-foreground",children:"Total"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:i?Ro(c,{precise:!0}):Ro(c+a,{precise:!0})})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:D5e(r)?"Queue Time":"Duration"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(a,{precise:!0})})]}),v.jsx("span",{className:"text-muted-foreground",children:"Status"}),v.jsxs("span",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:je("size-1.5 shrink-0 rounded-full",U4(r))}),v.jsx("span",{className:"font-mono text-foreground",children:L5e(r,i)})]}),v.jsx("span",{className:"text-muted-foreground",children:"Started"}),v.jsx("span",{className:"font-mono text-foreground",children:l}),Cb(r)&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Source"}),v.jsx("span",{className:"font-mono text-foreground",children:"Engine"})]})]})}function n3e({group:e,style:t}){const n=e.latestEndMs-e.earliestStartMs;return v.jsxs(Fre,{title:e.groupName,subtitle:`${e.totalCount.toLocaleString()} spans`,style:t,children:[v.jsx("span",{className:"text-muted-foreground",children:"Time range"}),v.jsx("span",{className:"font-mono font-medium text-foreground",children:Ro(n,{precise:!0})}),e.errorCount>0&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"Errors"}),v.jsx("span",{className:"font-mono font-medium text-red-500",children:e.errorCount.toLocaleString()})]})]})}function r3e(e,t,n){const[r,o]=b.useState(null),i=b.useRef(t);i.current=t;const a=b.useCallback(l=>{if(!e.current||!n)return;const u=e.current.getBoundingClientRect(),c=Math.max(0,Math.min(1,(l.clientX-u.left)/u.width)),d=p=>{if(!e.current)return;const x=e.current.getBoundingClientRect(),y=Math.max(0,Math.min(1,(p.clientX-x.left)/x.width)),w=Math.min(c,y),_=Math.max(c,y);_-w>.005&&o({lo:w,hi:_})},h=p=>{if(document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h),!e.current){o(null);return}const x=e.current.getBoundingClientRect(),y=Math.max(0,Math.min(1,(p.clientX-x.left)/x.width)),w=Math.min(c,y),_=Math.max(c,y);if(o(null),_-w>=.02){const C=i.current,O=C.visMinStart+C.timelineMaxMs*w,P=C.visMinStart+C.timelineMaxMs*_;n({startPct:Math.max(0,(O-C.traceMinStart)/C.traceTotalMs),endPct:Math.min(1,(P-C.traceMinStart)/C.traceTotalMs)})}};document.addEventListener("pointermove",d),document.addEventListener("pointerup",h)},[e,n]),s=b.useCallback(()=>{n==null||n({startPct:0,endPct:1})},[n]);return{brushRange:r,onPointerDown:a,onDoubleClick:s}}function o3e(e,t,n,r){const[o,i]=b.useState(null),a=b.useRef(t);a.current=t;const{visMinStart:s,timelineMaxMs:l,traceMinStart:u,traceTotalMs:c}=t,d=b.useMemo(()=>{if(o!==null)return o;if(n==null||l<=0)return null;const y=(u+n*c-s)/l;return y<0||y>1?null:y},[o,n,s,l,u,c]),h=b.useCallback(x=>{if(!e.current)return;const y=e.current.getBoundingClientRect(),w=Math.max(0,Math.min(1,(x.clientX-y.left)/y.width));if(i(w),r){const _=a.current,C=_.visMinStart+w*_.timelineMaxMs,O=_.traceTotalMs>0?(C-_.traceMinStart)/_.traceTotalMs:0;r(Math.max(0,Math.min(1,O)))}},[e,r]),p=b.useCallback(()=>{i(null),r==null||r(null)},[r]);return{effectiveCursorPct:d,onMouseMove:h,onMouseLeave:p}}const i3e=b.memo(function({flatRows:t,ticks:n,timelineMaxMs:r,visMinStart:o,visOffsetMs:i,traceMinStart:a,traceTotalMs:s,gridHeight:l,now:u,isRunning:c,hasAnyInProgress:d,hasAnyLiveQueued:h,selectedSpan:p,selectedGroupId:x,selectedDescendantIds:y,hoveredRowKey:w,onRowHover:_,onSpanSelect:C,onGroupSelect:O,expandOnly:P,onRangeChange:R,externalCursorPct:T,onCursorPctChange:k}){const M=b.useRef(null),j={visMinStart:o,timelineMaxMs:r,traceMinStart:a,traceTotalMs:s},{brushRange:$,onPointerDown:L,onDoubleClick:K}=r3e(M,j,R),{effectiveCursorPct:H,onMouseMove:D,onMouseLeave:W}=o3e(M,j,T,k),[q,Y]=b.useState(null),U=b.useCallback((z,X)=>{_(z),Y(X?{x:X.clientX,y:X.clientY}:null)},[_]),V=b.useCallback(z=>{Y({x:z.clientX,y:z.clientY})},[]),G=w?t.find(z=>z.rowKey===w):null;return v.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pr-10",children:[v.jsxs("div",{className:"relative",ref:M,style:{cursor:R?"crosshair":void 0},onMouseMove:D,onMouseLeave:W,onPointerDown:L,onDoubleClick:K,children:[n.map(z=>v.jsx("div",{className:"absolute top-0 w-px bg-border/40",style:{left:`${z/r*100}%`,height:l}},z)),t.map(z=>z.kind==="show-more"?v.jsx("div",{className:"relative shrink-0",style:{height:n0}},z.rowKey):z.kind==="group"?v.jsx(Z5e,{row:z,timelineMaxMs:r,visMinStart:o,hasAnyInProgress:d,hasAnyLiveQueued:h,isSelected:x===z.group.groupId,isHovered:w===z.rowKey,onHover:U,onMouseMove:V,onGroupSelect:O,expandOnly:P},z.rowKey):v.jsx(J5e,{row:z,now:u,isRunning:c,timelineMaxMs:r,visMinStart:o,hasAnyInProgress:d,hasAnyLiveQueued:h,isSelected:(p==null?void 0:p.spanId)===z.span.spanId,isChildOfSelected:y.has(z.span.spanId),isHovered:w===z.rowKey,onHover:U,onMouseMove:V,onSpanSelect:C,expandOnly:P},z.rowKey)),H!==null&&!$&&v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/40",style:{left:`${H*100}%`,height:l}}),$&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 border-x border-primary/30 bg-primary/10",style:{left:`${$.lo*100}%`,width:`${($.hi-$.lo)*100}%`,height:l}}),v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/70",style:{left:`${$.lo*100}%`,height:l}}),v.jsx("div",{className:"pointer-events-none absolute top-0 z-10 w-px bg-foreground/70",style:{left:`${$.hi*100}%`,height:l}})]})]}),G&&q&&G.kind==="span"&&Vs.createPortal(v.jsx(t3e,{row:G,now:u,style:{position:"fixed",left:Math.min(q.x+12,window.innerWidth-EB),top:q.y+16}}),document.body),G&&q&&G.kind==="group"&&Vs.createPortal(v.jsx(n3e,{group:G.group,style:{position:"fixed",left:Math.min(q.x+12,window.innerWidth-EB),top:q.y+16}}),document.body)]})});function OA({depth:e,connectorFlags:t,isLastChild:n}){return v.jsx(v.Fragment,{children:Array.from({length:e}).map((r,o)=>{const i=o===e-1,a=n!==void 0&&i?t[o]||!n:t[o];return v.jsx("div",{className:"flex shrink-0 items-center justify-center",style:{width:wC,height:n0},children:a&&v.jsx("div",{className:"h-full w-px bg-border"})},o)})})}function CB({isExpanded:e,hasChildren:t=!0,onToggle:n}){return t?v.jsx("button",{className:"flex shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",style:{width:wC+zD},onClick:r=>{r.stopPropagation(),n()},children:e?v.jsx(V1e,{className:"size-3"}):v.jsx(H1e,{className:"size-3"})}):v.jsx("div",{style:{width:wC+zD},className:"shrink-0"})}function RA({selected:e,childOfSelected:t,hovered:n,dimmed:r,contextOnly:o,onClick:i,onMouseEnter:a,onMouseLeave:s,children:l,"data-row-key":u}){return v.jsx("div",{className:je("flex shrink-0 items-center px-2",i&&"cursor-pointer transition-colors",V4({hovered:n,selected:e,childOfSelected:t}),r?"opacity-40":o&&"opacity-50"),style:{height:n0},onClick:i,onMouseEnter:a,onMouseLeave:s,"data-row-key":u,children:l})}const a3e=b.memo(function({flatRows:t,selectedSpan:n,selectedGroupId:r,selectedDescendantIds:o,hoveredRowKey:i,onRowHover:a,onSpanSelect:s,onGroupSelect:l,onShowMore:u,toggleExpand:c,expandOnly:d}){return v.jsx(v.Fragment,{children:t.map(h=>{if(h.kind==="show-more")return v.jsxs(RA,{children:[v.jsx(OA,{depth:h.depth,connectorFlags:h.connectorFlags}),v.jsx("div",{style:{width:wC+zD},className:"shrink-0"}),v.jsxs(xt,{variant:"link",size:"xs",className:"truncate text-sm",onClick:()=>u(h.groupId,h.currentVisible+CA),children:["Show ",Math.min(h.remaining,CA)," more",h.remaining>CA&&` (${h.remaining.toLocaleString()} remaining)`]})]},h.rowKey);if(h.kind==="group"){const w=r===h.group.groupId;return v.jsxs(RA,{selected:w,hovered:i===h.rowKey,"data-row-key":h.rowKey,onClick:()=>{d(h.group.groupId),l==null||l(h.group)},onMouseEnter:()=>a(h.rowKey),onMouseLeave:()=>a(null),children:[v.jsx(OA,{depth:h.depth,connectorFlags:h.connectorFlags,isLastChild:h.isLastChild}),v.jsx(CB,{isExpanded:h.isExpanded,onToggle:()=>c(h.group.groupId)}),v.jsxs("span",{className:je("truncate text-sm leading-tight",w?"font-medium text-foreground":"text-muted-foreground"),title:`batch: ${h.group.groupName} (${h.group.totalCount.toLocaleString()} spans)`,children:["batch: ",h.group.groupName]}),v.jsx("span",{className:"ml-1.5 shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:h.group.totalCount.toLocaleString()}),h.group.errorCount>0&&v.jsxs("span",{className:"ml-1 flex shrink-0 items-center gap-0.5 rounded bg-red-500/10 px-1.5 py-0.5 font-mono text-xs text-red-500",children:[v.jsx(Z1e,{className:"size-3"}),h.group.errorCount.toLocaleString()]})]},h.rowKey)}const p=(n==null?void 0:n.spanId)===h.span.spanId,x=h.span.spanName,y=I5e(h.span);return v.jsxs(RA,{selected:p,childOfSelected:o.has(h.span.spanId),hovered:i===h.rowKey,dimmed:!h.matchesFilter,contextOnly:h.isContextOnly,"data-row-key":h.rowKey,onClick:()=>{h.hasChildren&&d(h.rowKey),s==null||s(h.span)},onMouseEnter:()=>a(h.rowKey),onMouseLeave:()=>a(null),children:[v.jsx(OA,{depth:h.depth,connectorFlags:h.connectorFlags,isLastChild:h.isLastChild}),v.jsx(CB,{isExpanded:h.isExpanded,hasChildren:h.hasChildren,onToggle:()=>c(h.rowKey)}),v.jsx(Bl,{delayDuration:0,children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsx("span",{className:je("min-w-[4ch] shrink truncate text-sm leading-tight",p?"font-medium text-foreground":h.depth===0?"text-foreground":"text-muted-foreground"),children:x})}),v.jsx(Hs,{children:x})]})}),y&&v.jsx(Bl,{delayDuration:0,children:v.jsxs(zl,{children:[v.jsx(ql,{asChild:!0,children:v.jsx("span",{className:"ml-1.5 truncate rounded bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground",children:y})}),v.jsx(Hs,{children:y})]})}),Cb(h.span)&&v.jsx("span",{className:"ml-1.5 shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground",children:"engine"})]},h.rowKey)})})}),wE=320;function s3e({spanTrees:e,isRunning:t,expandedSpanIds:n,onExpandChange:r,groupVisibleCounts:o,onShowMore:i,selectedSpan:a,selectedGroupId:s,onSpanSelect:l,onGroupSelect:u,visibleRange:c,onRangeChange:d,externalCursorPct:h,onCursorPctChange:p}){const x=b.useRef(null),y=b.useMemo(()=>(function q(Y){return Y.some(U=>U.inProgress||q(U.children))})(e),[e]),w=b.useMemo(()=>(function q(Y){return Y.some(U=>Ls(U)||q(U.children))})(e),[e]),C=W4(!!t&&(y||w)),O=b.useMemo(()=>Dre(e,n,o),[e,n,o]),{visMinStart:P,visOffsetMs:R,ticks:T,timelineMaxMs:k,traceMinStart:M,traceTotalMs:j}=b.useMemo(()=>{let q=1/0,Y=-1/0;const U=X=>{var fe;const ee=new Date(X.createdAt).getTime(),ae=X.inProgress?C:ee+X.durationNs/1e6;if(q=Math.min(q,ee),Y=Math.max(Y,ae),X.queuedPhase){const ie=new Date(X.queuedPhase.createdAt).getTime(),we=t&&Ls(X)?C:ie+X.queuedPhase.durationNs/1e6;q=Math.min(q,ie),Y=Math.max(Y,we)}(fe=X.children)==null||fe.forEach(U)};e.forEach(U);const V=Y-q;if(c&&(c.startPct>.001||c.endPct<.999)){const X=q+V*c.startPct,ae=q+V*c.endPct-X,{ticks:fe}=xC(ae);return{visMinStart:X,visOffsetMs:X-q,ticks:fe,timelineMaxMs:ae,traceMinStart:q,traceTotalMs:V}}const{ticks:z}=xC(V);return{visMinStart:q,visOffsetMs:0,ticks:z,timelineMaxMs:V,traceMinStart:q,traceTotalMs:V}},[e,c,C,t]),$=b.useCallback(q=>{const Y=new Set(n);Y.has(q)?Y.delete(q):Y.add(q),r(Y)},[n,r]),L=b.useCallback(q=>{if(!n.has(q)){const Y=new Set(n);Y.add(q),r(Y)}},[n,r]),K=O.length*n0,[H,D]=b.useState(null),W=b.useMemo(()=>a?q5e(a):new Set,[a]);return v.jsxs("div",{className:"relative flex min-w-0 overflow-hidden",ref:x,children:[v.jsx("div",{className:"flex shrink-0 flex-col overflow-hidden",style:{width:wE},children:v.jsx(a3e,{flatRows:O,selectedSpan:a,selectedGroupId:s,selectedDescendantIds:W,hoveredRowKey:H,onRowHover:D,onSpanSelect:l,onGroupSelect:u,onShowMore:i,toggleExpand:$,expandOnly:L})}),v.jsx(i3e,{flatRows:O,ticks:T,timelineMaxMs:k,visMinStart:P,visOffsetMs:R,traceMinStart:M,traceTotalMs:j,gridHeight:K,now:C,isRunning:t,hasAnyInProgress:y,hasAnyLiveQueued:w,selectedSpan:a,selectedGroupId:s,selectedDescendantIds:W,hoveredRowKey:H,onRowHover:D,onSpanSelect:l,onGroupSelect:u,expandOnly:L,onRangeChange:d,externalCursorPct:h,onCursorPctChange:p})]})}const l3e=(e,t)=>{const{tenantId:n}=rR(),{data:r,isLoading:o,isFetching:i}=Mn({queryKey:["feature-flag",n,e,t],queryFn:async()=>n?(await ot.tenantFeatureFlagEvaluate(n,{featureFlagId:e,isEnabledIfNoPosthog:t})).data:{isEnabled:t},enabled:!!n,retry:2,staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return o||i?{isEnabled:void 0,isLoading:!0}:{isEnabled:(r==null?void 0:r.isEnabled)??t,isLoading:o||i}},OB="__context_expand_done__",u3e=e=>{let t=1/0,n=-1/0;const r=o=>{var s;const i=new Date(o.createdAt).getTime(),a=i+o.durationNs/1e6;if(t=Math.min(t,i),n=Math.max(n,a),o.queuedPhase){const l=new Date(o.queuedPhase.createdAt).getTime(),u=l+o.queuedPhase.durationNs/1e6;t=Math.min(t,l),n=Math.max(n,u)}(s=o.children)==null||s.forEach(r)};return e.forEach(r),{minStart:t,maxEnd:n}};function UD(e,t){for(const n of e){if(n.spanId===t)return n;const r=UD(n.children,t);if(r)return r}}function VD(e,t,n=[]){var r;for(const o of e){const i=zu(o);if(i===t||((r=o.spanAttributes)==null?void 0:r["hatchet.step_run_id"])===t)return{span:o,ancestorKeys:n};const a=VD(o.children,t,[...n,i]);if(a)return a}}function WD(e,t,n){const r=Ire(e,n);for(const o of r)if(o.kind==="group"&&o.group.groupId===t)return o.group;for(const o of r)if(o.kind==="span"){const i=WD(o.span.children,t,o.span.spanId);if(i)return i}else if(o.kind==="group")for(const i of o.group.spans){const a=WD(i.children,t,i.spanId);if(a)return a}}function HD(e,t,n=[]){for(const r of e){if(r.spanId===t)return n;const o=HD(r.children,t,[...n,zu(r)]);if(o)return o}}function Bre(e){const t=[];for(const n of e)n.children.length>0&&(t.push(zu(n)),t.push(...Bre(n.children)));return t}function zre(e,t,n=0){if(n>=t)return[];const r=[];for(const o of e)o.children.length>0&&(r.push(zu(o)),r.push(...zre(o.children,t,n+1)));return r}function c3e({spanTrees:e,isRunning:t,contextTaskRunId:n,onClearFilters:r}){const{focusedTaskRunId:o,selectedSpanId:i,setSelectedSpanId:a,selectedGroupId:s,setSelectedGroupId:l}=_4(),{minStart:u,maxEnd:c}=b.useMemo(()=>u3e(e),[e]),[d,h]=b.useState(()=>{const de=new Set(zre(e,2));if(i){const se=UD(e,i);if(se){const ye=HD(e,i);if(ye)for(const Te of ye)de.add(Te);de.add(zu(se))}}return de}),p=b.useMemo(()=>Bre(e),[e]),x=p.length>0&&p.every(de=>d.has(de)),y=b.useCallback(()=>{h(de=>{const se=new Set(de);for(const ye of p)se.add(ye);return se})},[p]),w=b.useCallback(()=>{h(new Set)},[]),[_,C]=b.useState({}),[O,P]=b.useState({startPct:0,endPct:1}),R=O.startPct>.001||O.endPct<.999,T=b.useMemo(()=>{if(!R)return null;const de=c-u,se=de*O.startPct,ye=de*(O.endPct-O.startPct),{ticks:Te}=xC(ye);return{ticks:Te,visDurationMs:ye,visOffsetMs:se}},[R,u,c,O]),[k,M]=b.useState(null),[j,$]=b.useState(null),{isEnabled:L}=l3e(UX.TraceMinimapEnabled,!1),K=b.useRef(o);if(o&&o!==K.current){K.current=o;const de=VD(e,o);de&&(h(se=>{const ye=new Set(se);for(const Te of de.ancestorKeys)ye.add(Te);return ye.add(zu(de.span)),ye}),a(de.span.spanId))}const H=b.useRef(null);if(n&&H.current!==OB){const de=VD(e,n);de&&(H.current=OB,h(se=>{const ye=new Set(se);for(const Te of de.ancestorKeys)ye.add(Te);return ye.add(zu(de.span)),ye}))}const D=b.useMemo(()=>i?UD(e,i):void 0,[i,e]),W=b.useMemo(()=>s?WD(e,s):void 0,[s,e]),q=b.useCallback(de=>{const se=HD(e,de.spanId);se&&h(ye=>{const Te=new Set(ye);for(const ge of se)Te.add(ge);return Te.add(zu(de)),Te})},[e]),{open:Y,close:U,isOpen:V}=d0(),G=b.useCallback(()=>{a(void 0),l(void 0),U()},[a,l,U]),z=b.useRef(V);b.useEffect(()=>{const de=z.current;z.current=V,de&&!V&&(a(void 0),l(void 0))},[V,a,l]);const X=b.useCallback(de=>{q(de);const se=i===de.spanId;a(se?void 0:de.spanId),se?U():Y({type:"span-details",content:{span:de,onSpanSelect:ye=>{q(ye),a(ye.spanId),Y({type:"span-details",content:{span:ye,onClose:G}})},onClose:G}})},[q,i,a,Y,U,G]),ee=b.useCallback((de,se)=>{q(de),a(de.spanId)},[q,a]),ae=b.useCallback(de=>{const se=s===de.groupId;l(se?void 0:de.groupId),se?U():Y({type:"group-details",content:{group:de,onClose:G}})},[s,l,Y,U,G]),fe=b.useCallback((de,se)=>{C(ye=>({...ye,[de]:se}))},[]),ie=b.useCallback(()=>{a(void 0),l(void 0),P({startPct:0,endPct:1}),U(),r==null||r()},[a,l,U,r]);b.useEffect(()=>{const de=se=>{if(se.key!=="Escape")return;const ye=se.target;ye.tagName==="INPUT"||ye.tagName==="TEXTAREA"||ie()};return window.addEventListener("keydown",de),()=>window.removeEventListener("keydown",de)},[ie]);const we=b.useRef(null);return b.useEffect(()=>{const de=D?zu(D):W==null?void 0:W.groupId;if(!de)return;let se=!1;return requestAnimationFrame(()=>{se||requestAnimationFrame(()=>{if(se)return;const ye=we.current;if(!ye)return;const Te=ye.querySelector(`[data-row-key="${de}"]`);Te==null||Te.scrollIntoView({block:"nearest",behavior:"smooth"})})}),()=>{se=!0}},[D,W]),v.jsxs("div",{className:"my-4 flex min-w-0 select-none flex-col gap-y-2",children:[v.jsxs("div",{className:"shrink-0",children:[v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{style:{width:wE},children:v.jsxs(xt,{variant:"ghost",size:"xs",className:"gap-1 text-xs p-2",onClick:x?w:y,children:[x?v.jsx(K1e,{className:"size-3"}):v.jsx(X1e,{className:"size-3"}),x?"Collapse All":"Expand All"]})}),L&&v.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[v.jsx("div",{className:"flex justify-end pb-1",children:v.jsxs(xt,{variant:"ghost",size:"xs",className:`gap-1 text-xs ${R?"":"invisible"}`,onClick:()=>P({startPct:0,endPct:1}),tabIndex:R?void 0:-1,children:[v.jsx(JO,{className:"size-3"}),"clear zoom"]})}),v.jsx(Q5e,{spanTrees:e,minMs:u,maxMs:c,isRunning:t,visibleRange:O,onRangeChange:P,expandedSpanIds:d,onSpanSelect:ee,externalHoverPct:j,onHoverPctChange:M})]})]}),L&&R&&v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{className:"shrink-0",style:{width:wE}}),v.jsx("div",{className:"min-w-0 flex-1 pr-10",children:v.jsxs("svg",{className:"h-5 w-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[v.jsx("line",{x1:O.startPct*100,y1:"0",x2:"0",y2:"100",className:"stroke-border",strokeWidth:"1",vectorEffect:"non-scaling-stroke"}),v.jsx("line",{x1:O.endPct*100,y1:"0",x2:"100",y2:"100",className:"stroke-border",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]})})]}),L&&T&&v.jsxs("div",{className:"flex min-w-0",children:[v.jsx("div",{className:"shrink-0",style:{width:wE}}),v.jsx("div",{className:"min-w-0 flex-1 pr-10",children:v.jsx(yre,{ticks:T.ticks,totalMs:T.visDurationMs,offsetMs:T.visOffsetMs})})]})]}),v.jsx("div",{ref:we,children:v.jsx(s3e,{spanTrees:e,isRunning:t,expandedSpanIds:d,onExpandChange:h,groupVisibleCounts:_,onShowMore:fe,selectedSpan:D,selectedGroupId:W==null?void 0:W.groupId,onSpanSelect:X,onGroupSelect:ae,visibleRange:O,onRangeChange:P,externalCursorPct:k,onCursorPctChange:$})})]})}const f3e={ok:Lr.OK,error:Lr.ERROR,unset:Lr.UNSET};function d3e(e,t){var n;if(t.status){const r=f3e[t.status];if(e.statusCode!==r)return!1}if(t.spanName&&!e.spanName.toLowerCase().includes(t.spanName.toLowerCase()))return!1;for(const[r,o]of t.attributes){const i=(n=e.spanAttributes)==null?void 0:n[r];if(i===void 0||i!==o)return!1}if(t.search){const r=t.search.toLowerCase(),o=e.spanName.toLowerCase().includes(r),i=Object.values(e.spanAttributes??{}).some(a=>a.toLowerCase().includes(r));if(!o&&!i)return!1}return!0}function qre(e,t){const n=[];for(const i of e.children){const a=qre(i,t);a&&n.push(a)}const r=d3e(e,t),o=n.length>0;return!r&&!o?null:{...e,matchesFilter:r,children:n}}function h3e(e){return!!(e.search||e.status||e.spanName||e.attributes.length>0)}function p3e(e,t){if(!h3e(t))return Ure(e);const n=[];for(const r of e){const o=qre(r,t);o&&n.push(o)}return n}function Ure(e){return e.map(t=>({...t,matchesFilter:!0,children:Ure(t.children)}))}const Vre=["ok","error","unset"],m3e={ok:"bg-green-500",error:"bg-red-500",unset:"bg-slate-500"};function Wre(e){return"key"in e}const g3e=/(\S+?):(\S+)|(\S+)/g;function Hre(e){const t=[];let n;for(;(n=g3e.exec(e))!==null;){const[,r,o,i]=n;r&&o!==void 0?t.push({key:r,value:o}):i&&t.push({text:i})}return t}function Gre(e,t,n){const o=e.trimEnd().split(" "),i=o.pop()||"";if(t.type==="value"){const a=i.slice(0,i.indexOf(":")+1);o.push(a+t.value)}else{const a=n.some(s=>s.value.startsWith(i.toLowerCase()));i&&a?o.push(t.value):o.push(i,t.value)}return o.filter(Boolean).join(" ")}function v3e(e){const t=[],n=[],r=[];let o,i;for(const a of Hre(e))if(Wre(a)){const{key:s,value:l}=a,u=s.toLowerCase();if(u==="status"){const c=l.toLowerCase();Vre.includes(c)?o=c:t.push(`Invalid status: "${l}"`)}else u==="name"?i=l:r.push([s,l])}else n.push(a.text);return{search:n.length>0?n.join(" "):void 0,status:o,spanName:i,attributes:r,raw:e,isValid:t.length===0,errors:t}}const y3e={ok:"Successful spans",error:"Failed spans",unset:"Spans without explicit status"},bC={STATUS:"status",SPAN_NAME:"span-name"},H4=[{type:"key",label:"status",value:`${bC.STATUS}:`,description:"Filter by span status"},{type:"key",label:"span name",value:`${bC.SPAN_NAME}:`,description:"Filter by span name"}];function w3e(e){const t=e.attributeKeys.map(n=>({type:"key",label:n,value:`${n}:`,description:"Span attribute"}));return[...H4,...t]}function x3e(e,t){const n=w3e(t),r=e.trimEnd(),o=r.split(" ").pop()||"";if(e.endsWith(" ")&&!r.endsWith(":"))return{mode:"key",suggestions:n};if(r==="")return{mode:"key",suggestions:n};const i=`${bC.STATUS}:`,a=`${bC.SPAN_NAME}:`;if(o.startsWith(i)){const u=o.slice(i.length).toLowerCase();return{mode:"value",suggestions:Vre.filter(d=>d.startsWith(u)).map(d=>({type:"value",label:d,value:d,description:y3e[d],color:m3e[d]}))}}if(o.startsWith(a)){const u=o.slice(a.length).toLowerCase();return{mode:"value",suggestions:t.spanNames.filter(d=>d.toLowerCase().includes(u)).slice(0,20).map(d=>({type:"value",label:d,value:d,description:"Span name"}))}}const s=o.indexOf(":");if(s>0){const u=o.slice(0,s),c=o.slice(s+1).toLowerCase();return{mode:"value",suggestions:(t.attributeValues.get(u)??[]).filter(p=>p.toLowerCase().startsWith(c)).slice(0,20).map(p=>({type:"value",label:p,value:p,description:u}))}}const l=n.filter(u=>u.value.startsWith(o.toLowerCase())&&o.length>0);return l.length>0?{mode:"key",suggestions:l}:{mode:"none",suggestions:[]}}function b3e(e,t){return Gre(e,t,H4)}var RB=1,S3e=.9,_3e=.8,E3e=.17,PA=.1,TA=.999,C3e=.9999,O3e=.99,R3e=/[\\\/_+.#"@\[\(\{&]/,P3e=/[\\\/_+.#"@\[\(\{&]/g,T3e=/[\s-]/,Kre=/[\s-]/g;function GD(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?RB:O3e;var s=`${o},${i}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(i),u=n.indexOf(l,o),c=0,d,h,p,x;u>=0;)d=GD(e,t,n,r,u+1,i+1,a),d>c&&(u===o?d*=RB:R3e.test(e.charAt(u-1))?(d*=_3e,p=e.slice(o,u-1).match(P3e),p&&o>0&&(d*=Math.pow(TA,p.length))):T3e.test(e.charAt(u-1))?(d*=S3e,x=e.slice(o,u-1).match(Kre),x&&o>0&&(d*=Math.pow(TA,x.length))):(d*=E3e,o>0&&(d*=Math.pow(TA,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=C3e)),(dd&&(d=h*PA)),d>c&&(c=d),u=n.indexOf(l,u+1);return a[s]=c,c}function PB(e){return e.toLowerCase().replace(Kre," ")}function A3e(e,t){return GD(e,t,PB(e),PB(t),0,0,{})}function Rv(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function k3e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yre(...e){return t=>e.forEach(n=>k3e(n,t))}function Ob(...e){return b.useCallback(Yre(...e),e)}function N3e(e,t){const n=b.createContext(t);function r(i){const{children:a,...s}=i,l=b.useMemo(()=>s,Object.values(s));return b.createElement(n.Provider,{value:l},a)}function o(i){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function M3e(e,t=[]){let n=[];function r(i,a){const s=b.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:h,children:p,...x}=d,y=(h==null?void 0:h[e][l])||s,w=b.useMemo(()=>x,Object.values(x));return b.createElement(y.Provider,{value:w},p)}function c(d,h){const p=(h==null?void 0:h[e][l])||s,x=b.useContext(p);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(a=>b.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,j3e(o,...t)]}function j3e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const KD=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},I3e=IO.useId||(()=>{});let D3e=0;function AA(e){const[t,n]=b.useState(I3e());return KD(()=>{n(r=>r??String(D3e++))},[e]),e||(t?`radix-${t}`:"")}function hm(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function L3e({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$3e({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=hm(n),l=b.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function $3e({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,o=b.useRef(r),i=hm(t);return b.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const G4=b.forwardRef((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),i=o.find(B3e);if(i){const a=i.props.children,s=o.map(l=>l===i?b.Children.count(a)>1?b.Children.only(null):b.isValidElement(a)?a.props.children:null:l);return b.createElement(YD,Ni({},r,{ref:t}),b.isValidElement(a)?b.cloneElement(a,void 0,s):null)}return b.createElement(YD,Ni({},r,{ref:t}),n)});G4.displayName="Slot";const YD=b.forwardRef((e,t)=>{const{children:n,...r}=e;return b.isValidElement(n)?b.cloneElement(n,{...z3e(r,n.props),ref:Yre(t,n.ref)}):b.Children.count(n)>1?b.Children.only(null):null});YD.displayName="SlotClone";const F3e=({children:e})=>b.createElement(b.Fragment,null,e);function B3e(e){return b.isValidElement(e)&&e.type===F3e}function z3e(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{i==null||i(...s),o==null||o(...s)}:r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const q3e=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],DR=q3e.reduce((e,t)=>{const n=b.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?G4:t;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(s,Ni({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function U3e(e,t){e&&Vs.flushSync(()=>e.dispatchEvent(t))}function V3e(e){const t=hm(e);b.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const XD="dismissableLayer.update",W3e="dismissableLayer.pointerDownOutside",H3e="dismissableLayer.focusOutside";let TB;const G3e=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K3e=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,u=b.useContext(G3e),[c,d]=b.useState(null),[,h]=b.useState({}),p=Ob(t,T=>d(T)),x=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(y),_=c?x.indexOf(c):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,O=_>=w,P=Y3e(T=>{const k=T.target,M=[...u.branches].some(j=>j.contains(k));!O||M||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())}),R=X3e(T=>{const k=T.target;[...u.branches].some(j=>j.contains(k))||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())});return V3e(T=>{_===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))}),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(TB=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),AB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=TB)}},[c,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),AB())},[c,u]),b.useEffect(()=>{const T=()=>h({});return document.addEventListener(XD,T),()=>document.removeEventListener(XD,T)},[]),b.createElement(DR.div,Ni({},l,{ref:p,style:{pointerEvents:C?O?"auto":"none":void 0,...e.style},onFocusCapture:Rv(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Rv(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Rv(e.onPointerDownCapture,P.onPointerDownCapture)}))});function Y3e(e){const t=hm(e),n=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){Xre(W3e,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=l,document.addEventListener("click",r.current,{once:!0})):l()}n.current=!1},i=window.setTimeout(()=>{document.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),document.removeEventListener("pointerdown",o),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function X3e(e){const t=hm(e),n=b.useRef(!1);return b.useEffect(()=>{const r=o=>{o.target&&!n.current&&Xre(H3e,t,{originalEvent:o},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function AB(){const e=new CustomEvent(XD);document.dispatchEvent(e)}function Xre(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?U3e(o,i):o.dispatchEvent(i)}const kA="focusScope.autoFocusOnMount",NA="focusScope.autoFocusOnUnmount",kB={bubbles:!1,cancelable:!0},Q3e=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=b.useState(null),u=hm(o),c=hm(i),d=b.useRef(null),h=Ob(t,y=>l(y)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let y=function(_){if(p.paused||!s)return;const C=_.target;s.contains(C)?d.current=C:yp(d.current,{select:!0})},w=function(_){p.paused||!s||s.contains(_.relatedTarget)||yp(d.current,{select:!0})};return document.addEventListener("focusin",y),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w)}}},[r,s,p.paused]),b.useEffect(()=>{if(s){MB.add(p);const y=document.activeElement;if(!s.contains(y)){const _=new CustomEvent(kA,kB);s.addEventListener(kA,u),s.dispatchEvent(_),_.defaultPrevented||(Z3e(rLe(Qre(s)),{select:!0}),document.activeElement===y&&yp(s))}return()=>{s.removeEventListener(kA,u),setTimeout(()=>{const _=new CustomEvent(NA,kB);s.addEventListener(NA,c),s.dispatchEvent(_),_.defaultPrevented||yp(y??document.body,{select:!0}),s.removeEventListener(NA,c),MB.remove(p)},0)}}},[s,u,c,p]);const x=b.useCallback(y=>{if(!n&&!r||p.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(w&&_){const C=y.currentTarget,[O,P]=J3e(C);O&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&yp(O,{select:!0})):y.shiftKey&&_===O&&(y.preventDefault(),n&&yp(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,p.paused]);return b.createElement(DR.div,Ni({tabIndex:-1},a,{ref:h,onKeyDown:x}))});function Z3e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yp(r,{select:t}),document.activeElement!==n)return}function J3e(e){const t=Qre(e),n=NB(t,e),r=NB(t.reverse(),e);return[n,r]}function Qre(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function NB(e,t){for(const n of e)if(!eLe(n,{upTo:t}))return n}function eLe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tLe(e){return e instanceof HTMLInputElement&&"select"in e}function yp(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tLe(e)&&t&&e.select()}}const MB=nLe();function nLe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jB(e,t),e.unshift(t)},remove(t){var n;e=jB(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function jB(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rLe(e){return e.filter(t=>t.tagName!=="A")}const oLe=b.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?MY.createPortal(b.createElement(DR.div,Ni({},o,{ref:t})),r):null});function iLe(e,t){return b.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const LR=e=>{const{present:t,children:n}=e,r=aLe(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Ob(r.ref,o.ref);return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};LR.displayName="Presence";function aLe(e){const[t,n]=b.useState(),r=b.useRef({}),o=b.useRef(e),i=b.useRef("none"),a=e?"mounted":"unmounted",[s,l]=iLe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=N_(r.current);i.current=s==="mounted"?u:"none"},[s]),KD(()=>{const u=r.current,c=o.current;if(c!==e){const h=i.current,p=N_(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),KD(()=>{if(t){const u=d=>{const p=N_(r.current).includes(d.animationName);d.target===t&&p&&Vs.flushSync(()=>l("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=N_(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:b.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function N_(e){return(e==null?void 0:e.animationName)||"none"}let MA=0;function sLe(){b.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:IB()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:IB()),MA++,()=>{MA===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MA--}},[])}function IB(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Zre=vQ(),jA=function(){},$R=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:jA,onWheelCapture:jA,onTouchMoveCapture:jA}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,x=e.inert,y=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,C=EL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,P=gQ([n,t]),R=Pi(Pi({},C),o);return b.createElement(b.Fragment,null,c&&b.createElement(O,{sideCar:Zre,removeScrollBar:u,shards:d,noIsolation:p,inert:x,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?b.cloneElement(b.Children.only(s),Pi(Pi({},R),{ref:P})):b.createElement(_,Pi({},R,{className:l,ref:P}),s))});$R.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$R.classNames={fullWidth:ww,zeroRight:yw};var QD=!1;if(typeof window<"u")try{var M_=Object.defineProperty({},"passive",{get:function(){return QD=!0,!0}});window.addEventListener("test",M_,M_),window.removeEventListener("test",M_,M_)}catch{QD=!1}var nv=QD?{passive:!1}:!1,lLe=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},uLe=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},DB=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Jre(e,n);if(r){var o=eoe(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},cLe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fLe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jre=function(e,t){return e==="v"?lLe(t):uLe(t)},eoe=function(e,t){return e==="v"?cLe(t):fLe(t)},dLe=function(e,t){return e==="h"&&t==="rtl"?-1:1},hLe=function(e,t,n,r,o){var i=dLe(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,h=0;do{var p=eoe(e,s),x=p[0],y=p[1],w=p[2],_=y-w-i*x;(x||_)&&Jre(e,s)&&(d+=_,h+=x),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&d===0||!c&&h===0)&&(u=!0),u},j_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},LB=function(e){return[e.deltaX,e.deltaY]},$B=function(e){return e&&"current"in e?e.current:e},pLe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mLe=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},gLe=0,rv=[];function vLe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(gLe++)[0],i=b.useState(function(){return CL()})[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=mQ([e.lockRef.current],(e.shards||[]).map($B),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(y,w){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var _=j_(y),C=n.current,O="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],R,T=y.target,k=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in y&&k==="h"&&T.type==="range")return!1;var M=DB(k,T);if(!M)return!0;if(M?R=k:(R=k==="v"?"h":"v",M=DB(k,T)),!M)return!1;if(!r.current&&"changedTouches"in y&&(O||P)&&(r.current=R),!R)return!0;var j=r.current||R;return hLe(j,w,y,j==="h"?O:P)},[]),l=b.useCallback(function(y){var w=y;if(!(!rv.length||rv[rv.length-1]!==i)){var _="deltaY"in w?LB(w):j_(w),C=t.current.filter(function(R){return R.name===w.type&&R.target===w.target&&pLe(R.delta,_)})[0];if(C&&C.should){w.preventDefault();return}if(!C){var O=(a.current.shards||[]).map($B).filter(Boolean).filter(function(R){return R.contains(w.target)}),P=O.length>0?s(w,O[0]):!a.current.noIsolation;P&&w.preventDefault()}}},[]),u=b.useCallback(function(y,w,_,C){var O={name:y,delta:w,target:_,should:C};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),c=b.useCallback(function(y){n.current=j_(y),r.current=void 0},[]),d=b.useCallback(function(y){u(y.type,LB(y),y.target,s(y,e.lockRef.current))},[]),h=b.useCallback(function(y){u(y.type,j_(y),y.target,s(y,e.lockRef.current))},[]);b.useEffect(function(){return rv.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,nv),document.addEventListener("touchmove",l,nv),document.addEventListener("touchstart",c,nv),function(){rv=rv.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,nv),document.removeEventListener("touchmove",l,nv),document.removeEventListener("touchstart",c,nv)}},[]);var p=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(i,{styles:mLe(o)}):null,p?b.createElement(bQ,{gapMode:"margin"}):null)}const yLe=wQ(Zre,vLe);var toe=b.forwardRef(function(e,t){return b.createElement($R,Pi({},e,{ref:t,sideCar:yLe}))});toe.classNames=$R.classNames;const noe="Dialog",[roe]=M3e(noe),[wLe,Cm]=roe(noe),xLe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=b.useRef(null),l=b.useRef(null),[u=!1,c]=L3e({prop:r,defaultProp:o,onChange:i});return b.createElement(wLe,{scope:t,triggerRef:s,contentRef:l,contentId:AA(),titleId:AA(),descriptionId:AA(),open:u,onOpenChange:c,onOpenToggle:b.useCallback(()=>c(d=>!d),[c]),modal:a},n)},ooe="DialogPortal",[bLe,ioe]=roe(ooe,{forceMount:void 0}),SLe=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Cm(ooe,t);return b.createElement(bLe,{scope:t,forceMount:n},b.Children.map(r,a=>b.createElement(LR,{present:n||i.open},b.createElement(oLe,{asChild:!0,container:o},a))))},ZD="DialogOverlay",_Le=b.forwardRef((e,t)=>{const n=ioe(ZD,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Cm(ZD,e.__scopeDialog);return i.modal?b.createElement(LR,{present:r||i.open},b.createElement(ELe,Ni({},o,{ref:t}))):null}),ELe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cm(ZD,n);return b.createElement(toe,{as:G4,allowPinchZoom:!0,shards:[o.contentRef]},b.createElement(DR.div,Ni({"data-state":soe(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),dy="DialogContent",CLe=b.forwardRef((e,t)=>{const n=ioe(dy,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Cm(dy,e.__scopeDialog);return b.createElement(LR,{present:r||i.open},i.modal?b.createElement(OLe,Ni({},o,{ref:t})):b.createElement(RLe,Ni({},o,{ref:t})))}),OLe=b.forwardRef((e,t)=>{const n=Cm(dy,e.__scopeDialog),r=b.useRef(null),o=Ob(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return ab(i)},[]),b.createElement(aoe,Ni({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rv(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Rv(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Rv(e.onFocusOutside,i=>i.preventDefault())}))}),RLe=b.forwardRef((e,t)=>{const n=Cm(dy,e.__scopeDialog),r=b.useRef(!1);return b.createElement(aoe,Ni({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(r.current=!0);const s=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),aoe=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Cm(dy,n),l=b.useRef(null),u=Ob(t,l);return sLe(),b.createElement(b.Fragment,null,b.createElement(Q3e,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},b.createElement(K3e,Ni({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":soe(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),PLe="DialogTitle";function soe(e){return e?"open":"closed"}const TLe="DialogTitleWarning";N3e(TLe,{contentName:dy,titleName:PLe,docsSlug:"dialog"});const ALe=xLe,kLe=SLe,NLe=_Le,MLe=CLe;var jLe='[cmdk-list-sizer=""]',z1='[cmdk-group=""]',IA='[cmdk-group-items=""]',ILe='[cmdk-group-heading=""]',K4='[cmdk-item=""]',FB=`${K4}:not([aria-disabled="true"])`,JD="cmdk-item-select",Gc="data-value",DLe=(e,t)=>A3e(e,t),loe=b.createContext(void 0),Rb=()=>b.useContext(loe),uoe=b.createContext(void 0),Y4=()=>b.useContext(uoe),coe=b.createContext(void 0),foe=b.forwardRef((e,t)=>{let n=b.useRef(null),r=dv(()=>{var G,z,X;return{search:"",value:(X=(z=e.value)!=null?z:(G=e.defaultValue)==null?void 0:G.toLowerCase())!=null?X:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=dv(()=>new Set),i=dv(()=>new Map),a=dv(()=>new Map),s=dv(()=>new Set),l=doe(e),{label:u,children:c,value:d,onValueChange:h,filter:p,shouldFilter:x,vimBindings:y=!0,...w}=e,_=b.useId(),C=b.useId(),O=b.useId(),P=GLe();r0(()=>{if(d!==void 0){let G=d.trim().toLowerCase();r.current.value=G,P(6,L),R.emit()}},[d]);let R=b.useMemo(()=>({subscribe:G=>(s.current.add(G),()=>s.current.delete(G)),snapshot:()=>r.current,setState:(G,z,X)=>{var ee,ae,fe;if(!Object.is(r.current[G],z)){if(r.current[G]=z,G==="search")$(),M(),P(1,j);else if(G==="value")if(((ee=l.current)==null?void 0:ee.value)!==void 0){let ie=z??"";(fe=(ae=l.current).onValueChange)==null||fe.call(ae,ie);return}else X||P(5,L);R.emit()}},emit:()=>{s.current.forEach(G=>G())}}),[]),T=b.useMemo(()=>({value:(G,z)=>{z!==a.current.get(G)&&(a.current.set(G,z),r.current.filtered.items.set(G,k(z)),P(2,()=>{M(),R.emit()}))},item:(G,z)=>(o.current.add(G),z&&(i.current.has(z)?i.current.get(z).add(G):i.current.set(z,new Set([G]))),P(3,()=>{$(),M(),r.current.value||j(),R.emit()}),()=>{a.current.delete(G),o.current.delete(G),r.current.filtered.items.delete(G);let X=K();P(4,()=>{$(),(X==null?void 0:X.getAttribute("id"))===G&&j(),R.emit()})}),group:G=>(i.current.has(G)||i.current.set(G,new Set),()=>{a.current.delete(G),i.current.delete(G)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],commandRef:n,listId:_,inputId:O,labelId:C}),[]);function k(G){var z,X;let ee=(X=(z=l.current)==null?void 0:z.filter)!=null?X:DLe;return G?ee(G,r.current.search):0}function M(){if(!n.current||!r.current.search||l.current.shouldFilter===!1)return;let G=r.current.filtered.items,z=[];r.current.filtered.groups.forEach(ee=>{let ae=i.current.get(ee),fe=0;ae.forEach(ie=>{let we=G.get(ie);fe=Math.max(we,fe)}),z.push([ee,fe])});let X=n.current.querySelector(jLe);H().sort((ee,ae)=>{var fe,ie;let we=ee.getAttribute(Gc),de=ae.getAttribute(Gc);return((fe=G.get(de))!=null?fe:0)-((ie=G.get(we))!=null?ie:0)}).forEach(ee=>{let ae=ee.closest(IA);ae?ae.appendChild(ee.parentElement===ae?ee:ee.closest(`${IA} > *`)):X.appendChild(ee.parentElement===X?ee:ee.closest(`${IA} > *`))}),z.sort((ee,ae)=>ae[1]-ee[1]).forEach(ee=>{let ae=n.current.querySelector(`${z1}[${Gc}="${ee[0]}"]`);ae==null||ae.parentElement.appendChild(ae)})}function j(){let G=H().find(X=>!X.ariaDisabled),z=G==null?void 0:G.getAttribute(Gc);R.setState("value",z||void 0)}function $(){if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let z of o.current){let X=a.current.get(z),ee=k(X);r.current.filtered.items.set(z,ee),ee>0&&G++}for(let[z,X]of i.current)for(let ee of X)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(z);break}r.current.filtered.count=G}function L(){var G,z,X;let ee=K();ee&&(((G=ee.parentElement)==null?void 0:G.firstChild)===ee&&((X=(z=ee.closest(z1))==null?void 0:z.querySelector(ILe))==null||X.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function K(){var G;return(G=n.current)==null?void 0:G.querySelector(`${K4}[aria-selected="true"]`)}function H(){return Array.from(n.current.querySelectorAll(FB))}function D(G){let z=H()[G];z&&R.setState("value",z.getAttribute(Gc))}function W(G){var z;let X=K(),ee=H(),ae=ee.findIndex(ie=>ie===X),fe=ee[ae+G];(z=l.current)!=null&&z.loop&&(fe=ae+G<0?ee[ee.length-1]:ae+G===ee.length?ee[0]:ee[ae+G]),fe&&R.setState("value",fe.getAttribute(Gc))}function q(G){let z=K(),X=z==null?void 0:z.closest(z1),ee;for(;X&&!ee;)X=G>0?WLe(X,z1):HLe(X,z1),ee=X==null?void 0:X.querySelector(FB);ee?R.setState("value",ee.getAttribute(Gc)):W(G)}let Y=()=>D(H().length-1),U=G=>{G.preventDefault(),G.metaKey?Y():G.altKey?q(1):W(1)},V=G=>{G.preventDefault(),G.metaKey?D(0):G.altKey?q(-1):W(-1)};return b.createElement("div",{ref:Pb([n,t]),...w,"cmdk-root":"",onKeyDown:G=>{var z;if((z=w.onKeyDown)==null||z.call(w,G),!G.defaultPrevented)switch(G.key){case"n":case"j":{y&&G.ctrlKey&&U(G);break}case"ArrowDown":{U(G);break}case"p":case"k":{y&&G.ctrlKey&&V(G);break}case"ArrowUp":{V(G);break}case"Home":{G.preventDefault(),D(0);break}case"End":{G.preventDefault(),Y();break}case"Enter":if(!G.nativeEvent.isComposing){G.preventDefault();let X=K();if(X){let ee=new Event(JD);X.dispatchEvent(ee)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:KLe},u),b.createElement(uoe.Provider,{value:R},b.createElement(loe.Provider,{value:T},c)))}),LLe=b.forwardRef((e,t)=>{var n,r;let o=b.useId(),i=b.useRef(null),a=b.useContext(coe),s=Rb(),l=doe(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;r0(()=>s.item(o,a==null?void 0:a.id),[]);let c=hoe(o,i,[e.value,e.children,i]),d=Y4(),h=pm(R=>R.value&&R.value===c.current),p=pm(R=>u||s.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);b.useEffect(()=>{let R=i.current;if(!(!R||e.disabled))return R.addEventListener(JD,x),()=>R.removeEventListener(JD,x)},[p,e.onSelect,e.disabled]);function x(){var R,T;y(),(T=(R=l.current).onSelect)==null||T.call(R,c.current)}function y(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:w,value:_,onSelect:C,forceMount:O,...P}=e;return b.createElement("div",{ref:Pb([i,t]),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":w||void 0,"aria-selected":h||void 0,"data-disabled":w||void 0,"data-selected":h||void 0,onPointerMove:w?void 0:y,onClick:w?void 0:x},e.children)}),$Le=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=b.useId(),s=b.useRef(null),l=b.useRef(null),u=b.useId(),c=Rb(),d=pm(x=>o||c.filter()===!1?!0:x.search?x.filtered.groups.has(a):!0);r0(()=>c.group(a),[]),hoe(a,s,[e.value,e.heading,l]);let h=b.useMemo(()=>({id:a,forceMount:o}),[o]),p=b.createElement(coe.Provider,{value:h},r);return b.createElement("div",{ref:Pb([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&b.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},p))}),FLe=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=b.useRef(null),i=pm(a=>!a.search);return!n&&!i?null:b.createElement("div",{ref:Pb([o,t]),...r,"cmdk-separator":"",role:"separator"})}),BLe=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=Y4(),a=pm(c=>c.search),s=pm(c=>c.value),l=Rb(),u=b.useMemo(()=>{var c;let d=(c=l.commandRef.current)==null?void 0:c.querySelector(`${K4}[${Gc}="${s}"]`);return d==null?void 0:d.getAttribute("id")},[s,l.commandRef]);return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:o?e.value:a,onChange:c=>{o||i.setState("search",c.target.value),n==null||n(c.target.value)}})}),zLe=b.forwardRef((e,t)=>{let{children:n,...r}=e,o=b.useRef(null),i=b.useRef(null),a=Rb();return b.useEffect(()=>{if(i.current&&o.current){let s=i.current,l=o.current,u,c=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let d=s.offsetHeight;l.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(u),c.unobserve(s)}}},[]),b.createElement("div",{ref:Pb([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},b.createElement("div",{ref:i,"cmdk-list-sizer":""},n))}),qLe=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...s}=e;return b.createElement(ALe,{open:n,onOpenChange:r},b.createElement(kLe,{container:a},b.createElement(NLe,{"cmdk-overlay":"",className:o}),b.createElement(MLe,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(foe,{ref:t,...s}))))}),ULe=b.forwardRef((e,t)=>{let n=b.useRef(!0),r=pm(o=>o.filtered.count===0);return b.useEffect(()=>{n.current=!1},[]),n.current||!r?null:b.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),VLe=b.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return b.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},b.createElement("div",{"aria-hidden":!0},r))}),ja=Object.assign(foe,{List:zLe,Item:LLe,Input:BLe,Group:$Le,Separator:FLe,Dialog:qLe,Empty:ULe,Loading:VLe});function WLe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function HLe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function doe(e){let t=b.useRef(e);return r0(()=>{t.current=e}),t}var r0=typeof window>"u"?b.useEffect:b.useLayoutEffect;function dv(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function Pb(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function pm(e){let t=Y4(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function hoe(e,t,n){let r=b.useRef(),o=Rb();return r0(()=>{var i;let a=(()=>{var s;for(let l of n){if(typeof l=="string")return l.trim().toLowerCase();if(typeof l=="object"&&"current"in l)return l.current?(s=l.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();o.value(e,a),(i=t.current)==null||i.setAttribute(Gc,a),r.current=a}),r}var GLe=()=>{let[e,t]=b.useState(),n=dv(()=>new Map);return r0(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},KLe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const X4=b.forwardRef(({className:e,...t},n)=>v.jsx(ja,{ref:n,className:je("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));X4.displayName=ja.displayName;const poe=b.forwardRef(({className:e,...t},n)=>v.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[v.jsx(YQ,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v.jsx(ja.Input,{ref:n,className:je("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));poe.displayName=ja.Input.displayName;const Q4=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.List,{ref:n,className:je("max-h-[300px] overflow-y-auto overflow-x-hidden overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch]",e),...t}));Q4.displayName=ja.List.displayName;const moe=b.forwardRef((e,t)=>v.jsx(ja.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));moe.displayName=ja.Empty.displayName;const SC=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Group,{ref:n,className:je("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));SC.displayName=ja.Group.displayName;const goe=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Separator,{ref:n,className:je("-mx-1 h-px bg-border",e),...t}));goe.displayName=ja.Separator.displayName;const _C=b.forwardRef(({className:e,...t},n)=>v.jsx(ja.Item,{ref:n,className:je("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));_C.displayName=ja.Item.displayName;const YLe="hsl(var(--brand))",XLe="color-mix(in srgb, hsl(var(--brand)) 70%, hsl(var(--foreground)))",QLe=(e,t)=>{if(!e)return[];const n=[],r=e.split(/(\s+)/);for(const o of r){if(/^\s+$/.test(o)){n.push({text:o,isFilter:!1});continue}const i=t.some(a=>o.toLowerCase().startsWith(a.key.toLowerCase()));n.push({text:o,isFilter:i})}return n};function voe({value:e,onChange:t,onSubmit:n,getAutocomplete:r,applySuggestion:o,autocompleteContext:i,renderSuggestion:a,filterChips:s,placeholder:l="Search...",className:u,searchIcon:c,clearIcon:d,popoverClassName:h}){var U;const p=b.useRef(null),x=b.useRef(null),y=b.useRef(!1),[w,_]=b.useState(!1),[C,O]=b.useState(),[P,R]=b.useState(e),T=b.useRef([]),k=b.useRef(e),M=b.useRef(null),j=!!(s!=null&&s.length);b.useEffect(()=>{R(e)},[e]),b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const $=b.useMemo(()=>j?QLe(P,s):[],[P,s,j]);b.useEffect(()=>{const V=p.current;if(!V||!j)return;const G=()=>{M.current&&(M.current.style.transform=`translateX(-${V.scrollLeft}px)`)};return V.addEventListener("scroll",G),G(),()=>V.removeEventListener("scroll",G)},[P,j]);const{suggestions:L}=b.useMemo(()=>r(P,i),[r,P,i]);b.useEffect(()=>{(T.current.length!==L.length||T.current.some((G,z)=>{var X;return G.value!==((X=L[z])==null?void 0:X.value)}))&&(O(void 0),T.current=L)},[L]),b.useEffect(()=>{P.endsWith(" ")&&!k.current.endsWith(" ")&&P.length>k.current.length&&L.length>0&&_(!0),k.current=P},[P,L.length]);const K=b.useCallback(()=>{n?n(P):t(P)},[P,t,n]),H=b.useCallback(V=>{const G=L[V];if(G){const z=o(P,G);R(z),G.type==="value"&&(t(z),_(!1),y.current=!0),setTimeout(()=>{const X=p.current;X&&(X.focus(),X.setSelectionRange(z.length,z.length)),setTimeout(()=>{y.current=!1},50)},0)}},[P,L,o,t]),D=b.useCallback(V=>{if(V.key==="Enter"){if(V.preventDefault(),w&&L.length>0){const G=C!==void 0?C:0;L[G]&&H(G)}else K(),_(!1);return}if(!(!w||L.length===0)){if(V.key==="Escape")_(!1),O(void 0);else if(V.key==="ArrowDown")V.preventDefault(),O(G=>G===void 0?0:GG===void 0?L.length-1:G>0?G-1:L.length-1);else if(V.key==="Tab"){V.preventDefault();const G=C!==void 0?C:0;L[G]&&H(G)}}},[w,L,C,H,K]),W=b.useCallback((V,G)=>v.jsxs("div",{className:je("flex items-center justify-between w-full",G&&"text-accent-foreground"),children:[v.jsxs("div",{className:"flex items-center gap-2",children:[V.color&&v.jsx("div",{className:je(V.color,"h-[6px] w-[6px] rounded-full")}),V.type==="key"?v.jsxs("code",{className:"py-0.5 text-xs font-mono",children:[V.label,":"]}):v.jsx("span",{className:"py-0.5 font-mono text-xs",children:V.label})]}),V.description&&v.jsx("span",{className:"text-xs text-muted-foreground truncate ml-2",children:V.description})]}),[]),q=a||W,Y=b.useCallback(()=>{var V;R(""),t(""),(V=p.current)==null||V.focus(),_(!1)},[t]);return v.jsx("div",{className:je("space-y-2",u),children:v.jsxs(Xy,{open:w&&L.length>0,modal:!1,children:[v.jsx(Qy,{asChild:!0,children:v.jsxs("div",{className:"relative",children:[c||v.jsx(YQ,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),v.jsx(ri,{ref:p,type:"text",value:P,onChange:V=>{const G=V.target.value;R(G),G.length>0&&_(!0)},onKeyDown:D,onFocus:()=>{x.current&&(clearTimeout(x.current),x.current=null),y.current||_(!0)},onBlur:()=>{x.current=setTimeout(()=>{_(!1),x.current=null},200)},placeholder:l,className:je("pl-9 pr-8",j&&"text-transparent"),style:j?{caretColor:"hsl(var(--foreground))"}:void 0,"data-cy":"search-bar-input"}),j&&P&&v.jsx("div",{className:"absolute inset-[1px] pointer-events-none overflow-hidden flex items-center pl-9 pr-8","aria-hidden":"true",children:v.jsx("div",{ref:M,className:"text-sm text-foreground whitespace-pre",children:$.map((V,G)=>{if(!V.isFilter)return v.jsx("span",{children:V.text},G);const z=V.text.indexOf(":"),X=V.text.slice(0,z+1),ee=V.text.slice(z+1);return v.jsxs("span",{children:[v.jsx("span",{style:{color:YLe},children:X}),ee&&v.jsx("span",{style:{color:XLe},children:ee})]},G)})})}),P&&v.jsx("button",{type:"button",onClick:Y,"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","data-cy":"search-bar-clear",children:d||v.jsx(ty,{className:"h-4 w-4"})})]})}),v.jsx(_m,{className:je("w-[var(--radix-popover-trigger-width)] min-w-[320px] p-0 lg:max-w-[560px]",h),align:"start",onOpenAutoFocus:V=>V.preventDefault(),onCloseAutoFocus:V=>V.preventDefault(),children:L.length>0&&v.jsx(X4,{value:C!==void 0?(U=L[C])==null?void 0:U.value:void 0,children:v.jsx(Q4,{className:"max-h-[300px] bg-muted/50","data-cy":"search-bar-suggestions",children:v.jsx(SC,{children:L.map((V,G)=>v.jsx(_C,{value:V.value,onSelect:()=>H(G),className:je("flex items-center justify-between aria-selected:bg-primary/5 text-primary/60",C!==void 0&&G===C&&"text-accent-foreground"),onMouseEnter:()=>O(G),"data-cy":`search-bar-suggestion-${G}`,children:q(V,C===G)},`${V.value}-${G}`))})})},L.map(V=>V.value).join(","))})]})})}function BB({value:e,onChange:t,autocompleteContext:n,placeholder:r="Filter spans...",className:o}){return v.jsx(voe,{value:e,onChange:t,onSubmit:t,getAutocomplete:x3e,applySuggestion:b3e,autocompleteContext:n,placeholder:r,className:o,filterChips:H4.map(i=>({key:i.value,label:i.label,description:i.description}))})}const ZLe=Hl("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-red-300 bg-red-50/50 text-red-700 dark:border-red-800 dark:bg-red-950/40 dark:text-red-300 [&>svg]:text-red-700 dark:[&>svg]:text-red-300",warn:"border-yellow-400 dark:border-yellow-800",info:"border-blue-200 bg-blue-50/50 dark:border-blue-900 dark:bg-blue-950/30"}},defaultVariants:{variant:"default"}}),EC=b.forwardRef(({className:e,variant:t,...n},r)=>v.jsx("div",{ref:r,role:"alert",className:je(ZLe({variant:t}),e),...n}));EC.displayName="Alert";const CC=b.forwardRef(({className:e,...t},n)=>v.jsx("h5",{ref:n,className:je("mb-1 font-medium leading-none tracking-tight",e),...t}));CC.displayName="AlertTitle";const OC=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:je("text-sm [&_p]:leading-relaxed",e),...t}));OC.displayName="AlertDescription";function JLe(e){const[t,n]=b.useState(()=>{if(!e)return!1;try{return localStorage.getItem(e)==="1"}catch{return!1}}),r=b.useCallback(()=>{if(e)try{localStorage.setItem(e,"1")}catch{}n(!0)},[e]);return{dismissed:t,dismiss:r}}function DA({title:e,description:t,icon:n,actions:r,dismissible:o=!1,dismissKey:i,variant:a="default",className:s}){const{dismissed:l,dismiss:u}=JLe(o?i:void 0);return l?null:v.jsxs(EC,{variant:a==="info"?"info":"default",className:je(a==="default"&&"border-border bg-card","[&>svg]:hidden",s),children:[o&&v.jsx(xt,{variant:"ghost",size:"icon",onClick:u,className:"absolute right-2 top-2 size-6 text-muted-foreground",children:v.jsx(JO,{className:"size-3.5"})}),v.jsxs("div",{className:"flex items-start gap-3",children:[n&&v.jsx("div",{className:"mt-0.5 shrink-0 text-muted-foreground",children:n}),v.jsxs("div",{className:je("flex flex-col gap-1",o&&"pr-6"),children:[v.jsx(CC,{className:"mb-0",children:e}),v.jsx(OC,{className:"text-xs leading-snug text-muted-foreground",children:t}),r&&v.jsx("div",{className:"mt-2 flex gap-2",children:r})]})]})]})}const Pv={v1:{quickstart:{title:"Quickstart",href:"https://docs.hatchet.run/v1/quickstart"},workers:{title:"Workers",href:"https://docs.hatchet.run/v1/workers"},"scheduled-runs":{title:"Scheduled Runs",href:"https://docs.hatchet.run/v1/scheduled-runs"},"cron-runs":{title:"Cron Runs",href:"https://docs.hatchet.run/v1/cron-runs"},events:{title:"Events",href:"https://docs.hatchet.run/v1/events"},webhooks:{title:"Webhooks",href:"https://docs.hatchet.run/v1/webhooks"},"rate-limits":{title:"Rate Limits",href:"https://docs.hatchet.run/v1/rate-limits"},"advanced-assignment":{"worker-affinity":{title:"Worker Affinity",href:"https://docs.hatchet.run/v1/advanced-assignment/worker-affinity"}},logging:{href:"https://docs.hatchet.run/v1/logging"},opentelemetry:{href:"https://docs.hatchet.run/v1/opentelemetry"},security:{"audit-logs":{title:"Audit Logs",href:"https://docs.hatchet.run/v1/security/audit-logs"}}},"self-hosting":{"configuration-options":{title:"Engine Configuration Options",href:"https://docs.hatchet.run/self-hosting/configuration-options"}}};function Z4(){const{isControlPlaneEnabled:e}=Fy(),t=Mn({queryKey:["metadata:get",e],queryFn:async()=>{try{return await(e?Mt.metadataGet():ot.metadataGet())}catch(r){return console.error("Failed to get API metadata",r),null}},retry:!1,staleTime:1e3*60});return{meta:b.useMemo(()=>{var r;return(r=t.data)==null?void 0:r.data},[t.data]),isLoading:!1}}function e4e(e){return e.length>0}function e5(e,t){t.add(e.spanId),e.children.forEach(n=>e5(n,t))}function t5(e,t,n=[]){for(const r of e){if(r.spanId===t)return n;const o=t5(r.children,t,[...n,r.spanId]);if(o)return o}}function yoe(e,t){var n;for(const r of e){if(r.spanName===Mi.ENGINE_WORKFLOW_RUN&&((n=r.spanAttributes)==null?void 0:n[ki.WORKFLOW_RUN_ID])===t)return r;const o=yoe(r.children,t);if(o)return o}}function woe(e,t){return e.map(n=>({...n,isContextOnly:!t.has(n.spanId),children:woe(n.children,t)}))}const t4e="0001-01-01T00:00:00Z",n4e=e=>({spanId:e.spanId,parentSpanId:e.parentSpanId,spanName:e.spanName,statusCode:e.statusCode,statusMessage:e.statusMessage,durationNs:e.durationNs,createdAt:e.createdAt,spanAttributes:e.spanAttributes});function r4e(e){const t=new Set,n=new Map,r=new Set;for(const i of e)if(i.spanName&&r.add(i.spanName),!!i.spanAttributes)for(const[a,s]of Object.entries(i.spanAttributes)){t.add(a);let l=n.get(a);l||(l=new Set,n.set(a,l)),l.add(s)}const o=new Map;for(const[i,a]of n)o.set(i,[...a].sort());return{attributeKeys:[...t].sort(),attributeValues:o,spanNames:[...r].sort()}}const o4e=e=>{const{isRunning:t,tasks:n,workflowRunCreatedAt:r,workflowRunStartedAt:o}=e,i=e.taskRunId??e.workflowRunExternalId,{tenant:a}=ta({from:ft.tenantRoute.to}),{isCloudEnabled:s}=K3(a),{meta:l}=Z4(),{queryString:u,setQueryString:c}=_4(),d=15e3,[h,p]=b.useState(!1);b.useEffect(()=>{if(t){p(!1);return}p(!0);const k=setTimeout(()=>p(!1),d);return()=>clearTimeout(k)},[t]);const x=Mn({queryKey:[a,i],queryFn:async()=>{var M,j;return(j=(M=(await ot.v1ObservabilityGetTrace(a,{run_external_id:i,limit:1e3})).data)==null?void 0:M.rows)==null?void 0:j.map(n4e)},refetchInterval:t||h?5e3:!1}),y=x.data,w=b.useMemo(()=>r4e(y??[]),[y]),_=b.useMemo(()=>{if(!r)return;const k=o&&o!==t4e&&!Number.isNaN(new Date(o).getTime())?o:void 0;return{createdAt:r,startedAt:k}},[r,o]),C=b.useMemo(()=>{let k=null;const M=!!(y&&e4e(y)),j=M?void 0:_,$={enableTraceInProgressSynthesis:!M};if(M)k=bB(y,n,j,$);else{const L=n==null?void 0:n.filter(K=>K.status==="QUEUED"||K.status==="RUNNING");L&&L.length>0&&(k=bB(void 0,L,j,$))}return!k||k.length===0?null:(k[0].inProgress=t&&!Ls(k[0]),k)},[y,_,t,n]),O=b.useMemo(()=>v3e(u),[u]),P=b.useMemo(()=>{if(C){if(e.taskRunId){const k=Mre(C,e.taskRunId);if(k){const M=new Set;e5(k,M);const j=t5(C,k.spanId);return j&&j.forEach($=>M.add($)),M}}else if(e.workflowRunExternalId){const k=yoe(C,e.workflowRunExternalId);if(k){const M=new Set;e5(k,M);const j=t5(C,k.spanId);return j&&j.forEach($=>M.add($)),M}}}},[C,e.taskRunId,e.workflowRunExternalId]),R=b.useMemo(()=>{if(!C)return null;const k=p3e(C,O);return P?woe(k,P):k},[C,O,P]);if(!x.isFetched)return v.jsx(Jy,{});if(!R||R.length===0)return v.jsxs("div",{className:"flex flex-col gap-4",children:[C&&v.jsx(BB,{value:u,onChange:c,autocompleteContext:w}),C?v.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"No spans match the current filter."}):!s&&!(l!=null&&l.observabilityEnabled)?v.jsx(DA,{icon:v.jsx(I2,{className:"size-4"}),title:"Enable Observability",description:v.jsxs(v.Fragment,{children:["Trace collection is not enabled on this instance. Set"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"SERVER_OBSERVABILITY_ENABLED=true"})," ","in your server configuration to start collecting traces."]}),actions:v.jsxs("a",{href:Pv["self-hosting"]["configuration-options"].href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:["View setup guide",v.jsx(Wp,{className:"size-3"})]})}):v.jsx(DA,{icon:v.jsx(I2,{className:"size-4"}),title:"No traces found",description:v.jsxs(v.Fragment,{children:["To collect traces, use the"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"HatchetInstrumentor"})," ","in your SDK."]}),actions:v.jsxs("a",{href:Pv.v1.opentelemetry.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:["View instrumentation docs",v.jsx(Wp,{className:"size-3"})]})})]});const T=!t&&j5e(R);return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx(BB,{value:u,onChange:c,autocompleteContext:w}),T&&v.jsx(DA,{variant:"info",dismissible:!0,dismissKey:"hatchet:dismiss-traces-enrichment-hint",icon:v.jsx(I2,{className:"size-4"}),title:"Enrich your traces",description:v.jsxs(v.Fragment,{children:["These traces only contain engine-generated spans. Add the"," ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"HatchetInstrumentor"})," ","to your SDK to capture custom spans from your application code."]}),actions:v.jsxs("a",{href:Pv.v1.opentelemetry.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:["View instrumentation docs",v.jsx(Wp,{className:"size-3"})]})}),v.jsx(c3e,{spanTrees:R,isRunning:t,contextTaskRunId:e.taskRunId,onClearFilters:u?()=>c(""):void 0})]})},i4e=e=>{const{isLoading:t,data:n}=Mn({...Yr.v1Tasks.get(e.taskRunId)});if(t||!n)return null;const r=(n.status===It.FAILED?n.errorMessage:JSON.stringify(n.output,null,2))||"";return v.jsx(hf,{className:"my-4",language:"json",code:r})},xoe=["error","warn","info","debug"],vtt={error:Xi.ERROR,warn:Xi.WARN,info:Xi.INFO,debug:Xi.DEBUG},a4e={error:"bg-red-500",warn:"bg-yellow-500",info:"bg-green-500",debug:"bg-slate-500"},s4e={error:"Error messages",warn:"Warning messages",info:"Informational messages",debug:"Debug messages"},Tv={LEVEL:"level",ATTEMPT:"attempt",WORKFLOW:"workflow"},Ew=[{type:"key",label:"level",value:`${Tv.LEVEL}:`,description:"Filter by log level"},{type:"key",label:"attempt",value:`${Tv.ATTEMPT}:`,description:"Filter by attempt number"},{type:"key",label:"workflow",value:`${Tv.WORKFLOW}:`,description:"Filter by workflow name"}];function l4e(e,t){const{availableAttempts:n=[],workflowNames:r=[]}=t,o=e.trimEnd(),i=o.split(" ").pop()||"";if(e.endsWith(" ")&&!o.endsWith(":"))return{mode:"key",suggestions:Ew};if(o==="")return{mode:"key",suggestions:Ew};const a=`${Tv.LEVEL}:`,s=`${Tv.ATTEMPT}:`,l=`${Tv.WORKFLOW}:`;if(i.startsWith(a)){const c=i.slice(a.length).toLowerCase();return{mode:"value",suggestions:xoe.filter(h=>h.startsWith(c)).map(h=>({type:"value",label:h,value:h,description:s4e[h],color:a4e[h]}))}}if(i.startsWith(s)){const c=i.slice(s.length);return{mode:"value",suggestions:(n??[1,2,3]).filter(p=>String(p).startsWith(c)).map(p=>({type:"value",label:String(p),value:String(p),description:`Attempt ${p}`}))}}if(i.startsWith(l)){const c=i.slice(l.length).toLowerCase();return{mode:"value",suggestions:[...r].sort((h,p)=>h.localeCompare(p)).filter(h=>h.toLowerCase().startsWith(c)).map(h=>({type:"value",label:h,value:h}))}}const u=Ew.filter(c=>c.value.startsWith(i.toLowerCase())&&i.length>0);return u.length>0?{mode:"key",suggestions:u}:{mode:"none",suggestions:[]}}function u4e(e,t){return Gre(e,t,Ew)}function c4e(e){const t=[],n=[];let r,o,i;for(const a of Hre(e))if(Wre(a)){const{key:s,value:l}=a;if(s.toLowerCase()==="level"){const u=l.toLowerCase();xoe.includes(u)?r=u:t.push(`Invalid log level: "${l}"`)}else if(s.toLowerCase()==="attempt"){const u=parseInt(l,10);!isNaN(u)&&u>0?o=u:t.push(`Invalid attempt number: "${l}"`)}else s.toLowerCase()==="workflow"?i=l:n.push(`${s}:${l}`)}else n.push(a.text);return{search:n.length>0?n.join(" "):void 0,level:r,attempt:o,workflow:i,raw:e,isValid:t.length===0,errors:t}}const LA=100,$A=e=>`${e.createdAt}-${e.message}`;function f4e({taskRun:e,resetTrigger:t}){var w;const n=rc(),r=b.useRef(void 0),o=b.useRef(!1),i=b.useRef(null),[a,s]=b.useState(""),[l,u]=b.useState(!0),c=b.useMemo(()=>c4e(a),[a]),d=(e==null?void 0:e.status)===It.RUNNING;b.useEffect(()=>{e!=null&&e.metadata.id&&(n.resetQueries({queryKey:["v1Tasks","getLogs",e.metadata.id],exact:!1}),r.current=void 0)},[t,n,e==null?void 0:e.metadata.id,c.level,c.search,c.attempt]);const h=Ape({queryKey:["v1Tasks","getLogs",e==null?void 0:e.metadata.id,c.level,c.search,c.attempt],queryFn:async({pageParam:_})=>{var T;const C={limit:LA,..._&&{since:_.since,until:_.until},...c.level&&{levels:[c.level.toUpperCase()]},...c.search&&{search:c.search},...c.attempt&&{attempt:c.attempt},order_by_direction:VX.DESC},O=await ot.v1LogLineList((e==null?void 0:e.metadata.id)||"",C),P=O.data.rows,R=(T=P==null?void 0:P[0])==null?void 0:T.createdAt;return d&&R&&(r.current=R),O.data},initialPageParam:{since:void 0,until:void 0},enabled:!!e,maxPages:0,refetchInterval:!1,staleTime:1/0,getNextPageParam:_=>{const C=_==null?void 0:_.rows;if(C&&C.length===LA){const O=C[C.length-1];return{since:void 0,until:O==null?void 0:O.createdAt}}}});b.useEffect(()=>{if(!d||!l||!(e!=null&&e.metadata.id))return;i.current&&clearTimeout(i.current),o.current=!1,i.current=null;const _=async()=>{var C;if(!o.current){o.current=!0;try{const O={limit:LA,...r.current&&{since:r.current},...c.level&&{levels:[c.level.toUpperCase()]},...c.search&&{search:c.search},...c.attempt&&{attempt:c.attempt}},R=(await ot.v1LogLineList(e.metadata.id,O)).data.rows;R&&R.length>0&&(r.current=(C=R[0])==null?void 0:C.createdAt,n.setQueryData(["v1Tasks","getLogs",e.metadata.id,c.level,c.search,c.attempt],T=>{if(!T)return T;const k=T.pages[0],M=(k==null?void 0:k.rows)||[],j=new Set(M.map(K=>$A(K))),$=R.filter(K=>!j.has($A(K))),L={...k,rows:[...$,...M]};return{...T,pages:[L,...T.pages.slice(1)]}}))}catch(O){console.error("Failed to poll for new logs:",O)}finally{o.current=!1,i.current=setTimeout(_,1e3)}}};return _(),()=>{i.current&&clearTimeout(i.current),o.current=!1}},[d,l,e==null?void 0:e.metadata.id,c.level,c.search,c.attempt,n]);const p=b.useMemo(()=>{var C;if(!((C=h.data)!=null&&C.pages))return[];const _=new Map;return h.data.pages.forEach(O=>{var P;(P=O==null?void 0:O.rows)==null||P.forEach(R=>{const T=$A(R);_.has(T)||_.set(T,{timestamp:R.createdAt,line:R.message,instance:e==null?void 0:e.displayName,level:R.level,metadata:R.metadata,attempt:R.attempt})})}),Array.from(_.values())},[(w=h.data)==null?void 0:w.pages,e==null?void 0:e.displayName]),x=b.useMemo(()=>Array.from({length:((e==null?void 0:e.retryCount)??0)+1},(_,C)=>C+1),[e==null?void 0:e.retryCount]),y=b.useCallback(()=>{!h.isFetchingNextPage&&h.hasNextPage&&h.fetchNextPage()},[h]);return{logs:p,isLoading:h.isLoading,isFetchingMore:h.isFetchingNextPage,queryString:a,setQueryString:s,parsedQuery:c,fetchOlderLogs:y,setPollingEnabled:u,taskStatus:e==null?void 0:e.status,availableAttempts:x}}const boe=b.createContext(null);function d4e({taskRun:e,resetTrigger:t,children:n}){const r=f4e({taskRun:e,resetTrigger:t});return v.jsx(boe.Provider,{value:r,children:n})}function Soe(){const e=b.useContext(boe);if(!e)throw new Error("useLogsContext must be used within a LogsProvider");return e}function h4e({placeholder:e="Search logs...",className:t}){const{queryString:n,setQueryString:r,availableAttempts:o}=Soe(),i=b.useMemo(()=>({availableAttempts:o}),[o]);return v.jsx(voe,{value:n,onChange:r,onSubmit:r,getAutocomplete:l4e,applySuggestion:u4e,autocompleteContext:i,placeholder:e,className:t,filterChips:Ew.map(a=>({key:a.value,label:a.label,description:a.description}))})}function p4e({taskRun:e,resetTrigger:t}){return v.jsx(d4e,{taskRun:e,resetTrigger:t,children:v.jsx(m4e,{})})}function m4e(){const{logs:e,fetchOlderLogs:t,setPollingEnabled:n,queryString:r,isLoading:o,taskStatus:i}=Soe();return v.jsxs("div",{className:"my-4 flex flex-col gap-y-2 flex-1 min-h-0",children:[v.jsx(h4e,{}),v.jsx(hre,{logs:e,onScrollToBottom:t,onAtTopChange:n,isLoading:o,taskStatus:i},r)]})}function g4e({workflowConfig:e}){const[t,n]=b.useState(!1);return v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(e??{})),n(!0),setTimeout(()=>n(!1),2e3)},children:t?v.jsxs(v.Fragment,{children:[v.jsx(yL,{className:"mr-2 size-3"}),"Copied!"]}):v.jsxs(v.Fragment,{children:[v.jsx(lwe,{className:"mr-2 size-3"}),"Copy Config"]})})}const v4e=({workflowId:e})=>{const{tenantId:t}=ds();return v.jsx(Ul,{to:ft.tenantWorkflowRoute.to,params:{tenant:t,workflow:e},target:"_blank",rel:"noreferrer",children:v.jsx(xt,{size:"sm",variant:"outline",leftIcon:v.jsx(cbe,{className:"size-4"}),children:"Workflow"})})};var J4=(e=>(e.Output="output",e.ChildWorkflowRuns="child-workflow-runs",e.Input="input",e.Logs="logs",e.Traces="traces",e.AdditionalMetadata="additional-metadata",e.Activity="activity",e))(J4||{});const FA=[It.CANCELLED,It.FAILED,It.COMPLETED],y4e=({taskRun:e,showViewTaskRunButton:t})=>{const{tenant:n}=ta({from:ft.tenantRoute.to});return t?v.jsx(Ul,{to:ft.tenantRunRoute.to,params:{tenant:n,run:e.metadata.id},children:v.jsx(xt,{size:"sm",variant:"outline",leftIcon:v.jsx(h7,{className:"size-4"}),children:"Expand"})}):e.workflowRunExternalId&&e.workflowRunExternalId!==RY&&e.workflowRunExternalId!==e.metadata.id?v.jsx(Ul,{to:ft.tenantRunRoute.to,params:{tenant:n,run:e.workflowRunExternalId},children:v.jsx(xt,{size:"sm",variant:"outline",leftIcon:v.jsx(h7,{className:"size-4"}),children:"View DAG Run"})}):null},w4e=({taskRunId:e,defaultOpenTab:t="activity",showViewTaskRunButton:n})=>{const[r,o]=b.useState(0),i=_4(),{set:a}=i,s=i.tab??"overview",l=b.useCallback(()=>{a({focusedTaskRunId:e,tab:"traces"})},[e,a]),u=Mn({...Yr.v1Tasks.get(e),refetchInterval:h=>{var x;const p=(x=h.state.data)==null?void 0:x.status;return Yte(p)?5e3:300}}),{isSkipped:c}=b4({taskRunId:e}),d=u.data;return u.isLoading?v.jsx(Jy,{}):d?v.jsxs("div",{className:"flex w-full flex-col gap-4 h-full",children:[v.jsx("div",{className:"flex flex-row items-center justify-between",children:v.jsx("div",{className:"flex w-full flex-row items-center justify-between",children:v.jsxs("div",{className:"flex flex-row items-center gap-4",children:[d.status&&v.jsx(IJ,{status:d.status,isSkipped:c}),v.jsx("h3",{className:"flex flex-row items-center gap-4 font-mono text-lg font-semibold leading-tight tracking-tight text-foreground",children:d.displayName||"Task Run Detail"})]})})}),d.parentTaskExternalId&&v.jsx(b4e,{tenant:d.tenantId,parentTaskExternalId:d.parentTaskExternalId}),v.jsx("div",{className:"side-responsive-layout flex flex-col items-start justify-start gap-2",children:v.jsxs("div",{className:"side-responsive-inner flex w-full flex-col items-start gap-2",children:[v.jsx("div",{className:"flex flex-row items-center gap-2",children:v.jsxs(SD,{tableKey:"task-run-detail",children:[v.jsx(sC,{actionType:"replay",paramOverrides:{externalIds:[e]},disabled:!FA.includes(d.status),showModal:!1,showLabel:!0}),v.jsx(sC,{actionType:"cancel",paramOverrides:{externalIds:[e]},disabled:FA.includes(d.status),showModal:!1,showLabel:!0})]})}),v.jsxs("div",{className:"flex flex-row items-center gap-2",children:[v.jsx(y4e,{taskRun:d,showViewTaskRunButton:n||!1}),v.jsx(v4e,{workflowId:d.workflowId}),v.jsx(g4e,{workflowConfig:d.workflowConfig})]})]})}),v.jsx("div",{className:"flex flex-row items-center gap-2",children:v.jsx(x4e,{taskRunId:e})}),v.jsxs(rC,{value:s,onValueChange:h=>{i.setTab(h),h==="logs"&&o(p=>p+1)},className:"flex flex-1 min-h-0 flex-col",children:[v.jsxs(Gw,{layout:"underlined",className:"mb-4",children:[v.jsx(_a,{variant:"underlined",value:"overview",children:"Overview"}),v.jsx(_a,{variant:"underlined",value:"traces",children:"Traces"}),v.jsx(_a,{variant:"underlined",value:"logs",children:"Logs"})]}),v.jsxs(Ea,{value:"overview",className:"flex min-h-0 flex-1 flex-col",children:[v.jsx("div",{className:"relative flex w-full bg-slate-100 dark:bg-slate-900",children:v.jsx(XDe,{onClick:l,taskRunId:e})}),v.jsx("div",{className:"h-4"}),v.jsxs(rC,{defaultValue:t,className:"flex min-h-0 flex-1 flex-col",children:[v.jsxs(Gw,{layout:"underlined",children:[v.jsx(_a,{variant:"underlined",value:"activity",children:"Activity"}),v.jsx(_a,{variant:"underlined",value:"output",children:"Output"}),d.numSpawnedChildren>0&&v.jsxs(_a,{variant:"underlined",value:"child-workflow-runs",children:["Children (",d.numSpawnedChildren,")"]}),v.jsx(_a,{variant:"underlined",value:"input",children:"Input"}),v.jsx(_a,{variant:"underlined",value:"additional-metadata",className:"side-responsive-layout",children:v.jsxs("span",{className:"side-responsive-inner flex",children:[v.jsx("span",{className:"side-sm:hidden block",children:"Metadata"}),v.jsx("span",{className:"side-sm:block hidden",children:"Additional Metadata"})]})})]}),v.jsx(Ea,{value:"output",className:"flex-1 min-h-0 overflow-y-auto",children:v.jsx(i4e,{taskRunId:e})}),v.jsx(Ea,{value:"activity",className:"mt-4 flex-1 min-h-0 flex flex-col",children:v.jsx(p5e,{taskRunId:e,isDurable:d.isDurable})}),v.jsx(Ea,{value:"child-workflow-runs",className:"mt-4",children:v.jsx("div",{className:"flex flex-col h-96",children:v.jsx(SD,{tableKey:`child-runs-${e}`,display:{hideCounts:!0,hideMetrics:!0,hideDateFilter:!0,hideTriggerRunButton:!0},runFilters:{parentTaskExternalId:e},children:v.jsx(xle,{})})})}),v.jsx(Ea,{value:"input",className:"flex-1 min-h-0 overflow-y-auto",children:d.input&&v.jsx(hf,{className:"my-4",language:"json",code:JSON.stringify(d.input,null,2)})}),v.jsx(Ea,{value:"additional-metadata",className:"flex-1 min-h-0 overflow-y-auto",children:v.jsx(hf,{className:"my-4",language:"json",code:JSON.stringify(d.additionalMetadata??{},null,2)})})]})]}),v.jsx(Ea,{value:"traces",className:"min-h-0 flex-1 overflow-auto",children:v.jsx(o4e,{taskRunId:e,isRunning:!FA.includes(d.status),tasks:[{externalId:d.metadata.id,displayName:d.displayName,status:d.status,createdAt:d.metadata.createdAt,startedAt:d.startedAt}]})}),v.jsx(Ea,{value:"logs",className:"min-h-0 flex-1 flex flex-col",children:v.jsx(p4e,{resetTrigger:r,taskRun:d})})]})]}):v.jsx("div",{children:"No events found"})},x4e=({taskRunId:e})=>{const t=Mn({...Yr.v1Tasks.get(e)}),{isSkipped:n}=b4({taskRunId:e}),r=[],o=t.data;if(t.isLoading||!o)return v.jsx(Jy,{});o.startedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Started ",v.jsx(Dl,{date:o.startedAt})]},"created")),o.status===It.FAILED&&o.finishedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Failed ",v.jsx(Dl,{date:o.finishedAt})]},"finished")),o.status===It.COMPLETED&&o.finishedAt&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:[n?"Skipped ":"Succeeded ",v.jsx(Dl,{date:o.finishedAt})]},"finished")),o.duration&&r.push(v.jsxs("div",{className:"text-sm text-muted-foreground",children:["Run took ",OY(o.duration)]},"duration"));const i=[];return r.forEach((a,s)=>{i.push(a),s{const{decorative:n,orientation:r=zB,...o}=e,i=E4e(r)?r:zB,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(Yee.div,{"data-orientation":i,...s,...o,ref:t})});_oe.displayName=S4e;function E4e(e){return _4e.includes(e)}var Eoe=_oe;const Wd=b.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,flush:r=!1,...o},i)=>v.jsx(Eoe,{ref:i,decorative:n,orientation:t,className:je("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",r&&t==="horizontal"&&"relative left-1/2 right-1/2 -ml-[50cqw] -mr-[50cqw] w-[100cqw] max-w-[100cqw]",r&&t==="vertical"&&"relative top-1/2 bottom-1/2 -mt-[50cqh] -mb-[50cqh] h-[100cqh] max-h-[100cqh]",e),...o}));Wd.displayName=Eoe.displayName;var Tb=e=>e.type==="checkbox",Rp=e=>e instanceof Date,Ca=e=>e==null;const Coe=e=>typeof e=="object";var ao=e=>!Ca(e)&&!Array.isArray(e)&&Coe(e)&&!Rp(e),Ooe=e=>ao(e)&&e.target?Tb(e.target)?e.target.checked:e.target.value:e,Roe=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),C4e=e=>{const t=e.constructor&&e.constructor.prototype;return ao(t)&&t.hasOwnProperty("isPrototypeOf")},e$=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ho(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(e$&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(ao(e)&&C4e(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=ho(e[o]));return r}var FR=e=>/^\w*$/.test(e),kr=e=>e===void 0,t$=e=>Array.isArray(e)?e.filter(Boolean):[],n$=e=>t$(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ut=(e,t,n)=>{if(!t||!ao(e))return n;const r=(FR(t)?[t]:n$(t)).reduce((o,i)=>Ca(o)?o:o[i],e);return kr(r)||r===e?kr(e[t])?n:e[t]:r},ns=e=>typeof e=="boolean",Ki=e=>typeof e=="function",ur=(e,t,n)=>{let r=-1;const o=FR(t)?[t]:n$(t),i=o.length,a=i-1;for(;++rJ.useContext(Toe);var Aoe=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==kl.all&&(t._proxyFormState[a]=!r||kl.all),n&&(n[a]=!0),e[a]}});return o};const o$=typeof window<"u"?J.useLayoutEffect:J.useEffect;function O4e(e){const t=r$(),{control:n=t,disabled:r,name:o,exact:i}=e||{},[a,s]=J.useState(n._formState),l=J.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return o$(()=>n._subscribe({name:o,formState:l.current,exact:i,callback:u=>{!r&&s({...n._formState,...u})}}),[o,r,i]),J.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),J.useMemo(()=>Aoe(a,n,l.current,!1),[a,n])}var Yi=e=>typeof e=="string",n5=(e,t,n,r,o)=>Yi(e)?(r&&t.watch.add(e),ut(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ut(n,i))):(r&&(t.watchAll=!0),n),r5=e=>Ca(e)||!Coe(e);function Nl(e,t,n=new WeakSet){if(r5(e)||r5(t))return Object.is(e,t);if(Rp(e)&&Rp(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const a=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Rp(a)&&Rp(s)||(ao(a)||Array.isArray(a))&&(ao(s)||Array.isArray(s))?!Nl(a,s,n):!Object.is(a,s))return!1}}return!0}function R4e(e){const t=r$(),{control:n=t,name:r,defaultValue:o,disabled:i,exact:a,compute:s}=e||{},l=J.useRef(o),u=J.useRef(s),c=J.useRef(void 0),d=J.useRef(n),h=J.useRef(r);u.current=s;const[p,x]=J.useState(()=>{const P=n._getWatch(r,l.current);return u.current?u.current(P):P}),y=J.useCallback(P=>{const R=n5(r,n._names,P||n._formValues,!1,l.current);return u.current?u.current(R):R},[n._formValues,n._names,r]),w=J.useCallback(P=>{if(!i){const R=n5(r,n._names,P||n._formValues,!1,l.current);if(u.current){const T=u.current(R);Nl(T,c.current)||(x(T),c.current=T)}else x(R)}},[n._formValues,n._names,i,r]);o$(()=>((d.current!==n||!Nl(h.current,r))&&(d.current=n,h.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:P=>{w(P.values)}})),[n,a,r,w]),J.useEffect(()=>n._removeUnmounted());const _=d.current!==n,C=h.current,O=J.useMemo(()=>{if(i)return null;const P=!_&&!Nl(C,r);return _||P?y():null},[i,_,r,C,y]);return O!==null?O:p}function P4e(e){const t=r$(),{name:n,disabled:r,control:o=t,shouldUnregister:i,defaultValue:a,exact:s=!0}=e,l=Roe(o._names.array,n),u=J.useMemo(()=>ut(o._formValues,n,ut(o._defaultValues,n,a)),[o,n,a]),c=R4e({control:o,name:n,defaultValue:u,exact:s}),d=O4e({control:o,name:n,exact:s}),h=J.useRef(e),p=J.useRef(void 0),x=J.useRef(o.register(n,{...e.rules,value:c,...ns(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const y=J.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ut(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!ut(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ut(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ut(d.validatingFields,n)},error:{enumerable:!0,get:()=>ut(d.errors,n)}}),[d,n]),w=J.useCallback(P=>x.current.onChange({target:{value:Ooe(P),name:n},type:vd.CHANGE}),[n]),_=J.useCallback(()=>x.current.onBlur({target:{value:ut(o._formValues,n),name:n},type:vd.BLUR}),[n,o._formValues]),C=J.useCallback(P=>{const R=ut(o._fields,n);R&&R._f&&P&&(R._f.ref={focus:()=>Ki(P.focus)&&P.focus(),select:()=>Ki(P.select)&&P.select(),setCustomValidity:T=>Ki(P.setCustomValidity)&&P.setCustomValidity(T),reportValidity:()=>Ki(P.reportValidity)&&P.reportValidity()})},[o._fields,n]),O=J.useMemo(()=>({name:n,value:c,...ns(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:w,onBlur:_,ref:C}),[n,r,d.disabled,w,_,C,c]);return J.useEffect(()=>{const P=o._options.shouldUnregister||i,R=p.current;R&&R!==n&&!l&&o.unregister(R),o.register(n,{...h.current.rules,...ns(h.current.disabled)?{disabled:h.current.disabled}:{}});const T=(k,M)=>{const j=ut(o._fields,k);j&&j._f&&(j._f.mount=M)};if(T(n,!0),P){const k=ho(ut(o._options.defaultValues,n,h.current.defaultValue));ur(o._defaultValues,n,k),kr(ut(o._formValues,n))&&ur(o._formValues,n,k)}return!l&&o.register(n),p.current=n,()=>{(l?P&&!o._state.action:P)?o.unregister(n):T(n,!1)}},[n,o,l,i]),J.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),J.useMemo(()=>({field:O,formState:d,fieldState:y}),[O,d,y])}const ytt=e=>e.render(P4e(e)),T4e=J.createContext(null);T4e.displayName="HookFormContext";var koe=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Cw=e=>Array.isArray(e)?e:[e],qB=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}};function Noe(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&ao(o)&&i){const a=Noe(o,i);ao(a)&&(n[r]=a)}else e[r]&&(n[r]=i)}return n}var Hi=e=>ao(e)&&!Object.keys(e).length,i$=e=>e.type==="file",RC=e=>{if(!e$)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Moe=e=>e.type==="select-multiple",a$=e=>e.type==="radio",A4e=e=>a$(e)||Tb(e),zA=e=>RC(e)&&e.isConnected;function k4e(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{for(const t in e)if(Ki(e[t]))return!0;return!1};function joe(e){return Array.isArray(e)||ao(e)&&!M4e(e)}function o5(e,t={}){for(const n in e){const r=e[n];joe(r)?(t[n]=Array.isArray(r)?[]:{},o5(r,t[n])):kr(r)||(t[n]=!0)}return t}function lw(e,t,n){n||(n=o5(t));for(const r in e){const o=e[r];if(joe(o))kr(t)||r5(n[r])?n[r]=o5(o,Array.isArray(o)?[]:{}):lw(o,Ca(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!Nl(o,i)}}return n}const UB={value:!1,isValid:!1},VB={value:!0,isValid:!0};var Ioe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!kr(e[0].attributes.value)?kr(e[0].value)||e[0].value===""?VB:{value:e[0].value,isValid:!0}:VB:UB}return UB},Doe=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>kr(e)?e:t?e===""?NaN:e&&+e:n&&Yi(e)?new Date(e):r?r(e):e;const WB={isValid:!1,value:null};var Loe=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,WB):WB;function HB(e){const t=e.ref;return i$(t)?t.files:a$(t)?Loe(e.refs).value:Moe(t)?[...t.selectedOptions].map(({value:n})=>n):Tb(t)?Ioe(e.refs).value:Doe(kr(t.value)?e.ref.value:t.value,e)}var j4e=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,I4e=(e,t,n,r)=>{const o={};for(const i of e){const a=ut(t,i);a&&ur(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},PC=e=>e instanceof RegExp,q1=e=>kr(e)?e:PC(e)?e.source:ao(e)?PC(e.value)?e.value.source:e.value:e,GB=e=>({isOnSubmit:!e||e===kl.onSubmit,isOnBlur:e===kl.onBlur,isOnChange:e===kl.onChange,isOnAll:e===kl.all,isOnTouch:e===kl.onTouched});const KB="AsyncFunction";var D4e=e=>!!e&&!!e.validate&&!!(Ki(e.validate)&&e.validate.constructor.name===KB||ao(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===KB)),L4e=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),YB=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ow=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=ut(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Ow(s,t))break}else if(ao(s)&&Ow(s,t))break}}};function XB(e,t,n){const r=ut(e,n);if(r||FR(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=ut(t,i),s=ut(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};o.pop()}return{name:n}}var $4e=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Hi(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||kl.all))},F4e=(e,t,n)=>!e||!t||e===t||Cw(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),B4e=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,z4e=(e,t)=>!t$(ut(e,t)).length&&po(e,t),q4e=(e,t,n)=>{const r=Cw(ut(e,n));return ur(r,Poe,t[n]),ur(e,n,r),e};function QB(e,t,n="validate"){if(Yi(e)||Array.isArray(e)&&e.every(Yi)||ns(e)&&!e)return{type:n,message:Yi(e)?e:"",ref:t}}var ov=e=>ao(e)&&!PC(e)?e:{value:e,message:""},ZB=async(e,t,n,r,o,i)=>{const{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:d,max:h,pattern:p,validate:x,name:y,valueAsNumber:w,mount:_}=e._f,C=ut(n,y);if(!_||t.has(y))return{};const O=s?s[0]:a,P=K=>{o&&O.reportValidity&&(O.setCustomValidity(ns(K)?"":K||""),O.reportValidity())},R={},T=a$(a),k=Tb(a),M=T||k,j=(w||i$(a))&&kr(a.value)&&kr(C)||RC(a)&&a.value===""||C===""||Array.isArray(C)&&!C.length,$=koe.bind(null,y,r,R),L=(K,H,D,W=El.maxLength,q=El.minLength)=>{const Y=K?H:D;R[y]={type:K?W:q,message:Y,ref:a,...$(K?W:q,Y)}};if(i?!Array.isArray(C)||!C.length:l&&(!M&&(j||Ca(C))||ns(C)&&!C||k&&!Ioe(s).isValid||T&&!Loe(s).isValid)){const{value:K,message:H}=Yi(l)?{value:!!l,message:l}:ov(l);if(K&&(R[y]={type:El.required,message:H,ref:O,...$(El.required,H)},!r))return P(H),R}if(!j&&(!Ca(d)||!Ca(h))){let K,H;const D=ov(h),W=ov(d);if(!Ca(C)&&!isNaN(C)){const q=a.valueAsNumber||C&&+C;Ca(D.value)||(K=q>D.value),Ca(W.value)||(H=qnew Date(new Date().toDateString()+" "+G),U=a.type=="time",V=a.type=="week";Yi(D.value)&&C&&(K=U?Y(C)>Y(D.value):V?C>D.value:q>new Date(D.value)),Yi(W.value)&&C&&(H=U?Y(C)+K.value,W=!Ca(H.value)&&C.length<+H.value;if((D||W)&&(L(D,K.message,H.message),!r))return P(R[y].message),R}if(p&&!j&&Yi(C)){const{value:K,message:H}=ov(p);if(PC(K)&&!C.match(K)&&(R[y]={type:El.pattern,message:H,ref:a,...$(El.pattern,H)},!r))return P(H),R}if(x){if(Ki(x)){const K=await x(C,n),H=QB(K,O);if(H&&(R[y]={...H,...$(El.validate,H.message)},!r))return P(H.message),R}else if(ao(x)){let K={};for(const H in x){if(!Hi(K)&&!r)break;const D=QB(await x[H](C,n),O,H);D&&(K={...D,...$(H,D.message)},P(D.message),r&&(R[y]=K))}if(!Hi(K)&&(R[y]={ref:O,...K},!r))return R}}return P(!0),R};const U4e={mode:kl.onSubmit,reValidateMode:kl.onChange,shouldFocusError:!0};function V4e(e={}){let t={...U4e,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ki(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=ao(t.defaultValues)||ao(t.values)?ho(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ho(o),a={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...c};let h={...d};const p={array:qB(),state:qB()},x=t.criteriaMode===kl.all,y=oe=>he=>{clearTimeout(u),u=setTimeout(oe,he)},w=async oe=>{if(!a.keepIsValid&&!t.disabled&&(d.isValid||h.isValid||oe)){let he;t.resolver?(he=Hi((await j()).errors),_()):he=await K({fields:r,onlyCheckValid:!0,eventType:vd.VALID}),he!==n.isValid&&p.state.next({isValid:he})}},_=(oe,he)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((oe||Array.from(s.mount)).forEach(Se=>{Se&&(he?ur(n.validatingFields,Se,he):po(n.validatingFields,Se))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Hi(n.validatingFields)}))},C=oe=>{const he=lw(o,i),Se=j4e(oe);ur(n.dirtyFields,Se,ut(he,Se))},O=(oe,he=[],Se,Ge,Qe=!0,Ke=!0)=>{if(Ge&&Se&&!t.disabled){if(a.action=!0,Ke&&Array.isArray(ut(r,oe))){const nt=Se(ut(r,oe),Ge.argA,Ge.argB);Qe&&ur(r,oe,nt)}if(Ke&&Array.isArray(ut(n.errors,oe))){const nt=Se(ut(n.errors,oe),Ge.argA,Ge.argB);Qe&&ur(n.errors,oe,nt),z4e(n.errors,oe)}if((d.touchedFields||h.touchedFields)&&Ke&&Array.isArray(ut(n.touchedFields,oe))){const nt=Se(ut(n.touchedFields,oe),Ge.argA,Ge.argB);Qe&&ur(n.touchedFields,oe,nt)}(d.dirtyFields||h.dirtyFields)&&C(oe),p.state.next({name:oe,isDirty:D(oe,he),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ur(i,oe,he)},P=(oe,he)=>{ur(n.errors,oe,he),p.state.next({errors:n.errors})},R=oe=>{n.errors=oe,p.state.next({errors:n.errors,isValid:!1})},T=(oe,he,Se,Ge)=>{const Qe=ut(r,oe);if(Qe){const Ke=ut(i,oe,kr(Se)?ut(o,oe):Se);kr(Ke)||Ge&&Ge.defaultChecked||he?ur(i,oe,he?Ke:HB(Qe._f)):Y(oe,Ke),a.mount&&!a.action&&w()}},k=(oe,he,Se,Ge,Qe)=>{let Ke=!1,nt=!1;const At={name:oe};if(!t.disabled){if(!Se||Ge){(d.isDirty||h.isDirty)&&(nt=n.isDirty,n.isDirty=At.isDirty=D(),Ke=nt!==At.isDirty);const Rt=Nl(ut(o,oe),he);nt=!!ut(n.dirtyFields,oe),Rt?po(n.dirtyFields,oe):ur(n.dirtyFields,oe,!0),At.dirtyFields=n.dirtyFields,Ke=Ke||(d.dirtyFields||h.dirtyFields)&&nt!==!Rt}if(Se){const Rt=ut(n.touchedFields,oe);Rt||(ur(n.touchedFields,oe,Se),At.touchedFields=n.touchedFields,Ke=Ke||(d.touchedFields||h.touchedFields)&&Rt!==Se)}Ke&&Qe&&p.state.next(At)}return Ke?At:{}},M=(oe,he,Se,Ge)=>{const Qe=ut(n.errors,oe),Ke=(d.isValid||h.isValid)&&ns(he)&&n.isValid!==he;if(t.delayError&&Se?(l=y(()=>P(oe,Se)),l(t.delayError)):(clearTimeout(u),l=null,Se?ur(n.errors,oe,Se):po(n.errors,oe)),(Se?!Nl(Qe,Se):Qe)||!Hi(Ge)||Ke){const nt={...Ge,...Ke&&ns(he)?{isValid:he}:{},errors:n.errors,name:oe};n={...n,...nt},p.state.next(nt)}},j=async oe=>(_(oe,!0),await t.resolver(i,t.context,I4e(oe||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),$=async oe=>{const{errors:he}=await j(oe);if(_(oe),oe)for(const Se of oe){const Ge=ut(he,Se);Ge?ur(n.errors,Se,Ge):po(n.errors,Se)}else n.errors=he;return he},L=async({name:oe,eventType:he})=>{if(e.validate){const Se=await e.validate({formValues:i,formState:n,name:oe,eventType:he});if(ao(Se))for(const Ge in Se)Se[Ge]&&ie(`${BA}.${Ge}`,{message:Yi(Se.message)?Se.message:"",type:El.validate});else Yi(Se)||!Se?ie(BA,{message:Se||"",type:El.validate}):fe(BA);return Se}return!0},K=async({fields:oe,onlyCheckValid:he,name:Se,eventType:Ge,context:Qe={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Qe.runRootValidation=!0,!await L({name:Se,eventType:Ge})&&(Qe.valid=!1,he)))return Qe.valid;for(const Ke in oe){const nt=oe[Ke];if(nt){const{_f:At,...Rt}=nt;if(At){const an=s.array.has(At.name),nr=nt._f&&D4e(nt._f);nr&&d.validatingFields&&_([At.name],!0);const $n=await ZB(nt,s.disabled,i,x,t.shouldUseNativeValidation&&!he,an);if(nr&&d.validatingFields&&_([At.name]),$n[At.name]&&(Qe.valid=!1,he)||(!he&&(ut($n,At.name)?an?q4e(n.errors,$n,At.name):ur(n.errors,At.name,$n[At.name]):po(n.errors,At.name)),e.shouldUseNativeValidation&&$n[At.name]))break}!Hi(Rt)&&await K({context:Qe,onlyCheckValid:he,fields:Rt,name:Ke,eventType:Ge})}}return Qe.valid},H=()=>{for(const oe of s.unMount){const he=ut(r,oe);he&&(he._f.refs?he._f.refs.every(Se=>!zA(Se)):!zA(he._f.ref))&&ye(oe)}s.unMount=new Set},D=(oe,he)=>!t.disabled&&(oe&&he&&ur(i,oe,he),!Nl(ee(),o)),W=(oe,he,Se)=>n5(oe,s,{...a.mount?i:kr(he)?o:Yi(oe)?{[oe]:he}:he},Se,he),q=oe=>t$(ut(a.mount?i:o,oe,t.shouldUnregister?ut(o,oe,[]):[])),Y=(oe,he,Se={})=>{const Ge=ut(r,oe);let Qe=he;if(Ge){const Ke=Ge._f;Ke&&(!Ke.disabled&&ur(i,oe,Doe(he,Ke)),Qe=RC(Ke.ref)&&Ca(he)?"":he,Moe(Ke.ref)?[...Ke.ref.options].forEach(nt=>nt.selected=Qe.includes(nt.value)):Ke.refs?Tb(Ke.ref)?Ke.refs.forEach(nt=>{(!nt.defaultChecked||!nt.disabled)&&(Array.isArray(Qe)?nt.checked=!!Qe.find(At=>At===nt.value):nt.checked=Qe===nt.value||!!Qe)}):Ke.refs.forEach(nt=>nt.checked=nt.value===Qe):i$(Ke.ref)?Ke.ref.value="":(Ke.ref.value=Qe,Ke.ref.type||p.state.next({name:oe,values:ho(i)})))}(Se.shouldDirty||Se.shouldTouch)&&k(oe,Qe,Se.shouldTouch,Se.shouldDirty,!0),Se.shouldValidate&&X(oe)},U=(oe,he,Se)=>{for(const Ge in he){if(!he.hasOwnProperty(Ge))return;const Qe=he[Ge],Ke=oe+"."+Ge,nt=ut(r,Ke);(s.array.has(oe)||ao(Qe)||nt&&!nt._f)&&!Rp(Qe)?U(Ke,Qe,Se):Y(Ke,Qe,Se)}},V=(oe,he,Se={})=>{const Ge=ut(r,oe),Qe=s.array.has(oe),Ke=ho(he);ur(i,oe,Ke),Qe?(p.array.next({name:oe,values:ho(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&Se.shouldDirty&&(C(oe),p.state.next({name:oe,dirtyFields:n.dirtyFields,isDirty:D(oe,Ke)}))):Ge&&!Ge._f&&!Ca(Ke)?U(oe,Ke,Se):Y(oe,Ke,Se),YB(oe,s)?p.state.next({...n,name:oe,values:ho(i)}):p.state.next({name:a.mount?oe:void 0,values:ho(i)})},G=async oe=>{a.mount=!0;const he=oe.target;let Se=he.name,Ge=!0;const Qe=ut(r,Se),Ke=Rt=>{Ge=Number.isNaN(Rt)||Rp(Rt)&&isNaN(Rt.getTime())||Nl(Rt,ut(i,Se,Rt))},nt=GB(t.mode),At=GB(t.reValidateMode);if(Qe){let Rt,an;const nr=he.type?HB(Qe._f):Ooe(oe),$n=oe.type===vd.BLUR||oe.type===vd.FOCUS_OUT,Mr=!L4e(Qe._f)&&!e.validate&&!t.resolver&&!ut(n.errors,Se)&&!Qe._f.deps||B4e($n,ut(n.touchedFields,Se),n.isSubmitted,At,nt),Ee=YB(Se,s,$n);ur(i,Se,nr),$n?(!he||!he.readOnly)&&(Qe._f.onBlur&&Qe._f.onBlur(oe),l&&l(0)):Qe._f.onChange&&Qe._f.onChange(oe);const Ce=k(Se,nr,$n),me=!Hi(Ce)||Ee;if(!$n&&p.state.next({name:Se,type:oe.type,values:ho(i)}),Mr)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?$n&&w():$n||w()),me&&p.state.next({name:Se,...Ee?{}:Ce});if(!t.resolver&&e.validate&&await L({name:Se,eventType:oe.type}),!$n&&Ee&&p.state.next({...n}),t.resolver){const{errors:Ae}=await j([Se]);if(_([Se]),Ke(nr),Ge){const Le=XB(n.errors,r,Se),ze=XB(Ae,r,Le.name||Se);Rt=ze.error,Se=ze.name,an=Hi(Ae)}}else _([Se],!0),Rt=(await ZB(Qe,s.disabled,i,x,t.shouldUseNativeValidation))[Se],_([Se]),Ke(nr),Ge&&(Rt?an=!1:(d.isValid||h.isValid)&&(an=await K({fields:r,onlyCheckValid:!0,name:Se,eventType:oe.type})));Ge&&(Qe._f.deps&&(!Array.isArray(Qe._f.deps)||Qe._f.deps.length>0)&&X(Qe._f.deps),M(Se,an,Rt,Ce))}},z=(oe,he)=>{if(ut(n.errors,he)&&oe.focus)return oe.focus(),1},X=async(oe,he={})=>{let Se,Ge;const Qe=Cw(oe);if(t.resolver){const Ke=await $(kr(oe)?oe:Qe);Se=Hi(Ke),Ge=oe?!Qe.some(nt=>ut(Ke,nt)):Se}else oe?(Ge=(await Promise.all(Qe.map(async Ke=>{const nt=ut(r,Ke);return await K({fields:nt&&nt._f?{[Ke]:nt}:nt,eventType:vd.TRIGGER})}))).every(Boolean),!(!Ge&&!n.isValid)&&w()):Ge=Se=await K({fields:r,name:oe,eventType:vd.TRIGGER});return p.state.next({...!Yi(oe)||(d.isValid||h.isValid)&&Se!==n.isValid?{}:{name:oe},...t.resolver||!oe?{isValid:Se}:{},errors:n.errors}),he.shouldFocus&&!Ge&&Ow(r,z,oe?Qe:s.mount),Ge},ee=(oe,he)=>{let Se={...a.mount?i:o};return he&&(Se=Noe(he.dirtyFields?n.dirtyFields:n.touchedFields,Se)),kr(oe)?Se:Yi(oe)?ut(Se,oe):oe.map(Ge=>ut(Se,Ge))},ae=(oe,he)=>({invalid:!!ut((he||n).errors,oe),isDirty:!!ut((he||n).dirtyFields,oe),error:ut((he||n).errors,oe),isValidating:!!ut(n.validatingFields,oe),isTouched:!!ut((he||n).touchedFields,oe)}),fe=oe=>{const he=oe?Cw(oe):void 0;he==null||he.forEach(Se=>po(n.errors,Se)),he?he.forEach(Se=>{p.state.next({name:Se,errors:n.errors})}):p.state.next({errors:{}})},ie=(oe,he,Se)=>{const Ge=(ut(r,oe,{_f:{}})._f||{}).ref,Qe=ut(n.errors,oe)||{},{ref:Ke,message:nt,type:At,...Rt}=Qe;ur(n.errors,oe,{...Rt,...he,ref:Ge}),p.state.next({name:oe,errors:n.errors,isValid:!1}),Se&&Se.shouldFocus&&Ge&&Ge.focus&&Ge.focus()},we=(oe,he)=>Ki(oe)?p.state.subscribe({next:Se=>"values"in Se&&oe(W(void 0,he),Se)}):W(oe,he,!0),de=oe=>p.state.subscribe({next:he=>{F4e(oe.name,he.name,oe.exact)&&$4e(he,oe.formState||d,vn,oe.reRenderRoot)&&oe.callback({values:{...i},...n,...he,defaultValues:o})}}).unsubscribe,se=oe=>(a.mount=!0,h={...h,...oe.formState},de({...oe,formState:{...c,...oe.formState}})),ye=(oe,he={})=>{for(const Se of oe?Cw(oe):s.mount)s.mount.delete(Se),s.array.delete(Se),he.keepValue||(po(r,Se),po(i,Se)),!he.keepError&&po(n.errors,Se),!he.keepDirty&&po(n.dirtyFields,Se),!he.keepTouched&&po(n.touchedFields,Se),!he.keepIsValidating&&po(n.validatingFields,Se),!t.shouldUnregister&&!he.keepDefaultValue&&po(o,Se);p.state.next({values:ho(i)}),p.state.next({...n,...he.keepDirty?{isDirty:D()}:{}}),!he.keepIsValid&&w()},Te=({disabled:oe,name:he})=>{if(ns(oe)&&a.mount||oe||s.disabled.has(he)){const Qe=s.disabled.has(he)!==!!oe;oe?s.disabled.add(he):s.disabled.delete(he),Qe&&a.mount&&!a.action&&w()}},ge=(oe,he={})=>{let Se=ut(r,oe);const Ge=ns(he.disabled)||ns(t.disabled),Qe=!s.registerName.has(oe)&&Se&&!Se._f.mount;return ur(r,oe,{...Se||{},_f:{...Se&&Se._f?Se._f:{ref:{name:oe}},name:oe,mount:!0,...he}}),s.mount.add(oe),Se&&!Qe?Te({disabled:ns(he.disabled)?he.disabled:t.disabled,name:oe}):T(oe,!0,he.value),{...Ge?{disabled:he.disabled||t.disabled}:{},...t.progressive?{required:!!he.required,min:q1(he.min),max:q1(he.max),minLength:q1(he.minLength),maxLength:q1(he.maxLength),pattern:q1(he.pattern)}:{},name:oe,onChange:G,onBlur:G,ref:Ke=>{if(Ke){s.registerName.add(oe),ge(oe,he),s.registerName.delete(oe),Se=ut(r,oe);const nt=kr(Ke.value)&&Ke.querySelectorAll&&Ke.querySelectorAll("input,select,textarea")[0]||Ke,At=A4e(nt),Rt=Se._f.refs||[];if(At?Rt.find(an=>an===nt):nt===Se._f.ref)return;ur(r,oe,{_f:{...Se._f,...At?{refs:[...Rt.filter(zA),nt,...Array.isArray(ut(o,oe))?[{}]:[]],ref:{type:nt.type,name:oe}}:{ref:nt}}}),T(oe,!1,void 0,nt)}else Se=ut(r,oe,{}),Se._f&&(Se._f.mount=!1),(t.shouldUnregister||he.shouldUnregister)&&!(Roe(s.array,oe)&&a.action)&&s.unMount.add(oe)}}},Be=()=>t.shouldFocusError&&Ow(r,z,s.mount),Ie=oe=>{ns(oe)&&(p.state.next({disabled:oe}),Ow(r,(he,Se)=>{const Ge=ut(r,Se);Ge&&(he.disabled=Ge._f.disabled||oe,Array.isArray(Ge._f.refs)&&Ge._f.refs.forEach(Qe=>{Qe.disabled=Ge._f.disabled||oe}))},0,!1))},Ve=(oe,he)=>async Se=>{let Ge;Se&&(Se.preventDefault&&Se.preventDefault(),Se.persist&&Se.persist());let Qe=ho(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:Ke,values:nt}=await j();_(),n.errors=Ke,Qe=ho(nt)}else await K({fields:r,eventType:vd.SUBMIT});if(s.disabled.size)for(const Ke of s.disabled)po(Qe,Ke);if(po(n.errors,Poe),Hi(n.errors)){p.state.next({errors:{}});try{await oe(Qe,Se)}catch(Ke){Ge=Ke}}else he&&await he({...n.errors},Se),Be(),setTimeout(Be);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Hi(n.errors)&&!Ge,submitCount:n.submitCount+1,errors:n.errors}),Ge)throw Ge},ht=(oe,he={})=>{ut(r,oe)&&(kr(he.defaultValue)?V(oe,ho(ut(o,oe))):(V(oe,he.defaultValue),ur(o,oe,ho(he.defaultValue))),he.keepTouched||po(n.touchedFields,oe),he.keepDirty||(po(n.dirtyFields,oe),n.isDirty=he.defaultValue?D(oe,ho(ut(o,oe))):D()),he.keepError||(po(n.errors,oe),d.isValid&&w()),p.state.next({...n}))},lt=(oe,he={})=>{const Se=oe?ho(oe):o,Ge=ho(Se),Qe=Hi(oe),Ke=Qe?o:Ge;if(he.keepDefaultValues||(o=Se),!he.keepValues){if(he.keepDirtyValues){const nt=new Set([...s.mount,...Object.keys(lw(o,i))]);for(const At of Array.from(nt)){const Rt=ut(n.dirtyFields,At),an=ut(i,At),nr=ut(Ke,At);Rt&&!kr(an)?ur(Ke,At,an):!Rt&&!kr(nr)&&V(At,nr)}}else{if(e$&&kr(oe))for(const nt of s.mount){const At=ut(r,nt);if(At&&At._f){const Rt=Array.isArray(At._f.refs)?At._f.refs[0]:At._f.ref;if(RC(Rt)){const an=Rt.closest("form");if(an){an.reset();break}}}}if(he.keepFieldsRef)for(const nt of s.mount)V(nt,ut(Ke,nt));else r={}}i=t.shouldUnregister?he.keepDefaultValues?ho(o):{}:ho(Ke),p.array.next({values:{...Ke}}),p.state.next({values:{...Ke}})}s={mount:he.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!he.keepIsValid||!!he.keepDirtyValues||!t.shouldUnregister&&!Hi(Ke),a.watch=!!t.shouldUnregister,a.keepIsValid=!!he.keepIsValid,a.action=!1,he.keepErrors||(n.errors={}),p.state.next({submitCount:he.keepSubmitCount?n.submitCount:0,isDirty:Qe?!1:he.keepDirty?n.isDirty:!!(he.keepDefaultValues&&!Nl(oe,o)),isSubmitted:he.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Qe?{}:he.keepDirtyValues?he.keepDefaultValues&&i?lw(o,i):n.dirtyFields:he.keepDefaultValues&&oe?lw(o,oe):he.keepDirty?n.dirtyFields:{},touchedFields:he.keepTouched?n.touchedFields:{},errors:he.keepErrors?n.errors:{},isSubmitSuccessful:he.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ye=(oe,he)=>lt(Ki(oe)?oe(i):oe,{...t.resetOptions,...he}),Kt=(oe,he={})=>{const Se=ut(r,oe),Ge=Se&&Se._f;if(Ge){const Qe=Ge.refs?Ge.refs[0]:Ge.ref;Qe.focus&&setTimeout(()=>{Qe.focus(),he.shouldSelect&&Ki(Qe.select)&&Qe.select()})}},vn=oe=>{n={...n,...oe}},on={control:{register:ge,unregister:ye,getFieldState:ae,handleSubmit:Ve,setError:ie,_subscribe:de,_runSchema:j,_updateIsValidating:_,_focusError:Be,_getWatch:W,_getDirty:D,_setValid:w,_setFieldArray:O,_setDisabledField:Te,_setErrors:R,_getFieldArray:q,_reset:lt,_resetDefaultValues:()=>Ki(t.defaultValues)&&t.defaultValues().then(oe=>{Ye(oe,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:H,_disableForm:Ie,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(oe){a=oe},get _defaultValues(){return o},get _names(){return s},set _names(oe){s=oe},get _formState(){return n},get _options(){return t},set _options(oe){t={...t,...oe}}},subscribe:se,trigger:X,register:ge,handleSubmit:Ve,watch:we,setValue:V,getValues:ee,reset:Ye,resetField:ht,clearErrors:fe,unregister:ye,setError:ie,setFocus:Kt,getFieldState:ae};return{...on,formControl:on}}function $oe(e={}){const t=J.useRef(void 0),n=J.useRef(void 0),[r,o]=J.useState({isDirty:!1,isValidating:!1,isLoading:Ki(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ki(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Ki(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...s}=V4e(e);t.current={...s,formState:r}}const i=t.current.control;return i._options=e,o$(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(s=>({...s,isReady:!0})),i._formState.isReady=!0,a},[i]),J.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),J.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),J.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),J.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),J.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),J.useEffect(()=>{var a;e.values&&!Nl(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((a=i._options.resetOptions)===null||a===void 0)&&a.keepIsValid||i._setValid(),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),J.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=J.useMemo(()=>Aoe(r,i),[i,r]),t.current}const JB=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ut(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Foe=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?JB(r.ref,n,e):r.refs&&r.refs.forEach(o=>JB(o,n,e))}},W4e=(e,t)=>{t.shouldUseNativeValidation&&Foe(e,t);const n={};for(const r in e){const o=ut(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(H4e(t.names||Object.keys(e),r)){const a=Object.assign({},ut(n,r));ur(a,"root",i),ur(n,r,a)}else ur(n,r,i)}return n},H4e=(e,t)=>e.some(n=>n.startsWith(t+"."));var G4e=function(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,u=l&&l[r.code];n[a]=koe(a,t,n,o,u?[].concat(u,r.message):r.message)}e.shift()}return n},Boe=function(e,t,n){return n===void 0&&(n={}),function(r,o,i){try{return Promise.resolve((function(a,s){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&Foe({},i),{errors:{},values:n.raw?r:u}})}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l})(0,function(a){if((function(s){return Array.isArray(s==null?void 0:s.errors)})(a))return{values:{},errors:W4e(G4e(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}},zoe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ez=J.createContext&&J.createContext(zoe),K4e=["attr","size","title"];function Y4e(e,t){if(e==null)return{};var n,r,o=X4e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;rJ.createElement(t.tag,AC({key:n},t.attr),qoe(t.child)))}function Ia(e){return t=>J.createElement(e$e,TC({attr:AC({},e.attr)},t),qoe(e.child))}function e$e(e){var t=n=>{var{attr:r,size:o,title:i}=e,a=Y4e(e,K4e),s=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),J.createElement("svg",TC({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:AC(AC({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&J.createElement("title",null,i),e.children)};return ez!==void 0?J.createElement(ez.Consumer,null,n=>t(n)):t(zoe)}function nz(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"},child:[]}]})(e)}function wtt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16 2H8C4.691 2 2 4.691 2 8v13a1 1 0 0 0 1 1h13c3.309 0 6-2.691 6-6V8c0-3.309-2.691-6-6-6zm4 14c0 2.206-1.794 4-4 4H4V8c0-2.206 1.794-4 4-4h8c2.206 0 4 1.794 4 4v8z"},child:[]},{tag:"path",attr:{d:"M7 9h10v2H7zm0 4h7v2H7z"},child:[]}]})(e)}function xtt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 6a3.939 3.939 0 0 0-3.934 3.934h2C10.066 8.867 10.934 8 12 8s1.934.867 1.934 1.934c0 .598-.481 1.032-1.216 1.626a9.208 9.208 0 0 0-.691.599c-.998.997-1.027 2.056-1.027 2.174V15h2l-.001-.633c.001-.016.033-.386.441-.793.15-.15.339-.3.535-.458.779-.631 1.958-1.584 1.958-3.182A3.937 3.937 0 0 0 12 6zm-1 10h2v2h-2z"},child:[]},{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"},child:[]}]})(e)}function btt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m21 15.344-2.121 2.121-3.172-3.172-1.414 1.414 3.172 3.172L15.344 21H21zM3 8.656l2.121-2.121 3.172 3.172 1.414-1.414-3.172-3.172L8.656 3H3zM21 3h-5.656l2.121 2.121-3.172 3.172 1.414 1.414 3.172-3.172L21 8.656zM3 21h5.656l-2.121-2.121 3.172-3.172-1.414-1.414-3.172 3.172L3 15.344z"},child:[]}]})(e)}function Stt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 4H8v4H4v2h6zM8 20h2v-6H4v2h4zm12-6h-6v6h2v-4h4zm0-6h-4V4h-2v6h6z"},child:[]}]})(e)}function t$e(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 1.993C6.486 1.994 2 6.48 2 11.994c0 5.513 4.486 9.999 10 10 5.514 0 10-4.486 10-10s-4.485-10-10-10.001zm0 18.001c-4.411-.001-8-3.59-8-8 0-4.411 3.589-8 8-8.001 4.411.001 8 3.59 8 8.001s-3.589 8-8 8z"},child:[]},{tag:"path",attr:{d:"M13 8h-2v4H7.991l4.005 4.005L16 12h-3z"},child:[]}]})(e)}function _tt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 10h4v4h-4zm0-6h4v4h-4zm0 12h4v4h-4z"},child:[]}]})(e)}function Ett(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5 18v3.766l1.515-.909L11.277 18H16c1.103 0 2-.897 2-2V8c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h1zM4 8h12v8h-5.277L7 18.234V16H4V8z"},child:[]},{tag:"path",attr:{d:"M20 2H8c-1.103 0-2 .897-2 2h12c1.103 0 2 .897 2 2v8c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2z"},child:[]}]})(e)}function Ctt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 11h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"},child:[]},{tag:"path",attr:{d:"M5 22h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2h-2V2h-2v2H9V2H7v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zM19 8l.001 12H5V8h14z"},child:[]}]})(e)}function Ott(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 22h15v-2H6.012C5.55 19.988 5 19.805 5 19s.55-.988 1.012-1H21V4c0-1.103-.897-2-2-2H6c-1.206 0-3 .799-3 3v14c0 2.201 1.794 3 3 3zM5 8V5c0-.805.55-.988 1-1h13v12H5V8z"},child:[]},{tag:"path",attr:{d:"M8 6h9v2H8z"},child:[]}]})(e)}function Rtt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.24 3H4.76A1.76 1.76 0 0 0 3 4.76v14.48A1.76 1.76 0 0 0 4.76 21h14.48A1.76 1.76 0 0 0 21 19.24V4.76A1.76 1.76 0 0 0 19.24 3zm-5.8 10h-2.25v6.44H9.4V13H7.15v-1.46h6.29zm5.8 5.28a1.71 1.71 0 0 1-.67.74 3 3 0 0 1-1 .39 5.81 5.81 0 0 1-1.2.12 7 7 0 0 1-1.23-.11 4.52 4.52 0 0 1-1-.33v-1.71l-.06-.06h.06v.07a3.41 3.41 0 0 0 1 .54 3.06 3.06 0 0 0 1.13.2 2.58 2.58 0 0 0 .6-.06 1.47 1.47 0 0 0 .42-.17.75.75 0 0 0 .25-.25.69.69 0 0 0-.06-.74 1.24 1.24 0 0 0-.35-.33 3.12 3.12 0 0 0-.53-.3l-.67-.28a3.57 3.57 0 0 1-1.37-1 2 2 0 0 1-.46-1.33 2.16 2.16 0 0 1 .24-1.06 2.09 2.09 0 0 1 .66-.71 2.88 2.88 0 0 1 1-.42 5.11 5.11 0 0 1 1.19-.13 7 7 0 0 1 1.09.07 4.53 4.53 0 0 1 .88.23v1.65a2.42 2.42 0 0 0-.42-.24 3.58 3.58 0 0 0-.49-.17 3 3 0 0 0-.49-.1 2.45 2.45 0 0 0-.46 0 2.29 2.29 0 0 0-.56.06 1.54 1.54 0 0 0-.43.16.78.78 0 0 0-.26.25.63.63 0 0 0-.09.33.62.62 0 0 0 .1.35 1.19 1.19 0 0 0 .3.29 2.15 2.15 0 0 0 .46.28l.63.28a6.56 6.56 0 0 1 .84.42 2.65 2.65 0 0 1 .64.49 1.79 1.79 0 0 1 .42.63 2.48 2.48 0 0 1 .14.85 2.68 2.68 0 0 1-.25 1.08z"},child:[]}]})(e)}function Ptt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.585 11.692h4.328s2.432.039 2.432-2.35V5.391S16.714 3 11.936 3C7.362 3 7.647 4.983 7.647 4.983l.006 2.055h4.363v.617H5.92s-2.927-.332-2.927 4.282 2.555 4.45 2.555 4.45h1.524v-2.141s-.083-2.554 2.513-2.554zm-.056-5.74a.784.784 0 1 1 0-1.57.784.784 0 1 1 0 1.57z"},child:[]},{tag:"path",attr:{d:"M18.452 7.532h-1.524v2.141s.083 2.554-2.513 2.554h-4.328s-2.432-.04-2.432 2.35v3.951s-.369 2.391 4.409 2.391c4.573 0 4.288-1.983 4.288-1.983l-.006-2.054h-4.363v-.617h6.097s2.927.332 2.927-4.282-2.555-4.451-2.555-4.451zm-3.981 10.436a.784.784 0 1 1 0 1.57.784.784 0 1 1 0-1.57z"},child:[]}]})(e)}function Ttt(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.79 10.17a.18.18 0 0 0-.11 0l-.2.27H7a.15.15 0 0 0 .1-.06l.17-.26v-.05zm-1.47.89a.14.14 0 0 0-.11 0l-.2.26v.05h4.6a.09.09 0 0 0 .09-.06l.08-.23v-.06zM4.6 12a.13.13 0 0 0-.1.06l-.13.24v.06h2.15a.08.08 0 0 0 .07-.07v-.23s0-.07-.06-.07zm15.99-3.07a3.62 3.62 0 0 0-2.78-.5 4.09 4.09 0 0 0-2.72 1.63 4 4 0 0 0-.67 1.26h-3.14a.25.25 0 0 0-.24.16c-.14.25-.37.76-.5 1.06s0 .29.18.29h1.88a2.8 2.8 0 0 1-.26.36 1.81 1.81 0 0 1-1.65.65 1.53 1.53 0 0 1-1.32-1.53 2.07 2.07 0 0 1 1-1.85 1.71 1.71 0 0 1 1.77-.15 1.36 1.36 0 0 1 .45.37c.13.15.14.14.29.1l1.63-.43c.12 0 .16-.08.1-.16a3 3 0 0 0-1.13-1.38 3.35 3.35 0 0 0-2.58-.47A4.31 4.31 0 0 0 8.16 10a3.81 3.81 0 0 0-.82 2.85A3 3 0 0 0 8.57 15a3.46 3.46 0 0 0 2.62.65A4.06 4.06 0 0 0 14 14a4.33 4.33 0 0 0 .41-.69 3 3 0 0 0 1 1.55 3.68 3.68 0 0 0 2.38.86c.25 0 .51 0 .78-.09a4.51 4.51 0 0 0 2.33-1.25A3.72 3.72 0 0 0 22 11.1a3 3 0 0 0-1.41-2.17zm-1.78 4.73a1.81 1.81 0 0 1-1.59.06 1.61 1.61 0 0 1-.9-1.84A2.12 2.12 0 0 1 18 10.19a1.59 1.59 0 0 1 2 1.29 2.91 2.91 0 0 1 0 .32 2.11 2.11 0 0 1-1.19 1.86z"},child:[]}]})(e)}function Att(e){return Ia({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.82 4.26a10.14 10.14 0 0 0-.53 1.1 14.66 14.66 0 0 0-4.58 0 10.14 10.14 0 0 0-.53-1.1 16 16 0 0 0-4.13 1.3 17.33 17.33 0 0 0-3 11.59 16.6 16.6 0 0 0 5.07 2.59A12.89 12.89 0 0 0 8.23 18a9.65 9.65 0 0 1-1.71-.83 3.39 3.39 0 0 0 .42-.33 11.66 11.66 0 0 0 10.12 0q.21.18.42.33a10.84 10.84 0 0 1-1.71.84 12.41 12.41 0 0 0 1.08 1.78 16.44 16.44 0 0 0 5.06-2.59 17.22 17.22 0 0 0-3-11.59 16.09 16.09 0 0 0-4.09-1.35zM8.68 14.81a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.93 1.93 0 0 1 1.8 2 1.93 1.93 0 0 1-1.8 2zm6.64 0a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.92 1.92 0 0 1 1.8 2 1.92 1.92 0 0 1-1.8 2z"},child:[]}]})(e)}const n$e=Em({key:io().min(1,"Key is required"),value:io().min(1,"Value is required")}),r$e=Em({values:io().min(1,"At least one value is required")});function o$e({values:e=[],title:t,icon:n,type:r=Bn.Checkbox,options:o,setValues:i,onSearchChange:a,searchValue:s,emptyMessage:l}){var x;const{register:u,handleSubmit:c,reset:d}=$oe({resolver:Boe(r===Bn.KeyValue?n$e:r$e),defaultValues:r===Bn.KeyValue?{key:"",value:""}:{values:""}}),h=y=>{"key"in y?e.push(`${y.key}:${y.value}`):y.values.split(",").forEach(w=>e.push(w.trim())),i(e),d()},p=y=>{const w=e.indexOf(y);w>-1&&e.splice(w,1),i(e)};return v.jsxs(Xy,{children:[v.jsx(Qy,{asChild:!0,children:v.jsxs(xt,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[n||v.jsx(c_e,{className:"mr-2 size-4"}),t,e.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Wd,{orientation:"vertical",className:"mx-2 h-4"}),v.jsx(Ti,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r==Bn.Radio?((x=o==null?void 0:o.find(({value:y})=>y==e[0]))==null?void 0:x.label)||e[0]:e.length}),v.jsx("div",{className:"hidden space-x-1 lg:flex",children:e.length>2?v.jsxs(Ti,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[e.length," selected"]}):e.map((y,w)=>{var _;return v.jsxs(Ti,{variant:"secondary",className:"flex items-center space-x-1 rounded-sm px-1 font-normal",children:[((_=o==null?void 0:o.find(({value:C})=>C==y))==null?void 0:_.label)||y,v.jsx(xt,{variant:"ghost",size:"xs",className:"ml-2",onClick:()=>p(y),children:v.jsx(nz,{className:"size-3"})})]},w)})})]})]})}),v.jsxs(_m,{className:"w-[300px] p-2",align:"start",children:[[Bn.Array,Bn.KeyValue].includes(r)&&v.jsxs("div",{children:[v.jsx("div",{className:"",children:e.map((y,w)=>v.jsxs(Ti,{variant:"secondary",className:"mb-2 mr-2 flex items-center space-x-1 rounded-sm px-1 pl-2 font-normal",children:[v.jsx("span",{className:"grow",children:y}),v.jsx(xt,{variant:"ghost",size:"icon",className:"ml-2 shrink-0",onClick:()=>p(y),children:v.jsx(nz,{className:"size-4"})})]},w))}),v.jsxs("form",{onSubmit:c(h),children:[r===Bn.KeyValue?v.jsxs("div",{className:"mb-2 flex items-center space-x-2",children:[v.jsx(ri,{type:"text",placeholder:"Key",...u("key"),className:"flex-1"}),v.jsx(ri,{type:"text",placeholder:"Value",...u("value"),className:"flex-1"})]}):v.jsx("div",{className:"mb-2",children:v.jsx(ri,{type:"text",placeholder:"Enter values (comma-separated)",...u("values"),className:"w-full"})}),v.jsxs(xt,{type:"submit",fullWidth:!0,size:"sm",children:["Add ",t," Filter"]}),e.length>0&&v.jsx(xt,{onClick:()=>i([]),className:"mt-2",size:"sm",variant:"ghost",fullWidth:!0,children:"Reset"})]})]}),[Bn.Checkbox,Bn.Radio].includes(r)&&v.jsxs(X4,{shouldFilter:!a,children:[v.jsx(poe,{placeholder:t,value:s,onValueChange:a}),v.jsxs(Q4,{children:[v.jsx(moe,{className:"py-2 text-center text-sm text-muted-foreground",children:l||"No results found."}),v.jsx(SC,{children:o==null?void 0:o.map(y=>{const w=e.indexOf(y.value)!=-1;return v.jsxs(_C,{onSelect:()=>{if(w)e.splice(e.indexOf(y.value),1);else if(r===Bn.Radio){i([y.value]);return}else e.push(y.value);i(e)},children:[v.jsx("div",{className:je("mr-2 flex size-4 items-center justify-center rounded-sm border border-primary",w?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:v.jsx(lR,{className:je("size-4")})}),y.icon&&v.jsx(y.icon,{className:"mr-2 size-4 text-gray-700 dark:text-gray-300"}),v.jsx("span",{children:y.label})]},y.value)})}),e.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(goe,{}),v.jsx(SC,{children:v.jsx(_C,{onSelect:()=>i([]),className:"justify-center text-center",children:"Reset"})})]})]})]})]})]})}function i$e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function oz(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function s$e(e,t){if(e==null)return{};var n=a$e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function l$e(e,t){return u$e(e)||c$e(e,t)||f$e(e,t)||d$e()}function u$e(e){if(Array.isArray(e))return e}function c$e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function f$e(e,t){if(e){if(typeof e=="string")return iz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iz(e,t)}}function iz(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l1&&arguments[1]!==void 0?arguments[1]:{};I_.initial(e),I_.handler(t);var n={current:e},r=uw(O$e)(n,t),o=uw(C$e)(n),i=uw(I_.changes)(e),a=uw(E$e)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return I_.selector(u),u(n.current)}function l(u){p$e(r,o,i,a)(u)}return[s,l]}function E$e(e,t){return nx(t)?t(e.current):t}function C$e(e,t){return e.current=sz(sz({},e.current),t),t}function O$e(e,t,n){return nx(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var R$e={create:_$e},P$e={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function T$e(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),l=0;l{r.current=!1}:e,t)}var rs=e8e;function Rw(){}function mv(e,t,n,r){return t8e(e,r)||n8e(e,t,n,r)}function t8e(e,t){return e.editor.getModel(Xoe(e,t))}function n8e(e,t,n,r){return e.editor.createModel(t,n,r?Xoe(e,r):void 0)}function Xoe(e,t){return e.Uri.parse(t)}function r8e({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:c="Loading...",options:d={},height:h="100%",width:p="100%",className:x,wrapperProps:y={},beforeMount:w=Rw,onMount:_=Rw}){let[C,O]=b.useState(!1),[P,R]=b.useState(!0),T=b.useRef(null),k=b.useRef(null),M=b.useRef(null),j=b.useRef(_),$=b.useRef(w),L=b.useRef(!1);Yoe(()=>{let W=Goe.init();return W.then(q=>(k.current=q)&&R(!1)).catch(q=>(q==null?void 0:q.type)!=="cancelation"&&console.error("Monaco initialization: error:",q)),()=>T.current?D():W.cancel()}),rs(()=>{if(T.current&&k.current){let W=T.current.getOriginalEditor(),q=mv(k.current,e||"",r||n||"text",i||"");q!==W.getModel()&&W.setModel(q)}},[i],C),rs(()=>{if(T.current&&k.current){let W=T.current.getModifiedEditor(),q=mv(k.current,t||"",o||n||"text",a||"");q!==W.getModel()&&W.setModel(q)}},[a],C),rs(()=>{let W=T.current.getModifiedEditor();W.getOption(k.current.editor.EditorOption.readOnly)?W.setValue(t||""):t!==W.getValue()&&(W.executeEdits("",[{range:W.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),W.pushUndoStop())},[t],C),rs(()=>{var W,q;(q=(W=T.current)==null?void 0:W.getModel())==null||q.original.setValue(e||"")},[e],C),rs(()=>{let{original:W,modified:q}=T.current.getModel();k.current.editor.setModelLanguage(W,r||n||"text"),k.current.editor.setModelLanguage(q,o||n||"text")},[n,r,o],C),rs(()=>{var W;(W=k.current)==null||W.editor.setTheme(u)},[u],C),rs(()=>{var W;(W=T.current)==null||W.updateOptions(d)},[d],C);let K=b.useCallback(()=>{var Y;if(!k.current)return;$.current(k.current);let W=mv(k.current,e||"",r||n||"text",i||""),q=mv(k.current,t||"",o||n||"text",a||"");(Y=T.current)==null||Y.setModel({original:W,modified:q})},[n,t,o,e,r,i,a]),H=b.useCallback(()=>{var W;!L.current&&M.current&&(T.current=k.current.editor.createDiffEditor(M.current,{automaticLayout:!0,...d}),K(),(W=k.current)==null||W.editor.setTheme(u),O(!0),L.current=!0)},[d,u,K]);b.useEffect(()=>{C&&j.current(T.current,k.current)},[C]),b.useEffect(()=>{!P&&!C&&H()},[P,C,H]);function D(){var q,Y,U,V;let W=(q=T.current)==null?void 0:q.getModel();s||((Y=W==null?void 0:W.original)==null||Y.dispose()),l||((U=W==null?void 0:W.modified)==null||U.dispose()),(V=T.current)==null||V.dispose()}return J.createElement(Koe,{width:p,height:h,isEditorReady:C,loading:c,_ref:M,className:x,wrapperProps:y})}var o8e=r8e;b.memo(o8e);function i8e(e){let t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}var a8e=i8e,D_=new Map;function s8e({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:i,theme:a="light",line:s,loading:l="Loading...",options:u={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:h=!1,width:p="100%",height:x="100%",className:y,wrapperProps:w={},beforeMount:_=Rw,onMount:C=Rw,onChange:O,onValidate:P=Rw}){let[R,T]=b.useState(!1),[k,M]=b.useState(!0),j=b.useRef(null),$=b.useRef(null),L=b.useRef(null),K=b.useRef(C),H=b.useRef(_),D=b.useRef(),W=b.useRef(r),q=a8e(i),Y=b.useRef(!1),U=b.useRef(!1);Yoe(()=>{let z=Goe.init();return z.then(X=>(j.current=X)&&M(!1)).catch(X=>(X==null?void 0:X.type)!=="cancelation"&&console.error("Monaco initialization: error:",X)),()=>$.current?G():z.cancel()}),rs(()=>{var X,ee,ae,fe;let z=mv(j.current,e||r||"",t||o||"",i||n||"");z!==((X=$.current)==null?void 0:X.getModel())&&(d&&D_.set(q,(ee=$.current)==null?void 0:ee.saveViewState()),(ae=$.current)==null||ae.setModel(z),d&&((fe=$.current)==null||fe.restoreViewState(D_.get(i))))},[i],R),rs(()=>{var z;(z=$.current)==null||z.updateOptions(u)},[u],R),rs(()=>{!$.current||r===void 0||($.current.getOption(j.current.editor.EditorOption.readOnly)?$.current.setValue(r):r!==$.current.getValue()&&(U.current=!0,$.current.executeEdits("",[{range:$.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),$.current.pushUndoStop(),U.current=!1))},[r],R),rs(()=>{var X,ee;let z=(X=$.current)==null?void 0:X.getModel();z&&o&&((ee=j.current)==null||ee.editor.setModelLanguage(z,o))},[o],R),rs(()=>{var z;s!==void 0&&((z=$.current)==null||z.revealLine(s))},[s],R),rs(()=>{var z;(z=j.current)==null||z.editor.setTheme(a)},[a],R);let V=b.useCallback(()=>{var z;if(!(!L.current||!j.current)&&!Y.current){H.current(j.current);let X=i||n,ee=mv(j.current,r||e||"",t||o||"",X||"");$.current=(z=j.current)==null?void 0:z.editor.create(L.current,{model:ee,automaticLayout:!0,...u},c),d&&$.current.restoreViewState(D_.get(X)),j.current.editor.setTheme(a),s!==void 0&&$.current.revealLine(s),T(!0),Y.current=!0}},[e,t,n,r,o,i,u,c,d,a,s]);b.useEffect(()=>{R&&K.current($.current,j.current)},[R]),b.useEffect(()=>{!k&&!R&&V()},[k,R,V]),W.current=r,b.useEffect(()=>{var z,X;R&&O&&((z=D.current)==null||z.dispose(),D.current=(X=$.current)==null?void 0:X.onDidChangeModelContent(ee=>{U.current||O($.current.getValue(),ee)}))},[R,O]),b.useEffect(()=>{if(R){let z=j.current.editor.onDidChangeMarkers(X=>{var ae;let ee=(ae=$.current.getModel())==null?void 0:ae.uri;if(ee&&X.find(fe=>fe.path===ee.path)){let fe=j.current.editor.getModelMarkers({resource:ee});P==null||P(fe)}});return()=>{z==null||z.dispose()}}return()=>{}},[R,P]);function G(){var z,X;(z=D.current)==null||z.dispose(),h?d&&D_.set(i,$.current.saveViewState()):(X=$.current.getModel())==null||X.dispose(),$.current.dispose()}return J.createElement(Koe,{width:p,height:x,isEditorReady:R,loading:l,_ref:L,className:y,wrapperProps:w})}var l8e=s8e,u8e=b.memo(l8e),c8e=u8e;function uz({code:e="",setCode:t,language:n,className:r,height:o,width:i,copy:a=!0,wrapLines:s=!0,lineNumbers:l=!1,jsonSchema:u}){const{theme:c}=hQ(),d=b.useId(),h=`file:///editor-${d.replace(/:/g,"-")}.json`,p=b.useRef(null),x=(n==="json"&&u&&Object.keys(u).length>0)??!1,y=b.useCallback(O=>{if(n!=="json")return;const T=(O.languages.json.jsonDefaults.diagnosticsOptions.schemas||[]).filter(M=>{var j;return!((j=M.fileMatch)!=null&&j.includes(h))}),k=x?[...T,{uri:`http://hatchet/schema-${d}.json`,fileMatch:[h],schema:u}]:T;O.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:k})},[n,u,x,h,d]),w=O=>{O.editor.defineTheme("pastels-on-dark",f8e()),O.editor.setTheme("pastels-on-dark")},_=(O,P)=>{p.current=P,y(P)};b.useEffect(()=>{const O=p.current;O&&y(O)},[u,x,n,h,d,y]);const C=c==="dark"?"pastels-on-dark":"vs";return v.jsxs("div",{className:je(r,"relative h-fit w-full overflow-hidden rounded-lg","border border-border"),children:[v.jsx(c8e,{beforeMount:w,onMount:_,path:x?h:void 0,language:n,value:e||"",onChange:t,width:i||"100%",height:o||"400px",theme:C,options:{minimap:{enabled:!1},wordWrap:s?"on":"off",lineNumbers:l?function(O){return`${O}`}:"off",theme:C,autoDetectHighContrast:!0,readOnly:!t,scrollbar:{vertical:"hidden",horizontal:"hidden"},showFoldingControls:n=="json"?"always":"never",lineDecorationsWidth:0,overviewRulerBorder:!1,colorDecorators:!1,hideCursorInOverviewRuler:!0,contextmenu:!1,hover:{enabled:!1},quickSuggestions:x?{strings:!0,other:!0}:void 0,suggestOnTriggerCharacters:x?!0:void 0}}),a&&v.jsx(CJ,{className:"absolute right-2 top-2",text:(e==null?void 0:e.trim())||""})]})}const f8e=()=>({base:"vs-dark",inherit:!0,rules:[{background:"0D0D0D",token:""},{foreground:"473c45",token:"comment"},{foreground:"c0c5ce",token:"string"},{foreground:"a8885a",token:"constant"},{foreground:"4FB4D7",token:"variable.parameter"},{foreground:"596380",token:"variable.other"},{foreground:"728059",token:"keyword - keyword.operator"},{foreground:"728059",token:"keyword.operator.logical"},{foreground:"9ebf60",token:"storage"},{foreground:"6078bf",token:"entity"},{fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"8a4b66",token:"support"},{foreground:"893062",token:"support.type.exception"},{background:"5f0047",token:"invalid"},{background:"371d28",token:"meta.function.section"}],colors:{"editor.foreground":"#c0c5ce","editor.background":"#1e293b","editor.selectionBackground":"#40002F","editor.lineHighlightBackground":"#00000012","editorCursor.foreground":"#7F005D","editorWhitespace.foreground":"#BFBFBF"}});function rx({className:e,...t}){return v.jsx("div",{className:je("animate-pulse rounded-md bg-primary/10",e),...t})}var WA={exports:{}},cz;function d8e(){return cz||(cz=1,(function(e,t){(function(r,o){e.exports=o()})(globalThis,()=>(()=>{var n={949:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CronParser=void 0;var u=l(515),c=(function(){function d(h,p,x){p===void 0&&(p=!0),x===void 0&&(x=!1),this.expression=h,this.dayOfWeekStartIndexZero=p,this.monthStartIndexZero=x}return d.prototype.parse=function(){var h,p,x=(h=this.expression)!==null&&h!==void 0?h:"";if(x==="@reboot")return p=["@reboot","","","","","",""],p;if(x.startsWith("@")){var y=this.parseSpecial(this.expression);p=this.extractParts(y)}else p=this.extractParts(this.expression);return this.normalize(p),this.validate(p),p},d.prototype.parseSpecial=function(h){var p={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},x=p[h];if(!x)throw new Error("Unknown special expression.");return x},d.prototype.extractParts=function(h){if(!this.expression)throw new Error("cron expression is empty");for(var p=h.trim().split(/[ ]+/),x=0;x7)throw new Error("Expression has ".concat(p.length," parts; too many!"));return p},d.prototype.normalize=function(h){var p=this;if(h[3]=h[3].replace("?","*"),h[5]=h[5].replace("?","*"),h[2]=h[2].replace("?","*"),h[0].indexOf("0/")==0&&(h[0]=h[0].replace("0/","*/")),h[1].indexOf("0/")==0&&(h[1]=h[1].replace("0/","*/")),h[2].indexOf("0/")==0&&(h[2]=h[2].replace("0/","*/")),h[3].indexOf("1/")==0&&(h[3]=h[3].replace("1/","*/")),h[4].indexOf("1/")==0&&(h[4]=h[4].replace("1/","*/")),h[6].indexOf("1/")==0&&(h[6]=h[6].replace("1/","*/")),h[5]=h[5].replace(/(^\d)|([^#/\s]\d)/g,function(R){var T=R.replace(/\D/,""),k=T;return p.dayOfWeekStartIndexZero?T=="7"&&(k="0"):k=(parseInt(T)-1).toString(),R.replace(T,k)}),h[5]=="L"&&(h[5]="6"),h[3]=="?"&&(h[3]="*"),h[3].indexOf("W")>-1&&(h[3].indexOf(",")>-1||h[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var x={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var y in x)h[5]=h[5].replace(new RegExp(y,"gi"),x[y].toString());h[4]=h[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(R){var T=R.replace(/\D/,""),k=T;return p.monthStartIndexZero&&(k=(parseInt(T)+1).toString()),R.replace(T,k)});var w={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var _ in w)h[4]=h[4].replace(new RegExp(_,"gi"),w[_].toString());h[0]=="0"&&(h[0]=""),!/\*|\-|\,|\//.test(h[2])&&(/\*|\//.test(h[1])||/\*|\//.test(h[0]))&&(h[2]+="-".concat(h[2]));for(var C=0;C-1&&!/^\*|\-|\,/.test(h[C])){var O=null;switch(C){case 4:O="12";break;case 5:O="6";break;case 6:O="9999";break;default:O=null;break}if(O!==null){var P=h[C].split("/");h[C]="".concat(P[0],"-").concat(O,"/").concat(P[1])}}},d.prototype.validate=function(h){var p="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(h[0],p),this.validateOnlyExpectedCharactersFound(h[1],p),this.validateOnlyExpectedCharactersFound(h[2],p),this.validateOnlyExpectedCharactersFound(h[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(h[4],p),this.validateOnlyExpectedCharactersFound(h[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(h[6],p),this.validateAnyRanges(h)},d.prototype.validateAnyRanges=function(h){u.default.secondRange(h[0]),u.default.minuteRange(h[1]),u.default.hourRange(h[2]),u.default.dayOfMonthRange(h[3]),u.default.monthRange(h[4],this.monthStartIndexZero),u.default.dayOfWeekRange(h[5],this.dayOfWeekStartIndexZero)},d.prototype.validateOnlyExpectedCharactersFound=function(h,p){var x=h.match(new RegExp("[^".concat(p,"]+"),"gi"));if(x&&x.length)throw new Error("Expression contains invalid values: '".concat(x.toString(),"'"))},d})();s.CronParser=c}),333:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExpressionDescriptor=void 0;var u=l(823),c=l(949),d=(function(){function h(p,x){if(this.expression=p,this.options=x,this.expressionParts=new Array(5),!this.options.locale&&h.defaultLocale&&(this.options.locale=h.defaultLocale),!h.locales[this.options.locale]){var y=Object.keys(h.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(y,"'.")),this.options.locale=y}this.i18n=h.locales[this.options.locale],x.use24HourTimeFormat===void 0&&(x.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return h.toString=function(p,x){var y=x===void 0?{}:x,w=y.throwExceptionOnParseError,_=w===void 0?!0:w,C=y.verbose,O=C===void 0?!1:C,P=y.dayOfWeekStartIndexZero,R=P===void 0?!0:P,T=y.monthStartIndexZero,k=T===void 0?!1:T,M=y.use24HourTimeFormat,j=y.locale,$=j===void 0?null:j,L={throwExceptionOnParseError:_,verbose:O,dayOfWeekStartIndexZero:R,monthStartIndexZero:k,use24HourTimeFormat:M,locale:$};L.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var K=new h(p,L);return K.getFullDescription()},h.initialize=function(p,x){x===void 0&&(x="en"),h.specialCharacters=["/","-",",","*"],h.defaultLocale=x,p.load(h.locales)},h.prototype.getFullDescription=function(){var p,x,y="";try{var w=new c.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=w.parse(),this.expressionParts[0]==="@reboot")return((x=(p=this.i18n).atReboot)===null||x===void 0?void 0:x.call(p))||"Run once, at startup";var _=this.getTimeOfDayDescription(),C=this.getDayOfMonthDescription(),O=this.getMonthDescription(),P=this.getDayOfWeekDescription(),R=this.getYearDescription();y+=_+C+P+O+R,y=this.transformVerbosity(y,!!this.options.verbose),y=y.charAt(0).toLocaleUpperCase()+y.substr(1)}catch(T){if(!this.options.throwExceptionOnParseError)y=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(T)}return y},h.prototype.getTimeOfDayDescription=function(){var p=this.expressionParts[0],x=this.expressionParts[1],y=this.expressionParts[2],w="";if(!u.StringUtilities.containsAny(x,h.specialCharacters)&&!u.StringUtilities.containsAny(y,h.specialCharacters)&&!u.StringUtilities.containsAny(p,h.specialCharacters))w+=this.i18n.atSpace()+this.formatTime(y,x,p);else if(!p&&x.indexOf("-")>-1&&!(x.indexOf(",")>-1)&&!(x.indexOf("/")>-1)&&!u.StringUtilities.containsAny(y,h.specialCharacters)){var _=x.split("-");w+=u.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(y,_[0],""),this.formatTime(y,_[1],""))}else if(!p&&y.indexOf(",")>-1&&y.indexOf("-")==-1&&y.indexOf("/")==-1&&!u.StringUtilities.containsAny(x,h.specialCharacters)){var C=y.split(",");w+=this.i18n.at();for(var O=0;O-1?C=w.substring(0,w.indexOf("#")):w.indexOf("L")>-1&&(C=C.replace("L",""));var O=parseInt(C),P=p.i18n.daysOfTheWeekInCase?p.i18n.daysOfTheWeekInCase(_)[O]:x[O];if(w.indexOf("#")>-1){var R=null,T=w.substring(w.indexOf("#")+1),k=w.substring(0,w.indexOf("#"));switch(T){case"1":R=p.i18n.first(k);break;case"2":R=p.i18n.second(k);break;case"3":R=p.i18n.third(k);break;case"4":R=p.i18n.fourth(k);break;case"5":R=p.i18n.fifth(k);break}P=R+" "+P}return P},function(w){return parseInt(w)==1?"":u.StringUtilities.format(p.i18n.commaEveryX0DaysOfTheWeek(w),w)},function(w){var _=w.substring(0,w.indexOf("-")),C=p.expressionParts[3]!="*";return C?p.i18n.commaAndX0ThroughX1(_):p.i18n.commaX0ThroughX1(_)},function(w){var _=null;if(w.indexOf("#")>-1){var C=w.substring(w.indexOf("#")+1),O=w.substring(0,w.indexOf("#"));_=p.i18n.commaOnThe(C,O).trim()+p.i18n.spaceX0OfTheMonth()}else if(w.indexOf("L")>-1)_=p.i18n.commaOnTheLastX0OfTheMonth(w.replace("L",""));else{var P=p.expressionParts[3]!="*";_=P?p.i18n.commaAndOnX0():p.i18n.commaOnlyOnX0(w)}return _}),y},h.prototype.getMonthDescription=function(){var p=this,x=this.i18n.monthsOfTheYear(),y=this.getSegmentDescription(this.expressionParts[4],"",function(w,_){return _&&p.i18n.monthsOfTheYearInCase?p.i18n.monthsOfTheYearInCase(_)[parseInt(w)-1]:x[parseInt(w)-1]},function(w){return parseInt(w)==1?"":u.StringUtilities.format(p.i18n.commaEveryX0Months(w),w)},function(w){return p.i18n.commaMonthX0ThroughMonthX1()||p.i18n.commaX0ThroughX1()},function(w){return p.i18n.commaOnlyInMonthX0?p.i18n.commaOnlyInMonthX0():p.i18n.commaOnlyInX0()});return y},h.prototype.getDayOfMonthDescription=function(){var p=this,x=null,y=this.expressionParts[3];switch(y){case"L":x=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":x=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var w=y.match(/(\d{1,2}W)|(W\d{1,2})/);if(w){var _=parseInt(w[0].replace("W","")),C=_==1?this.i18n.firstWeekday():u.StringUtilities.format(this.i18n.weekdayNearestDayX0(),_.toString());x=u.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),C);break}else{var O=y.match(/L-(\d{1,2})/);if(O){var P=O[1];x=u.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(P),P);break}else{if(y=="*"&&this.expressionParts[5]!="*")return"";x=this.getSegmentDescription(y,this.i18n.commaEveryDay(),function(R){return R=="L"?p.i18n.lastDay():p.i18n.dayX0?u.StringUtilities.format(p.i18n.dayX0(),R):R},function(R){return R=="1"?p.i18n.commaEveryDay():p.i18n.commaEveryX0Days(R)},function(R){return p.i18n.commaBetweenDayX0AndX1OfTheMonth(R)},function(R){return p.i18n.commaOnDayX0OfTheMonth(R)})}break}}return x},h.prototype.getYearDescription=function(){var p=this,x=this.getSegmentDescription(this.expressionParts[6],"",function(y){return/^\d+$/.test(y)?new Date(parseInt(y),1).getFullYear().toString():y},function(y){return u.StringUtilities.format(p.i18n.commaEveryX0Years(y),y)},function(y){return p.i18n.commaYearX0ThroughYearX1()||p.i18n.commaX0ThroughX1()},function(y){return p.i18n.commaOnlyInYearX0?p.i18n.commaOnlyInYearX0():p.i18n.commaOnlyInX0()});return x},h.prototype.getSegmentDescription=function(p,x,y,w,_,C){var O=null,P=p.indexOf("/")>-1,R=p.indexOf("-")>-1,T=p.indexOf(",")>-1;if(!p)O="";else if(p==="*")O=x;else if(!P&&!R&&!T)O=u.StringUtilities.format(C(p),y(p));else if(T){for(var k=p.split(","),M="",j=0;j0&&k.length>2&&(M+=",",j0&&k.length>1&&(j==k.length-1||k.length==2)&&(M+="".concat(this.i18n.spaceAnd()," ")),k[j].indexOf("/")>-1||k[j].indexOf("-")>-1){var $=k[j].indexOf("-")>-1&&k[j].indexOf("/")==-1,L=this.getSegmentDescription(k[j],x,y,w,$?this.i18n.commaX0ThroughX1:_,C);$&&(L=L.replace(", ","")),M+=L}else P?M+=this.getSegmentDescription(k[j],x,y,w,_,C):M+=y(k[j]);P?O=M:O=u.StringUtilities.format(C(p),M)}else if(P){var k=p.split("/");if(O=u.StringUtilities.format(w(k[1]),k[1]),k[0].indexOf("-")>-1){var K=this.generateRangeSegmentDescription(k[0],_,y);K.indexOf(", ")!=0&&(O+=", "),O+=K}else if(k[0].indexOf("*")==-1){var H=u.StringUtilities.format(C(k[0]),y(k[0]));H=H.replace(", ",""),O+=u.StringUtilities.format(this.i18n.commaStartingX0(),H)}}else R&&(O=this.generateRangeSegmentDescription(p,_,y));return O},h.prototype.generateRangeSegmentDescription=function(p,x,y){var w="",_=p.split("-"),C=y(_[0],1),O=y(_[1],2),P=x(p);return w+=u.StringUtilities.format(P,C,O),w},h.prototype.formatTime=function(p,x,y){var w=0,_=0,C=parseInt(p)+w,O=parseInt(x)+_;O>=60?(O-=60,C+=1):O<0&&(O+=60,C-=1),C>=24?C=C-24:C<0&&(C=24+C);var P="",R=!1;this.options.use24HourTimeFormat||(R=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),P=R?"".concat(this.getPeriod(C)," "):" ".concat(this.getPeriod(C)),C>12&&(C-=12),C===0&&(C=12));var T="";return y&&(T=":".concat(("00"+y).substring(y.length))),"".concat(R?P:"").concat(("00"+C.toString()).substring(C.toString().length),":").concat(("00"+O.toString()).substring(O.toString().length)).concat(T).concat(R?"":P)},h.prototype.transformVerbosity=function(p,x){if(!x&&(p=p.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),p=p.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),p=p.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),p=p.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var y=0,w=Object.entries(this.i18n.conciseVerbosityReplacements());y=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},h.locales={},h})();s.ExpressionDescriptor=d}),747:((a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.enLocaleLoader=void 0;var u=l(486),c=(function(){function d(){}return d.prototype.load=function(h){h.en=new u.en},d})();s.enLocaleLoader=c}),486:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.en=void 0;var l=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},u.prototype.everyMinute=function(){return"every minute"},u.prototype.everyHour=function(){return"every hour"},u.prototype.atSpace=function(){return"At "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},u.prototype.at=function(){return"At"},u.prototype.spaceAnd=function(){return" and"},u.prototype.everySecond=function(){return"every second"},u.prototype.everyX0Seconds=function(){return"every %s seconds"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},u.prototype.everyX0Minutes=function(){return"every %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},u.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},u.prototype.everyX0Hours=function(){return"every %s hours"},u.prototype.betweenX0AndX1=function(){return"between %s and %s"},u.prototype.atX0=function(){return"at %s"},u.prototype.commaEveryDay=function(){return", every day"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},u.prototype.commaX0ThroughX1=function(){return", %s through %s"},u.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},u.prototype.first=function(){return"first"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"third"},u.prototype.fourth=function(){return"fourth"},u.prototype.fifth=function(){return"fifth"},u.prototype.commaOnThe=function(){return", on the "},u.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},u.prototype.lastDay=function(){return"the last day"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},u.prototype.commaOnlyOnX0=function(){return", only on %s"},u.prototype.commaAndOnX0=function(){return", and on %s"},u.prototype.commaEveryX0Months=function(){return", every %s months"},u.prototype.commaOnlyInX0=function(){return", only in %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},u.prototype.firstWeekday=function(){return"first weekday"},u.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},u.prototype.commaEveryX0Days=function(){return", every %s days"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},u.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},u.prototype.commaEveryHour=function(){return", every hour"},u.prototype.commaEveryX0Years=function(){return", every %s years"},u.prototype.commaStartingX0=function(){return", starting %s"},u.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},u.prototype.atReboot=function(){return"Run once, at startup"},u})();s.en=l}),515:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0});function l(c,d){if(!c)throw new Error(d)}var u=(function(){function c(){}return c.secondRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=59,"seconds part must be >= 0 and <= 59")}},c.minuteRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=59,"minutes part must be >= 0 and <= 59")}},c.hourRange=function(d){for(var h=d.split(","),p=0;p=0&&x<=23,"hours part must be >= 0 and <= 23")}},c.dayOfMonthRange=function(d){for(var h=d.split(","),p=0;p=1&&x<=31,"DOM part must be >= 1 and <= 31")}},c.monthRange=function(d,h){for(var p=d.split(","),x=0;x=1&&y<=12,h?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},c.dayOfWeekRange=function(d,h){for(var p=d.split(","),x=0;x=0&&y<=6,h?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},c})();s.default=u}),823:((a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.StringUtilities=void 0;var l=(function(){function u(){}return u.format=function(c){for(var d=[],h=1;h-1})},u})();s.StringUtilities=l})},r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return n[a](l,l.exports,o),l.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.toString=void 0;var s=o(333),l=o(747);s.ExpressionDescriptor.initialize(new l.enLocaleLoader),a.default=s.ExpressionDescriptor;var u=s.ExpressionDescriptor.toString;a.toString=u})(),i})())})(WA)),WA.exports}var h8e=d8e();const p8e=Ln(h8e),ktt=e=>{const t=e.match(/^CRON_TZ=([^\s]+)\s+/);return t?t[1]:"UTC"},m8e=e=>{const t=e.replace(/^CRON_TZ=([^\s]+)\s+/,"");return p8e.toString(t||"")};function g8e({defaultWorkflow:e,show:t,onClose:n,defaultTimingOption:r="now"}){var fe;const o=rc(),{tenantId:i}=ds(),a=Gl(),[s,l]=b.useState("{}"),[u,c]=b.useState("{}"),[d,h]=b.useState([]),[p,x]=b.useState(r),[y,w]=b.useState(new Date),[_,C]=b.useState("* * * * *"),[O,P]=b.useState(""),[R,T]=b.useState(e==null?void 0:e.metadata.id),[k,M]=b.useState(""),[j,$]=b.useState(""),L=b.useMemo(()=>bD.debounce(ie=>$(ie),300),[]),K=Mn({...Yr.workflows.getVersion(R||""),enabled:!!R}),H=K.data,D=K.isLoading,W=b.useCallback(ie=>{M(ie),L(ie)},[L]);b.useEffect(()=>()=>{L.cancel()},[L]);const q=b.useCallback(()=>{n(),l("{}"),c("{}"),h([]),T(e==null?void 0:e.metadata.id),x(r),w(new Date),C("* * * * *"),P(""),M(""),$(""),L.cancel()},[n,e,r,L]),Y=b.useMemo(()=>{try{return{pretty:m8e(_)}}catch(ie){return console.error(ie),{error:ie}}},[_]),{handleApiError:U}=tR({setErrors:h}),{data:V}=Mn({queryKey:["workflow:list",i,{limit:200,name:j||void 0}],queryFn:async()=>(await ot.workflowList(i,{limit:200,name:j||void 0})).data,refetchInterval:15e3}),G=H==null?void 0:H.inputJsonSchema,z=Ir({mutationKey:["workflow-run:create",H==null?void 0:H.metadata.id],mutationFn:async ie=>!H||!H.workflow?void 0:(await ot.v1WorkflowRunCreate(i,{workflowName:H.workflow.name,input:ie.input,additionalMetadata:ie.addlMeta,return_only_id:!0})).data,onMutate:()=>{h([])},onSuccess:ie=>{ie&&a({to:ft.tenantRunRoute.to,params:{tenant:i,run:ie.run.metadata.id}})},onError:U}),X=Ir({mutationKey:["workflow-run:schedule",H==null?void 0:H.metadata.id],mutationFn:async ie=>!H||!H.workflow?void 0:(await ot.scheduledWorkflowRunCreate(i,H.workflow.name,{input:ie.input,additionalMetadata:ie.addlMeta,triggerAt:ie.scheduledAt})).data,onMutate:()=>{h([])},onSuccess:async ie=>{ie&&(q(),await o.invalidateQueries({queryKey:["scheduledRuns","list"]}),a({to:ft.tenantScheduledRoute.to,params:{tenant:i}}))},onError:U}),ee=Ir({mutationKey:["workflow-run:cron",H==null?void 0:H.metadata.id],mutationFn:async ie=>!H||!H.workflow?void 0:(await ot.cronWorkflowTriggerCreate(i,H.workflow.name,{input:ie.input,additionalMetadata:ie.addlMeta,cronName:ie.cronName,cronExpression:ie.cron})).data,onMutate:()=>{h([])},onSuccess:async ie=>{ie&&(q(),await o.invalidateQueries({queryKey:["cronJobs","list"]}),a({to:ft.tenantCronJobsRoute.to,params:{tenant:i}}))},onError:U}),ae=()=>{if(!H){h(["No workflow selected."]);return}const ie=JSON.parse(s||"{}"),we=JSON.parse(u||"{}");if(p==="now")z.mutate({input:ie,addlMeta:we});else if(p==="schedule"){if(!y){h(["Please select a date and time for scheduling."]);return}X.mutate({input:ie,addlMeta:we,scheduledAt:y.toISOString()})}else if(p==="cron"){if(!_){h(["Please enter a valid cron expression."]);return}ee.mutate({input:ie,addlMeta:we,cron:_,cronName:O})}};return v.jsx(sb,{open:t,onOpenChange:ie=>{ie||q()},children:v.jsxs(Ky,{className:"max-h-[90%] overflow-auto py-12 sm:max-w-[625px]",children:[v.jsxs(lb,{className:"gap-2",children:[v.jsx(Yy,{children:"Trigger Run"}),v.jsx(sR,{className:"text-muted-foreground",children:"Trigger a workflow to run now, at a scheduled time, or on a cron schedule."})]}),v.jsx("div",{className:"font-bold",children:"Workflow"}),v.jsx(o$e,{values:R?[R]:[],setValues:ie=>T(ie[0]),title:"Select Workflow",options:(fe=V==null?void 0:V.rows)==null?void 0:fe.map(ie=>({value:ie.metadata.id,label:ie.name})),type:Bn.Radio,icon:v.jsx(t$e,{className:"mr-2 h-5 w-5 text-gray-700 dark:text-gray-300"}),searchValue:k,onSearchChange:W,emptyMessage:j?`No workflows matching "${j}"`:"No workflows found"}),v.jsxs("div",{className:"font-bold",children:["Input",D&&v.jsx("span",{className:"ml-2 text-sm font-normal text-muted-foreground",children:"(Loading schema...)"})]}),D?v.jsx(rx,{className:"h-[180px] w-full"}):v.jsx(uz,{code:s||"{}",setCode:l,language:"json",height:"180px",jsonSchema:G}),v.jsx("div",{className:"font-bold",children:"Additional Metadata"}),D?v.jsx(rx,{className:"h-[90px] w-full"}):v.jsx(uz,{code:u||"{}",setCode:c,height:"90px",language:"json"}),v.jsxs("div",{children:[v.jsx("div",{className:"mb-2 font-bold",children:"Timing"}),v.jsxs(rC,{defaultValue:p,onValueChange:ie=>x(ie),children:[v.jsxs(Gw,{children:[v.jsx(_a,{value:"now",children:"Now"}),v.jsx(_a,{value:"schedule",children:"Schedule"}),v.jsx(_a,{value:"cron",children:"Cron"})]}),v.jsx(Ea,{value:"now"}),v.jsx(Ea,{value:"schedule",children:v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"mb-2 font-bold",children:"Select Date and Time"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(mD,{date:y,setDate:w,label:"Trigger at"}),v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>w(new Date),children:"Now"})]}),v.jsxs("div",{className:"mt-2 flex gap-2",children:[v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setSeconds(ie.getSeconds()+15),w(ie)},children:"+15s"}),v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+1),w(ie)},children:"+1m"}),v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+5),w(ie)},children:"+5m"}),v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+15),w(ie)},children:"+15m"}),v.jsx(xt,{variant:"outline",size:"sm",onClick:()=>{const ie=new Date(y||new Date);ie.setMinutes(ie.getMinutes()+60),w(ie)},children:"+60m"})]})]})}),v.jsx(Ea,{value:"cron",children:v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"mb-2 font-bold",children:"Cron Name"}),v.jsx(ri,{type:"text",value:O,onChange:ie=>P(ie.target.value),placeholder:"e.g., cron-name",className:"mb-2 w-full"}),v.jsx("div",{className:"mb-2 font-bold",children:"Cron Expression"}),v.jsx(ri,{type:"text",value:_,onChange:ie=>C(ie.target.value),placeholder:"e.g., 0 0 * * *",className:"w-full"}),v.jsx("div",{className:"text-sm text-gray-500",children:(Y==null?void 0:Y.error)||`(runs ${Y==null?void 0:Y.pretty})`})]})})]})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(xt,{disabled:z.isPending||X.isPending||ee.isPending||!H||D,onClick:ae,children:"Submit"})}),(d.length>0||z.error||X.error||ee.error)&&v.jsx("div",{className:"mt-4",children:d.map((ie,we)=>v.jsx("div",{className:"text-sm text-red-500",children:ie},we))})]})})}function v8e(e){switch(e){case It.CANCELLED:return"Cancelled";case It.COMPLETED:return"Succeeded";case It.FAILED:return"Failed";case It.QUEUED:return"Queued";case It.RUNNING:return"Running";default:const t=e;throw new Error(`Unknown status: ${t}`)}}function y8e(e){switch(e){case It.COMPLETED:return nbe;case It.FAILED:return JO;case It.CANCELLED:return I1e;case It.RUNNING:return BX;case It.QUEUED:return lbe;default:const t=e;throw new Error(`Unknown status: ${t}`)}}function U1({status:e,className:t}){const{filters:n,runStatusCounts:r}=ah(),o=b.useMemo(()=>n.apiFilters.statuses||[],[n.apiFilters.statuses]),i=o.includes(e),{setStatuses:a}=n,s=b.useCallback(h=>{const p=o.includes(h),x=Object.values(It),y=o.length===x.length&&x.every(w=>o.includes(w));if(p)if(y)a([h]);else{const w=o.filter(_=>_!==h);w.length===0?a(x):a(w)}else a([...o,h])},[o,a]),l=r.find(h=>h.status===e);if(!l)return null;const u=y8e(e),c=v8e(e),d=l.count.toLocaleString("en-US");return v.jsx(Ti,{"data-is-selected":i,variant:i?"default":"outline",className:je("h-8 w-fit cursor-pointer px-3 py-1 text-sm data-[is-selected=false]:font-light",t),onClick:()=>s(e),children:v.jsxs("span",{className:"flex items-center gap-1",children:[v.jsx("span",{children:d}),v.jsx("span",{className:"cq-xl:inline hidden",children:c}),v.jsx(u,{className:"cq-xl:hidden size-4"})]})})}const w8e=()=>{const{display:{hideMetrics:e},actions:{setShowQueueMetrics:t}}=ah();return v.jsxs("div",{className:"flex flex-row justify-start gap-2",children:[v.jsx(U1,{status:It.COMPLETED,className:"text-green-800 data-[is-selected=false]:border data-[is-selected=false]:border-green-500/20 data-[is-selected=true]:bg-green-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-green-500/20 hover:data-[is-selected=true]:bg-green-500/20 dark:text-green-300"}),v.jsx(U1,{status:It.RUNNING,className:"text-yellow-800 data-[is-selected=false]:border data-[is-selected=false]:border-yellow-500/20 data-[is-selected=true]:bg-yellow-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-yellow-500/20 hover:data-[is-selected=true]:bg-yellow-500/20 dark:text-yellow-300"}),v.jsx(U1,{status:It.FAILED,className:"text-red-800 data-[is-selected=false]:border data-[is-selected=false]:border-red-500/20 data-[is-selected=true]:bg-red-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-red-500/20 hover:data-[is-selected=true]:bg-red-500/20 dark:text-red-300"}),v.jsx(U1,{status:It.CANCELLED,className:"text-orange-800 data-[is-selected=false]:border data-[is-selected=false]:border-orange-500/20 data-[is-selected=true]:bg-orange-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-orange-500/20 hover:data-[is-selected=true]:bg-orange-500/20 dark:text-orange-300"}),v.jsx(U1,{status:It.QUEUED,className:"text-slate-800 data-[is-selected=false]:border data-[is-selected=false]:border-slate-500/20 data-[is-selected=true]:bg-slate-500/20 hover:data-[is-selected=false]:border-transparent hover:data-[is-selected=false]:bg-slate-500/20 hover:data-[is-selected=true]:bg-slate-500/20 dark:text-slate-300"}),!e&&v.jsxs(Ti,{variant:"outline",className:"h-8 w-fit cursor-pointer rounded-sm px-3 py-1 text-sm font-normal",onClick:()=>t(!0),children:[v.jsx("span",{className:"cq-xl:inline hidden",children:"Queue metrics"}),v.jsx(z1e,{className:"cq-xl:hidden size-4"})]})]})};var HA,fz;function Da(){if(fz)return HA;fz=1;var e=Array.isArray;return HA=e,HA}var GA,dz;function Qoe(){if(dz)return GA;dz=1;var e=typeof qu=="object"&&qu&&qu.Object===Object&&qu;return GA=e,GA}var KA,hz;function sc(){if(hz)return KA;hz=1;var e=Qoe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return KA=n,KA}var YA,pz;function kb(){if(pz)return YA;pz=1;var e=sc(),t=e.Symbol;return YA=t,YA}var XA,mz;function x8e(){if(mz)return XA;mz=1;var e=kb(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=n.call(a,o),l=a[o];try{a[o]=void 0;var u=!0}catch{}var c=r.call(a);return u&&(s?a[o]=l:delete a[o]),c}return XA=i,XA}var QA,gz;function b8e(){if(gz)return QA;gz=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return QA=n,QA}var ZA,vz;function Sf(){if(vz)return ZA;vz=1;var e=kb(),t=x8e(),n=b8e(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:r:i&&i in Object(s)?t(s):n(s)}return ZA=a,ZA}var JA,yz;function _f(){if(yz)return JA;yz=1;function e(t){return t!=null&&typeof t=="object"}return JA=e,JA}var ek,wz;function o0(){if(wz)return ek;wz=1;var e=Sf(),t=_f(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return ek=r,ek}var tk,xz;function s$(){if(xz)return tk;xz=1;var e=Da(),t=o0(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||a!=null&&i in Object(a)}return tk=o,tk}var nk,bz;function sh(){if(bz)return nk;bz=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return nk=e,nk}var rk,Sz;function l$(){if(Sz)return rk;Sz=1;var e=Sf(),t=sh(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==o||l==n||l==i}return rk=a,rk}var ok,_z;function S8e(){if(_z)return ok;_z=1;var e=sc(),t=e["__core-js_shared__"];return ok=t,ok}var ik,Ez;function _8e(){if(Ez)return ik;Ez=1;var e=S8e(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return ik=n,ik}var ak,Cz;function Zoe(){if(Cz)return ak;Cz=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return ak=n,ak}var sk,Oz;function E8e(){if(Oz)return sk;Oz=1;var e=l$(),t=_8e(),n=sh(),r=Zoe(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(h){if(!n(h)||t(h))return!1;var p=e(h)?c:i;return p.test(r(h))}return sk=d,sk}var lk,Rz;function C8e(){if(Rz)return lk;Rz=1;function e(t,n){return t==null?void 0:t[n]}return lk=e,lk}var uk,Pz;function Om(){if(Pz)return uk;Pz=1;var e=E8e(),t=C8e();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return uk=n,uk}var ck,Tz;function zR(){if(Tz)return ck;Tz=1;var e=Om(),t=e(Object,"create");return ck=t,ck}var fk,Az;function O8e(){if(Az)return fk;Az=1;var e=zR();function t(){this.__data__=e?e(null):{},this.size=0}return fk=t,fk}var dk,kz;function R8e(){if(kz)return dk;kz=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return dk=e,dk}var hk,Nz;function P8e(){if(Nz)return hk;Nz=1;var e=zR(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return r.call(a,i)?a[i]:void 0}return hk=o,hk}var pk,Mz;function T8e(){if(Mz)return pk;Mz=1;var e=zR(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return pk=r,pk}var mk,jz;function A8e(){if(jz)return mk;jz=1;var e=zR(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return mk=n,mk}var gk,Iz;function k8e(){if(Iz)return gk;Iz=1;var e=O8e(),t=R8e(),n=P8e(),r=T8e(),o=A8e();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s-1}return Sk=t,Sk}var _k,qz;function D8e(){if(qz)return _k;qz=1;var e=qR();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return _k=t,_k}var Ek,Uz;function UR(){if(Uz)return Ek;Uz=1;var e=N8e(),t=M8e(),n=j8e(),r=I8e(),o=D8e();function i(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s0?1:-1},Pp=function(t){return mm(t)&&t.indexOf("%")===t.length-1},it=function(t){return i6e(t)&&!a0(t)},a6e=function(t){return Pn(t)},Po=function(t){return it(t)||mm(t)},s6e=0,s0=function(t){var n=++s6e;return"".concat(t||"").concat(n)},gm=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!it(t)&&!mm(t))return r;var i;if(Pp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return a0(i)&&(i=r),o&&i>n&&(i=n),i},bd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},l6e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a5(e){"@babel/helpers - typeof";return a5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a5(e)}var vq={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},af=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},yq=null,Xk=null,m$=function e(t){if(t===yq&&Array.isArray(Xk))return Xk;var n=[];return b.Children.forEach(t,function(r){Pn(r)||(t6e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Xk=n,yq=t,n};function Us(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return af(o)}):r=[af(t)],m$(e).forEach(function(o){var i=qs(o,"type.displayName")||qs(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Ja(e,t){var n=Us(e,t);return n&&n[0]}var wq=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!it(r)||r<=0||!it(o)||o<=0)},g6e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],v6e=function(t){return t&&t.type&&mm(t.type)&&g6e.indexOf(t.type)>=0},oie=function(t){return t&&a5(t)==="object"&&"clipDot"in t},y6e=function(t,n,r,o){var i,a=(i=Yk==null?void 0:Yk[o])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!gn(t)&&(o&&a.includes(n)||f6e.includes(n))||r&&p$.includes(n)},bn=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(b.isValidElement(t)&&(o=t.props),!i0(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;y6e((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},s5=function e(t,n){if(t===n)return!0;var r=b.Children.count(t);if(r!==b.Children.count(n))return!1;if(r===0)return!0;if(r===1)return xq(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function u5(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,u=S6e(e,b6e),c=o||{width:n,height:r,x:0,y:0},d=Dn("recharts-surface",i);return J.createElement("svg",l5({},bn(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),J.createElement("title",null,s),J.createElement("desc",null,l),t)}var E6e=["children","className"];function c5(){return c5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O6e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Er=J.forwardRef(function(e,t){var n=e.children,r=e.className,o=C6e(e,E6e),i=Dn("recharts-layer",r);return J.createElement("g",c5({className:i},bn(o,!0),{ref:t}),n)}),sf=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;ii?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(i);++o=i?n:e(n,r,o)}return Zk=t,Zk}var Jk,Eq;function iie(){if(Eq)return Jk;Eq=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function l(u){return s.test(u)}return Jk=l,Jk}var eN,Cq;function T6e(){if(Cq)return eN;Cq=1;function e(t){return t.split("")}return eN=e,eN}var tN,Oq;function A6e(){if(Oq)return tN;Oq=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+l+")",c="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",x=u+"?",y="["+i+"]?",w="(?:"+p+"(?:"+[c,d,h].join("|")+")"+y+x+")*",_=y+x+w,C="(?:"+[c+s+"?",s,d,h,a].join("|")+")",O=RegExp(l+"(?="+l+")|"+C+_,"g");function P(R){return R.match(O)||[]}return tN=P,tN}var nN,Rq;function k6e(){if(Rq)return nN;Rq=1;var e=T6e(),t=iie(),n=A6e();function r(o){return t(o)?n(o):e(o)}return nN=r,nN}var rN,Pq;function N6e(){if(Pq)return rN;Pq=1;var e=P6e(),t=iie(),n=k6e(),r=eie();function o(i){return function(a){a=r(a);var s=t(a)?n(a):void 0,l=s?s[0]:a.charAt(0),u=s?e(s,1).join(""):a.slice(1);return l[i]()+u}}return rN=o,rN}var oN,Tq;function M6e(){if(Tq)return oN;Tq=1;var e=N6e(),t=e("toUpperCase");return oN=t,oN}var j6e=M6e();const HR=Ln(j6e);function _r(e){return function(){return e}}const aie=Math.cos,IC=Math.sin,Xl=Math.sqrt,DC=Math.PI,GR=2*DC,f5=Math.PI,d5=2*f5,wp=1e-6,I6e=d5-wp;function sie(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sie;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;owp)if(!(Math.abs(d*l-u*c)>wp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,x=o-s,y=l*l+u*u,w=p*p+x*x,_=Math.sqrt(y),C=Math.sqrt(h),O=i*Math.tan((f5-Math.acos((y+h-w)/(2*_*C)))/2),P=O/C,R=O/_;Math.abs(P-1)>wp&&this._append`L${t+P*c},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*p>c*x)},${this._x1=t+R*l},${this._y1=n+R*u}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),u=t+s,c=n+l,d=1^a,h=a?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>wp||Math.abs(this._y1-c)>wp)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%d5+d5),h>I6e?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=c}`:h>wp&&this._append`A${r},${r},0,${+(h>=f5)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function g$(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new L6e(t)}function v$(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lie(e){this._context=e}lie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function KR(e){return new lie(e)}function uie(e){return e[0]}function cie(e){return e[1]}function fie(e,t){var n=_r(!0),r=null,o=KR,i=null,a=g$(s);e=typeof e=="function"?e:e===void 0?uie:_r(e),t=typeof t=="function"?t:t===void 0?cie:_r(t);function s(l){var u,c=(l=v$(l)).length,d,h=!1,p;for(r==null&&(i=o(p=a())),u=0;u<=c;++u)!(u=p;--x)s.point(O[x],P[x]);s.lineEnd(),s.areaEnd()}_&&(O[h]=+e(w,h,d),P[h]=+t(w,h,d),s.point(r?+r(w,h,d):O[h],n?+n(w,h,d):P[h]))}if(C)return s=null,C+""||null}function c(){return fie().defined(o).curve(a).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:_r(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_r(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_r(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:_r(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_r(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_r(+d),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(d){return arguments.length?(o=typeof d=="function"?d:_r(!!d),u):o},u.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),u):a},u.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),u):i},u}class die{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function $6e(e){return new die(e,!0)}function F6e(e){return new die(e,!1)}const y$={draw(e,t){const n=Xl(t/DC);e.moveTo(n,0),e.arc(0,0,n,0,GR)}},B6e={draw(e,t){const n=Xl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},hie=Xl(1/3),z6e=hie*2,q6e={draw(e,t){const n=Xl(t/z6e),r=n*hie;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},U6e={draw(e,t){const n=Xl(t),r=-n/2;e.rect(r,r,n,n)}},V6e=.8908130915292852,pie=IC(DC/10)/IC(7*DC/10),W6e=IC(GR/10)*pie,H6e=-aie(GR/10)*pie,G6e={draw(e,t){const n=Xl(t*V6e),r=W6e*n,o=H6e*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=GR*i/5,s=aie(a),l=IC(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},iN=Xl(3),K6e={draw(e,t){const n=-Xl(t/(iN*3));e.moveTo(0,n*2),e.lineTo(-iN*n,-n),e.lineTo(iN*n,-n),e.closePath()}},Ps=-.5,Ts=Xl(3)/2,h5=1/Xl(12),Y6e=(h5/2+1)*3,X6e={draw(e,t){const n=Xl(t/Y6e),r=n/2,o=n*h5,i=r,a=n*h5+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Ps*r-Ts*o,Ts*r+Ps*o),e.lineTo(Ps*i-Ts*a,Ts*i+Ps*a),e.lineTo(Ps*s-Ts*l,Ts*s+Ps*l),e.lineTo(Ps*r+Ts*o,Ps*o-Ts*r),e.lineTo(Ps*i+Ts*a,Ps*a-Ts*i),e.lineTo(Ps*s+Ts*l,Ps*l-Ts*s),e.closePath()}};function Q6e(e,t){let n=null,r=g$(o);e=typeof e=="function"?e:_r(e||y$),t=typeof t=="function"?t:_r(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:_r(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:_r(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function LC(){}function $C(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function mie(e){this._context=e}mie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:$C(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:$C(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Z6e(e){return new mie(e)}function gie(e){this._context=e}gie.prototype={areaStart:LC,areaEnd:LC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:$C(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J6e(e){return new gie(e)}function vie(e){this._context=e}vie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:$C(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eFe(e){return new vie(e)}function yie(e){this._context=e}yie.prototype={areaStart:LC,areaEnd:LC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function tFe(e){return new yie(e)}function Aq(e){return e<0?-1:1}function kq(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(Aq(i)+Aq(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Nq(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function aN(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function FC(e){this._context=e}FC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:aN(this,this._t0,Nq(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,aN(this,Nq(this,n=kq(this,e,t)),n);break;default:aN(this,this._t0,n=kq(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function wie(e){this._context=new xie(e)}(wie.prototype=Object.create(FC.prototype)).point=function(e,t){FC.prototype.point.call(this,t,e)};function xie(e){this._context=e}xie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function nFe(e){return new FC(e)}function rFe(e){return new wie(e)}function bie(e){this._context=e}bie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Mq(e),o=Mq(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function iFe(e){return new YR(e,.5)}function aFe(e){return new YR(e,0)}function sFe(e){return new YR(e,1)}function hy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function lFe(e,t){return e[t]}function uFe(e){const t=[];return t.key=e,t}function cFe(){var e=_r([]),t=p5,n=hy,r=lFe;function o(i){var a=Array.from(e.apply(this,arguments),uFe),s,l=a.length,u=-1,c;for(const d of i)for(s=0,++u;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Sie={symbolCircle:y$,symbolCross:B6e,symbolDiamond:q6e,symbolSquare:U6e,symbolStar:G6e,symbolTriangle:K6e,symbolWye:X6e},xFe=Math.PI/180,bFe=function(t){var n="symbol".concat(HR(t));return Sie[n]||y$},SFe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*xFe;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},_Fe=function(t,n){Sie["symbol".concat(HR(t))]=n},w$=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=yFe(t,pFe),u=Iq(Iq({},l),{},{type:r,size:i,sizeType:s}),c=function(){var w=bFe(r),_=Q6e().type(w).size(SFe(i,s,r));return _()},d=u.className,h=u.cx,p=u.cy,x=bn(u,!0);return h===+h&&p===+p&&i===+i?J.createElement("path",m5({},x,{className:Dn("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};w$.registerSymbol=_Fe;function py(e){"@babel/helpers - typeof";return py=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},py(e)}function g5(){return g5=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var C=p.inactive?u:p.color;return J.createElement("li",g5({className:w,style:d,key:"legend-item-".concat(x)},jC(r.props,p,x)),J.createElement(u5,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},y?y(_,p,x):_))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(b.PureComponent);ix(x$,"displayName","Legend");ix(x$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var sN,Lq;function MFe(){if(Lq)return sN;Lq=1;var e=UR();function t(){this.__data__=new e,this.size=0}return sN=t,sN}var lN,$q;function jFe(){if($q)return lN;$q=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return lN=e,lN}var uN,Fq;function IFe(){if(Fq)return uN;Fq=1;function e(t){return this.__data__.get(t)}return uN=e,uN}var cN,Bq;function DFe(){if(Bq)return cN;Bq=1;function e(t){return this.__data__.has(t)}return cN=e,cN}var fN,zq;function LFe(){if(zq)return fN;zq=1;var e=UR(),t=c$(),n=f$(),r=200;function o(i,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.lengthp))return!1;var y=d.get(a),w=d.get(s);if(y&&w)return y==s&&w==a;var _=-1,C=!0,O=l&o?new e:void 0;for(d.set(a,s),d.set(s,a);++_-1&&r%1==0&&r-1&&n%1==0&&n<=e}return MN=t,MN}var jN,fU;function XFe(){if(fU)return jN;fU=1;var e=Sf(),t=E$(),n=_f(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",d="[object Object]",h="[object RegExp]",p="[object Set]",x="[object String]",y="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",T="[object Int32Array]",k="[object Uint8Array]",M="[object Uint8ClampedArray]",j="[object Uint16Array]",$="[object Uint32Array]",L={};L[C]=L[O]=L[P]=L[R]=L[T]=L[k]=L[M]=L[j]=L[$]=!0,L[r]=L[o]=L[w]=L[i]=L[_]=L[a]=L[s]=L[l]=L[u]=L[c]=L[d]=L[h]=L[p]=L[x]=L[y]=!1;function K(H){return n(H)&&t(H.length)&&!!L[e(H)]}return jN=K,jN}var IN,dU;function Nie(){if(dU)return IN;dU=1;function e(t){return function(n){return t(n)}}return IN=e,IN}var fw={exports:{}};fw.exports;var hU;function QFe(){return hU||(hU=1,(function(e,t){var n=Qoe(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=(function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(fw,fw.exports)),fw.exports}var DN,pU;function Mie(){if(pU)return DN;pU=1;var e=XFe(),t=Nie(),n=QFe(),r=n&&n.isTypedArray,o=r?t(r):e;return DN=o,DN}var LN,mU;function ZFe(){if(mU)return LN;mU=1;var e=GFe(),t=S$(),n=Da(),r=kie(),o=_$(),i=Mie(),a=Object.prototype,s=a.hasOwnProperty;function l(u,c){var d=n(u),h=!d&&t(u),p=!d&&!h&&r(u),x=!d&&!h&&!p&&i(u),y=d||h||p||x,w=y?e(u.length,String):[],_=w.length;for(var C in u)(c||s.call(u,C))&&!(y&&(C=="length"||p&&(C=="offset"||C=="parent")||x&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,_)))&&w.push(C);return w}return LN=l,LN}var $N,gU;function JFe(){if(gU)return $N;gU=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return $N=t,$N}var FN,vU;function jie(){if(vU)return FN;vU=1;function e(t,n){return function(r){return t(n(r))}}return FN=e,FN}var BN,yU;function e7e(){if(yU)return BN;yU=1;var e=jie(),t=e(Object.keys,Object);return BN=t,BN}var zN,wU;function t7e(){if(wU)return zN;wU=1;var e=JFe(),t=e7e(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))r.call(i,s)&&s!="constructor"&&a.push(s);return a}return zN=o,zN}var qN,xU;function Nb(){if(xU)return qN;xU=1;var e=l$(),t=E$();function n(r){return r!=null&&t(r.length)&&!e(r)}return qN=n,qN}var UN,bU;function XR(){if(bU)return UN;bU=1;var e=ZFe(),t=t7e(),n=Nb();function r(o){return n(o)?e(o):t(o)}return UN=r,UN}var VN,SU;function n7e(){if(SU)return VN;SU=1;var e=UFe(),t=HFe(),n=XR();function r(o){return e(o,n,t)}return VN=r,VN}var WN,_U;function r7e(){if(_U)return WN;_U=1;var e=n7e(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,a,s,l,u,c){var d=s&t,h=e(i),p=h.length,x=e(a),y=x.length;if(p!=y&&!d)return!1;for(var w=p;w--;){var _=h[w];if(!(d?_ in a:r.call(a,_)))return!1}var C=c.get(i),O=c.get(a);if(C&&O)return C==a&&O==i;var P=!0;c.set(i,a),c.set(a,i);for(var R=d;++w-1}return vM=t,vM}var yM,XU;function _7e(){if(XU)return yM;XU=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o=a){var _=u?null:o(l);if(_)return i(_);x=!1,h=r,w=new e}else w=u?[]:y;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function F7e(e){return e.value}function B7e(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=L7e(t,T7e);return J.createElement(x$,n)}var oV=1,kv=(function(e){function t(){var n;A7e(this,t);for(var r=arguments.length,o=new Array(r),i=0;ioV||Math.abs(o.height-this.lastBoundingBox.height)>oV)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vc({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,u=o.chartWidth,c=o.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var x=this.getBBoxSnapshot();h={top:((c||0)-x.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Vc(Vc({},d),h)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,u=o.payloadUniqBy,c=o.payload,d=Vc(Vc({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return J.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},B7e(i,Vc(Vc({},this.props),{},{payload:Fie(c,u,F7e)})))}}],[{key:"getWithHeight",value:function(r,o){var i=Vc(Vc({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&it(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])})(b.PureComponent);QR(kv,"displayName","Legend");QR(kv,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var _M,iV;function z7e(){if(iV)return _M;iV=1;var e=kb(),t=S$(),n=Da(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return _M=o,_M}var EM,aV;function qie(){if(aV)return EM;aV=1;var e=Aie(),t=z7e();function n(r,o,i,a,s){var l=-1,u=r.length;for(i||(i=t),s||(s=[]);++l0&&i(c)?o>1?n(c,o-1,i,a,s):e(s,c):a||(s[s.length]=c)}return s}return EM=n,EM}var CM,sV;function q7e(){if(sV)return CM;sV=1;function e(t){return function(n,r,o){for(var i=-1,a=Object(n),s=o(n),l=s.length;l--;){var u=s[t?l:++i];if(r(a[u],u,a)===!1)break}return n}}return CM=e,CM}var OM,lV;function U7e(){if(lV)return OM;lV=1;var e=q7e(),t=e();return OM=t,OM}var RM,uV;function Uie(){if(uV)return RM;uV=1;var e=U7e(),t=XR();function n(r,o){return r&&e(r,o,t)}return RM=n,RM}var PM,cV;function V7e(){if(cV)return PM;cV=1;var e=Nb();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var a=o.length,s=r?a:-1,l=Object(o);(r?s--:++sr||s&&l&&c&&!u&&!d||i&&l&&c||!o&&c||!a)return 1;if(!i&&!s&&!d&&n=u)return c;var d=o[i];return c*(d=="desc"?-1:1)}}return n.index-r.index}return MM=t,MM}var jM,gV;function K7e(){if(gV)return jM;gV=1;var e=d$(),t=h$(),n=lh(),r=Vie(),o=W7e(),i=Nie(),a=G7e(),s=l0(),l=Da();function u(c,d,h){d.length?d=e(d,function(y){return l(y)?function(w){return t(w,y.length===1?y[0]:y)}:y}):d=[s];var p=-1;d=e(d,i(n));var x=r(c,function(y,w,_){var C=e(d,function(O){return O(y)});return{criteria:C,index:++p,value:y}});return o(x,function(y,w){return a(y,w,h)})}return jM=u,jM}var IM,vV;function Y7e(){if(vV)return IM;vV=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return IM=e,IM}var DM,yV;function X7e(){if(yV)return DM;yV=1;var e=Y7e(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,s=-1,l=t(a.length-o,0),u=Array(l);++s0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return BM=r,BM}var zM,_V;function e9e(){if(_V)return zM;_V=1;var e=Z7e(),t=J7e(),n=t(e);return zM=n,zM}var qM,EV;function t9e(){if(EV)return qM;EV=1;var e=l0(),t=X7e(),n=e9e();function r(o,i){return n(t(o,i,e),o+"")}return qM=r,qM}var UM,CV;function ZR(){if(CV)return UM;CV=1;var e=u$(),t=Nb(),n=_$(),r=sh();function o(i,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],i):!1}return UM=o,UM}var VM,OV;function n9e(){if(OV)return VM;OV=1;var e=qie(),t=K7e(),n=t9e(),r=ZR(),o=n(function(i,a){if(i==null)return[];var s=a.length;return s>1&&r(i,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return VM=o,VM}var r9e=n9e();const R$=Ln(r9e);function ax(e){"@babel/helpers - typeof";return ax=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ax(e)}function w5(){return w5=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(V1,"-left"),it(n)&&t&&it(t.x)&&n=t.y),"".concat(V1,"-top"),it(r)&&t&&it(t.y)&&ry?Math.max(c,l[r]):Math.max(d,l[r])}function y9e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function w9e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,d;return a.height>0&&a.width>0&&n?(c=TV({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=TV({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=y9e({translateX:c,translateY:d,useTranslate3d:s})):u=g9e,{cssProperties:u,cssClasses:v9e({translateX:c,translateY:d,coordinate:n})}}function gy(e){"@babel/helpers - typeof";return gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gy(e)}function AV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kV(e){for(var t=1;tNV||Math.abs(r.height-this.state.lastBoundingBox.height)>NV)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,u=o.children,c=o.coordinate,d=o.hasPayload,h=o.isAnimationActive,p=o.offset,x=o.position,y=o.reverseDirection,w=o.useTranslate3d,_=o.viewBox,C=o.wrapperStyle,O=w9e({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:x,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:_}),P=O.cssClasses,R=O.cssProperties,T=kV(kV({transition:h&&i?"transform ".concat(s,"ms ").concat(l):void 0},R),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return J.createElement("div",{tabIndex:-1,className:P,style:T,ref:function(M){r.wrapperNode=M}},u)}}])})(b.PureComponent),T9e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Rm={isSsr:T9e()};function vy(e){"@babel/helpers - typeof";return vy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vy(e)}function MV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function jV(e){for(var t=1;t0;return J.createElement(P9e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:h,active:i,coordinate:c,hasPayload:T,offset:p,position:w,reverseDirection:_,useTranslate3d:C,viewBox:O,wrapperStyle:P},F9e(u,jV(jV({},this.props),{},{payload:R})))}}])})(b.PureComponent);P$(Du,"displayName","Tooltip");P$(Du,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Rm.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var HM,IV;function B9e(){if(IV)return HM;IV=1;var e=sc(),t=function(){return e.Date.now()};return HM=t,HM}var GM,DV;function z9e(){if(DV)return GM;DV=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return GM=t,GM}var KM,LV;function q9e(){if(LV)return KM;LV=1;var e=z9e(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return KM=n,KM}var YM,$V;function Xie(){if($V)return YM;$V=1;var e=q9e(),t=sh(),n=o0(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=i.test(u);return d||a.test(u)?s(u.slice(2),d?2:8):o.test(u)?r:+u}return YM=l,YM}var XM,FV;function U9e(){if(FV)return XM;FV=1;var e=sh(),t=B9e(),n=Xie(),r="Expected a function",o=Math.max,i=Math.min;function a(s,l,u){var c,d,h,p,x,y,w=0,_=!1,C=!1,O=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(u)&&(_=!!u.leading,C="maxWait"in u,h=C?o(n(u.maxWait)||0,l):h,O="trailing"in u?!!u.trailing:O);function P(H){var D=c,W=d;return c=d=void 0,w=H,p=s.apply(W,D),p}function R(H){return w=H,x=setTimeout(M,l),_?P(H):p}function T(H){var D=H-y,W=H-w,q=l-D;return C?i(q,h-W):q}function k(H){var D=H-y,W=H-w;return y===void 0||D>=l||D<0||C&&W>=h}function M(){var H=t();if(k(H))return j(H);x=setTimeout(M,T(H))}function j(H){return x=void 0,O&&c?P(H):(c=d=void 0,p)}function $(){x!==void 0&&clearTimeout(x),w=0,c=y=d=x=void 0}function L(){return x===void 0?p:j(t())}function K(){var H=t(),D=k(H);if(c=arguments,d=this,y=H,D){if(x===void 0)return R(y);if(C)return clearTimeout(x),x=setTimeout(M,l),P(y)}return x===void 0&&(x=setTimeout(M,l)),p}return K.cancel=$,K.flush=L,K}return XM=a,XM}var QM,BV;function V9e(){if(BV)return QM;BV=1;var e=U9e(),t=sh(),n="Expected a function";function r(o,i,a){var s=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return t(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),e(o,i,{leading:s,maxWait:i,trailing:l})}return QM=r,QM}var W9e=V9e();const Qie=Ln(W9e);function lx(e){"@babel/helpers - typeof";return lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lx(e)}function zV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F_(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(H=Qie(H,y,{trailing:!0,leading:!1}));var D=new ResizeObserver(H),W=R.current.getBoundingClientRect(),q=W.width,Y=W.height;return L(q,Y),D.observe(R.current),function(){D.disconnect()}},[L,y]);var K=b.useMemo(function(){var H=j.containerWidth,D=j.containerHeight;if(H<0||D<0)return null;sf(Pp(a)||Pp(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,l),sf(!n||n>0,"The aspect(%s) must be greater than zero.",n);var W=Pp(a)?H:a,q=Pp(l)?D:l;n&&n>0&&(W?q=W/n:q&&(W=q*n),h&&q>h&&(q=h)),sf(W>0||q>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,W,q,a,l,c,d,n);var Y=!Array.isArray(p)&&af(p.type).endsWith("Chart");return J.Children.map(p,function(U){return J.isValidElement(U)?b.cloneElement(U,F_({width:W,height:q},Y?{style:F_({height:"100%",width:"100%",maxHeight:q,maxWidth:W},U.props.style)}:{})):U})},[n,p,l,h,d,c,j,a]);return J.createElement("div",{id:w?"".concat(w):void 0,className:Dn("recharts-responsive-container",_),style:F_(F_({},P),{},{width:a,height:l,minWidth:c,minHeight:d,maxHeight:h}),ref:R},K)}),Zie=function(t){return null};Zie.displayName="Cell";function ux(e){"@babel/helpers - typeof";return ux=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ux(e)}function UV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _5(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Rm.isSsr)return{width:0,height:0};var r=iBe(n),o=JSON.stringify({text:t,copyStyle:r});if(iv.widthCache[o])return iv.widthCache[o];try{var i=document.getElementById(VV);i||(i=document.createElement("span"),i.setAttribute("id",VV),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=_5(_5({},oBe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return iv.widthCache[o]=l,++iv.cacheCount>rBe&&(iv.cacheCount=0,iv.widthCache={}),l}catch{return{width:0,height:0}}},aBe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function cx(e){"@babel/helpers - typeof";return cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cx(e)}function VC(e,t){return cBe(e)||uBe(e,t)||lBe(e,t)||sBe()}function sBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lBe(e,t){if(e){if(typeof e=="string")return WV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WV(e,t)}}function WV(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QV(e,t){return PBe(e)||RBe(e,t)||OBe(e,t)||CBe()}function CBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OBe(e,t){if(e){if(typeof e=="string")return ZV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZV(e,t)}}function ZV(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return W.reduce(function(q,Y){var U=Y.word,V=Y.width,G=q[q.length-1];if(G&&(o==null||i||G.width+V+rY.width?q:Y})};if(!c)return p;for(var y="…",w=function(W){var q=d.slice(0,W),Y=nae({breakAll:u,style:l,children:q+y}).wordsWithComputedWidth,U=h(Y),V=U.length>a||x(U).width>Number(o);return[V,U]},_=0,C=d.length-1,O=0,P;_<=C&&O<=d.length-1;){var R=Math.floor((_+C)/2),T=R-1,k=w(T),M=QV(k,2),j=M[0],$=M[1],L=w(R),K=QV(L,1),H=K[0];if(!j&&!H&&(_=R+1),j&&H&&(C=R-1),!j&&H){P=$;break}O++}return P||p},JV=function(t){var n=Pn(t)?[]:t.toString().split(tae);return[{words:n}]},ABe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Rm.isSsr){var l,u,c=nae({breakAll:a,children:o,style:i});if(c){var d=c.wordsWithComputedWidth,h=c.spaceWidth;l=d,u=h}else return JV(o);return TBe({breakAll:a,children:o,maxLines:s,style:i},l,u,n,r)}return JV(o)},eW="#808080",WC=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,d=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,x=t.verticalAnchor,y=x===void 0?"end":x,w=t.fill,_=w===void 0?eW:w,C=XV(t,SBe),O=b.useMemo(function(){return ABe({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),P=C.dx,R=C.dy,T=C.angle,k=C.className,M=C.breakAll,j=XV(C,_Be);if(!Po(r)||!Po(i))return null;var $=r+(it(P)?P:0),L=i+(it(R)?R:0),K;switch(y){case"start":K=ZM("calc(".concat(u,")"));break;case"middle":K=ZM("calc(".concat((O.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:K=ZM("calc(".concat(O.length-1," * -").concat(s,")"));break}var H=[];if(d){var D=O[0].width,W=C.width;H.push("scale(".concat((it(W)?W/D:1)/D,")"))}return T&&H.push("rotate(".concat(T,", ").concat($,", ").concat(L,")")),H.length&&(j.transform=H.join(" ")),J.createElement("text",E5({},bn(j,!0),{x:$,y:L,className:Dn("recharts-text",k),textAnchor:p,fill:_.includes("url")?eW:_}),O.map(function(q,Y){var U=q.words.join(M?"":" ");return J.createElement("tspan",{x:$,dy:Y===0?K:s,key:"".concat(U,"-").concat(Y)},U)}))};function Gd(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function kBe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function T$(e){let t,n,r;e.length!==2?(t=Gd,n=(s,l)=>Gd(e(s),l),r=(s,l)=>e(s)-l):(t=e===Gd||e===kBe?e:NBe,n=e,r=e);function o(s,l,u=0,c=s.length){if(u>>1;n(s[d],l)<0?u=d+1:c=d}while(u>>1;n(s[d],l)<=0?u=d+1:c=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function NBe(){return 0}function rae(e){return e===null?NaN:+e}function*MBe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const jBe=T$(Gd),Mb=jBe.right;T$(rae).center;class tW extends Map{constructor(t,n=LBe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(nW(this,t))}has(t){return super.has(nW(this,t))}set(t,n){return super.set(IBe(this,t),n)}delete(t){return super.delete(DBe(this,t))}}function nW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function IBe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function DBe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function LBe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function $Be(e=Gd){if(e===Gd)return oae;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function oae(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}var C5=Math.sqrt(50),O5=Math.sqrt(10),R5=Math.sqrt(2);function P5(e,t,n){var r,o=-1,i,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t0){let l=Math.round(e/s),u=Math.round(t/s);for(l*st&&--u,a=new Array(i=u-l+1);++ot&&--u,a=new Array(i=u-l+1);++o=0?(i>=C5?10:i>=O5?5:i>=R5?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=C5?10:i>=O5?5:i>=R5?2:1)}function T5(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=C5?o*=10:i>=O5?o*=5:i>=R5&&(o*=2),t=r)&&(n=r);return n}function oW(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function aae(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?oae:$Be(o);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*d/l+h)),x=Math.min(r,Math.floor(t+(l-u)*d/l+h));aae(e,t,p,x,o)}const i=e[t];let a=n,s=r;for(W1(e,n,t),o(e[r],i)>0&&W1(e,n,r);a0;)--s}o(e[n],i)===0?W1(e,n,s):(++s,W1(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function W1(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function FBe(e,t,n){if(e=Float64Array.from(MBe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return oW(e);if(t>=1)return rW(e);var r,o=(r-1)*t,i=Math.floor(o),a=rW(aae(e,i).subarray(0,i+1)),s=oW(e.subarray(i+1));return a+(s-a)*(o-i)}}function BBe(e,t,n=rae){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function zBe(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++rt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function VBe(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?WBe:VBe,l=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=s(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(o((u||(u=s(t,e.map(r),Pl)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,HC),c()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=P4,c()},d.clamp=function(h){return arguments.length?(a=h?!0:Qi,c()):a!==Qi},d.interpolate=function(h){return arguments.length?(n=h,c()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return r=h,o=p,c()}}function k$(){return eP()(Qi,Qi)}function HBe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function GC(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yy(e){return e=GC(Math.abs(e)),e?e[1]:NaN}function GBe(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function KBe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var YBe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dx(e){if(!(t=YBe.exec(e)))throw new Error("invalid format: "+e);var t;return new N$({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}dx.prototype=N$.prototype;function N$(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}N$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function XBe(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var lae;function QBe(e,t){var n=GC(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(lae=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+GC(e,Math.max(0,t+i-1))[0]}function aW(e,t){var n=GC(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const sW={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:HBe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>aW(e*100,t),r:aW,s:QBe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function lW(e){return e}var uW=Array.prototype.map,cW=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ZBe(e){var t=e.grouping===void 0||e.thousands===void 0?lW:GBe(uW.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?lW:KBe(uW.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=dx(d);var h=d.fill,p=d.align,x=d.sign,y=d.symbol,w=d.zero,_=d.width,C=d.comma,O=d.precision,P=d.trim,R=d.type;R==="n"?(C=!0,R="g"):sW[R]||(O===void 0&&(O=12),P=!0,R="g"),(w||h==="0"&&p==="=")&&(w=!0,h="0",p="=");var T=y==="$"?n:y==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():"",k=y==="$"?r:/[%p]/.test(R)?a:"",M=sW[R],j=/[defgprs%]/.test(R);O=O===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function $(L){var K=T,H=k,D,W,q;if(R==="c")H=M(L)+H,L="";else{L=+L;var Y=L<0||1/L<0;if(L=isNaN(L)?l:M(Math.abs(L),O),P&&(L=XBe(L)),Y&&+L==0&&x!=="+"&&(Y=!1),K=(Y?x==="("?x:s:x==="-"||x==="("?"":x)+K,H=(R==="s"?cW[8+lae/3]:"")+H+(Y&&x==="("?")":""),j){for(D=-1,W=L.length;++Dq||q>57){H=(q===46?o+L.slice(D+1):L.slice(D))+H,L=L.slice(0,D);break}}}C&&!w&&(L=t(L,1/0));var U=K.length+L.length+H.length,V=U<_?new Array(_-U+1).join(h):"";switch(C&&w&&(L=t(V+L,V.length?_-H.length:1/0),V=""),p){case"<":L=K+L+H+V;break;case"=":L=K+V+L+H;break;case"^":L=V.slice(0,U=V.length>>1)+K+L+H+V.slice(U);break;default:L=V+K+L+H;break}return i(L)}return $.toString=function(){return d+""},$}function c(d,h){var p=u((d=dx(d),d.type="f",d)),x=Math.max(-8,Math.min(8,Math.floor(yy(h)/3)))*3,y=Math.pow(10,-x),w=cW[8+x/3];return function(_){return p(y*_)+w}}return{format:u,formatPrefix:c}}var z_,M$,uae;JBe({thousands:",",grouping:[3],currency:["$",""]});function JBe(e){return z_=ZBe(e),M$=z_.format,uae=z_.formatPrefix,z_}function eze(e){return Math.max(0,-yy(Math.abs(e)))}function tze(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yy(t)/3)))*3-yy(Math.abs(e)))}function nze(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yy(t)-yy(e))+1}function cae(e,t,n,r){var o=T5(e,t,n),i;switch(r=dx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=tze(o,a))&&(r.precision=i),uae(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=nze(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=eze(o))&&(r.precision=i-(r.type==="%")*2);break}}return M$(r)}function uh(e){var t=e.domain;return e.ticks=function(n){var r=t();return P5(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return cae(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,u,c=10;for(s0;){if(u=iae(a,s,n),u===l)return r[o]=a,r[i]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function KC(){var e=k$();return e.copy=function(){return jb(e,KC())},Qs.apply(e,arguments),uh(e)}function fae(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,HC),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return fae(e).unknown(t)},e=arguments.length?Array.from(e,HC):[0,1],uh(n)}function dae(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function sze(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function hW(e){return(t,n)=>-e(-t,n)}function j$(e){const t=e(fW,dW),n=t.domain;let r=10,o,i;function a(){return o=sze(r),i=aze(r),n()[0]<0?(o=hW(o),i=hW(i),e(rze,oze)):e(fW,dW),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const d=c0){for(;h<=p;++h)for(x=1;xc)break;_.push(y)}}else for(;h<=p;++h)for(x=r-1;x>=1;--x)if(y=h>0?x/i(-h):x*i(h),!(yc)break;_.push(y)}_.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=dx(l)).precision==null&&(l.trim=!0),l=M$(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let d=c/i(Math.round(o(c)));return d*rn(dae(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function hae(){const e=j$(eP()).domain([1,10]);return e.copy=()=>jb(e,hae()).base(e.base()),Qs.apply(e,arguments),e}function pW(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function mW(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function I$(e){var t=1,n=e(pW(t),mW(t));return n.constant=function(r){return arguments.length?e(pW(t=+r),mW(t)):t},uh(n)}function pae(){var e=I$(eP());return e.copy=function(){return jb(e,pae()).constant(e.constant())},Qs.apply(e,arguments)}function gW(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lze(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function uze(e){return e<0?-e*e:e*e}function D$(e){var t=e(Qi,Qi),n=1;function r(){return n===1?e(Qi,Qi):n===.5?e(lze,uze):e(gW(n),gW(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},uh(t)}function L$(){var e=D$(eP());return e.copy=function(){return jb(e,L$()).exponent(e.exponent())},Qs.apply(e,arguments),e}function cze(){return L$.apply(null,arguments).exponent(.5)}function vW(e){return Math.sign(e)*e*e}function fze(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function mae(){var e=k$(),t=[0,1],n=!1,r;function o(i){var a=fze(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(vW(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,HC)).map(vW)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return mae(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qs.apply(o,arguments),uh(o)}function gae(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return vae().domain([e,t]).range(o).unknown(i)},Qs.apply(uh(a),arguments)}function yae(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[Mb(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return yae().domain(e).range(t).unknown(n)},Qs.apply(o,arguments)}const JM=new Date,ej=new Date;function Ao(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(uAo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(JM.setTime(+i),ej.setTime(+a),e(JM),e(ej),Math.floor(n(JM,ej))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const YC=Ao(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);YC.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ao(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):YC);YC.range;const tf=1e3,$s=tf*60,nf=$s*60,vf=nf*24,$$=vf*7,yW=vf*30,tj=vf*365,Tp=Ao(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tf)},(e,t)=>(t-e)/tf,e=>e.getUTCSeconds());Tp.range;const F$=Ao(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tf)},(e,t)=>{e.setTime(+e+t*$s)},(e,t)=>(t-e)/$s,e=>e.getMinutes());F$.range;const B$=Ao(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*$s)},(e,t)=>(t-e)/$s,e=>e.getUTCMinutes());B$.range;const z$=Ao(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tf-e.getMinutes()*$s)},(e,t)=>{e.setTime(+e+t*nf)},(e,t)=>(t-e)/nf,e=>e.getHours());z$.range;const q$=Ao(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nf)},(e,t)=>(t-e)/nf,e=>e.getUTCHours());q$.range;const Ib=Ao(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$s)/vf,e=>e.getDate()-1);Ib.range;const tP=Ao(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vf,e=>e.getUTCDate()-1);tP.range;const wae=Ao(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vf,e=>Math.floor(e/vf));wae.range;function Pm(e){return Ao(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*$s)/$$)}const nP=Pm(0),XC=Pm(1),dze=Pm(2),hze=Pm(3),wy=Pm(4),pze=Pm(5),mze=Pm(6);nP.range;XC.range;dze.range;hze.range;wy.range;pze.range;mze.range;function Tm(e){return Ao(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/$$)}const rP=Tm(0),QC=Tm(1),gze=Tm(2),vze=Tm(3),xy=Tm(4),yze=Tm(5),wze=Tm(6);rP.range;QC.range;gze.range;vze.range;xy.range;yze.range;wze.range;const U$=Ao(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());U$.range;const V$=Ao(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());V$.range;const yf=Ao(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ao(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});yf.range;const wf=Ao(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());wf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ao(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});wf.range;function xae(e,t,n,r,o,i){const a=[[Tp,1,tf],[Tp,5,5*tf],[Tp,15,15*tf],[Tp,30,30*tf],[i,1,$s],[i,5,5*$s],[i,15,15*$s],[i,30,30*$s],[o,1,nf],[o,3,3*nf],[o,6,6*nf],[o,12,12*nf],[r,1,vf],[r,2,2*vf],[n,1,$$],[t,1,yW],[t,3,3*yW],[e,1,tj]];function s(u,c,d){const h=cw).right(a,h);if(p===a.length)return e.every(T5(u/tj,c/tj,d));if(p===0)return YC.every(Math.max(T5(u,c,d),1));const[x,y]=a[h/a[p-1][2]53)return null;"w"in ge||(ge.w=1),"Z"in ge?(Ie=rj(H1(ge.y,0,1)),Ve=Ie.getUTCDay(),Ie=Ve>4||Ve===0?QC.ceil(Ie):QC(Ie),Ie=tP.offset(Ie,(ge.V-1)*7),ge.y=Ie.getUTCFullYear(),ge.m=Ie.getUTCMonth(),ge.d=Ie.getUTCDate()+(ge.w+6)%7):(Ie=nj(H1(ge.y,0,1)),Ve=Ie.getDay(),Ie=Ve>4||Ve===0?XC.ceil(Ie):XC(Ie),Ie=Ib.offset(Ie,(ge.V-1)*7),ge.y=Ie.getFullYear(),ge.m=Ie.getMonth(),ge.d=Ie.getDate()+(ge.w+6)%7)}else("W"in ge||"U"in ge)&&("w"in ge||(ge.w="u"in ge?ge.u%7:"W"in ge?1:0),Ve="Z"in ge?rj(H1(ge.y,0,1)).getUTCDay():nj(H1(ge.y,0,1)).getDay(),ge.m=0,ge.d="W"in ge?(ge.w+6)%7+ge.W*7-(Ve+5)%7:ge.w+ge.U*7-(Ve+6)%7);return"Z"in ge?(ge.H+=ge.Z/100|0,ge.M+=ge.Z%100,rj(ge)):nj(ge)}}function M(se,ye,Te,ge){for(var Be=0,Ie=ye.length,Ve=Te.length,ht,lt;Be=Ve)return-1;if(ht=ye.charCodeAt(Be++),ht===37){if(ht=ye.charAt(Be++),lt=R[ht in wW?ye.charAt(Be++):ht],!lt||(ge=lt(se,Te,ge))<0)return-1}else if(ht!=Te.charCodeAt(ge++))return-1}return ge}function j(se,ye,Te){var ge=u.exec(ye.slice(Te));return ge?(se.p=c.get(ge[0].toLowerCase()),Te+ge[0].length):-1}function $(se,ye,Te){var ge=p.exec(ye.slice(Te));return ge?(se.w=x.get(ge[0].toLowerCase()),Te+ge[0].length):-1}function L(se,ye,Te){var ge=d.exec(ye.slice(Te));return ge?(se.w=h.get(ge[0].toLowerCase()),Te+ge[0].length):-1}function K(se,ye,Te){var ge=_.exec(ye.slice(Te));return ge?(se.m=C.get(ge[0].toLowerCase()),Te+ge[0].length):-1}function H(se,ye,Te){var ge=y.exec(ye.slice(Te));return ge?(se.m=w.get(ge[0].toLowerCase()),Te+ge[0].length):-1}function D(se,ye,Te){return M(se,t,ye,Te)}function W(se,ye,Te){return M(se,n,ye,Te)}function q(se,ye,Te){return M(se,r,ye,Te)}function Y(se){return a[se.getDay()]}function U(se){return i[se.getDay()]}function V(se){return l[se.getMonth()]}function G(se){return s[se.getMonth()]}function z(se){return o[+(se.getHours()>=12)]}function X(se){return 1+~~(se.getMonth()/3)}function ee(se){return a[se.getUTCDay()]}function ae(se){return i[se.getUTCDay()]}function fe(se){return l[se.getUTCMonth()]}function ie(se){return s[se.getUTCMonth()]}function we(se){return o[+(se.getUTCHours()>=12)]}function de(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var ye=T(se+="",O);return ye.toString=function(){return se},ye},parse:function(se){var ye=k(se+="",!1);return ye.toString=function(){return se},ye},utcFormat:function(se){var ye=T(se+="",P);return ye.toString=function(){return se},ye},utcParse:function(se){var ye=k(se+="",!0);return ye.toString=function(){return se},ye}}}var wW={"-":"",_:" ",0:"0"},Go=/^\s*\d+/,Cze=/^%/,Oze=/[\\^$*+?|[\]().{}]/g;function tr(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function Pze(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Tze(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Aze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function xW(e,t,n){var r=Go.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function bW(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mze(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jze(e,t,n){var r=Go.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ize(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SW(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Dze(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _W(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Lze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $ze(e,t,n){var r=Go.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fze(e,t,n){var r=Go.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Bze(e,t,n){var r=Go.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zze(e,t,n){var r=Cze.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qze(e,t,n){var r=Go.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Uze(e,t,n){var r=Go.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function EW(e,t){return tr(e.getDate(),t,2)}function Vze(e,t){return tr(e.getHours(),t,2)}function Wze(e,t){return tr(e.getHours()%12||12,t,2)}function Hze(e,t){return tr(1+Ib.count(yf(e),e),t,3)}function bae(e,t){return tr(e.getMilliseconds(),t,3)}function Gze(e,t){return bae(e,t)+"000"}function Kze(e,t){return tr(e.getMonth()+1,t,2)}function Yze(e,t){return tr(e.getMinutes(),t,2)}function Xze(e,t){return tr(e.getSeconds(),t,2)}function Qze(e){var t=e.getDay();return t===0?7:t}function Zze(e,t){return tr(nP.count(yf(e)-1,e),t,2)}function Sae(e){var t=e.getDay();return t>=4||t===0?wy(e):wy.ceil(e)}function Jze(e,t){return e=Sae(e),tr(wy.count(yf(e),e)+(yf(e).getDay()===4),t,2)}function eqe(e){return e.getDay()}function tqe(e,t){return tr(XC.count(yf(e)-1,e),t,2)}function nqe(e,t){return tr(e.getFullYear()%100,t,2)}function rqe(e,t){return e=Sae(e),tr(e.getFullYear()%100,t,2)}function oqe(e,t){return tr(e.getFullYear()%1e4,t,4)}function iqe(e,t){var n=e.getDay();return e=n>=4||n===0?wy(e):wy.ceil(e),tr(e.getFullYear()%1e4,t,4)}function aqe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tr(t/60|0,"0",2)+tr(t%60,"0",2)}function CW(e,t){return tr(e.getUTCDate(),t,2)}function sqe(e,t){return tr(e.getUTCHours(),t,2)}function lqe(e,t){return tr(e.getUTCHours()%12||12,t,2)}function uqe(e,t){return tr(1+tP.count(wf(e),e),t,3)}function _ae(e,t){return tr(e.getUTCMilliseconds(),t,3)}function cqe(e,t){return _ae(e,t)+"000"}function fqe(e,t){return tr(e.getUTCMonth()+1,t,2)}function dqe(e,t){return tr(e.getUTCMinutes(),t,2)}function hqe(e,t){return tr(e.getUTCSeconds(),t,2)}function pqe(e){var t=e.getUTCDay();return t===0?7:t}function mqe(e,t){return tr(rP.count(wf(e)-1,e),t,2)}function Eae(e){var t=e.getUTCDay();return t>=4||t===0?xy(e):xy.ceil(e)}function gqe(e,t){return e=Eae(e),tr(xy.count(wf(e),e)+(wf(e).getUTCDay()===4),t,2)}function vqe(e){return e.getUTCDay()}function yqe(e,t){return tr(QC.count(wf(e)-1,e),t,2)}function wqe(e,t){return tr(e.getUTCFullYear()%100,t,2)}function xqe(e,t){return e=Eae(e),tr(e.getUTCFullYear()%100,t,2)}function bqe(e,t){return tr(e.getUTCFullYear()%1e4,t,4)}function Sqe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xy(e):xy.ceil(e),tr(e.getUTCFullYear()%1e4,t,4)}function _qe(){return"+0000"}function OW(){return"%"}function RW(e){return+e}function PW(e){return Math.floor(+e/1e3)}var av,Cae,Oae;Eqe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Eqe(e){return av=Eze(e),Cae=av.format,av.parse,Oae=av.utcFormat,av.utcParse,av}function Cqe(e){return new Date(e)}function Oqe(e){return e instanceof Date?+e:+new Date(+e)}function W$(e,t,n,r,o,i,a,s,l,u){var c=k$(),d=c.invert,h=c.domain,p=u(".%L"),x=u(":%S"),y=u("%I:%M"),w=u("%I %p"),_=u("%a %d"),C=u("%b %d"),O=u("%B"),P=u("%Y");function R(T){return(l(T)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>FBe(e,i/r))},n.copy=function(){return Aae(t).domain(e)},Ef.apply(n,arguments)}function iP(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,u=Qi,c,d=!1,h;function p(y){return isNaN(y=+y)?h:(y=.5+((y=+c(y))-i)*(r*yn}return ij=e,ij}var aj,NW;function Nqe(){if(NW)return aj;NW=1;var e=jae(),t=kqe(),n=l0();function r(o){return o&&o.length?e(o,n,t):void 0}return aj=r,aj}var Mqe=Nqe();const Dd=Ln(Mqe);var sj,MW;function jqe(){if(MW)return sj;MW=1;function e(t,n){return te.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};bt.decimalPlaces=bt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};bt.dividedBy=bt.div=function(e){return lf(this,new this.constructor(e))};bt.dividedToIntegerBy=bt.idiv=function(e){var t=this,n=t.constructor;return vr(lf(t,new n(e),0,1),n.precision)};bt.equals=bt.eq=function(e){return!this.cmp(e)};bt.exponent=function(){return vo(this)};bt.greaterThan=bt.gt=function(e){return this.cmp(e)>0};bt.greaterThanOrEqualTo=bt.gte=function(e){return this.cmp(e)>=0};bt.isInteger=bt.isint=function(){return this.e>this.d.length-2};bt.isNegative=bt.isneg=function(){return this.s<0};bt.isPositive=bt.ispos=function(){return this.s>0};bt.isZero=function(){return this.s===0};bt.lessThan=bt.lt=function(e){return this.cmp(e)<0};bt.lessThanOrEqualTo=bt.lte=function(e){return this.cmp(e)<1};bt.logarithm=bt.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(as))throw Error(Ks+"NaN");if(n.s<1)throw Error(Ks+(n.s?"NaN":"-Infinity"));return n.eq(as)?new r(0):(Nr=!1,t=lf(hx(n,i),hx(e,i),i),Nr=!0,vr(t,o))};bt.minus=bt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$ae(t,e):Dae(t,(e.s=-e.s,e))};bt.modulo=bt.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(Ks+"NaN");return n.s?(Nr=!1,t=lf(n,e,0,1).times(e),Nr=!0,n.minus(t)):vr(new r(n),o)};bt.naturalExponential=bt.exp=function(){return Lae(this)};bt.naturalLogarithm=bt.ln=function(){return hx(this)};bt.negated=bt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};bt.plus=bt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Dae(t,e):$ae(t,(e.s=-e.s,e))};bt.precision=bt.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yp+e);if(t=vo(o)+1,r=o.d.length-1,n=r*Pr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};bt.squareRoot=bt.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ks+"NaN")}for(e=vo(s),Nr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Vu(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=c0((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(lf(s,i,a+2)).times(.5),Vu(i.d).slice(0,a)===(t=Vu(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(vr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Nr=!0,vr(r,n)};bt.times=bt.mul=function(e){var t,n,r,o,i,a,s,l,u,c=this,d=c.constructor,h=c.d,p=(e=new d(e)).d;if(!c.s||!e.s)return new d(0);for(e.s*=c.s,n=c.e+e.e,l=h.length,u=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*h[o-r-1]+t,i[o--]=s%Ho|0,t=s/Ho|0;i[o]=(i[o]+t)%Ho|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Nr?vr(e,d.precision):e};bt.toDecimalPlaces=bt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(tc(e,0,u0),t===void 0?t=r.rounding:tc(t,0,8),vr(n,e+vo(n)+1,t))};bt.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=vm(r,!0):(tc(e,0,u0),t===void 0?t=o.rounding:tc(t,0,8),r=vr(new o(r),e+1,t),n=vm(r,!0,e+1)),n};bt.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?vm(o):(tc(e,0,u0),t===void 0?t=i.rounding:tc(t,0,8),r=vr(new i(o),e+vo(o)+1,t),n=vm(r.abs(),!1,e+vo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};bt.toInteger=bt.toint=function(){var e=this,t=e.constructor;return vr(new t(e),vo(e)+1,t.rounding)};bt.toNumber=function(){return+this};bt.toPower=bt.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(as);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ks+"Infinity");return s}if(s.eq(as))return s;if(r=l.precision,e.eq(as))return vr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=c<0?-c:c)<=Iae){for(o=new l(as),t=Math.ceil(r/Pr+4),Nr=!1;n%2&&(o=o.times(s),FW(o.d,t)),n=c0(n/2),n!==0;)s=s.times(s),FW(s.d,t);return Nr=!0,e.s<0?new l(as).div(o):vr(o,r)}}else if(i<0)throw Error(Ks+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Nr=!1,o=e.times(hx(s,r+u)),Nr=!0,o=Lae(o),o.s=i,o};bt.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=vo(o),r=vm(o,n<=i.toExpNeg||n>=i.toExpPos)):(tc(e,1,u0),t===void 0?t=i.rounding:tc(t,0,8),o=vr(new i(o),e,t),n=vo(o),r=vm(o,e<=n||n<=i.toExpNeg,e)),r};bt.toSignificantDigits=bt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(tc(e,1,u0),t===void 0?t=r.rounding:tc(t,0,8)),vr(new r(n),e,t)};bt.toString=bt.valueOf=bt.val=bt.toJSON=bt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=vo(e),n=e.constructor;return vm(e,t<=n.toExpNeg||t>=n.toExpPos)};function Dae(e,t){var n,r,o,i,a,s,l,u,c=e.constructor,d=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Nr?vr(t,d):t;if(l=e.d,u=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=u.length):(r=u,o=a,s=l.length),a=Math.ceil(d/Pr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,r=u,u=l,l=r),n=0;i;)n=(l[--i]=l[i]+u[i]+n)/Ho|0,l[i]%=Ho;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Nr?vr(t,d):t}function tc(e,t,n){if(e!==~~e||en)throw Error(Yp+e)}function Vu(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,u,c,d,h,p,x,y,w,_,C,O,P,R,T,k,M,j=r.constructor,$=r.s==o.s?1:-1,L=r.d,K=o.d;if(!r.s)return new j(r);if(!o.s)throw Error(Ks+"Division by zero");for(l=r.e-o.e,k=K.length,R=L.length,p=new j($),x=p.d=[],u=0;K[u]==(L[u]||0);)++u;if(K[u]>(L[u]||0)&&--l,i==null?C=i=j.precision:a?C=i+(vo(r)-vo(o))+1:C=i,C<0)return new j(0);if(C=C/Pr+2|0,u=0,k==1)for(c=0,K=K[0],C++;(u1&&(K=e(K,c),L=e(L,c),k=K.length,R=L.length),P=k,y=L.slice(0,k),w=y.length;w=Ho/2&&++T;do c=0,s=t(K,y,k,w),s<0?(_=y[0],k!=w&&(_=_*Ho+(y[1]||0)),c=_/T|0,c>1?(c>=Ho&&(c=Ho-1),d=e(K,c),h=d.length,w=y.length,s=t(d,y,h,w),s==1&&(c--,n(d,k16)throw Error(K$+vo(e));if(!e.s)return new c(as);for(Nr=!1,s=d,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(xp(2,u))/Math.LN10*2+5|0,s+=r,n=o=i=new c(as),c.precision=s;;){if(o=vr(o.times(e),s),n=n.times(++l),a=i.plus(lf(o,n,s)),Vu(a.d).slice(0,s)===Vu(i.d).slice(0,s)){for(;u--;)i=vr(i.times(i),s);return c.precision=d,t==null?(Nr=!0,vr(i,d)):i}i=a}}function vo(e){for(var t=e.e*Pr,n=e.d[0];n>=10;n/=10)t++;return t}function dj(e,t,n){if(t>e.LN10.sd())throw Nr=!0,n&&(e.precision=n),Error(Ks+"LN10 precision limit exceeded");return vr(new e(e.LN10),t)}function yd(e){for(var t="";e--;)t+="0";return t}function hx(e,t){var n,r,o,i,a,s,l,u,c,d=1,h=10,p=e,x=p.d,y=p.constructor,w=y.precision;if(p.s<1)throw Error(Ks+(p.s?"NaN":"-Infinity"));if(p.eq(as))return new y(0);if(t==null?(Nr=!1,u=w):u=t,p.eq(10))return t==null&&(Nr=!0),dj(y,u);if(u+=h,y.precision=u,n=Vu(x),r=n.charAt(0),i=vo(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=Vu(p.d),r=n.charAt(0),d++;i=vo(p),r>1?(p=new y("0."+n),i++):p=new y(r+"."+n.slice(1))}else return l=dj(y,u+2,w).times(i+""),p=hx(new y(r+"."+n.slice(1)),u-h).plus(l),y.precision=w,t==null?(Nr=!0,vr(p,w)):p;for(s=a=p=lf(p.minus(as),p.plus(as),u),c=vr(p.times(p),u),o=3;;){if(a=vr(a.times(c),u),l=s.plus(lf(a,new y(o),u)),Vu(l.d).slice(0,u)===Vu(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(dj(y,u+2,w).times(i+""))),s=lf(s,new y(d),u),y.precision=w,t==null?(Nr=!0,vr(s,w)):s;s=l,o+=2}}function $W(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=c0(n/Pr),e.d=[],r=(n+1)%Pr,n<0&&(r+=Pr),rZC||e.e<-ZC))throw Error(K$+n)}else e.s=0,e.e=0,e.d=[0];return e}function vr(e,t,n){var r,o,i,a,s,l,u,c,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Pr,o=t,u=d[c=0];else{if(c=Math.ceil((r+1)/Pr),i=d.length,c>=i)return e;for(u=i=d[c],a=1;i>=10;i/=10)a++;r%=Pr,o=r-Pr+a}if(n!==void 0&&(i=xp(10,a-o-1),s=u/i%10|0,l=t<0||d[c+1]!==void 0||u%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?u/xp(10,a-o):0:d[c-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=vo(e),d.length=1,t=t-i-1,d[0]=xp(10,(Pr-t%Pr)%Pr),e.e=c0(-t/Pr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=c,i=1,c--):(d.length=c+1,i=xp(10,Pr-r),d[c]=o>0?(u/xp(10,a-o)%xp(10,o)|0)*i:0),l)for(;;)if(c==0){(d[0]+=i)==Ho&&(d[0]=1,++e.e);break}else{if(d[c]+=i,d[c]!=Ho)break;d[c--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Nr&&(e.e>ZC||e.e<-ZC))throw Error(K$+vo(e));return e}function $ae(e,t){var n,r,o,i,a,s,l,u,c,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Nr?vr(t,p):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(c=a<0,c?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),o=Math.max(Math.ceil(p/Pr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,c=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+yd(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+yd(-o-1)+i,n&&(r=n-a)>0&&(i+=yd(r))):o>=a?(i+=yd(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+yd(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=yd(r))),e.s<0?"-"+i:i}function FW(e,t){if(e.length>t)return e.length=t,!0}function Fae(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Yp+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return $W(a,i.toString())}else if(typeof i!="string")throw Error(Yp+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,Vqe.test(i))$W(a,i);else throw Error(Yp+i)}if(o.prototype=bt,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Fae,o.config=o.set=Wqe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(Yp+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Yp+n+": "+r);return this}var Y$=Fae(Uqe);as=new Y$(1);const mr=Y$;function Hqe(e){return Xqe(e)||Yqe(e)||Kqe(e)||Gqe()}function Gqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kqe(e,t){if(e){if(typeof e=="string")return N5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N5(e,t)}}function Yqe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Xqe(e){if(Array.isArray(e))return N5(e)}function N5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,BW(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function fUe(e){if(Array.isArray(e))return e}function Vae(e){var t=px(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function Wae(e,t,n){if(e.lte(0))return new mr(0);var r=lP.getDigitCount(e.toNumber()),o=new mr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new mr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new mr(Math.ceil(l))}function dUe(e,t,n){var r=1,o=new mr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new mr(10).pow(lP.getDigitCount(e)-1),o=new mr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new mr(Math.floor(e)))}else e===0?o=new mr(Math.floor((t-1)/2)):n||(o=new mr(Math.floor(e)));var a=Math.floor((t-1)/2),s=eUe(Jqe(function(l){return o.add(new mr(l-a).mul(r)).toNumber()}),M5);return s(0,t)}function Hae(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new mr(0),tickMin:new mr(0),tickMax:new mr(0)};var i=Wae(new mr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new mr(0):(a=new mr(e).add(t).div(2),a=a.sub(new mr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new mr(t).sub(a).div(i).toNumber()),u=s+l+1;return u>n?Hae(e,t,n,r,o+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:i,tickMin:a.sub(new mr(s).mul(i)),tickMax:a.add(new mr(l).mul(i))})}function hUe(e){var t=px(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=Vae([n,r]),l=px(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var d=c===1/0?[u].concat(I5(M5(0,o-1).map(function(){return 1/0}))):[].concat(I5(M5(0,o-1).map(function(){return-1/0})),[c]);return n>r?j5(d):d}if(u===c)return dUe(u,o,i);var h=Hae(u,c,a,i),p=h.step,x=h.tickMin,y=h.tickMax,w=lP.rangeStep(x,y.add(new mr(.1).mul(p)),p);return n>r?j5(w):w}function pUe(e,t){var n=px(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Vae([r,o]),s=px(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,o];if(l===u)return[l];var c=Math.max(t,2),d=Wae(new mr(u).sub(l).div(c-1),i,0),h=[].concat(I5(lP.rangeStep(new mr(l),new mr(u).sub(new mr(.99).mul(d)),d)),[u]);return r>o?j5(h):h}var mUe=qae(hUe),gUe=qae(pUe),vUe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Sy(e){"@babel/helpers - typeof";return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(e)}function JC(){return JC=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OUe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u0?o[u-1].coordinate:o[s-1].coordinate,d=o[u].coordinate,h=u>=s-1?o[0].coordinate:o[u+1].coordinate,p=void 0;if(Il(d-c)!==Il(h-d)){var x=[];if(Il(h-d)===Il(l[1]-l[0])){p=h;var y=d+l[1]-l[0];x[0]=Math.min(y,(y+c)/2),x[1]=Math.max(y,(y+c)/2)}else{p=c;var w=h+l[1]-l[0];x[0]=Math.min(d,(w+d)/2),x[1]=Math.max(d,(w+d)/2)}var _=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>_[0]&&t<=_[1]||t>=x[0]&&t<=x[1]){a=o[u].index;break}}else{var C=Math.min(c,h),O=Math.max(c,h);if(t>(C+d)/2&&t<=(O+d)/2){a=o[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},X$=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Hr(Hr({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},UUe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,u=s.length;l=0});if(_&&_.length){var C=_[0].type.defaultProps,O=C!==void 0?Hr(Hr({},C),_[0].props):_[0].props,P=O.barSize,R=O[w];a[R]||(a[R]=[]);var T=Pn(P)?n:P;a[R].push({item:_[0],stackList:_.slice(1),barSize:Pn(T)?void 0:gm(T,r,0)})}}return a},VUe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var u=gm(n,o,0,!0),c,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=o/l,x=a.reduce(function(P,R){return P+R.barSize||0},0);x+=(l-1)*u,x>=o&&(x-=(l-1)*u,u=0),x>=o&&p>0&&(h=!0,p*=.9,x=l*p);var y=(o-x)/2>>0,w={offset:y-u,size:0};c=a.reduce(function(P,R){var T={item:R.item,position:{offset:w.offset+w.size+u,size:h?p:R.barSize}},k=[].concat(UW(P),[T]);return w=k[k.length-1].position,R.stackList&&R.stackList.length&&R.stackList.forEach(function(M){k.push({item:M,position:w})}),k},d)}else{var _=gm(r,o,0,!0);o-2*_-(l-1)*u<=0&&(u=0);var C=(o-2*_-(l-1)*u)/l;C>1&&(C>>=0);var O=s===+s?Math.min(C,s):C;c=a.reduce(function(P,R,T){var k=[].concat(UW(P),[{item:R.item,position:{offset:_+(C+u)*T+(C-O)/2,size:O}}]);return R.stackList&&R.stackList.length&&R.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},d)}return c},WUe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),u=Xae({children:i,legendWidth:l});if(u){var c=o||{},d=c.width,h=c.height,p=u.align,x=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&x==="middle")&&p!=="center"&&it(t[p]))return Hr(Hr({},t),{},Nv({},p,t[p]+(d||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&x!=="middle"&&it(t[x]))return Hr(Hr({},t),{},Nv({},x,t[x]+(h||0)))}return t},HUe=function(t,n,r){return Pn(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Qae=function(t,n,r,o,i){var a=n.props.children,s=Us(a,Db).filter(function(u){return HUe(o,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var d=ea(c,r);if(Pn(d))return u;var h=Array.isArray(d)?[aP(d),Dd(d)]:[d,d],p=l.reduce(function(x,y){var w=ea(c,y,0),_=h[0]-Math.abs(Array.isArray(w)?w[0]:w),C=h[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(_,x[0]),Math.max(C,x[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},GUe=function(t,n,r,o,i){var a=n.map(function(s){return Qae(t,s,r,i,o)}).filter(function(s){return!Pn(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Zae=function(t,n,r,o,i){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&Qae(t,l,u,o)||Aw(t,u,r,i)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,u){for(var c=0,d=u.length;c=2?Il(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:o(h)+u,value:d,offset:u}});return c.filter(function(d){return!a0(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:o(d)+u,value:d,index:h,offset:u}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+u,value:d,offset:u}}):o.domain().map(function(d,h){return{coordinate:o(d)+u,value:i?i[d]:d,index:h,offset:u}})},hj=new WeakMap,q_=function(t,n){if(typeof n!="function")return t;hj.has(t)||hj.set(t,new WeakMap);var r=hj.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},KUe=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:fx(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:KC(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Tw(),realScaleType:"point"}:i==="category"?{scale:fx(),realScaleType:"band"}:{scale:KC(),realScaleType:"linear"};if(mm(o)){var l="scale".concat(HR(o));return{scale:(TW[l]||Tw)(),realScaleType:TW[l]?l:"point"}}return gn(o)?{scale:o}:{scale:Tw(),realScaleType:"point"}},WW=1e-4,YUe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-WW,a=Math.max(o[0],o[1])+WW,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},XUe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},JUe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},eVe={sign:ZUe,expand:fFe,none:hy,silhouette:dFe,wiggle:hFe,positive:JUe},tVe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=eVe[r],a=cFe().keys(o).value(function(s,l){return+ea(s,l,0)}).order(p5).offset(i);return a(t)},nVe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},u=s.reduce(function(d,h){var p,x=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Hr(Hr({},h.type.defaultProps),h.props):h.props,y=x.stackId,w=x.hide;if(w)return d;var _=x[r],C=d[_]||{hasStack:!1,stackGroups:{}};if(Po(y)){var O=C.stackGroups[y]||{numericAxisId:r,cateAxisId:o,items:[]};O.items.push(h),C.hasStack=!0,C.stackGroups[y]=O}else C.stackGroups[s0("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[h]};return Hr(Hr({},d),{},Nv({},_,C))},l),c={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var x={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,w){var _=p.stackGroups[w];return Hr(Hr({},y),{},Nv({},w,{numericAxisId:r,cateAxisId:o,items:_.items,stackedData:tVe(t,_.items,i)}))},x)}return Hr(Hr({},d),{},Nv({},h,p))},c)},rVe=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=mUe(u,i,s);return t.domain([aP(c),Dd(c)]),{niceTicks:c}}if(i&&o==="number"){var d=t.domain(),h=gUe(d,i,s);return{niceTicks:h}}return null};function tO(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pn(o[t.dataKey])){var s=NC(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=ea(o,Pn(a)?t.dataKey:a);return Pn(l)?null:t.scale(l)}var HW=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=ea(a,n.dataKey,n.domain[s]);return Pn(l)?null:n.scale(l)-i/2+o},oVe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},iVe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Hr(Hr({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Po(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},aVe=function(t){return t.reduce(function(n,r){return[aP(r.concat([n[0]]).filter(it)),Dd(r.concat([n[1]]).filter(it))]},[1/0,-1/0])},tse=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(u,c){var d=aVe(c.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},GW=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,KW=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,F5=function(t,n,r){if(gn(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(it(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(GW.test(t[0])){var i=+GW.exec(t[0])[1];o[0]=n[0]-i}else gn(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(it(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(KW.test(t[1])){var a=+KW.exec(t[1])[1];o[1]=n[1]+a}else gn(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},nO=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=R$(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;sa&&(u=2*Math.PI-u),{radius:s,angle:cVe(u),angleInRadian:u}},hVe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},pVe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},ZW=function(t,n){var r=t.x,o=t.y,i=dVe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,u=n.outerRadius;if(au)return!1;if(a===0)return!0;var c=hVe(n),d=c.startAngle,h=c.endAngle,p=s,x;if(d<=h){for(;p>h;)p-=360;for(;p=d&&p<=h}else{for(;p>d;)p-=360;for(;p=h&&p<=d}return x?QW(QW({},n),{},{radius:a,angle:pVe(p,n)}):null};function yx(e){"@babel/helpers - typeof";return yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yx(e)}var mVe=["offset"];function gVe(e){return xVe(e)||wVe(e)||yVe(e)||vVe()}function vVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yVe(e,t){if(e){if(typeof e=="string")return B5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B5(e,t)}}function wVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xVe(e){if(Array.isArray(e))return B5(e)}function B5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function JW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t=0?1:-1,O,P;o==="insideStart"?(O=p+C*a,P=y):o==="insideEnd"?(O=x-C*a,P=!y):o==="end"&&(O=x+C*a,P=y),P=_<=0?P:!P;var R=oi(u,c,w,O),T=oi(u,c,w,O+(P?1:-1)*359),k="M".concat(R.x,",").concat(R.y,` - A`).concat(w,",").concat(w,",0,1,").concat(P?0:1,`, - `).concat(T.x,",").concat(T.y),M=Pn(t.id)?s0("recharts-radial-line-"):t.id;return J.createElement("text",wx({},r,{dominantBaseline:"central",className:Dn("recharts-radial-bar-label",s)}),J.createElement("defs",null,J.createElement("path",{id:M,d:k})),J.createElement("textPath",{xlinkHref:"#".concat(M)},n))},TVe=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,d=i.endAngle,h=(c+d)/2;if(o==="outside"){var p=oi(a,s,u+r,h),x=p.x,y=p.y;return{x,y,textAnchor:x>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var w=(l+u)/2,_=oi(a,s,w,h),C=_.x,O=_.y;return{x:C,y:O,textAnchor:"middle",verticalAnchor:"middle"}},AVe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,u=a.width,c=a.height,d=c>=0?1:-1,h=d*o,p=d>0?"end":"start",x=d>0?"start":"end",y=u>=0?1:-1,w=y*o,_=y>0?"end":"start",C=y>0?"start":"end";if(i==="top"){var O={x:s+u/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return Oo(Oo({},O),r?{height:Math.max(l-r.y,0),width:u}:{})}if(i==="bottom"){var P={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:x};return Oo(Oo({},P),r?{height:Math.max(r.y+r.height-(l+c),0),width:u}:{})}if(i==="left"){var R={x:s-w,y:l+c/2,textAnchor:_,verticalAnchor:"middle"};return Oo(Oo({},R),r?{width:Math.max(R.x-r.x,0),height:c}:{})}if(i==="right"){var T={x:s+u+w,y:l+c/2,textAnchor:C,verticalAnchor:"middle"};return Oo(Oo({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:c}:{})}var k=r?{width:u,height:c}:{};return i==="insideLeft"?Oo({x:s+w,y:l+c/2,textAnchor:C,verticalAnchor:"middle"},k):i==="insideRight"?Oo({x:s+u-w,y:l+c/2,textAnchor:_,verticalAnchor:"middle"},k):i==="insideTop"?Oo({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:x},k):i==="insideBottom"?Oo({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:p},k):i==="insideTopLeft"?Oo({x:s+w,y:l+h,textAnchor:C,verticalAnchor:x},k):i==="insideTopRight"?Oo({x:s+u-w,y:l+h,textAnchor:_,verticalAnchor:x},k):i==="insideBottomLeft"?Oo({x:s+w,y:l+c-h,textAnchor:C,verticalAnchor:p},k):i==="insideBottomRight"?Oo({x:s+u-w,y:l+c-h,textAnchor:_,verticalAnchor:p},k):i0(i)&&(it(i.x)||Pp(i.x))&&(it(i.y)||Pp(i.y))?Oo({x:s+gm(i.x,u),y:l+gm(i.y,c),textAnchor:"end",verticalAnchor:"end"},k):Oo({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},kVe=function(t){return"cx"in t&&it(t.cx)};function Ci(e){var t=e.offset,n=t===void 0?5:t,r=bVe(e,mVe),o=Oo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,u=o.content,c=o.className,d=c===void 0?"":c,h=o.textBreakAll;if(!i||Pn(s)&&Pn(l)&&!b.isValidElement(u)&&!gn(u))return null;if(b.isValidElement(u))return b.cloneElement(u,o);var p;if(gn(u)){if(p=b.createElement(u,o),b.isValidElement(p))return p}else p=OVe(o);var x=kVe(i),y=bn(o,!0);if(x&&(a==="insideStart"||a==="insideEnd"||a==="end"))return PVe(o,p,y);var w=x?TVe(o):AVe(o);return J.createElement(WC,wx({className:Dn("recharts-label",d)},y,w,{breakAll:h}),p)}Ci.displayName="Label";var rse=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,d=t.x,h=t.y,p=t.top,x=t.left,y=t.width,w=t.height,_=t.clockWise,C=t.labelViewBox;if(C)return C;if(it(y)&&it(w)){if(it(d)&&it(h))return{x:d,y:h,width:y,height:w};if(it(p)&&it(x))return{x:p,y:x,width:y,height:w}}return it(d)&&it(h)?{x:d,y:h,width:0,height:0}:it(n)&&it(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:_}:t.viewBox?t.viewBox:{}},NVe=function(t,n){return t?t===!0?J.createElement(Ci,{key:"label-implicit",viewBox:n}):Po(t)?J.createElement(Ci,{key:"label-implicit",viewBox:n,value:t}):b.isValidElement(t)?t.type===Ci?b.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(Ci,{key:"label-implicit",content:t,viewBox:n}):gn(t)?J.createElement(Ci,{key:"label-implicit",content:t,viewBox:n}):i0(t)?J.createElement(Ci,wx({viewBox:n},t,{key:"label-implicit"})):null:null},MVe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=rse(t),a=Us(o,Ci).map(function(l,u){return b.cloneElement(l,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return a;var s=NVe(t.label,n||i);return[s].concat(gVe(a))};Ci.parseViewBox=rse;Ci.renderCallByParent=MVe;var pj,eH;function jVe(){if(eH)return pj;eH=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return pj=e,pj}var IVe=jVe();const DVe=Ln(IVe);function xx(e){"@babel/helpers - typeof";return xx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xx(e)}var LVe=["valueAccessor"],$Ve=["data","dataKey","clockWise","id","textBreakAll"];function FVe(e){return UVe(e)||qVe(e)||zVe(e)||BVe()}function BVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zVe(e,t){if(e){if(typeof e=="string")return z5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z5(e,t)}}function qVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UVe(e){if(Array.isArray(e))return z5(e)}function z5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GVe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KVe=function(t){return Array.isArray(t.value)?DVe(t.value):t.value};function uf(e){var t=e.valueAccessor,n=t===void 0?KVe:t,r=rH(e,LVe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=rH(r,$Ve);return!o||!o.length?null:J.createElement(Er,{className:"recharts-label-list"},o.map(function(c,d){var h=Pn(i)?n(c,d):ea(c&&c.payload,i),p=Pn(s)?{}:{id:"".concat(s,"-").concat(d)};return J.createElement(Ci,oO({},bn(c,!0),u,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:Ci.parseViewBox(Pn(a)?c:nH(nH({},c),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}uf.displayName="LabelList";function YVe(e,t){return e?e===!0?J.createElement(uf,{key:"labelList-implicit",data:t}):J.isValidElement(e)||gn(e)?J.createElement(uf,{key:"labelList-implicit",data:t,content:e}):i0(e)?J.createElement(uf,oO({data:t},e,{key:"labelList-implicit"})):null:null}function XVe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=Us(r,uf).map(function(a,s){return b.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=YVe(e.label,t);return[i].concat(FVe(o))}uf.renderCallByParent=XVe;function bx(e){"@babel/helpers - typeof";return bx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bx(e)}function q5(){return q5=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, - `).concat(d.x,",").concat(d.y,` - `);if(o>0){var p=oi(n,r,o,a),x=oi(n,r,o,u);h+="L ".concat(x.x,",").concat(x.y,` - A `).concat(o,",").concat(o,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},tWe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,d=Il(c-u),h=U_({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:a,cornerIsExternal:l}),p=h.circleTangency,x=h.lineTangency,y=h.theta,w=U_({cx:n,cy:r,radius:i,angle:c,sign:-d,cornerRadius:a,cornerIsExternal:l}),_=w.circleTangency,C=w.lineTangency,O=w.theta,P=l?Math.abs(u-c):Math.abs(u-c)-y-O;if(P<0)return s?"M ".concat(x.x,",").concat(x.y,` - a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 - a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):ose({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:c});var R="M ".concat(x.x,",").concat(x.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` - A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` - `);if(o>0){var T=U_({cx:n,cy:r,radius:o,angle:u,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),k=T.circleTangency,M=T.lineTangency,j=T.theta,$=U_({cx:n,cy:r,radius:o,angle:c,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),L=$.circleTangency,K=$.lineTangency,H=$.theta,D=l?Math.abs(u-c):Math.abs(u-c)-j-H;if(D<0&&a===0)return"".concat(R,"L").concat(n,",").concat(r,"Z");R+="L".concat(K.x,",").concat(K.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` - A`).concat(o,",").concat(o,",0,").concat(+(D>180),",").concat(+(d>0),",").concat(k.x,",").concat(k.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"Z")}else R+="L".concat(n,",").concat(r,"Z");return R},nWe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ise=function(t){var n=iH(iH({},nWe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(c-d)<360?w=tWe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(y,x/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}):w=ose({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d}),J.createElement("path",q5({},bn(n,!0),{className:p,d:w,role:"img"}))};function Sx(e){"@babel/helpers - typeof";return Sx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sx(e)}function U5(){return U5=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function xWe(e,t){return Am(e.getTime(),t.getTime())}function bWe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function SWe(e,t){return e===t}function gH(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.entries(),a,s,l=0;(a=i.next())&&!a.done;){for(var u=t.entries(),c=!1,d=0;(s=u.next())&&!s.done;){if(o[d]){d++;continue}var h=a.value,p=s.value;if(n.equals(h[0],p[0],l,d,e,t,n)&&n.equals(h[1],p[1],h[0],p[0],e,t,n)){c=o[d]=!0;break}d++}if(!c)return!1;l++}return!0}var _We=Am;function EWe(e,t,n){var r=mH(e),o=r.length;if(mH(t).length!==o)return!1;for(;o-- >0;)if(!ase(e,t,n,r[o]))return!1;return!0}function Q1(e,t,n){var r=hH(e),o=r.length;if(hH(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],!ase(e,t,n,i)||(a=pH(e,i),s=pH(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function CWe(e,t){return Am(e.valueOf(),t.valueOf())}function OWe(e,t){return e.source===t.source&&e.flags===t.flags}function vH(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),i=e.values(),a,s;(a=i.next())&&!a.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!o[c]&&n.equals(a.value,s.value,a.value,s.value,e,t,n)){u=o[c]=!0;break}c++}if(!u)return!1}return!0}function RWe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function PWe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function ase(e,t,n,r){return(r===yWe||r===vWe||r===gWe)&&(e.$$typeof||t.$$typeof)?!0:mWe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var TWe="[object Arguments]",AWe="[object Boolean]",kWe="[object Date]",NWe="[object Error]",MWe="[object Map]",jWe="[object Number]",IWe="[object Object]",DWe="[object RegExp]",LWe="[object Set]",$We="[object String]",FWe="[object URL]",BWe=Array.isArray,yH=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,wH=Object.assign,zWe=Object.prototype.toString.call.bind(Object.prototype.toString);function qWe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,i=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,d=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(x,y,w){if(x===y)return!0;if(x==null||y==null)return!1;var _=typeof x;if(_!==typeof y)return!1;if(_!=="object")return _==="number"?a(x,y,w):_==="function"?o(x,y,w):!1;var C=x.constructor;if(C!==y.constructor)return!1;if(C===Object)return s(x,y,w);if(BWe(x))return t(x,y,w);if(yH!=null&&yH(x))return d(x,y,w);if(C===Date)return n(x,y,w);if(C===RegExp)return u(x,y,w);if(C===Map)return i(x,y,w);if(C===Set)return c(x,y,w);var O=zWe(x);return O===kWe?n(x,y,w):O===DWe?u(x,y,w):O===MWe?i(x,y,w):O===LWe?c(x,y,w):O===IWe?typeof x.then!="function"&&typeof y.then!="function"&&s(x,y,w):O===FWe?h(x,y,w):O===NWe?r(x,y,w):O===TWe?s(x,y,w):O===AWe||O===jWe||O===$We?l(x,y,w):!1}}function UWe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?Q1:wWe,areDatesEqual:xWe,areErrorsEqual:bWe,areFunctionsEqual:SWe,areMapsEqual:r?dH(gH,Q1):gH,areNumbersEqual:_We,areObjectsEqual:r?Q1:EWe,arePrimitiveWrappersEqual:CWe,areRegExpsEqual:OWe,areSetsEqual:r?dH(vH,Q1):vH,areTypedArraysEqual:r?Q1:RWe,areUrlsEqual:PWe};if(n&&(o=wH({},o,n(o))),t){var i=W_(o.areArraysEqual),a=W_(o.areMapsEqual),s=W_(o.areObjectsEqual),l=W_(o.areSetsEqual);o=wH({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function VWe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function WWe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,u){var c=r(),d=c.cache,h=d===void 0?t?new WeakMap:void 0:d,p=c.meta;return n(l,u,{cache:h,equals:o,meta:p,strict:i})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,u){return n(l,u,a)}}var HWe=fh();fh({strict:!0});fh({circular:!0});fh({circular:!0,strict:!0});fh({createInternalComparator:function(){return Am}});fh({strict:!0,createInternalComparator:function(){return Am}});fh({circular:!0,createInternalComparator:function(){return Am}});fh({circular:!0,createInternalComparator:function(){return Am},strict:!0});function fh(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=UWe(e),l=qWe(s),u=r?r(l):VWe(l);return WWe({circular:n,comparator:l,createState:o,equals:u,strict:a})}function GWe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function xH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):GWe(o)};requestAnimationFrame(r)}function V5(e){"@babel/helpers - typeof";return V5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V5(e)}function KWe(e){return ZWe(e)||QWe(e)||XWe(e)||YWe()}function YWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XWe(e,t){if(e){if(typeof e=="string")return bH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bH(e,t)}}function bH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:_<0?0:_},y=function(_){for(var C=_>1?1:_,O=C,P=0;P<8;++P){var R=d(O)-C,T=p(O);if(Math.abs(R-C)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(c,d,h){var p=-(c-d)*r,x=h*i,y=h+(p-x)*s/1e3,w=h*s/1e3+c;return Math.abs(w-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function THe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function yj(e){return MHe(e)||NHe(e)||kHe(e)||AHe()}function AHe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kHe(e,t){if(e){if(typeof e=="string")return Y5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y5(e,t)}}function NHe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MHe(e){if(Array.isArray(e))return Y5(e)}function Y5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sO(e){return sO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sO(e)}var nc=(function(e){$He(n,e);var t=FHe(n);function n(r,o){var i;jHe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,u=a.from,c=a.to,d=a.steps,h=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Z5(i)),i.changeStyle=i.changeStyle.bind(Z5(i)),!s||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:c}),Q5(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},Q5(i);i.state={style:l?dw({},l,u):u}}else i.state={style:{}};return i}return DHe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,d=i.from,h=this.state.style;if(s){if(!a){var p={style:l?dw({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(p);return}if(!(HWe(o.to,c)&&o.canBegin&&o.isActive)){var x=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=x||u?d:o.to;if(this.state&&h){var w={style:l?dw({},l,y):y};(l&&h[l]!==y||!l&&h!==y)&&this.setState(w)}this.runAnimation(Sl(Sl({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,u=o.easing,c=o.begin,d=o.onAnimationEnd,h=o.onAnimationStart,p=OHe(a,s,mHe(u),l,this.changeStyle),x=function(){i.stopJSAnimation=p()};this.manager.start([h,c,x,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,u=a[0],c=u.style,d=u.duration,h=d===void 0?0:d,p=function(y,w,_){if(_===0)return y;var C=w.duration,O=w.easing,P=O===void 0?"ease":O,R=w.style,T=w.properties,k=w.onAnimationEnd,M=_>0?a[_-1]:w,j=T||Object.keys(R);if(typeof P=="function"||P==="spring")return[].concat(yj(y),[i.runJSAnimation.bind(i,{from:M.style,to:R,duration:C,easing:P}),C]);var $=EH(j,C,P),L=Sl(Sl(Sl({},M.style),R),{},{transition:$});return[].concat(yj(y),[L,C,k]).filter(rHe)};return this.manager.start([l].concat(yj(a.reduce(p,[c,Math.max(h,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=JWe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,u=o.easing,c=o.onAnimationStart,d=o.onAnimationEnd,h=o.steps,p=o.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(o);return}if(h.length>1){this.runStepAnimation(o);return}var y=s?dw({},s,l):l,w=EH(Object.keys(y),a,u);x.start([c,i,Sl(Sl({},y),{},{transition:w}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=PHe(o,RHe),u=b.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||a<=0)return i;var d=function(p){var x=p.props,y=x.style,w=y===void 0?{}:y,_=x.className,C=b.cloneElement(p,Sl(Sl({},l),{},{style:Sl(Sl({},w),c),className:_}));return C};return u===1?d(b.Children.only(i)):J.createElement("div",null,b.Children.map(i,function(h){return d(h)}))}}]),n})(b.PureComponent);nc.displayName="Animate";nc.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};nc.propTypes={from:lr.oneOfType([lr.object,lr.string]),to:lr.oneOfType([lr.object,lr.string]),attributeName:lr.string,duration:lr.number,begin:lr.number,easing:lr.oneOfType([lr.string,lr.func]),steps:lr.arrayOf(lr.shape({duration:lr.number.isRequired,style:lr.object.isRequired,easing:lr.oneOfType([lr.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),lr.func]),properties:lr.arrayOf("string"),onAnimationEnd:lr.func})),children:lr.oneOfType([lr.node,lr.func]),isActive:lr.bool,canBegin:lr.bool,onAnimationEnd:lr.func,shouldReAnimate:lr.bool,onAnimationStart:lr.func,onAnimationReStart:lr.func};function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}function lO(){return lO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=o>=0&&r>=0||o<0&&r<0?1:0,c;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,p=4;ha?a:i[h];c="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(c+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),c+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(c+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, - `).concat(t+r,",").concat(n+s*d[1])),c+="L ".concat(t+r,",").concat(n+o-s*d[2]),d[2]>0&&(c+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, - `).concat(t+r-l*d[2],",").concat(n+o)),c+="L ".concat(t+l*d[3],",").concat(n+o),d[3]>0&&(c+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, - `).concat(t,",").concat(n+o-s*d[3])),c+="Z"}else if(a>0&&i===+i&&i>0){var x=Math.min(a,i);c="M ".concat(t,",").concat(n+s*x,` - A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+l*x,",").concat(n,` - L `).concat(t+r-l*x,",").concat(n,` - A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*x,` - L `).concat(t+r,",").concat(n+o-s*x,` - A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r-l*x,",").concat(n+o,` - L `).concat(t+l*x,",").concat(n+o,` - A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t,",").concat(n+o-s*x," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return c},YHe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),d=Math.min(a,a+l),h=Math.max(a,a+l);return r>=u&&r<=c&&o>=d&&o<=h}return!1},XHe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Q$=function(t){var n=NH(NH({},XHe),t),r=b.useRef(),o=b.useState(-1),i=zHe(o,2),a=i[0],s=i[1];b.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,u=n.y,c=n.width,d=n.height,h=n.radius,p=n.className,x=n.animationEasing,y=n.animationDuration,w=n.animationBegin,_=n.isAnimationActive,C=n.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||d!==+d||c===0||d===0)return null;var O=Dn("recharts-rectangle",p);return C?J.createElement(nc,{canBegin:a>0,from:{width:c,height:d,x:l,y:u},to:{width:c,height:d,x:l,y:u},duration:y,animationEasing:x,isActive:C},function(P){var R=P.width,T=P.height,k=P.x,M=P.y;return J.createElement(nc,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,isActive:_,easing:x},J.createElement("path",lO({},bn(n,!0),{className:O,d:MH(k,M,R,T,h),ref:r})))}):J.createElement("path",lO({},bn(n,!0),{className:O,d:MH(l,u,c,d,h)}))};function J5(){return J5=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var oGe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},iGe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,u=l===void 0?0:l,c=t.width,d=c===void 0?0:c,h=t.height,p=h===void 0?0:h,x=t.className,y=nGe(t,QHe),w=ZHe({x:r,y:i,top:s,left:u,width:d,height:p},y);return!it(r)||!it(i)||!it(d)||!it(p)||!it(s)||!it(u)?null:J.createElement("path",e3({},bn(w,!0),{className:Dn("recharts-cross",x),d:oGe(r,i,d,p,s,u)}))},wj,IH;function aGe(){if(IH)return wj;IH=1;var e=jie(),t=e(Object.getPrototypeOf,Object);return wj=t,wj}var xj,DH;function sGe(){if(DH)return xj;DH=1;var e=Sf(),t=aGe(),n=_f(),r="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,l=a.call(Object);function u(c){if(!n(c)||e(c)!=r)return!1;var d=t(c);if(d===null)return!0;var h=s.call(d,"constructor")&&d.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==l}return xj=u,xj}var lGe=sGe();const uGe=Ln(lGe);var bj,LH;function cGe(){if(LH)return bj;LH=1;var e=Sf(),t=_f(),n="[object Boolean]";function r(o){return o===!0||o===!1||t(o)&&e(o)==n}return bj=r,bj}var fGe=cGe();const dGe=Ln(fGe);function Rx(e){"@babel/helpers - typeof";return Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rx(e)}function uO(){return uO=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:d,height:h,x:l,y:u},duration:y,animationEasing:x,isActive:_},function(O){var P=O.upperWidth,R=O.lowerWidth,T=O.height,k=O.x,M=O.y;return J.createElement(nc,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,easing:x},J.createElement("path",uO({},bn(n,!0),{className:C,d:zH(k,M,P,R,T),ref:r})))}):J.createElement("g",null,J.createElement("path",uO({},bn(n,!0),{className:C,d:zH(l,u,c,d,h)})))},_Ge=["option","shapeType","propTransformer","activeClassName","isActive"];function Px(e){"@babel/helpers - typeof";return Px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Px(e)}function EGe(e,t){if(e==null)return{};var n=CGe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cO(e){for(var t=1;t0&&r.handleDrag(o.changedTouches[0])}),Qa(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Qa(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Qa(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Qa(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Qa(r,"handleSlideDragStart",function(o){var i=ZH(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return JGe(t,e),YGe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,d=Math.min(o,i),h=Math.max(o,i),p=t.getIndexInRange(a,d),x=t.getIndexInRange(a,h);return{startIndex:p-p%l,endIndex:x===c?c:x-x%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=ea(i[r],s,r);return gn(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,u=l.x,c=l.width,d=l.travellerWidth,h=l.startIndex,p=l.endIndex,x=l.onChange,y=r.pageX-i;y>0?y=Math.min(y,u+c-d-s,u+c-d-a):y<0&&(y=Math.max(y,u-a,u-s));var w=this.getIndex({startX:a+y,endX:s+y});(w.startIndex!==h||w.endIndex!==p)&&x&&x(w),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=ZH(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,u=this.state[a],c=this.props,d=c.x,h=c.width,p=c.travellerWidth,x=c.onChange,y=c.gap,w=c.data,_={startX:this.state.startX,endX:this.state.endX},C=r.pageX-i;C>0?C=Math.min(C,d+h-p-u):C<0&&(C=Math.max(C,d-u)),_[a]=u+C;var O=this.getIndex(_),P=O.startIndex,R=O.endIndex,T=function(){var M=w.length-1;return a==="startX"&&(s>l?P%y===0:R%y===0)||sl?R%y===0:P%y===0)||s>l&&R===M};this.setState(Qa(Qa({},a,u+C),"brushMoveStartX",r.pageX),function(){x&&T()&&x(O)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,u=a.endX,c=this.state[o],d=s.indexOf(c);if(d!==-1){var h=d+r;if(!(h===-1||h>=s.length)){var p=s[h];o==="startX"&&p>=u||o==="endX"&&p<=l||this.setState(Qa({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,u=r.stroke;return J.createElement("rect",{stroke:u,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,u=r.children,c=r.padding,d=b.Children.only(u);return d?J.cloneElement(d,{x:o,y:i,width:a,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,u=l.y,c=l.travellerWidth,d=l.height,h=l.traveller,p=l.ariaLabel,x=l.data,y=l.startIndex,w=l.endIndex,_=Math.max(r,this.props.x),C=Oj(Oj({},bn(this.props,!1)),{},{x:_,y:u,width:c,height:d}),O=p||"Min value: ".concat((i=x[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=x[w])===null||a===void 0?void 0:a.name);return J.createElement(Er,{tabIndex:0,role:"slider","aria-label":O,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(R){["ArrowLeft","ArrowRight"].includes(R.key)&&(R.preventDefault(),R.stopPropagation(),s.handleTravellerMoveKeyboard(R.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,C))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(r,o)+u,d=Math.max(Math.abs(o-r)-u,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,c=this.state,d=c.startX,h=c.endX,p=5,x={pointerEvents:"none",fill:u};return J.createElement(Er,{className:"recharts-brush-texts"},J.createElement(WC,dO({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:a+s/2},x),this.getTextOfTick(o)),J.createElement(WC,dO({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+p,y:a+s/2},x),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,u=r.width,c=r.height,d=r.alwaysShowText,h=this.state,p=h.startX,x=h.endX,y=h.isTextActive,w=h.isSlideMoving,_=h.isTravellerMoving,C=h.isTravellerFocused;if(!o||!o.length||!it(s)||!it(l)||!it(u)||!it(c)||u<=0||c<=0)return null;var O=Dn("recharts-brush",i),P=J.Children.count(a)===1,R=GGe("userSelect","none");return J.createElement(Er,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:R},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,x),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(x,"endX"),(y||w||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,u=Math.floor(i+s/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),J.createElement("line",{x1:o+1,y1:u,x2:o+a-1,y2:u,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:o+1,y1:u+2,x2:o+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return J.isValidElement(r)?i=J.cloneElement(r,o):gn(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,c=r.startIndex,d=r.endIndex;if(i!==o.prevData||u!==o.prevUpdateId)return Oj({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a},i&&i.length?tKe({data:i,width:a,x:s,travellerWidth:l,startIndex:c,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var h=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])})(b.PureComponent);Qa(Cy,"displayName","Brush");Qa(Cy,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Rj,JH;function nKe(){if(JH)return Rj;JH=1;var e=O$();function t(n,r){var o;return e(n,function(i,a,s){return o=r(i,a,s),!o}),!!o}return Rj=t,Rj}var Pj,eG;function rKe(){if(eG)return Pj;eG=1;var e=Rie(),t=lh(),n=nKe(),r=Da(),o=ZR();function i(a,s,l){var u=r(a)?e:n;return l&&o(a,s,l)&&(s=void 0),u(a,t(s,3))}return Pj=i,Pj}var oKe=rKe();const iKe=Ln(oKe);var Xu=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},Tj,tG;function aKe(){if(tG)return Tj;tG=1;var e=Wie();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Tj=t,Tj}var Aj,nG;function sKe(){if(nG)return Aj;nG=1;var e=aKe(),t=Uie(),n=lh();function r(o,i){var a={};return i=n(i,3),t(o,function(s,l,u){e(a,l,i(s,l,u))}),a}return Aj=r,Aj}var lKe=sKe();const uKe=Ln(lKe);var kj,rG;function cKe(){if(rG)return kj;rG=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xKe(e,t){var n=e.x,r=e.y,o=yKe(e,pKe),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||o.height),c=parseInt(u,10),d="".concat(t.width||o.width),h=parseInt(d,10);return Z1(Z1(Z1(Z1(Z1({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function sG(e){return J.createElement(NGe,n3({shapeType:"rectangle",propTransformer:xKe,activeClassName:"recharts-active-bar"},e))}var bKe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=it(r)||a6e(r);return i?t(r,o):(i||Cr(!1),n)}},SKe=["value","background"],yse;function Oy(e){"@babel/helpers - typeof";return Oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oy(e)}function _Ke(e,t){if(e==null)return{};var n=EKe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pO(){return pO=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(D)0&&(H=Math.min((ae||0)-(D[fe-1]||0),H))}),Number.isFinite(H)){var W=H/K,q=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(k=W*q/2),y.padding==="no-gap"){var Y=gm(t.barCategoryGap,W*q),U=W*q/2;k=U-Y-(U-Y)/q*Y}}}o==="xAxis"?M=[r.left+(O.left||0)+(k||0),r.left+r.width-(O.right||0)-(k||0)]:o==="yAxis"?M=l==="horizontal"?[r.top+r.height-(O.bottom||0),r.top+(O.top||0)]:[r.top+(O.top||0)+(k||0),r.top+r.height-(O.bottom||0)-(k||0)]:M=y.range,R&&(M=[M[1],M[0]]);var V=KUe(y,i,h),G=V.scale,z=V.realScaleType;G.domain(_).range(M),YUe(G);var X=rVe(G,Ol(Ol({},y),{},{realScaleType:z}));o==="xAxis"?(L=w==="top"&&!P||w==="bottom"&&P,j=r.left,$=d[T]-L*y.height):o==="yAxis"&&(L=w==="left"&&!P||w==="right"&&P,j=d[T]-L*y.width,$=r.top);var ee=Ol(Ol(Ol({},y),X),{},{realScaleType:z,x:j,y:$,scale:G,width:o==="xAxis"?r.width:y.width,height:o==="yAxis"?r.height:y.height});return ee.bandSize=nO(ee,X),!y.hide&&o==="xAxis"?d[T]+=(L?-1:1)*ee.height:y.hide||(d[T]+=(L?-1:1)*ee.width),Ol(Ol({},p),{},dP({},x,ee))},{})},Sse=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},IKe=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return Sse({x:n,y:r},{x:o,y:i})},_se=(function(){function e(t){NKe(this,e),this.scale=t}return MKe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])})();dP(_se,"EPS",1e-4);var J$=function(t){var n=Object.keys(t).reduce(function(r,o){return Ol(Ol({},r),{},dP({},o,_se.create(t[o])))},{});return Ol(Ol({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return uKe(o,function(l,u){return n[u].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return vse(o,function(i,a){return n[a].isInRange(i)})}})};function DKe(e){return(e%180+180)%180}var LKe=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=DKe(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?l[u?i[c]:c]:void 0}}return jj=r,jj}var Ij,hG;function FKe(){if(hG)return Ij;hG=1;var e=hse();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return Ij=t,Ij}var Dj,pG;function BKe(){if(pG)return Dj;pG=1;var e=$ie(),t=lh(),n=FKe(),r=Math.max;function o(i,a,s){var l=i==null?0:i.length;if(!l)return-1;var u=s==null?0:n(s);return u<0&&(u=r(l+u,0)),e(i,t(a,3),u)}return Dj=o,Dj}var Lj,mG;function zKe(){if(mG)return Lj;mG=1;var e=$Ke(),t=BKe(),n=e(t);return Lj=n,Lj}var qKe=zKe();const UKe=Ln(qKe);var VKe=Joe();const WKe=Ln(VKe);var HKe=WKe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),e8=b.createContext(void 0),t8=b.createContext(void 0),Ese=b.createContext(void 0),Cse=b.createContext({}),Ose=b.createContext(void 0),Rse=b.createContext(0),Pse=b.createContext(0),gG=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,u=t.height,c=HKe(i);return J.createElement(e8.Provider,{value:r},J.createElement(t8.Provider,{value:o},J.createElement(Cse.Provider,{value:i},J.createElement(Ese.Provider,{value:c},J.createElement(Ose.Provider,{value:a},J.createElement(Rse.Provider,{value:u},J.createElement(Pse.Provider,{value:l},s)))))))},GKe=function(){return b.useContext(Ose)},Tse=function(t){var n=b.useContext(e8);n==null&&Cr(!1);var r=n[t];return r==null&&Cr(!1),r},KKe=function(){var t=b.useContext(e8);return bd(t)},YKe=function(){var t=b.useContext(t8),n=UKe(t,function(r){return vse(r.domain,Number.isFinite)});return n||bd(t)},Ase=function(t){var n=b.useContext(t8);n==null&&Cr(!1);var r=n[t];return r==null&&Cr(!1),r},XKe=function(){var t=b.useContext(Ese);return t},QKe=function(){return b.useContext(Cse)},n8=function(){return b.useContext(Pse)},r8=function(){return b.useContext(Rse)};function Ry(e){"@babel/helpers - typeof";return Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ry(e)}function ZKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JKe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function jYe(e,t){return Lse(e,t+1)}function IYe(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,c=a,d=function(){var x=r==null?void 0:r[l];if(x===void 0)return{v:Lse(r,u)};var y=l,w,_=function(){return w===void 0&&(w=n(x,y)),w},C=x.coordinate,O=l===0||wO(e,C,_,c,s);O||(l=0,c=a,u+=1),O&&(c=C+e*(_()/2+o),l+=u)},h;u<=i.length;)if(h=d(),h)return h.v;return[]}function Mx(e){"@babel/helpers - typeof";return Mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mx(e)}function EG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Si(e){for(var t=1;t0?p.coordinate-w*e:p.coordinate})}else i[h]=p=Si(Si({},p),{},{tickCoord:p.coordinate});var _=wO(e,p.tickCoord,y,s,l);_&&(l=p.tickCoord-e*(y()/2+o),i[h]=Si(Si({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)u(c);return i}function BYe(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(i){var c=r[s-1],d=n(c,s-1),h=e*(c.coordinate+e*d/2-u);a[s-1]=c=Si(Si({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=wO(e,c.tickCoord,function(){return d},l,u);p&&(u=c.tickCoord-e*(d/2+o),a[s-1]=Si(Si({},c),{},{isShow:!0}))}for(var x=i?s-1:s,y=function(C){var O=a[C],P,R=function(){return P===void 0&&(P=n(O,C)),P};if(C===0){var T=e*(O.coordinate-e*R()/2-l);a[C]=O=Si(Si({},O),{},{tickCoord:T<0?O.coordinate-T*e:O.coordinate})}else a[C]=O=Si(Si({},O),{},{tickCoord:O.coordinate});var k=wO(e,O.tickCoord,R,l,u);k&&(l=O.tickCoord+e*(R()/2+o),a[C]=Si(Si({},O),{},{isShow:!0}))},w=0;w=2?Il(o[1].coordinate-o[0].coordinate):1,_=MYe(i,w,p);return l==="equidistantPreserveStart"?IYe(w,_,y,o,a):(l==="preserveStart"||l==="preserveStartEnd"?h=BYe(w,_,y,o,a,l==="preserveStartEnd"):h=FYe(w,_,y,o,a),h.filter(function(C){return C.isShow}))}var zYe=["viewBox"],qYe=["viewBox"],UYe=["ticks"];function Ay(e){"@babel/helpers - typeof";return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ay(e)}function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function WYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OG(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!x||!x.length?null:J.createElement(Er,{className:Dn("recharts-cartesian-axis",u),ref:function(w){r.layerReference=w}},i&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),Ci.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a,s=Dn(o.className,"recharts-cartesian-axis-tick-value");return J.isValidElement(r)?a=J.cloneElement(r,Eo(Eo({},o),{},{className:s})):gn(r)?a=r(Eo(Eo({},o),{},{className:s})):a=J.createElement(WC,vv({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])})(b.Component);s8(f0,"displayName","CartesianAxis");s8(f0,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var ZYe=["x1","y1","x2","y2","key"],JYe=["offset"];function ym(e){"@babel/helpers - typeof";return ym=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ym(e)}function RG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var oXe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return J.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Bse(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(gn(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=PG(t,ZYe),u=bn(l,!1);u.offset;var c=PG(u,JYe);n=J.createElement("line",Ap({},c,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function iXe(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var u=Oi(Oi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Bse(o,u)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function aXe(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var u=Oi(Oi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Bse(o,u)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function sXe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var d=c.map(function(h,p){var x=!c[p+1],y=x?o+a-h:c[p+1]-h;if(y<=0)return null;var w=p%t.length;return J.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:y,width:i,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function lXe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var c=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var d=c.map(function(h,p){var x=!c[p+1],y=x?i+s-h:c[p+1]-h;if(y<=0)return null;var w=p%r.length;return J.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:y,height:l,stroke:"none",fill:r[w],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var uXe=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return ese(a8(Oi(Oi(Oi({},f0.defaultProps),r),{},{ticks:rf(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},cXe=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return ese(a8(Oi(Oi(Oi({},f0.defaultProps),r),{},{ticks:rf(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},sv={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function l8(e){var t,n,r,o,i,a,s=n8(),l=r8(),u=QKe(),c=Oi(Oi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:sv.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:sv.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:sv.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:sv.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:sv.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:sv.verticalFill,x:it(e.x)?e.x:u.left,y:it(e.y)?e.y:u.top,width:it(e.width)?e.width:u.width,height:it(e.height)?e.height:u.height}),d=c.x,h=c.y,p=c.width,x=c.height,y=c.syncWithTicks,w=c.horizontalValues,_=c.verticalValues,C=KKe(),O=YKe();if(!it(p)||p<=0||!it(x)||x<=0||!it(d)||d!==+d||!it(h)||h!==+h)return null;var P=c.verticalCoordinatesGenerator||uXe,R=c.horizontalCoordinatesGenerator||cXe,T=c.horizontalPoints,k=c.verticalPoints;if((!T||!T.length)&&gn(R)){var M=w&&w.length,j=R({yAxis:O?Oi(Oi({},O),{},{ticks:M?w:O.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);sf(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ym(j),"]")),Array.isArray(j)&&(T=j)}if((!k||!k.length)&&gn(P)){var $=_&&_.length,L=P({xAxis:C?Oi(Oi({},C),{},{ticks:$?_:C.ticks}):void 0,width:s,height:l,offset:u},$?!0:y);sf(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ym(L),"]")),Array.isArray(L)&&(k=L)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(oXe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),J.createElement(iXe,Ap({},c,{offset:u,horizontalPoints:T,xAxis:C,yAxis:O})),J.createElement(aXe,Ap({},c,{offset:u,verticalPoints:k,xAxis:C,yAxis:O})),J.createElement(sXe,Ap({},c,{horizontalPoints:T})),J.createElement(lXe,Ap({},c,{verticalPoints:k})))}l8.displayName="CartesianGrid";var fXe=["type","layout","connectNulls","ref"],dXe=["key"];function ky(e){"@babel/helpers - typeof";return ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ky(e)}function TG(e,t){if(e==null)return{};var n=hXe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(lv(l.slice(0,x)),[d-y]);break}var w=p.length%2===0?[0,h]:[h];return[].concat(lv(t.repeat(l,c)),lv(p),w).map(function(_){return"".concat(_,"px")}).join(", ")}),Rl(n,"id",s0("recharts-line-")),Rl(n,"pathRef",function(a){n.mainCurve=a}),Rl(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Rl(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return _Xe(t,e),wXe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,d=Us(c,Db);if(!d)return null;var h=function(y,w){return{x:y.x,y:y.y,value:y.value,errorVal:ea(y.payload,w)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(Er,p,d.map(function(x){return J.cloneElement(x,{key:"bar-".concat(x.props.dataKey),data:a,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,d=bn(this.props,!1),h=bn(l,!0),p=u.map(function(y,w){var _=Xa(Xa(Xa({key:"dot-".concat(w),r:3},d),h),{},{index:w,cx:y.x,cy:y.y,value:y.value,dataKey:c,payload:y.payload,points:u});return t.renderDotItem(l,_)}),x={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(Er,Nw({className:"recharts-line-dots",key:"dots"},x),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var d=TG(s,fXe),h=Xa(Xa(Xa({},bn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:u,connectNulls:c});return J.createElement(Mv,Nw({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,u=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,h=a.animationEasing,p=a.animationId,x=a.animateNewValues,y=a.width,w=a.height,_=this.state,C=_.prevPoints,O=_.totalLength;return J.createElement(nc,{begin:c,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var R=P.t;if(C){var T=C.length/s.length,k=s.map(function(K,H){var D=Math.floor(H*T);if(C[D]){var W=C[D],q=ni(W.x,K.x),Y=ni(W.y,K.y);return Xa(Xa({},K),{},{x:q(R),y:Y(R)})}if(x){var U=ni(y*2,K.x),V=ni(w/2,K.y);return Xa(Xa({},K),{},{x:U(R),y:V(R)})}return Xa(Xa({},K),{},{x:K.x,y:K.y})});return i.renderCurveStatically(k,r,o)}var M=ni(0,O),j=M(R),$;if(l){var L="".concat(l).split(/[,\s]+/gim).map(function(K){return parseFloat(K)});$=i.getStrokeDasharray(j,O,L)}else $=i.generateSimpleStrokeDasharray(O,j);return i.renderCurveStatically(s,r,o,{strokeDasharray:$})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&a&&a.length&&(!u&&c>0||!by(u,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,u=o.xAxis,c=o.yAxis,d=o.top,h=o.left,p=o.width,x=o.height,y=o.isAnimationActive,w=o.id;if(i||!s||!s.length)return null;var _=this.state.isAnimationFinished,C=s.length===1,O=Dn("recharts-line",l),P=u&&u.allowDataOverflow,R=c&&c.allowDataOverflow,T=P||R,k=Pn(w)?this.id:w,M=(r=bn(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},j=M.r,$=j===void 0?3:j,L=M.strokeWidth,K=L===void 0?2:L,H=oie(a)?a:{},D=H.clipDot,W=D===void 0?!0:D,q=$*2+K;return J.createElement(Er,{className:O},P||R?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(k)},J.createElement("rect",{x:P?h:h-p/2,y:R?d:d-x/2,width:P?p:p*2,height:R?x:x*2})),!W&&J.createElement("clipPath",{id:"clipPath-dots-".concat(k)},J.createElement("rect",{x:h-q/2,y:d-q/2,width:p+q,height:x+q}))):null,!C&&this.renderCurve(T,k),this.renderErrorBar(T,k),(C||a)&&this.renderDots(T,W,k),(!y||_)&&uf.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(lv(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!by(c,a)||!by(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,u=o.top,c=o.left,d=o.xAxis,h=o.yAxis,p=o.width,x=o.height,y=o.isAnimationActive,w=o.id;if(i||!s||!s.length)return null;var _=this.state.isAnimationFinished,C=s.length===1,O=Dn("recharts-area",l),P=d&&d.allowDataOverflow,R=h&&h.allowDataOverflow,T=P||R,k=Pn(w)?this.id:w,M=(r=bn(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},j=M.r,$=j===void 0?3:j,L=M.strokeWidth,K=L===void 0?2:L,H=oie(a)?a:{},D=H.clipDot,W=D===void 0?!0:D,q=$*2+K;return J.createElement(Er,{className:O},P||R?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(k)},J.createElement("rect",{x:P?c:c-p/2,y:R?u:u-x/2,width:P?p:p*2,height:R?x:x*2})),!W&&J.createElement("clipPath",{id:"clipPath-dots-".concat(k)},J.createElement("rect",{x:c-q/2,y:u-q/2,width:p+q,height:x+q}))):null,C?null:this.renderArea(T,k),(a||C)&&this.renderDots(T,W,k),(!y||_)&&uf.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(b.PureComponent);Use=dh;Wu(dh,"displayName","Area");Wu(dh,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Rm.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Wu(dh,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(it(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Wu(dh,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,d=e.displayedData,h=e.offset,p=t.layout,x=u&&u.length,y=Use.getBaseValue(t,n,r,o),w=p==="horizontal",_=!1,C=d.map(function(P,R){var T;x?T=u[c+R]:(T=ea(P,l),Array.isArray(T)?_=!0:T=[y,T]);var k=T[1]==null||x&&ea(P,l)==null;return w?{x:tO({axis:r,ticks:i,bandSize:s,entry:P,index:R}),y:k?null:o.scale(T[1]),value:T,payload:P}:{x:k?null:r.scale(T[1]),y:tO({axis:o,ticks:a,bandSize:s,entry:P,index:R}),value:T,payload:P}}),O;return x||_?O=C.map(function(P){var R=Array.isArray(P.value)?P.value[0]:null;return w?{x:P.x,y:R!=null&&P.y!=null?o.scale(R):null}:{x:R!=null?r.scale(R):null,y:P.y}}):O=w?o.scale(y):r.scale(y),pd({points:C,baseLine:O,layout:p,isRange:_},h)});Wu(dh,"renderDotItem",function(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(gn(e))n=e(t);else{var r=Dn("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=Vse(t,OXe);n=J.createElement(uP,kp({},i,{key:o,className:r}))}return n});function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}function IXe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DXe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Qe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CQe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&it(o)&&it(i)?t.slice(o,i+1):[]};function ile(e){return e==="number"?[0,"auto"]:void 0}var S3=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=gP(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,u){var c,d=(c=u.props.data)!==null&&c!==void 0?c:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;h=NC(p,a.dataKey,o)}else h=d&&d[r]||s[r];return h?[].concat(Dy(l),[nse(u,h)]):l},[])},BG=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=LQe(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=qUe(a,s,u,l);if(c>=0&&u){var d=u[c]&&u[c].value,h=S3(t,n,c,d),p=$Qe(r,s,c,i);return{activeTooltipIndex:c,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},FQe=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,h=t.stackOffset,p=Jae(c,i);return r.reduce(function(x,y){var w,_=y.type.defaultProps!==void 0?De(De({},y.type.defaultProps),y.props):y.props,C=_.type,O=_.dataKey,P=_.allowDataOverflow,R=_.allowDuplicatedCategory,T=_.scale,k=_.ticks,M=_.includeHidden,j=_[a];if(x[j])return x;var $=gP(t.data,{graphicalItems:o.filter(function(X){var ee,ae=a in X.props?X.props[a]:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee[a];return ae===j}),dataStartIndex:l,dataEndIndex:u}),L=$.length,K,H,D;fQe(_.domain,P,C)&&(K=F5(_.domain,null,P),p&&(C==="number"||T!=="auto")&&(D=Aw($,O,"category")));var W=ile(C);if(!K||K.length===0){var q,Y=(q=_.domain)!==null&&q!==void 0?q:W;if(O){if(K=Aw($,O,C),C==="category"&&p){var U=l6e(K);R&&U?(H=K,K=fO(0,L)):R||(K=YW(Y,K,y).reduce(function(X,ee){return X.indexOf(ee)>=0?X:[].concat(Dy(X),[ee])},[]))}else if(C==="category")R?K=K.filter(function(X){return X!==""&&!Pn(X)}):K=YW(Y,K,y).reduce(function(X,ee){return X.indexOf(ee)>=0||ee===""||Pn(ee)?X:[].concat(Dy(X),[ee])},[]);else if(C==="number"){var V=GUe($,o.filter(function(X){var ee,ae,fe=a in X.props?X.props[a]:(ee=X.type.defaultProps)===null||ee===void 0?void 0:ee[a],ie="hide"in X.props?X.props.hide:(ae=X.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return fe===j&&(M||!ie)}),O,i,c);V&&(K=V)}p&&(C==="number"||T!=="auto")&&(D=Aw($,O,"category"))}else p?K=fO(0,L):s&&s[j]&&s[j].hasStack&&C==="number"?K=h==="expand"?[0,1]:tse(s[j].stackGroups,l,u):K=Zae($,o.filter(function(X){var ee=a in X.props?X.props[a]:X.type.defaultProps[a],ae="hide"in X.props?X.props.hide:X.type.defaultProps.hide;return ee===j&&(M||!ae)}),C,c,!0);if(C==="number")K=w3(d,K,j,i,k),Y&&(K=F5(Y,K,P));else if(C==="category"&&Y){var G=Y,z=K.every(function(X){return G.indexOf(X)>=0});z&&(K=G)}}return De(De({},x),{},tn({},j,De(De({},_),{},{axisType:i,domain:K,categoricalDomain:D,duplicateDomain:H,originalDomain:(w=_.domain)!==null&&w!==void 0?w:W,isCategorical:p,layout:c})))},{})},BQe=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.layout,d=t.children,h=gP(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),p=h.length,x=Jae(c,i),y=-1;return r.reduce(function(w,_){var C=_.type.defaultProps!==void 0?De(De({},_.type.defaultProps),_.props):_.props,O=C[a],P=ile("number");if(!w[O]){y++;var R;return x?R=fO(0,p):s&&s[O]&&s[O].hasStack?(R=tse(s[O].stackGroups,l,u),R=w3(d,R,O,i)):(R=F5(P,Zae(h,r.filter(function(T){var k,M,j=a in T.props?T.props[a]:(k=T.type.defaultProps)===null||k===void 0?void 0:k[a],$="hide"in T.props?T.props.hide:(M=T.type.defaultProps)===null||M===void 0?void 0:M.hide;return j===O&&!$}),"number",c),o.defaultProps.allowDataOverflow),R=w3(d,R,O,i)),De(De({},w),{},tn({},O,De(De({axisType:i},o.defaultProps),{},{hide:!0,orientation:qs(IQe,"".concat(i,".").concat(y%2),null),domain:R,originalDomain:P,isCategorical:x,layout:c})))}return w},{})},zQe=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,c=t.children,d="".concat(o,"Id"),h=Us(c,i),p={};return h&&h.length?p=FQe(t,{axes:h,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(p=BQe(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},qQe=function(t){var n=bd(t),r=rf(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:R$(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:nO(n,r)}},zG=function(t){var n=t.children,r=t.defaultShowTooltip,o=Ja(n,Cy),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},UQe=function(t){return!t||!t.length?!1:t.some(function(n){var r=af(n&&n.type);return r&&r.indexOf("Bar")>=0})},qG=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},VQe=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,c=r.height,d=r.children,h=r.margin||{},p=Ja(d,Cy),x=Ja(d,kv),y=Object.keys(l).reduce(function(R,T){var k=l[T],M=k.orientation;return!k.mirror&&!k.hide?De(De({},R),{},tn({},M,R[M]+k.width)):R},{left:h.left||0,right:h.right||0}),w=Object.keys(a).reduce(function(R,T){var k=a[T],M=k.orientation;return!k.mirror&&!k.hide?De(De({},R),{},tn({},M,qs(R,"".concat(M))+k.height)):R},{top:h.top||0,bottom:h.bottom||0}),_=De(De({},w),y),C=_.bottom;p&&(_.bottom+=p.props.height||Cy.defaultProps.height),x&&n&&(_=WUe(_,o,r,n));var O=u-_.left-_.right,P=c-_.top-_.bottom;return De(De({brushBottom:C},_),{},{width:Math.max(O,0),height:Math.max(P,0)})},WQe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},u8=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,d=t.defaultProps,h=function(_,C){var O=C.graphicalItems,P=C.stackGroups,R=C.offset,T=C.updateId,k=C.dataStartIndex,M=C.dataEndIndex,j=_.barSize,$=_.layout,L=_.barGap,K=_.barCategoryGap,H=_.maxBarSize,D=qG($),W=D.numericAxisName,q=D.cateAxisName,Y=UQe(O),U=[];return O.forEach(function(V,G){var z=gP(_.data,{graphicalItems:[V],dataStartIndex:k,dataEndIndex:M}),X=V.type.defaultProps!==void 0?De(De({},V.type.defaultProps),V.props):V.props,ee=X.dataKey,ae=X.maxBarSize,fe=X["".concat(W,"Id")],ie=X["".concat(q,"Id")],we={},de=l.reduce(function(un,on){var oe=C["".concat(on.axisType,"Map")],he=X["".concat(on.axisType,"Id")];oe&&oe[he]||on.axisType==="zAxis"||Cr(!1);var Se=oe[he];return De(De({},un),{},tn(tn({},on.axisType,Se),"".concat(on.axisType,"Ticks"),rf(Se)))},we),se=de[q],ye=de["".concat(q,"Ticks")],Te=P&&P[fe]&&P[fe].hasStack&&iVe(V,P[fe].stackGroups),ge=af(V.type).indexOf("Bar")>=0,Be=nO(se,ye),Ie=[],Ve=Y&&UUe({barSize:j,stackGroups:P,totalSize:WQe(de,q)});if(ge){var ht,lt,Ye=Pn(ae)?H:ae,Kt=(ht=(lt=nO(se,ye,!0))!==null&<!==void 0?lt:Ye)!==null&&ht!==void 0?ht:0;Ie=VUe({barGap:L,barCategoryGap:K,bandSize:Kt!==Be?Kt:Be,sizeList:Ve[ie],maxBarSize:Ye}),Kt!==Be&&(Ie=Ie.map(function(un){return De(De({},un),{},{position:De(De({},un.position),{},{offset:un.position.offset-Kt/2})})}))}var vn=V&&V.type&&V.type.getComposedData;vn&&U.push({props:De(De({},vn(De(De({},de),{},{displayedData:z,props:_,dataKey:ee,item:V,bandSize:Be,barPosition:Ie,offset:R,stackedData:Te,layout:$,dataStartIndex:k,dataEndIndex:M}))),{},tn(tn(tn({key:V.key||"item-".concat(G)},W,de[W]),q,de[q]),"animationId",T)),childIndex:x6e(V,_.children),item:V})}),U},p=function(_,C){var O=_.props,P=_.dataStartIndex,R=_.dataEndIndex,T=_.updateId;if(!wq({props:O}))return null;var k=O.children,M=O.layout,j=O.stackOffset,$=O.data,L=O.reverseStackOrder,K=qG(M),H=K.numericAxisName,D=K.cateAxisName,W=Us(k,r),q=nVe($,W,"".concat(H,"Id"),"".concat(D,"Id"),j,L),Y=l.reduce(function(X,ee){var ae="".concat(ee.axisType,"Map");return De(De({},X),{},tn({},ae,zQe(O,De(De({},ee),{},{graphicalItems:W,stackGroups:ee.axisType===H&&q,dataStartIndex:P,dataEndIndex:R}))))},{}),U=VQe(De(De({},Y),{},{props:O,graphicalItems:W}),C==null?void 0:C.legendBBox);Object.keys(Y).forEach(function(X){Y[X]=c(O,Y[X],U,X.replace("Map",""),n)});var V=Y["".concat(D,"Map")],G=qQe(V),z=h(O,De(De({},Y),{},{dataStartIndex:P,dataEndIndex:R,updateId:T,graphicalItems:W,stackGroups:q,offset:U}));return De(De({formattedGraphicalItems:z,graphicalItems:W,offset:U,stackGroups:q},G),Y)},x=(function(w){function _(C){var O,P,R;return EQe(this,_),R=RQe(this,_,[C]),tn(R,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),tn(R,"accessibilityManager",new cQe),tn(R,"handleLegendBBoxUpdate",function(T){if(T){var k=R.state,M=k.dataStartIndex,j=k.dataEndIndex,$=k.updateId;R.setState(De({legendBBox:T},p({props:R.props,dataStartIndex:M,dataEndIndex:j,updateId:$},De(De({},R.state),{},{legendBBox:T}))))}}),tn(R,"handleReceiveSyncEvent",function(T,k,M){if(R.props.syncId===T){if(M===R.eventEmitterSymbol&&typeof R.props.syncMethod!="function")return;R.applySyncEvent(k)}}),tn(R,"handleBrushChange",function(T){var k=T.startIndex,M=T.endIndex;if(k!==R.state.dataStartIndex||M!==R.state.dataEndIndex){var j=R.state.updateId;R.setState(function(){return De({dataStartIndex:k,dataEndIndex:M},p({props:R.props,dataStartIndex:k,dataEndIndex:M,updateId:j},R.state))}),R.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),tn(R,"handleMouseEnter",function(T){var k=R.getMouseInfo(T);if(k){var M=De(De({},k),{},{isTooltipActive:!0});R.setState(M),R.triggerSyncEvent(M);var j=R.props.onMouseEnter;gn(j)&&j(M,T)}}),tn(R,"triggeredAfterMouseMove",function(T){var k=R.getMouseInfo(T),M=k?De(De({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};R.setState(M),R.triggerSyncEvent(M);var j=R.props.onMouseMove;gn(j)&&j(M,T)}),tn(R,"handleItemMouseEnter",function(T){R.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),tn(R,"handleItemMouseLeave",function(){R.setState(function(){return{isTooltipActive:!1}})}),tn(R,"handleMouseMove",function(T){T.persist(),R.throttleTriggeredAfterMouseMove(T)}),tn(R,"handleMouseLeave",function(T){R.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};R.setState(k),R.triggerSyncEvent(k);var M=R.props.onMouseLeave;gn(M)&&M(k,T)}),tn(R,"handleOuterEvent",function(T){var k=w6e(T),M=qs(R.props,"".concat(k));if(k&&gn(M)){var j,$;/.*touch.*/i.test(k)?$=R.getMouseInfo(T.changedTouches[0]):$=R.getMouseInfo(T),M((j=$)!==null&&j!==void 0?j:{},T)}}),tn(R,"handleClick",function(T){var k=R.getMouseInfo(T);if(k){var M=De(De({},k),{},{isTooltipActive:!0});R.setState(M),R.triggerSyncEvent(M);var j=R.props.onClick;gn(j)&&j(M,T)}}),tn(R,"handleMouseDown",function(T){var k=R.props.onMouseDown;if(gn(k)){var M=R.getMouseInfo(T);k(M,T)}}),tn(R,"handleMouseUp",function(T){var k=R.props.onMouseUp;if(gn(k)){var M=R.getMouseInfo(T);k(M,T)}}),tn(R,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),tn(R,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.handleMouseDown(T.changedTouches[0])}),tn(R,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&R.handleMouseUp(T.changedTouches[0])}),tn(R,"handleDoubleClick",function(T){var k=R.props.onDoubleClick;if(gn(k)){var M=R.getMouseInfo(T);k(M,T)}}),tn(R,"handleContextMenu",function(T){var k=R.props.onContextMenu;if(gn(k)){var M=R.getMouseInfo(T);k(M,T)}}),tn(R,"triggerSyncEvent",function(T){R.props.syncId!==void 0&&Bj.emit(zj,R.props.syncId,T,R.eventEmitterSymbol)}),tn(R,"applySyncEvent",function(T){var k=R.props,M=k.layout,j=k.syncMethod,$=R.state.updateId,L=T.dataStartIndex,K=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)R.setState(De({dataStartIndex:L,dataEndIndex:K},p({props:R.props,dataStartIndex:L,dataEndIndex:K,updateId:$},R.state)));else if(T.activeTooltipIndex!==void 0){var H=T.chartX,D=T.chartY,W=T.activeTooltipIndex,q=R.state,Y=q.offset,U=q.tooltipTicks;if(!Y)return;if(typeof j=="function")W=j(U,T);else if(j==="value"){W=-1;for(var V=0;V=0){var Te,ge;if(H.dataKey&&!H.allowDuplicatedCategory){var Be=typeof H.dataKey=="function"?ye:"payload.".concat(H.dataKey.toString());Te=NC(V,Be,W),ge=G&&z&&NC(z,Be,W)}else Te=V==null?void 0:V[D],ge=G&&z&&z[D];if(ie||fe){var Ie=T.props.activeIndex!==void 0?T.props.activeIndex:D;return[b.cloneElement(T,De(De(De({},j.props),de),{},{activeIndex:Ie})),null,null]}if(!Pn(Te))return[se].concat(Dy(R.renderActivePoints({item:j,activePoint:Te,basePoint:ge,childIndex:D,isRange:G})))}else{var Ve,ht=(Ve=R.getItemByXY(R.state.activeCoordinate))!==null&&Ve!==void 0?Ve:{graphicalItem:se},lt=ht.graphicalItem,Ye=lt.item,Kt=Ye===void 0?T:Ye,vn=lt.childIndex,un=De(De(De({},j.props),de),{},{activeIndex:vn});return[b.cloneElement(Kt,un),null,null]}return G?[se,null,null]:[se,null]}),tn(R,"renderCustomized",function(T,k,M){return b.cloneElement(T,De(De({key:"recharts-customized-".concat(M)},R.props),R.state))}),tn(R,"renderMap",{CartesianGrid:{handler:G_,once:!0},ReferenceArea:{handler:R.renderReferenceElement},ReferenceLine:{handler:G_},ReferenceDot:{handler:R.renderReferenceElement},XAxis:{handler:G_},YAxis:{handler:G_},Brush:{handler:R.renderBrush,once:!0},Bar:{handler:R.renderGraphicChild},Line:{handler:R.renderGraphicChild},Area:{handler:R.renderGraphicChild},Radar:{handler:R.renderGraphicChild},RadialBar:{handler:R.renderGraphicChild},Scatter:{handler:R.renderGraphicChild},Pie:{handler:R.renderGraphicChild},Funnel:{handler:R.renderGraphicChild},Tooltip:{handler:R.renderCursor,once:!0},PolarGrid:{handler:R.renderPolarGrid,once:!0},PolarAngleAxis:{handler:R.renderPolarAxis},PolarRadiusAxis:{handler:R.renderPolarAxis},Customized:{handler:R.renderCustomized}}),R.clipPathId="".concat((O=C.id)!==null&&O!==void 0?O:s0("recharts"),"-clip"),R.throttleTriggeredAfterMouseMove=Qie(R.triggeredAfterMouseMove,(P=C.throttleDelay)!==null&&P!==void 0?P:1e3/60),R.state={},R}return AQe(_,w),OQe(_,[{key:"componentDidMount",value:function(){var O,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var O=this.props,P=O.children,R=O.data,T=O.height,k=O.layout,M=Ja(P,Du);if(M){var j=M.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,L=S3(this.state,R,j,$),K=this.state.tooltipTicks[j].coordinate,H=(this.state.offset.top+T)/2,D=k==="horizontal",W=D?{x:K,y:H}:{y:K,x:H},q=this.state.formattedGraphicalItems.find(function(U){var V=U.item;return V.type.name==="Scatter"});q&&(W=De(De({},W),q.props.points[j].tooltipPosition),L=q.props.points[j].tooltipPayload);var Y={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:$,activePayload:L,activeCoordinate:W};this.setState(Y),this.renderCursor(M),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(O,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==O.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==O.margin){var R,T;this.accessibilityManager.setDetails({offset:{left:(R=this.props.margin.left)!==null&&R!==void 0?R:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(O){s5([Ja(O.children,Du)],[Ja(this.props.children,Du)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var O=Ja(this.props.children,Du);if(O&&typeof O.props.shared=="boolean"){var P=O.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(O){if(!this.container)return null;var P=this.container,R=P.getBoundingClientRect(),T=aBe(R),k={chartX:Math.round(O.pageX-T.left),chartY:Math.round(O.pageY-T.top)},M=R.width/P.offsetWidth||1,j=this.inRange(k.chartX,k.chartY,M);if(!j)return null;var $=this.state,L=$.xAxisMap,K=$.yAxisMap,H=this.getTooltipEventType(),D=BG(this.state,this.props.data,this.props.layout,j);if(H!=="axis"&&L&&K){var W=bd(L).scale,q=bd(K).scale,Y=W&&W.invert?W.invert(k.chartX):null,U=q&&q.invert?q.invert(k.chartY):null;return De(De({},k),{},{xValue:Y,yValue:U},D)}return D?De(De({},k),D):null}},{key:"inRange",value:function(O,P){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,k=O/R,M=P/R;if(T==="horizontal"||T==="vertical"){var j=this.state.offset,$=k>=j.left&&k<=j.left+j.width&&M>=j.top&&M<=j.top+j.height;return $?{x:k,y:M}:null}var L=this.state,K=L.angleAxisMap,H=L.radiusAxisMap;if(K&&H){var D=bd(K);return ZW({x:k,y:M},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var O=this.props.children,P=this.getTooltipEventType(),R=Ja(O,Du),T={};R&&P==="axis"&&(R.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=MC(this.props,this.handleOuterEvent);return De(De({},k),T)}},{key:"addListener",value:function(){Bj.on(zj,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Bj.removeListener(zj,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(O,P,R){for(var T=this.state.formattedGraphicalItems,k=0,M=T.length;k");return e}const lle=b.forwardRef(({id:e,className:t,children:n,config:r,...o},i)=>{const a=b.useId(),s=`chart-${e||a.replace(/:/g,"")}`;return v.jsx(ale.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":s,ref:i,className:je("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[v.jsx(XQe,{id:s,config:r}),v.jsx(JR,{children:n})]})})});lle.displayName="Chart";const XQe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?v.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(YQe).map(([r,o])=>` -${o} [data-chart=${e}] { -${n.map(([i,a])=>{var l;const s=((l=a.theme)==null?void 0:l[r])||a.color;return s?` --color-${i}: ${s};`:null}).join(` -`)} -} -`).join(` -`)}}):null},c8=Du,vP=b.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:c,nameKey:d,labelKey:h},p)=>{const{config:x}=sle(),y=b.useMemo(()=>{var R;if(o||!(t!=null&&t.length))return null;const[_]=t,C=`${h||_.dataKey||_.name||"value"}`,O=_3(x,_,C),P=!h&&typeof a=="string"?((R=x[a])==null?void 0:R.label)||a:O==null?void 0:O.label;return s?v.jsx("div",{className:je("font-medium",l),children:s(P,t)}):P?v.jsx("div",{className:je("font-medium",l),children:P}):null},[a,s,t,o,l,x,h]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return v.jsxs("div",{ref:p,className:je("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:y,v.jsx("div",{className:"grid gap-1.5",children:t.map((_,C)=>{const O=`${d||_.name||_.dataKey||"value"}`,P=_3(x,_,O),R=c||_.payload.fill||_.color;return v.jsx("div",{className:je("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:u&&(_==null?void 0:_.value)!==void 0&&_.name?u(_.value,_.name,_,C,_.payload):v.jsxs(v.Fragment,{children:[P!=null&&P.icon?v.jsx(P.icon,{}):!i&&v.jsx("div",{className:je("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),v.jsxs("div",{className:je("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[v.jsxs("div",{className:"grid gap-1.5",children:[w?y:null,v.jsx("span",{className:"text-muted-foreground",children:(P==null?void 0:P.label)||_.name})]}),_.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:_.value.toLocaleString()})]})]})},_.dataKey)})})]})});vP.displayName="ChartTooltip";const QQe=b.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:o},i)=>{const{config:a}=sle();return n!=null&&n.length?v.jsx("div",{ref:i,className:je("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>{const l=`${o||s.dataKey||"value"}`,u=_3(a,s,l);return v.jsxs("div",{className:je("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!t?v.jsx(u.icon,{}):v.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),u==null?void 0:u.label]},s.value)})}):null});QQe.displayName="ChartLegend";function _3(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}const ZQe=(e,t)=>{var r;const n=t.findIndex(o=>o.date===e);if(n===-1)return null;if(n===t.length-1){const o=new Date(t[n].date),i=new Date(t[n-1].date),a=o.getTime()-i.getTime();return new Date(o.getTime()+a).toISOString()}return((r=t[n+1])==null?void 0:r.date)||e},JQe=(e,t)=>{var r;const n=t.findIndex(o=>o.date===e);if(n===-1)return e;if(n===0){const o=new Date(t[n].date),a=new Date(t[n+1].date).getTime()-o.getTime();return new Date(o.getTime()-a).toISOString()}return((r=t[n-1])==null?void 0:r.date)||e};function eZe({data:e,colors:t,zoom:n,showYAxis:r=!0,kind:o="bar",className:i}){const[a,s]=b.useState(null),[l,u]=b.useState(null),[c,d]=b.useState(null),[h,p]=b.useState(null),[x,y]=b.useState(!1),w=b.useRef(null),_=b.useMemo(()=>{const j=Object.keys(e[0]||{}).filter($=>$!=="date");return j.reduce(($,L,K)=>{let H=`hsl(${K*360/j.length}, 70%, 50%)`;return t&&t[L]&&(H=t[L]),K<5&&(H=`hsl(var(--chart-${K+1}))`),$[L]={label:BO(L),color:(t==null?void 0:t[L])||H},$},{})},[e,t]),C=j=>{j.activeLabel&&(s(j.activeLabel),d(JQe(j.activeLabel,e)),y(!0))},O=j=>{x&&j.activeLabel&&(u(j.activeLabel),p(ZQe(j.activeLabel,e)))},P=()=>{if(c&&h){const[j,$]=[c,h].sort();n==null||n(j,$)}s(null),d(null),u(null),p(null),y(!1)},R=new Date(Math.min(...e.map(j=>new Date(j.date).getTime()))),T=new Date(Math.max(...e.map(j=>new Date(j.date).getTime()))),k=j=>{const $=new Date(j),L=T.getTime()-R.getTime(),K=1440*60*1e3,H=7*K;return L>H?$.toLocaleDateString([],{month:"short",day:"numeric"}):L>K?`${$.toLocaleDateString([],{month:"short",day:"numeric"})} ${$.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:$.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},M=Object.keys(e[0]||{}).filter(j=>j!=="date");return v.jsx(lle,{config:_,className:je("h-[200px] min-h-[200px] w-full",i),children:v.jsx("div",{className:"h-full",ref:w,style:{touchAction:"none"},children:tZe(o,{data:e,showYAxis:r,formatXAxis:k,handleMouseDown:C,handleMouseMove:O,handleMouseUp:P,refAreaLeft:a,refAreaRight:l,chartConfig:_,dataKeys:M})})})}function tZe(e,t){switch(e){case"bar":return v.jsx(nZe,{...t});case"line":return v.jsx(rZe,{...t});case"area":return v.jsx(oZe,{...t})}}function nZe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(JR,{width:"100%",height:"100%",children:v.jsxs(GQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(l8,{vertical:!1}),v.jsx(hh,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(ph,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(c8,{content:v.jsx(vP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(km,{type:"monotone",dataKey:c,stroke:l[c].color,fillOpacity:1,fill:l[c].color,isAnimationActive:!1},c)),a&&s&&v.jsx(Nm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function rZe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(JR,{width:"100%",height:"100%",children:v.jsxs(HQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(l8,{vertical:!1}),v.jsx(hh,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:16,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(ph,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(c8,{content:v.jsx(vP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(Lb,{type:"monotone",dot:!1,dataKey:c,stroke:l[c].color,fillOpacity:1,fill:l[c].color,isAnimationActive:!1},c)),a&&s&&v.jsx(Nm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function oZe({data:e,showYAxis:t=!0,formatXAxis:n,handleMouseDown:r,handleMouseMove:o,handleMouseUp:i,refAreaLeft:a,refAreaRight:s,chartConfig:l,dataKeys:u}){return v.jsx(JR,{width:"100%",height:"100%",children:v.jsxs(KQe,{data:e,margin:{left:0,right:0,top:0,bottom:0},onMouseDown:r,onMouseMove:o,onMouseUp:i,children:[v.jsx(hh,{dataKey:"date",tickFormatter:n,tickLine:!1,axisLine:!1,tickMargin:4,minTickGap:48,style:{fontSize:"10px",userSelect:"none"}}),t&&v.jsx(ph,{tickLine:!1,axisLine:!1,tickMargin:4,style:{fontSize:"10px",userSelect:"none"}}),v.jsx(c8,{content:v.jsx(vP,{className:"w-[150px] font-mono text-xs sm:w-[200px] sm:text-xs",labelFormatter:c=>new Date(c).toLocaleString()})}),u.map(c=>v.jsx(dh,{type:"monotone",dot:!1,dataKey:c,stroke:l[c].color,fillOpacity:.6,fill:l[c].color,isAnimationActive:!1,stackId:"a"},c)),a&&s&&v.jsx(Nm,{x1:a,x2:s,strokeOpacity:.3,fill:"hsl(var(--foreground))",fillOpacity:.1})]})})}function iZe({table:e,onSetPageSize:t,showSelectedRows:n=!0}){const r=e.getState().pagination;return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400",children:n&&v.jsxs("div",{children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected."]})}),v.jsxs("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[v.jsxs("div",{className:"flex items-center space-x-2",children:[v.jsx(c4,{className:"text-sm font-medium text-gray-600 dark:text-gray-400",htmlFor:"rows-per-page",id:"rows-per-page-label",children:"Rows per page"}),v.jsxs(w4,{value:`${r.pageSize}`,onValueChange:o=>{e.setPageSize(Number(o)),t&&t(Number(o))},children:[v.jsx(PR,{className:"h-8 w-[70px]",id:"rows-per-page","aria-labelledby":"rows-per-page-label",children:v.jsx(x4,{placeholder:r.pageSize})}),v.jsx(TR,{side:"top",children:[25,50,100].map(o=>v.jsx(wd,{value:`${o}`,children:o},o))})]})]}),v.jsxs("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",r.pageIndex+1," of ",Math.max(e.getPageCount(),1)]}),v.jsxs("div",{className:"flex items-center space-x-1",children:[v.jsxs(xt,{variant:"outline",size:"sm",className:"hidden lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to first page"}),v.jsx(ZSe,{className:"size-4"})]}),v.jsxs(xt,{variant:"outline",size:"sm",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to previous page"}),v.jsx(KQ,{className:"size-4"})]}),v.jsxs(xt,{variant:"outline",size:"sm",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to next page"}),v.jsx(AL,{className:"size-4"})]}),v.jsxs(xt,{variant:"outline",size:"sm",className:"hidden lg:flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[v.jsx("span",{className:"sr-only",children:"Go to last page"}),v.jsx(e_e,{className:"size-4"})]})]})]})]})}const f8=b.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full",children:v.jsx("table",{ref:n,className:je("w-full caption-bottom text-sm",e),...t})}));f8.displayName="Table";const d8=b.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:je("border-b",e),...t}));d8.displayName="TableHeader";const h8=b.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:je(e),...t}));h8.displayName="TableBody";const aZe=b.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:je("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));aZe.displayName="TableFooter";const Dx=b.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:je("border-b last:border-b-0 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Dx.displayName="TableRow";const p8=b.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:je("h-10 px-2 text-left align-middle font-medium text-gray-700 dark:text-gray-300 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));p8.displayName="TableHead";const m8=b.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:je("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));m8.displayName="TableCell";const sZe=b.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:je("mt-4 text-sm text-gray-700 dark:text-gray-300",e),...t}));sZe.displayName="TableCaption";/** - * table-core - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function $d(e,t){return typeof e=="function"?e(t):e}function cs(e,t){return n=>{t.setState(r=>({...r,[e]:$d(n,r[e])}))}}function yP(e){return e instanceof Function}function lZe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function uZe(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function Ht(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((c,d)=>r[d]!==c)))return o;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-u)*100)/100,h=d/16,p=(x,y)=>{for(x=String(x);x.length{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function cZe(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Ht(()=>[e,n,t,i],(a,s,l,u)=>({table:a,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Gt(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function fZe(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(o=(i=s.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=h=>{let p=h;for(const y of l.split(".")){var x;p=(x=p)==null?void 0:x[y]}return p}:c=h=>h[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Ht(()=>[!0],()=>{var h;return[d,...(h=d.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Gt(e.options,"debugColumns")),getLeafColumns:Ht(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=d.columns)!=null&&p.length){let x=d.columns.flatMap(y=>y.getLeafColumns());return h(x)}return[d]},Gt(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(d,e);return d}const xi="debugHeaders";function UG(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),a.push(l)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const dZe={createTable:e=>{e.getHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?i:[],l=(a=o==null?void 0:o.map(d=>n.find(h=>h.id===d)).filter(Boolean))!=null?a:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return K_(t,[...s,...u,...l],e)},Gt(e.options,xi)),e.getCenterHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),K_(t,n,e,"center")),Gt(e.options,xi)),e.getLeftHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return K_(t,i,e,"left")},Gt(e.options,xi)),e.getRightHeaderGroups=Ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return K_(t,i,e,"right")},Gt(e.options,xi)),e.getFooterGroups=Ht(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getLeftFooterGroups=Ht(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getCenterFooterGroups=Ht(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getRightFooterGroups=Ht(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Gt(e.options,xi)),e.getFlatHeaders=Ht(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getLeftFlatHeaders=Ht(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getCenterFlatHeaders=Ht(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getRightFlatHeaders=Ht(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Gt(e.options,xi)),e.getCenterLeafHeaders=Ht(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getLeftLeafHeaders=Ht(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getRightLeafHeaders=Ht(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Gt(e.options,xi)),e.getLeafHeaders=Ht(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,l,u;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},Gt(e.options,xi))}};function K_(e,t,n,r){var o,i;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(x=>x.getIsVisible()).forEach(x=>{var y;(y=x.columns)!=null&&y.length&&s(x.columns,p+1)},0)};s(e);let l=[];const u=(h,p)=>{const x={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},y=[];h.forEach(w=>{const _=[...y].reverse()[0],C=w.column.depth===x.depth;let O,P=!1;if(C&&w.column.parent?O=w.column.parent:(O=w.column,P=!0),_&&(_==null?void 0:_.column)===O)_.subHeaders.push(w);else{const R=UG(n,O,{id:[r,p,O.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${y.filter(T=>T.column===O).length}`:void 0,depth:p,index:y.length});R.subHeaders.push(w),y.push(R)}x.headers.push(w),w.headerGroup=x}),l.push(x),p>0&&u(y,p-1)},c=t.map((h,p)=>UG(n,h,{depth:a,index:p}));u(c,a-1),l.reverse();const d=h=>h.filter(x=>x.column.getIsVisible()).map(x=>{let y=0,w=0,_=[0];x.subHeaders&&x.subHeaders.length?(_=[],d(x.subHeaders).forEach(O=>{let{colSpan:P,rowSpan:R}=O;y+=P,_.push(R)})):y=1;const C=Math.min(..._);return w=w+C,x.colSpan=y,x.rowSpan=w,{colSpan:y,rowSpan:w}});return d((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const g8=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>uZe(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:Ht(()=>[e.getAllLeafColumns()],l=>l.map(u=>cZe(e,s,u,u.id)),Gt(e.options,"debugRows")),_getAllCellsByColumnId:Ht(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),Gt(e.options,"debugRows"))};for(let l=0;l{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ule=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};ule.autoRemove=e=>Ll(e);const cle=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};cle.autoRemove=e=>Ll(e);const fle=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};fle.autoRemove=e=>Ll(e);const dle=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};dle.autoRemove=e=>Ll(e);const hle=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});hle.autoRemove=e=>Ll(e)||!(e!=null&&e.length);const ple=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});ple.autoRemove=e=>Ll(e)||!(e!=null&&e.length);const mle=(e,t,n)=>e.getValue(t)===n;mle.autoRemove=e=>Ll(e);const gle=(e,t,n)=>e.getValue(t)==n;gle.autoRemove=e=>Ll(e);const v8=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};v8.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]};v8.autoRemove=e=>Ll(e)||Ll(e[0])&&Ll(e[1]);const Kc={includesString:ule,includesStringSensitive:cle,equalsString:fle,arrIncludes:dle,arrIncludesAll:hle,arrIncludesSome:ple,equals:mle,weakEquals:gle,inNumberRange:v8};function Ll(e){return e==null||e===""}const pZe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:cs("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Kc.includesString:typeof r=="number"?Kc.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Kc.equals:Array.isArray(r)?Kc.arrIncludes:Kc.weakEquals},e.getFilterFn=()=>{var n,r;return yP(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Kc[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(c=>c.id===e.id),a=$d(n,i?i.value:void 0);if(VG(o,a,e)){var s;return(s=r==null?void 0:r.filter(c=>c.id!==e.id))!=null?s:[]}const l={id:e.id,value:a};if(i){var u;return(u=r==null?void 0:r.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=$d(t,o))==null?void 0:i.filter(a=>{const s=n.find(l=>l.id===a.id);if(s){const l=s.getFilterFn();if(VG(l,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function VG(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const mZe=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),gZe=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},vZe=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r=i)&&(r=i)}),r},yZe=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},xZe=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!lZe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},bZe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),SZe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,_Ze=(e,t)=>t.length,Uj={sum:mZe,min:gZe,max:vZe,extent:yZe,mean:wZe,median:xZe,unique:bZe,uniqueCount:SZe,count:_Ze},EZe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:cs("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Uj.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Uj.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return yP(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Uj[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function CZe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const OZe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:cs("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ht(n=>[Mw(t,n)],n=>n.findIndex(r=>r.id===e.id),Gt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Mw(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Mw(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ht(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const l=a.shift(),u=s.findIndex(c=>c.id===l);u>-1&&i.push(s.splice(u,1)[0])}i=[...i,...s]}return CZe(i,n,r)},Gt(e.options,"debugTable"))}},Vj=()=>({left:[],right:[]}),RZe={getInitialState:e=>({columnPinning:Vj(),...e}),getDefaultOptions:e=>({onColumnPinningChange:cs("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,l;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,c;return{left:[...((u=o==null?void 0:o.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=o==null?void 0:o.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},Gt(t.options,"debugRows")),e.getLeftVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Gt(t.options,"debugRows")),e.getRightVisibleCells=Ht(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Gt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Vj():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Vj())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getRightLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Gt(e.options,"debugColumns")),e.getCenterLeafColumns=Ht(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Gt(e.options,"debugColumns"))}};function PZe(e){return e||(typeof document<"u"?document:null)}const Y_={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Wj=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),TZe={getDefaultColumnDef:()=>Y_,getInitialState:e=>({columnSizing:{},columnSizingInfo:Wj(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:cs("columnSizing",e),onColumnSizingInfoChange:cs("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Y_.minSize,(r=i??e.columnDef.size)!=null?r:Y_.size),(o=e.columnDef.maxSize)!=null?o:Y_.maxSize)},e.getStart=Ht(n=>[n,Mw(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Gt(t.options,"debugColumns")),e.getAfter=Ht(n=>[n,Mw(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Gt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Hj(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[r.id,r.getSize()]],l=Hj(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(_,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(O=>{var P,R;const T=t.options.columnResizeDirection==="rtl"?-1:1,k=(C-((P=O==null?void 0:O.startOffset)!=null?P:0))*T,M=Math.max(k/((R=O==null?void 0:O.startSize)!=null?R:0),-.999999);return O.columnSizingStart.forEach(j=>{let[$,L]=j;u[$]=Math.round(Math.max(L+L*M,0)*100)/100}),{...O,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(O=>({...O,...u})))},d=_=>c("move",_),h=_=>{c("end",_),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=PZe(n),x={moveHandler:_=>d(_.clientX),upHandler:_=>{p==null||p.removeEventListener("mousemove",x.moveHandler),p==null||p.removeEventListener("mouseup",x.upHandler),h(_.clientX)}},y={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),d(_.touches[0].clientX),!1),upHandler:_=>{var C;p==null||p.removeEventListener("touchmove",y.moveHandler),p==null||p.removeEventListener("touchend",y.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),h((C=_.touches[0])==null?void 0:C.clientX)}},w=AZe()?{passive:!1}:!1;Hj(i)?(p==null||p.addEventListener("touchmove",y.moveHandler,w),p==null||p.addEventListener("touchend",y.upHandler,w)):(p==null||p.addEventListener("mousemove",x.moveHandler,w),p==null||p.addEventListener("mouseup",x.upHandler,w)),t.setColumnSizingInfo(_=>({..._,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Wj():(n=e.initialState.columnSizingInfo)!=null?n:Wj())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let X_=null;function AZe(){if(typeof X_=="boolean")return X_;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return X_=e,X_}function Hj(e){return e.type==="touchstart"}const kZe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:cs("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ht(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Gt(t.options,"debugRows")),e.getVisibleCells=Ht(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Gt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ht(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Gt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Mw(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const NZe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},MZe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:cs("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Kc.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return yP(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Kc[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},jZe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:cs("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...l}=a;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},E3=0,C3=10,Gj=()=>({pageIndex:E3,pageSize:C3}),IZe={getInitialState:e=>({...e,pagination:{...Gj(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:cs("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>$d(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Gj():(o=e.initialState.pagination)!=null?o:Gj())},e.setPageIndex=r=>{e.setPagination(o=>{let i=$d(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?E3:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:E3)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?C3:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:C3)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,$d(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=$d(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Ht(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},Gt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Kj=()=>({top:[],bottom:[]}),DZe={getInitialState:e=>({rowPinning:Kj(),...e}),getDefaultOptions:e=>({onRowPinningChange:cs("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],a=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,h;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(y=>!(s!=null&&s.has(y))),bottom:[...((h=l==null?void 0:l.bottom)!=null?h:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)]}}if(n==="top"){var p,x;return{top:[...((p=l==null?void 0:l.top)!=null?p:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)],bottom:((x=l==null?void 0:l.bottom)!=null?x:[]).filter(y=>!(s!=null&&s.has(y)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(y=>!(s!=null&&s.has(y))),bottom:((c=l==null?void 0:l.bottom)!=null?c:[]).filter(y=>!(s!=null&&s.has(y)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Kj():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Kj())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Gt(e.options,"debugRows")),e.getBottomRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Gt(e.options,"debugRows")),e.getCenterRows=Ht(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Gt(e.options,"debugRows"))}},LZe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:cs("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{O3(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Yj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Yj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ht(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Yj(e,n):{rows:[],flatRows:[],rowsById:{}},Gt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return O3(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return y8(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return R3(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return R3(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},O3=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>O3(e,s.id,n,r,o))};function Yj(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(l=>{var u;const c=y8(l,n);if(c&&(r.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:i(l.subRows)}),c)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function y8(e,t){var n;return(n=t[e.id])!=null?n:!1}function R3(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(y8(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=R3(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const P3=/([0-9]+)/gm,$Ze=(e,t,n)=>vle(Jd(e.getValue(n)).toLowerCase(),Jd(t.getValue(n)).toLowerCase()),FZe=(e,t,n)=>vle(Jd(e.getValue(n)),Jd(t.getValue(n))),BZe=(e,t,n)=>w8(Jd(e.getValue(n)).toLowerCase(),Jd(t.getValue(n)).toLowerCase()),zZe=(e,t,n)=>w8(Jd(e.getValue(n)),Jd(t.getValue(n))),qZe=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rw8(e.getValue(n),t.getValue(n));function w8(e,t){return e===t?0:e>t?1:-1}function Jd(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function vle(e,t){const n=e.split(P3).filter(Boolean),r=t.split(P3).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),l=[a,s].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const J1={alphanumeric:$Ze,alphanumericCaseSensitive:FZe,text:BZe,textCaseSensitive:zZe,datetime:qZe,basic:UZe},VZe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:cs("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return J1.datetime;if(typeof i=="string"&&(r=!0,i.split(P3).length>1))return J1.alphanumeric}return r?J1.text:J1.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return yP(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:J1[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(p=>p.id===e.id),l=a==null?void 0:a.findIndex(p=>p.id===e.id);let u=[],c,d=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&l!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(i||o||(c="remove")),c==="add"){var h;u=[...a,{id:e.id,desc:d}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=a.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=a.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},WZe=[dZe,kZe,OZe,RZe,hZe,pZe,NZe,MZe,VZe,EZe,jZe,IZe,DZe,LZe,TZe];function HZe(e){var t,n;const r=[...WZe,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),a=h=>o.options.mergeOptions?o.options.mergeOptions(i,h):{...i,...h};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(h=>{var p;l=(p=h.getInitialState==null?void 0:h.getInitialState(l))!=null?p:l});const u=[];let c=!1;const d={_features:r,options:{...i,...e},initialState:l,_queue:h=>{u.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:h=>{const p=$d(h,o.options);o.options=a(p)},getState:()=>o.options.state,setState:h=>{o.options.onStateChange==null||o.options.onStateChange(h)},_getRowId:(h,p,x)=>{var y;return(y=o.options.getRowId==null?void 0:o.options.getRowId(h,p,x))!=null?y:`${x?[x.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(h,p)=>{let x=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[h];if(!x&&(x=o.getCoreRowModel().rowsById[h],!x))throw new Error;return x},_getDefaultColumnDef:Ht(()=>[o.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:x=>{const y=x.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:x=>{var y,w;return(y=(w=x.renderValue())==null||w.toString==null?void 0:w.toString())!=null?y:null},...o._features.reduce((x,y)=>Object.assign(x,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...h}},Gt(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Ht(()=>[o._getColumnDefs()],h=>{const p=function(x,y,w){return w===void 0&&(w=0),x.map(_=>{const C=fZe(o,_,w,y),O=_;return C.columns=O.columns?p(O.columns,C,w+1):[],C})};return p(h)},Gt(e,"debugColumns")),getAllFlatColumns:Ht(()=>[o.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Gt(e,"debugColumns")),_getAllFlatColumnsById:Ht(()=>[o.getAllFlatColumns()],h=>h.reduce((p,x)=>(p[x.id]=x,p),{}),Gt(e,"debugColumns")),getAllLeafColumns:Ht(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(h,p)=>{let x=h.flatMap(y=>y.getLeafColumns());return p(x)},Gt(e,"debugColumns")),getColumn:h=>o._getAllFlatColumnsById()[h]};Object.assign(o,d);for(let h=0;hHt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let u=0;ue._autoResetPageIndex()))}function KZe(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function yle(e,t,n){return n.options.filterFromLeafRows?YZe(e,t,n):XZe(e,t,n)}function YZe(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const c=[];for(let h=0;hHt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const i=[...r.map(s=>s.id).filter(s=>s!==t),o?"__global__":void 0].filter(Boolean),a=s=>{for(let l=0;lHt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let i=0;iHt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const x=e.getColumn(h.id);if(!x)return;const y=x.getFilterFn();y&&o.push({id:h.id,filterFn:y,resolvedValue:(p=y.resolveFilterValue==null?void 0:y.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&l.length&&(a.push("__global__"),l.forEach(h=>{var p;i.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let u,c;for(let h=0;h{p.columnFiltersMeta[y]=w})}if(i.length){for(let x=0;x{p.columnFiltersMeta[y]=w})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const d=h=>{for(let p=0;pe._autoResetPageIndex()))}function eJe(e){return t=>Ht(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:a,flatRows:s,rowsById:l}=r;const u=o*i,c=u+o;a=a.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:a,flatRows:s,rowsById:l}:d=KZe({rows:a,flatRows:s,rowsById:l}),d.flatRows=[];const h=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return d.rows.forEach(h),d},Gt(t.options,"debugTable"))}function tJe(){return e=>Ht(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),a={};i.forEach(l=>{const u=e.getColumn(l.id);u&&(a[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=l=>{const u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p{var d;o.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},Gt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** - * react-table - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Xj(e,t){return e?nJe(e)?b.createElement(e,t):e:null}function nJe(e){return rJe(e)||typeof e=="function"||oJe(e)}function rJe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function oJe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function iJe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:HZe(t)})),[r,o]=b.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function wle({columns:e,error:t,data:n,filters:r=[],leftActions:o=[],rightActions:i=[],searchBar:a,sorting:s,setSorting:l,columnFilters:u,setColumnFilters:c,pagination:d,setPagination:h,pageCount:p,onSetPageSize:x,showSelectedRows:y=!0,showColumnToggle:w,columnVisibility:_,setColumnVisibility:C,rowSelection:O,setRowSelection:P,isLoading:R,getRowId:T,emptyState:k,manualSorting:M=!0,manualFiltering:j=!0,getSubRows:$,hiddenFilters:L=[],onResetFilters:K,columnKeyToName:H,refetchProps:D,tableActions:W}){var ae;const[q,Y]=b.useState({}),U=R&&!n.length,V=b.useMemo(()=>U?Array(10).fill({metadata:{}}):n,[U,n]),G=b.useMemo(()=>U?e.map(fe=>({...fe,cell:()=>v.jsx(rx,{className:"h-4 w-[100px]"})})):e,[U,e]),z=iJe({data:V,columns:G,state:{sorting:s,columnVisibility:_,rowSelection:O||{},columnFilters:u,pagination:d,expanded:q},pageCount:p,enableRowSelection:!!O,onRowSelectionChange:P,onSortingChange:l,onColumnFiltersChange:c,onColumnVisibilityChange:C,onPaginationChange:h,getCoreRowModel:GZe(),getFilteredRowModel:JZe(),getPaginationRowModel:eJe(),getSortedRowModel:tJe(),getFacetedRowModel:QZe(),getFacetedUniqueValues:ZZe(),getSubRows:$,onExpandedChange:Y,getRowCanExpand:fe=>fe.subRows.length>0,manualSorting:M,manualFiltering:j,manualPagination:!0,getRowId:T}),X=fe=>fe.original.getRow?fe.original.getRow():v.jsx(Dx,{"data-state":fe.getIsSelected()&&"selected",className:je(fe.original.isExpandable&&"cursor-pointer hover:bg-muted"),onClick:fe.original.onClick,children:fe.getVisibleCells().map(ie=>{var de;const we=(de=ie.column.columnDef.meta)==null?void 0:de.truncate;return v.jsx(m8,{className:we?"overflow-hidden":void 0,style:we?{maxWidth:ie.column.getSize()}:void 0,children:we?v.jsx("div",{className:"truncate",children:Xj(ie.column.columnDef.cell,ie.getContext())}):Xj(ie.column.columnDef.cell,ie.getContext())},ie.id)})},fe.id),ee=((ae=z.getRowModel().rows)==null?void 0:ae.length)>0;return t?v.jsx("div",{className:"p-4 text-center text-red-500",children:t.message||"An error occurred."}):v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx("div",{className:"shrink-0 min-h-10 flex flex-col w-full items-center pt-2 mb-2",children:v.jsxs("div",{className:"w-full",children:[(W==null?void 0:W.selectedActionType)&&v.jsx(ake,{actionType:W.selectedActionType,params:W.actionModalParams,table:z,columnKeyToName:H,filters:r,hiddenFilters:[vb],showColumnVisibility:!1}),(o||i||a||r.length>0)&&v.jsx(lke,{table:z,filters:r,isLoading:R,leftActions:o,rightActions:i,searchBar:a,showColumnToggle:w,hiddenFilters:L,columnKeyToName:H,refetchProps:D,tableActions:W,onResetFilters:K})]})}),ee?v.jsx("div",{className:"min-h-0 flex-1 overflow-auto relative",children:v.jsxs(f8,{className:"table-auto w-full relative z-10",children:[v.jsx(d8,{className:"sticky top-0 z-10 bg-background",children:z.getHeaderGroups().map(fe=>v.jsx(Dx,{children:fe.headers.map(ie=>v.jsx(p8,{colSpan:ie.colSpan,className:"border-b bg-background",children:ie.isPlaceholder?null:Xj(ie.column.columnDef.header,ie.getContext())},ie.id))},fe.id))}),v.jsx(h8,{className:"w-full",children:z.getRowModel().rows.map(fe=>v.jsxs(b.Fragment,{children:[X(fe),fe.getIsExpanded()&&fe.subRows.map(ie=>X(ie))]},fe.id))})]})}):v.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center py-8",children:k||v.jsx("p",{className:"text-lg font-semibold",children:"No results."})}),v.jsx("div",{className:"shrink-0 h-10 flex items-center pt-2",children:v.jsx("div",{className:"w-full",children:v.jsx(iZe,{table:z,onSetPageSize:x,showSelectedRows:y})})})]})}const Qj="flex min-w-0 flex-1 basis-44 cursor-pointer flex-col items-start gap-1.5 rounded-lg border border-[#053970]/[0.16] bg-[#005c9e]/[0.02] px-4 py-3 text-left no-underline transition-all hover:border-[#004c8c]/10 hover:bg-white hover:shadow-[0_3px_2px_rgba(0,0,0,0.01),0_8px_11px_rgba(0,0,0,0.03),0_24px_16px_rgba(0,0,0,0.01)] dark:border-[#97c4ff]/[0.16] dark:bg-[#82b9ff]/[0.07] dark:hover:border-[#86bbff]/[0.08] dark:hover:bg-[#8dbfff]/[0.13]";function Zj({action:e}){return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"flex w-full items-center gap-2",children:[e.icon&&v.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:e.icon}),v.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:e.label}),"external"in e&&e.external&&v.jsx(Wp,{className:"ml-auto size-3 flex-shrink-0 text-muted-foreground"})]}),e.description&&v.jsx("span",{className:"text-xs leading-normal text-muted-foreground",children:e.description})]})}function aJe({action:e}){return"onClick"in e&&e.onClick?v.jsx("button",{type:"button",onClick:e.onClick,className:Qj,children:v.jsx(Zj,{action:e})}):e.external?v.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",className:Qj,children:v.jsx(Zj,{action:e})}):v.jsx("a",{href:e.href,className:Qj,children:v.jsx(Zj,{action:e})})}function Lx({title:e,description:t,docPage:n,docLabel:r,links:o,graphic:i,graphicPosition:a="top",filterHint:s,actions:l,buttons:u}){const c=i&&v.jsx("div",{children:i});return v.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-3 text-foreground",children:[a==="top"&&c,v.jsx("p",{className:"text-lg font-semibold",children:e}),s&&v.jsx("p",{className:"text-xs italic text-muted-foreground/70",children:s}),t&&v.jsx("p",{className:"max-w-sm text-center text-sm text-muted-foreground",children:t}),!l&&o&&o.length>0&&v.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1",children:o.map((d,h)=>v.jsxs("a",{href:d.href,target:d.external?"_blank":void 0,rel:d.external?"noreferrer":void 0,className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:[d.label,d.external&&v.jsx(Wp,{className:"size-3"})]},h))}),!l&&!o&&n&&r&&v.jsxs("a",{href:n.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:[r,v.jsx(Wp,{className:"size-3"})]}),u&&u.length>0&&v.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:u.map((d,h)=>v.jsx(xt,{variant:"outline",size:"sm",onClick:d.onClick,children:d.label},h))}),l&&l.length>0&&v.jsx("div",{className:"mt-1 flex w-full max-w-lg flex-row flex-wrap gap-3",children:l.map((d,h)=>v.jsx(aJe,{action:d},h))}),a==="bottom"&&c]})}const sJe=()=>{var a,s;const{tenantId:e}=ds(),{refetchInterval:t}=xf(),{filters:{apiFilters:n,setCustomTimeRange:r}}=ah(),o=b.useCallback((l,u)=>{r({start:l,end:u})},[r]),i=Mn({...Yr.v1TaskRuns.pointMetrics(e,{createdAfter:n.since,finishedBefore:n.until}),placeholderData:l=>l,refetchInterval:t});return i.isLoading?v.jsx(rx,{className:"h-24 w-full"}):v.jsx(eZe,{kind:"bar",data:((s=(a=i.data)==null?void 0:a.results)==null?void 0:s.map(l=>({date:l.time,SUCCEEDED:l.SUCCEEDED,FAILED:l.FAILED})))||[],colors:{SUCCEEDED:"rgb(34 197 94 / 0.5)",FAILED:"hsl(var(--destructive))"},zoom:o,showYAxis:!1,className:"h-24 min-h-24"})};function xle({leftLabel:e}){var ye,Te,ge;const{tenantId:t}=ds(),n=d0(),{setIsFrozen:r}=xf(),{filters:o,toolbarFilters:i,tableRows:a,numPages:s,isRunsLoading:l,isStatusCountsLoading:u,isQueueMetricsLoading:c,isRefetching:d,runStatusCounts:h,queueMetrics:p,actionModalParams:x,selectedActionType:y,pagination:w,columnVisibility:_,rowSelection:C,showTriggerWorkflow:O,showQueueMetrics:P,display:{hideMetrics:R,hideCounts:T,hideColumnToggle:k,hiddenFilters:M},actions:{refetchRuns:j,refetchMetrics:$,getRowId:L,setPageSize:K,setPagination:H,setColumnVisibility:D,setRowSelection:W,setShowTriggerWorkflow:q,setShowQueueMetrics:Y}}=ah(),[U,V]=b.useState(null),G=b.useCallback(Be=>{n.open({type:"task-run-details",content:{taskRunId:Be,defaultOpenTab:J4.Activity,showViewTaskRunButton:!0}})},[n]),z=b.useCallback((Be,Ie)=>{Ie?(V(Be),r(!0)):(V(null),r(!1))},[r]),X=b.useCallback(Be=>{o.setAdditionalMetadata(Be)},[o]),ee=b.useMemo(()=>qPe(t,U,X,G,z),[t,U,X,G,z]),ae=b.useCallback(()=>{j(),$()},[j,$]);b.useEffect(()=>{if(o.isCustomTimeRange)return;const Be=setInterval(()=>{o.updateCurrentTimeWindow()},60*1e3);return()=>clearInterval(Be)},[o,o.isCustomTimeRange,o.updateCurrentTimeWindow]);const fe=l||u,ie=Object.values(It).length,we=(((ye=o.apiFilters.statuses)==null?void 0:ye.length)??ie)0||(((ge=o.apiFilters.additionalMetadata)==null?void 0:ge.length)??0)>0||!!o.apiFilters.runningFilter||o.isCustomTimeRange||o.timeWindow!=="1d",de=!o.isCustomTimeRange&&o.timeWindow==="1d",se=[...T?[]:[v.jsx("div",{className:"mr-auto flex justify-start",children:h.length>0?v.jsx(w8e,{}):v.jsx(rx,{className:"h-8 w-[40vw] max-w-[800px]"})},"metrics")],...e?[v.jsx("span",{className:"mr-auto flex justify-start font-medium",children:e},"left-label")]:[]];return v.jsxs("div",{className:"flex h-full flex-col gap-y-2 overflow-hidden",children:[v.jsx(xZ,{}),v.jsx(g8e,{defaultWorkflow:void 0,show:O,onClose:()=>q(!1)}),!R&&v.jsx(sb,{open:P,onOpenChange:Y,children:v.jsxs(Ky,{className:"w-fit min-w-[500px] max-w-[80%]",children:[v.jsx(lb,{children:v.jsx(Yy,{children:"Queue Metrics"})}),v.jsx(Wd,{}),!p||c?v.jsx(Jy,{}):v.jsx(hf,{language:"json",className:"max-h-[400px] overflow-y-auto",code:JSON.stringify(p||"{}",null,2)})]})}),!R&&v.jsx(sJe,{}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(wle,{emptyState:we?v.jsx(Lx,{graphic:v.jsx(jJ,{}),title:"No runs matching your filters",buttons:[{label:"Clear filters",onClick:o.resetFilters}]}):v.jsx(Lx,{title:"No runs found",description:"Runs are individual executions of your tasks and workflows. Dispatch a task to see runs appear here.",docPage:Pv.v1.quickstart,docLabel:"Learn about running tasks",buttons:de?[{label:"Search past 7 days",onClick:()=>o.setTimeWindow("7d")}]:void 0}),isLoading:fe,columns:ee,columnVisibility:_,setColumnVisibility:D,data:a,filters:i,leftActions:se,columnFilters:o.columnFilters,setColumnFilters:Be=>{typeof Be=="function"?o.setColumnFilters(Be(o.columnFilters)):o.setColumnFilters(Be)},pagination:w,setPagination:H,onSetPageSize:K,rowSelection:C,setRowSelection:W,pageCount:s,showColumnToggle:!k,getSubRows:Be=>Be.children||[],getRowId:L,hiddenFilters:M,columnKeyToName:ks,refetchProps:{isRefetching:d,onRefetch:ae},tableActions:{showTableActions:!0,onTriggerWorkflow:()=>q(!0),selectedActionType:y,actionModalParams:x},onResetFilters:o.resetFilters})})]})}const Gi={id:"Event ID",key:"Event",seenAt:"Seen at",workflowId:"Workflow",status:"Status",runs:"Runs",metadata:"Metadata",payload:"Payload",scope:"Scope"},OO="id",x8="key",lJe="seenAt",b8="workflowId",S8="status",uJe="runs",_8="metadata",cJe="payload",RO="scope",fJe=({onRowClick:e,openMetadataPopover:t,setOpenMetadataPopover:n,openPayloadPopover:r,setOpenPayloadPopover:o})=>[{accessorKey:OO,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.id}),cell:({row:i})=>v.jsx("div",{className:"w-full",children:v.jsx(xt,{className:"w-fit pl-0",variant:"link",onClick:()=>{e==null||e(i.original)},children:i.original.metadata.id})}),enableSorting:!1,enableHiding:!0},{accessorKey:x8,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.key}),cell:({row:i})=>v.jsx(xt,{className:"h-auto min-w-0 justify-start pl-0 text-left",variant:"link",onClick:()=>{e==null||e(i.original)},children:i.original.key}),size:220,meta:{truncate:!0},enableSorting:!1,enableHiding:!1},{accessorKey:lJe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.seenAt}),cell:({row:i})=>v.jsx("div",{children:v.jsx(Dl,{date:i.original.metadata.createdAt})}),enableSorting:!1},{accessorKey:b8,header:()=>v.jsx(v.Fragment,{}),cell:()=>v.jsx("div",{})},{accessorKey:S8,header:()=>v.jsx(v.Fragment,{}),cell:()=>v.jsx("div",{})},{accessorKey:uJe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.runs}),cell:({row:i})=>i.original.workflowRunSummary?v.jsx(dJe,{event:i.original}):v.jsx("div",{children:"None"}),enableSorting:!1},{accessorKey:_8,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.metadata}),cell:({row:i})=>i.original.additionalMetadata?v.jsx(nD,{metadata:i.original.additionalMetadata,isOpen:t===i.original.metadata.id,onOpenChange:a=>{n(a?i.original.metadata.id:null)},title:"Metadata",align:"end"}):v.jsx("div",{}),enableSorting:!1},{accessorKey:cJe,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.payload}),cell:({row:i})=>i.original.payload?v.jsx(nD,{metadata:i.original.payload,isOpen:r===i.original.metadata.id,onOpenChange:a=>{o(a?i.original.metadata.id:null)},title:"Payload",align:"start"}):v.jsx("div",{}),enableSorting:!1,enableHiding:!0},{accessorKey:RO,header:({column:i})=>v.jsx(Dr,{column:i,title:Gi.scope}),cell:({row:i})=>v.jsx("div",{className:"w-full",children:i.original.scope}),enableSorting:!1,enableHiding:!0}];function dJe({event:e}){var s,l,u,c,d;const t=((s=e.workflowRunSummary)==null?void 0:s.failed)||0,n=((l=e.workflowRunSummary)==null?void 0:l.succeeded)||0,r=((u=e.workflowRunSummary)==null?void 0:u.running)||0,o=((c=e.workflowRunSummary)==null?void 0:c.cancelled)||0,i=((d=e.workflowRunSummary)==null?void 0:d.queued)||0,a=[{variant:"failed",count:t,label:"Failed"},{variant:"successful",count:n,label:"Succeeded"},{variant:"inProgress",count:r,label:"Running"},{variant:"cancelled",count:o,label:"Cancelled"},{variant:"queued",count:i,label:"Queued"}];return v.jsx("div",{className:"flex flex-row items-center justify-start gap-2",children:a.map(({variant:h,count:p,label:x})=>p>0&&v.jsxs(Ti,{variant:h,children:[p," ",x]},h))})}const hJe=[{value:It.COMPLETED,label:"Succeeded"},{value:It.FAILED,label:"Failed"},{value:It.RUNNING,label:"Running"},{value:It.QUEUED,label:"Queued"},{value:It.CANCELLED,label:"Cancelled"}],Q_="events-time",WG=Em({tw:Mee(["1h","6h","1d","7d"]).default("1d"),since:io().optional(),until:io().optional()});function Jj(e){const t={"1h":1,"6h":6,"1d":24,"7d":168};return new Date(Date.now()-t[e]*60*60*1e3).toISOString()}const pJe=Em({k:Yc(io()).default([]),w:Yc(io()).default([]),s:Yc(io()).default([]),st:Yc(pD(It)).default([]),m:Yc(io()).default([]),i:Yc(io()).default([])}).default({}),mJe=({key:e})=>{var Be;const{tenant:t}=ta({from:ft.tenantRoute.to}),{refetchInterval:n}=xf(),[r,o]=Wy(),i=b.useMemo(()=>{const Ie=r.get(Q_);try{return WG.parse(Ie?JSON.parse(Ie):{})}catch{return WG.parse({})}},[r]),a=b.useCallback(Ie=>{o(Ve=>({...Object.fromEntries(Ve.entries()),[Q_]:JSON.stringify({...i,...Ie})}))},[i,o]),s=i.tw,l=!!i.since,[u,c]=b.useState(()=>i.since??Jj(i.tw));b.useEffect(()=>{c(i.since??Jj(i.tw))},[i.tw,i.since,i.until]);const d=i.until,h=b.useCallback(Ie=>{o(Ve=>({...Object.fromEntries(Ve.entries()),[Q_]:JSON.stringify({tw:Ie,since:void 0,until:void 0})}))},[o]),p=b.useCallback((Ie,Ve)=>{a({since:Ie,until:Ve})},[a]),x=b.useCallback(()=>{o(Ie=>{const Ve=Object.fromEntries(Ie.entries());return delete Ve[Q_],Ve})},[o]),y=`events-${e}`,{state:{k:w,w:_,s:C,st:O,m:P,i:R},columnFilters:T,setColumnFilters:k,resetFilters:M}=Pee(pJe,y,{k:x8,w:b8,s:RO,st:S8,m:_8,i:OO}),j=b.useCallback(()=>{M(),x()},[M,x]),L=T.length>0||l||s!=="1d",K=!l&&s==="1d",H=b.useMemo(()=>({onTimeWindowChange:Ie=>{Ie!=="custom"?h(Ie):p(u,new Date().toISOString())},onCreatedAfterChange:Ie=>{l&&d&&p(Ie??Jj("1d"),d)},onFinishedBeforeChange:Ie=>{l&&u&&p(u,Ie??new Date().toISOString())},onClearTimeRange:x,currentTimeWindow:s,isCustomTimeRange:l,createdAfter:l?u:void 0,finishedBefore:d}),[s,l,u,d,h,p,x]),{limit:D,offset:W,pagination:q,setPagination:Y,setPageSize:U}=VL({key:e,resetPageOnChange:[w,_,C,O,P,R,u,d]}),{data:V,isLoading:G,refetch:z,error:X,isRefetching:ee}=Mn({queryKey:["v1:events:list",t,{keys:w,workflows:_,offset:W,limit:D,statuses:O,additionalMetadata:P,eventIds:R,scopes:C,since:u,until:d}],queryFn:async()=>(await ot.v1EventList(t,{offset:W,limit:D,keys:w,since:u,until:d,eventIds:R,workflowRunStatuses:O,additionalMetadata:P,workflowIds:_,scopes:C})).data,refetchInterval:R!=null&&R.length?!1:n,placeholderData:Ie=>Ie}),ae=(V==null?void 0:V.rows)??[],fe=((Be=V==null?void 0:V.pagination)==null?void 0:Be.num_pages)??1,{data:ie,error:we}=Mn({queryKey:["v1:events:listKeys",t],queryFn:async()=>(await ot.v1EventKeyList(t)).data,staleTime:300*1e3}),de=b.useMemo(()=>{var Ie;return((Ie=ie==null?void 0:ie.rows)==null?void 0:Ie.map(Ve=>({value:Ve,label:Ve})))||[]},[ie]),{data:se,isLoading:ye,error:Te}=Mn({...Yr.workflows.list(t,{limit:200})}),ge=b.useMemo(()=>{var Ie;return((Ie=se==null?void 0:se.rows)==null?void 0:Ie.map(Ve=>({value:Ve.metadata.id,label:Ve.name})))||[]},[se]);return{events:ae,numEvents:fe,isLoading:G||ye,refetch:z,error:X||we||Te,pagination:q,setPagination:Y,setPageSize:U,columnFilters:T,setColumnFilters:k,selectedKeys:w,selectedWorkflowIds:_,selectedScopes:C,selectedStatuses:O,selectedMetadata:P,selectedEventIds:R,eventKeyFilters:de,workflowKeyFilters:ge,workflowRunStatusFilters:hJe,isRefetching:ee,resetFilters:j,timeWindow:s,isCustomTimeRange:l,timeRangeConfig:H,hasActiveFilters:L,isDefaultOneDayWindow:K,setTimeWindow:h}},gJe=()=>{const{meta:e}=Z4(),t=b.useCallback(()=>{var n;(n=window.Pylon)==null||n.call(window,"show")},[]);return{enabled:!!(e!=null&&e.pylonAppId),show:t}},Ntt=({user:e,children:t})=>{const{meta:n}=Z4(),{tenant:r}=eOe(),o=b.useMemo(()=>n!=null&&n.pylonAppId?n==null?void 0:n.pylonAppId:null,[n==null?void 0:n.pylonAppId]);return b.useEffect(()=>{if(!o)return;const i=`(function(){var e=window;var t=document;var n=function(){n.e(arguments)};n.q=[];n.e=function(e){n.q.push(e)};e.Pylon=n;var r=function(){var e=t.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("async","true");e.setAttribute("src","https://widget.usepylon.com/widget/${o}");var n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};if(t.readyState==="complete"){r()}else if(e.addEventListener){e.addEventListener("load",r,false)}})();`;document.body.appendChild(document.createElement("script")).innerHTML=i},[o]),b.useEffect(()=>{var i;!o||!e||(window.pylon={chat_settings:{app_id:o,email:e.email,name:e.name,email_hash:e.emailHash}},window.Pylon("hideChatBubble"),window.Pylon("setNewIssueCustomFields",{user_id:e.metadata.id,tenant_name:r==null?void 0:r.name,tenant_slug:r==null?void 0:r.slug,tenant_id:(i=r==null?void 0:r.metadata)==null?void 0:i.id}))},[e,o,r]),t},vJe="https://cal.com/team/hatchet/talk-to-us",yJe="https://discord.com/invite/ZMeUafwH89";function wJe(e){const{tenant:t}=ta({from:ft.tenantRoute.to}),{enabled:n,show:r}=gJe();return b.useMemo(()=>[{icon:v.jsx(Ewe,{className:"size-4"}),label:"Get started",description:"Follow our onboarding guide",href:`/tenants/${t}/overview`},{icon:v.jsx(L1e,{className:"size-4"}),label:"Read the docs",description:e.description,href:e.href,external:!0},n?{icon:v.jsx(p7,{className:"size-4"}),label:"Talk to us",description:"Chat with our support team",onClick:r}:{icon:v.jsx(p7,{className:"size-4"}),label:"Join Discord",description:"Chat with the Hatchet community",href:yJe,external:!0},{icon:v.jsx(F1e,{className:"size-4"}),label:"Book office hours",description:"Schedule time with the Hatchet team",href:vJe,external:!0}],[t,e.href,e.description,n,r])}function xJe({title:e,description:t,docs:n,children:r}){var l,u;const{tenant:o}=ta({from:ft.tenantRoute.to}),i=wJe(n),a=Mn(Yr.workflows.list(o,{limit:1,offset:0}));if(a.isLoading)return v.jsx(Jy,{});const s=(((u=(l=a.data)==null?void 0:l.rows)==null?void 0:u.length)??0)>0;return a.isError||s?v.jsx(v.Fragment,{children:r}):v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsx(Lx,{title:e,description:t,actions:i})})}function T3({columns:e,data:t,rowKey:n}){return v.jsx("div",{className:"overflow-auto rounded-md border bg-background",children:v.jsxs(f8,{children:[v.jsx(d8,{children:v.jsx(Dx,{children:e.map(({columnLabel:r})=>v.jsx(p8,{className:"pr-8",children:r},r))})}),v.jsx(h8,{children:t.map((r,o)=>v.jsx(Dx,{children:e.map(({columnLabel:i,cellRenderer:a})=>v.jsx(m8,{className:"pr-8",children:a(r)},i))},n(r,o)))})]})})}function bJe(){return v.jsx(xJe,{title:"No events found",description:"Events are payloads you push to Hatchet to trigger workflows. Push an event to see it appear here.",docs:{href:Pv.v1.events.href,description:"Learn about event triggers"},children:v.jsx(SJe,{})})}function SJe(){const[e,t]=b.useState(null),[n,r]=b.useState(null),{open:o}=d0(),{events:i,numEvents:a,isLoading:s,refetch:l,error:u,pagination:c,setPagination:d,setPageSize:h,columnFilters:p,setColumnFilters:x,eventKeyFilters:y,workflowKeyFilters:w,workflowRunStatusFilters:_,isRefetching:C,resetFilters:O,timeRangeConfig:P,hasActiveFilters:R,isDefaultOneDayWindow:T,setTimeWindow:k}=mJe({key:"table"}),[M,j]=ey("hatchet:columns:events",{[OO]:!1,[Gi.payload]:!1,[RO]:!1}),$=fJe({onRowClick:L=>{o({type:"event-details",content:{event:L}})},openMetadataPopover:e,setOpenMetadataPopover:t,openPayloadPopover:n,setOpenPayloadPopover:r});return v.jsx(v.Fragment,{children:v.jsx(wle,{error:u,isLoading:s,columns:$,data:i,filters:[{columnId:"eventCreatedAt",title:"Time Range",type:Bn.TimeRange,timeRangeConfig:P},{columnId:x8,title:Gi.key,options:y,type:Bn.Array},{columnId:b8,title:Gi.workflowId,options:w,type:Bn.Checkbox},{columnId:S8,title:Gi.status,options:_,type:Bn.Checkbox},{columnId:_8,title:Gi.metadata,type:Bn.KeyValue},{columnId:OO,title:Gi.id,type:Bn.Array},{columnId:RO,title:Gi.scope,type:Bn.Array}],showColumnToggle:!0,columnVisibility:M,setColumnVisibility:j,columnFilters:p,setColumnFilters:x,pagination:c,setPagination:d,onSetPageSize:h,pageCount:a,getRowId:L=>L.metadata.id,columnKeyToName:Gi,showSelectedRows:!1,refetchProps:{isRefetching:C,onRefetch:l},onResetFilters:O,emptyState:R?v.jsx(Lx,{graphic:v.jsx(jJ,{}),title:"No events matching your filters",buttons:[{label:"Clear filters",onClick:O}]}):v.jsx(Lx,{title:"No events found",description:"Events are payloads you push to Hatchet to trigger workflows. No events have been received yet.",docPage:Pv.v1.events,docLabel:"Learn about events",buttons:T?[{label:"Search past 7 days",onClick:()=>k("7d")}]:void 0})})})}function ble({event:e}){const t=!!(e.scope&&e.scope.length>0),{filters:n,workflowIdToName:r}=MJ({key:"events-table",scopeOverrides:e.scope?[e.scope]:void 0});return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col items-start justify-center gap-3 border-b pb-4 text-sm",children:[v.jsxs("div",{className:"flex w-full min-w-0 flex-row items-center gap-3",children:[v.jsx("span",{className:"shrink-0 font-medium text-muted-foreground",children:"Key"}),v.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto px-2 py-1",children:v.jsx("span",{className:"whitespace-nowrap",children:e.key})})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Seen"}),v.jsx("span",{className:"font-medium",children:v.jsx(Dl,{date:e.metadata.createdAt})})]})]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Payload"}),v.jsx(Wd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(_Je,{event:e})})]}),t&&n&&n.length>0&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Filters"}),v.jsx(Wd,{className:"mb-3"}),v.jsx(EJe,{filters:n,workflowIdToName:r})]}),v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Runs"}),v.jsx(Wd,{className:"mb-3"}),v.jsx(CJe,{event:e})]})]})]})})}function _Je({event:e}){const t={id:e.metadata.id,seenAt:e.seenAt,key:e.key,additionalMetadata:e.additionalMetadata,scope:e.scope,payload:e.payload};return v.jsx(hf,{language:"json",className:"text-xs",code:JSON.stringify(t,null,2)})}function EJe({filters:e,workflowIdToName:t}){const n=b.useMemo(()=>[{columnLabel:"ID",cellRenderer:r=>v.jsx("div",{className:"w-full",children:v.jsx(xt,{className:"w-fit pl-0",variant:"link",children:r.metadata.id})})},{columnLabel:"Workflow",cellRenderer:r=>v.jsx("div",{className:"w-full",children:t[r.workflowId]})},{columnLabel:"Scope",cellRenderer:r=>v.jsx("div",{className:"w-full",children:r.scope})},{columnLabel:"Expression",cellRenderer:r=>v.jsx(hf,{language:"text",className:"whitespace-pre-wrap break-words text-sm leading-relaxed",code:r.expression,copy:!1,maxHeight:"10rem",minWidth:"20rem"})},{columnLabel:"Is Declarative",cellRenderer:r=>r.isDeclarative?v.jsx(yL,{className:"size-4 text-green-600"}):null}],[t]);return v.jsx("div",{className:"w-full overflow-x-auto",children:v.jsx("div",{className:"min-w-[500px] [&_td:last-child]:w-[60px] [&_td:last-child]:min-w-[60px] [&_td:last-child]:max-w-[60px] [&_th:last-child]:w-[60px] [&_th:last-child]:min-w-[60px] [&_th:last-child]:max-w-[60px]",children:e.length>0?v.jsx(T3,{columns:n,data:e,rowKey:r=>r.metadata.id}):v.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No filters found for this event."})})})}function CJe({event:e}){return v.jsx("div",{className:"w-full overflow-x-auto",children:v.jsx("div",{className:"min-w-[600px]",children:v.jsx(SD,{tableKey:`event-workflow-runs-${e.metadata.id}`,display:{hideMetrics:!0,hideCounts:!0,hideDateFilter:!0,hideTriggerRunButton:!0,hideCancelAndReplayButtons:!0},runFilters:{triggeringEventExternalId:e.metadata.id},children:v.jsx(xle,{})})})})}const OJe=Object.freeze(Object.defineProperty({__proto__:null,ExpandedEventContent:ble,default:bJe},Symbol.toStringTag,{value:"Module"})),Mtt=Em({workflowId:io().min(36,"Workflow ID must be 36 characters").max(36,"Workflow ID must be 36 characters"),expression:io().min(1,"Expression is required"),scope:io().min(1,"Scope is required"),payload:io().default("")}),RJe=Em({expression:io().min(1,"Expression is required").optional(),scope:io().min(1,"Scope is required").optional(),payload:io().optional()}),hw=b.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:je("flex min-h-9 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));hw.displayName="Textarea";function PJe({filterId:e}){const[t,n]=b.useState(!1),[r,o]=b.useState(!1),[i,a]=b.useState(null),{close:s}=d0(),{filter:l,isLoading:u}=tOe(e),{workflowIdToName:c,mutations:d}=MJ({key:`detail-${l==null?void 0:l.metadata.id}`}),h=$oe({resolver:Boe(RJe),defaultValues:{expression:l==null?void 0:l.expression,scope:l==null?void 0:l.scope,payload:JSON.stringify((l==null?void 0:l.payload)||{},null,2)}}),{register:p,handleSubmit:x,reset:y,formState:{errors:w}}=h,_=()=>{y({expression:l==null?void 0:l.expression,scope:l==null?void 0:l.scope,payload:JSON.stringify((l==null?void 0:l.payload)||{},null,2)}),a(null),n(!0)},C=b.useCallback(async R=>{if(l)try{let T;if(R.payload!==void 0)try{const k=R.payload.trim()||"{}";T=JSON.parse(k),a(null)}catch(k){if(k instanceof SyntaxError){a("The filter payload must be valid JSON");return}}await d.update.perform(l.metadata.id,{...R,payload:T}),n(!1)}catch(T){console.error("Failed to update filter:",T)}},[d.update,l]),O=()=>{n(!1),a(null),y()},P=async()=>{if(l)try{await d.delete.perform(l.metadata.id),o(!1),s()}catch(R){console.error("Failed to delete filter:",R)}};return!l||u?v.jsx("div",{children:"Loading..."}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex gap-2 pt-2",children:[t?v.jsxs(v.Fragment,{children:[v.jsx(xt,{variant:"outline",size:"sm",onClick:O,leftIcon:v.jsx(JO,{className:"size-4"}),children:"Cancel"}),v.jsx(xt,{size:"sm",onClick:x(C),disabled:d.update.isPending,leftIcon:v.jsx(Owe,{className:"size-4"}),children:d.update.isPending?"Saving...":"Save"})]}):v.jsx(xt,{variant:"outline",size:"sm",onClick:_,leftIcon:v.jsx(Awe,{className:"size-4"}),children:"Edit"}),v.jsx(xt,{variant:"destructive",size:"sm",onClick:()=>o(!0),leftIcon:v.jsx(Nwe,{className:"size-4"}),children:"Delete"})]})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"filter-id",children:"Filter ID"}),v.jsx(ri,{id:"filter-id",value:l.metadata.id,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"workflow",children:"Workflow"}),v.jsx(ri,{id:"workflow",value:c[l.workflowId]||l.workflowId,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"scope",children:"Scope"}),t?v.jsxs(v.Fragment,{children:[v.jsx(ri,{id:"scope",...p("scope"),placeholder:"Enter scope"}),w.scope&&v.jsx("p",{className:"text-sm text-red-600",children:w.scope.message})]}):v.jsx(ri,{id:"scope",value:l.scope,disabled:!0,className:"bg-muted disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"expression",children:"Expression"}),t?v.jsxs(v.Fragment,{children:[v.jsx(hw,{id:"expression",...p("expression"),placeholder:"Enter filter expression",className:"min-h-[100px] font-mono"}),w.expression&&v.jsx("p",{className:"text-sm text-red-600",children:w.expression.message})]}):v.jsx(hw,{id:"expression",value:l.expression,disabled:!0,className:"min-h-[100px] bg-muted font-mono disabled:cursor-text"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(is,{htmlFor:"payload",children:"Payload (JSON)"}),t?v.jsxs(v.Fragment,{children:[v.jsx(hw,{id:"payload",...p("payload"),placeholder:'{"key": "value"} or leave empty for {}',className:"min-h-[120px] font-mono text-sm",onChange:R=>{p("payload").onChange(R),a(null)}}),i&&v.jsx("p",{className:"text-sm text-red-600",children:i})]}):v.jsx(hw,{id:"payload",value:JSON.stringify(l.payload||{},null,2),disabled:!0,className:"min-h-[120px] bg-muted font-mono text-sm disabled:cursor-text"})]})]})]}),v.jsx(sb,{open:r,onOpenChange:o,children:v.jsxs(Ky,{children:[v.jsxs(lb,{children:[v.jsx(Yy,{children:"Delete Filter"}),v.jsx(sR,{children:"Are you sure you want to delete this filter? This action cannot be undone."})]}),v.jsxs(GQ,{children:[v.jsx(xt,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),v.jsx(xt,{variant:"destructive",onClick:P,disabled:d.delete.isPending,children:d.delete.isPending?"Deleting...":"Delete"})]})]})})]})}function TJe({scheduledRun:e}){const{tenantId:t}=ds();return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-3 border-b pb-4 text-sm",children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Workflow"}),v.jsx(Ul,{to:ft.tenantWorkflowRoute.to,params:{tenant:t,workflow:e.workflowId},className:"truncate font-medium hover:underline",children:e.workflowName}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Trigger At"}),v.jsx("span",{className:"font-medium",children:v.jsx(Dl,{date:e.triggerAt})}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Status"}),v.jsx("div",{children:v.jsx(DOe,{status:e.workflowRunStatus||"SCHEDULED"})}),e.workflowRunId&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Workflow Run"}),v.jsx(Ul,{to:ft.tenantRunRoute.to,params:{tenant:t,run:e.workflowRunId},className:"truncate font-medium hover:underline",children:e.workflowRunName||e.workflowRunId})]}),v.jsx("span",{className:"font-medium text-muted-foreground",children:"Created At"}),v.jsx("span",{className:"font-medium",children:v.jsx(Dl,{date:e.metadata.createdAt})})]}),v.jsxs("div",{className:"space-y-4",children:[e.input&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Payload"}),v.jsx(Wd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(hf,{language:"json",className:"text-xs",code:JSON.stringify(e.input,null,2)})})]}),e.additionalMetadata&&Object.keys(e.additionalMetadata).length>0&&v.jsxs("div",{children:[v.jsx("h3",{className:"mb-2 text-sm font-semibold text-foreground",children:"Metadata"}),v.jsx(Wd,{className:"mb-3"}),v.jsx("div",{className:"max-h-96 overflow-y-auto rounded-lg",children:v.jsx(hf,{language:"json",className:"text-xs",code:JSON.stringify(e.additionalMetadata,null,2)})})]})]})]})})}function AJe(e){return e===Lr.ERROR?"failed":e===Lr.OK?"successful":"queued"}function kJe(e){var r,o;const t=[],n=[...e.children];for(;n.length>0;){const i=n.pop();if(i.statusCode===Lr.ERROR&&i.statusMessage){const a=((r=i.spanAttributes)==null?void 0:r["hatchet.step_name"])??((o=i.spanAttributes)==null?void 0:o["hatchet.task_name"]);t.push({span:i,spanName:a??i.spanName,message:i.statusMessage})}n.push(...i.children)}return t.sort((i,a)=>new Date(i.span.createdAt).getTime()-new Date(a.span.createdAt).getTime()),t}const NJe="hatchet.";function MJe(e){const t=[],n=[];if(!e)return{hatchet:t,user:n};for(const[r,o]of Object.entries(e))r.startsWith(NJe)?t.push([r,o]):n.push([r,o]);return t.sort((r,o)=>r[0].localeCompare(o[0])),n.sort((r,o)=>r[0].localeCompare(o[0])),{hatchet:t,user:n}}const HG=[{columnLabel:"Key",cellRenderer:([e])=>v.jsx("span",{className:"whitespace-nowrap text-xs text-muted-foreground",children:e})},{columnLabel:"Value",cellRenderer:([,e])=>v.jsx("span",{className:"break-all text-xs",children:e})}];function jJe({span:e,onSpanSelect:t,onOpenTaskRun:n}){var w;const r=!!e.inProgress||tx(e),o=W4(r),i=tx(e),a=new Date(e.createdAt).getTime(),s=e.inProgress?Math.max(0,o-a)*1e6:e.durationNs,l=e.queuedPhase;let u=l?l.durationNs:0;if(l&&i){const _=new Date(l.createdAt).getTime();u=Math.max(0,o-_)*1e6}const c=i?{label:"Queued",variant:"queued"}:e.inProgress?{label:"In Progress",variant:"inProgress"}:{label:jre(e.statusCode),variant:AJe(e.statusCode)},{hatchet:d,user:h}=MJe(e.spanAttributes),p=(w=e.spanAttributes)==null?void 0:w["hatchet.step_run_id"],x=b.useCallback(()=>{p&&(n==null||n(p))},[p,n]),y=b.useMemo(()=>e.statusCode!==Lr.ERROR||e.children.length===0?[]:kJe(e),[e]);return v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h3",{className:"truncate font-mono text-sm font-semibold text-foreground",children:e.spanName}),v.jsx("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:e.spanId})]}),p&&v.jsx(xt,{size:"sm",variant:"outline",onClick:x,leftIcon:v.jsx(ywe,{className:"size-4"}),children:"View Task Run"})]}),v.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-3",children:[l&&v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Queue Time"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(u,{unit:"ns",precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:i?"–":Ro(s,{unit:"ns",precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Status"}),v.jsx("div",{className:"mt-0.5",children:v.jsx(Ti,{variant:c.variant,children:c.label})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Started"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:vre(e.createdAt)})]})]})]}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",children:[e.statusCode===Lr.ERROR&&e.statusMessage&&v.jsxs(EC,{variant:"destructive",children:[v.jsx(CC,{children:"Error Message"}),v.jsx(OC,{children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs",children:e.statusMessage})})]}),y.length>0&&v.jsx("div",{className:"flex flex-col gap-2",children:y.map((_,C)=>v.jsx("button",{type:"button",className:"w-full text-left",onClick:()=>t==null?void 0:t(_.span),children:v.jsxs(EC,{variant:"destructive",className:"transition-colors hover:bg-red-100 dark:hover:bg-red-950/60",children:[v.jsx(CC,{children:_.spanName}),v.jsx(OC,{children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs",children:_.message})})]})},C))}),h.length>0&&v.jsxs("div",{children:[v.jsx("h4",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Attributes"}),v.jsx(T3,{columns:HG,data:h,rowKey:([_])=>_})]}),d.length>0&&v.jsxs("div",{children:[v.jsx("h4",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Hatchet Attributes"}),v.jsx(T3,{columns:HG,data:d,rowKey:([_])=>_})]})]})]})}function IJe({group:e}){const t=e.latestEndMs-e.earliestStartMs,n=e.spans.map(a=>a.durationNs/1e6),r=n.reduce((a,s)=>a+s,0)/n.length,o=Math.min(...n),i=Math.max(...n);return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h3",{className:"truncate font-mono text-sm font-semibold text-foreground",children:e.groupName}),v.jsxs("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.totalCount.toLocaleString()," spans",e.errorCount>0&&v.jsxs("span",{className:"text-red-500",children:[" ","· ",e.errorCount.toLocaleString()," errors"]})]})]}),v.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Time Range"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(t,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Avg Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm font-medium text-foreground",children:Ro(r,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Min Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:Ro(o,{precise:!0})})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Max Duration"}),v.jsx("p",{className:"mt-0.5 font-mono text-sm text-foreground",children:Ro(i,{precise:!0})})]})]})]})}function DJe(e){return v.jsx(hke,{children:v.jsx(w4e,{...e})})}function LJe(e){const{open:t}=d0();return v.jsx(jJe,{...e,onOpenTaskRun:n=>t({type:"task-run-details",content:{taskRunId:n,showViewTaskRunButton:!0}})})}function $Je(){const[e,t]=b.useState(!1),[n,r]=b.useState([]),[o,i]=b.useState(-1),a=Vy(),s=o>=0&&o{t(!1),r([]),i(-1)},[a.pathname]);const l=b.useMemo(()=>{if(!s)return null;const y=s.type;switch(y){case"task-run-details":return{component:v.jsx(DJe,{...s.content})};case"event-details":return{component:v.jsx(ble,{event:s.content.event})};case"filter-detail":return{component:v.jsx(PJe,{filterId:s.content.filter.metadata.id})};case"scheduled-run-details":return{component:v.jsx(TJe,{scheduledRun:s.content.scheduledRun})};case"span-details":return{component:v.jsx(LJe,{...s.content})};case"group-details":return{component:v.jsx(IJe,{...s.content})};default:const w=y;throw new Error(`Unhandled action type: ${w}`)}},[s]),u=b.useCallback(y=>{r(w=>{const _=w.slice(0,o+1);return _.push(y),_}),i(w=>w+1),t(!0)},[o]),c=b.useCallback(()=>{t(!1),r([]),i(-1)},[]),d=b.useCallback(()=>{o>0&&i(y=>y-1)},[o]),h=b.useCallback(()=>{oy+1)},[o,n.length]),p=o>0,x=ov.jsx(eI,{children:v.jsx(gbe,{...e})}),notFoundComponent:()=>v.jsx(eI,{children:v.jsx(eR,{})})}),wP=tt({getParentRoute:()=>Cf,path:"auth",loader:async()=>{const e=await Zt(()=>import("./no-auth-Pb4ETRB1.js"),[]);return e.loader?e.loader():null},component:()=>v.jsx("div",{className:"h-full w-full overflow-y-auto overflow-x-hidden",children:v.jsx(ZO,{})})}),_le=tt({getParentRoute:()=>wP,path:"login",component:fn(()=>Zt(()=>import("./index-DSRJ3V8B.js"),__vite__mapDeps([0,1,2])),"default")}),Ele=tt({getParentRoute:()=>wP,path:"register",component:fn(()=>Zt(()=>import("./index-Bfpllom8.js"),__vite__mapDeps([3,1,2])),"default")}),Cle=tt({getParentRoute:()=>Cf,path:"onboarding/verify-email",loader:async()=>{const e=await Zt(()=>import("./index-BEyCp5-u.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16]));return e.loader?e.loader({request:new Request(window.location.href),params:{}}):null},component:fn(()=>Zt(()=>import("./index-BEyCp5-u.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16])),"default")}),Ole=tt({getParentRoute:()=>Ql,path:"redeem",component:fn(()=>Zt(()=>import("./index-D7XvoUmw.js"),__vite__mapDeps([17,18,19,8,16,20,10])),"default")}),hs=tt({getParentRoute:()=>Ql,path:"organizations/$organization",component:fn(()=>Zt(()=>import("./index-B-gmUf6P.js"),__vite__mapDeps([21,22,15,23])),"default")}),Zs=tt({getParentRoute:()=>hs,path:"settings",component:fn(()=>Zt(()=>import("./settings-layout-C9ou3Eyd.js"),[]),"default")}),Rle=tt({getParentRoute:()=>Zs,path:"/",component:fn(()=>Zt(()=>import("./index-Bwjif3lq.js"),__vite__mapDeps([24,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"default")}),A3=tt({getParentRoute:()=>Zs,path:"billing",component:fn(()=>Zt(()=>import("./billing-WBONcYPA.js"),__vite__mapDeps([37,35,29,30,27])),"default")}),Ple=tt({getParentRoute:()=>Zs,path:"tenants",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationTenantsPage")}),Tle=tt({getParentRoute:()=>Zs,path:"team",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationTeamPage")}),Ale=tt({getParentRoute:()=>Zs,path:"members",loader:({params:e})=>{throw cn({to:ft.organizationTeamRoute.to,params:e})}}),kle=tt({getParentRoute:()=>Zs,path:"tokens",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationTokensPage")}),Nle=tt({getParentRoute:()=>Zs,path:"regions",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationRegionsPage")}),Mle=tt({getParentRoute:()=>Zs,path:"sso",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationSsoPage")}),jle=tt({getParentRoute:()=>Zs,path:"audit-log",component:fn(()=>Zt(()=>import("./sections-Dml0nEEJ.js"),__vite__mapDeps([38,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"OrganizationAuditLogPage")}),Ile=tt({getParentRoute:()=>Zs,path:"user-groups",loader:({params:e})=>{throw cn({to:ft.organizationTeamRoute.to,params:e})}}),Dle=tt({getParentRoute:()=>hs,path:"/",loader:({params:e})=>{throw cn({to:ft.organizationsIndexRoute.to,params:e})}}),Lle=tt({getParentRoute:()=>hs,path:"billing",loader:({params:e})=>{throw cn({to:ft.organizationBillingRoute.to,params:e})}}),$le=tt({getParentRoute:()=>hs,path:"tenants",loader:({params:e})=>{throw cn({to:ft.organizationTenantsRoute.to,params:e})}}),Fle=tt({getParentRoute:()=>hs,path:"team",loader:({params:e})=>{throw cn({to:ft.organizationTeamRoute.to,params:e})}}),Ble=tt({getParentRoute:()=>hs,path:"members",loader:({params:e})=>{throw cn({to:ft.organizationTeamRoute.to,params:e})}}),zle=tt({getParentRoute:()=>hs,path:"user-groups",loader:({params:e})=>{throw cn({to:ft.organizationTeamRoute.to,params:e})}}),qle=tt({getParentRoute:()=>hs,path:"tokens",loader:({params:e})=>{throw cn({to:ft.organizationTokensRoute.to,params:e})}}),Ule=tt({getParentRoute:()=>hs,path:"regions",loader:({params:e})=>{throw cn({to:ft.organizationRegionsRoute.to,params:e})}}),Vle=tt({getParentRoute:()=>hs,path:"sso",loader:({params:e})=>{throw cn({to:ft.organizationSsoRoute.to,params:e})}}),Wle=tt({getParentRoute:()=>hs,path:"audit-log",loader:({params:e})=>{throw cn({to:ft.organizationAuditLogRoute.to,params:e})}}),E8=tt({getParentRoute:()=>Ql,path:"tenants",component:fn(()=>Zt(()=>import("./index-B-gmUf6P.js"),__vite__mapDeps([21,22,15,23])),"default")}),Hle=tt({getParentRoute:()=>E8,path:"/",component:fn(()=>Zt(()=>import("./index-BoqiiIh4.js"),__vite__mapDeps([39,25,26,27,28,7,8,29,30,9,31,32,33,34,35,36,20,10])),"default")}),Gle=tt({getParentRoute:()=>Ql,path:"organizations/new",component:fn(()=>Zt(()=>import("./index-BavpRR8e.js"),__vite__mapDeps([40,18,19,8,16,34])),"default")}),Ql=tt({getParentRoute:()=>Cf,path:"/",loader:async()=>(await Zt(()=>import("./authenticated-CYpLJHv6.js"),__vite__mapDeps([41,42,19,8,34,16,20,33,43,44,12,26,30,5,6,7,9,10,11,13,14,15,23,45]))).loader({request:new Request(window.location.href)}),component:fn(()=>Zt(()=>import("./authenticated-CYpLJHv6.js"),__vite__mapDeps([41,42,19,8,34,16,20,33,43,44,12,26,30,5,6,7,9,10,11,13,14,15,23,45])),"default"),notFoundComponent:()=>v.jsx(eR,{})}),Kle=tt({getParentRoute:()=>Ql,path:"onboarding/create-tenant",component:fn(()=>Zt(()=>import("./index-Dq1G0ZP8.js"),__vite__mapDeps([46,42,19,8,34,16,45,2])),"default"),loader:async()=>{const[{isCloudEnabled:e},{isControlPlaneEnabled:t}]=await Promise.all([Fs.fetchQuery(FO),$O()]);return Fs.fetchQuery(xL({isCloudEnabled:e,isCloudLoaded:!0,isControlPlaneEnabled:t}))}}),Yle=tt({getParentRoute:()=>Ql,path:"onboarding/create-organization",component:fn(()=>Zt(()=>import("./index-Y2aiVoiY.js"),__vite__mapDeps([47,18,19,8,16,45,2])),"default")}),Xle=tt({getParentRoute:()=>Ql,path:"onboarding/no-tenants",component:fn(()=>Zt(()=>import("./index-D46ZK8zA.js"),__vite__mapDeps([48,6,7,8,9,10])),"default")}),Qle=tt({getParentRoute:()=>Ql,path:"onboarding/invites",loader:async()=>{const e=await Zt(()=>import("./index-CgoYnKU8.js"),__vite__mapDeps([49,44,16,43,12,26]));return e.loader?e.loader({}):null},component:fn(()=>Zt(()=>import("./index-CgoYnKU8.js"),__vite__mapDeps([49,44,16,43,12,26])),"default")}),BJe=tt({getParentRoute:()=>Cf,path:"v1/*",loader:()=>{throw cn({to:ft.authenticatedRoute.to})}});async function C8(e){var o,i;const[{isCloudEnabled:t},{isControlPlaneEnabled:n}]=await Promise.all([Fs.fetchQuery(FO),$O()]);return t?((i=(o=(await Fs.fetchQuery(xL({isCloudEnabled:t,isCloudLoaded:!0,isControlPlaneEnabled:n}))).organizations)==null?void 0:o.find(a=>a.tenants.some(s=>s.id===e)))==null?void 0:i.metadata.id)??null:null}const Tn=tt({getParentRoute:()=>Ql,path:"tenants/$tenant",loader:async({params:e})=>{var o;const{isControlPlaneEnabled:t}=await $O(),{data:n}=await(t?Mt.tenantMembershipsList():ot.tenantMembershipsList());if(!!!((o=n.rows)!=null&&o.some(i=>{var a;return((a=i.tenant)==null?void 0:a.metadata.id)===e.tenant})))throw new Response("Forbidden",{status:403,statusText:"Forbidden"});if(t){await Fs.fetchQuery(lK(e.tenant,()=>Mt.exchangeTokenCreate(e.tenant).then(a=>a.data)));const i=(await ot.tenantGet(e.tenant,{xTenantId:e.tenant})).data;localStorage.setItem(lY,JSON.stringify(i)),Fs.setQueryData(["tenant:get",e.tenant],i)}else await Fs.fetchQuery({queryKey:["tenant:get",e.tenant],queryFn:async()=>(await ot.tenantGet(e.tenant)).data,retry:!1});return null},component:fn(()=>Zt(()=>import("./index-B-gmUf6P.js"),__vite__mapDeps([21,22,15,23])),"default"),notFoundComponent:()=>v.jsx(eR,{})}),zJe=tt({getParentRoute:()=>Tn,path:"/",loader:({params:e})=>{throw cn({to:ft.tenantRunsRoute.to,params:e})}}),Zle=tt({getParentRoute:()=>Tn,path:"events",component:fn(()=>Zt(()=>Promise.resolve().then(()=>OJe),void 0),"default")}),Jle=tt({getParentRoute:()=>Tn,path:"logs",component:fn(()=>Zt(()=>import("./index-2ncWJHmk.js"),[]),"default")}),eue=tt({getParentRoute:()=>Tn,path:"filters",component:fn(()=>Zt(()=>import("./index-C6BCNBHG.js"),[]),"default")}),tue=tt({getParentRoute:()=>Tn,path:"webhooks",component:fn(()=>Zt(()=>import("./index-CGgjE1le.js"),__vite__mapDeps([50,32,29])),"default")}),nue=tt({getParentRoute:()=>Tn,path:"rate-limits",component:fn(()=>Zt(()=>import("./index-CYYxHnXB.js"),__vite__mapDeps([51,52,14])),"default")}),rue=tt({getParentRoute:()=>Tn,path:"scheduled",component:fn(()=>Zt(()=>import("./index-k398qAe_.js"),__vite__mapDeps([53,35])),"default")}),oue=tt({getParentRoute:()=>Tn,path:"cron-jobs",component:fn(()=>Zt(()=>import("./index-BG4bj_5y.js"),[]),"default")}),iue=tt({getParentRoute:()=>Tn,path:"workflows",component:fn(()=>Zt(()=>import("./index-C6dA5MvO.js"),[]),"default")}),aue=tt({getParentRoute:()=>Tn,path:"workflows/$workflow",component:fn(()=>Zt(()=>import("./index-DGszS3I6.js"),__vite__mapDeps([54,35,55])),"default")}),sue=tt({getParentRoute:()=>Tn,path:"overview",component:fn(()=>Zt(()=>import("./index-D4LBFMbY.js"),__vite__mapDeps([56,15,57,16,13])),"default")}),lue=tt({getParentRoute:()=>Tn,path:"runs",component:fn(()=>Zt(()=>import("./index-Cd6hBVRN.js"),[]),"default")}),uue=tt({getParentRoute:()=>Tn,path:"runs/$run",component:fn(()=>Zt(()=>import("./index-U7cfLZjk.js"),__vite__mapDeps([58,55,59])),"default")}),cue=tt({getParentRoute:()=>Tn,path:"task-runs/$run",loader:({params:e})=>{throw cn({to:ft.tenantRunRoute.to,params:e})}}),fue=tt({getParentRoute:()=>Tn,path:"workers",component:fn(()=>Zt(()=>import("./index-ckRpuEyy.js"),[]),"default")}),due=tt({getParentRoute:()=>Tn,path:"workers/all",loader:({params:e})=>{throw cn({to:ft.tenantWorkersRoute.to,params:e})}}),hue=tt({getParentRoute:()=>Tn,path:"workers/$worker",component:fn(()=>Zt(()=>import("./index-CKvkkIkH.js"),__vite__mapDeps([60,31,55,61])),"default")}),pue=tt({getParentRoute:()=>Tn,path:"managed-workers",component:fn(()=>Zt(()=>import("./index-DjIt7K6k.js"),__vite__mapDeps([62,63,64,65,66,67])),"default")}),mue=tt({getParentRoute:()=>Tn,path:"managed-workers/demo-template",component:fn(()=>Zt(()=>import("./index-Df3PCeRG.js"),__vite__mapDeps([68,65,69,22,67,36])),"default")}),gue=tt({getParentRoute:()=>Tn,path:"managed-workers/create",component:fn(()=>Zt(()=>import("./index-VOVOHhA6.js"),__vite__mapDeps([70,63,64,65,71,69,22,10,61])),"default")}),vue=tt({getParentRoute:()=>Tn,path:"managed-workers/$managedWorker",component:fn(()=>Zt(()=>import("./index-CY7bg9j1.js"),__vite__mapDeps([72,65,66,67,71,69,22,64,10,20,35,55])),"default")}),yue=tt({getParentRoute:()=>Tn,path:"organizations-and-tenants",loader:({params:e})=>{throw cn({to:ft.tenantSettingsOrganizationRoute.to,params:e})}}),O8=tt({getParentRoute:()=>ps,path:"organization",loader:async({params:e})=>{const t=await C8(e.tenant);throw cn(t?{to:ft.organizationsIndexRoute.to,params:{organization:t}}:{to:ft.tenantsRoute.to})}}),ps=tt({getParentRoute:()=>Tn,path:"settings",component:fn(()=>Zt(()=>import("./settings-layout-C9ou3Eyd.js"),[]),"default")}),wue=tt({getParentRoute:()=>ps,path:"/",loader:({params:e})=>{throw cn({to:ft.tenantSettingsOverviewRoute.to,params:e})}}),R8=tt({getParentRoute:()=>ps,path:"overview",component:fn(()=>Zt(()=>import("./index-jA2UlkYY.js"),__vite__mapDeps([73,27,28,11,7,8,9,29])),"default")}),P8=tt({getParentRoute:()=>ps,path:"api-tokens",component:fn(()=>Zt(()=>import("./index-CIa_u54h.js"),__vite__mapDeps([74,27,57,13])),"default")}),T8=tt({getParentRoute:()=>ps,path:"github",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),A8=tt({getParentRoute:()=>ps,path:"members",component:fn(()=>Zt(()=>import("./index-DQrE5gCH.js"),__vite__mapDeps([75,27,33,35,43,26,9,10])),"default")}),k8=tt({getParentRoute:()=>ps,path:"alerting",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),N8=tt({getParentRoute:()=>ps,path:"billing-and-limits",loader:async({params:e})=>{const t=await C8(e.tenant);throw cn(t?{to:ft.organizationBillingRoute.to,params:{organization:t}}:{to:ft.tenantSettingsOverviewRoute.to,params:e})}}),M8=tt({getParentRoute:()=>ps,path:"ingestors",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),j8=tt({getParentRoute:()=>ps,path:"integrations",component:fn(()=>Zt(()=>import("./index-BKaLm0fk.js"),__vite__mapDeps([76,29,27,35])),"default")}),qJe=tt({getParentRoute:()=>Tn,path:"tenant-settings",loader:({params:e})=>{throw cn({to:ft.tenantSettingsOverviewRoute.to,params:e})}}),UJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/overview",loader:({params:e})=>{throw cn({to:ft.tenantSettingsOverviewRoute.to,params:e})}}),VJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/api-tokens",loader:({params:e})=>{throw cn({to:ft.tenantSettingsApiTokensRoute.to,params:e})}}),WJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/github",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),HJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/members",loader:({params:e})=>{throw cn({to:ft.tenantSettingsMembersRoute.to,params:e})}}),GJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/alerting",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),KJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/billing-and-limits",loader:async({params:e})=>{const t=await C8(e.tenant);throw cn(t?{to:ft.organizationBillingRoute.to,params:{organization:t}}:{to:ft.tenantSettingsOverviewRoute.to,params:e})}}),xue=tt({getParentRoute:()=>ps,path:"resource-limits",component:fn(()=>Zt(()=>import("./index-BkqnLZBk.js"),__vite__mapDeps([77,27,52,14])),"default")}),YJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/ingestors",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),XJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/integrations",loader:({params:e})=>{throw cn({to:ft.tenantSettingsIntegrationsRoute.to,params:e})}}),QJe=tt({getParentRoute:()=>Tn,path:"tenant-settings/organization",loader:({params:e})=>{throw cn({to:ft.tenantSettingsOrganizationRoute.to,params:e})}}),bue=tt({getParentRoute:()=>Tn,path:"workflow-runs",loader:({params:e})=>{throw cn({to:ft.tenantRunsRoute.to,params:e})}}),Sue=tt({getParentRoute:()=>Tn,path:"workflow-runs/$run",loader:({params:e})=>{throw cn({to:ft.tenantRunsRoute.to,params:e})}}),_ue=tt({getParentRoute:()=>Tn,path:"tasks",loader:({params:e})=>{throw cn({to:ft.tenantWorkflowsRoute.to,params:e})}}),Eue=tt({getParentRoute:()=>Tn,path:"tasks/$workflow",loader:({params:e})=>{throw cn({to:ft.tenantWorkflowRoute.to,params:e})}}),Cue=tt({getParentRoute:()=>Cf,path:"workflow-runs/$run",loader:({location:e,params:t})=>{var o,i;const n=((o=e.search)==null?void 0:o.tenantId)||((i=e.search)==null?void 0:i.tenant),r=t==null?void 0:t.run;throw!n||!r||!sY(r)?cn({to:ft.authenticatedRoute.to}):cn({to:ft.tenantRunRoute.to,params:{tenant:n,run:r}})}}),ZJe=tt({getParentRoute:()=>Cf,path:"tenant-settings",loader:({location:e})=>{var n,r;const t=((n=e.search)==null?void 0:n.tenantId)||((r=e.search)==null?void 0:r.tenant);throw cn(t?{to:ft.tenantSettingsOverviewRoute.to,params:{tenant:t}}:{to:ft.authenticatedRoute.to})}}),JJe=tt({getParentRoute:()=>Cf,path:"tenant-settings/$",loader:({params:e,location:t})=>{var i,a;const n=((i=t.search)==null?void 0:i.tenantId)||((a=t.search)==null?void 0:a.tenant),r=(e==null?void 0:e._splat)||"",o=[k8.path,P8.path,N8.path,T8.path,M8.path,j8.path,A8.path,O8.path,R8.path].map(s=>s.split("/").pop());throw!n||!r||!o.includes(r)?cn({to:ft.authenticatedRoute.to}):cn({to:`/tenants/${n}/settings/${r}`})}}),eet=[Zle,Jle,eue,tue,nue,rue,oue,iue,aue,sue,lue,uue,cue,fue,due,hue,pue,mue,gue,vue,yue,qJe,UJe,VJe,WJe,HJe,GJe,KJe,YJe,XJe,QJe,ps.addChildren([wue,R8,P8,T8,A8,k8,N8,xue,M8,j8,O8]),bue,Sue,_ue,Eue],tet=Cf.addChildren([wP.addChildren([_le,Ele]),Cle,Ql.addChildren([Kle,Yle,Xle,Qle,Ole,hs.addChildren([Zs.addChildren([Rle,A3,Ple,Tle,Ale,kle,Nle,Mle,jle,Ile]),Dle,Lle,$le,Fle,Ble,zle,qle,Ule,Vle,Wle]),Gle,E8.addChildren([Hle]),Tn.addChildren([zJe,...eet])]),BJe,Cue,ZJe,JJe]),net=_1e({routeTree:tet,defaultPreload:"intent"}),ft={rootRoute:Cf,authRoute:wP,authLoginRoute:_le,authRegisterRoute:Ele,onboardingVerifyRoute:Cle,redeemOffersRoute:Ole,organizationsRoute:hs,organizationSettingsLayoutRoute:Zs,organizationsIndexRoute:Rle,organizationBillingRoute:A3,organizationTenantsRoute:Ple,organizationTeamRoute:Tle,organizationMembersRoute:Ale,organizationTokensRoute:kle,organizationRegionsRoute:Nle,organizationSsoRoute:Mle,organizationAuditLogRoute:jle,organizationUserGroupsRoute:Ile,organizationsIndexRedirectRoute:Dle,organizationLegacyBillingRoute:Lle,organizationLegacyTenantsRoute:$le,organizationLegacyTeamRoute:Fle,organizationLegacyMembersRoute:Ble,organizationLegacyUserGroupsRoute:zle,organizationLegacyTokensRoute:qle,organizationLegacyRegionsRoute:Ule,organizationLegacySsoRoute:Vle,organizationLegacyAuditLogRoute:Wle,organizationSettingsBillingRoute:A3,organizationsNewRoute:Gle,tenantsRoute:E8,tenantsIndexRoute:Hle,authenticatedRoute:Ql,onboardingCreateTenantRoute:Kle,onboardingCreateOrganizationRoute:Yle,onboardingNoTenantsRoute:Xle,onboardingInvitesRoute:Qle,tenantRoute:Tn,tenantEventsRoute:Zle,tenantLogsRoute:Jle,tenantFiltersRoute:eue,tenantWebhooksRoute:tue,tenantRateLimitsRoute:nue,tenantScheduledRoute:rue,tenantCronJobsRoute:oue,tenantWorkflowsRoute:iue,tenantWorkflowRoute:aue,tenantOverviewRoute:sue,tenantRunsRoute:lue,tenantRunRoute:uue,tenantTaskRunsRoute:cue,tenantWorkersRoute:fue,tenantWorkersAllRoute:due,tenantWorkerRoute:hue,tenantManagedWorkersRoute:pue,tenantManagedWorkersTemplateRoute:mue,tenantManagedWorkersCreateRoute:gue,tenantManagedWorkerRoute:vue,tenantOrganizationsAndTenantsRoute:yue,tenantSettingsLayoutRoute:ps,tenantSettingsIndexRoute:wue,tenantSettingsOverviewRoute:R8,tenantSettingsApiTokensRoute:P8,tenantSettingsGithubRoute:T8,tenantSettingsMembersRoute:A8,tenantSettingsAlertingRoute:k8,tenantSettingsBillingRoute:N8,tenantSettingsResourceLimitsRoute:xue,tenantSettingsIngestorsRoute:M8,tenantSettingsIntegrationsRoute:j8,tenantSettingsOrganizationRoute:O8,tenantWorkflowRunsRedirectRoute:bue,tenantWorkflowRunRedirectRoute:Sue,tenantTasksRedirectRoute:_ue,tenantTasksWorkflowRedirectRoute:Eue,workflowRunRedirectRoute:Cue},ret=()=>v.jsx(O1e,{router:net});var Z_={},GG;function oet(){if(GG)return Z_;GG=1;var e=NY();return Z_.createRoot=e.createRoot,Z_.hydrateRoot=e.hydrateRoot,Z_}var iet=oet();const aet=Ln(iet),set=new URLSearchParams(window.location.search),KG=ide(set.get(sK));KG&&localStorage.setItem(sK,KG);aet.createRoot(document.getElementById("root")).render(v.jsx(Cpe,{client:Fs,children:v.jsx(ret,{})}));export{Ky as $,EC as A,xt as B,Z4 as C,Bxe as D,pL as E,Jy as F,rc as G,OSe as H,ri as I,Zxe as J,$xe as K,is as L,SL as M,Mn as N,Yr as O,pet as P,On as Q,J as R,Hte as S,CC as T,Uxe as U,nbe as V,PY as W,TY as X,rx as Y,AY as Z,sb as _,ot as a,HE as a$,lb as a0,Yy as a1,gJe as a2,Ti as a3,bge as a4,Sge as a5,w4 as a6,PR as a7,x4 as a8,TR as a9,xbe as aA,AL as aB,KQ as aC,d0 as aD,ey as aE,ty as aF,zet as aG,Bet as aH,ta as aI,vL as aJ,lR as aK,Dl as aL,Bl as aM,zl as aN,ql as aO,Hs as aP,f8 as aQ,d8 as aR,Dx as aS,p8 as aT,h8 as aU,m8 as aV,Iet as aW,ka as aX,Sw as aY,Qt as aZ,eRe as a_,wd as aa,Wd as ab,hw as ac,qxe as ad,LX as ae,K3 as af,xtt as ag,Ett as ah,UL as ai,TL as aj,qL as ak,mR as al,bw as am,Ott as an,yJe as ao,Att as ap,vJe as aq,Ctt as ar,EJ as as,Xet as at,eOe as au,Ket as av,Get as aw,Yet as ax,cQ as ay,Het as az,ft as b,mwe as b$,tee as b0,ctt as b1,utt as b2,JOe as b3,gb as b4,Xxe as b5,Lx as b6,Pv as b7,hf as b8,htt as b9,Qy as bA,LSe as bB,_m as bC,X4 as bD,poe as bE,Q4 as bF,moe as bG,_C as bH,Hxe as bI,o$e as bJ,Bn as bK,rR as bL,ide as bM,sK as bN,Vy as bO,eQ as bP,lY as bQ,Ntt as bR,FO as bS,Kwe as bT,zye as bU,Ai as bV,hQ as bW,V1e as bX,att as bY,rCe as bZ,oCe as b_,ptt as ba,g9 as bb,sR as bc,GQ as bd,yL as be,lwe as bf,Zet as bg,Jet as bh,JO as bi,T3 as bj,Wxe as bk,CJ as bl,ytt as bm,dtt as bn,pD as bo,zxe as bp,oQ as bq,Let as br,Vxe as bs,obe as bt,Qxe as bu,$et as bv,voe as bw,Gwe as bx,Mee as by,Xy as bz,Mt as c,Uwe as c$,cCe as c0,Cr as c1,ttt as c2,LJ as c3,BJ as c4,ebe as c5,qJ as c6,SC as c7,iQ as c8,aQ as c9,T1 as cA,eD as cB,tD as cC,stt as cD,Qwe as cE,Zwe as cF,Ia as cG,rtt as cH,ds as cI,Ywe as cJ,Xwe as cK,XSe as cL,Awe as cM,Nwe as cN,jwe as cO,Dr as cP,BO as cQ,$Oe as cR,Pee as cS,yTe as cT,VL as cU,Wwe as cV,Hwe as cW,Hp as cX,DOe as cY,nD as cZ,Vwe as c_,lle as ca,JR as cb,GQe as cc,l8 as cd,hh as ce,c8 as cf,vP as cg,km as ch,Nm as ci,xf as cj,c4e as ck,Ape as cl,VX as cm,vtt as cn,xJe as co,u4e as cp,l4e as cq,mD as cr,nwe as cs,JAe as ct,hre as cu,jJ as cv,Mtt as cw,MJ as cx,ZCe as cy,wle as cz,OC as d,l0 as d$,Yc as d0,qwe as d1,g8e as d2,m8e as d3,ktt as d4,zwe as d5,g4e as d6,Fwe as d7,Bwe as d8,Wet as d9,UFe as dA,BFe as dB,kb as dC,s7e as dD,_f as dE,Nie as dF,QFe as dG,Cie as dH,n7e as dI,Da as dJ,kie as dK,qie as dL,X7e as dM,e9e as dN,pke as dO,xZ as dP,v4e as dQ,sC as dR,FA as dS,It as dT,OY as dU,Vet as dV,Stt as dW,btt as dX,J4 as dY,DA as dZ,Wp as d_,Det as da,rC as db,Gw as dc,_a as dd,Ea as de,SD as df,i4 as dg,xle as dh,wtt as di,wJe as dj,jae as dk,lh as dl,jqe as dm,aKe as dn,u$ as dp,XR as dq,sh as dr,JFe as ds,ZFe as dt,Nb as du,sc as dv,HFe as dw,Aie as dx,aGe as dy,WFe as dz,je as e,fs as e$,O$ as e0,VFe as e1,h7e as e2,t7e as e3,S$ as e4,Mie as e5,g7e as e6,iie as e7,Y8e as e8,Uie as e9,KDe as eA,vC as eB,dre as eC,Ft as eD,Yte as eE,_L as eF,mtt as eG,w4e as eH,_4 as eI,p5e as eJ,o4e as eK,gtt as eL,Rtt as eM,Ptt as eN,Ttt as eO,_tt as eP,vb as eQ,zJ as eR,goe as eS,c_e as eT,Ws as eU,Jt as eV,Ta as eW,ji as eX,Je as eY,zn as eZ,ii as e_,l$ as ea,t9e as eb,O7e as ec,d$ as ed,Lqe as ee,Q7e as ef,ZR as eg,U7e as eh,sGe as ei,tie as ej,_$ as ek,WR as el,h$ as em,p7e as en,eie as eo,n9e as ep,qGe as eq,B9e as er,Iqe as es,Nqe as et,sKe as eu,jVe as ev,zKe as ew,Ln as ex,Nn as ey,gC as ez,$O as f,mee as f0,XY as f1,zO as f2,FX as f3,qX as f4,fwe as f5,pb as f6,KCe as f7,YCe as f8,WCe as f9,qet as fA,RQ as fB,GCe as fa,UCe as fb,kY as fc,ott as fd,L7 as fe,fR as ff,RZ as fg,PZ as fh,dR as fi,KSe as fj,Gxe as fk,Yxe as fl,ett as fm,uR as fn,Hl as fo,itt as fp,Kxe as fq,ftt as fr,Uet as fs,sQ as ft,eZe as fu,X0e as fv,Yee as fw,Ji as fx,ntt as fy,WSe as fz,Ul as g,Gl as h,L3 as i,v as j,b as k,tR as l,nR as m,HX as n,Em as o,Ir as p,Fs as q,cn as r,io as s,Boe as t,$oe as u,Kn as v,Wy as w,wL as x,Fy as y,eke as z}; diff --git a/hatchetembed/dashboard/assets/index-U7cfLZjk.js b/hatchetembed/dashboard/assets/index-U7cfLZjk.js deleted file mode 100644 index 6ef01f04ee..0000000000 --- a/hatchetembed/dashboard/assets/index-U7cfLZjk.js +++ /dev/null @@ -1,6 +0,0 @@ -var Ts=Object.defineProperty;var Ss=(e,s,a)=>s in e?Ts(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a;var pt=(e,s,a)=>Ss(e,typeof s!="symbol"?s+"":s,a);import{v as Cs,k as U,dk as As,dl as Re,dm as js,dn as Qn,dp as Jn,dq as Ie,dr as oe,ds as Xn,dt as Ls,du as Ne,dv as Os,dw as Fi,dx as Ps,dy as Zn,dz as Ms,dA as Fs,dB as Ds,dC as Bs,dD as me,dE as et,dF as Di,dG as Bi,dH as Gi,dI as Gs,dJ as re,dK as Te,dL as Vi,dM as Vs,dN as Us,cI as Ui,dO as ye,j as k,dP as zs,d6 as Ws,dQ as Ks,dR as gt,dS as Kn,N as Hn,O as mt,g as Hs,b as Yn,aL as pe,dT as X,dU as Ys,bP as zi,dV as Wi,B as $s,dW as Qs,dX as Js,b8 as $n,aD as Ki,ck as Xs,cl as Zs,a as rt,cm as eo,cn as ro,dY as nt,bw as no,cp as to,cq as ao,dZ as io,b7 as so,d_ as oo,cu as uo,d$ as fo,e0 as tt,e1 as co,e2 as lo,e3 as Hi,e4 as Yi,e5 as at,e6 as ho,e7 as vo,e8 as po,e9 as go,ea as it,eb as st,ec as mo,ed as yo,ee as $i,ef as Qi,eg as Ji,eh as Xi,ei as bo,ej as Zi,ek as _o,el as wo,em as Eo,en as xo,eo as qo,ep as ko,eq as Ro,er as Io,es as No,et as To,eu as So,ev as Co,ew as Ao,ex as jo,bW as Lo,ey as Oo,ez as Po,eA as Mo,eB as Fo,eC as Do,eD as qe,aI as Bo,d9 as Go,eE as Vo,S as Uo,eF as zo,df as yt,eG as bt,i as es,eH as Wo,eI as Ko,ab as Ho,a3 as Yo,db as _t,dc as wt,dd as ie,de as se,eJ as $o,eK as Qo,eL as Jo}from"./index-NcPpBRAY.js";import{R as Xo}from"./resource-not-found-DGbig0ge.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="9cfa85e7-c5a1-4ff2-b431-ee7a6cd4cd8d",e._sentryDebugIdIdentifier="sentry-dbid-9cfa85e7-c5a1-4ff2-b431-ee7a6cd4cd8d")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zo=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],eu=Cs("scroll-text",Zo);function ru({title:e,titleId:s,...a},n){return U.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),e?U.createElement("title",{id:s},e):null,U.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const nu=U.forwardRef(ru);var Le,Et;function tu(){if(Et)return Le;Et=1;var e=As(),s=Re(),a=js();function n(r,o){return r&&r.length?e(r,s(o,2),a):void 0}return Le=n,Le}var Oe,xt;function ot(){if(xt)return Oe;xt=1;function e(s,a){for(var n=-1,r=s==null?0:s.length;++n{const{tenantId:e}=Ui(),{workflowRun:s,workflowConfig:a,isLoading:n}=ye();return n||!s?k.jsx("div",{children:"Loading..."}):k.jsxs("div",{className:"flex flex-col gap-4",children:[k.jsx(zs,{}),k.jsx("div",{className:"flex flex-row items-center justify-between",children:k.jsxs("div",{className:"flex w-full flex-row items-center justify-between",children:[k.jsx("div",{children:k.jsxs("h2",{className:"flex flex-row items-center gap-4 text-2xl font-bold leading-tight text-foreground",children:[k.jsx(nu,{className:"mt-1 h-5 w-5"}),s.displayName]})}),k.jsxs("div",{className:"flex flex-row items-center gap-2",children:[k.jsx(Ws,{workflowConfig:a}),k.jsx(Ks,{workflowId:s.workflowId}),k.jsx(gt,{actionType:"replay",paramOverrides:{externalIds:[s.metadata.id]},disabled:!Kn.includes(s.status),showModal:!1,showLabel:!0}),k.jsx(gt,{actionType:"cancel",paramOverrides:{externalIds:[s.metadata.id]},disabled:Kn.includes(s.status),showModal:!1,showLabel:!0})]})]})}),s.parentTaskExternalId&&k.jsx(xu,{tenantId:e,parentTaskExternalId:s.parentTaskExternalId}),k.jsx("div",{className:"flex flex-row items-center gap-2",children:k.jsx(Eu,{})})]})},Eu=()=>{const{workflowRun:e}=ye(),s=[];if(!e)return null;s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Created ",k.jsx(pe,{date:e.createdAt})]},"created")),e.startedAt?s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Started ",k.jsx(pe,{date:e.startedAt})]},"started")):s.push(k.jsx("div",{className:"text-sm text-muted-foreground",children:"Running"},"running")),e.status===X.CANCELLED&&e.finishedAt&&s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Cancelled ",k.jsx(pe,{date:e.finishedAt})]},"finished")),e.status===X.FAILED&&e.finishedAt&&s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Failed ",k.jsx(pe,{date:e.finishedAt})]},"finished")),e.status===X.COMPLETED&&e.finishedAt&&s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Succeeded ",k.jsx(pe,{date:e.finishedAt})]},"finished")),e.duration&&s.push(k.jsxs("div",{className:"text-sm text-muted-foreground",children:["Run took ",Ys(e.duration)]},"duration"));const a=[];return s.forEach((n,r)=>{a.push(n),r{switch(e){case"graph":return k.jsx(Js,{});case"minimap":return k.jsx(Qs,{});case void 0:return null;default:const s=e;throw new Error(`Unhandled case: ${s}`)}},ku=()=>{const[e,s]=zi(Wi),a=e==="graph"?"minimap":"graph",{shape:n,isLoading:r,isError:o}=ye();return r||o||!n.some(d=>d.childrenStepIds.length>0)?null:k.jsx("div",{className:"sticky bottom-2 right-2 z-20 ml-auto mt-auto",children:k.jsx($s,{variant:"outline",size:"icon",onClick:()=>s(a),children:k.jsx(qu,{view:e})})})};function Ru({input:e}){return k.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:JSON.stringify(e,null,2)})}const Zt=100,Iu={};function Nu(e){return`${e.timestamp??""}-${e.line??""}`}function Tu(e){return e.map(s=>({timestamp:s.createdAt,line:s.message,level:s.level,metadata:s.metadata,attempt:s.attempt,taskExternalId:s.taskExternalId,taskDisplayName:s.taskDisplayName}))}function Su({taskExternalIds:e}){const{tenantId:s}=Ui(),a=Ki(),[n,r]=U.useState(""),o=U.useMemo(()=>Xs(n),[n]),d=e.join(","),t=Zs({queryKey:["workflow-run-logs",d,o.level,o.search,o.attempt],queryFn:async({pageParam:l})=>(await rt.v1TenantLogLineList(s,{limit:Zt,taskExternalIds:e,...l&&{until:l},...o.level&&{levels:[ro[o.level]]},...o.search&&{search:o.search},...o.attempt&&{attempt:o.attempt},order_by_direction:eo.DESC})).data,initialPageParam:void 0,getNextPageParam:l=>{const h=l.rows??[];if(!(h.length0}),u=U.useMemo(()=>{var b;const l=new Set,h=[];for(const m of((b=t.data)==null?void 0:b.pages)??[])for(const v of Tu(m.rows??[])){const y=Nu(v);l.has(y)||(l.add(y),h.push(v))}return h},[t.data]),f=U.useCallback(()=>{t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[t]),i=U.useCallback(l=>{a.open({type:"task-run-details",content:{taskRunId:l,defaultOpenTab:nt.Activity,showViewTaskRunButton:!0}})},[a]),c=!t.isLoading&&u.length===0;return k.jsxs("div",{className:"my-4 flex flex-col gap-y-2 max-h-[40rem] min-h-[25rem]",children:[k.jsx(no,{value:n,onChange:r,onSubmit:r,getAutocomplete:(l,h)=>ao(l,h),applySuggestion:to,autocompleteContext:Iu,placeholder:"Search logs...",filterChips:[{key:"level:",label:"Level",description:"Filter by log level"},{key:"attempt:",label:"Attempt",description:"Filter by attempt number"}]}),c&&k.jsx(io,{variant:"info",icon:k.jsx(eu,{className:"size-4"}),title:"Send logs to Hatchet",dismissible:!0,dismissKey:"hatchet:dismiss-logs-onboarding-hint",description:"Configure Hatchet as a log sink to view your task logs for this run.",actions:k.jsxs("a",{href:so.v1.logging.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-500 hover:underline",children:["View logging docs",k.jsx(oo,{className:"size-3"})]})}),k.jsx(uo,{logs:u,onScrollToBottom:f,isLoading:t.isLoading,onViewRun:i,showTaskName:!0,emptyMessage:"No logs found for this run."},n+d)]})}function dt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fr,ea;function Cu(){if(ea)return fr;ea=1;var e=os(),s=4;function a(n){return e(n,s)}return fr=a,fr}var cr,ra;function ds(){if(ra)return cr;ra=1;var e=fo();function s(a){return typeof a=="function"?a:e}return cr=s,cr}var lr,na;function fs(){if(na)return lr;na=1;var e=ot(),s=tt(),a=ds(),n=re();function r(o,d){var t=n(o)?e:s;return t(o,a(d))}return lr=r,lr}var hr,ta;function cs(){return ta||(ta=1,hr=fs()),hr}var vr,aa;function Au(){if(aa)return vr;aa=1;var e=tt();function s(a,n){var r=[];return e(a,function(o,d,t){n(o,d,t)&&r.push(o)}),r}return vr=s,vr}var pr,ia;function ls(){if(ia)return pr;ia=1;var e=co(),s=Au(),a=Re(),n=re();function r(o,d){var t=n(o)?e:s;return t(o,a(d,3))}return pr=r,pr}var gr,sa;function ju(){if(sa)return gr;sa=1;var e=Object.prototype,s=e.hasOwnProperty;function a(n,r){return n!=null&&s.call(n,r)}return gr=a,gr}var mr,oa;function hs(){if(oa)return mr;oa=1;var e=ju(),s=lo();function a(n,r){return n!=null&&s(n,r,e)}return mr=a,mr}var yr,ua;function Lu(){if(ua)return yr;ua=1;var e=Hi(),s=me(),a=Yi(),n=re(),r=Ne(),o=Te(),d=Xn(),t=at(),u="[object Map]",f="[object Set]",i=Object.prototype,c=i.hasOwnProperty;function l(h){if(h==null)return!0;if(r(h)&&(n(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||t(h)||a(h)))return!h.length;var b=s(h);if(b==u||b==f)return!h.size;if(d(h))return!e(h).length;for(var m in h)if(c.call(h,m))return!1;return!0}return yr=l,yr}var br,da;function vs(){if(da)return br;da=1;function e(s){return s===void 0}return br=e,br}var _r,fa;function Ou(){if(fa)return _r;fa=1;function e(s,a,n,r){var o=-1,d=s==null?0:s.length;for(r&&d&&(n=s[++o]);++o1?h.setNode(b,c):h.setNode(b)}),this},r.prototype.setNode=function(i,c){return e.has(this._nodes,i)?(arguments.length>1&&(this._nodes[i]=c),this):(this._nodes[i]=arguments.length>1?c:this._defaultNodeLabelFn(i),this._isCompound&&(this._parent[i]=a,this._children[i]={},this._children[a][i]=!0),this._in[i]={},this._preds[i]={},this._out[i]={},this._sucs[i]={},++this._nodeCount,this)},r.prototype.node=function(i){return this._nodes[i]},r.prototype.hasNode=function(i){return e.has(this._nodes,i)},r.prototype.removeNode=function(i){var c=this;if(e.has(this._nodes,i)){var l=function(h){c.removeEdge(c._edgeObjs[h])};delete this._nodes[i],this._isCompound&&(this._removeFromParentsChildList(i),delete this._parent[i],e.each(this.children(i),function(h){c.setParent(h)}),delete this._children[i]),e.each(e.keys(this._in[i]),l),delete this._in[i],delete this._preds[i],e.each(e.keys(this._out[i]),l),delete this._out[i],delete this._sucs[i],--this._nodeCount}return this},r.prototype.setParent=function(i,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=a;else{c+="";for(var l=c;!e.isUndefined(l);l=this.parent(l))if(l===i)throw new Error("Setting "+c+" as parent of "+i+" would create a cycle");this.setNode(c)}return this.setNode(i),this._removeFromParentsChildList(i),this._parent[i]=c,this._children[c][i]=!0,this},r.prototype._removeFromParentsChildList=function(i){delete this._children[this._parent[i]][i]},r.prototype.parent=function(i){if(this._isCompound){var c=this._parent[i];if(c!==a)return c}},r.prototype.children=function(i){if(e.isUndefined(i)&&(i=a),this._isCompound){var c=this._children[i];if(c)return e.keys(c)}else{if(i===a)return this.nodes();if(this.hasNode(i))return[]}},r.prototype.predecessors=function(i){var c=this._preds[i];if(c)return e.keys(c)},r.prototype.successors=function(i){var c=this._sucs[i];if(c)return e.keys(c)},r.prototype.neighbors=function(i){var c=this.predecessors(i);if(c)return e.union(c,this.successors(i))},r.prototype.isLeaf=function(i){var c;return this.isDirected()?c=this.successors(i):c=this.neighbors(i),c.length===0},r.prototype.filterNodes=function(i){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var l=this;e.each(this._nodes,function(m,v){i(v)&&c.setNode(v,m)}),e.each(this._edgeObjs,function(m){c.hasNode(m.v)&&c.hasNode(m.w)&&c.setEdge(m,l.edge(m))});var h={};function b(m){var v=l.parent(m);return v===void 0||c.hasNode(v)?(h[m]=v,v):v in h?h[v]:b(v)}return this._isCompound&&e.each(c.nodes(),function(m){c.setParent(m,b(m))}),c},r.prototype.setDefaultEdgeLabel=function(i){return e.isFunction(i)||(i=e.constant(i)),this._defaultEdgeLabelFn=i,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(i,c){var l=this,h=arguments;return e.reduce(i,function(b,m){return h.length>1?l.setEdge(b,m,c):l.setEdge(b,m),m}),this},r.prototype.setEdge=function(){var i,c,l,h,b=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(i=m.v,c=m.w,l=m.name,arguments.length===2&&(h=arguments[1],b=!0)):(i=m,c=arguments[1],l=arguments[3],arguments.length>2&&(h=arguments[2],b=!0)),i=""+i,c=""+c,e.isUndefined(l)||(l=""+l);var v=t(this._isDirected,i,c,l);if(e.has(this._edgeLabels,v))return b&&(this._edgeLabels[v]=h),this;if(!e.isUndefined(l)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(c),this._edgeLabels[v]=b?h:this._defaultEdgeLabelFn(i,c,l);var y=u(this._isDirected,i,c,l);return i=y.v,c=y.w,Object.freeze(y),this._edgeObjs[v]=y,o(this._preds[c],i),o(this._sucs[i],c),this._in[c][v]=y,this._out[i][v]=y,this._edgeCount++,this},r.prototype.edge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l);return this._edgeLabels[h]},r.prototype.hasEdge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l);return e.has(this._edgeLabels,h)},r.prototype.removeEdge=function(i,c,l){var h=arguments.length===1?f(this._isDirected,arguments[0]):t(this._isDirected,i,c,l),b=this._edgeObjs[h];return b&&(i=b.v,c=b.w,delete this._edgeLabels[h],delete this._edgeObjs[h],d(this._preds[c],i),d(this._sucs[i],c),delete this._in[c][h],delete this._out[i][h],this._edgeCount--),this},r.prototype.inEdges=function(i,c){var l=this._in[i];if(l){var h=e.values(l);return c?e.filter(h,function(b){return b.v===c}):h}},r.prototype.outEdges=function(i,c){var l=this._out[i];if(l){var h=e.values(l);return c?e.filter(h,function(b){return b.w===c}):h}},r.prototype.nodeEdges=function(i,c){var l=this.inEdges(i,c);if(l)return l.concat(this.outEdges(i,c))};function o(i,c){i[c]?i[c]++:i[c]=1}function d(i,c){--i[c]||delete i[c]}function t(i,c,l,h){var b=""+c,m=""+l;if(!i&&b>m){var v=b;b=m,m=v}return b+n+m+n+(e.isUndefined(h)?s:h)}function u(i,c,l,h){var b=""+c,m=""+l;if(!i&&b>m){var v=b;b=m,m=v}var y={v:b,w:m};return h&&(y.name=h),y}function f(i,c){return t(i,c.v,c.w,c.name)}return jr}var Lr,qa;function zu(){return qa||(qa=1,Lr="2.1.8"),Lr}var Or,ka;function Wu(){return ka||(ka=1,Or={Graph:ft(),version:zu()}),Or}var Pr,Ra;function Ku(){if(Ra)return Pr;Ra=1;var e=Q(),s=ft();Pr={write:a,read:o};function a(d){var t={options:{directed:d.isDirected(),multigraph:d.isMultigraph(),compound:d.isCompound()},nodes:n(d),edges:r(d)};return e.isUndefined(d.graph())||(t.value=e.clone(d.graph())),t}function n(d){return e.map(d.nodes(),function(t){var u=d.node(t),f=d.parent(t),i={v:t};return e.isUndefined(u)||(i.value=u),e.isUndefined(f)||(i.parent=f),i})}function r(d){return e.map(d.edges(),function(t){var u=d.edge(t),f={v:t.v,w:t.w};return e.isUndefined(t.name)||(f.name=t.name),e.isUndefined(u)||(f.value=u),f})}function o(d){var t=new s(d.options).setGraph(d.value);return e.each(d.nodes,function(u){t.setNode(u.v,u.value),u.parent&&t.setParent(u.v,u.parent)}),e.each(d.edges,function(u){t.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),t}return Pr}var Mr,Ia;function Hu(){if(Ia)return Mr;Ia=1;var e=Q();Mr=s;function s(a){var n={},r=[],o;function d(t){e.has(n,t)||(n[t]=!0,o.push(t),e.each(a.successors(t),d),e.each(a.predecessors(t),d))}return e.each(a.nodes(),function(t){o=[],d(t),o.length&&r.push(o)}),r}return Mr}var Fr,Na;function ys(){if(Na)return Fr;Na=1;var e=Q();Fr=s;function s(){this._arr=[],this._keyIndices={}}return s.prototype.size=function(){return this._arr.length},s.prototype.keys=function(){return this._arr.map(function(a){return a.key})},s.prototype.has=function(a){return e.has(this._keyIndices,a)},s.prototype.priority=function(a){var n=this._keyIndices[a];if(n!==void 0)return this._arr[n].priority},s.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},s.prototype.add=function(a,n){var r=this._keyIndices;if(a=String(a),!e.has(r,a)){var o=this._arr,d=o.length;return r[a]=d,o.push({key:a,priority:n}),this._decrease(d),!0}return!1},s.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var a=this._arr.pop();return delete this._keyIndices[a.key],this._heapify(0),a.key},s.prototype.decrease=function(a,n){var r=this._keyIndices[a];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+a+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},s.prototype._heapify=function(a){var n=this._arr,r=2*a,o=r+1,d=a;r>1,!(n[o].priority0&&(c=i.removeMin(),l=f[c],l.distance!==Number.POSITIVE_INFINITY);)u(c).forEach(h);return f}return Dr}var Br,Sa;function Yu(){if(Sa)return Br;Sa=1;var e=bs(),s=Q();Br=a;function a(n,r,o){return s.transform(n.nodes(),function(d,t){d[t]=e(n,t,r,o)},{})}return Br}var Gr,Ca;function _s(){if(Ca)return Gr;Ca=1;var e=Q();Gr=s;function s(a){var n=0,r=[],o={},d=[];function t(u){var f=o[u]={onStack:!0,lowlink:n,index:n++};if(r.push(u),a.successors(u).forEach(function(l){e.has(o,l)?o[l].onStack&&(f.lowlink=Math.min(f.lowlink,o[l].index)):(t(l),f.lowlink=Math.min(f.lowlink,o[l].lowlink))}),f.lowlink===f.index){var i=[],c;do c=r.pop(),o[c].onStack=!1,i.push(c);while(u!==c);d.push(i)}}return a.nodes().forEach(function(u){e.has(o,u)||t(u)}),d}return Gr}var Vr,Aa;function $u(){if(Aa)return Vr;Aa=1;var e=Q(),s=_s();Vr=a;function a(n){return e.filter(s(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return Vr}var Ur,ja;function Qu(){if(ja)return Ur;ja=1;var e=Q();Ur=a;var s=e.constant(1);function a(r,o,d){return n(r,o||s,d||function(t){return r.outEdges(t)})}function n(r,o,d){var t={},u=r.nodes();return u.forEach(function(f){t[f]={},t[f][f]={distance:0},u.forEach(function(i){f!==i&&(t[f][i]={distance:Number.POSITIVE_INFINITY})}),d(f).forEach(function(i){var c=i.v===f?i.w:i.v,l=o(i);t[f][c]={distance:l,predecessor:f}})}),u.forEach(function(f){var i=t[f];u.forEach(function(c){var l=t[c];u.forEach(function(h){var b=l[f],m=i[h],v=l[h],y=b.distance+m.distance;y0;){if(f=u.removeMin(),e.has(t,f))d.setEdge(f,t[f]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(f).forEach(i)}return d}return $r}var Qr,Ba;function rd(){return Ba||(Ba=1,Qr={components:Hu(),dijkstra:bs(),dijkstraAll:Yu(),findCycles:$u(),floydWarshall:Qu(),isAcyclic:Ju(),postorder:Xu(),preorder:Zu(),prim:ed(),tarjan:_s(),topsort:ws()}),Qr}var Jr,Ga;function nd(){if(Ga)return Jr;Ga=1;var e=Wu();return Jr={Graph:e.Graph,json:Ku(),alg:rd(),version:e.version},Jr}var Xr,Va;function J(){if(Va)return Xr;Va=1;var e;if(typeof dt=="function")try{e=nd()}catch{}return e||(e=window.graphlib),Xr=e,Xr}var Zr,Ua;function td(){if(Ua)return Zr;Ua=1;var e=os(),s=1,a=4;function n(r){return e(r,s|a)}return Zr=n,Zr}var en,za;function ad(){if(za)return en;za=1;var e=st(),s=Jn(),a=Ji(),n=ue(),r=Object.prototype,o=r.hasOwnProperty,d=e(function(t,u){t=Object(t);var f=-1,i=u.length,c=i>2?u[2]:void 0;for(c&&a(u[0],u[1],c)&&(i=1);++f1?o[t-1]:void 0,f=t>2?o[2]:void 0;for(u=n.length>3&&typeof u=="function"?(t--,u):void 0,f&&s(o[0],o[1],f)&&(u=t<3?void 0:u,t=1),r=Object(r);++d0;--v)if(m=i[v].dequeue(),m){l=l.concat(d(f,i,c,m,!0));break}}}return l}function d(f,i,c,l,h){var b=h?[]:void 0;return e.forEach(f.inEdges(l.v),function(m){var v=f.edge(m),y=f.node(m.v);h&&b.push({v:m.v,w:m.w}),y.out-=v,u(i,c,y)}),e.forEach(f.outEdges(l.v),function(m){var v=f.edge(m),y=m.w,p=f.node(y);p.in-=v,u(i,c,p)}),f.removeNode(l.v),b}function t(f,i){var c=new s,l=0,h=0;e.forEach(f.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(f.edges(),function(v){var y=c.edge(v.v,v.w)||0,p=i(v),g=y+p;c.setEdge(v.v,v.w,g),h=Math.max(h,c.node(v.v).out+=p),l=Math.max(l,c.node(v.w).in+=p)});var b=e.range(h+l+3).map(function(){return new a}),m=l+1;return e.forEach(c.nodes(),function(v){u(b,m,c.node(v))}),{graph:c,buckets:b,zeroIdx:m}}function u(f,i,c){c.out?c.in?f[c.out-c.in+i].enqueue(c):f[f.length-1].enqueue(c):f[0].enqueue(c)}return bn}var _n,di;function _d(){if(di)return _n;di=1;var e=G(),s=bd();_n={run:a,undo:r};function a(o){var d=o.graph().acyclicer==="greedy"?s(o,t(o)):n(o);e.forEach(d,function(u){var f=o.edge(u);o.removeEdge(u),f.forwardName=u.name,f.reversed=!0,o.setEdge(u.w,u.v,f,e.uniqueId("rev"))});function t(u){return function(f){return u.edge(f).weight}}}function n(o){var d=[],t={},u={};function f(i){e.has(u,i)||(u[i]=!0,t[i]=!0,e.forEach(o.outEdges(i),function(c){e.has(t,c.w)?d.push(c):f(c.w)}),delete t[i])}return e.forEach(o.nodes(),f),d}function r(o){e.forEach(o.edges(),function(d){var t=o.edge(d);if(t.reversed){o.removeEdge(d);var u=t.forwardName;delete t.reversed,delete t.forwardName,o.setEdge(d.w,d.v,t,u)}})}return _n}var wn,fi;function $(){if(fi)return wn;fi=1;var e=G(),s=J().Graph;wn={addDummyNode:a,simplify:n,asNonCompoundGraph:r,successorWeights:o,predecessorWeights:d,intersectRect:t,buildLayerMatrix:u,normalizeRanks:f,removeEmptyRanks:i,addBorderNode:c,maxRank:l,partition:h,time:b,notime:m};function a(v,y,p,g){var _;do _=e.uniqueId(g);while(v.hasNode(_));return p.dummy=y,v.setNode(_,p),_}function n(v){var y=new s().setGraph(v.graph());return e.forEach(v.nodes(),function(p){y.setNode(p,v.node(p))}),e.forEach(v.edges(),function(p){var g=y.edge(p.v,p.w)||{weight:0,minlen:1},_=v.edge(p);y.setEdge(p.v,p.w,{weight:g.weight+_.weight,minlen:Math.max(g.minlen,_.minlen)})}),y}function r(v){var y=new s({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(p){v.children(p).length||y.setNode(p,v.node(p))}),e.forEach(v.edges(),function(p){y.setEdge(p,v.edge(p))}),y}function o(v){var y=e.map(v.nodes(),function(p){var g={};return e.forEach(v.outEdges(p),function(_){g[_.w]=(g[_.w]||0)+v.edge(_).weight}),g});return e.zipObject(v.nodes(),y)}function d(v){var y=e.map(v.nodes(),function(p){var g={};return e.forEach(v.inEdges(p),function(_){g[_.v]=(g[_.v]||0)+v.edge(_).weight}),g});return e.zipObject(v.nodes(),y)}function t(v,y){var p=v.x,g=v.y,_=y.x-p,w=y.y-g,q=v.width/2,R=v.height/2;if(!_&&!w)throw new Error("Not possible to find intersection inside of the rectangle");var S,T;return Math.abs(w)*q>Math.abs(_)*R?(w<0&&(R=-R),S=R*_/w,T=R):(_<0&&(q=-q),S=q,T=q*w/_),{x:p+S,y:g+T}}function u(v){var y=e.map(e.range(l(v)+1),function(){return[]});return e.forEach(v.nodes(),function(p){var g=v.node(p),_=g.rank;e.isUndefined(_)||(y[_][g.order]=p)}),y}function f(v){var y=e.min(e.map(v.nodes(),function(p){return v.node(p).rank}));e.forEach(v.nodes(),function(p){var g=v.node(p);e.has(g,"rank")&&(g.rank-=y)})}function i(v){var y=e.min(e.map(v.nodes(),function(w){return v.node(w).rank})),p=[];e.forEach(v.nodes(),function(w){var q=v.node(w).rank-y;p[q]||(p[q]=[]),p[q].push(w)});var g=0,_=v.graph().nodeRankFactor;e.forEach(p,function(w,q){e.isUndefined(w)&&q%_!==0?--g:g&&e.forEach(w,function(R){v.node(R).rank+=g})})}function c(v,y,p,g){var _={width:0,height:0};return arguments.length>=4&&(_.rank=p,_.order=g),a(v,"border",_,y)}function l(v){return e.max(e.map(v.nodes(),function(y){var p=v.node(y).rank;if(!e.isUndefined(p))return p}))}function h(v,y){var p={lhs:[],rhs:[]};return e.forEach(v,function(g){y(g)?p.lhs.push(g):p.rhs.push(g)}),p}function b(v,y){var p=e.now();try{return y()}finally{console.log(v+" time: "+(e.now()-p)+"ms")}}function m(v,y){return y()}return wn}var En,ci;function wd(){if(ci)return En;ci=1;var e=G(),s=$();En={run:a,undo:r};function a(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(d){n(o,d)})}function n(o,d){var t=d.v,u=o.node(t).rank,f=d.w,i=o.node(f).rank,c=d.name,l=o.edge(d),h=l.labelRank;if(i!==u+1){o.removeEdge(d);var b,m,v;for(v=0,++u;uT.lim&&(N=T,A=!0);var j=e.filter(_.edges(),function(L){return A===p(g,g.node(L.v),N)&&A!==p(g,g.node(L.w),N)});return e.minBy(j,function(L){return a(_,L)})}function m(g,_,w,q){var R=w.v,S=w.w;g.removeEdge(R,S),g.setEdge(q.v,q.w,{}),c(g),u(g,_),v(g,_)}function v(g,_){var w=e.find(g.nodes(),function(R){return!_.node(R).parent}),q=r(g,w);q=q.slice(1),e.forEach(q,function(R){var S=g.node(R).parent,T=_.edge(R,S),N=!1;T||(T=_.edge(S,R),N=!0),_.node(R).rank=_.node(S).rank+(N?T.minlen:-T.minlen)})}function y(g,_,w){return g.hasEdge(_,w)}function p(g,_,w){return w.low<=_.lim&&_.lim<=w.lim}return kn}var Rn,pi;function xd(){if(pi)return Rn;pi=1;var e=ke(),s=e.longestPath,a=ks(),n=Ed();Rn=r;function r(u){switch(u.graph().ranker){case"network-simplex":t(u);break;case"tight-tree":d(u);break;case"longest-path":o(u);break;default:t(u)}}var o=s;function d(u){s(u),a(u)}function t(u){n(u)}return Rn}var In,gi;function qd(){if(gi)return In;gi=1;var e=G();In=s;function s(r){var o=n(r);e.forEach(r.graph().dummyChains,function(d){for(var t=r.node(d),u=t.edgeObj,f=a(r,o,u.v,u.w),i=f.path,c=f.lca,l=0,h=i[l],b=!0;d!==u.w;){if(t=r.node(d),b){for(;(h=i[l])!==c&&r.node(h).maxRanki||c>o[l].lim));for(h=l,l=t;(l=r.parent(l))!==h;)f.push(l);return{path:u.concat(f.reverse()),lca:h}}function n(r){var o={},d=0;function t(u){var f=d;e.forEach(r.children(u),t),o[u]={low:f,lim:d++}}return e.forEach(r.children(),t),o}return In}var Nn,mi;function kd(){if(mi)return Nn;mi=1;var e=G(),s=$();Nn={run:a,cleanup:d};function a(t){var u=s.addDummyNode(t,"root",{},"_root"),f=r(t),i=e.max(e.values(f))-1,c=2*i+1;t.graph().nestingRoot=u,e.forEach(t.edges(),function(h){t.edge(h).minlen*=c});var l=o(t)+1;e.forEach(t.children(),function(h){n(t,u,c,l,i,f,h)}),t.graph().nodeRankFactor=c}function n(t,u,f,i,c,l,h){var b=t.children(h);if(!b.length){h!==u&&t.setEdge(u,h,{weight:0,minlen:f});return}var m=s.addBorderNode(t,"_bt"),v=s.addBorderNode(t,"_bb"),y=t.node(h);t.setParent(m,h),y.borderTop=m,t.setParent(v,h),y.borderBottom=v,e.forEach(b,function(p){n(t,u,f,i,c,l,p);var g=t.node(p),_=g.borderTop?g.borderTop:p,w=g.borderBottom?g.borderBottom:p,q=g.borderTop?i:2*i,R=_!==w?1:c-l[h]+1;t.setEdge(m,_,{weight:q,minlen:R,nestingEdge:!0}),t.setEdge(w,v,{weight:q,minlen:R,nestingEdge:!0})}),t.parent(h)||t.setEdge(u,m,{weight:0,minlen:c+l[h]})}function r(t){var u={};function f(i,c){var l=t.children(i);l&&l.length&&e.forEach(l,function(h){f(h,c+1)}),u[i]=c}return e.forEach(t.children(),function(i){f(i,1)}),u}function o(t){return e.reduce(t.edges(),function(u,f){return u+t.edge(f).weight},0)}function d(t){var u=t.graph();t.removeNode(u.nestingRoot),delete u.nestingRoot,e.forEach(t.edges(),function(f){var i=t.edge(f);i.nestingEdge&&t.removeEdge(f)})}return Nn}var Tn,yi;function Rd(){if(yi)return Tn;yi=1;var e=G(),s=$();Tn=a;function a(r){function o(d){var t=r.children(d),u=r.node(d);if(t.length&&e.forEach(t,o),e.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var f=u.minRank,i=u.maxRank+1;f0;)h%2&&(b+=i[h+1]),h=h-1>>1,i[h]+=l.weight;c+=l.weight*b})),c}return An}var jn,Ei;function Sd(){if(Ei)return jn;Ei=1;var e=G();jn=s;function s(a,n){return e.map(n,function(r){var o=a.inEdges(r);if(o.length){var d=e.reduce(o,function(t,u){var f=a.edge(u),i=a.node(u.v);return{sum:t.sum+f.weight*i.order,weight:t.weight+f.weight}},{sum:0,weight:0});return{v:r,barycenter:d.sum/d.weight,weight:d.weight}}else return{v:r}})}return jn}var Ln,xi;function Cd(){if(xi)return Ln;xi=1;var e=G();Ln=s;function s(r,o){var d={};e.forEach(r,function(u,f){var i=d[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:f};e.isUndefined(u.barycenter)||(i.barycenter=u.barycenter,i.weight=u.weight)}),e.forEach(o.edges(),function(u){var f=d[u.v],i=d[u.w];!e.isUndefined(f)&&!e.isUndefined(i)&&(i.indegree++,f.out.push(d[u.w]))});var t=e.filter(d,function(u){return!u.indegree});return a(t)}function a(r){var o=[];function d(f){return function(i){i.merged||(e.isUndefined(i.barycenter)||e.isUndefined(f.barycenter)||i.barycenter>=f.barycenter)&&n(f,i)}}function t(f){return function(i){i.in.push(f),--i.indegree===0&&r.push(i)}}for(;r.length;){var u=r.pop();o.push(u),e.forEach(u.in.reverse(),d(u)),e.forEach(u.out,t(u))}return e.map(e.filter(o,function(f){return!f.merged}),function(f){return e.pick(f,["vs","i","barycenter","weight"])})}function n(r,o){var d=0,t=0;r.weight&&(d+=r.barycenter*r.weight,t+=r.weight),o.weight&&(d+=o.barycenter*o.weight,t+=o.weight),r.vs=o.vs.concat(r.vs),r.barycenter=d/t,r.weight=t,r.i=Math.min(o.i,r.i),o.merged=!0}return Ln}var On,qi;function Ad(){if(qi)return On;qi=1;var e=G(),s=$();On=a;function a(o,d){var t=s.partition(o,function(m){return e.has(m,"barycenter")}),u=t.lhs,f=e.sortBy(t.rhs,function(m){return-m.i}),i=[],c=0,l=0,h=0;u.sort(r(!!d)),h=n(i,f,h),e.forEach(u,function(m){h+=m.vs.length,i.push(m.vs),c+=m.barycenter*m.weight,l+=m.weight,h=n(i,f,h)});var b={vs:e.flatten(i,!0)};return l&&(b.barycenter=c/l,b.weight=l),b}function n(o,d,t){for(var u;d.length&&(u=e.last(d)).i<=t;)d.pop(),o.push(u.vs),t++;return t}function r(o){return function(d,t){return d.barycentert.barycenter?1:o?t.i-d.i:d.i-t.i}}return On}var Pn,ki;function jd(){if(ki)return Pn;ki=1;var e=G(),s=Sd(),a=Cd(),n=Ad();Pn=r;function r(t,u,f,i){var c=t.children(u),l=t.node(u),h=l?l.borderLeft:void 0,b=l?l.borderRight:void 0,m={};h&&(c=e.filter(c,function(w){return w!==h&&w!==b}));var v=s(t,c);e.forEach(v,function(w){if(t.children(w.v).length){var q=r(t,w.v,f,i);m[w.v]=q,e.has(q,"barycenter")&&d(w,q)}});var y=a(v,f);o(y,m);var p=n(y,i);if(h&&(p.vs=e.flatten([h,p.vs,b],!0),t.predecessors(h).length)){var g=t.node(t.predecessors(h)[0]),_=t.node(t.predecessors(b)[0]);e.has(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+g.order+_.order)/(p.weight+2),p.weight+=2}return p}function o(t,u){e.forEach(t,function(f){f.vs=e.flatten(f.vs.map(function(i){return u[i]?u[i].vs:i}),!0)})}function d(t,u){e.isUndefined(t.barycenter)?(t.barycenter=u.barycenter,t.weight=u.weight):(t.barycenter=(t.barycenter*t.weight+u.barycenter*u.weight)/(t.weight+u.weight),t.weight+=u.weight)}return Pn}var Mn,Ri;function Ld(){if(Ri)return Mn;Ri=1;var e=G(),s=J().Graph;Mn=a;function a(r,o,d){var t=n(r),u=new s({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(f){return r.node(f)});return e.forEach(r.nodes(),function(f){var i=r.node(f),c=r.parent(f);(i.rank===o||i.minRank<=o&&o<=i.maxRank)&&(u.setNode(f),u.setParent(f,c||t),e.forEach(r[d](f),function(l){var h=l.v===f?l.w:l.v,b=u.edge(h,f),m=e.isUndefined(b)?0:b.weight;u.setEdge(h,f,{weight:r.edge(l).weight+m})}),e.has(i,"minRank")&&u.setNode(f,{borderLeft:i.borderLeft[o],borderRight:i.borderRight[o]}))}),u}function n(r){for(var o;r.hasNode(o=e.uniqueId("_root")););return o}return Mn}var Fn,Ii;function Od(){if(Ii)return Fn;Ii=1;var e=G();Fn=s;function s(a,n,r){var o={},d;e.forEach(r,function(t){for(var u=a.parent(t),f,i;u;){if(f=a.parent(u),f?(i=o[f],o[f]=u):(i=d,d=u),i&&i!==u){n.setEdge(i,u);return}u=f}})}return Fn}var Dn,Ni;function Pd(){if(Ni)return Dn;Ni=1;var e=G(),s=Nd(),a=Td(),n=jd(),r=Ld(),o=Od(),d=J().Graph,t=$();Dn=u;function u(l){var h=t.maxRank(l),b=f(l,e.range(1,h+1),"inEdges"),m=f(l,e.range(h-1,-1,-1),"outEdges"),v=s(l);c(l,v);for(var y=Number.POSITIVE_INFINITY,p,g=0,_=0;_<4;++g,++_){i(g%2?b:m,g%4>=2),v=t.buildLayerMatrix(l);var w=a(l,v);wN)&&d(g,L,A)})})}function w(q,R){var S=-1,T,N=0;return e.forEach(R,function(A,j){if(y.node(A).dummy==="border"){var L=y.predecessors(A);L.length&&(T=y.node(L[0]).order,_(R,N,j,S,T),N=j,S=T)}_(R,N,R.length,T,q.length)}),R}return e.reduce(p,w),g}function o(y,p){if(y.node(p).dummy)return e.find(y.predecessors(p),function(g){return y.node(g).dummy})}function d(y,p,g){if(p>g){var _=p;p=g,g=_}var w=y[p];w||(y[p]=w={}),w[g]=!0}function t(y,p,g){if(p>g){var _=p;p=g,g=_}return e.has(y[p],g)}function u(y,p,g,_){var w={},q={},R={};return e.forEach(p,function(S){e.forEach(S,function(T,N){w[T]=T,q[T]=T,R[T]=N})}),e.forEach(p,function(S){var T=-1;e.forEach(S,function(N){var A=_(N);if(A.length){A=e.sortBy(A,function(z){return R[z]});for(var j=(A.length-1)/2,L=Math.floor(j),F=Math.ceil(j);L<=F;++L){var D=A[L];q[N]===N&&T{const{theme:s}=Lo(),{shape:a,taskRuns:n,taskEvents:r,isLoading:o,isError:d}=ye(),t=U.useMemo(()=>{const m=new Set;for(const v of r)v.eventType===Oo.SKIPPED&&m.add(v.taskId);return m},[r]),u=U.useMemo(()=>(a.flatMap(m=>m.childrenStepIds.map(v=>{const y=a.find(g=>g.stepId===v),p=n.find(g=>g.stepId===v);return y?{id:`${m.stepId}-${v}`,source:m.stepId,target:v,animated:(p==null?void 0:p.status)===X.RUNNING,style:s==="dark"?Pi:Mi,markerEnd:{type:Po.ArrowClosed},type:"smoothstep"}:null}))||[]).filter(m=>!!m),[a,s,n]),f=U.useMemo(()=>a.map(m=>{const v=a.some(_=>_.childrenStepIds.includes(m.stepId)),y=a.some(_=>_.stepId===m.stepId),p=n.find(_=>_.stepId===m.stepId),g={taskRun:p,graphVariant:v&&y?"default":y?"output_only":"input_only",onClick:()=>p&&e(p.metadata.id),childWorkflowsCount:(p==null?void 0:p.numSpawnedChildren)||0,taskName:m.taskName,isSkipped:p?t.has(p.metadata.id):!1};return{id:m.stepId,type:"stepNode",position:{x:0,y:0},data:g,selectable:!0}})||[],[a,n,e,t]),i=230,c=70,l=(m,v,y="LR")=>{const p=new Oi.graphlib.Graph;p.setDefaultEdgeLabel(()=>({}));const g=y==="LR";return p.setGraph({rankdir:y}),m.forEach(w=>{p.setNode(w.id,{width:i,height:c})}),v.forEach(w=>{p.setEdge(w.source,w.target)}),Oi.layout(p),{nodes:m.map(w=>{const q=p.node(w.id);return w.targetPosition=g?qe.Left:qe.Top,w.sourcePosition=g?qe.Right:qe.Bottom,w.position={x:q.x-i/2,y:q.y-c/2},{...w}}),edges:v}},{nodes:h,edges:b}=U.useMemo(()=>l(f,u),[f,u]);return o||d?null:k.jsx("div",{className:"h-[300px] w-full",children:k.jsx(Mo,{nodes:h,edges:b,nodeTypes:zd,edgeTypes:Wd,fitView:!0,proOptions:{hideAttribution:!0},onNodeClick:(m,v)=>{const y=n.find(p=>p.stepId===v.id);y&&e(y.metadata.id)},maxZoom:1,connectionLineStyle:s==="dark"?Pi:Mi,snapToGrid:!0})})};class Hd extends Error{constructor(a,n){super(a);pt(this,"status");this.status=n}}function Yd(e){switch(e){case X.COMPLETED:return"successful";case X.FAILED:return"failed";case X.CANCELLED:return"cancelled";case X.QUEUED:return"queued";case X.RUNNING:return"inProgress";default:{const s=e;throw new Error(`Unknown status: ${s}`)}}}const $d=({shape:e,handleTaskRunExpand:s})=>{const[a]=zi(Wi);return a=="graph"&&e.some(r=>r.childrenStepIds.length>0)?k.jsx(Kd,{setSelectedTaskRunId:s}):k.jsx(Jo,{onClick:r=>{r&&s(r)}})};async function Qd(e){var s;try{return await rt.v1TaskGet(e)}catch(a){if(es(a)&&((s=a.response)==null?void 0:s.status)===404)return;throw a}}async function Jd(e){var s;try{return await rt.v1WorkflowRunGet(e)}catch(a){if(es(a)&&((s=a.response)==null?void 0:s.status)===404)return;throw a}}function tf(){const e=Bo({from:Yn.tenantRunRoute.to}),{run:s}=e,a=Hn({queryKey:["workflow-run",s],queryFn:async()=>{var d;const[r,o]=await Promise.all([Qd(s),Jd(s)]);if(!r&&!o)throw new Hd(`Task or Workflow Run with ID ${s} not found`,404);if(r!=null&&r.data){const t=r.data;return{status:t.status,type:"task",task:t}}if((d=o==null?void 0:o.data)!=null&&d.run){const t=o.data;return{status:t.run.status,type:"dag",dag:t}}throw new Error(`Task or Workflow Run with ID ${s} not found`)},refetchInterval:r=>{var d;const o=(d=r.state.data)==null?void 0:d.status;return Vo(o)?5e3:1e3},retry:(r,o)=>Go(o)});if(a.isLoading)return k.jsx(Uo,{});if(a.isError){const r=zo(a.error);if(r===400||r===404)return k.jsx(Xo,{resource:"Run",primaryAction:{label:"Back to Runs",navigate:{to:Yn.tenantRunsRoute.to,params:{tenant:e.tenant}}}});throw a.error}const n=a.data;if(!n)return null;if(n.type==="task")return k.jsx(yt,{tableKey:`task-runs-${s}`,children:k.jsx(bt,{children:k.jsx(Xd,{id:s})})});if(n.type==="dag")return k.jsx(yt,{tableKey:`workflow-runs-${s}`,children:k.jsx(bt,{children:k.jsx(Zd,{id:s})})})}function Xd({id:e}){return k.jsx(Wo,{taskRunId:e,defaultOpenTab:nt.Activity})}function Zd({id:e}){const{open:s}=Ki(),a=U.useRef(!1),n=Ko(),r=n.tab??"overview",o=U.useCallback(v=>{a.current||(a.current=!0,s({type:"task-run-details",content:{taskRunId:v,defaultOpenTab:nt.Activity,showViewTaskRunButton:!0}}),setTimeout(()=>{a.current=!1},100))},[s]),{workflowRun:d,shape:t,taskRuns:u,isLoading:f,isError:i}=ye(),c=U.useMemo(()=>{const v=[],y=p=>{for(const g of p)v.push({externalId:g.metadata.id,displayName:g.displayName,status:g.status,createdAt:g.createdAt,startedAt:g.startedAt}),g.children&&y(g.children)};return y(u),v},[u]),l=U.useMemo(()=>u.map(v=>v.taskExternalId),[u]),h=U.useMemo(()=>u.filter(v=>v.isDurable).map(v=>v.taskExternalId),[u]);if(f||i||!d)return null;const b=JSON.stringify(d.input||{}),m=d.additionalMetadata;return k.jsx("div",{className:"flex h-full w-full flex-1 flex-col min-h-0",children:k.jsxs("div",{className:"mx-auto flex h-full w-full flex-1 min-h-0 flex-col px-4 pt-2 sm:px-6 lg:px-8",children:[k.jsx(wu,{}),k.jsx(Ho,{className:"my-4"}),k.jsxs("div",{className:"mb-4 flex flex-row gap-x-4",children:[k.jsx("p",{className:"font-semibold",children:"Status"}),k.jsx(Yo,{variant:Yd(d.status),children:d.status})]}),k.jsx("div",{className:"h-4"}),k.jsxs(_t,{value:r,onValueChange:n.setTab,className:"flex min-h-0 flex-1 flex-col",children:[k.jsxs(wt,{layout:"underlined",className:"mb-4",children:[k.jsx(ie,{variant:"underlined",value:"overview",children:"Overview"}),k.jsx(ie,{variant:"underlined",value:"traces",children:"Traces"}),k.jsx(ie,{variant:"underlined",value:"logs",children:"Logs"})]}),k.jsxs(se,{value:"overview",className:"flex min-h-0 flex-1 flex-col",children:[k.jsxs("div",{className:"relative flex w-full shrink-0 overflow-auto bg-slate-100 dark:bg-slate-900",children:[k.jsx($d,{shape:t,handleTaskRunExpand:o}),k.jsx(ku,{})]}),k.jsx("div",{className:"h-4"}),k.jsxs(_t,{defaultValue:"activity",className:"flex h-full flex-col min-h-0",children:[k.jsxs(wt,{layout:"underlined",children:[k.jsx(ie,{variant:"underlined",value:"activity",children:"Activity"}),k.jsx(ie,{variant:"underlined",value:"output",children:"Output"}),k.jsx(ie,{variant:"underlined",value:"input",children:"Input"}),k.jsx(ie,{variant:"underlined",value:"additional-metadata",children:"Additional Metadata"})]}),k.jsx(se,{value:"activity",className:"flex min-h-0 flex-1 flex-col py-4",children:k.jsx($o,{workflowRunId:e,fallbackTaskDisplayName:d.displayName,onClick:o,durableTaskIds:h})}),k.jsx(se,{value:"output",className:"flex min-h-0 flex-1 flex-col py-4",children:k.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:d.status===X.FAILED?d.errorMessage||"":JSON.stringify(d.output,null,2)})}),k.jsx(se,{value:"input",className:"flex min-h-0 flex-1 flex-col py-4",children:k.jsx(Ru,{input:JSON.parse(b)})}),k.jsx(se,{value:"additional-metadata",className:"flex min-h-0 flex-1 flex-col py-4",children:k.jsx($n,{className:"flex-1 min-h-0 overflow-hidden",maxHeight:"100%",minHeight:"100%",language:"json",code:JSON.stringify(m,null,2)})})]})]}),k.jsx(se,{value:"traces",className:"min-h-0 flex-1",children:k.jsx(Qo,{workflowRunExternalId:e,isRunning:!Kn.includes(d.status),tasks:c,workflowRunCreatedAt:d.metadata.createdAt,workflowRunStartedAt:d.startedAt})}),k.jsx(se,{value:"logs",children:k.jsx(Su,{taskExternalIds:l})})]})]})})}export{tf as default}; diff --git a/hatchetembed/dashboard/assets/index-VOVOHhA6.js b/hatchetembed/dashboard/assets/index-VOVOHhA6.js deleted file mode 100644 index c4dc97f3fd..0000000000 --- a/hatchetembed/dashboard/assets/index-VOVOHhA6.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,h as w,au as y,cI as j,k as u,l as h,p as k,b as I,Q as R,ab as E,c as N}from"./index-NcPpBRAY.js";import{B as v}from"./billing-required-D8JPVUCq.js";import{M as C}from"./managed-workers-gate-C-OegMsp.js";import{C as W}from"./create-worker-form-BqgLk5vw.js";import{m as D,R as L}from"./managed-compute-Dhtcalwt.js";import{F as M}from"./ServerStackIcon-CTxTfpKw.js";import"./steps-CZ8cuefp.js";import"./index-CQU71MwM.js";import"./PlusIcon-ChBf4T_m.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="60ff5b10-ed1d-4593-bd4e-1612647835e3",t._sentryDebugIdIdentifier="sentry-dbid-60ff5b10-ed1d-4593-bd4e-1612647835e3")}catch{}})();function S(){const t=w(),{tenant:n,billing:r,can:f,organizationId:o}=y(),{tenantId:s}=j(),[i,d]=u.useState(!1),[m,p]=u.useState({}),{handleApiError:l}=h({setFieldErrors:p}),[,g]=f(D.create()),x=g===L.BILLING_REQUIRED,b=async()=>{try{if(i||(d(!0),r==null||r.setPollBilling(!0),!o))return;const a=await N.billingPortalLinkGet(o);window.open(a.data.url,"_blank")}catch(a){l(a)}finally{d(!1)}},c=k({mutationKey:["managed-worker:create",s],mutationFn:async a=>(await R.managedWorkerCreate(s,a)).data,onSuccess:a=>{t({to:I.tenantManagedWorkerRoute.to,params:{tenant:s,managedWorker:a.metadata.id}})},onError:l});return x?e.jsx(v,{tenant:n,billing:r,manageClicked:b,portalLoading:i}):e.jsx("div",{className:"h-full w-full flex-grow",children:e.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"flex flex-row items-center justify-between",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsx(M,{className:"mt-1 h-6 w-6 text-foreground"}),e.jsx("h2",{className:"text-2xl font-bold leading-tight text-foreground",children:"New Service"})]})}),e.jsx(E,{className:"my-4"}),e.jsx(W,{onSubmit:c.mutate,isLoading:c.isPending,fieldErrors:m})]})})}function K(){return e.jsx(C,{children:e.jsx(S,{})})}export{K as default}; diff --git a/hatchetembed/dashboard/assets/index-Y2aiVoiY.js b/hatchetembed/dashboard/assets/index-Y2aiVoiY.js deleted file mode 100644 index 02db5ef2d1..0000000000 --- a/hatchetembed/dashboard/assets/index-Y2aiVoiY.js +++ /dev/null @@ -1 +0,0 @@ -import{h as s,n as u,bL as d,p as h,q as l,b as t,j as m,B as p,H as b,O as g}from"./index-NcPpBRAY.js";import{N as f}from"./new-organization-saver-form-B3Ag7ruu.js";import{u as y}from"./redirect-BMRF0kLa.js";import{A as k}from"./auth-layout-BYNreqC4.js";import"./welcome-modal-state-YrY6roPC.js";import"./shard-deployment-key-in4ZPoWA.js";import"./use-analytics-Jv1fF8RR.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new o.Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="4698ce69-b06e-4189-b68e-095f8fec9749",o._sentryDebugIdIdentifier="sentry-dbid-4698ce69-b06e-4189-b68e-095f8fec9749")}catch{}})();const w=JSON.parse('["0-mail.com","027168.com","0815.su","0sg.net","10mail.org","10minutemail.co.za","10minutemail.com","11mail.com","123.com","123box.net","123india.com","123mail.cl","123mail.org","123qwe.co.uk","126.com","139.com","150mail.com","150ml.com","15meg4free.com","163.com","16mail.com","188.com","189.cn","1ce.us","1chuan.com","1coolplace.com","1freeemail.com","1funplace.com","1internetdrive.com","1mail.ml","1mail.net","1me.net","1mum.com","1musicrow.com","1netdrive.com","1nsyncfan.com","1pad.de","1under.com","1webave.com","1webhighway.com","1zhuan.com","2-mail.com","20email.eu","20mail.in","20mail.it","212.com","21cn.com","24horas.com","2911.net","2980.com","2bmail.co.uk","2d2i.com","2die4.com","2trom.com","3000.it","30minutesmail.com","3126.com","321media.com","33mail.com","37.com","3ammagazine.com","3dmail.com","3email.com","3g.ua","3mail.ga","3xl.net","444.net","4email.com","4email.net","4mg.com","4newyork.com","4warding.net","4warding.org","4x4man.com","50mail.com","60minutemail.com","6ip.us","6mail.cf","6paq.com","74.ru","74gmail.com","7mail.ga","7mail.ml","88.am","8848.net","8mail.ga","8mail.ml","97rock.com","99experts.com","a45.in","aaamail.zzn.com","aamail.net","aapt.net.au","aaronkwok.net","abbeyroadlondon.co.uk","abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com","abcflash.net","abdulnour.com","aberystwyth.com","about.com","abusemail.de","abv.bg","abwesend.de","abyssmail.com","ac20mail.in","academycougars.com","acceso.or.cr","access4less.net","accessgcc.com","accountant.com","acdcfan.com","ace-of-base.com","acmemail.net","acninc.net","activist.com","adam.com.au","add3000.pp.ua","addcom.de","address.com","adelphia.net","adexec.com","adfarrow.com","adios.net","adoption.com","ados.fr","adrenalinefreak.com","advalvas.be","advantimo.com","aeiou.pt","aemail4u.com","aeneasmail.com","afreeinternet.com","africamail.com","africamel.net","ag.us.to","agoodmail.com","ahaa.dk","ahk.jp","aichi.com","aim.com","aircraftmail.com","airforce.net","airforceemail.com","airpost.net","ajacied.com","ajaxapp.net","ak47.hu","aknet.kg","albawaba.com","alex4all.com","alexandria.cc","algeria.com","alhilal.net","alibaba.com","alice.it","alive.cz","aliyun.com","allergist.com","allmail.net","alloymail.com","allracing.com","allsaintsfan.com","alpenjodel.de","alphafrau.de","alskens.dk","altavista.com","altavista.net","altavista.se","alternativagratis.com","alumni.com","alumnidirector.com","alvilag.hu","amail.com","amazonses.com","amele.com","america.hm","ameritech.net","amnetsal.com","amorki.pl","amrer.net","amuro.net","amuromail.com","ananzi.co.za","andylau.net","anfmail.com","angelfire.com","angelic.com","animail.net","animalhouse.com","animalwoman.net","anjungcafe.com","annsmail.com","ano-mail.net","anonmails.de","anonymous.to","anote.com","another.com","anotherdomaincyka.tk","anotherwin95.com","anti-social.com","antisocial.com","antispam24.de","antongijsen.com","antwerpen.com","anymoment.com","anytimenow.com","aol.com","aon.at","apexmail.com","apmail.com","apollo.lv","aport.ru","aport2000.ru","appraiser.net","approvers.net","arabia.com","arabtop.net","archaeologist.com","arcor.de","arcotronics.bg","arcticmail.com","argentina.com","aristotle.org","army.net","armyspy.com","arnet.com.ar","art-en-ligne.pro","artlover.com","artlover.com.au","as-if.com","asdasd.nl","asean-mail.com","asheville.com","asia-links.com","asia-mail.com","asiafind.com","asianavenue.com","asiancityweb.com","asiansonly.net","asianwired.net","asiapoint.net","ass.pp.ua","assala.com","assamesemail.com","astroboymail.com","astrolover.com","astrosfan.com","astrosfan.net","asurfer.com","atheist.com","athenachu.net","atina.cl","atl.lv","atlaswebmail.com","atmc.net","atozasia.com","atrus.ru","att.net","attglobal.net","attymail.com","au.ru","auctioneer.net","ausi.com","aussiemail.com.au","austin.rr.com","australia.edu","australiamail.com","austrosearch.net","autoescuelanerja.com","autograf.pl","autorambler.ru","avh.hu","avia-tonic.fr","awsom.net","axoskate.com","ayna.com","azazazatashkent.tk","azimiweb.com","azmeil.tk","bachelorboy.com","bachelorgal.com","backpackers.com","backstreet-boys.com","backstreetboysclub.com","bagherpour.com","baldmama.de","baldpapa.de","ballyfinance.com","bangkok.com","bangkok2000.com","bannertown.net","baptistmail.com","baptized.com","barcelona.com","bareed.ws","bartender.net","baseballmail.com","basketballmail.com","batuta.net","baudoinconsulting.com","bboy.zzn.com","bcvibes.com","beddly.com","beeebank.com","beenhad.com","beep.ru","beer.com","beethoven.com","belice.com","belizehome.com","bell.net","bellair.net","bellsouth.net","berlin.com","berlin.de","berlinexpo.de","bestmail.us","betriebsdirektor.de","bettergolf.net","bharatmail.com","big1.us","bigassweb.com","bigblue.net.au","bigboab.com","bigfoot.com","bigfoot.de","bigger.com","biggerbadder.com","bigmailbox.com","bigmir.net","bigpond.au","bigpond.com","bigpond.com.au","bigpond.net","bigpond.net.au","bigramp.com","bigstring.com","bikemechanics.com","bikeracer.com","bikeracers.net","bikerider.com","billsfan.com","billsfan.net","bimla.net","bin-wieder-da.de","bio-muesli.info","birdlover.com","birdowner.net","bisons.com","bitmail.com","bitpage.net","bizhosting.com","bk.ru","blackburnmail.com","blackplanet.com","blader.com","bladesmail.net","blazemail.com","bleib-bei-mir.de","blockfilter.com","blogmyway.org","bluebottle.com","bluehyppo.com","bluemail.ch","bluemail.dk","bluesfan.com","bluewin.ch","blueyonder.co.uk","blushmail.com","blutig.me","bmlsports.net","boardermail.com","boatracers.com","bodhi.lawlita.com","bol.com.br","bolando.com","bollywoodz.com","boltonfans.com","bombdiggity.com","bonbon.net","boom.com","bootmail.com","bootybay.de","bornnaked.com","bostonoffice.com","boun.cr","bounce.net","bounces.amazon.com","bouncr.com","box.az","box.ua","boxbg.com","boxemail.com","boxformail.in","boxfrog.com","boximail.com","boyzoneclub.com","bradfordfans.com","brasilia.net","brazilmail.com","brazilmail.com.br","breadtimes.press","breathe.com","brennendesreich.de","bresnan.net","brew-master.com","brew-meister.com","brfree.com.br","briefemail.com","bright.net","britneyclub.com","brittonsign.com","broadcast.net","brokenvalve.com","brusseler.com","bsdmail.com","btcmail.pw","btconnect.co.uk","btconnect.com","btinternet.com","btopenworld.co.uk","buerotiger.de","buffymail.com","bullsfan.com","bullsgame.com","bumerang.ro","bumpymail.com","bund.us","burnthespam.info","burstmail.info","buryfans.com","business-man.com","businessman.net","busta-rhymes.com","buyersusa.com","bvimailbox.com","byom.de","c2.hu","c2i.net","c3.hu","c4.com","c51vsgq.com","cabacabana.com","cable.comcast.com","cableone.net","caere.it","cairomail.com","calendar-server.bounces.google.com","calidifontain.be","californiamail.com","callnetuk.com","callsign.net","caltanet.it","camidge.com","canada-11.com","canada.com","canadianmail.com","canoemail.com","canwetalk.com","caramail.com","care2.com","careerbuildermail.com","carioca.net","cartelera.org","cartestraina.ro","casablancaresort.com","casema.nl","cash4u.com","cashette.com","casino.com","catcha.com","catchamail.com","catholic.org","catlover.com","cd2.com","celineclub.com","celtic.com","center-mail.de","centermail.at","centermail.de","centermail.info","centoper.it","centralpets.com","centrum.cz","centrum.sk","centurytel.net","certifiedmail.com","cfl.rr.com","cgac.es","cghost.s-a-d.de","chacuo.net","chaiyomail.com","chammy.info","chance2mail.com","chandrasekar.net","charmedmail.com","charter.net","chat.ru","chattown.com","chauhanweb.com","cheatmail.de","chechnya.conf.work","check.com","check1check.com","cheerful.com","chef.net","chek.com","chello.nl","chemist.com","chequemail.com","cheyenneweb.com","chez.com","chickmail.com","china.com","china.net.vg","chinamail.com","chirk.com","chocaholic.com.au","chong-mail.com","chong-mail.net","churchusa.com","cia-agent.com","cia.hu","ciaoweb.it","cicciociccio.com","cinci.rr.com","cincinow.net","citiz.net","citlink.net","citromail.hu","city-of-bath.org","city-of-birmingham.com","city-of-brighton.org","city-of-cambridge.com","city-of-coventry.com","city-of-edinburgh.com","city-of-lichfield.com","city-of-lincoln.com","city-of-liverpool.com","city-of-manchester.com","city-of-nottingham.com","city-of-oxford.com","city-of-swansea.com","city-of-westminster.com","city-of-westminster.net","city-of-york.net","cityofcardiff.net","cityoflondon.org","ckaazaza.tk","claramail.com","classicalfan.com","classicmail.co.za","clear.net.nz","clearwire.net","clerk.com","cliffhanger.com","clixser.com","close2you.net","clrmail.com","club4x4.net","clubalfa.com","clubbers.net","clubducati.com","clubhonda.net","clubmember.org","clubnetnoir.com","clubvdo.net","cluemail.com","cmail.net","cmpmail.com","cnnsimail.com","cntv.cn","codec.ro","coder.hu","coid.biz","coldmail.com","collectiblesuperstore.com","collector.org","collegeclub.com","collegemail.com","colleges.com","columbus.rr.com","columbusrr.com","columnist.com","comcast.net","comic.com","communityconnect.com","comporium.net","comprendemail.com","compuserve.com","computer-freak.com","computer4u.com","computermail.net","conexcol.com","conk.com","connect4free.net","connectbox.com","consultant.com","consumerriot.com","contractor.net","contrasto.cu.cc","cookiemonster.com","cool.br","coole-files.de","coolgoose.ca","coolgoose.com","coolkiwi.com","coollist.com","coolmail.com","coolmail.net","coolsend.com","coolsite.net","cooooool.com","cooperation.net","cooperationtogo.net","copacabana.com","copper.net","cornells.com","cornerpub.com","corporatedirtbag.com","correo.terra.com.gt","cortinet.com","cotas.net","counsellor.com","countrylover.com","cox.com","cox.net","coxinet.net","cracker.hu","crapmail.org","crazedanddazed.com","crazymailing.com","crazysexycool.com","cristianemail.com","critterpost.com","croeso.com","crosshairs.com","crosswinds.net","crwmail.com","cry4helponline.com","cs.com","csinibaba.hu","cuemail.com","curio-city.com","curryworld.de","cute-girl.com","cuteandcuddly.com","cutey.com","cww.de","cyber-africa.net","cyber-innovation.club","cyber-matrix.com","cyber-phone.eu","cyber-wizard.com","cyber4all.com","cyberbabies.com","cybercafemaui.com","cyberdude.com","cyberforeplay.net","cybergal.com","cybergrrl.com","cyberinbox.com","cyberleports.com","cybermail.net","cybernet.it","cyberservices.com","cyberspace-asia.com","cybertrains.org","cyclefanz.com","cynetcity.com","dabsol.net","dadacasa.com","daha.com","dailypioneer.com","dallasmail.com","dangerous-minds.com","dansegulvet.com","dasdasdascyka.tk","data54.com","davegracey.com","dawnsonmail.com","dawsonmail.com","dazedandconfused.com","dbzmail.com","dcemail.com","deadlymob.org","deagot.com","deal-maker.com","dearriba.com","death-star.com","deliveryman.com","deneg.net","depechemode.com","deseretmail.com","desertmail.com","desilota.com","deskpilot.com","destin.com","detik.com","deutschland-net.com","devotedcouples.com","dezigner.ru","dfwatson.com","di-ve.com","die-besten-bilder.de","die-genossen.de","die-optimisten.de","die-optimisten.net","diemailbox.de","digibel.be","digital-filestore.de","diplomats.com","directbox.com","dirtracer.com","discard.email","discard.ga","discard.gq","disciples.com","discofan.com","discoverymail.com","disign-concept.eu","disign-revelation.com","disinfo.net","dispomail.eu","disposable.com","dispose.it","dm.w3internet.co.uk","dmailman.com","dnainternet.net","dnsmadeeasy.com","doclist.bounces.google.com","docmail.cz","docs.google.com","doctor.com","dodgit.org","dodo.com.au","dodsi.com","dog.com","dogit.com","doglover.com","dogmail.co.uk","dogsnob.net","doityourself.com","domforfb1.tk","domforfb2.tk","domforfb3.tk","domforfb4.tk","domforfb5.tk","domforfb6.tk","domforfb7.tk","domforfb8.tk","domozmail.com","doneasy.com","donjuan.com","dontgotmail.com","dontmesswithtexas.com","doramail.com","dostmail.com","dotcom.fr","dotmsg.com","dott.it","download-privat.de","dplanet.ch","dr.com","dragoncon.net","dropmail.me","dropzone.com","drotposta.hu","dubaimail.com","dublin.com","dublin.ie","duck.com","dumpmail.com","dumpmail.de","dumpyemail.com","dunlopdriver.com","dunloprider.com","duno.com","duskmail.com","dutchmail.com","dwp.net","dygo.com","dynamitemail.com","dyndns.org","e-apollo.lv","e-mail.com.tr","e-mail.dk","e-mail.ru","e-mail.ua","e-mailanywhere.com","e-mails.ru","e-tapaal.com","earthalliance.com","earthcam.net","earthdome.com","earthling.net","earthlink.net","earthonline.net","eastcoast.co.za","eastmail.com","easy.to","easypost.com","easytrashmail.com","ec.rr.com","ecardmail.com","ecbsolutions.net","echina.com","ecolo-online.fr","ecompare.com","edmail.com","ednatx.com","edtnmail.com","educacao.te.pt","eelmail.com","ehmail.com","einrot.com","einrot.de","eintagsmail.de","eircom.net","elisanet.fi","elitemail.org","elsitio.com","elvis.com","elvisfan.com","email-fake.gq","email-london.co.uk","email.biz","email.cbes.net","email.com","email.cz","email.ee","email.it","email.nu","email.org","email.ro","email.ru","email.si","email.su","email.ua","email2me.net","email4u.info","emailacc.com","emailaccount.com","emailage.ga","emailage.gq","emailasso.net","emailchoice.com","emailcorner.net","emailem.com","emailengine.net","emailengine.org","emailer.hubspot.com","emailforyou.net","emailgo.de","emailgroups.net","emailinfive.com","emailit.com","emailondeck.com","emailpinoy.com","emailplanet.com","emailplus.org","emailproxsy.com","emails.ga","emails.incisivemedia.com","emails.ru","emailthe.net","emailto.de","emailuser.net","emailx.net","emailz.ga","emailz.gq","ematic.com","embarqmail.com","emeil.in","emeil.ir","emil.com","eml.cc","eml.pp.ua","end-war.com","enel.net","engineer.com","england.com","england.edu","englandmail.com","epage.ru","epatra.com","ephemail.net","epix.net","epost.de","eposta.hu","eqqu.com","eramail.co.za","eresmas.com","eriga.lv","estranet.it","ethos.st","etoast.com","etrademail.com","etranquil.com","etranquil.net","eudoramail.com","europamel.net","europe.com","europemail.com","euroseek.com","eurosport.com","every1.net","everyday.com.kh","everymail.net","everyone.net","everytg.ml","examnotes.net","excite.co.jp","excite.com","excite.it","execs.com","exemail.com.au","exg6.exghost.com","existiert.net","expressasia.com","extenda.net","extended.com","eyepaste.com","eyou.com","ezcybersearch.com","ezmail.egine.com","ezmail.ru","ezrs.com","f-m.fm","f1fans.net","facebook-email.ga","facebook.com","facebookmail.com","facebookmail.gq","fahr-zur-hoelle.org","fake-email.pp.ua","fake-mail.cf","fake-mail.ga","fake-mail.ml","fakemailz.com","falseaddress.com","fan.com","fansonlymail.com","fansworldwide.de","fantasticmail.com","farang.net","farifluset.mailexpire.com","faroweb.com","fast-email.com","fast-mail.fr","fast-mail.org","fastacura.com","fastchevy.com","fastchrysler.com","fastem.com","fastemail.us","fastemailer.com","fastermail.com","fastest.cc","fastimap.com","fastkawasaki.com","fastmail.ca","fastmail.cn","fastmail.co.uk","fastmail.com","fastmail.com.au","fastmail.es","fastmail.fm","fastmail.im","fastmail.in","fastmail.jp","fastmail.mx","fastmail.net","fastmail.nl","fastmail.se","fastmail.to","fastmail.tw","fastmail.us","fastmailbox.net","fastmazda.com","fastmessaging.com","fastmitsubishi.com","fastnissan.com","fastservice.com","fastsubaru.com","fastsuzuki.com","fasttoyota.com","fastyamaha.com","fatcock.net","fatflap.com","fathersrightsne.org","fax.ru","fbi-agent.com","fbi.hu","fdfdsfds.com","fea.st","federalcontractors.com","feinripptraeger.de","felicitymail.com","femenino.com","fetchmail.co.uk","fettabernett.de","feyenoorder.com","ffanet.com","fiberia.com","ficken.de","fightallspam.com","filipinolinks.com","financemail.net","financier.com","findmail.com","finebody.com","fire-brigade.com","fireman.net","fishburne.org","fishfuse.com","fixmail.tk","fizmail.com","flashbox.5july.org","flashmail.com","flashmail.net","fleckens.hu","flipcode.com","fmail.co.uk","fmailbox.com","fmgirl.com","fmguy.com","fnbmail.co.za","fnmail.com","folkfan.com","foodmail.com","footard.com","footballmail.com","foothills.net","for-president.com","force9.co.uk","forfree.at","forgetmail.com","fornow.eu","forpresident.com","fortuncity.com","fortunecity.com","forum.dk","foxmail.com","fr33mail.info","francemel.fr","free-email.ga","free-online.net","free-org.com","free.com.pe","free.fr","freeaccess.nl","freeaccount.com","freeandsingle.com","freedom.usa.com","freedomlover.com","freegates.be","freeghana.com","freelance-france.eu","freeler.nl","freemail.c3.hu","freemail.com.au","freemail.com.pk","freemail.de","freemail.et","freemail.gr","freemail.hu","freemail.it","freemail.lt","freemail.ms","freemail.nl","freemail.org.mk","freemails.ga","freemeil.gq","freenet.de","freenet.kg","freeola.com","freeola.net","freeserve.co.uk","freestart.hu","freesurf.fr","freesurf.nl","freeuk.com","freeuk.net","freeukisp.co.uk","freeweb.org","freewebemail.com","freeyellow.com","freezone.co.uk","fresnomail.com","freudenkinder.de","freundin.ru","friendlymail.co.uk","friends-cafe.com","friendsfan.com","from-africa.com","from-america.com","from-argentina.com","from-asia.com","from-australia.com","from-belgium.com","from-brazil.com","from-canada.com","from-china.net","from-england.com","from-europe.com","from-france.net","from-germany.net","from-holland.com","from-israel.com","from-italy.net","from-japan.net","from-korea.com","from-mexico.com","from-outerspace.com","from-russia.com","from-spain.net","fromalabama.com","fromalaska.com","fromarizona.com","fromarkansas.com","fromcalifornia.com","fromcolorado.com","fromconnecticut.com","fromdelaware.com","fromflorida.net","fromgeorgia.com","fromhawaii.net","fromidaho.com","fromillinois.com","fromindiana.com","fromiowa.com","fromjupiter.com","fromkansas.com","fromkentucky.com","fromlouisiana.com","frommaine.net","frommaryland.com","frommassachusetts.com","frommiami.com","frommichigan.com","fromminnesota.com","frommississippi.com","frommissouri.com","frommontana.com","fromnebraska.com","fromnevada.com","fromnewhampshire.com","fromnewjersey.com","fromnewmexico.com","fromnewyork.net","fromnorthcarolina.com","fromnorthdakota.com","fromohio.com","fromoklahoma.com","fromoregon.net","frompennsylvania.com","fromrhodeisland.com","fromru.com","fromsouthcarolina.com","fromsouthdakota.com","fromtennessee.com","fromtexas.com","fromthestates.com","fromutah.com","fromvermont.com","fromvirginia.com","fromwashington.com","fromwashingtondc.com","fromwestvirginia.com","fromwisconsin.com","fromwyoming.com","front.ru","frontier.com","frontiernet.net","frostbyte.uk.net","fsmail.net","ftc-i.net","ftml.net","fullmail.com","funkfan.com","fuorissimo.com","furnitureprovider.com","fuse.net","fut.es","fux0ringduh.com","fwnb.com","fxsmails.com","galaxy5.com","galaxyhit.com","gamebox.net","gamegeek.com","gamespotmail.com","gamno.config.work","garbage.com","gardener.com","gawab.com","gaybrighton.co.uk","gaza.net","gazeta.pl","gazibooks.com","gci.net","geecities.com","geek.com","geek.hu","geeklife.com","gelitik.in","gencmail.com","general-hospital.com","gentlemansclub.de","geocities.com","geography.net","geologist.com","geopia.com","germanymail.com","get.pp.ua","get1mail.com","getairmail.cf","getairmail.com","getairmail.ga","getairmail.gq","getonemail.net","ghanamail.com","ghostmail.com","ghosttexter.de","giga4u.de","gigileung.org","girl4god.com","givepeaceachance.com","glay.org","glendale.net","globalfree.it","globalpagan.com","globalsite.com.br","gmail.com","gmail.com.br","gmail.ru","gmx.at","gmx.ch","gmx.com","gmx.de","gmx.li","gmx.net","go.com","go.ro","go.ru","go2net.com","gocollege.com","gocubs.com","goemailgo.com","gofree.co.uk","gol.com","goldenmail.ru","goldmail.ru","goldtoolbox.com","golfemail.com","golfilla.info","golfmail.be","gonavy.net","goodnewsmail.com","goodstick.com","googlegroups.com","googlemail.com","goplay.com","gorillaswithdirtyarmpits.com","gorontalo.net","gospelfan.com","gothere.uk.com","gotmail.com","gotmail.org","gotomy.com","gotti.otherinbox.com","gportal.hu","graduate.org","graffiti.net","gramszu.net","grandmamail.com","grandmasmail.com","graphic-designer.com","grapplers.com","gratisweb.com","greenmail.net","groupmail.com","grr.la","grungecafe.com","gtmc.net","gua.net","guerrillamail.com","guessmail.com","guju.net","gustr.com","guy.com","guy2.com","guyanafriends.com","gyorsposta.com","gyorsposta.hu","h-mail.us","hab-verschlafen.de","habmalnefrage.de","hacccc.com","hackermail.com","hackermail.net","hailmail.net","hairdresser.net","hamptonroads.com","handbag.com","handleit.com","hang-ten.com","hanmail.net","happemail.com","happycounsel.com","happypuppy.com","harakirimail.com","hardcorefreak.com","hartbot.de","hawaii.rr.com","hawaiiantel.net","heartthrob.com","heerschap.com","heesun.net","hehe.com","hello.hu","hello.net.au","hello.to","helter-skelter.com","herediano.com","herono1.com","herp.in","herr-der-mails.de","hetnet.nl","hey.to","hhdevel.com","hidzz.com","highmilton.com","highquality.com","highveldmail.co.za","hilarious.com","hiphopfan.com","hispavista.com","hitmail.com","hitthe.net","hkg.net","hkstarphoto.com","hockeymail.com","hollywoodkids.com","home-email.com","home.de","home.nl","home.no.net","home.ro","home.se","homelocator.com","homemail.com","homestead.com","honduras.com","hongkong.com","hookup.net","hoopsmail.com","hopemail.biz","horrormail.com","hot-mail.gq","hot-shot.com","hot.ee","hotbot.com","hotbrev.com","hotfire.net","hotletter.com","hotmail.ca","hotmail.ch","hotmail.co","hotmail.co.il","hotmail.co.jp","hotmail.co.nz","hotmail.co.uk","hotmail.co.za","hotmail.com","hotmail.com.au","hotmail.com.br","hotmail.com.tr","hotmail.de","hotmail.es","hotmail.fi","hotmail.fr","hotmail.it","hotmail.kg","hotmail.kz","hotmail.nl","hotmail.ru","hotmail.se","hotpop.com","hotpop3.com","hotvoice.com","housemail.com","hsuchi.net","hu2.ru","hughes.net","humanoid.net","humn.ws.gy","hunsa.com","hurting.com","hush.com","hushmail.com","hypernautica.com","i-connect.com","i-france.com","i-mail.com.au","i-p.com","i.am","i.ua","i12.com","i2pmail.org","iamawoman.com","iamwaiting.com","iamwasted.com","iamyours.com","icestorm.com","ich-bin-verrueckt-nach-dir.de","ich-will-net.de","icloud.com","icmsconsultants.com","icq.com","icqmail.com","icrazy.com","id-base.com","ididitmyway.com","idigjesus.com","idirect.com","ieatspam.eu","ieatspam.info","ieh-mail.de","iespana.es","ifoward.com","ig.com.br","ignazio.it","ignmail.com","ihateclowns.com","ihateyoualot.info","iheartspam.org","iinet.net.au","ijustdontcare.com","ikbenspamvrij.nl","ilkposta.com","ilovechocolate.com","ilovejesus.com","ilovetocollect.net","ilse.nl","imaginemail.com","imail.ru","imailbox.com","imap-mail.com","imap.cc","imapmail.org","imel.org","imgof.com","imgv.de","immo-gerance.info","imneverwrong.com","imposter.co.uk","imstations.com","imstressed.com","imtoosexy.com","in-box.net","in2jesus.com","iname.com","inbax.tk","inbound.plus","inbox.com","inbox.net","inbox.ru","inbox.si","inboxalias.com","incamail.com","incredimail.com","indeedemail.com","index.ua","indexa.fr","india.com","indiatimes.com","indo-mail.com","indocities.com","indomail.com","indyracers.com","inerted.com","inet.com","inet.net.au","info-media.de","info-radio.ml","info66.com","infohq.com","infomail.es","infomart.or.jp","infospacemail.com","infovia.com.ar","inicia.es","inmail.sk","inmail24.com","inmano.com","inmynetwork.tk","innocent.com","inorbit.com","inoutbox.com","insidebaltimore.net","insight.rr.com","instant-mail.de","instantemailaddress.com","instantmail.fr","instruction.com","instructor.net","insurer.com","interburp.com","interfree.it","interia.pl","interlap.com.ar","intermail.co.il","internet-e-mail.com","internet-mail.org","internet-police.com","internetbiz.com","internetdrive.com","internetegypt.com","internetemails.net","internetmailing.net","internode.on.net","invalid.com","inwind.it","iobox.com","iobox.fi","iol.it","iol.pt","iowaemail.com","ip3.com","ip4.pp.ua","ip6.pp.ua","ipoo.org","iprimus.com.au","iqemail.com","irangate.net","iraqmail.com","ireland.com","irelandmail.com","iremail.de","irj.hu","iroid.com","isellcars.com","iservejesus.com","islamonline.net","isleuthmail.com","ismart.net","isonfire.com","isp9.net","israelmail.com","ist-allein.info","ist-einmalig.de","ist-ganz-allein.de","ist-willig.de","italymail.com","itloox.com","itmom.com","ivebeenframed.com","ivillage.com","iwan-fals.com","iwmail.com","iwon.com","izadpanah.com","jahoopa.com","jakuza.hu","japan.com","jaydemail.com","jazzandjava.com","jazzfan.com","jazzgame.com","je-recycle.info","jerusalemmail.com","jet-renovation.fr","jetable.de","jetable.pp.ua","jetemail.net","jippii.fi","jmail.co.za","job4u.com","jobbikszimpatizans.hu","joelonsoftware.com","joinme.com","jokes.com","jordanmail.com","journalist.com","jourrapide.com","jovem.te.pt","joymail.com","jpopmail.com","jsrsolutions.com","jubiimail.dk","jump.com","jumpy.it","juniormail.com","junk1e.com","junkmail.com","junkmail.gq","juno.com","justemail.net","justicemail.com","kaazoo.com","kaffeeschluerfer.com","kaffeeschluerfer.de","kaixo.com","kalpoint.com","kansascity.com","kapoorweb.com","karachian.com","karachioye.com","karbasi.com","katamail.com","kayafmmail.co.za","kbjrmail.com","kcks.com","keg-party.com","keinpardon.de","keko.com.ar","kellychen.com","keromail.com","keyemail.com","kgb.hu","khosropour.com","kickassmail.com","killermail.com","kimo.com","kimsdisk.com","kinglibrary.net","kinki-kids.com","kissfans.com","kittymail.com","kitznet.at","kiwibox.com","kiwitown.com","klassmaster.net","km.ru","knol-power.nl","kolumbus.fi","kommespaeter.de","konx.com","korea.com","koreamail.com","kpnmail.nl","krim.ws","krongthip.com","krunis.com","ksanmail.com","ksee24mail.com","kube93mail.com","kukamail.com","kulturbetrieb.info","kumarweb.com","kuwait-mail.com","l33r.eu","la.com","labetteraverouge.at","ladymail.cz","lagerlouts.com","lags.us","lahoreoye.com","lakmail.com","lamer.hu","land.ru","lankamail.com","laoeq.com","laposte.net","lass-es-geschehen.de","last-chance.pro","lastmail.co","latemodels.com","latinmail.com","lavache.com","law.com","lawyer.com","lazyinbox.com","leehom.net","legalactions.com","legalrc.loan","legislator.com","lenta.ru","leonlai.net","letsgomets.net","letterboxes.org","letthemeatspam.com","levele.com","levele.hu","lex.bg","lexis-nexis-mail.com","libero.it","liberomail.com","lick101.com","liebt-dich.info","linkmaster.com","linktrader.com","linuxfreemail.com","linuxmail.org","lionsfan.com.au","liontrucks.com","liquidinformation.net","list.ru","listomail.com","littleapple.com","littleblueroom.com","live.at","live.be","live.ca","live.cl","live.cn","live.co.uk","live.co.za","live.com","live.com.ar","live.com.au","live.com.mx","live.com.pt","live.com.sg","live.de","live.dk","live.fr","live.ie","live.in","live.it","live.jp","live.nl","live.no","live.ru","live.se","liveradio.tk","liverpoolfans.com","llandudno.com","llangollen.com","lmxmail.sk","lobbyist.com","localbar.com","locos.com","login-email.ga","loh.pp.ua","lolfreak.net","lolito.tk","london.com","looksmart.co.uk","looksmart.com","looksmart.com.au","lopezclub.com","louiskoo.com","love.cz","loveable.com","lovecat.com","lovefall.ml","lovefootball.com","lovelygirl.net","lovemail.com","lover-boy.com","lovergirl.com","lovesea.gq","lovethebroncos.com","lovethecowboys.com","loveyouforever.de","lovingjesus.com","lowandslow.com","lr7.us","lroid.com","luso.pt","luukku.com","luv2.us","lvie.com.sg","lycos.co.uk","lycos.com","lycos.es","lycos.it","lycos.ne.jp","lycosmail.com","m-a-i-l.com","m-hmail.com","m4.org","m4ilweb.info","mac.com","macbox.com","macfreak.com","machinecandy.com","macmail.com","madcreations.com","madonnafan.com","madrid.com","maennerversteherin.com","maennerversteherin.de","maffia.hu","magicmail.co.za","magspam.net","mahmoodweb.com","mail-awu.de","mail-box.cz","mail-center.com","mail-central.com","mail-easy.fr","mail-filter.com","mail-me.com","mail-page.com","mail-tester.com","mail.austria.com","mail.az","mail.be","mail.bg","mail.bulgaria.com","mail.by","mail.co.za","mail.com","mail.com.tr","mail.de","mail.ee","mail.entrepeneurmag.com","mail.freetown.com","mail.gr","mail.hitthebeach.com","mail.htl22.at","mail.md","mail.misterpinball.de","mail.nu","mail.org.uk","mail.pf","mail.pt","mail.r-o-o-t.com","mail.ru","mail.sisna.com","mail.svenz.eu","mail.tm","mail.usa.com","mail.vasarhely.hu","mail.wtf","mail114.net","mail15.com","mail2007.com","mail2aaron.com","mail2abby.com","mail2abc.com","mail2actor.com","mail2admiral.com","mail2adorable.com","mail2adoration.com","mail2adore.com","mail2adventure.com","mail2aeolus.com","mail2aether.com","mail2affection.com","mail2afghanistan.com","mail2africa.com","mail2agent.com","mail2aha.com","mail2ahoy.com","mail2aim.com","mail2air.com","mail2airbag.com","mail2airforce.com","mail2airport.com","mail2alabama.com","mail2alan.com","mail2alaska.com","mail2albania.com","mail2alcoholic.com","mail2alec.com","mail2alexa.com","mail2algeria.com","mail2alicia.com","mail2alien.com","mail2allan.com","mail2allen.com","mail2allison.com","mail2alpha.com","mail2alyssa.com","mail2amanda.com","mail2amazing.com","mail2amber.com","mail2america.com","mail2american.com","mail2andorra.com","mail2andrea.com","mail2andy.com","mail2anesthesiologist.com","mail2angela.com","mail2angola.com","mail2ann.com","mail2anna.com","mail2anne.com","mail2anthony.com","mail2anything.com","mail2aphrodite.com","mail2apollo.com","mail2april.com","mail2aquarius.com","mail2arabia.com","mail2arabic.com","mail2architect.com","mail2ares.com","mail2argentina.com","mail2aries.com","mail2arizona.com","mail2arkansas.com","mail2armenia.com","mail2army.com","mail2arnold.com","mail2art.com","mail2artemus.com","mail2arthur.com","mail2artist.com","mail2ashley.com","mail2ask.com","mail2astronomer.com","mail2athena.com","mail2athlete.com","mail2atlas.com","mail2atom.com","mail2attitude.com","mail2auction.com","mail2aunt.com","mail2australia.com","mail2austria.com","mail2azerbaijan.com","mail2baby.com","mail2bahamas.com","mail2bahrain.com","mail2ballerina.com","mail2ballplayer.com","mail2band.com","mail2bangladesh.com","mail2bank.com","mail2banker.com","mail2bankrupt.com","mail2baptist.com","mail2bar.com","mail2barbados.com","mail2barbara.com","mail2barter.com","mail2basketball.com","mail2batter.com","mail2beach.com","mail2beast.com","mail2beatles.com","mail2beauty.com","mail2becky.com","mail2beijing.com","mail2belgium.com","mail2belize.com","mail2ben.com","mail2bernard.com","mail2beth.com","mail2betty.com","mail2beverly.com","mail2beyond.com","mail2biker.com","mail2bill.com","mail2billionaire.com","mail2billy.com","mail2bio.com","mail2biologist.com","mail2black.com","mail2blackbelt.com","mail2blake.com","mail2blind.com","mail2blonde.com","mail2blues.com","mail2bob.com","mail2bobby.com","mail2bolivia.com","mail2bombay.com","mail2bonn.com","mail2bookmark.com","mail2boreas.com","mail2bosnia.com","mail2boston.com","mail2botswana.com","mail2bradley.com","mail2brazil.com","mail2breakfast.com","mail2brian.com","mail2bride.com","mail2brittany.com","mail2broker.com","mail2brook.com","mail2bruce.com","mail2brunei.com","mail2brunette.com","mail2brussels.com","mail2bryan.com","mail2bug.com","mail2bulgaria.com","mail2business.com","mail2buy.com","mail2ca.com","mail2california.com","mail2calvin.com","mail2cambodia.com","mail2cameroon.com","mail2canada.com","mail2cancer.com","mail2capeverde.com","mail2capricorn.com","mail2cardinal.com","mail2cardiologist.com","mail2care.com","mail2caroline.com","mail2carolyn.com","mail2casey.com","mail2cat.com","mail2caterer.com","mail2cathy.com","mail2catlover.com","mail2catwalk.com","mail2cell.com","mail2chad.com","mail2champaign.com","mail2charles.com","mail2chef.com","mail2chemist.com","mail2cherry.com","mail2chicago.com","mail2chile.com","mail2china.com","mail2chinese.com","mail2chocolate.com","mail2christian.com","mail2christie.com","mail2christmas.com","mail2christy.com","mail2chuck.com","mail2cindy.com","mail2clark.com","mail2classifieds.com","mail2claude.com","mail2cliff.com","mail2clinic.com","mail2clint.com","mail2close.com","mail2club.com","mail2coach.com","mail2coastguard.com","mail2colin.com","mail2college.com","mail2colombia.com","mail2color.com","mail2colorado.com","mail2columbia.com","mail2comedian.com","mail2composer.com","mail2computer.com","mail2computers.com","mail2concert.com","mail2congo.com","mail2connect.com","mail2connecticut.com","mail2consultant.com","mail2convict.com","mail2cook.com","mail2cool.com","mail2cory.com","mail2costarica.com","mail2country.com","mail2courtney.com","mail2cowboy.com","mail2cowgirl.com","mail2craig.com","mail2crave.com","mail2crazy.com","mail2create.com","mail2croatia.com","mail2cry.com","mail2crystal.com","mail2cuba.com","mail2culture.com","mail2curt.com","mail2customs.com","mail2cute.com","mail2cutey.com","mail2cynthia.com","mail2cyprus.com","mail2czechrepublic.com","mail2dad.com","mail2dale.com","mail2dallas.com","mail2dan.com","mail2dana.com","mail2dance.com","mail2dancer.com","mail2danielle.com","mail2danny.com","mail2darlene.com","mail2darling.com","mail2darren.com","mail2daughter.com","mail2dave.com","mail2dawn.com","mail2dc.com","mail2dealer.com","mail2deanna.com","mail2dearest.com","mail2debbie.com","mail2debby.com","mail2deer.com","mail2delaware.com","mail2delicious.com","mail2demeter.com","mail2democrat.com","mail2denise.com","mail2denmark.com","mail2dennis.com","mail2dentist.com","mail2derek.com","mail2desert.com","mail2devoted.com","mail2devotion.com","mail2diamond.com","mail2diana.com","mail2diane.com","mail2diehard.com","mail2dilemma.com","mail2dillon.com","mail2dinner.com","mail2dinosaur.com","mail2dionysos.com","mail2diplomat.com","mail2director.com","mail2dirk.com","mail2disco.com","mail2dive.com","mail2diver.com","mail2divorced.com","mail2djibouti.com","mail2doctor.com","mail2doglover.com","mail2dominic.com","mail2dominica.com","mail2dominicanrepublic.com","mail2don.com","mail2donald.com","mail2donna.com","mail2doris.com","mail2dorothy.com","mail2doug.com","mail2dough.com","mail2douglas.com","mail2dow.com","mail2downtown.com","mail2dream.com","mail2dreamer.com","mail2dude.com","mail2dustin.com","mail2dyke.com","mail2dylan.com","mail2earl.com","mail2earth.com","mail2eastend.com","mail2eat.com","mail2economist.com","mail2ecuador.com","mail2eddie.com","mail2edgar.com","mail2edwin.com","mail2egypt.com","mail2electron.com","mail2eli.com","mail2elizabeth.com","mail2ellen.com","mail2elliot.com","mail2elsalvador.com","mail2elvis.com","mail2emergency.com","mail2emily.com","mail2engineer.com","mail2english.com","mail2environmentalist.com","mail2eos.com","mail2eric.com","mail2erica.com","mail2erin.com","mail2erinyes.com","mail2eris.com","mail2eritrea.com","mail2ernie.com","mail2eros.com","mail2estonia.com","mail2ethan.com","mail2ethiopia.com","mail2eu.com","mail2europe.com","mail2eurus.com","mail2eva.com","mail2evan.com","mail2evelyn.com","mail2everything.com","mail2exciting.com","mail2expert.com","mail2fairy.com","mail2faith.com","mail2fanatic.com","mail2fancy.com","mail2fantasy.com","mail2farm.com","mail2farmer.com","mail2fashion.com","mail2fat.com","mail2feeling.com","mail2female.com","mail2fever.com","mail2fighter.com","mail2fiji.com","mail2filmfestival.com","mail2films.com","mail2finance.com","mail2finland.com","mail2fireman.com","mail2firm.com","mail2fisherman.com","mail2flexible.com","mail2florence.com","mail2florida.com","mail2floyd.com","mail2fly.com","mail2fond.com","mail2fondness.com","mail2football.com","mail2footballfan.com","mail2found.com","mail2france.com","mail2frank.com","mail2frankfurt.com","mail2franklin.com","mail2fred.com","mail2freddie.com","mail2free.com","mail2freedom.com","mail2french.com","mail2freudian.com","mail2friendship.com","mail2from.com","mail2fun.com","mail2gabon.com","mail2gabriel.com","mail2gail.com","mail2galaxy.com","mail2gambia.com","mail2games.com","mail2gary.com","mail2gavin.com","mail2gemini.com","mail2gene.com","mail2genes.com","mail2geneva.com","mail2george.com","mail2georgia.com","mail2gerald.com","mail2german.com","mail2germany.com","mail2ghana.com","mail2gilbert.com","mail2gina.com","mail2girl.com","mail2glen.com","mail2gloria.com","mail2goddess.com","mail2gold.com","mail2golfclub.com","mail2golfer.com","mail2gordon.com","mail2government.com","mail2grab.com","mail2grace.com","mail2graham.com","mail2grandma.com","mail2grandpa.com","mail2grant.com","mail2greece.com","mail2green.com","mail2greg.com","mail2grenada.com","mail2gsm.com","mail2guard.com","mail2guatemala.com","mail2guy.com","mail2hades.com","mail2haiti.com","mail2hal.com","mail2handhelds.com","mail2hank.com","mail2hannah.com","mail2harold.com","mail2harry.com","mail2hawaii.com","mail2headhunter.com","mail2heal.com","mail2heather.com","mail2heaven.com","mail2hebe.com","mail2hecate.com","mail2heidi.com","mail2helen.com","mail2hell.com","mail2help.com","mail2helpdesk.com","mail2henry.com","mail2hephaestus.com","mail2hera.com","mail2hercules.com","mail2herman.com","mail2hermes.com","mail2hespera.com","mail2hestia.com","mail2highschool.com","mail2hindu.com","mail2hip.com","mail2hiphop.com","mail2holland.com","mail2holly.com","mail2hollywood.com","mail2homer.com","mail2honduras.com","mail2honey.com","mail2hongkong.com","mail2hope.com","mail2horse.com","mail2hot.com","mail2hotel.com","mail2houston.com","mail2howard.com","mail2hugh.com","mail2human.com","mail2hungary.com","mail2hungry.com","mail2hygeia.com","mail2hyperspace.com","mail2hypnos.com","mail2ian.com","mail2ice-cream.com","mail2iceland.com","mail2idaho.com","mail2idontknow.com","mail2illinois.com","mail2imam.com","mail2in.com","mail2india.com","mail2indian.com","mail2indiana.com","mail2indonesia.com","mail2infinity.com","mail2intense.com","mail2iowa.com","mail2iran.com","mail2iraq.com","mail2ireland.com","mail2irene.com","mail2iris.com","mail2irresistible.com","mail2irving.com","mail2irwin.com","mail2isaac.com","mail2israel.com","mail2italian.com","mail2italy.com","mail2jackie.com","mail2jacob.com","mail2jail.com","mail2jaime.com","mail2jake.com","mail2jamaica.com","mail2james.com","mail2jamie.com","mail2jan.com","mail2jane.com","mail2janet.com","mail2janice.com","mail2japan.com","mail2japanese.com","mail2jasmine.com","mail2jason.com","mail2java.com","mail2jay.com","mail2jazz.com","mail2jed.com","mail2jeffrey.com","mail2jennifer.com","mail2jenny.com","mail2jeremy.com","mail2jerry.com","mail2jessica.com","mail2jessie.com","mail2jesus.com","mail2jew.com","mail2jeweler.com","mail2jim.com","mail2jimmy.com","mail2joan.com","mail2joann.com","mail2joanna.com","mail2jody.com","mail2joe.com","mail2joel.com","mail2joey.com","mail2john.com","mail2join.com","mail2jon.com","mail2jonathan.com","mail2jones.com","mail2jordan.com","mail2joseph.com","mail2josh.com","mail2joy.com","mail2juan.com","mail2judge.com","mail2judy.com","mail2juggler.com","mail2julian.com","mail2julie.com","mail2jumbo.com","mail2junk.com","mail2justin.com","mail2justme.com","mail2k.ru","mail2kansas.com","mail2karate.com","mail2karen.com","mail2karl.com","mail2karma.com","mail2kathleen.com","mail2kathy.com","mail2katie.com","mail2kay.com","mail2kazakhstan.com","mail2keen.com","mail2keith.com","mail2kelly.com","mail2kelsey.com","mail2ken.com","mail2kendall.com","mail2kennedy.com","mail2kenneth.com","mail2kenny.com","mail2kentucky.com","mail2kenya.com","mail2kerry.com","mail2kevin.com","mail2kim.com","mail2kimberly.com","mail2king.com","mail2kirk.com","mail2kiss.com","mail2kosher.com","mail2kristin.com","mail2kurt.com","mail2kuwait.com","mail2kyle.com","mail2kyrgyzstan.com","mail2la.com","mail2lacrosse.com","mail2lance.com","mail2lao.com","mail2larry.com","mail2latvia.com","mail2laugh.com","mail2laura.com","mail2lauren.com","mail2laurie.com","mail2lawrence.com","mail2lawyer.com","mail2lebanon.com","mail2lee.com","mail2leo.com","mail2leon.com","mail2leonard.com","mail2leone.com","mail2leslie.com","mail2letter.com","mail2liberia.com","mail2libertarian.com","mail2libra.com","mail2libya.com","mail2liechtenstein.com","mail2life.com","mail2linda.com","mail2linux.com","mail2lionel.com","mail2lipstick.com","mail2liquid.com","mail2lisa.com","mail2lithuania.com","mail2litigator.com","mail2liz.com","mail2lloyd.com","mail2lois.com","mail2lola.com","mail2london.com","mail2looking.com","mail2lori.com","mail2lost.com","mail2lou.com","mail2louis.com","mail2louisiana.com","mail2lovable.com","mail2love.com","mail2lucky.com","mail2lucy.com","mail2lunch.com","mail2lust.com","mail2luxembourg.com","mail2luxury.com","mail2lyle.com","mail2lynn.com","mail2madagascar.com","mail2madison.com","mail2madrid.com","mail2maggie.com","mail2mail4.com","mail2maine.com","mail2malawi.com","mail2malaysia.com","mail2maldives.com","mail2mali.com","mail2malta.com","mail2mambo.com","mail2man.com","mail2mandy.com","mail2manhunter.com","mail2mankind.com","mail2many.com","mail2marc.com","mail2marcia.com","mail2margaret.com","mail2margie.com","mail2marhaba.com","mail2maria.com","mail2marilyn.com","mail2marines.com","mail2mark.com","mail2marriage.com","mail2married.com","mail2marries.com","mail2mars.com","mail2marsha.com","mail2marshallislands.com","mail2martha.com","mail2martin.com","mail2marty.com","mail2marvin.com","mail2mary.com","mail2maryland.com","mail2mason.com","mail2massachusetts.com","mail2matt.com","mail2matthew.com","mail2maurice.com","mail2mauritania.com","mail2mauritius.com","mail2max.com","mail2maxwell.com","mail2maybe.com","mail2mba.com","mail2me4u.com","mail2mechanic.com","mail2medieval.com","mail2megan.com","mail2mel.com","mail2melanie.com","mail2melissa.com","mail2melody.com","mail2member.com","mail2memphis.com","mail2methodist.com","mail2mexican.com","mail2mexico.com","mail2mgz.com","mail2miami.com","mail2michael.com","mail2michelle.com","mail2michigan.com","mail2mike.com","mail2milan.com","mail2milano.com","mail2mildred.com","mail2milkyway.com","mail2millennium.com","mail2millionaire.com","mail2milton.com","mail2mime.com","mail2mindreader.com","mail2mini.com","mail2minister.com","mail2minneapolis.com","mail2minnesota.com","mail2miracle.com","mail2missionary.com","mail2mississippi.com","mail2missouri.com","mail2mitch.com","mail2model.com","mail2moldova.commail2molly.com","mail2mom.com","mail2monaco.com","mail2money.com","mail2mongolia.com","mail2monica.com","mail2montana.com","mail2monty.com","mail2moon.com","mail2morocco.com","mail2morpheus.com","mail2mors.com","mail2moscow.com","mail2moslem.com","mail2mouseketeer.com","mail2movies.com","mail2mozambique.com","mail2mp3.com","mail2mrright.com","mail2msright.com","mail2museum.com","mail2music.com","mail2musician.com","mail2muslim.com","mail2my.com","mail2myboat.com","mail2mycar.com","mail2mycell.com","mail2mygsm.com","mail2mylaptop.com","mail2mymac.com","mail2mypager.com","mail2mypalm.com","mail2mypc.com","mail2myphone.com","mail2myplane.com","mail2namibia.com","mail2nancy.com","mail2nasdaq.com","mail2nathan.com","mail2nauru.com","mail2navy.com","mail2neal.com","mail2nebraska.com","mail2ned.com","mail2neil.com","mail2nelson.com","mail2nemesis.com","mail2nepal.com","mail2netherlands.com","mail2network.com","mail2nevada.com","mail2newhampshire.com","mail2newjersey.com","mail2newmexico.com","mail2newyork.com","mail2newzealand.com","mail2nicaragua.com","mail2nick.com","mail2nicole.com","mail2niger.com","mail2nigeria.com","mail2nike.com","mail2no.com","mail2noah.com","mail2noel.com","mail2noelle.com","mail2normal.com","mail2norman.com","mail2northamerica.com","mail2northcarolina.com","mail2northdakota.com","mail2northpole.com","mail2norway.com","mail2notus.com","mail2noway.com","mail2nowhere.com","mail2nuclear.com","mail2nun.com","mail2ny.com","mail2oasis.com","mail2oceanographer.com","mail2ohio.com","mail2ok.com","mail2oklahoma.com","mail2oliver.com","mail2oman.com","mail2one.com","mail2onfire.com","mail2online.com","mail2oops.com","mail2open.com","mail2ophthalmologist.com","mail2optometrist.com","mail2oregon.com","mail2oscars.com","mail2oslo.com","mail2painter.com","mail2pakistan.com","mail2palau.com","mail2pan.com","mail2panama.com","mail2paraguay.com","mail2paralegal.com","mail2paris.com","mail2park.com","mail2parker.com","mail2party.com","mail2passion.com","mail2pat.com","mail2patricia.com","mail2patrick.com","mail2patty.com","mail2paul.com","mail2paula.com","mail2pay.com","mail2peace.com","mail2pediatrician.com","mail2peggy.com","mail2pennsylvania.com","mail2perry.com","mail2persephone.com","mail2persian.com","mail2peru.com","mail2pete.com","mail2peter.com","mail2pharmacist.com","mail2phil.com","mail2philippines.com","mail2phoenix.com","mail2phonecall.com","mail2phyllis.com","mail2pickup.com","mail2pilot.com","mail2pisces.com","mail2planet.com","mail2platinum.com","mail2plato.com","mail2pluto.com","mail2pm.com","mail2podiatrist.com","mail2poet.com","mail2poland.com","mail2policeman.com","mail2policewoman.com","mail2politician.com","mail2pop.com","mail2pope.com","mail2popular.com","mail2portugal.com","mail2poseidon.com","mail2potatohead.com","mail2power.com","mail2presbyterian.com","mail2president.com","mail2priest.com","mail2prince.com","mail2princess.com","mail2producer.com","mail2professor.com","mail2protect.com","mail2psychiatrist.com","mail2psycho.com","mail2psychologist.com","mail2qatar.com","mail2queen.com","mail2rabbi.com","mail2race.com","mail2racer.com","mail2rachel.com","mail2rage.com","mail2rainmaker.com","mail2ralph.com","mail2randy.com","mail2rap.com","mail2rare.com","mail2rave.com","mail2ray.com","mail2raymond.com","mail2realtor.com","mail2rebecca.com","mail2recruiter.com","mail2recycle.com","mail2redhead.com","mail2reed.com","mail2reggie.com","mail2register.com","mail2rent.com","mail2republican.com","mail2resort.com","mail2rex.com","mail2rhodeisland.com","mail2rich.com","mail2richard.com","mail2ricky.com","mail2ride.com","mail2riley.com","mail2rita.com","mail2rob.com","mail2robert.com","mail2roberta.com","mail2robin.com","mail2rock.com","mail2rocker.com","mail2rod.com","mail2rodney.com","mail2romania.com","mail2rome.com","mail2ron.com","mail2ronald.com","mail2ronnie.com","mail2rose.com","mail2rosie.com","mail2roy.com","mail2rss.org","mail2rudy.com","mail2rugby.com","mail2runner.com","mail2russell.com","mail2russia.com","mail2russian.com","mail2rusty.com","mail2ruth.com","mail2rwanda.com","mail2ryan.com","mail2sa.com","mail2sabrina.com","mail2safe.com","mail2sagittarius.com","mail2sail.com","mail2sailor.com","mail2sal.com","mail2salaam.com","mail2sam.com","mail2samantha.com","mail2samoa.com","mail2samurai.com","mail2sandra.com","mail2sandy.com","mail2sanfrancisco.com","mail2sanmarino.com","mail2santa.com","mail2sara.com","mail2sarah.com","mail2sat.com","mail2saturn.com","mail2saudi.com","mail2saudiarabia.com","mail2save.com","mail2savings.com","mail2school.com","mail2scientist.com","mail2scorpio.com","mail2scott.com","mail2sean.com","mail2search.com","mail2seattle.com","mail2secretagent.com","mail2senate.com","mail2senegal.com","mail2sensual.com","mail2seth.com","mail2sevenseas.com","mail2sexy.com","mail2seychelles.com","mail2shane.com","mail2sharon.com","mail2shawn.com","mail2ship.com","mail2shirley.com","mail2shoot.com","mail2shuttle.com","mail2sierraleone.com","mail2simon.com","mail2singapore.com","mail2single.com","mail2site.com","mail2skater.com","mail2skier.com","mail2sky.com","mail2sleek.com","mail2slim.com","mail2slovakia.com","mail2slovenia.com","mail2smile.com","mail2smith.com","mail2smooth.com","mail2soccer.com","mail2soccerfan.com","mail2socialist.com","mail2soldier.com","mail2somalia.com","mail2son.com","mail2song.com","mail2sos.com","mail2sound.com","mail2southafrica.com","mail2southamerica.com","mail2southcarolina.com","mail2southdakota.com","mail2southkorea.com","mail2southpole.com","mail2spain.com","mail2spanish.com","mail2spare.com","mail2spectrum.com","mail2splash.com","mail2sponsor.com","mail2sports.com","mail2srilanka.com","mail2stacy.com","mail2stan.com","mail2stanley.com","mail2star.com","mail2state.com","mail2stephanie.com","mail2steve.com","mail2steven.com","mail2stewart.com","mail2stlouis.com","mail2stock.com","mail2stockholm.com","mail2stockmarket.com","mail2storage.com","mail2store.com","mail2strong.com","mail2student.com","mail2studio.com","mail2studio54.com","mail2stuntman.com","mail2subscribe.com","mail2sudan.com","mail2superstar.com","mail2surfer.com","mail2suriname.com","mail2susan.com","mail2suzie.com","mail2swaziland.com","mail2sweden.com","mail2sweetheart.com","mail2swim.com","mail2swimmer.com","mail2swiss.com","mail2switzerland.com","mail2sydney.com","mail2sylvia.com","mail2syria.com","mail2taboo.com","mail2taiwan.com","mail2tajikistan.com","mail2tammy.com","mail2tango.com","mail2tanya.com","mail2tanzania.com","mail2tara.com","mail2taurus.com","mail2taxi.com","mail2taxidermist.com","mail2taylor.com","mail2taz.com","mail2teacher.com","mail2technician.com","mail2ted.com","mail2telephone.com","mail2teletubbie.com","mail2tenderness.com","mail2tennessee.com","mail2tennis.com","mail2tennisfan.com","mail2terri.com","mail2terry.com","mail2test.com","mail2texas.com","mail2thailand.com","mail2therapy.com","mail2think.com","mail2tickets.com","mail2tiffany.com","mail2tim.com","mail2time.com","mail2timothy.com","mail2tina.com","mail2titanic.com","mail2toby.com","mail2todd.com","mail2togo.com","mail2tom.com","mail2tommy.com","mail2tonga.com","mail2tony.com","mail2touch.com","mail2tourist.com","mail2tracey.com","mail2tracy.com","mail2tramp.com","mail2travel.com","mail2traveler.com","mail2travis.com","mail2trekkie.com","mail2trex.com","mail2triallawyer.com","mail2trick.com","mail2trillionaire.com","mail2troy.com","mail2truck.com","mail2trump.com","mail2try.com","mail2tunisia.com","mail2turbo.com","mail2turkey.com","mail2turkmenistan.com","mail2tv.com","mail2tycoon.com","mail2tyler.com","mail2u4me.com","mail2uae.com","mail2uganda.com","mail2uk.com","mail2ukraine.com","mail2uncle.com","mail2unsubscribe.com","mail2uptown.com","mail2uruguay.com","mail2usa.com","mail2utah.com","mail2uzbekistan.com","mail2v.com","mail2vacation.com","mail2valentines.com","mail2valerie.com","mail2valley.com","mail2vamoose.com","mail2vanessa.com","mail2vanuatu.com","mail2venezuela.com","mail2venous.com","mail2venus.com","mail2vermont.com","mail2vickie.com","mail2victor.com","mail2victoria.com","mail2vienna.com","mail2vietnam.com","mail2vince.com","mail2virginia.com","mail2virgo.com","mail2visionary.com","mail2vodka.com","mail2volleyball.com","mail2waiter.com","mail2wallstreet.com","mail2wally.com","mail2walter.com","mail2warren.com","mail2washington.com","mail2wave.com","mail2way.com","mail2waycool.com","mail2wayne.com","mail2webmaster.com","mail2webtop.com","mail2webtv.com","mail2weird.com","mail2wendell.com","mail2wendy.com","mail2westend.com","mail2westvirginia.com","mail2whether.com","mail2whip.com","mail2white.com","mail2whitehouse.com","mail2whitney.com","mail2why.com","mail2wilbur.com","mail2wild.com","mail2willard.com","mail2willie.com","mail2wine.com","mail2winner.com","mail2wired.com","mail2wisconsin.com","mail2woman.com","mail2wonder.com","mail2world.com","mail2worship.com","mail2wow.com","mail2www.com","mail2wyoming.com","mail2xfiles.com","mail2xox.com","mail2yachtclub.com","mail2yahalla.com","mail2yemen.com","mail2yes.com","mail2yugoslavia.com","mail2zack.com","mail2zambia.com","mail2zenith.com","mail2zephir.com","mail2zeus.com","mail2zipper.com","mail2zoo.com","mail2zoologist.com","mail2zurich.com","mail3000.com","mail333.com","mail4trash.com","mail4u.info","mailandftp.com","mailandnews.com","mailas.com","mailasia.com","mailbolt.com","mailbomb.net","mailboom.com","mailbox.as","mailbox.co.za","mailbox.gr","mailbox.hu","mailbox72.biz","mailbox80.biz","mailbr.com.br","mailc.net","mailcan.com","mailcat.biz","mailcc.com","mailchoose.co","mailcity.com","mailclub.fr","mailclub.net","maildrop.cc","maildrop.gq","maildx.com","mailed.ro","mailexcite.com","mailfa.tk","mailfence.com","mailforce.net","mailforspam.com","mailfree.gq","mailfs.com","mailftp.com","mailgenie.net","mailguard.me","mailhaven.com","mailhood.com","mailimate.com","mailinator.com","mailinator.org","mailinator.us","mailinblack.com","mailingaddress.org","mailingweb.com","mailisent.com","mailismagic.com","mailite.com","mailmate.com","mailme.dk","mailme.gq","mailme24.com","mailmight.com","mailmij.nl","mailnator.com","mailnew.com","mailops.com","mailoye.com","mailpanda.com","mailpick.biz","mailpokemon.com","mailpost.zzn.com","mailpride.com","mailproxsy.com","mailpuppy.com","mailquack.com","mailrock.biz","mailroom.com","mailru.com","mailsac.com","mailseal.de","mailsent.net","mailservice.ms","mailshuttle.com","mailslapping.com","mailstart.com","mailstartplus.com","mailsurf.com","mailtag.com","mailtemp.info","mailto.de","mailtothis.com","mailueberfall.de","mailup.net","mailwire.com","mailworks.org","mailzi.ru","mailzilla.org","maktoob.com","malayalamtelevision.net","maltesemail.com","mamber.net","manager.de","mancity.net","mantrafreenet.com","mantramail.com","mantraonline.com","manybrain.com","marchmail.com","mariahc.com","marijuana.com","marijuana.nl","married-not.com","marsattack.com","martindalemail.com","mash4077.com","masrawy.com","matmail.com","mauimail.com","mauritius.com","maxleft.com","maxmail.co.uk","mbox.com.au","mchsi.com","me-mail.hu","me.com","medical.net.au","medscape.com","meetingmall.com","megago.com","megamail.pt","megapoint.com","mehrani.com","mehtaweb.com","meine-dateien.info","meine-diashow.de","meine-fotos.info","meine-urlaubsfotos.de","mekhong.com","melodymail.com","meloo.com","merda.flu.cc","merda.igg.biz","merda.nut.cc","merda.usa.cc","message.hu","message.myspace.com","messages.to","metacrawler.com","metalfan.com","metaping.com","metta.lk","mexicomail.com","mezimages.net","mfsa.ru","mierdamail.com","miesto.sk","mighty.co.za","migmail.net","migmail.pl","migumail.com","miho-nakayama.com","mikrotamanet.com","millionaireintraining.com","millionairemail.com","milmail.com","mindless.com","mindspring.com","minister.com","misery.net","mittalweb.com","mixmail.com","mjfrogmail.com","ml1.net","mlb.bounce.ed10.net","mm.st","mns.ru","moakt.com","mobilbatam.com","mobileninja.co.uk","mochamail.com","mohammed.com","mohmal.com","moldova.cc","moldova.com","moldovacc.com","momslife.com","monemail.com","money.net","montevideo.com.uy","monumentmail.com","moonman.com","moose-mail.com","mor19.uu.gl","mortaza.com","mosaicfx.com","moscowmail.com","most-wanted.com","mostlysunny.com","motormania.com","movemail.com","movieluver.com","mox.pp.ua","mp4.it","mr-potatohead.com","mscold.com","msgbox.com","msn.cn","msn.com","msn.nl","mt2015.com","mt2016.com","mttestdriver.com","muehlacker.tk","muell.icu","muellemail.com","muellmail.com","mundomail.net","munich.com","music.com","musician.org","musicscene.org","muskelshirt.de","muslim.com","muslimsonline.com","mutantweb.com","mvrht.com","my.com","my10minutemail.com","mybox.it","mycabin.com","mycity.com","mycool.com","mydomain.com","mydotcomaddress.com","myfamily.com","myfastmail.com","mygo.com","myiris.com","mymacmail.com","mynamedot.com","mynet.com","mynetaddress.com","mynetstore.de","myownemail.com","myownfriends.com","mypacks.net","mypad.com","mypersonalemail.com","myplace.com","myrambler.ru","myrealbox.com","myremarq.com","myself.com","myspaceinc.net","myspamless.com","mystupidjob.com","mytemp.email","mythirdage.com","myway.com","myworldmail.com","n2.com","n2baseball.com","n2business.com","n2mail.com","n2soccer.com","n2software.com","nabc.biz","nafe.com","nagpal.net","nakedgreens.com","name.com","nameplanet.com","nandomail.com","naplesnews.net","naseej.com","nativestar.net","nativeweb.net","naui.net","naver.com","navigator.lv","navy.org","naz.com","nc.rr.com","nchoicemail.com","neeva.net","nemra1.com","nenter.com","neo.rr.com","nervhq.org","net-c.be","net-c.ca","net-c.cat","net-c.com","net-c.es","net-c.fr","net-c.it","net-c.lu","net-c.nl","net-c.pl","net-pager.net","net-shopping.com","net4b.pt","net4you.at","netbounce.com","netbroadcaster.com","netby.dk","netc.eu","netc.fr","netc.it","netc.lu","netc.pl","netcenter-vn.net","netcmail.com","netcourrier.com","netexecutive.com","netexpressway.com","netgenie.com","netian.com","netizen.com.ar","netlane.com","netlimit.com","netmongol.com","netnet.com.sg","netnoir.net","netpiper.com","netposta.net","netralink.com","netscape.net","netscapeonline.co.uk","netspace.net.au","netspeedway.com","netsquare.com","netster.com","nettaxi.com","nettemail.com","netterchef.de","netti.fi","netzero.com","netzero.net","netzidiot.de","neue-dateien.de","neuro.md","newmail.com","newmail.net","newmail.ru","newsboysmail.com","newyork.com","nextmail.ru","nexxmail.com","nfmail.com","nicebush.com","nicegal.com","nicholastse.net","nicolastse.com","nightmail.com","nikopage.com","nimail.com","ninfan.com","nirvanafan.com","nmail.cf","noavar.com","nonpartisan.com","nonspam.eu","nonspammer.de","norika-fujiwara.com","norikomail.com","northgates.net","nospammail.net","nospamthanks.info","nowhere.org","ntelos.net","ntlhelp.net","ntlworld.com","ntscan.com","null.net","nullbox.info","nur-fuer-spam.de","nus.edu.sg","nwldx.com","nwytg.net","nxt.ru","ny.com","nybella.com","nyc.com","nycmail.com","nzoomail.com","o-tay.com","o2.co.uk","oaklandas-fan.com","oath.com","oceanfree.net","odaymail.com","oddpost.com","odmail.com","office-dateien.de","office-email.com","offroadwarrior.com","oicexchange.com","oida.icu","oikrach.com","okbank.com","okhuman.com","okmad.com","okmagic.com","okname.net","okuk.com","oldies104mail.com","ole.com","olemail.com","olympist.net","olypmall.ru","omaninfo.com","omen.ru","onebox.com","onenet.com.ar","oneoffmail.com","onet.com.pl","onet.eu","onet.pl","oninet.pt","online.ie","online.ms","online.nl","onlinewiz.com","onmilwaukee.com","onobox.com","op.pl","opayq.com","openmailbox.org","operafan.com","operamail.com","opoczta.pl","optician.com","optonline.net","optusnet.com.au","orange.fr","orbitel.bg","orgmail.net","orthodontist.net","osite.com.br","oso.com","otakumail.com","our-computer.com","our-office.com","our.st","ourbrisbane.com","ourklips.com","ournet.md","outgun.com","outlawspam.com","outlook.at","outlook.be","outlook.cl","outlook.co.id","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.nl","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","over-the-rainbow.com","ownmail.net","ozbytes.net.au","ozemail.com.au","pacbell.net","pacific-ocean.com","pacific-re.com","pacificwest.com","packersfan.com","pagina.de","pagons.org","pakistanmail.com","pakistanoye.com","palestinemail.com","pandora.be","papierkorb.me","parkjiyoon.com","parsmail.com","partlycloudy.com","partybombe.de","partyheld.de","partynight.at","parvazi.com","passwordmail.com","pathfindermail.com","pconnections.net","pcpostal.com","pcsrock.com","pcusers.otherinbox.com","pediatrician.com","penpen.com","peoplepc.com","peopleweb.com","pepbot.com","perfectmail.com","perso.be","personal.ro","personales.com","petlover.com","petml.com","pettypool.com","pezeshkpour.com","pfui.ru","phayze.com","phone.net","photo-impact.eu","photographer.net","phpbb.uu.gl","phreaker.net","phus8kajuspa.cu.cc","physicist.net","pianomail.com","pickupman.com","picusnet.com","pigpig.net","pinoymail.com","piracha.net","pisem.net","pjjkp.com","planet.nl","planetaccess.com","planetarymotion.net","planetearthinter.net","planetmail.com","planetmail.net","planetout.com","plasa.com","playersodds.com","playful.com","playstation.sony.com","plus.com","plus.google.com","plusmail.com.br","pm.me","pmail.net","pobox.hu","pobox.sk","pochta.ru","poczta.fm","poczta.onet.pl","poetic.com","pokemail.net","pokemonpost.com","pokepost.com","polandmail.com","polbox.com","policeoffice.com","politician.com","polizisten-duzer.de","polyfaust.com","pool-sharks.com","poond.com","popaccount.com","popmail.com","popsmail.com","popstar.com","portugalmail.com","portugalmail.pt","portugalnet.com","positive-thinking.com","post.com","post.cz","post.sk","posta.ro","postaccesslite.com","postafree.com","postaweb.com","posteo.at","posteo.be","posteo.ch","posteo.cl","posteo.co","posteo.de","posteo.dk","posteo.es","posteo.gl","posteo.net","posteo.no","posteo.us","postfach.cc","postinbox.com","postino.ch","postmark.net","postmaster.co.uk","postmaster.twitter.com","postpro.net","pousa.com","powerfan.com","pp.inet.fi","praize.com","premium-mail.fr","premiumservice.com","presidency.com","press.co.jp","priest.com","primposta.com","primposta.hu","privy-mail.com","privymail.de","pro.hu","probemail.com","prodigy.net","progetplus.it","programist.ru","programmer.net","programozo.hu","proinbox.com","project2k.com","promessage.com","prontomail.com","protestant.com","proton.me","protonmail.ch","protonmail.com","prydirect.info","psv-supporter.com","ptd.net","public-files.de","public.usa.com","publicist.com","pulp-fiction.com","punkass.com","purpleturtle.com","put2.net","pwrby.com","q.com","qatarmail.com","qmail.com","qprfans.com","qq.com","qrio.com","quackquack.com","quakemail.com","qualityservice.com","quantentunnel.de","qudsmail.com","quepasa.com","quickhosts.com","quickmail.nl","quicknet.nl","quickwebmail.com","quiklinks.com","quikmail.com","qv7.info","qwest.net","qwestoffice.net","r-o-o-t.com","raakim.com","racedriver.com","racefanz.com","racingfan.com.au","racingmail.com","radicalz.com","radiku.ye.vc","radiologist.net","ragingbull.com","ralib.com","rambler.ru","ranmamail.com","rastogi.net","ratt-n-roll.com","rattle-snake.com","raubtierbaendiger.de","ravearena.com","ravemail.com","razormail.com","rccgmail.org","rcn.com","realemail.net","reality-concept.club","reallyfast.biz","reallyfast.info","reallymymail.com","realradiomail.com","realtyagent.com","reborn.com","reconmail.com","recycler.com","recyclermail.com","rediff.com","rediffmail.com","rediffmailpro.com","rednecks.com","redseven.de","redsfans.com","regbypass.com","reggaefan.com","registerednurses.com","regspaces.tk","reincarnate.com","religious.com","remail.ga","renren.com","repairman.com","reply.hu","reply.ticketmaster.com","representative.com","rescueteam.com","resgedvgfed.tk","resource.calendar.google.com","resumemail.com","rezai.com","rhyta.com","richmondhill.com","rickymail.com","rin.ru","riopreto.com.br","rklips.com","rn.com","ro.ru","roadrunner.com","roanokemail.com","rock.com","rocketmail.com","rocketship.com","rockfan.com","rodrun.com","rogers.com","rome.com","roosh.com","rootprompt.org","roughnet.com","royal.net","rr.com","rrohio.com","rsub.com","rubyridge.com","runbox.com","rushpost.com","ruttolibero.com","rvshop.com","s-mail.com","sabreshockey.com","sacbeemail.com","saeuferleber.de","safe-mail.net","safrica.com","sagra.lu","sags-per-mail.de","sailormoon.com","saintly.com","saintmail.net","sale-sale-sale.com","salehi.net","salesperson.net","samerica.com","samilan.net","sammimail.com","sandelf.de","sanfranmail.com","sanook.com","sapo.pt","saudia.com","savelife.ml","sayhi.net","saynotospams.com","sbcglbal.net","sbcglobal.com","sbcglobal.net","scandalmail.com","scarlet.nl","schafmail.de","schizo.com","schmusemail.de","schoolemail.com","schoolmail.com","schoolsucks.com","schreib-doch-mal-wieder.de","schweiz.org","sci.fi","scientist.com","scifianime.com","scotland.com","scotlandmail.com","scottishmail.co.uk","scottsboro.org","scubadiving.com","seanet.com","search.ua","searchwales.com","sebil.com","seckinmail.com","secret-police.com","secretary.net","secretservices.net","secure-mail.biz","secure-mail.cc","seductive.com","seekstoyboy.com","seguros.com.br","selfdestructingmail.com","send.hu","sendme.cz","sendspamhere.com","sent.as","sent.at","sent.com","sentrismail.com","serga.com.ar","servemymail.com","servermaps.net","sesmail.com","sexmagnet.com","seznam.cz","shahweb.net","shaniastuff.com","shared-files.de","sharedmailbox.org","sharklasers.com","sharmaweb.com","shaw.ca","she.com","shieldedmail.com","shinedyoureyes.com","shitaway.cf","shitaway.cu.cc","shitaway.ga","shitaway.gq","shitaway.ml","shitaway.tk","shitaway.usa.cc","shitmail.de","shitmail.org","shitware.nl","shockinmytown.cu.cc","shootmail.com","shortmail.com","shotgun.hu","showslow.de","shuf.com","sialkotcity.com","sialkotian.com","sialkotoye.com","sify.com","silkroad.net","sina.cn","sina.com","sinamail.com","singapore.com","singles4jesus.com","singmail.com","singnet.com.sg","sinnlos-mail.de","siteposter.net","skafan.com","skeefmail.com","skim.com","skizo.hu","skrx.tk","sky.com","skynet.be","slamdunkfan.com","slave-auctions.net","slingshot.com","slippery.email","slipry.net","slo.net","slotter.com","smap.4nmv.ru","smapxsmap.net","smashmail.de","smellrear.com","smileyface.comsmithemail.net","smoothmail.com","sms.at","snail-mail.net","snakebite.com","snakemail.com","sndt.net","sneakemail.com","snet.net","sniper.hu","snkmail.com","snoopymail.com","snowboarding.com","snowdonia.net","socamail.com","socceramerica.net","soccermail.com","soccermomz.com","social-mailer.tk","socialworker.net","sociologist.com","sofort-mail.de","sofortmail.de","softhome.net","sogou.com","sohu.com","sol.dk","solar-impact.pro","solcon.nl","soldier.hu","solution4u.com","solvemail.info","songwriter.net","sonnenkinder.org","soodomail.com","soon.com","soulfoodcookbook.com","sp.nl","space-bank.com","space-man.com","space-ship.com","space-travel.com","space.com","spacemart.com","spacetowns.com","spacewar.com","spainmail.com","spam.2012-2016.ru","spam.care","spamavert.com","spambob.com","spambob.org","spambog.net","spambooger.com","spambox.xyz","spamcero.com","spamdecoy.net","spameater.com","spameater.org","spamex.com","spamfree24.info","spamfree24.net","spamgoes.in","spaminator.de","spamkill.info","spaml.com","spamoff.de","spamstack.net","spartapiet.com","spazmail.com","speedemail.net","speedpost.net","speedrules.com","speedrulz.com","speedymail.org","sperke.net","spils.com","spinfinder.com","spl.at","spoko.pl","spoofmail.de","sportemail.com","sportsmail.com","sporttruckdriver.com","spray.no","spray.se","spybox.de","spymac.com","sraka.xyz","srilankan.net","ssl-mail.com","st-davids.net","stade.fr","stalag13.com","stargateradio.com","starmail.com","starmail.org","starmedia.com","starplace.com","starspath.com","start.com.au","startkeys.com","stinkefinger.net","stipte.nl","stoned.com","stones.com","stop-my-spam.pp.ua","stopdropandroll.com","storksite.com","streber24.de","streetwisemail.com","stribmail.com","strompost.com","strongguy.com","student.su","studentcenter.org","stuffmail.de","subram.com","sudanmail.net","sudolife.me","sudolife.net","sudomail.biz","sudomail.com","sudomail.net","sudoverse.com","sudoverse.net","sudoweb.net","sudoworld.com","sudoworld.net","suhabi.com","suisse.org","sukhumvit.net","sunpoint.net","sunrise-sunset.com","sunsgame.com","sunumail.sn","suomi24.fi","superdada.com","supereva.it","supermail.ru","superrito.com","superstachel.de","surat.com","surf3.net","surfree.com","surfy.net","surgical.net","surimail.com","survivormail.com","susi.ml","svk.jp","swbell.net","sweb.cz","swedenmail.com","sweetville.net","sweetxxx.de","swift-mail.com","swiftdesk.com","swingeasyhithard.com","swingfan.com","swipermail.zzn.com","swirve.com","swissinfo.org","swissmail.com","swissmail.net","switchboardmail.com","switzerland.org","sx172.com","syom.com","syriamail.com","t-online.de","t.psh.me","t2mail.com","tafmail.com","takuyakimura.com","talk21.com","talkcity.com","talkinator.com","tamil.com","tampabay.rr.com","tankpolice.com","tatanova.com","tbwt.com","tcc.on.ca","tds.net","teachermail.net","teachers.org","teamdiscovery.com","teamtulsa.net","tech-center.com","tech4peace.org","techemail.com","techie.com","technisamail.co.za","technologist.com","techscout.com","techspot.com","teenagedirtbag.com","tele2.nl","telebot.com","telefonica.net","teleline.es","telenet.be","telepac.pt","telerymd.com","teleworm.us","telfort.nl","telfortglasvezel.nl","telinco.net","telkom.net","telpage.net","telstra.com","telstra.com.au","temp-mail.com","temp-mail.de","temp-mail.org","temp.headstrong.de","tempail.com","tempemail.biz","tempmail.net","tempmail.us","tempmail2.com","tempmaildemo.com","tempmailer.com","temporarioemail.com.br","temporaryemail.us","tempthe.net","tempymail.com","temtulsa.net","tenchiclub.com","tenderkiss.com","tennismail.com","terminverpennt.de","terra.cl","terra.com","terra.com.ar","terra.com.br","terra.es","test.com","test.de","tfanus.com.er","tfz.net","thai.com","thaimail.com","thaimail.net","thanksnospam.info","the-african.com","the-airforce.com","the-aliens.com","the-american.com","the-animal.com","the-army.com","the-astronaut.com","the-beauty.com","the-big-apple.com","the-biker.com","the-boss.com","the-brazilian.com","the-canadian.com","the-canuck.com","the-captain.com","the-chinese.com","the-country.com","the-cowboy.com","the-davis-home.com","the-dutchman.com","the-eagles.com","the-englishman.com","the-fastest.net","the-fool.com","the-frenchman.com","the-galaxy.net","the-genius.com","the-gentleman.com","the-german.com","the-gremlin.com","the-hooligan.com","the-italian.com","the-japanese.com","the-lair.com","the-madman.com","the-mailinglist.com","the-marine.com","the-master.com","the-mexican.com","the-ministry.com","the-monkey.com","the-newsletter.net","the-pentagon.com","the-police.com","the-prayer.com","the-professional.com","the-quickest.com","the-russian.com","the-snake.com","the-spaceman.com","the-stock-market.com","the-student.net","the-whitehouse.net","the-wild-west.com","the18th.com","thecoolguy.com","thecriminals.com","thedoghousemail.com","thedorm.com","theend.hu","theglobe.com","thegolfcourse.com","thegooner.com","theheadoffice.com","theinternetemail.com","thelanddownunder.com","themail.com","themillionare.net","theoffice.net","theplate.com","thepokerface.com","thepostmaster.net","theraces.com","theracetrack.com","therapist.net","thestreetfighter.com","theteebox.com","thewatercooler.com","thewebpros.co.uk","thewizzard.com","thewizzkid.com","thezhangs.net","thirdage.com","thisgirl.com","thraml.com","throwam.com","thundermail.com","tidni.com","timein.net","tiscali.at","tiscali.be","tiscali.co.uk","tiscali.it","tiscali.lu","tiscali.se","tkcity.com","tmail.ws","toast.com","toke.com","tom.com","toolsource.com","toomail.biz","toothfairy.com","topchat.com","topgamers.co.uk","topletter.com","topmail-files.de","topmail.com.ar","topsurf.com","torchmail.com","torontomail.com","tortenboxer.de","totalmail.de","totalmusic.net","townisp.com","tpg.com.au","trash-amil.com","trash-mail.ga","trash-mail.ml","trash2010.com","trash2011.com","trashdevil.de","trashymail.net","travel.li","trayna.com","trialbytrivia.com","trickmail.net","trimix.cn","tritium.net","trmailbox.com","tropicalstorm.com","truckerz.com","truckracer.com","truckracers.com","trust-me.com","truthmail.com","tsamail.co.za","ttml.co.in","tunisiamail.com","turboprinz.de","turboprinzessin.de","turkey.com","turual.com","tut.by","tvstar.com","twc.com","twcny.com","twinstarsmail.com","tx.rr.com","tycoonmail.com","typemail.com","u14269.ml","u2club.com","ua.fm","uae.ac","uaemail.com","ubbi.com","ubbi.com.br","uboot.com","uk2.net","uk2k.com","uk2net.com","uk7.net","uk8.net","ukbuilder.com","ukcool.com","ukdreamcast.com","ukmail.org","ukmax.com","ukr.net","uku.co.uk","ultapulta.com","ultra.fyi","ultrapostman.com","ummah.org","umpire.com","unbounded.com","unforgettable.com","uni.de","unican.es","unihome.com","unitybox.de","universal.pt","uno.ee","uno.it","unofree.it","unterderbruecke.de","uol.com.ar","uol.com.br","uol.com.co","uol.com.mx","uol.com.ve","uole.com","uole.com.ve","uolmail.com","uomail.com","upc.nl","upcmail.nl","upf.org","uplipht.com","ureach.com","urgentmail.biz","urhen.com","uroid.com","usa.com","usa.net","usaaccess.net","usanetmail.com","used-product.fr","usermail.com","username.e4ward.com","usma.net","usmc.net","uswestmail.net","uymail.com","uyuyuy.com","v-sexi.com","vaasfc4.tk","vahoo.com","valemail.net","vampirehunter.com","varbizmail.com","vcmail.com","velnet.co.uk","velocall.com","verizon.net","verizonmail.com","verlass-mich-nicht.de","versatel.nl","veryfast.biz","veryrealemail.com","veryspeedy.net","vfemail.net","vickaentb.tk","videotron.ca","viditag.com","viewcastmedia.com","viewcastmedia.net","vinbazar.com","violinmakers.co.uk","vip.126.com","vip.21cn.com","vip.citiz.net","vip.gr","vip.onet.pl","vip.qq.com","vip.sina.com","vipmail.ru","virgilio.it","virgin.net","virginbroadband.com.au","virginmedia.com","virtualmail.com","visitmail.com","visitweb.com","visto.com","visualcities.com","vivavelocity.com","vivianhsu.net","vjtimail.com","vkcode.ru","vnet.citiz.net","vnn.vn","vodafone.nl","vodafonethuis.nl","volcanomail.com","vollbio.de","volloeko.de","vomoto.com","vorsicht-bissig.de","vorsicht-scharf.de","vote-democrats.com","vote-hillary.com","vote-republicans.com","vote4gop.org","votenet.com","vp.pl","vr9.com","vubby.com","w3.to","wahoye.com","walala.org","wales2000.net","walkmail.net","walkmail.ru","wam.co.za","wanadoo.es","wanadoo.fr","war-im-urlaub.de","warmmail.com","warpmail.net","warrior.hu","waumail.com","wazabi.club","wbdet.com","wearab.net","web-contact.info","web-emailbox.eu","web-ideal.fr","web-mail.com.ar","web-mail.pp.ua","web-police.com","web.de","webave.com","webcammail.com","webcity.ca","webcontact-france.eu","webdream.com","webindia123.com","webjump.com","webm4il.info","webmail.co.yu","webmail.co.za","webmail.hu","webmails.com","webname.com","webprogramming.com","webstation.com","websurfer.co.za","webtopmail.com","webuser.in","wee.my","weedmail.com","weekmail.com","weekonline.com","wefjo.grn.cc","weg-werf-email.de","wegas.ru","wegwerf-emails.de","wegwerfmail.info","wegwerpmailadres.nl","wehshee.com","weibsvolk.de","weibsvolk.org","weinenvorglueck.de","welsh-lady.com","westnet.com","westnet.com.au","wetrainbayarea.com","wfgdfhj.tk","whale-mail.com","whartontx.com","whatiaas.com","whatpaas.com","wheelweb.com","whipmail.com","whoever.com","whoopymail.com","whtjddn.33mail.com","wi.rr.com","wi.twcbc.com","wickmail.net","wideopenwest.com","wildmail.com","wilemail.com","will-hier-weg.de","windowslive.com","windrivers.net","windstream.net","wingnutz.com","winmail.com.au","winning.com","wir-haben-nachwuchs.de","wir-sind-cool.org","wirsindcool.de","witty.com","wiz.cc","wkbwmail.com","wmail.cf","wo.com.cn","woh.rr.com","wolf-web.com","wolke7.net","wollan.info","wombles.com","women-at-work.org","wongfaye.com","wooow.it","worker.com","workmail.com","worldemail.com","worldnet.att.net","wormseo.cn","wosaddict.com","wouldilie.com","wovz.cu.cc","wowgirl.com","wowmail.com","wowway.com","wp.pl","wptamail.com","wrexham.net","writeme.com","writemeback.com","wrongmail.com","wtvhmail.com","wwdg.com","www.com","www.e4ward.com","www2000.net","wx88.net","wxs.net","x-mail.net","x-networks.net","x5g.com","xagloo.com","xaker.ru","xing886.uu.gl","xmastime.com","xms.nl","xmsg.com","xoom.com","xoxox.cc","xpressmail.zzn.com","xs4all.nl","xsecurity.org","xsmail.com","xtra.co.nz","xuno.com","xww.ro","xy9ce.tk","xyzfree.net","xzapmail.com","y7mail.com","ya.ru","yada-yada.com","yaho.com","yahoo.ae","yahoo.at","yahoo.be","yahoo.ca","yahoo.ch","yahoo.cn","yahoo.co","yahoo.co.id","yahoo.co.il","yahoo.co.in","yahoo.co.jp","yahoo.co.kr","yahoo.co.nz","yahoo.co.th","yahoo.co.uk","yahoo.co.za","yahoo.com","yahoo.com.ar","yahoo.com.au","yahoo.com.br","yahoo.com.cn","yahoo.com.co","yahoo.com.hk","yahoo.com.is","yahoo.com.mx","yahoo.com.my","yahoo.com.ph","yahoo.com.ru","yahoo.com.sg","yahoo.com.tr","yahoo.com.tw","yahoo.com.vn","yahoo.cz","yahoo.de","yahoo.dk","yahoo.es","yahoo.fi","yahoo.fr","yahoo.gr","yahoo.hu","yahoo.ie","yahoo.in","yahoo.it","yahoo.jp","yahoo.nl","yahoo.no","yahoo.pl","yahoo.pt","yahoo.ro","yahoo.ru","yahoo.se","yahoofs.com","yalla.com","yalla.com.lb","yalook.com","yam.com","yandex.com","yandex.pl","yandex.ru","yandex.ua","yapost.com","yapped.net","yawmail.com","yeah.net","yebox.com","yehey.com","yemenmail.com","yepmail.net","yert.ye.vc","yesey.net","yifan.net","ymail.com","yogotemail.com","yomail.info","yopmail.com","yopmail.pp.ua","yopolis.com","yopweb.com","youareadork.com","youmailr.com","your-house.com","your-mail.com","yourinbox.com","yourlifesucks.cu.cc","yourlover.net","yourname.freeservers.com","yournightmare.com","yours.com","yourssincerely.com","yoursubdomain.zzn.com","yourteacher.net","yourwap.com","yuuhuu.net","yyhmail.com","z1p.biz","za.com","zahadum.com","zaktouni.fr","zeepost.nl","zetmail.com","zhaowei.net","zhouemail.510520.org","ziggo.nl","zionweb.org","zip.net","zipido.com","ziplip.com","zipmail.com","zipmail.com.br","zipmax.com","zmail.ru","zoemail.com","zoemail.org","zoho.com","zohomail.com","zomg.info","zonnet.nl","zoominternet.net","zubee.com","zuvio.com","zuzzurello.com","zwallet.com","zweb.in","zxcv.com","zxcvbnm.com","zybermail.com","zydecofan.com","zzn.com","zzom.co.uk","zzz.com","zzz.pl"]'),v=new Set(w);function z(o){var c;const a=(c=o.email.split("@")[1])==null?void 0:c.toLowerCase();return a&&!v.has(a)?a.toLowerCase():o.name||""}function C(){const o=y(),a=s(),{userUpdateLogoutMutation:c}=u(),{user:i,isUserLoaded:n}=d(),e=h({...c(),onSettled:()=>{l.clear(),a({to:t.authLoginRoute.to})}});return n?m.jsxs("div",{className:"fixed inset-0 z-50 bg-background",children:[m.jsx("div",{className:"absolute top-4 right-4 z-10",children:m.jsx(p,{variant:"ghost",size:"sm",onClick:()=>e.mutate(),disabled:e.isPending,children:"Sign out"})}),m.jsxs(k,{children:[m.jsxs("div",{className:"flex flex-col gap-3 text-center lg:text-left w-full",children:[m.jsx("div",{className:"flex justify-center pb-3 lg:hidden",children:m.jsx(b,{className:"h-8 w-auto"})}),m.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Set up your workspace"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Create your organization and first workspace to get started with Hatchet."})]}),m.jsx(f,{defaultOrganizationName:i?z(i):"",defaultTenantName:"development",afterSave:({tenant:r})=>(l.prefetchQuery(g.controlPlane.subscriptionPlans()).catch(()=>{}),o({to:t.tenantOverviewRoute.to,params:{tenant:r.id},replace:!0}))})]})]}):m.jsx(m.Fragment,{})}export{C as default}; diff --git a/hatchetembed/dashboard/assets/index-ckRpuEyy.js b/hatchetembed/dashboard/assets/index-ckRpuEyy.js deleted file mode 100644 index de4fad41bc..0000000000 --- a/hatchetembed/dashboard/assets/index-ckRpuEyy.js +++ /dev/null @@ -1 +0,0 @@ -import{cG as E,eM as R,eN as M,eO as z,j as t,R as D,g as S,b as y,cP as d,aL as v,cZ as O,a3 as V,e as W,co as U,b7 as C,aI as B,cj as F,k as f,cS as G,cU as _,aE as $,N as Q,O as Y,F as Z,cz as q,bK as J,b6 as X,o as ee,d0 as te,by as ae}from"./index-NcPpBRAY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="7a6a1859-8f58-4f0a-b4cc-fb348f75090d",a._sentryDebugIdIdentifier="sentry-dbid-7a6a1859-8f58-4f0a-b4cc-fb348f75090d")}catch{}})();function se(a){return E({attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M9.456 27.25c6.215 0.848 12.319 1.682 18.544 2.532-2.121-3.531-4.187-6.972-6.27-10.441-4.081 2.63-8.124 5.235-12.273 7.909zM29.755 7.705c-0.548 0.823-1.097 1.645-1.644 2.468-1.879 2.827-3.758 5.654-5.635 8.482-0.105 0.158-0.24 0.283-0.093 0.525 1.814 2.995 3.613 5.999 5.417 9 0.285 0.474 0.572 0.946 0.941 1.401 0.364-7.284 0.729-14.568 1.094-21.852-0.027-0.008-0.054-0.016-0.080-0.023zM4.995 17.043c0.085 0.081 0.296 0.127 0.395 0.079 1.74-0.855 3.491-1.691 5.192-2.617 0.555-0.302 0.982-0.842 1.46-1.281 1.583-1.452 3.164-2.907 4.744-4.362 0.097-0.089 0.211-0.176 0.269-0.288 0.568-1.109 1.125-2.224 1.703-3.371-0.689-0.259-1.341-0.512-2.002-0.742-0.089-0.031-0.231 0.031-0.328 0.085-1.53 0.854-3.088 1.663-4.569 2.595-0.741 0.466-1.345 1.154-2.001 1.752-1.058 0.965-2.114 1.933-3.156 2.915-0.277 0.261-0.529 0.558-0.744 0.872-0.713 1.038-1.404 2.091-2.127 3.173 0.404 0.419 0.772 0.819 1.165 1.191zM11.353 15.625c-0.865 3.656-1.726 7.292-2.615 11.047 4.168-2.686 8.241-5.31 12.286-7.916-3.219-1.042-6.428-2.081-9.671-3.13zM28.692 7.74c-3.522 0.588-6.96 1.163-10.442 1.744 1.186 2.885 2.348 5.712 3.544 8.62 2.313-3.475 4.58-6.88 6.899-10.364zM11.498 14.877c3.172 1.030 6.28 2.039 9.479 3.077-1.188-2.894-2.335-5.687-3.506-8.538-1.995 1.824-3.959 3.62-5.973 5.461zM5.126 19.175c-1.125 2.689-2.211 5.286-3.317 7.93 2.126-0.063 4.187-0.124 6.318-0.187-1.001-2.582-1.982-5.114-3.001-7.744zM8.201 25.080c0.026-0.005 0.052-0.012 0.079-0.017 0.758-3.154 1.528-6.287 2.303-9.565-1.728 0.898-3.376 1.754-5.069 2.635 0.864 2.246 1.785 4.615 2.688 6.947zM27.417 7.229c-1.009-0.267-2.018-0.535-3.027-0.801-1.451-0.381-2.903-0.758-4.353-1.143-0.181-0.048-0.312-0.080-0.419 0.139-0.512 1.050-1.041 2.092-1.561 3.138-0.016 0.032-0.013 0.074-0.025 0.155 3.142-0.476 6.263-0.949 9.383-1.422 0.001-0.022 0.001-0.044 0.002-0.066zM21.564 4.841c2.709 0.75 5.419 1.499 8.223 2.275-0.472-1.344-0.909-2.59-1.359-3.872-2.303 0.511-4.577 1.015-6.852 1.519-0.004 0.026-0.008 0.051-0.012 0.077zM8.899 27.856c-1.019-0.117-2.064-0.009-3.097 0.008-0.849 0.015-1.697 0.047-2.545 0.073-0.088 0.003-0.175 0.020-0.262 0.114 7.015 0.649 14.030 1.297 21.044 1.946 0.005-0.031 0.009-0.063 0.014-0.094-2.249-0.307-4.497-0.614-6.746-0.921-2.802-0.383-5.599-0.803-8.408-1.127zM1.947 24.685c0.904-2.097 1.804-4.197 2.712-6.292 0.091-0.21 0.084-0.353-0.094-0.522-0.38-0.361-0.732-0.751-1.147-1.182-0.561 2.77-1.108 5.47-1.655 8.171 0.020 0.009 0.041 0.019 0.061 0.029 0.042-0.067 0.093-0.131 0.124-0.203zM19.763 4.287c1.524-0.393 3.071-0.701 4.608-1.044 0.099-0.022 0.197-0.055 0.295-0.083-0.005-0.025-0.010-0.050-0.015-0.075-2.165 0.291-4.331 0.583-6.606 0.889 0.62 0.271 1.098 0.473 1.718 0.314z"},child:[]}]})(a)}const re=({runtimeInfo:a,iconOnly:n=!1})=>{const l={GOLANG:z,PYTHON:M,TYPESCRIPT:R,RUBY:se};if(!a)return null;const e=a.language?l[a.language]:void 0;return t.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e&&D.createElement(e),!n&&a.sdkVersion]})},i={status:"Status",name:"Name",type:"Type",startedAt:"Started at",slots:"Slots",lastHeartbeatAt:"Last seen",runtime:"SDK Version",labels:"Labels"},A="status",ne="name",oe="startedAt",le="slots",ie="lastHeartbeatAt",ce="runtime",de="labels",ue={ACTIVE:{colors:"text-green-800 dark:text-green-300 bg-green-500/20 ring-green-500/30",primary:"text-green-500 bg-green-500",primaryOKLCH:"oklch(0.723 0.219 149.579)",label:"Active"},INACTIVE:{colors:"text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500",primary:"text-red-500 bg-red-500",primaryOKLCH:"oklch(0.637 0.237 25.331)",label:"Inactive"},PAUSED:{colors:"text-yellow-800 dark:text-yellow-300 bg-yellow-500/20 ring-yellow-500/30",primary:"text-yellow-500 bg-yellow-500",primaryOKLCH:"oklch(0.795 0.184 86.047)",label:"Paused"}};function ge({status:a,count:n,variant:l,animated:e,isLoading:c,className:o,...s}){const r=a?ue[a]||{colors:"text-gray-800 dark:text-gray-300 bg-gray-500/20 ring-gray-500/30",label:a}:{colors:"text-gray-800 dark:text-gray-300 bg-gray-500/20 ring-gray-500/30",label:"Unknown"},u=n===0?{colors:"text-red-800 dark:text-red-300 bg-red-500/20 ring-red-500"}:r,b=t.jsxs(t.Fragment,{children:[n!==void 0&&`${n} `,r.label]});return t.jsx(V,{className:W("px-3 py-1",u.colors,"rounded-md border-transparent text-xs font-medium",o),variant:l,...s,children:b})}const be=(a,n,l)=>[{accessorKey:ne,header:({column:e})=>t.jsx(d,{column:e,title:i.name}),cell:({row:e})=>t.jsx(S,{to:y.tenantWorkerRoute.to,params:{tenant:a,worker:e.original.metadata.id},children:t.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:e.original.webhookUrl||e.original.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:A,header:({column:e})=>t.jsx(d,{column:e,title:i.status}),cell:({row:e})=>t.jsx(S,{to:y.tenantWorkerRoute.to,params:{tenant:a,worker:e.original.metadata.id},children:t.jsx(ge,{status:e.original.status})}),enableSorting:!1,enableHiding:!1},{accessorKey:oe,header:({column:e})=>t.jsx(d,{column:e,title:i.startedAt,className:"whitespace-nowrap"}),cell:({row:e})=>t.jsx("div",{className:"whitespace-nowrap",children:t.jsx(v,{date:e.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:le,header:({column:e})=>t.jsx(d,{column:e,title:i.slots}),cell:({row:e})=>{const c=e.original.slotConfig||{},o=Object.entries(c).sort(([s],[r])=>s.localeCompare(r));return o.length===0?t.jsx("div",{className:"text-xs text-muted-foreground",children:"No slots"}):t.jsx("div",{className:"space-y-1",children:o.map(([s,r])=>{const g=r==null?void 0:r.available,u=r==null?void 0:r.limit,b=g!==void 0?`${g} / ${u}`:`${u}`;return t.jsxs("div",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"font-medium text-foreground",children:s}),":"," ",b]},s)})})},enableSorting:!1,enableHiding:!0},{accessorKey:ie,header:({column:e})=>t.jsx(d,{column:e,title:i.lastHeartbeatAt,className:"whitespace-nowrap"}),cell:({row:e})=>t.jsx("div",{className:"whitespace-nowrap",children:e.original.lastHeartbeatAt&&t.jsx(v,{date:e.original.lastHeartbeatAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:ce,header:({column:e})=>t.jsx(d,{column:e,title:i.runtime}),cell:({row:e})=>t.jsx(re,{runtimeInfo:e.original.runtimeInfo}),enableSorting:!1,enableHiding:!0},{accessorKey:de,header:({column:e})=>t.jsx(d,{column:e,title:i.labels}),cell:({row:e})=>{var c;return t.jsx(O,{metadata:(((c=e.original)==null?void 0:c.labels)||[]).reduce((o,s)=>(s.key&&s.value&&(o[s.key]=s.value),o),{}),isOpen:n===e.original.metadata.id,onOpenChange:o=>{l(o?e.original.metadata.id:null)},title:"Labels",align:"end"})},enableSorting:!1,enableHiding:!0}],me=ee({s:te(ae(["ACTIVE","INACTIVE","PAUSED"])).optional()}).default({}).transform(a=>({s:a.s??["ACTIVE","PAUSED"]}));function xe(){return t.jsx(U,{title:"No workers found",description:"Deploy workers on Kubernetes, Porter, Railway, Render, ECS, or any container platform. They automatically connect to Hatchet and can scale up or down based on workload.",docs:{href:C.v1.workers.href,description:"Learn about workers"},children:t.jsx(fe,{})})}function fe(){var k,w,j;const{tenant:a}=B({from:y.tenantRoute.to}),{refetchInterval:n}=F(),l="workers-table",[e,c]=f.useState(null),{state:{s:o},columnFilters:s,setColumnFilters:r,resetFilters:g}=G(me,l,{s:A}),{pagination:u,setPagination:b,limit:x,offset:I,setPageSize:T}=_({key:l,resetPageOnChange:[o]}),[N,P]=$("hatchet:columns:workers",{}),p=f.useCallback(H=>c(H),[]),K=f.useMemo(()=>be(a,e,p),[a,e,p]),m=Q({...Y.workers.list(a,{offset:I,limit:x,statuses:o}),refetchInterval:n}),h=((k=m.data)==null?void 0:k.rows)??[],L=((j=(w=m.data)==null?void 0:w.pagination)==null?void 0:j.num_pages)??Math.ceil(h.length/x);return m.isLoading?t.jsx(Z,{}):t.jsx(q,{columns:K,data:h,filters:[{columnId:"status",title:"Status",type:J.Checkbox,options:[{value:"ACTIVE",label:"Active"},{value:"PAUSED",label:"Paused"},{value:"INACTIVE",label:"Inactive"}]}],emptyState:t.jsx(X,{filterHint:"Try changing your filters.",title:"No workers found",description:"Workers are persistent processes that pull and execute your tasks. Connect a worker to start running workflows.",docPage:C.v1.workers,docLabel:"Learn about workers"}),columnFilters:s,setColumnFilters:r,columnVisibility:N,setColumnVisibility:P,showColumnToggle:!0,columnKeyToName:i,refetchProps:{isRefetching:m.isRefetching,onRefetch:m.refetch},onResetFilters:g,pagination:u,setPagination:b,onSetPageSize:T,pageCount:L})}export{xe as default}; diff --git a/hatchetembed/dashboard/assets/index-jA2UlkYY.js b/hatchetembed/dashboard/assets/index-jA2UlkYY.js deleted file mode 100644 index ee3aa632be..0000000000 --- a/hatchetembed/dashboard/assets/index-jA2UlkYY.js +++ /dev/null @@ -1 +0,0 @@ -import{au as u,u as T,t as I,k as l,j as t,I as v,B as h,S as x,e as E,o as O,s as N,aG as C,J as U,cI as g,l as b,p as j,a as y}from"./index-NcPpBRAY.js";import{S as L}from"./settings-page-header-CkCZd3CN.js";import{S as c,R as S}from"./settings-row-D2iLPMr6.js";import{T as R}from"./tenant-switcher-DKarkPe5.js";import{S as A}from"./switch-C9IBAXBS.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./global-emitter-kjRqhIKI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="041304fc-da29-4b91-b85f-f43030842fb7",e._sentryDebugIdIdentifier="sentry-dbid-041304fc-da29-4b91-b85f-f43030842fb7")}catch{}})();const M=O({name:N().max(255).min(1)});function k({className:e,...n}){var m,p,r;const{tenant:s}=u(),{handleSubmit:o,register:i,reset:a,formState:{errors:f}}=T({resolver:I(M),defaultValues:{name:s==null?void 0:s.name}});l.useEffect(()=>{s!=null&&s.name&&a({name:s.name})},[s==null?void 0:s.name,a]);const d=((p=(m=f.name)==null?void 0:m.message)==null?void 0:p.toString())||((r=n.fieldErrors)==null?void 0:r.name);return t.jsxs("form",{className:E("flex flex-col items-end gap-1",e),onSubmit:o(w=>n.onSubmit(w)),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(v,{...i("name"),id:"name",placeholder:"My Tenant",type:"text",autoCapitalize:"none",autoCorrect:"off",className:"w-[220px]",disabled:n.isLoading}),t.jsxs(h,{disabled:n.isLoading,className:"w-fit",children:[n.isLoading&&t.jsx(x,{}),"Save"]})]}),d&&t.jsx("div",{className:"text-sm text-red-500",children:d})]})}function W(){return t.jsx("div",{className:"h-full w-full flex-grow",children:t.jsxs("div",{className:"mx-auto px-4 py-8 sm:px-6 lg:px-8",children:[t.jsx(L,{title:"General",description:"Update the tenant name and analytics preferences for this tenant."}),t.jsxs("div",{className:"divide-y divide-border",children:[t.jsx(z,{}),t.jsx(c,{label:"Tenant Name",description:"The display name for this tenant, shown across the dashboard.",children:t.jsx(_,{})}),t.jsx(D,{}),t.jsx(F,{}),t.jsx(c,{label:"Analytics Opt-Out",description:"Disable usage analytics collection for this tenant.",children:t.jsx(P,{})})]})]})})}const z=()=>{const e=C(),{organizationId:n}=u(),{getOrganizationIdForTenant:s}=U(),o=l.useMemo(()=>{const i=(e==null?void 0:e.memberships)??[];return n?i.filter(a=>a.tenant&&s(a.tenant.metadata.id)===n):i},[e==null?void 0:e.memberships,n,s]);return t.jsx(c,{label:"Current Tenant",description:n?"Switch between tenants in this organization.":"Switch between your tenants.",children:t.jsx(R,{memberships:o,className:"w-[280px]"})})},D=()=>{const{tenant:e}=u(),n=(e==null?void 0:e.serverUrl)||window.location.origin;return t.jsx(c,{label:"API URL",description:"The base URL for this tenant's REST API.",children:t.jsx(S,{value:n})})},F=()=>{const{tenant:e}=u();return e!=null&&e.region?t.jsx(c,{label:"Region",description:"The control-plane region this tenant is deployed to.",children:t.jsx(S,{value:e.region})}):null},_=()=>{const[e,n]=l.useState(!1),{tenantId:s}=g(),{handleApiError:o}=b({}),i=j({mutationKey:["tenant:update"],mutationFn:async a=>{await y.tenantUpdate(s,a)},onMutate:()=>n(!0),onSuccess:()=>window.location.reload(),onError:o});return t.jsx(k,{isLoading:e,onSubmit:a=>i.mutate(a)})},P=()=>{const{tenant:e}=u(),{tenantId:n}=g(),[s,o]=l.useState(!1),[i,a]=l.useState(!!(e!=null&&e.analyticsOptOut)),[f,d]=l.useState(!1),{handleApiError:m}=b({}),p=j({mutationKey:["tenant:update"],mutationFn:async r=>{await y.tenantUpdate(n,r)},onMutate:()=>d(!0),onSuccess:()=>window.location.reload(),onSettled:()=>setTimeout(()=>d(!1),1e3),onError:m});return t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(A,{id:"aoo",checked:i,onClick:()=>{a(r=>!r),o(!0)}}),s&&(f?t.jsx(x,{}):t.jsx(h,{size:"sm",onClick:()=>p.mutate({analyticsOptOut:i}),children:"Save"}))]})};export{W as default}; diff --git a/hatchetembed/dashboard/assets/index-k398qAe_.js b/hatchetembed/dashboard/assets/index-k398qAe_.js deleted file mode 100644 index bba709864f..0000000000 --- a/hatchetembed/dashboard/assets/index-k398qAe_.js +++ /dev/null @@ -1,6 +0,0 @@ -import{v as Le,cI as ae,x as ce,l as ue,k as c,p as oe,a as W,j as e,S as he,I as ye,cr as Te,_ as Fe,$ as Ee,a0 as Me,a1 as Pe,B as ie,cX as xe,cP as te,cY as Re,aL as pe,g as Ke,b as Ce,cZ as $e,cR as Oe,cj as ze,h as He,cS as _e,cU as Be,N as we,O as ve,c_ as We,c$ as Ue,o as Ve,d0 as de,s as be,bo as qe,d1 as Ye,co as Ge,b7 as ke,aD as Je,aE as Ze,bK as je,d2 as Qe,cz as Xe,b6 as et,ak as tt,ai as st,aj as nt,al as at,am as Se}from"./index-NcPpBRAY.js";import{C as Ne}from"./confirm-dialog-Bv8agSqW.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new r.Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="630d1a27-8dd8-4b83-8397-baa2bdf19f2d",r._sentryDebugIdIdentifier="sentry-dbid-630d1a27-8dd8-4b83-8397-baa2bdf19f2d")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rt=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],lt=Le("command",rt);function it({open:r,scheduledRunIds:i,filter:o,onOpenChange:k,onSuccess:N}){var y,B;const{tenantId:b}=ae(),{toast:h}=ce(),{handleApiError:t}=ue({}),j=n=>new Intl.NumberFormat().format(n),A=i.length===0&&!!o,[O,w]=c.useState(void 0),[U,T]=c.useState(!1),[M,P]=c.useState(void 0),[F,V]=c.useState(void 0),[z,R]=c.useState(""),J="DELETE",H=z.trim().toLowerCase()===J.toLowerCase(),[D,K]=c.useState({phase:"idle",processed:0});c.useEffect(()=>{if(r||(R(""),K({phase:"idle",processed:0})),!r||!A||!o){w(void 0),T(!1),P(void 0),V(void 0);return}let n=!1;T(!0),P(void 0),w(void 0),V(void 0);const v=200;return(async()=>{var l,f,g,C,E,p;const S=await W.workflowScheduledList(b,{...o,limit:v,offset:0}),L=((f=(l=S.data)==null?void 0:l.pagination)==null?void 0:f.num_pages)??0,s=((C=(g=S.data)==null?void 0:g.rows)==null?void 0:C.length)??0;if(L<=1){n||w(s);return}const a=(L-1)*v,d=((p=(E=(await W.workflowScheduledList(b,{...o,limit:v,offset:a})).data)==null?void 0:E.rows)==null?void 0:p.length)??0;n||w((L-1)*v+d)})().catch(S=>{n||P(S.message)}).finally(()=>{n||T(!1)}),()=>{n=!0}},[r,A,o,b]);const q=oe({mutationKey:["scheduled-run:bulk-delete",b,i,o],mutationFn:async()=>{var s,a,u;const n=[],v=[],Y=async d=>{var f,g;if(d.length===0)return;const l=await W.workflowScheduledBulkDelete(b,{scheduledWorkflowRunIds:d});n.push(...((f=l.data)==null?void 0:f.deletedIds)??[]),v.push(...((g=l.data)==null?void 0:g.errors)??[])};let S=[];if(i.length>0)S=i;else{let l=0;const f=o??{};K({phase:"collecting",processed:0,total:O});let g=!0;for(;g;){const C=await W.workflowScheduledList(b,{...f,limit:1e3,offset:l}),E=((s=C.data)==null?void 0:s.rows)??[],p=E.map(m=>{var $;return($=m==null?void 0:m.metadata)==null?void 0:$.id}).filter(m=>!!m);if(p.length===0){g=!1;continue}S.push(...p),K(m=>({...m,processed:m.processed+p.length}));const I=(u=(a=C.data)==null?void 0:a.pagination)==null?void 0:u.num_pages,G=Math.floor(l/1e3)+1;g=!1,I!=null?G({...f,processed:f.processed+l.length}))}return K(d=>({...d,phase:"done"})),{deletedIds:n,errors:v}},onSuccess:n=>{var L,s;const v=((L=n==null?void 0:n.deletedIds)==null?void 0:L.length)||0,Y=((s=n==null?void 0:n.errors)==null?void 0:s.length)||0,S=`Deleted ${j(v)}. ${Y?`${j(Y)} failed.`:""}`.trim();h({title:"Delete scheduled runs",description:S}),V({deletedIds:(n==null?void 0:n.deletedIds)??[],errors:(n==null?void 0:n.errors)??[]}),N(),Y||k(!1)},onError:t}),_=c.useRef(!1),Z=()=>{_.current||q.isPending||(_.current=!0,q.mutate(void 0,{onSettled:()=>{_.current=!1}}))};return e.jsx(Ne,{isOpen:r,title:"Delete scheduled runs",submitLabel:"Delete",submitVariant:"destructive",submitDisabled:i.length===0&&!o||!H,isLoading:q.isPending,onCancel:()=>k(!1),onSubmit:Z,description:e.jsxs("div",{className:"space-y-4",children:[q.isError&&e.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:((y=q.error)==null?void 0:y.message)||"Failed to delete."}),(B=F==null?void 0:F.errors)!=null&&B.length?e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:[e.jsxs("div",{className:"font-medium",children:[F.errors.length," failed to delete."]}),e.jsxs("div",{className:"mt-2 space-y-1 text-xs",children:[F.errors.slice(0,10).map((n,v)=>e.jsxs("div",{className:"break-all",children:[n.id?`${n.id}: `:"",n.error]},`${n.id??"unknown"}-${v}`)),F.errors.length>10&&e.jsxs("div",{children:["…and ",F.errors.length-10," more."]})]})]}):null,i.length>0?e.jsxs("p",{children:["You are about to delete ",e.jsx("b",{children:i.length})," scheduled run",i.length===1?"":"s",". This cannot be undone."]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{children:"You are about to delete all scheduled runs matching the current filters. This cannot be undone."}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[U&&e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(he,{})," Counting matching runs…"]}),!U&&M&&e.jsx("span",{className:"text-destructive",children:M}),!U&&!M&&O!=null&&e.jsxs("span",{children:["Affected scheduled runs: ",e.jsx("b",{children:j(O)})]})]})]}),D.phase==="collecting"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Collecting ",j(D.processed),D.total!=null?` / ${j(D.total)}`:""," ","ids…"]}),D.phase==="deleting"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Deleting ",j(D.processed),D.total!=null?` / ${j(D.total)}`:"","…"]}),!q.isPending&&D.phase!=="collecting"&&D.phase!=="deleting"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type ",e.jsx("span",{className:"font-mono",children:J})," ","to confirm."]}),e.jsx(ye,{type:"text",value:z,onChange:n=>R(n.target.value),placeholder:`Type ${J} to confirm`})]})]})})}function ot({open:r,scheduledRunIds:i,filter:o,initialRuns:k,onOpenChange:N,onSuccess:b}){var S,L;const{tenantId:h}=ae(),{toast:t}=ce(),{handleApiError:j}=ue({}),A=s=>new Intl.NumberFormat().format(s),O=c.useMemo(()=>{const s=new Map;for(const a of k)s.set(a.metadata.id,a);return s},[k]),[w,U]=c.useState(void 0),[T,M]=c.useState(void 0),[P,F]=c.useState(!1),[V,z]=c.useState(void 0),[R,J]=c.useState(void 0),[H,D]=c.useState(""),K="RESCHEDULE",q=H.trim().toLowerCase()===K.toLowerCase(),[_,Z]=c.useState({phase:"idle",processed:0}),y=i.length===0&&!!o;c.useEffect(()=>{r||(D(""),Z({phase:"idle",processed:0}))},[r]),c.useEffect(()=>{if(!r||!y||!o){M(void 0),F(!1),z(void 0),J(void 0);return}let s=!1;F(!0),z(void 0),M(void 0),J(void 0);const a=200;return(async()=>{var p,I,G,m,$,ee;const d=await W.workflowScheduledList(h,{...o,limit:a,offset:0}),l=((I=(p=d.data)==null?void 0:p.pagination)==null?void 0:I.num_pages)??0,f=((m=(G=d.data)==null?void 0:G.rows)==null?void 0:m.length)??0;if(l<=1){s||M(f);return}const g=(l-1)*a,E=((ee=($=(await W.workflowScheduledList(h,{...o,limit:a,offset:g})).data)==null?void 0:$.rows)==null?void 0:ee.length)??0;s||M((l-1)*a+E)})().catch(d=>{s||z(d.message)}).finally(()=>{s||F(!1)}),()=>{s=!0}},[r,y,o,h]),c.useEffect(()=>{var u;if(!r||w)return;for(const d of i){const l=(u=O.get(d))==null?void 0:u.triggerAt;if(l){U(new Date(l));return}}let s=!1;return(async()=>{var d,l,f;try{if(y&&o){const p=(l=(d=(await W.workflowScheduledList(h,{...o,limit:1,offset:0})).data)==null?void 0:d.rows)==null?void 0:l[0];!s&&(p!=null&&p.triggerAt)&&U(new Date(p.triggerAt));return}const g=i[0];if(!g)return;const C=await W.workflowScheduledGet(h,g);!s&&((f=C.data)!=null&&f.triggerAt)&&U(new Date(C.data.triggerAt))}catch{}})(),()=>{s=!0}},[r,w,i,O,y,o,h]);const B=c.useMemo(()=>{if(!w)return[];const s=w.toISOString();return i.map(a=>({id:a,triggerAt:s}))},[i,w]),n=oe({mutationKey:["scheduled-run:bulk-update",h,i,o],mutationFn:async()=>{var u,d,l,f,g,C,E;if(!w)return{updatedIds:[],errors:[]};Z({phase:"running",processed:0,total:i.length>0?i.length:T});const s=[],a=[];if(y&&o){let I=0;const G=w.toISOString();let m=!0;for(;m;){const $=await W.workflowScheduledList(h,{...o,limit:1e3,offset:I}),ee=((u=$.data)==null?void 0:u.rows)??[],se=ee.map(Q=>{var ne;return(ne=Q==null?void 0:Q.metadata)==null?void 0:ne.id}).filter(Q=>!!Q);if(se.length===0){m=!1;continue}const re=500;for(let Q=0;Q({id:le,triggerAt:G})),me=await W.workflowScheduledBulkUpdate(h,{updates:Ae});s.push(...((d=me.data)==null?void 0:d.updatedIds)??[]),a.push(...((l=me.data)==null?void 0:l.errors)??[]),Z(le=>({...le,processed:le.processed+ne.length}))}const x=(g=(f=$.data)==null?void 0:f.pagination)==null?void 0:g.num_pages,Ie=Math.floor(I/1e3)+1;m=!1,x!=null?Ie({...$,processed:$.processed+G.length}))}return Z(p=>({...p,phase:"done"})),{updatedIds:s,errors:a}},onSuccess:s=>{var l,f;const a=((l=s==null?void 0:s.updatedIds)==null?void 0:l.length)||0,u=((f=s==null?void 0:s.errors)==null?void 0:f.length)||0,d=`Updated ${A(a)}. ${u?`${A(u)} failed.`:""}`.trim();t({title:"Reschedule scheduled runs",description:d}),J({updatedIds:(s==null?void 0:s.updatedIds)??[],errors:(s==null?void 0:s.errors)??[]}),b(),u||N(!1)},onError:j}),v=c.useRef(!1),Y=()=>{v.current||n.isPending||(v.current=!0,n.mutate(void 0,{onSettled:()=>{v.current=!1}}))};return e.jsx(Ne,{isOpen:r,title:"Reschedule scheduled runs",submitLabel:"Reschedule",submitVariant:"destructive",isLoading:n.isPending,submitDisabled:!w||!q||y&&(P||!!V||!T||T<=0)||!y&&i.length===0||!y&&B.length!==i.length,onCancel:()=>N(!1),onSubmit:Y,description:e.jsxs("div",{className:"space-y-3",children:[n.isError&&e.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:((S=n.error)==null?void 0:S.message)||"Failed to reschedule."}),(L=R==null?void 0:R.errors)!=null&&L.length?e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 p-3 text-sm text-destructive",children:[e.jsxs("div",{className:"font-medium",children:[R.errors.length," failed to reschedule."]}),e.jsxs("div",{className:"mt-2 space-y-1 text-xs",children:[R.errors.slice(0,10).map((s,a)=>e.jsxs("div",{className:"break-all",children:[s.id?`${s.id}: `:"",s.error]},`${s.id??"unknown"}-${a}`)),R.errors.length>10&&e.jsxs("div",{children:["…and ",R.errors.length-10," more."]})]})]}):null,e.jsx("div",{className:"rounded-md border p-3",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium",children:"New trigger time"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y?"This will apply to all scheduled runs matching the current filters.":"This will apply to all selected scheduled runs."})]}),e.jsx(Te,{date:w,setDate:U,label:"Trigger at"})]})}),e.jsx("div",{className:"rounded-md border p-3",children:e.jsxs("div",{className:"flex flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-medium",children:["Affected scheduled runs:"," ",y?T!=null?A(T):"—":A(i.length)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y?e.jsxs(e.Fragment,{children:[P&&e.jsx("span",{children:"Counting matching runs… "}),!P&&V&&e.jsx("span",{className:"text-destructive",children:V}),!P&&!V&&T!=null&&e.jsx("span",{children:"Ready to reschedule."})]}):e.jsx("span",{children:"Ready to reschedule."})})]}),P&&e.jsx(he,{})]})}),_.phase==="running"&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Rescheduling ",A(_.processed),_.total!=null?` / ${A(_.total)}`:"","…"]}),!n.isPending&&_.phase!=="running"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type ",e.jsx("span",{className:"font-mono",children:K})," ","to confirm."]}),e.jsx(ye,{type:"text",value:H,onChange:s=>D(s.target.value),placeholder:`Type ${K} to confirm`})]})]})})}function dt({scheduledRun:r,setShowScheduledRunRevoke:i,onSuccess:o}){const{tenantId:k}=ae(),{handleApiError:N}=ue({}),b=oe({mutationKey:["scheduled-run:delete",k,r],mutationFn:async()=>{r&&await W.workflowScheduledDelete(k,r.metadata.id)},onSuccess:o,onError:N});return e.jsx(Fe,{open:!!r,onOpenChange:h=>i(h?r:void 0),children:e.jsx(ct,{isLoading:b.isPending,onSubmit:()=>b.mutate(),onCancel:()=>i(void 0),isFutureRun:r!=null&&r.triggerAt?new Date(r.triggerAt)>new Date:!1})})}function ct({className:r,isFutureRun:i,...o}){return e.jsxs(Ee,{className:"w-fit min-w-[500px] max-w-[80%]",children:[e.jsx(Me,{children:e.jsx(Pe,{children:"Delete scheduled run"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 text-sm text-foreground",children:["Are you sure you want to delete the scheduled run?",i?e.jsx(e.Fragment,{children:"This action will prevent the run from running in the future and cannot be undone."}):e.jsx(e.Fragment,{children:"This action will delete the scheduled run trigger, but will not affect the run itself and cannot be undone."})]}),e.jsxs("div",{className:"flex flex-row justify-end gap-4",children:[e.jsx(ie,{variant:"ghost",onClick:()=>{o.onCancel()},children:"Cancel"}),e.jsxs(ie,{variant:"destructive",onClick:()=>{o.onSubmit()},children:[o.isLoading&&e.jsx(he,{}),"Delete scheduled run"]})]})]})]})}const X={id:"ID",status:"Status",triggerAt:"Trigger At",workflow:"Workflow",metadata:"Metadata",createdAt:"Created At",actions:"Actions"},ut="id",De="status",ht="triggerAt",ge="workflow",fe="metadata",gt="createdAt",ft="actions",mt=({tenantId:r,onDeleteClick:i,onRescheduleClick:o,onTriggerClick:k,selectedAdditionalMetaJobId:N,handleSetSelectedAdditionalMetaJobId:b,onRowClick:h})=>[{id:"select",header:({table:t})=>e.jsx(xe,{checked:t.getIsAllPageRowsSelected()||t.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:j=>t.toggleAllPageRowsSelected(!!j),"aria-label":"Select all",className:"translate-y-[2px]"}),cell:({row:t})=>e.jsx(xe,{checked:t.getIsSelected(),onCheckedChange:j=>t.toggleSelected(!!j),"aria-label":"Select row",disabled:t.original.method!=="API"?!0:void 0}),enableSorting:!1,enableHiding:!1},{accessorKey:ut,header:({column:t})=>e.jsx(te,{column:t,title:X.id}),cell:({row:t})=>e.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",onClick:()=>h==null?void 0:h(t.original),children:t.original.metadata.id}),enableSorting:!1,enableHiding:!0},{accessorKey:De,header:({column:t})=>e.jsx(te,{column:t,title:X.status}),cell:({row:t})=>e.jsx("div",{className:"cursor-pointer",onClick:()=>h==null?void 0:h(t.original),children:e.jsx(Re,{status:t.original.workflowRunStatus||"SCHEDULED"})}),enableSorting:!1,enableHiding:!0},{accessorKey:ht,header:({column:t})=>e.jsx(te,{column:t,title:X.triggerAt}),cell:({row:t})=>e.jsx("div",{className:"flex cursor-pointer flex-row items-center gap-4",onClick:()=>h==null?void 0:h(t.original),children:e.jsx(pe,{date:t.original.triggerAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:ge,header:({column:t})=>e.jsx(te,{column:t,title:X.workflow}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row items-center gap-4",children:e.jsx("div",{className:"min-w-fit cursor-pointer whitespace-nowrap hover:underline",children:e.jsx(Ke,{to:Ce.tenantWorkflowRoute.to,params:{tenant:r,workflow:t.original.workflowId},children:t.original.workflowName})})}),enableSorting:!1,enableHiding:!0},{accessorKey:fe,header:({column:t})=>e.jsx(te,{column:t,title:X.metadata}),cell:({row:t})=>t.original.additionalMetadata?e.jsx($e,{metadata:t.original.additionalMetadata,isOpen:N===t.original.metadata.id,onOpenChange:j=>{b(j?t.original.metadata.id:null)}}):e.jsx("div",{}),enableSorting:!1,enableHiding:!0},{accessorKey:gt,header:({column:t})=>e.jsx(te,{column:t,title:X.createdAt}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row items-center gap-4",children:e.jsx(pe,{date:t.original.metadata.createdAt})}),enableSorting:!1,enableHiding:!0},{accessorKey:ft,header:({column:t})=>e.jsx(te,{column:t,title:X.actions}),cell:({row:t})=>e.jsx("div",{className:"flex flex-row justify-center",children:e.jsx(Oe,{row:t.original,actions:[{label:"Reschedule",onClick:()=>o(t.original),disabled:t.original.method!=="API"?"Cannot reschedule scheduled run created via code definition":t.original.workflowRunId?"Cannot reschedule a scheduled run that has already been triggered":void 0},{label:"Trigger Now",onClick:()=>k(t.original),disabled:t.original.workflowRunId?"Cannot trigger a scheduled run that has already been triggered":void 0},{label:"Delete",onClick:()=>i(t.original),disabled:t.original.method!=="API"?"Cannot delete scheduled run created via code definition":void 0}]})}),enableSorting:!1,enableHiding:!0}],xt=Ve({w:de(be()).default([]),s:de(qe(Ye)).default([]),m:de(be()).default([])}).default({}),pt=({key:r,workflowId:i,parentWorkflowRunId:o,parentStepRunId:k})=>{var s;const{tenantId:N}=ae(),{refetchInterval:b}=ze(),h=He(),{toast:t}=ce(),j=`scheduled-runs-${r}`,{state:{w:A,s:O,m:w},columnFilters:U,setColumnFilters:T,resetFilters:M}=_e(xt,j,{w:ge,s:De,m:fe}),P=i||A[0],{limit:F,offset:V,pagination:z,setPagination:R,setPageSize:J}=Be({key:r,resetPageOnChange:[A,O,w,i,o,k]}),{data:H,isLoading:D,refetch:K,error:q,isRefetching:_}=we({...ve.scheduledRuns.list(N,{offset:V,limit:F,statuses:O.length>0?O:void 0,workflowId:P,parentWorkflowRunId:o,parentStepRunId:k,orderByDirection:Ue.DESC,orderByField:We.TriggerAt,additionalMetadata:w.length>0?w:void 0}),placeholderData:a=>a,refetchInterval:b}),Z=(H==null?void 0:H.rows)??[],y=((s=H==null?void 0:H.pagination)==null?void 0:s.num_pages)??1,{data:B,isLoading:n,error:v}=we({...ve.workflows.list(N,{limit:200}),refetchInterval:b}),Y=c.useMemo(()=>{var a;return((a=B==null?void 0:B.rows)==null?void 0:a.map(u=>({value:u.metadata.id,label:u.name})))||[]},[B]),S=oe({mutationFn:async a=>W.workflowScheduledTrigger(N,a),onSuccess:a=>{var d;const u=(d=a==null?void 0:a.data)==null?void 0:d.externalId;u?h({to:Ce.tenantRunRoute.to,params:{tenant:N,run:u}}):t({title:"Run triggered successfully"})}}),L=c.useCallback(a=>S.mutate(a),[S]);return{scheduledRuns:Z,numPages:y,isLoading:D||n,refetch:K,error:q||v,pagination:z,setPagination:R,setPageSize:J,columnFilters:U,setColumnFilters:T,selectedWorkflowIds:A,selectedStatuses:O,selectedMetadata:w,workflowKeyFilters:Y,isRefetching:_,resetFilters:M,triggerNow:L}};function jt(r){return e.jsx(Ge,{title:"No scheduled runs found",description:"Scheduled runs let you dispatch a workflow at a specific future date and time.",docs:{href:ke.v1["scheduled-runs"].href,description:"Learn about scheduled runs"},children:e.jsx(wt,{...r})})}function wt({workflowId:r,initColumnVisibility:i={createdAt:!1},filterVisibility:o={},parentWorkflowRunId:k,parentStepRunId:N}){const{tenantId:b}=ae(),{open:h}=Je(),[t,j]=c.useState(!1),[A,O]=c.useState(null),[w,U]=Ze("hatchet:columns:scheduled-runs",i),[T,M]=c.useState({}),{scheduledRuns:P,numPages:F,isLoading:V,refetch:z,error:R,pagination:J,setPagination:H,setPageSize:D,columnFilters:K,setColumnFilters:q,workflowKeyFilters:_,isRefetching:Z,resetFilters:y,selectedWorkflowIds:B,selectedStatuses:n,selectedMetadata:v,triggerNow:Y}=pt({key:"table",workflowId:r,parentWorkflowRunId:k,parentStepRunId:N}),S=[{columnId:ge,title:X.workflow,options:_,type:je.Radio},{columnId:fe,title:X.metadata,type:je.KeyValue}].filter(x=>o[x.columnId]!=!1),L=[e.jsx(ie,{onClick:()=>j(!0),variant:"cta",children:"Schedule Run"},"schedule-run")],[s,a]=c.useState(void 0),u=Object.entries(T).filter(([,x])=>!!x).map(([x])=>x),d=x=>new Intl.NumberFormat().format(x),[l,f]=c.useState(null),[g,C]=c.useState(null),[E,p]=c.useState(!1),I=c.useMemo(()=>mt({tenantId:b,onDeleteClick:x=>{a(x)},onRescheduleClick:x=>{C({scheduledRunIds:[x.metadata.id]})},onTriggerClick:x=>Y(x.metadata.id),selectedAdditionalMetaJobId:A,handleSetSelectedAdditionalMetaJobId:O,onRowClick:x=>{h({type:"scheduled-run-details",content:{scheduledRun:x}})}}),[b,A]),G=r||B[0],m=!!G||n.length>0||v.length>0||!!k||!!N,$=m?{workflowId:G,additionalMetadata:v.length>0?v:void 0,parentWorkflowRunId:k,parentStepRunId:N}:{},ee=u.length>0?`Delete selected (${d(u.length)})`:m?"Delete filtered":"Delete all",se=u.length>0?`Reschedule selected (${d(u.length)})`:m?"Reschedule filtered":"Reschedule all",re=[e.jsxs(tt,{open:E,onOpenChange:p,children:[e.jsx(st,{asChild:!0,children:e.jsxs(ie,{variant:"outline",size:"sm",type:"button",children:[e.jsx(lt,{className:"cq-xl:hidden size-4"}),e.jsx("span",{className:"cq-xl:inline hidden text-sm",children:"Actions"}),e.jsx(nt,{className:"cq-xl:inline ml-2 hidden size-4"})]})}),e.jsxs(at,{align:"end",className:"z-40",children:[e.jsx(Se,{className:"h-8 w-full cursor-pointer justify-start rounded-sm px-2 py-1.5 font-normal",onSelect:()=>{p(!1),u.length>0?f({scheduledRunIds:u}):f({scheduledRunIds:[],filter:$})},children:ee}),e.jsx(Se,{className:"h-8 w-full cursor-pointer justify-start rounded-sm px-2 py-1.5 font-normal",onSelect:()=>{p(!1),u.length>0?C({scheduledRunIds:u}):C({scheduledRunIds:[],filter:$})},children:se})]})]},"scheduled-run-actions")];return e.jsxs(e.Fragment,{children:[e.jsx(dt,{scheduledRun:s,setShowScheduledRunRevoke:a,onSuccess:()=>{z(),a(void 0)}}),e.jsx(it,{open:!!l,scheduledRunIds:(l==null?void 0:l.scheduledRunIds)??[],filter:l==null?void 0:l.filter,onOpenChange:x=>{x||f(null)},onSuccess:()=>{z(),M({}),f(null)}}),e.jsx(ot,{open:!!g,scheduledRunIds:(g==null?void 0:g.scheduledRunIds)??[],filter:g==null?void 0:g.filter,initialRuns:P,onOpenChange:x=>{x||C(null)},onSuccess:()=>{z(),M({}),C(null)}}),e.jsx(Qe,{defaultTimingOption:"schedule",defaultWorkflow:void 0,show:t,onClose:()=>j(!1)}),e.jsx(Xe,{emptyState:e.jsx(et,{title:"No scheduled runs found",description:"Scheduled runs let you dispatch a workflow at a specific future date and time.",docPage:ke.v1["scheduled-runs"],docLabel:"Learn about scheduled runs"}),error:R,isLoading:V,columns:I,columnVisibility:w,setColumnVisibility:U,data:P,getRowId:x=>x.metadata.id,filters:S,leftActions:re,rightActions:L,columnFilters:K,setColumnFilters:q,pagination:J,setPagination:H,onSetPageSize:D,pageCount:F,showColumnToggle:!0,columnKeyToName:X,refetchProps:{isRefetching:Z,onRefetch:z},onResetFilters:y,rowSelection:T,setRowSelection:M,showSelectedRows:!0})]})}export{jt as default}; diff --git a/hatchetembed/dashboard/assets/index-nFgZ20bE.css b/hatchetembed/dashboard/assets/index-nFgZ20bE.css deleted file mode 100644 index c315004202..0000000000 --- a/hatchetembed/dashboard/assets/index-nFgZ20bE.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--brand: 212 100% 60%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--success: 193 100% 27%;--danger: 287 69% 57%;--chart-1: 221.2 83.2% 53.3%;--chart-2: 212 95% 68%;--chart-3: 216 92% 60%;--chart-4: 210 98% 78%;--chart-5: 212 97% 87%;--terminal-bg: #f8fafc;--terminal-fg: #1e293b;--terminal-red: #dc2626;--terminal-green: #16a34a;--terminal-yellow: #ca8a04;--terminal-blue: #2563eb;--terminal-magenta: #c026d3;--terminal-cyan: #0891b2}.dark{--background: 226 82% 6%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 221.2 83.2% 53.3%;--chart-2: 212 95% 68%;--chart-3: 216 92% 60%;--chart-4: 210 98% 78%;--chart-5: 212 97% 87%;--terminal-bg: #1e293b;--terminal-fg: #e2e8f0;--terminal-red: #f87171;--terminal-green: #4ade80;--terminal-yellow: #facc15;--terminal-blue: #60a5fa;--terminal-magenta: #e879f9;--terminal-cyan: #22d3ee}*{border-color:hsl(var(--border))}*{border-color:hsl(var(--border));outline-color:hsl(var(--ring) / .5)}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media(min-width:1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\[1px\]{top:1px;right:1px;bottom:1px;left:1px}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.inset-y-\[3px\]{top:3px;bottom:3px}.inset-y-\[6px\]{top:6px;bottom:6px}.-right-0\.5{right:-.125rem}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.bottom-1\/2{bottom:50%}.bottom-2{bottom:.5rem}.bottom-\[10px\]{bottom:10px}.bottom-\[1px\]{bottom:1px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-\[10px\]{top:10px}.top-\[50\%\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[200\]{z-index:200}.z-\[2\]{z-index:2}.z-\[300\]{z-index:300}.z-\[3\]{z-index:3}.z-\[4\]{z-index:4}.z-\[5\]{z-index:5}.z-\[7\]{z-index:7}.z-\[8\]{z-index:8}.col-span-full{grid-column:1 / -1}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.row-start-1{grid-row-start:1}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-\[1px\]{margin-top:1px;margin-bottom:1px}.-mb-\[50cqh\]{margin-bottom:-50cqh}.-ml-1{margin-left:-.25rem}.-ml-3{margin-left:-.75rem}.-ml-\[50cqw\]{margin-left:-50cqw}.-mr-1{margin-right:-.25rem}.-mr-\[50cqw\]{margin-right:-50cqw}.-mt-48{margin-top:-12rem}.-mt-\[50cqh\]{margin-top:-50cqh}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-\[-41px\]{margin-left:-41px}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[3px\]{margin-top:3px}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-1\.5{width:.375rem;height:.375rem}.size-2{width:.5rem;height:.5rem}.size-2\.5{width:.625rem;height:.625rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[100\%\]{height:100%}.h-\[100cqh\]{height:100cqh}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[300px\]{height:300px}.h-\[30px\]{height:30px}.h-\[33px\]{height:33px}.h-\[400px\]{height:400px}.h-\[43px\]{height:43px}.h-\[6px\]{height:6px}.h-\[90px\]{height:90px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-56{max-height:14rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[100cqh\]{max-height:100cqh}.max-h-\[25rem\]{max-height:25rem}.max-h-\[300px\]{max-height:300px}.max-h-\[32rem\]{max-height:32rem}.max-h-\[400px\]{max-height:400px}.max-h-\[40rem\]{max-height:40rem}.max-h-\[420px\]{max-height:420px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90\%\]{max-height:90%}.max-h-\[90dvh\]{max-height:90dvh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-24{min-height:6rem}.min-h-9{min-height:2.25rem}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[25rem\]{min-height:25rem}.min-h-\[500px\]{min-height:500px}.min-h-\[80px\]{min-height:80px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[--radix-popover-trigger-width\]{width:var(--radix-popover-trigger-width)}.w-\[100\%\]{width:100%}.w-\[100cqw\]{width:100cqw}.w-\[100px\]{width:100px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[180px\]{width:180px}.w-\[18px\]{width:18px}.w-\[1px\]{width:1px}.w-\[20px\]{width:20px}.w-\[220px\]{width:220px}.w-\[280px\]{width:280px}.w-\[287px\]{width:287px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[33px\]{width:33px}.w-\[40vw\]{width:40vw}.w-\[48px\]{width:48px}.w-\[6px\]{width:6px}.w-\[70px\]{width:70px}.w-\[calc\(100\%-3px\)\]{width:calc(100% - 3px)}.w-\[min\(18rem\,100vw\)\]{width:min(18rem,100vw)}.w-\[min\(820px\,calc\(100vw-16px\)\)\]{width:min(820px,calc(100vw - 16px))}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-1{min-width:.25rem}.min-w-32{min-width:8rem}.min-w-40{min-width:10rem}.min-w-\[320px\]{min-width:320px}.min-w-\[4ch\]{min-width:4ch}.min-w-\[500px\]{min-width:500px}.min-w-\[600px\]{min-width:600px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.\!max-w-\[80vw\]{max-width:80vw!important}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-96{max-width:24rem}.max-w-\[100cqw\]{max-width:100cqw}.max-w-\[10rem\]{max-width:10rem}.max-w-\[160px\]{max-width:160px}.max-w-\[176px\]{max-width:176px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[700px\]{max-width:700px}.max-w-\[80\%\]{max-width:80%}.max-w-\[800px\]{max-width:800px}.max-w-\[90\%\]{max-width:90%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[9rem\]{max-width:9rem}.max-w-\[calc\(100\%-1rem\)\]{max-width:calc(100% - 1rem)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-\[min\(24rem\,calc\(100vw-2rem\)\)\]{max-width:min(24rem,calc(100vw - 2rem))}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-prose{max-width:65ch}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-44{flex-basis:11rem}.table-auto{table-layout:auto}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[2px\]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-150{--tw-scale-x: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes flip{to{transform:rotate(360deg)}}.animate-flip{animation:flip 6s infinite steps(2,end)}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[0px_1fr_auto\]{grid-template-columns:0px 1fr auto}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.grid-rows-\[64px_minmax\(0\,1fr\)\]{grid-template-rows:64px minmax(0,1fr)}.grid-rows-\[64px_minmax\(0\,1fr\)_auto\]{grid-template-rows:64px minmax(0,1fr) auto}.grid-rows-\[auto_64px_minmax\(0\,1fr\)\]{grid-template-rows:auto 64px minmax(0,1fr)}.grid-rows-\[auto_64px_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto 64px minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-8{row-gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.self-start{align-self:flex-start}.justify-self-start{justify-self:start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[1\.5px\]{border-width:1.5px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#053970\]\/\[0\.16\]{border-color:#05397029}.border-\[--color-border\]{border-color:var(--color-border)}.border-background{border-color:hsl(var(--background))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/20{border-color:hsl(var(--border) / .2)}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-foreground{border-color:hsl(var(--foreground))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/50{border-color:#22c55e80}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-muted-foreground\/20{border-color:hsl(var(--muted-foreground) / .2)}.border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-orange-400\/60{border-color:#fb923c99}.border-primary{border-color:hsl(var(--primary))}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-yellow-950\/30{border-color:#4220064d}.border-b-transparent{border-bottom-color:transparent}.border-t-muted-foreground\/70{border-top-color:hsl(var(--muted-foreground) / .7)}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#005c9e\]\/\[0\.02\]{background-color:#005c9e05}.bg-\[\#ffffff\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/70{background-color:hsl(var(--background) / .7)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/30{background-color:#3b82f64d}.bg-border{background-color:hsl(var(--border))}.bg-border\/40{background-color:hsl(var(--border) / .4)}.bg-border\/50{background-color:hsl(var(--border) / .5)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/5{background-color:hsl(var(--destructive) / .05)}.bg-emerald-300{--tw-bg-opacity: 1;background-color:rgb(110 231 183 / var(--tw-bg-opacity, 1))}.bg-foreground\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\/70{background-color:hsl(var(--foreground) / .7)}.bg-foreground\/90{background-color:hsl(var(--foreground) / .9)}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/10{background-color:#6b72801a}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-600\/40{background-color:#4b556366}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/20{background-color:#6366f133}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/70{background-color:hsl(var(--muted) / .7)}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-500\/20{background-color:#f9731633}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-purple-500{--tw-bg-opacity: 1;background-color:hsl(252 82% 49% / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-50\/50{background-color:#fef2f280}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/90{background-color:hsl(var(--secondary) / .9)}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/20{background-color:#64748b33}.bg-transparent{background-color:transparent}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-background\/95{--tw-gradient-from: hsl(var(--background) / .95) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-50\/60{--tw-gradient-from: rgb(255 247 237 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 247 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-75\%{--tw-gradient-from-position: 75%}.to-background{--tw-gradient-to: hsl(var(--background)) var(--tw-gradient-to-position)}.to-background\/0{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.stroke-border{stroke:hsl(var(--border))}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-0{padding-right:0}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-2\.5{padding-top:.625rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[-0\.02em\]{letter-spacing:-.02em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#000000\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\[\#050c1c\]{--tw-text-opacity: 1;color:rgb(5 12 28 / var(--tw-text-opacity, 1))}.text-\[rgb\(0\,26\,56\)\]{--tw-text-opacity: 1;color:rgb(0 26 56 / var(--tw-text-opacity, 1))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-background{color:hsl(var(--background))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-brand{color:hsl(var(--brand))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/60{color:hsl(var(--primary) / .6)}.text-primary\/70{color:hsl(var(--primary) / .7)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.text-yellow-950{--tw-text-opacity: 1;color:rgb(66 32 6 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.caret-transparent{caret-color:transparent}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-\[0\.01\]{opacity:.01}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[inset_0px_7px_10px_0px_rgba\(0\,0\,0\,0\.01\)\,inset_0px_1px_3px_0px_rgba\(0\,0\,0\,0\.01\)\]{--tw-shadow: inset 0px 7px 10px 0px rgba(0,0,0,.01),inset 0px 1px 3px 0px rgba(0,0,0,.01);--tw-shadow-colored: inset 0px 7px 10px 0px var(--tw-shadow-color), inset 0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[inset_1px_0_0_0_hsl\(var\(--border\)\/0\.5\)\,inset_0_1px_0_0_hsl\(var\(--border\)\/0\.5\)\]{--tw-shadow: inset 1px 0 0 0 hsl(var(--border)/.5),inset 0 1px 0 0 hsl(var(--border)/.5);--tw-shadow-colored: inset 1px 0 0 0 var(--tw-shadow-color), inset 0 1px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-800\/30{--tw-shadow-color: rgb(30 41 59 / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-border\/50{--tw-ring-color: hsl(var(--border) / .5)}.ring-emerald-500\/30{--tw-ring-color: rgb(16 185 129 / .3)}.ring-foreground\/20{--tw-ring-color: hsl(var(--foreground) / .2)}.ring-gray-500\/30{--tw-ring-color: rgb(107 114 128 / .3)}.ring-green-500\/30{--tw-ring-color: rgb(34 197 94 / .3)}.ring-indigo-500\/30{--tw-ring-color: rgb(99 102 241 / .3)}.ring-orange-500\/30{--tw-ring-color: rgb(249 115 22 / .3)}.ring-primary{--tw-ring-color: hsl(var(--primary))}.ring-red-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.ring-red-500\/30{--tw-ring-color: rgb(239 68 68 / .3)}.ring-slate-500\/30{--tw-ring-color: rgb(100 116 139 / .3)}.ring-yellow-500\/30{--tw-ring-color: rgb(234 179 8 / .3)}.ring-offset-1{--tw-ring-offset-width: 1px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[transform\,opacity\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-none{transition-property:none}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.\[--c\:\#fff7_25\%\,\#0000_0\]{--c: #fff7 25%,#0000 0}.\[--color1\:color-mix\(in_srgb\,_hsl\(287_69\%_57\%\)_calc\(100\%_\*_1\)\,_transparent\)\]{--color1: color-mix(in srgb, hsl(287 69% 57%) 100% , transparent)}.\[--color2\:color-mix\(in_srgb\,_hsl\(212_100\%_60\%\)_calc\(100\%_\*_\.56\)\,_transparent\)\]{--color2: color-mix(in srgb, hsl(212 100% 60%) calc(100% * .56), transparent)}.\[--direction\:bottom\]{--direction: bottom}.\[--g\:2px\]{--g: 2px}.\[--gridSize\:24px\]{--gridSize: 24px}.\[--n\:6\]{--n: 6}.\[--scale\:5\]{--scale: 5}.\[--t\:1px\]{--t: 1px}.\[-webkit-overflow-scrolling\:touch\]{-webkit-overflow-scrolling:touch}.\[background-color\:\#b8d9ff14\]{background-color:#b8d9ff14}.\[counter-reset\:step\]{counter-reset:step}.\[height\:clamp\(50rlh\,30vh\,50rlh\)\]{height:clamp(50rlh,30vh,50rlh)}.\[mask-composite\:intersect\,add\,add\,subtract\]{-webkit-mask-composite:source-in,source-over,source-over,source-out,xor;mask-composite:intersect,add,add,subtract}.\[mask-image\:linear-gradient\(to_var\(--direction\)\,transparent_50\%\,white_100\%\)\,var\(--noise-url\)\,conic-gradient\(at_var\(--g\)_var\(--t\)\,var\(--c\)\)\,conic-gradient\(from_180deg_at_var\(--t\)_var\(--g\)\,var\(--c\)\)\]{-webkit-mask-image:linear-gradient(to var(--direction),transparent 50%,white 100%),var(--noise-url),conic-gradient(at var(--g) var(--t),var(--c)),conic-gradient(from 180deg at var(--t) var(--g),var(--c));mask-image:linear-gradient(to var(--direction),transparent 50%,white 100%),var(--noise-url),conic-gradient(at var(--g) var(--t),var(--c)),conic-gradient(from 180deg at var(--t) var(--g),var(--c))}.\[mask-position\:0_0\,0\%_0\%\,calc\(\(var\(--gridSize\)_\/_var\(--n\)_-_var\(--g\)_\+_var\(--t\)\)_\/_2\)_0\,round\(up\,100\%\,calc\(var\(--g\)\*2\)\)_calc\(\(var\(--gridSize\)_\/_var\(--n\)_-_var\(--g\)_\+_var\(--t\)\)_\/_2\)\]{-webkit-mask-position:0 0,0% 0%,calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2) 0,round(up,100%,calc(var(--g) * 2)) calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2);mask-position:0 0,0% 0%,calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2) 0,round(up,100%,calc(var(--g) * 2)) calc((var(--gridSize) / var(--n) - var(--g) + var(--t)) / 2)}.\[mask-size\:100\%\,calc\(300\%\*var\(--scale\)\)_calc\(300\%\*var\(--scale\)\)\,calc\(var\(--gridSize\)_\/_var\(--n\)\)_var\(--gridSize\)\,var\(--gridSize\)_calc\(var\(--gridSize\)_\/_var\(--n\)\)\]{-webkit-mask-size:100%,calc(300% * var(--scale)) calc(300% * var(--scale)),calc(var(--gridSize) / var(--n)) var(--gridSize),var(--gridSize) calc(var(--gridSize) / var(--n));mask-size:100%,calc(300% * var(--scale)) calc(300% * var(--scale)),calc(var(--gridSize) / var(--n)) var(--gridSize),var(--gridSize) calc(var(--gridSize) / var(--n))}.\[mask\:linear-gradient\(\#ccc\,_transparent_50\%\)\]{-webkit-mask:linear-gradient(#ccc,transparent 50%);mask:linear-gradient(#ccc,transparent 50%)}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.\[text-wrap\:balance\]{text-wrap:balance}body{min-height:100dvh}html,body,#root{height:100%}.step-run-card{--transition: .25s;--spark: 3s;position:relative;overflow:hidden}.step-run-card.active .step-run-backdrop{background:222.2 84% 4.9%}.step-run-card.active{transform:scale(1.05)}.spark{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:2px;rotate:0deg;overflow:hidden;-webkit-mask:linear-gradient(white,transparent 50%);mask:linear-gradient(white,transparent 50%);animation:flip calc(var(--spark) * 2) infinite steps(2,end)}@keyframes flip{to{rotate:360deg}}.spark:before{content:"";position:absolute;width:200%;aspect-ratio:1;inset:0 auto auto 50%;z-index:-1;translate:-50% -15%;rotate:0;transform:rotate(-90deg);opacity:1;background:conic-gradient(from 0deg,transparent 0 340deg,white 360deg);transition:opacity var(--transition);animation:rotate var(--spark) linear infinite both}.step-run-backdrop{position:absolute;top:1px;right:1px;bottom:1px;left:1px;background:222.2 84% 4.9%;border-radius:2px;transition:background var(--transition) opacity var(--transition)}@keyframes rotate{to{transform:rotate(90deg)}}@property --sNav{syntax: ""; inherits: false; initial-value: 1;}@keyframes heroPulse{80%{opacity:1}to{transform:scale(calc(var(--sNav) * 2));opacity:0}}.text{z-index:1;color:#cbd5e1}.rjsf{margin-right:.5rem}.rjsf fieldset>legend{margin-bottom:.75rem;width:100%;border-bottom-width:1px;padding-bottom:.25rem;padding-top:1rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.rjsf fieldset>div{margin-left:.75rem}.rjsf .form-group{margin-bottom:.5rem}.rjsf label.control-label{margin-bottom:.25rem;display:block;font-weight:700}.rjsf p.field-description{margin-bottom:.25rem}.rjsf .form-control{display:block;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));padding:.5rem}.rjsf input{display:flex;height:2.5rem;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));background-color:transparent;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-ring-offset-color: hsl(var(--background))}.rjsf input::file-selector-button{border-width:0px;background-color:transparent;font-size:.875rem;line-height:1.25rem;font-weight:500}.rjsf input::-moz-placeholder{color:hsl(var(--muted-foreground))}.rjsf input::placeholder{color:hsl(var(--muted-foreground))}.rjsf input:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--ring));--tw-ring-offset-width: 2px}.rjsf input:disabled{cursor:not-allowed;opacity:.5}.rjsf .array-item{display:flex;flex-direction:row;align-items:flex-end;gap:1rem}.rjsf .array-item .col-xs-9{flex-grow:1}.rjsf .array-item .col-xs-3{flex-shrink:0}.rjsf .array-item .array-item-toolbox{margin-bottom:1rem;display:flex;align-items:center;justify-content:flex-end}.rjsf .glyphicon{font-weight:400;font-style:normal}.rjsf .glyphicon-remove:before{content:"Remove"}.rjsf .glyphicon-arrow-up:before{content:"Up"}.rjsf .glyphicon-arrow-down:before{content:"Down"}.rjsf .glyphicon-plus:before{content:"Add"}.rjsf .btn{margin-left:.25rem;margin-right:.25rem;border-radius:calc(var(--radius) - 2px);border-width:1px;padding:.5rem}.rjsf .btn-danger{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.rjsf .btn-add{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.rjsf button[type=submit]{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.rjsf button[type=submit]:hover{background-color:hsl(var(--primary) / .9)}.rjsf textarea{display:flex;height:5rem;width:100%;border-radius:calc(var(--radius) - 2px);border-width:1px;border-color:hsl(var(--input));background-color:transparent;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-ring-offset-color: hsl(var(--background))}.rjsf textarea::file-selector-button{border-width:0px;background-color:transparent;font-size:.875rem;line-height:1.25rem;font-weight:500}.rjsf textarea::-moz-placeholder{color:hsl(var(--muted-foreground))}.rjsf textarea::placeholder{color:hsl(var(--muted-foreground))}.rjsf textarea:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--ring));--tw-ring-offset-width: 2px}.rjsf textarea:disabled{cursor:not-allowed;opacity:.5}.shiki{padding:15px!important;border-radius:10px!important;background-color:#ccc;font-size:.8rem}html.dark .nextra-code-block pre,.dark .shiki{background-color:transparent!important}pre.shiki{margin:0;counter-reset:line}pre.shiki>code{display:block}pre.shiki>code>span{counter-increment:line;padding-left:1rem;position:relative;min-height:1.25em;line-height:1.25}pre.shiki>code>span:before{content:counter(line);position:absolute;left:-2rem;width:2rem;text-align:right;color:var(--muted-foreground);opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-line-numbers pre.shiki>code>span:before{display:none}.hide-line-numbers pre.shiki>code>span{padding-left:0!important}.contrast-more .shiki{filter:contrast(1.5)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:4px}.dark ::-webkit-scrollbar-thumb{background:hsl(var(--muted))}::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted))}.dark ::-webkit-scrollbar-thumb:hover{background:hsl(var(--border))}.counter-reset-line{counter-reset:line}.counter-reset-line code{display:block}.counter-reset-line code span{display:block;position:relative;padding-left:2.5rem}.counter-reset-line code span:before{counter-increment:line;content:counter(line);position:absolute;left:0;width:2rem;text-align:right;color:var(--muted-foreground);-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-right:.5rem}.highlighted-line{background-color:#ffff001a;display:block;margin:0 -1rem;padding:0 1rem;border-left:3px solid #fbbf24}.dark .highlighted-line{background-color:#ffff000d;border-left-color:#fbbf24}.highlighted-string{background-color:#fbbf24;color:#000;padding:.1em .2em;border-radius:.2em;font-weight:700}.dark .highlighted-string{background-color:#fbbf24;color:#000}@container (min-width: 768px){.cq-lg\:block{display:block}.cq-lg\:flex{display:flex}.cq-lg\:inline{display:inline}.cq-lg\:hidden{display:none}}@container (min-width: 1024px){.cq-lg\:block{display:block}.cq-lg\:flex{display:flex}.cq-lg\:inline{display:inline}.cq-lg\:hidden{display:none}.cq-xl\:block{display:block}.cq-xl\:inline{display:inline}.cq-xl\:hidden{display:none}}.side-panel-content{container-type:inline-size}@container (min-width: 600px){.side-responsive-layout{flex-direction:row;align-items:center}.side-responsive-inner{flex-direction:row;align-items:center;width:auto}.side-sm\:hidden{display:none}.side-sm\:block{display:block}}@keyframes pulse-border{0%,to{border-color:#ef444480}50%{border-color:#ef4444b3}}.animate-pulse-border{animation:pulse-border 2s cubic-bezier(.4,0,.6,1) infinite}.terminal-root,.terminal-root .react-lazylog{background-color:var(--terminal-bg)!important;color:var(--terminal-fg)!important}.terminal-root .log-line{background-color:var(--terminal-bg)!important;color:var(--terminal-fg)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:background-color .15s ease}.terminal-root .log-line:hover{background-color:hsl(var(--muted) / .3)!important}.terminal-root .log-line.expanded{white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;overflow:visible;text-overflow:unset;background-color:hsl(var(--muted) / .4)!important;padding:8px 12px;border-radius:4px;margin:4px 0;display:block;line-height:1.6}.terminal-root div[style*="position: absolute"]{background-color:var(--terminal-bg)!important}.terminal-root ::-webkit-scrollbar-track{background-color:var(--terminal-bg)}.terminal-root ::-webkit-scrollbar-thumb{background-color:hsl(var(--muted));border-radius:4px}.terminal-root ::-webkit-scrollbar-corner{background-color:var(--terminal-bg)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/50::-moz-placeholder{color:hsl(var(--muted-foreground) / .5)}.placeholder\:text-muted-foreground\/50::placeholder{color:hsl(var(--muted-foreground) / .5)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-0:before{content:var(--tw-content);left:0}.before\:top-0:before{content:var(--tw-content);top:0}.before\:aspect-square:before{content:var(--tw-content);aspect-ratio:1 / 1}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-\[200\%\]:before{content:var(--tw-content);width:200%}.before\:w-full:before{content:var(--tw-content);width:100%}.before\:rotate-\[-90deg\]:before{content:var(--tw-content);--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:animate-\[heroPulse_7s_linear_infinite\]:before{content:var(--tw-content);animation:heroPulse 7s linear infinite}@keyframes rotate{to{content:var(--tw-content);transform:rotate(90deg)}}.before\:animate-rotate:before{content:var(--tw-content);animation:rotate 3s linear infinite both}.before\:bg-\[conic-gradient\(from_0deg\,transparent_0_340deg\,\#ccc_360deg\)\]:before{content:var(--tw-content);background-image:conic-gradient(from 0deg,transparent 0 340deg,#ccc 360deg)}.before\:bg-\[repeating-radial-gradient\(circle_at_50\%_50\%\,transparent_0\%\,var\(--color1\)_20\%\,var\(--color2\)_25\%\,transparent_32\%\)\]:before{content:var(--tw-content);background-image:repeating-radial-gradient(circle at 50% 50%,transparent 0%,var(--color1) 20%,var(--color2) 25%,transparent 32%)}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.before\:\[animation-delay\:3\.5s\]:before{content:var(--tw-content);animation-delay:3.5s}.before\:\[inset\:0_auto_auto_50\%\]:before{content:var(--tw-content);inset:0 auto auto 50%}.before\:\[translate\:-50\%_-15\%\]:before{content:var(--tw-content);translate:-50% -15%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-0:after{content:var(--tw-content);left:0}.after\:top-0:after{content:var(--tw-content);top:0}.after\:h-full:after{content:var(--tw-content);height:100%}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:animate-\[heroPulse_6s_linear_infinite\]:after{content:var(--tw-content);animation:heroPulse 6s linear infinite}.after\:bg-\[repeating-radial-gradient\(circle_at_50\%_50\%\,transparent_0\%\,var\(--color2\)_9\%\,var\(--color1\)_14\%\,transparent_21\%\)\]:after{content:var(--tw-content);background-image:repeating-radial-gradient(circle at 50% 50%,transparent 0%,var(--color2) 9%,var(--color1) 14%,transparent 21%)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:border-b-0:last-child{border-bottom-width:0px}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:cursor-help:hover{cursor:help}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-\[\#004c8c\]\/10:hover{border-color:#004c8c1a}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:border-foreground\/40:hover{border-color:hsl(var(--foreground) / .4)}.hover\:border-red-500\/60:hover{border-color:#ef444499}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent-foreground\/10:hover{background-color:hsl(var(--accent-foreground) / .1)}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/5:hover{background-color:#ef44440d}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-950\/10:hover{background-color:#4220061a}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/90:hover{color:hsl(var(--primary) / .9)}.hover\:text-yellow-950:hover{--tw-text-opacity: 1;color:rgb(66 32 6 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_3px_2px_rgba\(0\,0\,0\,0\.01\)\,0_8px_11px_rgba\(0\,0\,0\,0\.03\)\,0_24px_16px_rgba\(0\,0\,0\,0\.01\)\]:hover{--tw-shadow: 0 3px 2px rgba(0,0,0,.01),0 8px 11px rgba(0,0,0,.03),0 24px 16px rgba(0,0,0,.01);--tw-shadow-colored: 0 3px 2px var(--tw-shadow-color), 0 8px 11px var(--tw-shadow-color), 0 24px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:bg-primary\/10:focus{background-color:hsl(var(--primary) / .1)}.focus\:bg-transparent:focus{background-color:transparent}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-text:disabled{cursor:text}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:translate-x-0\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:bg-primary\/5[aria-selected=true]{background-color:hsl(var(--primary) / .05)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=inactive\]\:\!hidden[data-state=inactive]{display:none!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.data-\[is-refetching\=true\]\:animate-spin[data-is-refetching=true]{animation:spin 1s linear infinite}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[is-selected\=false\]\:border[data-is-selected=false]{border-width:1px}.data-\[is-selected\=false\]\:border-green-500\/20[data-is-selected=false]{border-color:#22c55e33}.data-\[is-selected\=false\]\:border-orange-500\/20[data-is-selected=false]{border-color:#f9731633}.data-\[is-selected\=false\]\:border-red-500\/20[data-is-selected=false]{border-color:#ef444433}.data-\[is-selected\=false\]\:border-slate-500\/20[data-is-selected=false]{border-color:#64748b33}.data-\[is-selected\=false\]\:border-yellow-500\/20[data-is-selected=false]{border-color:#eab30833}.data-\[state\=active\]\:border-primary\/50[data-state=active]{border-color:hsl(var(--primary) / .5)}.data-\[state\=active\]\:border-b-primary[data-state=active]{border-bottom-color:hsl(var(--primary))}.data-\[is-selected\=true\]\:bg-green-500\/20[data-is-selected=true]{background-color:#22c55e33}.data-\[is-selected\=true\]\:bg-orange-500\/20[data-is-selected=true]{background-color:#f9731633}.data-\[is-selected\=true\]\:bg-red-500\/20[data-is-selected=true]{background-color:#ef444433}.data-\[is-selected\=true\]\:bg-slate-500\/20[data-is-selected=true]{background-color:#64748b33}.data-\[is-selected\=true\]\:bg-yellow-500\/20[data-is-selected=true]{background-color:#eab30833}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:bg-transparent[data-state=active]{background-color:transparent}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-muted[data-state=open],.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[is-selected\=false\]\:font-light[data-is-selected=false]{font-weight:300}.data-\[disabled\]\:text-white[data-disabled]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-100[data-disabled]{opacity:1}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=active\]\:shadow-none[data-state=active]{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=active\]\:ring-1[data-state=active]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.data-\[state\=active\]\:ring-border[data-state=active]{--tw-ring-color: hsl(var(--border))}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.hover\:data-\[is-selected\=false\]\:border-transparent[data-is-selected=false]:hover{border-color:transparent}.hover\:data-\[is-selected\=false\]\:bg-green-500\/20[data-is-selected=false]:hover{background-color:#22c55e33}.hover\:data-\[is-selected\=false\]\:bg-orange-500\/20[data-is-selected=false]:hover{background-color:#f9731633}.hover\:data-\[is-selected\=false\]\:bg-red-500\/20[data-is-selected=false]:hover{background-color:#ef444433}.hover\:data-\[is-selected\=false\]\:bg-slate-500\/20[data-is-selected=false]:hover{background-color:#64748b33}.hover\:data-\[is-selected\=false\]\:bg-yellow-500\/20[data-is-selected=false]:hover{background-color:#eab30833}.hover\:data-\[is-selected\=true\]\:bg-green-500\/20[data-is-selected=true]:hover{background-color:#22c55e33}.hover\:data-\[is-selected\=true\]\:bg-orange-500\/20[data-is-selected=true]:hover{background-color:#f9731633}.hover\:data-\[is-selected\=true\]\:bg-red-500\/20[data-is-selected=true]:hover{background-color:#ef444433}.hover\:data-\[is-selected\=true\]\:bg-slate-500\/20[data-is-selected=true]:hover{background-color:#64748b33}.hover\:data-\[is-selected\=true\]\:bg-yellow-500\/20[data-is-selected=true]:hover{background-color:#eab30833}.dark\:border-\[1px\]:is(.dark *){border-width:1px}.dark\:border-\[\#97c4ff\]\/\[0\.16\]:is(.dark *){border-color:#97c4ff29}.dark\:border-blue-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))}.dark\:border-border:is(.dark *){border-color:hsl(var(--border))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-orange-500\/40:is(.dark *){border-color:#f9731666}.dark\:border-orange-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:border-slate-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.dark\:border-yellow-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.dark\:border-yellow-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity, 1))}.dark\:border-yellow-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.dark\:bg-\[\#050A23\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 10 35 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#050c1c\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 12 28 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#82b9ff\]\/\[0\.07\]:is(.dark *){background-color:#82b9ff12}.dark\:bg-blue-950\/30:is(.dark *){background-color:#1725544d}.dark\:bg-emerald-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-500\/50:is(.dark *){background-color:#6b728080}.dark\:bg-gray-800\/20:is(.dark *){background-color:#1f293733}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-muted\/20:is(.dark *){background-color:hsl(var(--muted) / .2)}.dark\:bg-orange-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}.dark\:bg-red-950\/40:is(.dark *){background-color:#450a0a66}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#713f124d}.dark\:from-orange-950\/20:is(.dark *){--tw-gradient-from: rgb(67 20 7 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(67 20 7 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:text-\[\#b8d9ff77\]:is(.dark *){color:#b8d9ff77}.dark\:text-\[\#b8d9ff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(184 217 255 / var(--tw-text-opacity, 1))}.dark\:text-\[\#ffffff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:text-\[rgb\(184\,217\,255\)\]:is(.dark *){--tw-text-opacity: 1;color:rgb(184 217 255 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-400\/70:is(.dark *){color:#9ca3afb3}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.dark\:text-orange-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:mix-blend-plus-lighter:is(.dark *){mix-blend-mode:plus-lighter}.dark\:ring-inset:is(.dark *){--tw-ring-inset: inset}.dark\:hover\:border-\[\#86bbff\]\/\[0\.08\]:hover:is(.dark *){border-color:#86bbff14}.dark\:hover\:bg-\[\#8dbfff\]\/\[0\.13\]:hover:is(.dark *){background-color:#8dbfff21}.dark\:hover\:bg-red-950\/60:hover:is(.dark *){background-color:#450a0a99}.dark\:hover\:bg-yellow-900\/50:hover:is(.dark *){background-color:#713f1280}.dark\:hover\:text-gray-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:data-\[state\=active\]\:bg-muted\/70[data-state=active]:is(.dark *){background-color:hsl(var(--muted) / .7)}.dark\:data-\[state\=active\]\:shadow-lg[data-state=active]:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:w-\[200px\]{width:200px}.sm\:w-\[350px\]{width:350px}.sm\:w-\[400px\]{width:400px}.sm\:w-\[460px\]{width:460px}.sm\:\!max-w-\[600px\]{max-width:600px!important}.sm\:max-w-\[625px\]{max-width:625px}.sm\:max-w-\[700px\]{max-width:700px}.sm\:grid-flow-col{grid-auto-flow:column}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media(min-width:768px){.md\:relative{position:relative}.md\:inset-auto{inset:auto}.md\:bottom-auto{bottom:auto}.md\:top-0{top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-full{height:100%}.md\:w-\[500px\]{width:500px}.md\:w-\[560px\]{width:560px}.md\:max-w-\[420px\]{max-width:420px}.md\:max-w-\[80\%\]{max-width:80%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.md\:grid-cols-\[var\(--v1-sidebar-width\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:var(--v1-sidebar-width) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:rounded-tl-xl{border-top-left-radius:.75rem}.md\:bg-\[unset\]{background-color:unset}.md\:transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.md\:duration-200{transition-duration:.2s}.md\:ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.md\:duration-200{animation-duration:.2s}.md\:ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.md\:dark\:bg-\[unset\]:is(.dark *){background-color:unset}}@media(min-width:1024px){.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:w-\[250px\]{width:250px}.lg\:w-\[600px\]{width:600px}.lg\:w-\[680px\]{width:680px}.lg\:max-w-\[500px\]{max-width:500px}.lg\:max-w-\[560px\]{max-width:560px}.lg\:max-w-\[60\%\]{max-width:60%}.lg\:max-w-none{max-width:none}.lg\:grid-flow-col{grid-auto-flow:column}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[1fr_round\(nearest\,50\%\,24px\)\]{grid-template-columns:1fr round(nearest,50%,24px)}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-start{justify-content:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:px-12{padding-left:3rem;padding-right:3rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-12{padding-top:3rem;padding-bottom:3rem}.lg\:pb-12{padding-bottom:3rem}.lg\:text-left{text-align:left}.lg\:text-right{text-align:right}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:\[grid-template-columns\:1fr_1fr_auto_1fr\]{grid-template-columns:1fr 1fr auto 1fr}}@media(min-width:1280px){.xl\:max-w-\[50\%\]{max-width:50%}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\*\]\:line-through>*{text-decoration-line:line-through}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:hidden>svg{display:none}.\[\&\>svg\]\:size-3\.5>svg{width:.875rem;height:.875rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\]\:text-red-700>svg{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.dark\:\[\&\>svg\]\:text-red-300>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:text-muted-foreground\/50 svg{color:hsl(var(--muted-foreground) / .5)}.\[\&_svg\]\:text-primary svg{color:hsl(var(--primary))}.\[\&_td\:last-child\]\:w-\[60px\] td:last-child{width:60px}.\[\&_td\:last-child\]\:min-w-\[60px\] td:last-child{min-width:60px}.\[\&_td\:last-child\]\:max-w-\[60px\] td:last-child{max-width:60px}.\[\&_th\:last-child\]\:w-\[60px\] th:last-child{width:60px}.\[\&_th\:last-child\]\:min-w-\[60px\] th:last-child{min-width:60px}.\[\&_th\:last-child\]\:max-w-\[60px\] th:last-child{max-width:60px} diff --git a/hatchetembed/dashboard/assets/inline-error-BRPaHH6l.js b/hatchetembed/dashboard/assets/inline-error-BRPaHH6l.js deleted file mode 100644 index 69b46bee72..0000000000 --- a/hatchetembed/dashboard/assets/inline-error-BRPaHH6l.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,A as r,d as a}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9ab33de8-b430-45a0-89ab-47461d35eab0",e._sentryDebugIdIdentifier="sentry-dbid-9ab33de8-b430-45a0-89ab-47461d35eab0")}catch{}})();function d(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function u({errors:e,className:n}){return e.length===0?null:t.jsx(r,{variant:"destructive",className:n,children:t.jsx(a,{children:e.length===1?d(e[0]):t.jsx("ul",{className:"list-disc space-y-1 pl-4",children:e.map((i,l)=>t.jsx("li",{children:d(i)},l))})})})}export{u as I}; diff --git a/hatchetembed/dashboard/assets/invite-modal-CIZIW_VD.js b/hatchetembed/dashboard/assets/invite-modal-CIZIW_VD.js deleted file mode 100644 index 4a248ec37f..0000000000 --- a/hatchetembed/dashboard/assets/invite-modal-CIZIW_VD.js +++ /dev/null @@ -1 +0,0 @@ -import{m as P,J as G,k as c,l as W,p as H,au as X,j as e,_ as Z,$ as ee,a0 as Q,a1 as V,bc as q,aQ as te,aR as ne,aS as L,aT as C,aU as se,aV as g,a3 as J,A as ae,d as re,B as N,aF as ce,aK as oe}from"./index-NcPpBRAY.js";import{u as ie}from"./use-analytics-Jv1fF8RR.js";import{u as le}from"./tenant-wrapper-CsXNqzkl.js";import{u as de}from"./use-pending-invites-DdxsIf8r.js";import{f as ue}from"./member-primitives-r9nHLQI3.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="19d3da2e-e745-481e-a750-7414ecb5b6a6",r._sentryDebugIdIdentifier="sentry-dbid-19d3da2e-e745-481e-a750-7414ecb5b6a6")}catch{}})();function me({tenantInvites:r,organizationInvites:s,invalidatePendingInvites:a,onClose:x,onConfirmation:j}){const{invalidate:u}=P(),{acceptOrgInviteMutation:d,rejectOrgInviteMutation:y}=G(),{tenantInviteAcceptMutation:D,tenantInviteRejectMutation:R}=le(),{capture:m}=ie(),[z,i]=c.useState(),[S,T]=c.useState(new Set),[$,E]=c.useState([]),[O,w]=c.useState([]),{handleApiError:p}=W({setErrors:w}),v=c.useRef(new Set),h=c.useRef([]),f=c.useCallback((n,o)=>{r.filter(I=>!n.has(I.metadata.id)).length+s.filter(I=>!n.has(I.metadata.id)).length>0||(a(),o.length>0?j():x())},[r,s,a,x,j]),l=c.useCallback(n=>{const o=new Set([...v.current,n]);return v.current=o,T(o),o},[]),{mutationFn:B}=D(),{mutationFn:U}=R(),_=H({mutationKey:["invite-modal:tenant:accept"],mutationFn:async n=>(await B({invite:n.inviteId}),{tenantId:n.tenantId,tenantName:n.tenantName}),onSuccess:({tenantId:n,tenantName:o})=>{const k=[...h.current,{id:n,name:o}];h.current=k,E(k),u()},onError:p}),A=H({mutationKey:["invite-modal:tenant:reject"],mutationFn:async n=>{await U({invite:n.inviteId})},onError:p}),F=c.useCallback((n,o,k)=>{w([]),i(n),_.mutate({inviteId:n,tenantId:o,tenantName:k},{onSuccess:()=>{m("onboarding_tenant_invite_accepted",{invite_id:n,tenant_id:o});const I=l(n);a(),f(I,h.current)},onSettled:()=>i(void 0)})},[_,m,l,a,f]),t=c.useCallback(n=>{w([]),i(n),A.mutate({inviteId:n},{onSuccess:()=>{m("onboarding_tenant_invite_rejected",{invite_id:n});const o=l(n);a(),f(o,h.current)},onSettled:()=>i(void 0)})},[A,m,l,a,f]),b=c.useCallback(n=>{w([]),i(n),d.mutate({inviteId:n},{onSuccess:()=>{u(),m("onboarding_org_invite_accepted",{invite_id:n});const o=l(n);a(),f(o,h.current)},onError:p,onSettled:()=>i(void 0)})},[d,u,m,l,a,f,p]),Y=c.useCallback(n=>{w([]),i(n),y.mutate({inviteId:n},{onSuccess:()=>{m("onboarding_org_invite_rejected",{invite_id:n});const o=l(n);a(),f(o,h.current)},onError:p,onSettled:()=>i(void 0)})},[y,m,l,a,f,p]),M=c.useCallback(()=>{v.current=new Set,h.current=[],i(void 0),T(new Set),E([]),w([])},[]);return{pendingId:z,processedIds:S,acceptedTenantInfos:$,errors:O,handleTenantAccept:F,handleTenantReject:t,handleOrgAccept:b,handleOrgReject:Y,reset:M}}function be({isOpen:r,onClose:s}){var _,A,F;const{pendingInvitesQuery:a,invalidate:x}=de(),{tenantMemberships:j}=P(),{setTenant:u}=X(),[d,y]=c.useState("invites"),D=((_=a.data)==null?void 0:_.tenantInvites)??[],R=((A=a.data)==null?void 0:A.organizationInvites)??[],m=((F=a.data)==null?void 0:F.inviteCount)??0,{pendingId:z,processedIds:i,acceptedTenantInfos:S,errors:T,handleTenantAccept:$,handleTenantReject:E,handleOrgAccept:O,handleOrgReject:w,reset:p}=me({tenantInvites:D,organizationInvites:R,invalidatePendingInvites:x,onClose:s,onConfirmation:()=>y("confirmation")});c.useEffect(()=>{r||(x(),y("invites"),p())},[r,x,p]),c.useEffect(()=>{r&&d==="invites"&&a.isSuccess&&m===0&&i.size===0&&s()},[r,d,a.isSuccess,m,i.size,s]);const v=D.filter(t=>!i.has(t.metadata.id)),h=R.filter(t=>!i.has(t.metadata.id)),f=c.useMemo(()=>S.map(t=>{var b;return{info:t,tenant:(b=j==null?void 0:j.find(Y=>{var M;return((M=Y.tenant)==null?void 0:M.metadata.id)===t.id}))==null?void 0:b.tenant}}).filter(t=>!!t.tenant),[S,j]),l=v.length+h.length,B=l>1?`${l} pending invites`:v[0]?`Join ${v[0].tenantName??"a tenant"}`:h[0]?`Join ${h[0].organizationName??"an organization"}`:"Pending invite",U=r&&d==="invites"&&a.isSuccess&&m===0&&i.size===0;return e.jsx(Z,{open:r,onOpenChange:t=>{t||s()},children:e.jsx(ee,{className:"max-w-2xl",onOpenAutoFocus:t=>t.preventDefault(),children:!U&&e.jsxs(e.Fragment,{children:[d==="invites"?e.jsxs(e.Fragment,{children:[e.jsxs(Q,{children:[e.jsx(V,{children:B}),e.jsx(q,{children:l===1?"Accept or decline the invite below.":`You have ${l} pending invite${l!==1?"s":""}.`})]}),e.jsxs(te,{children:[e.jsx(ne,{children:e.jsxs(L,{children:[e.jsx(C,{className:"w-16",children:"Type"}),e.jsx(C,{children:"Name"}),e.jsx(C,{className:"w-24",children:"Role"}),e.jsx(C,{className:"w-44",children:"From"}),e.jsx(C,{className:"w-20 text-right"})]})}),e.jsxs(se,{children:[v.map(t=>e.jsxs(L,{children:[e.jsx(g,{children:e.jsx(J,{variant:"secondary",className:"text-xs font-normal",children:"Tenant"})}),e.jsx(g,{className:"font-medium",children:t.tenantName??"—"}),e.jsx(g,{className:"capitalize text-muted-foreground",children:t.role.toLowerCase()}),e.jsx(g,{className:"max-w-[176px] truncate text-xs text-muted-foreground",title:t.email,children:t.email}),e.jsx(g,{className:"text-right",children:e.jsx(K,{disabled:z===t.metadata.id,onAccept:()=>$(t.metadata.id,t.tenantId,t.tenantName??""),onDecline:()=>E(t.metadata.id)})})]},t.metadata.id)),h.map(t=>e.jsxs(L,{children:[e.jsx(g,{children:e.jsx(J,{variant:"secondary",className:"text-xs font-normal",children:"Org"})}),e.jsxs(g,{className:"font-medium",children:[t.organizationName??"—",t.tenants&&t.tenants.length>0&&e.jsxs("div",{className:"mt-0.5 text-xs font-normal text-muted-foreground",children:["Includes access to:"," ",t.tenants.slice(0,3).map(b=>`${b.tenantName} (${ue(b.tenantRole)})`).join(", "),t.tenants.length>3&&` and ${t.tenants.length-3} more`]})]}),e.jsx(g,{className:"capitalize text-muted-foreground",children:t.role.toLowerCase()}),e.jsx(g,{className:"max-w-[176px] truncate text-xs text-muted-foreground",title:t.inviterEmail,children:t.inviterEmail}),e.jsx(g,{className:"text-right",children:e.jsx(K,{disabled:z===t.metadata.id,onAccept:()=>O(t.metadata.id),onDecline:()=>w(t.metadata.id)})})]},t.metadata.id))]})]})]}):e.jsx(he,{acceptedTenantInfos:S,acceptedTenants:f,onSwitch:t=>{u(t),s()},onClose:s}),T.length>0&&e.jsx(ae,{variant:"destructive",children:e.jsx(re,{children:T.map((t,b)=>e.jsx("p",{children:t},b))})})]})})})}function he({acceptedTenantInfos:r,acceptedTenants:s,onSwitch:a,onClose:x}){const j=r.length>0&&s.length===0,u=s.length>0;return e.jsxs(e.Fragment,{children:[e.jsxs(Q,{children:[e.jsx(V,{children:"You're all set!"}),e.jsx(q,{children:!u&&!j?"Your invites have been processed.":u&&s.length===1?`You joined ${s[0].info.name}. Switch to it now?`:u?`You joined ${s.length} new tenants. Select one to switch to.`:"Processing…"})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[!u&&!j&&e.jsx("div",{className:"flex justify-end",children:e.jsx(N,{onClick:x,children:"Done"})}),j&&e.jsxs(e.Fragment,{children:[r.map(d=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx(N,{size:"sm",disabled:!0,children:"Loading…"})]},d.id)),e.jsx("div",{className:"flex justify-end",children:e.jsx(N,{variant:"outline",onClick:x,children:"Maybe later"})})]}),u&&s.length===1&&e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(N,{variant:"outline",onClick:x,children:"Maybe later"}),e.jsxs(N,{onClick:()=>a(s[0].tenant),children:["Switch to ",s[0].info.name]})]}),u&&s.length>1&&e.jsxs(e.Fragment,{children:[s.map(({info:d,tenant:y})=>e.jsxs("div",{className:"flex items-center justify-between rounded-md border p-3",children:[e.jsx("span",{className:"font-medium",children:d.name}),e.jsx(N,{size:"sm",onClick:()=>a(y),children:"Switch"})]},d.id)),e.jsx("div",{className:"flex justify-end",children:e.jsx(N,{variant:"outline",onClick:x,children:"Maybe later"})})]})]})]})}function K({disabled:r,onAccept:s,onDecline:a}){return e.jsxs("div",{className:"flex justify-end gap-1",children:[e.jsx(N,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",disabled:r,onClick:a,hoverText:"Decline","aria-label":"Decline",children:e.jsx(ce,{className:"h-4 w-4"})}),e.jsx(N,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-green-500",disabled:r,onClick:s,hoverText:"Accept","aria-label":"Accept",children:e.jsx(oe,{className:"h-4 w-4"})})]})}export{be as I}; diff --git a/hatchetembed/dashboard/assets/managed-compute-Dhtcalwt.js b/hatchetembed/dashboard/assets/managed-compute-Dhtcalwt.js deleted file mode 100644 index 260d8d70b1..0000000000 --- a/hatchetembed/dashboard/assets/managed-compute-Dhtcalwt.js +++ /dev/null @@ -1 +0,0 @@ -import{k as l}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7e5bfe25-ad4d-425c-bfb5-b9cf2b159333",e._sentryDebugIdIdentifier="sentry-dbid-7e5bfe25-ad4d-425c-bfb5-b9cf2b159333")}catch{}})();function E({title:e,titleId:r,...a},t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},a),e?l.createElement("title",{id:r},e):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"}))}const g=l.forwardRef(E);var n=(e=>(e.BILLING_REQUIRED="BILLING_REQUIRED",e.UPGRADE_REQUIRED="UPGRADE_REQUIRED",e))(n||{});const i={free:1,starter:2,growth:5,enterprise:5},s={free:2,starter:5,growth:20,enterprise:20},R={create:()=>e=>{var a,t;return((a=e.meta)==null?void 0:a.requireBillingForManagedCompute)&&!((t=e.billing)!=null&&t.hasPaymentMethods)?[!1,n.BILLING_REQUIRED]:[!0,void 0]},canCreateWorkerPool:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan;let t;switch(a){case"free":t=i.free;break;case"starter":t=i.starter;break;case"growth":t=i.growth;break;default:t=i.enterprise}return e>=t?[!1,n.UPGRADE_REQUIRED]:[!0,void 0]},maxReplicas:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan;let t;switch(a){case"free":t=s.free;break;case"starter":t=s.starter;break;case"growth":t=s.growth;break;default:t=s.enterprise}return e>t?[!1,n.UPGRADE_REQUIRED]:[!0,void 0]},canUseGpu:e=>r=>{if(!r.billing)return[!0,void 0];if(!e.gpuKind||!e.gpus||e.gpus===0)return[!0,void 0];switch(r.billing.plan){case"free":case"starter":return[!1,n.UPGRADE_REQUIRED];case"growth":return[!0,void 0];default:return[!0,void 0]}},selectCompute:e=>r=>{if(!r.billing)return[!0,void 0];const a=r.billing.plan,{cpuKind:t,cpus:o,memoryMb:u,gpuKind:f,gpus:d}=e;if(f||d){const[c,p]=R.canUseGpu({gpuKind:f,gpus:d})(r);if(!c)return[!1,p]}switch(a){case"free":if(t!=="shared")return[!1,n.UPGRADE_REQUIRED];if(o!==1)return[!1,n.UPGRADE_REQUIRED];if(u>1024)return[!1,n.UPGRADE_REQUIRED];break;case"starter":if(o>4)return[!1,n.UPGRADE_REQUIRED];if(u>4096)return[!1,n.UPGRADE_REQUIRED];break}return[!0,void 0]}};export{g as F,n as R,R as m}; diff --git a/hatchetembed/dashboard/assets/managed-workers-gate-C-OegMsp.js b/hatchetembed/dashboard/assets/managed-workers-gate-C-OegMsp.js deleted file mode 100644 index 21d36d51a9..0000000000 --- a/hatchetembed/dashboard/assets/managed-workers-gate-C-OegMsp.js +++ /dev/null @@ -1,16 +0,0 @@ -import{v as s,aI as u,b as f,af as y,j as e,f2 as i,B as t,f4 as d}from"./index-NcPpBRAY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="d0a82905-cb5b-4f5c-8edf-57c238c3b88f",a._sentryDebugIdIdentifier="sentry-dbid-d0a82905-cb5b-4f5c-8edf-57c238c3b88f")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],h=s("cloud",b);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const m=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],p=s("life-buoy",m);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],x=s("mail",k);function w({children:a}){const n=u({from:f.tenantRoute.to}),{cloud:r,featureFlags:o,isCloudEnabled:c}=y(n.tenant),l=(o==null?void 0:o["managed-worker"])==="true";return c&&!r?null:l?e.jsx(e.Fragment,{children:a}):c?e.jsx(i,{icon:e.jsx(p,{className:"h-5 w-5"}),title:"Managed Workers not enabled",description:"Managed Workers aren't enabled for your tenant. Contact support for more information.",actions:e.jsxs(e.Fragment,{children:[e.jsx(t,{leftIcon:e.jsx(x,{className:"h-4 w-4"}),onClick:()=>window.open("mailto:support@hatchet.run","_blank"),children:"Contact us"}),e.jsx(t,{leftIcon:e.jsx(d,{className:"h-4 w-4"}),variant:"outline",onClick:()=>window.history.back(),children:"Go back"})]})}):e.jsx(i,{icon:e.jsx(h,{className:"h-5 w-5"}),title:"Managed Workers are not available",description:"Managed Workers are only available in Hatchet Cloud.",actions:e.jsx(t,{leftIcon:e.jsx(d,{className:"h-4 w-4"}),variant:"outline",onClick:()=>window.history.back(),children:"Go back"})})}export{w as M}; diff --git a/hatchetembed/dashboard/assets/member-primitives-r9nHLQI3.js b/hatchetembed/dashboard/assets/member-primitives-r9nHLQI3.js deleted file mode 100644 index 7ded62439e..0000000000 --- a/hatchetembed/dashboard/assets/member-primitives-r9nHLQI3.js +++ /dev/null @@ -1 +0,0 @@ -import{j as n,a3 as d}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f077c862-d839-41f3-b1dd-d32834f518d8",e._sentryDebugIdIdentifier="sentry-dbid-f077c862-d839-41f3-b1dd-d32834f518d8")}catch{}})();function r(e){return e&&e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function a({role:e}){return n.jsx(d,{variant:"outline",children:r(e)})}function o({email:e}){return n.jsx("span",{className:"text-[13px] text-muted-foreground",children:e})}export{o as M,a as R,r as f}; diff --git a/hatchetembed/dashboard/assets/new-organization-saver-form-B3Ag7ruu.js b/hatchetembed/dashboard/assets/new-organization-saver-form-B3Ag7ruu.js deleted file mode 100644 index 7df036ac97..0000000000 --- a/hatchetembed/dashboard/assets/new-organization-saver-form-B3Ag7ruu.js +++ /dev/null @@ -1 +0,0 @@ -import{k as g,j as e,L as h,I as x,B as v,S as E,c2 as F,m as b,y as j,b5 as w,N as I,c1 as O,l as _,p as A}from"./index-NcPpBRAY.js";import{R as k,W as D,a as R,g as S}from"./welcome-modal-state-YrY6roPC.js";import{s as T}from"./shard-deployment-key-in4ZPoWA.js";import{u as L}from"./use-analytics-Jv1fF8RR.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new n.Error().stack;r&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[r]="b29f6554-4147-4b40-aa64-ea5d8faa2842",n._sentryDebugIdIdentifier="sentry-dbid-b29f6554-4147-4b40-aa64-ea5d8faa2842")}catch{}})();function M({defaultOrganizationName:n="",defaultTenantName:r="",onSubmit:d,isSaving:i,showRegionSelect:l=!1,availableShards:t=[],isShardsLoading:s=!1}){const[a,u]=g.useState(n),[o,p]=g.useState(r),[f,C]=g.useState(),y=g.useMemo(()=>t.map(T),[t]),c=f&&y.includes(f)?f:y[0],z=g.useCallback(m=>{m.preventDefault(),d({organizationName:a,tenantName:o,...l&&c?{region:c}:{}})},[a,o,d,l,c]),N=l&&(s||t.length===0||t.length>0&&!c);return e.jsxs("form",{onSubmit:z,className:"grid gap-6 max-w-lg w-full",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(h,{htmlFor:"organization-name",children:"Organization Name"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your company or team name. Used for billing and grouping your tenants together."}),e.jsx(x,{id:"organization-name",placeholder:"Acme Inc.",type:"text",autoCapitalize:"none",autoCorrect:"off",autoFocus:!0,spellCheck:!1,value:a,onChange:m=>u(m.target.value),disabled:i,required:!0})]}),l&&(s||t.length>0)&&e.jsx(k,{shards:t,value:c,onValueChange:C,isLoading:s}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(h,{htmlFor:"tenant-name",children:"First Tenant Name"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"A tenant is an isolated environment for your tasks, workflows, workers, and events."}),e.jsx(x,{id:"tenant-name",placeholder:"development",type:"text",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:o,onChange:m=>p(m.target.value),disabled:i,required:!0})]}),e.jsx(v,{type:"submit",className:"w-full",disabled:i||N,children:i?e.jsxs(e.Fragment,{children:[e.jsx(E,{}),"Getting started..."]}):e.jsxs(e.Fragment,{children:["Get started",e.jsx(F,{className:"ml-2 size-4"})]})})]})}const U=({afterSave:n})=>{const{invalidate:r}=b(),{isControlPlaneEnabled:d}=j(),{capture:i}=L(),{handleApiError:l}=_(),t=w();return A({mutationFn:async({organizationName:s,tenantName:a,region:u})=>{const o=await t.organizationCreateMutation().mutationFn({name:s}),p=await t.organizationCreateTenantMutation(o.metadata.id).mutationFn({name:a,slug:S(a),...d&&u?{region:u}:{}});return{organization:o,tenant:p}},onSuccess:async s=>{await r(),await new Promise(a=>setTimeout(a,0)),localStorage.setItem(D,R.OrganizationCreated),i("onboarding_tenant_created",{tenant_type:"cloud",is_cloud:!0}),await n(s)},onError:l})};function W({defaultOrganizationName:n,defaultTenantName:r,afterSave:d}){var o;const{isLoaded:i,isCloudEnabled:l}=b(),{isControlPlaneEnabled:t}=j(),s=w(),a=I({...s.sharedShardsQuery(),enabled:t}),u=U({afterSave:d});return i?(O(l),e.jsx(M,{defaultOrganizationName:n,defaultTenantName:r,isSaving:u.isPending||u.isSuccess,onSubmit:u.mutate,showRegionSelect:t,availableShards:(o=a.data)==null?void 0:o.rows,isShardsLoading:a.isLoading})):e.jsx(e.Fragment,{})}export{W as N}; diff --git a/hatchetembed/dashboard/assets/new-tenant-saver-form-DYNtrUbW.js b/hatchetembed/dashboard/assets/new-tenant-saver-form-DYNtrUbW.js deleted file mode 100644 index b604e2e61e..0000000000 --- a/hatchetembed/dashboard/assets/new-tenant-saver-form-DYNtrUbW.js +++ /dev/null @@ -1 +0,0 @@ -import{k as h,j as e,L as C,I,a6 as R,a7 as _,a8 as k,a9 as z,aa as L,B as D,c1 as E,m as O,y as M,N as B,l as W,b5 as Q,p as Y,a as $,c as H}from"./index-NcPpBRAY.js";import{R as J,W as X,a as Z,g as ee}from"./welcome-modal-state-YrY6roPC.js";import{s as te}from"./shard-deployment-key-in4ZPoWA.js";import{F as ae}from"./XMarkIcon-q_Tj_COY.js";import{u as ne}from"./use-analytics-Jv1fF8RR.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new o.Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="9bd3ae7e-78a8-4db1-b8c6-a1eb3a4c3dfb",o._sentryDebugIdIdentifier="sentry-dbid-9bd3ae7e-78a8-4db1-b8c6-a1eb3a4c3dfb")}catch{}})();function se({organizations:o,organizationId:a,setOrganizationId:l,isSaving:c,shouldFocusOrganization:r}){return e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{htmlFor:"organization-select",children:"Organization"}),e.jsxs(R,{name:"organizationId",value:a,onValueChange:l,disabled:c,required:!0,children:[e.jsx(_,{id:"organization-select",autoFocus:r,children:e.jsx(k,{placeholder:"Select an organization"})}),e.jsx(z,{children:o.map(i=>e.jsx(L,{value:i.metadata.id,children:i.name},i.metadata.id))})]})]})}function A({defaultTenantName:o="",isSaving:a=!1,isCloudEnabled:l,organizations:c=null,organizationId:r,onOrganizationIdChange:i,onSubmit:f,showRegionSelect:s=!1,availableShards:n=[],isShardsLoading:u=!1,showTagsInput:m=!1,allTenantTags:d=[]}){const[p,P]=h.useState(o),[j,U]=h.useState(),[g,N]=h.useState([]),[y,T]=h.useState(""),S=h.useMemo(()=>n.map(te),[n]),b=j&&S.includes(j)?j:S[0],v=h.useCallback(t=>{const x=t.trim();x&&!g.includes(x)&&N(w=>[...w,x]),T("")},[g]),K=t=>N(x=>x.filter(w=>w!==t)),V=t=>{t.key==="Enter"&&(t.preventDefault(),v(y))},q=t=>{t.preventDefault(),l?(E(r),f({tenantName:p,organizationId:r,...s&&b?{region:b}:{},...m&&g.length>0?{tags:g}:{}})):f({tenantName:p})},F=l&&!r,G=s&&(u||n.length===0||n.length>0&&!b);return e.jsxs("form",{onSubmit:q,className:"grid gap-6 max-w-lg w-full",children:[l&&c&&e.jsx(se,{organizations:c,organizationId:r,setOrganizationId:i,isSaving:a,shouldFocusOrganization:F}),l&&s&&(u||n.length>0)&&e.jsx(J,{shards:n,value:b,onValueChange:U,isLoading:u}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{htmlFor:"tenant-name",children:"Tenant Name"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"An isolated environment for your workflows, workers, and events. Most teams start with dev and add staging or production later."}),e.jsx(I,{id:"tenant-name",placeholder:"production",type:"text",autoCapitalize:"none",autoCorrect:"off",autoFocus:!F,spellCheck:!1,value:p,onChange:t=>P(t.target.value),disabled:a,required:!0})]}),m&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(C,{children:"Tags (optional)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Users in user groups which match these tags automatically get access to this tenant."}),g.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border bg-secondary px-3 py-1 text-sm text-secondary-foreground",children:[t,e.jsx("button",{type:"button",onClick:()=>K(t),disabled:a,className:"ml-0.5 rounded hover:text-destructive disabled:opacity-50","aria-label":`Remove ${t}`,children:e.jsx(ae,{className:"size-3.5"})})]},t))}),d.filter(t=>!g.includes(t)).length>0&&e.jsxs(R,{onValueChange:v,disabled:a,value:"",children:[e.jsx(_,{children:e.jsx(k,{placeholder:"Add an existing tag…"})}),e.jsx(z,{children:d.filter(t=>!g.includes(t)).map(t=>e.jsx(L,{value:t,children:t},t))})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{id:"tenant-tags",placeholder:"New tag...",type:"text",value:y,onChange:t=>T(t.target.value),onKeyDown:V,disabled:a,autoComplete:"off"}),e.jsx(D,{type:"button",variant:"outline",onClick:()=>v(y),disabled:a||!y.trim(),children:"Add"})]})]}),e.jsx(D,{type:"submit",className:"w-full",disabled:a||G,children:a?"Getting started...":"Get started"})]})}const oe=({afterSave:o})=>{const{isCloudEnabled:a,invalidate:l}=O(),{isControlPlaneEnabled:c}=M(),{capture:r}=ne(),{handleApiError:i}=W(),f=Q();return Y({mutationFn:async({tenantName:s,organizationId:n,region:u,tags:m})=>{const d=ee(s);if(a)return E(n),{type:"cloud",tenant:await f.organizationCreateTenantMutation(n).mutationFn({name:s,slug:d,...c&&u?{region:u}:{},...c&&m&&m.length>0?{tags:m}:{}}),organizationId:n};{const{data:p}=await $.tenantCreate({name:s,slug:d});return{type:"regular",tenant:p}}},onSuccess:async s=>{await l(),await new Promise(n=>setTimeout(n,0)),s.type==="cloud"&&localStorage.setItem(X,Z.TenantCreated),r("onboarding_tenant_created",{tenant_type:s.type,is_cloud:s.type==="cloud"}),o(s)},onError:i})};function ue({defaultTenantName:o,defaultOrganizationId:a,allTenantTags:l,afterSave:c}){var p;const{isCloudEnabled:r,organizations:i,isLoaded:f}=O(),{isControlPlaneEnabled:s}=M(),[n,u]=h.useState(a);h.useEffect(()=>{u(a)},[a]);const m=B({queryKey:["organization:available-shards",n??""],queryFn:async()=>(await H.organizationListAvailableShards(n)).data,enabled:!!(r&&s&&n)}),d=oe({afterSave:c});return f?(E(!r||i),r?e.jsx(A,{defaultTenantName:o,isSaving:d.isPending,isCloudEnabled:!0,organizations:i,organizationId:n,onOrganizationIdChange:u,showRegionSelect:s,showTagsInput:s,allTenantTags:l,availableShards:(p=m.data)==null?void 0:p.rows,isShardsLoading:m.isLoading,onSubmit:d.mutate}):e.jsx(A,{defaultTenantName:o,isSaving:d.isPending,isCloudEnabled:!1,onSubmit:d.mutate})):e.jsx(e.Fragment,{})}export{ue as N}; diff --git a/hatchetembed/dashboard/assets/no-auth-Pb4ETRB1.js b/hatchetembed/dashboard/assets/no-auth-Pb4ETRB1.js deleted file mode 100644 index 51781ce4fd..0000000000 --- a/hatchetembed/dashboard/assets/no-auth-Pb4ETRB1.js +++ /dev/null @@ -1 +0,0 @@ -import{f as a,q as s,c as n,a as o,r as i,b as u,i as f}from"./index-NcPpBRAY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="9938abb6-34d6-4faa-a400-052e4ff8399c",t._sentryDebugIdIdentifier="sentry-dbid-9938abb6-34d6-4faa-a400-052e4ff8399c")}catch{}})();const d=async()=>{var t;try{const{isControlPlaneEnabled:e}=await a();if(await s.fetchQuery({queryKey:["user:get"],queryFn:async()=>(await(e?n.cloudUserGetCurrent():o.userGetCurrent())).data}))throw i({to:u.authenticatedRoute.to})}catch(e){if(e instanceof Response)throw e;if(f(e)){if(((t=e.response)==null?void 0:t.status)===403)return;throw e}}};async function c(){return await d(),null}export{c as loader}; diff --git a/hatchetembed/dashboard/assets/organization-selector-CCw2_tjm.js b/hatchetembed/dashboard/assets/organization-selector-CCw2_tjm.js deleted file mode 100644 index 3c68f4f777..0000000000 --- a/hatchetembed/dashboard/assets/organization-selector-CCw2_tjm.js +++ /dev/null @@ -1 +0,0 @@ -import{k as u,h as A,bO as H,au as P,J,j as e,aM as q,c3 as K,c4 as Q,B as z,c5 as M,bB as V,e as $,c6 as X,bD as Y,bF as ee,bG as ae,c7 as I,g as te,b as B,bH as R,c8 as ne,c9 as se,aN as oe,aO as re,aP as ie,bt as le,c1 as de}from"./index-NcPpBRAY.js";import{T as U}from"./tenant-region-badge-C-bbxnQA.js";import{g as ce}from"./global-emitter-kjRqhIKI.js";import{F as _}from"./PlusIcon-ChBf4T_m.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="b5664e82-d941-414f-9543-d9051ee65957",n._sentryDebugIdIdentifier="sentry-dbid-b5664e82-d941-414f-9543-d9051ee65957")}catch{}})();function ge({title:n,titleId:o,...f},h){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:h,"aria-labelledby":o},f),n?u.createElement("title",{id:o},n):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const me=u.forwardRef(ge);function F({organization:n,tenants:o,currentTenant:f,isExpanded:h,onToggleExpand:O,onTenantSelect:v,onClose:s,onNavigate:p}){const{setTenant:j}=P(),w=u.useMemo(()=>{var a;return(a=[...o].sort((i,l)=>{var d,c,g,b;return((b=(d=i.tenant)==null?void 0:d.name)==null?void 0:b.toLowerCase().localeCompare(((g=(c=l.tenant)==null?void 0:c.name)==null?void 0:g.toLowerCase())??""))??0}).find(i=>i.tenant))==null?void 0:a.tenant},[o]),T=a=>{a.preventDefault(),a.stopPropagation(),s(),w&&j(w,{navigate:!1}),p({to:B.organizationsIndexRoute.to,params:{organization:n.metadata.id}})},x=a=>{a.preventDefault(),a.stopPropagation(),s(),ce.emit("create-new-tenant",{defaultOrganizationId:n.metadata.id})};return e.jsxs(e.Fragment,{children:[e.jsx(R,{onSelect:O,value:`org-${n.metadata.id}`,className:"cursor-pointer text-sm hover:bg-accent focus:bg-accent",children:e.jsxs("div",{className:"flex w-full items-start justify-between",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-2",children:[e.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[h?e.jsx(ne,{className:"size-3"}):e.jsx(se,{className:"size-3"}),e.jsx(M,{className:"size-4"})]}),e.jsx("span",{className:"break-words font-medium leading-tight",children:n.name})]}),n.isOwner&&e.jsxs("div",{className:"ml-2 flex flex-shrink-0 items-center gap-1",children:[e.jsx(z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-accent-foreground/10",onClick:x,title:"New Tenant",children:e.jsx(_,{className:"size-3"})}),e.jsx(z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-accent-foreground/10",onClick:T,title:"Settings",children:e.jsx(me,{className:"size-3"})})]})]})}),h&&o.sort((a,i)=>{var l,d,c,g;return((g=(l=a.tenant)==null?void 0:l.name)==null?void 0:g.toLowerCase().localeCompare(((c=(d=i.tenant)==null?void 0:d.name)==null?void 0:c.toLowerCase())??""))??0}).map(a=>{var i,l,d,c,g;return e.jsx(R,{value:`tenant-${(i=a.tenant)==null?void 0:i.metadata.id}`,onSelect:()=>{de(a.tenant),v(a.tenant),s()},className:"cursor-pointer pl-6 text-sm hover:bg-accent focus:bg-accent",children:e.jsxs("div",{className:"flex w-full min-w-0 items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:e.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"})}),e.jsxs(oe,{children:[e.jsx(re,{asChild:!0,children:e.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-muted-foreground",children:(l=a.tenant)==null?void 0:l.name})}),e.jsx(ie,{side:"right",className:"max-w-[min(24rem,calc(100vw-2rem))] break-words",children:(d=a.tenant)==null?void 0:d.name})]}),e.jsx(U,{region:(c=a.tenant)==null?void 0:c.region})]}),e.jsx(le,{className:$("size-4 shrink-0",(f==null?void 0:f.slug)===((g=a.tenant)==null?void 0:g.slug)?"opacity-100":"opacity-0")})]})},a.metadata.id)})]})}function pe({className:n,memberships:o}){const f=A(),h=H(),{setTenant:O,isUserUniverseLoaded:v,tenant:s}=P(),[p,j]=u.useState(!1),[w,T]=u.useState([]),{organizations:x,getOrganizationForTenant:a,isTenantArchivedInOrg:i,isUserUniverseLoaded:l}=J(),d=()=>j(!1),c=t=>{t.to&&(sessionStorage.setItem("orgSettingsPreviousPath",h.pathname),f({to:t.to,params:t.params,replace:!1}))},g=t=>{O(t)},b=t=>{T(r=>r.includes(t)?r.filter(k=>k!==t):[...r,t])},{currentOrgData:N,otherOrgsData:L}=u.useMemo(()=>{const t=new Map;o.forEach(m=>{var D;const C=((D=m.tenant)==null?void 0:D.metadata.id)||"";if(i(C))return;const S=a(C);if(S){const y=S.metadata.id;t.has(y)||t.set(y,[]),t.get(y).push(m)}});const r=s?a(s.metadata.id):null,k=r?t.get(r.metadata.id)||[]:[],Z=x.filter(m=>m.metadata.id!==(r==null?void 0:r.metadata.id)).map(m=>({organization:m,tenants:t.get(m.metadata.id)||[]})).sort((m,C)=>m.organization.name.toLowerCase().localeCompare(C.organization.name.toLowerCase()));return{currentOrgData:r?{organization:r,tenants:k}:null,otherOrgsData:Z}},[o,s,a,x,i]),E=o.length===0&&x.length>0,G=!v||!l||o.length===0&&x.length===0,W=E?x.length===1?x[0].name:"Select organization":(s==null?void 0:s.name)??"Loading tenant…";return e.jsx(q,{delayDuration:200,children:e.jsxs(K,{open:p,onOpenChange:j,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(z,{variant:"outline",size:"sm",role:"combobox","aria-expanded":p,"aria-label":"Select a tenant",className:$("w-full min-w-0 justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",p&&"bg-muted/30",n),disabled:G,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx(M,{className:"size-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:W}),!E&&e.jsx(U,{region:s==null?void 0:s.region})]}),(!v||!l)&&!p?e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground/70"}):e.jsx(V,{className:"size-4 shrink-0 opacity-50"})]})}),e.jsx(X,{side:"bottom",align:"start",sideOffset:8,className:"w-[287px] rounded-md border border-border p-0 shadow-md",children:e.jsx(Y,{className:"border-0",children:e.jsxs(ee,{children:[e.jsx(ae,{children:"No tenants found."}),!l&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground",children:[e.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground/70"}),"Loading organizations…"]}),N&&e.jsxs(I,{heading:"Current Organization",children:[e.jsx(F,{organization:N.organization,tenants:N.tenants,currentTenant:s,isExpanded:w.includes(N.organization.metadata.id),onToggleExpand:()=>b(N.organization.metadata.id),onTenantSelect:g,onClose:d,onNavigate:c}),e.jsx("div",{className:"px-2 py-1",children:e.jsx(z,{variant:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(_,{className:"size-4"}),asChild:!0,children:e.jsx(te,{to:B.organizationsNewRoute.to,onClick:()=>j(!1),children:"Create Organization"})})})]}),L.length>0&&e.jsx(I,{heading:"Other Organizations",children:L.map(({organization:t,tenants:r})=>e.jsx(F,{organization:t,tenants:r,currentTenant:s,isExpanded:w.includes(t.metadata.id),onToggleExpand:()=>b(t.metadata.id),onTenantSelect:g,onClose:d,onNavigate:c},t.metadata.id))})]})})})]})})}export{pe as O}; diff --git a/hatchetembed/dashboard/assets/outlet-BQs_XxR1.js b/hatchetembed/dashboard/assets/outlet-BQs_XxR1.js deleted file mode 100644 index 3d8b90df80..0000000000 --- a/hatchetembed/dashboard/assets/outlet-BQs_XxR1.js +++ /dev/null @@ -1 +0,0 @@ -import{aG as n}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2ffa2e94-d8f1-4282-aeac-e0957391f0a5",e._sentryDebugIdIdentifier="sentry-dbid-2ffa2e94-d8f1-4282-aeac-e0957391f0a5")}catch{}})();const o=e=>({...n(),...e});export{o as u}; diff --git a/hatchetembed/dashboard/assets/redirect-BMRF0kLa.js b/hatchetembed/dashboard/assets/redirect-BMRF0kLa.js deleted file mode 100644 index d9bcffe5f3..0000000000 --- a/hatchetembed/dashboard/assets/redirect-BMRF0kLa.js +++ /dev/null @@ -1 +0,0 @@ -import{h as n,k as o}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="760451d2-3243-4698-9e0b-90f08bc5b021",e._sentryDebugIdIdentifier="sentry-dbid-760451d2-3243-4698-9e0b-90f08bc5b021")}catch{}})();const s="hatchet:redirect_target";function i(){const e=n();return o.useCallback(t=>{const r=sessionStorage.getItem(s);return r?(sessionStorage.removeItem(s),e({to:r,replace:!0})):e(t)},[e])}export{s as R,i as u}; diff --git a/hatchetembed/dashboard/assets/resource-limit-columns-CvplayQs.js b/hatchetembed/dashboard/assets/resource-limit-columns-CvplayQs.js deleted file mode 100644 index b9af5000eb..0000000000 --- a/hatchetembed/dashboard/assets/resource-limit-columns-CvplayQs.js +++ /dev/null @@ -1 +0,0 @@ -import{k as t,j as a,aL as u,e as d,bT as r}from"./index-NcPpBRAY.js";import{g as c}from"./resource-limit-status-BK8AB43u.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="38b7c53b-6284-4e7a-9560-2d0388c6536c",e._sentryDebugIdIdentifier="sentry-dbid-38b7c53b-6284-4e7a-9560-2d0388c6536c")}catch{}})();const i={[r.WORKER]:"Total Workers",[r.WORKER_SLOT]:"Concurrency Slots",[r.EVENT]:"Events",[r.TASK_RUN]:"Task Runs",[r.CRON]:"Cron Triggers",[r.SCHEDULE]:"Schedule Triggers",[r.INCOMING_WEBHOOK]:"Incoming Webhooks"},m={ok:"border-transparent rounded-full bg-green-500",warn:"border-transparent rounded-full bg-yellow-500",exhausted:"border-transparent rounded-full bg-red-500"};function b({value:e,alarmValue:n,limitValue:l}){const o=c({value:e,alarmValue:n,limitValue:l});return a.jsx("div",{className:d(m[o],"h-[6px] w-[6px] rounded-full")})}const s={"24h0m0s":"Daily","168h0m0s":"Weekly","720h0m0s":"Monthly"};function g(){return t.useMemo(()=>[{columnLabel:"Resource",cellRenderer:e=>a.jsxs("div",{className:"flex flex-row items-center gap-3",children:[a.jsx(b,{value:e.value,alarmValue:e.alarmValue,limitValue:e.limitValue}),a.jsx("span",{className:"font-medium text-foreground",children:i[e.resource]})]})},{columnLabel:"Current Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.value})},{columnLabel:"Limit Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.limitValue})},{columnLabel:"Alarm Value",cellRenderer:e=>a.jsx("span",{className:"tabular-nums",children:e.alarmValue||"N/A"})},{columnLabel:"Meter Window",cellRenderer:e=>(e.window||"-")in s?s[e.window||"-"]:e.window},{columnLabel:"Last Refill",cellRenderer:e=>e.window?e.lastRefill&&a.jsx(u,{date:e.lastRefill}):"N/A"}],[])}export{b as L,g as u}; diff --git a/hatchetembed/dashboard/assets/resource-limit-status-BK8AB43u.js b/hatchetembed/dashboard/assets/resource-limit-status-BK8AB43u.js deleted file mode 100644 index 176cc72937..0000000000 --- a/hatchetembed/dashboard/assets/resource-limit-status-BK8AB43u.js +++ /dev/null @@ -1 +0,0 @@ -import"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a910bcb9-8ae5-4502-b7dc-535f0da90256",e._sentryDebugIdIdentifier="sentry-dbid-a910bcb9-8ae5-4502-b7dc-535f0da90256")}catch{}})();const r=({value:e,alarmValue:t,limitValue:n})=>e>=n?"exhausted":t&&e>=t?"warn":"ok";export{r as g}; diff --git a/hatchetembed/dashboard/assets/resource-not-found-DGbig0ge.js b/hatchetembed/dashboard/assets/resource-not-found-DGbig0ge.js deleted file mode 100644 index d0daa35091..0000000000 --- a/hatchetembed/dashboard/assets/resource-not-found-DGbig0ge.js +++ /dev/null @@ -1 +0,0 @@ -import{h as l,bO as c,j as e,f2 as r,a3 as i,B as n,b as u,f3 as f,f4 as x,f5 as h}from"./index-NcPpBRAY.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="135623c4-92d3-41c4-bea8-c6d218ac5a46",s._sentryDebugIdIdentifier="sentry-dbid-135623c4-92d3-41c4-bea8-c6d218ac5a46")}catch{}})();function g({resource:s,description:t,primaryAction:a}){const o=l(),d=c();return e.jsxs(r,{icon:e.jsx(h,{className:"h-5 w-5"}),title:`${s} not found`,description:t??`The ${s.toLowerCase()} you're looking for doesn’t exist.`,actions:e.jsxs(e.Fragment,{children:[e.jsx(n,{leftIcon:e.jsx(f,{className:"h-4 w-4"}),onClick:()=>o(a?{...a.navigate,replace:a.navigate.replace??!0}:{to:u.authenticatedRoute.to,replace:!0}),children:(a==null?void 0:a.label)??"Dashboard"}),e.jsx(n,{leftIcon:e.jsx(x,{className:"h-4 w-4"}),onClick:()=>window.history.back(),variant:"outline",children:"Go back"})]}),children:[e.jsx("div",{className:"flex justify-center",children:e.jsx(i,{variant:"secondary",className:"font-mono",children:"404"})}),e.jsxs("div",{className:"mx-auto w-full max-w-prose rounded-md border bg-muted/20 p-3 text-left font-mono text-xs text-muted-foreground",children:[e.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground/70",children:"Requested path"}),e.jsx("div",{className:"break-all text-foreground/90",children:d.pathname})]})]})}export{g as R}; diff --git a/hatchetembed/dashboard/assets/secret-copier-68gzWNRB.js b/hatchetembed/dashboard/assets/secret-copier-68gzWNRB.js deleted file mode 100644 index f7c3b13185..0000000000 --- a/hatchetembed/dashboard/assets/secret-copier-68gzWNRB.js +++ /dev/null @@ -1,4 +0,0 @@ -import{bW as b,k as f,j as e,ak as g,ai as y,B as w,bB as v,al as C,am as o,f6 as d,f7 as S,f8 as D,bl as u,e as M,f9 as k,fa as I,fb as N}from"./index-NcPpBRAY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="1133cc11-a4a7-4b08-841d-083071e1ddaa",n._sentryDebugIdIdentifier="sentry-dbid-1133cc11-a4a7-4b08-841d-083071e1ddaa")}catch{}})();d.registerLanguage("typescript",k);d.registerLanguage("yaml",I);d.registerLanguage("json",N);function $({secrets:n,className:t,maxHeight:r,maxWidth:j,copy:m,onClick:i}){const{theme:p}=b(),h=f.useRef(null),[l,a]=f.useState("dotenv"),c=()=>{switch(l){case"json":return JSON.stringify(n,null,2);case"yaml":return E(n);case"table":return e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Env Var"}),e.jsx("th",{children:"Value"})]})}),e.jsx("tbody",{children:Object.entries(n).map(([s,x])=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx(u,{text:s})," ",s]}),e.jsxs("td",{children:[e.jsx(u,{text:x})," ",x]})]},s))})]});case"cli":return O(n);case"dotenv":default:return L(n)}};return e.jsxs("div",{className:M(t,"relative h-fit w-full"),children:[e.jsx("div",{className:"justify-right mb-2 flex flex-row items-center",children:e.jsxs(g,{children:[e.jsx(y,{asChild:!0,children:e.jsxs(w,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[e.jsx("span",{children:l}),e.jsx(v,{className:"ml-2 h-4 w-4"})]})}),e.jsxs(C,{align:"start",children:[e.jsx(o,{onClick:()=>a("dotenv"),children:"dotenv"}),e.jsx(o,{onClick:()=>a("cli"),children:"cli"}),e.jsx(o,{onClick:()=>a("json"),children:"json"}),e.jsx(o,{onClick:()=>a("yaml"),children:"yaml"}),e.jsx(o,{onClick:()=>a("table"),children:"table"})]})]})}),e.jsx("div",{role:"button",tabIndex:0,onKeyDown:()=>{var s;return(s=h.current)==null?void 0:s.focus()},onClick:()=>{var s;(s=h.current)==null||s.focus(),i&&i()},className:"relative flex rounded-lg bg-muted",children:l==="table"?c():e.jsx(d,{language:"text",style:p==="dark"?S:D,wrapLines:!1,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},customStyle:{cursor:"default",borderRadius:"0.5rem",maxHeight:r,maxWidth:j,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",fontSize:"0.75rem",lineHeight:"1rem",padding:"0.5rem",flex:"1",background:"transparent"},children:c()})}),m&&l!=="table"&&e.jsx(u,{text:c(),withText:!0,onCopy:()=>i&&i()})]})}function L(n){return Object.entries(n).map(([t,r])=>`${t}="${r}"`).join(` -`)}function O(n){return Object.entries(n).map(([t,r])=>`export ${t}="${r}"`).join(` -`)}function E(n){return Object.entries(n).map(([t,r])=>`${t}:"${r}"`).join(` -`)}export{$ as S}; diff --git a/hatchetembed/dashboard/assets/sections-Dml0nEEJ.js b/hatchetembed/dashboard/assets/sections-Dml0nEEJ.js deleted file mode 100644 index a95785c213..0000000000 --- a/hatchetembed/dashboard/assets/sections-Dml0nEEJ.js +++ /dev/null @@ -1 +0,0 @@ -import{j as n,aI as e,b as r}from"./index-NcPpBRAY.js";import{C as a}from"./index-CgrU27uR.js";import"./member-primitives-r9nHLQI3.js";import"./settings-page-header-CkCZd3CN.js";import"./settings-row-D2iLPMr6.js";import"./tenant-region-badge-C-bbxnQA.js";import"./shard-deployment-key-in4ZPoWA.js";import"./switch-C9IBAXBS.js";import"./data-contracts-C0lcHVTf.js";import"./global-emitter-kjRqhIKI.js";import"./docs-button-Mn8SLZkH.js";import"./shield-check-jS3YzcEA.js";import"./inline-error-BRPaHH6l.js";import"./XMarkIcon-q_Tj_COY.js";import"./confirm-dialog-Bv8agSqW.js";import"./KeyIcon-szjQ8KFq.js";import"./ExclamationTriangleIcon-Okie-gQE.js";import"./PlusIcon-ChBf4T_m.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="ed16d34a-aa7e-4421-8153-8bf80495ce61",t._sentryDebugIdIdentifier="sentry-dbid-ed16d34a-aa7e-4421-8153-8bf80495ce61")}catch{}})();function o({section:t}){const{organization:i}=e({from:r.organizationsRoute.to});return n.jsx(a,{orgId:i,section:t})}function D(){return n.jsx(o,{section:"tenants"})}function R(){return n.jsx(o,{section:"team"})}function _(){return n.jsx(o,{section:"tokens"})}function h(){return n.jsx(o,{section:"regions"})}function k(){return n.jsx(o,{section:"sso"})}function S(){return n.jsx(o,{section:"audit-log"})}export{S as OrganizationAuditLogPage,h as OrganizationRegionsPage,k as OrganizationSsoPage,R as OrganizationTeamPage,D as OrganizationTenantsPage,_ as OrganizationTokensPage}; diff --git a/hatchetembed/dashboard/assets/settings-layout-C9ou3Eyd.js b/hatchetembed/dashboard/assets/settings-layout-C9ou3Eyd.js deleted file mode 100644 index 2a76161106..0000000000 --- a/hatchetembed/dashboard/assets/settings-layout-C9ou3Eyd.js +++ /dev/null @@ -1 +0,0 @@ -import{b as a,au as p,aI as z,af as R,y as I,J as w,C as j,ae as S,aJ as v,j as t,g as T,B as O,e as N,aH as C}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="f4d49dd2-bb7e-4ab3-88b6-8212f9412944",e._sentryDebugIdIdentifier="sentry-dbid-f4d49dd2-bb7e-4ab3-88b6-8212f9412944")}catch{}})();function B(e){const o=[];if(e.tenantId){const n={tenant:e.tenantId};o.push({key:"tenant",title:"Tenant",items:[{key:"general",name:"General",to:a.tenantSettingsOverviewRoute.to,params:n},{key:"members",name:"Members",to:a.tenantSettingsMembersRoute.to,params:n},{key:"api-tokens",name:"API Tokens",to:a.tenantSettingsApiTokensRoute.to,params:n},{key:"integrations",name:"Integrations",to:a.tenantSettingsIntegrationsRoute.to,params:n},{key:"resource-limits",name:"Resource Limits",to:a.tenantSettingsResourceLimitsRoute.to,params:n}]})}if(e.isCloudEnabled&&e.orgId){const n={organization:e.orgId};o.push({key:"organization",title:"Organization",items:[{key:"organization-general",name:"General",to:a.organizationsIndexRoute.to,params:n,exact:!0},{key:"organization-team",name:"Team",to:a.organizationTeamRoute.to,params:n},{key:"organization-tenants",name:"Tenants",to:a.organizationTenantsRoute.to,params:n},{key:"organization-tokens",name:"Management Tokens",to:a.organizationTokensRoute.to,params:n},...e.isOrganizationOwner&&e.isControlPlaneEnabled?[{key:"organization-regions",name:"Available Regions",to:a.organizationRegionsRoute.to,params:n}]:[],...e.canManageSso?[{key:"organization-sso",name:"SSO",to:a.organizationSsoRoute.to,params:n}]:[],...e.isControlPlaneEnabled?[{key:"organization-audit-log",name:"Audit Log",to:a.organizationAuditLogRoute.to,params:n}]:[],...e.canBill?[{key:"organization-billing",name:"Billing & Usage",to:a.organizationBillingRoute.to,params:n}]:[]]})}return o}function M(){var u,c;const{tenantId:e,organizationId:o}=p(),n=z({strict:!1}),{cloud:r,isCloudEnabled:m}=R(e),{isControlPlaneEnabled:f}=I(),{organizations:y}=w(),{meta:l}=j(),b=S(),g=v(n,"organization")??o,d=((u=y.find(i=>i.metadata.id===g))==null?void 0:u.isOwner)??!1,x=d&&(((c=l==null?void 0:l.auth)==null?void 0:c.schemes)||[]).includes("sso"),k=B({tenantId:e,orgId:g,canBill:r==null?void 0:r.canBill,isCloudEnabled:m,isControlPlaneEnabled:f,isOrganizationOwner:d,canManageSso:x});return t.jsxs("div",{className:"flex h-full min-w-0 gap-x-6",children:[t.jsxs("aside",{className:"sticky top-0 w-56 shrink-0 self-start py-4",children:[t.jsx("h2",{className:"mb-4 px-2 text-lg font-semibold",children:"Settings"}),t.jsx("div",{className:"flex flex-col gap-y-6",children:k.map(i=>t.jsxs("div",{children:[t.jsx("h3",{className:"mb-2 px-2 text-xs font-mono tracking-widest uppercase text-muted-foreground",children:i.title}),t.jsx("div",{className:"flex flex-col gap-y-1",children:i.items.map(s=>{const h=!!b({to:s.to,params:s.params,fuzzy:!s.exact});return t.jsx(T,{to:s.to,params:s.params,preload:!1,children:t.jsx(O,{variant:"ghost",className:N("h-8 w-full justify-start pl-2 min-w-0 overflow-hidden",h&&"bg-slate-200 dark:bg-slate-800"),children:t.jsx("span",{className:"truncate",children:s.name})})},s.key)})})]},i.key))})]}),t.jsx("div",{className:"min-w-0 flex-1",children:t.jsx(C,{})})]})}export{M as default}; diff --git a/hatchetembed/dashboard/assets/settings-page-header-CkCZd3CN.js b/hatchetembed/dashboard/assets/settings-page-header-CkCZd3CN.js deleted file mode 100644 index 794d2e2708..0000000000 --- a/hatchetembed/dashboard/assets/settings-page-header-CkCZd3CN.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="676c8891-99cd-419f-b4a2-db95cd393ede",e._sentryDebugIdIdentifier="sentry-dbid-676c8891-99cd-419f-b4a2-db95cd393ede")}catch{}})();function n({title:e,description:d,children:t}){return s.jsxs("div",{className:"mb-6 flex flex-col gap-4 border-b border-border/50 pb-6 md:flex-row md:items-start md:justify-between",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:e}),s.jsx("p",{className:"max-w-xl text-sm text-muted-foreground",children:d})]}),t]})}export{n as S}; diff --git a/hatchetembed/dashboard/assets/settings-row-D2iLPMr6.js b/hatchetembed/dashboard/assets/settings-row-D2iLPMr6.js deleted file mode 100644 index c7668cccea..0000000000 --- a/hatchetembed/dashboard/assets/settings-row-D2iLPMr6.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,bl as d}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="07a2d6e2-0a0c-47d8-97de-90d75b4129c6",e._sentryDebugIdIdentifier="sentry-dbid-07a2d6e2-0a0c-47d8-97de-90d75b4129c6")}catch{}})();function r({label:e,description:s,children:n}){return t.jsxs("div",{className:"flex items-center justify-between gap-4 py-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium",children:e}),s&&t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),n]})}function i({value:e}){return t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"max-w-[280px] truncate font-mono text-sm text-muted-foreground",children:e}),t.jsx(d,{text:e})]})}export{i as R,r as S}; diff --git a/hatchetembed/dashboard/assets/shard-deployment-key-in4ZPoWA.js b/hatchetembed/dashboard/assets/shard-deployment-key-in4ZPoWA.js deleted file mode 100644 index 3f3932a39f..0000000000 --- a/hatchetembed/dashboard/assets/shard-deployment-key-in4ZPoWA.js +++ /dev/null @@ -1 +0,0 @@ -import"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="85dcc49f-734c-41b8-9672-a0f94e62c529",e._sentryDebugIdIdentifier="sentry-dbid-85dcc49f-734c-41b8-9672-a0f94e62c529")}catch{}})();function i(e){if(e.provider){const n=`${e.provider}:${e.region}`;return e.shardName?`${n}:${e.shardName}`:n}return e.shardName?`${e.region}:${e.shardName}`:e.region}function f(e){if(!e)return;const n=e.split(":");if(n.length>=3){const t=n[1],r=n.slice(2).join(":");return`${t} / ${r}`}return n.length===2?n[1]:e}export{f,i as s}; diff --git a/hatchetembed/dashboard/assets/shield-check-jS3YzcEA.js b/hatchetembed/dashboard/assets/shield-check-jS3YzcEA.js deleted file mode 100644 index 5155ed40f1..0000000000 --- a/hatchetembed/dashboard/assets/shield-check-jS3YzcEA.js +++ /dev/null @@ -1,6 +0,0 @@ -import{v as n}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="69a1029d-f488-46c1-91b8-71a0478c2196",e._sentryDebugIdIdentifier="sentry-dbid-69a1029d-f488-46c1-91b8-71a0478c2196")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],c=n("shield-check",o);export{c as S}; diff --git a/hatchetembed/dashboard/assets/steps-CZ8cuefp.js b/hatchetembed/dashboard/assets/steps-CZ8cuefp.js deleted file mode 100644 index a9d3646b52..0000000000 --- a/hatchetembed/dashboard/assets/steps-CZ8cuefp.js +++ /dev/null @@ -1 +0,0 @@ -import{R as l,j as n,fn as te,eU as M,eW as ae,eV as H,eZ as ce,ff as se,eY as ie,e$ as le,k as v,aj as de,e as h,fo as pe}from"./index-NcPpBRAY.js";import{R as fe,T as ue,a as me,c as $}from"./index-CQU71MwM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="82d13b3d-0f22-409b-a8e1-305e7417c8ef",e._sentryDebugIdIdentifier="sentry-dbid-82d13b3d-0f22-409b-a8e1-305e7417c8ef")}catch{}})();var d="Accordion",xe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[S,ve,be]=te(d),[C]=le(d,[be,$]),k=$(),K=l.forwardRef((e,t)=>{const{type:o,...a}=e,c=a,r=a;return n.jsx(S.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?n.jsx(Ce,{...r,ref:t}):n.jsx(Ae,{...c,ref:t})})});K.displayName=d;var[L,ge]=C(d),[U,he]=C(d,{collapsible:!1}),Ae=l.forwardRef((e,t)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},collapsible:r=!1,...s}=e,[i,p]=M({prop:o,defaultProp:a??"",onChange:c,caller:d});return n.jsx(L,{scope:e.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:n.jsx(U,{scope:e.__scopeAccordion,collapsible:r,children:n.jsx(z,{...s,ref:t})})})}),Ce=l.forwardRef((e,t)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},...r}=e,[s,i]=M({prop:o,defaultProp:a??[],onChange:c,caller:d}),p=l.useCallback(x=>i((u=[])=>[...u,x]),[i]),m=l.useCallback(x=>i((u=[])=>u.filter(w=>w!==x)),[i]);return n.jsx(L,{scope:e.__scopeAccordion,value:s,onItemOpen:p,onItemClose:m,children:n.jsx(U,{scope:e.__scopeAccordion,collapsible:!0,children:n.jsx(z,{...r,ref:t})})})}),[Ie,I]=C(d),z=l.forwardRef((e,t)=>{const{__scopeAccordion:o,disabled:a,dir:c,orientation:r="vertical",...s}=e,i=l.useRef(null),p=ce(i,t),m=ve(o),u=se(c)==="ltr",w=ie(e.onKeyDown,b=>{var V;if(!xe.includes(b.key))return;const re=b.target,j=m().filter(P=>{var O;return!((O=P.ref.current)!=null&&O.disabled)}),g=j.findIndex(P=>P.ref.current===re),T=j.length;if(g===-1)return;b.preventDefault();let f=g;const y=0,N=T-1,_=()=>{f=g+1,f>N&&(f=y)},R=()=>{f=g-1,f{const{__scopeAccordion:o,value:a,...c}=e,r=I(A,o),s=ge(A,o),i=k(o),p=ae(),m=a&&s.value.includes(a)||!1,x=r.disabled||e.disabled;return n.jsx(we,{scope:o,open:m,disabled:x,triggerId:p,children:n.jsx(fe,{"data-orientation":r.orientation,"data-state":F(m),...i,...c,ref:t,disabled:x,open:m,onOpenChange:u=>{u?s.onItemOpen(a):s.onItemClose(a)}})})});G.displayName=A;var Y="AccordionHeader",W=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...a}=e,c=I(d,o),r=D(Y,o);return n.jsx(H.h3,{"data-orientation":c.orientation,"data-state":F(r.open),"data-disabled":r.disabled?"":void 0,...a,ref:t})});W.displayName=Y;var E="AccordionTrigger",Z=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...a}=e,c=I(d,o),r=D(E,o),s=he(E,o),i=k(o);return n.jsx(S.ItemSlot,{scope:o,children:n.jsx(ue,{"aria-disabled":r.open&&!s.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...i,...a,ref:t})})});Z.displayName=E;var q="AccordionContent",B=l.forwardRef((e,t)=>{const{__scopeAccordion:o,...a}=e,c=I(d,o),r=D(q,o),s=k(o);return n.jsx(me,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...s,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});B.displayName=q;function F(e){return e?"open":"closed"}var je=K,ye=G,Ne=W,J=Z,Q=B;const _e=je,X=v.forwardRef(({className:e,...t},o)=>n.jsx(ye,{ref:o,className:e,...t}));X.displayName="AccordionItem";const ee=v.forwardRef(({className:e,children:t,hideChevron:o,headerClassName:a,...c},r)=>n.jsx(Ne,{className:h("flex",a),children:n.jsxs(J,{ref:r,className:h("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 gap-x-1",e),...c,children:[t,!o&&n.jsx(de,{className:"h-4 w-4 shrink-0 text-gray-700 transition-transform duration-200 dark:text-gray-300"})]})}));ee.displayName=J.displayName;const oe=v.forwardRef(({className:e,children:t,...o},a)=>n.jsx(Q,{ref:a,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:n.jsx("div",{className:h("pb-4 pt-0",e),children:t})}));oe.displayName=Q.displayName;const Re=pe("ml-4 mb-12 border-l border-border pl-6 dark:border-border [counter-reset:step] flex flex-col gap-4"),ke=({title:e,children:t,stepNumber:o,open:a=!0,setOpen:c=()=>{},disabled:r=!1})=>n.jsx(_e,{type:"single",collapsible:!0,className:"relative w-full",value:a?"open":"closed",disabled:r,onValueChange:s=>c(s==="open"),children:n.jsxs(X,{value:"open",className:"border-none",children:[n.jsxs(ee,{hideChevron:r,className:r?"cursor-default hover:no-underline":"",children:[n.jsx("div",{className:"absolute ml-[-41px] mt-[3px] h-[33px] w-[33px] rounded-full border-4 border-muted bg-muted text-center text-base font-normal text-foreground",children:o}),e&&n.jsx("h3",{className:"text-lg font-semibold hover:no-underline",children:e})]}),n.jsx(oe,{children:t})]})}),Pe=v.forwardRef(({className:e,children:t,...o},a)=>n.jsx("div",{ref:a,className:h(Re(),e),...o,children:v.Children.map(t,(c,r)=>v.isValidElement(c)?v.cloneElement(c,{stepNumber:r+1}):c)}));Pe.displayName="Steps";export{_e as A,Pe as S,ke as a,X as b,ee as c,oe as d}; diff --git a/hatchetembed/dashboard/assets/switch-C9IBAXBS.js b/hatchetembed/dashboard/assets/switch-C9IBAXBS.js deleted file mode 100644 index 9a9cc000d9..0000000000 --- a/hatchetembed/dashboard/assets/switch-C9IBAXBS.js +++ /dev/null @@ -1 +0,0 @@ -import{k as o,eZ as x,eU as B,j as n,eV as C,eY as D,f0 as M,f1 as H,e$ as U,e as S}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="9235b813-063b-4266-965a-e6f93aa7c9c3",e._sentryDebugIdIdentifier="sentry-dbid-9235b813-063b-4266-965a-e6f93aa7c9c3")}catch{}})();var b="Switch",[A]=U(b),[q,z]=A(b),_=o.forwardRef((e,s)=>{const{__scopeSwitch:t,name:a,checked:r,defaultChecked:w,required:d,disabled:c,value:l="on",onCheckedChange:m,form:i,...g}=e,[u,f]=o.useState(null),v=x(s,h=>f(h)),y=o.useRef(!1),k=u?i||!!u.closest("form"):!0,[p,j]=B({prop:r,defaultProp:w??!1,onChange:m,caller:b});return n.jsxs(q,{scope:t,checked:p,disabled:c,children:[n.jsx(C.button,{type:"button",role:"switch","aria-checked":p,"aria-required":d,"data-state":I(p),"data-disabled":c?"":void 0,disabled:c,value:l,...g,ref:v,onClick:D(e.onClick,h=>{j(T=>!T),k&&(y.current=h.isPropagationStopped(),y.current||h.stopPropagation())})}),k&&n.jsx(R,{control:u,bubbles:!y.current,name:a,value:l,checked:p,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});_.displayName=b;var E="SwitchThumb",P=o.forwardRef((e,s)=>{const{__scopeSwitch:t,...a}=e,r=z(E,t);return n.jsx(C.span,{"data-state":I(r.checked),"data-disabled":r.disabled?"":void 0,...a,ref:s})});P.displayName=E;var L="SwitchBubbleInput",R=o.forwardRef(({__scopeSwitch:e,control:s,checked:t,bubbles:a=!0,...r},w)=>{const d=o.useRef(null),c=x(d,w),l=M(t),m=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const g=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(g,"checked").set;if(l!==t&&f){const v=new Event("click",{bubbles:a});f.call(i,t),i.dispatchEvent(v)}},[l,t,a]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:c,style:{...r.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=L;function I(e){return e?"checked":"unchecked"}var N=_,O=P;const $=o.forwardRef(({className:e,...s},t)=>n.jsx(N,{className:S("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...s,ref:t,children:n.jsx(O,{className:S("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));$.displayName=N.displayName;export{$ as S}; diff --git a/hatchetembed/dashboard/assets/tenant-region-badge-C-bbxnQA.js b/hatchetembed/dashboard/assets/tenant-region-badge-C-bbxnQA.js deleted file mode 100644 index 693428b313..0000000000 --- a/hatchetembed/dashboard/assets/tenant-region-badge-C-bbxnQA.js +++ /dev/null @@ -1 +0,0 @@ -import{j as a,a3 as r,e as o}from"./index-NcPpBRAY.js";import{f as s}from"./shard-deployment-key-in4ZPoWA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fe92d82e-2b08-4924-a1f8-cce1eeb5e28a",e._sentryDebugIdIdentifier="sentry-dbid-fe92d82e-2b08-4924-a1f8-cce1eeb5e28a")}catch{}})();function i({region:e,className:n}){const t=s(e);return t?a.jsx(r,{variant:"outline",className:o("max-w-[9rem] shrink-0 truncate px-1.5 py-0 text-[10px] font-normal",n),title:e,children:t}):null}export{i as T}; diff --git a/hatchetembed/dashboard/assets/tenant-switcher-DKarkPe5.js b/hatchetembed/dashboard/assets/tenant-switcher-DKarkPe5.js deleted file mode 100644 index f0e94eb1de..0000000000 --- a/hatchetembed/dashboard/assets/tenant-switcher-DKarkPe5.js +++ /dev/null @@ -1 +0,0 @@ -import{C as T,au as C,R as z,J as S,j as e,B as h,c5 as o,S as w,e as c,aM as I,c3 as P,c4 as k,bB as D,eR as R,c6 as O,bD as B,bF as p,bG as E,bH as b,aN as F,aO as L,aP as _,bt as M,c1 as U,eS as $,eT as A}from"./index-NcPpBRAY.js";import{T as N}from"./tenant-region-badge-C-bbxnQA.js";import{g as G}from"./global-emitter-kjRqhIKI.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="a2e90269-f2fb-443e-8973-4700ce1fbc37",s._sentryDebugIdIdentifier="sentry-dbid-a2e90269-f2fb-443e-8973-4700ce1fbc37")}catch{}})();function K({className:s,memberships:t}){const{meta:i}=T(),{setTenant:y,isUserUniverseLoaded:d,tenant:n}=C(),[r,l]=z.useState(!1),{hasOrganizations:v}=S();return n?e.jsx(I,{delayDuration:200,children:e.jsxs(P,{open:r,onOpenChange:l,children:[e.jsx(k,{asChild:!0,children:e.jsxs(h,{variant:"outline",size:"sm",role:"combobox","aria-expanded":r,"aria-label":"Select a tenant",className:c("min-w-0 justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",r&&"bg-muted/30",s),disabled:!d||t.length===0,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx(o,{className:"size-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.name}),e.jsx(N,{region:n.region})]}),d?e.jsx(D,{className:"size-4 shrink-0 opacity-50"}):e.jsx(w,{className:"mr-0"})]})}),e.jsx(R,{children:e.jsx(O,{side:"bottom",align:"start",sideOffset:8,className:"z-[200] w-[min(18rem,100vw)] max-w-[calc(100vw-2rem)] p-0",children:e.jsxs(B,{className:"",children:[e.jsxs(p,{"data-cy":"tenant-switcher-list",children:[e.jsx(E,{children:"No tenants found."}),t.map(a=>{var m,x,u,f,g,j;return e.jsxs(b,{onSelect:()=>{U(a.tenant),y(a.tenant),l(!1)},value:(m=a.tenant)==null?void 0:m.slug,"data-cy":(x=a.tenant)!=null&&x.slug?`tenant-switcher-item-${a.tenant.slug}`:void 0,className:"cursor-pointer text-sm",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(o,{className:"size-4 shrink-0"}),e.jsxs(F,{children:[e.jsx(L,{asChild:!0,children:e.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:(u=a.tenant)==null?void 0:u.name})}),e.jsx(_,{side:"right",className:"max-w-[min(24rem,calc(100vw-2rem))] break-words",children:(f=a.tenant)==null?void 0:f.name})]}),e.jsx(N,{region:(g=a.tenant)==null?void 0:g.region})]}),e.jsx(M,{className:c("ml-2 size-4 shrink-0",(n==null?void 0:n.slug)===((j=a.tenant)==null?void 0:j.slug)?"opacity-100":"opacity-0")})]},a.metadata.id)})]}),(i==null?void 0:i.allowCreateTenant)&&!v&&e.jsxs(e.Fragment,{children:[e.jsx($,{}),e.jsx(p,{children:e.jsxs(b,{className:"cursor-pointer text-sm","data-cy":"new-tenant",onSelect:()=>{G.emit("create-new-tenant",{}),l(!1)},children:[e.jsx(A,{className:"mr-2 size-4"}),"New Tenant"]})})]})]})})})]})}):e.jsxs(h,{variant:"outline",size:"sm","aria-label":"Loading tenant",className:c("min-w-0 justify-between gap-2 bg-muted/20 shadow-none",s),disabled:!0,children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx(o,{className:"size-4 shrink-0 opacity-60"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:"Loading tenant…"})]}),e.jsx(w,{className:"mr-0"})]})}export{K as T}; diff --git a/hatchetembed/dashboard/assets/tenant-wrapper-CsXNqzkl.js b/hatchetembed/dashboard/assets/tenant-wrapper-CsXNqzkl.js deleted file mode 100644 index eb1ca20d90..0000000000 --- a/hatchetembed/dashboard/assets/tenant-wrapper-CsXNqzkl.js +++ /dev/null @@ -1 +0,0 @@ -import{y as r,k as u,c as a,a as i}from"./index-NcPpBRAY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="e83986a8-97d7-4895-b13d-1b4397331c40",n._sentryDebugIdIdentifier="sentry-dbid-e83986a8-97d7-4895-b13d-1b4397331c40")}catch{}})();function y(){const{isControlPlaneEnabled:n}=r();return u.useMemo(()=>({tenantMembershipsListQuery:()=>({queryKey:["tenant-memberships:list"],queryFn:async()=>(await(n?a.tenantMembershipsList():i.tenantMembershipsList())).data}),userListTenantInvitesQuery:()=>({queryKey:["user:list:tenant-invites"],queryFn:async()=>(await(n?a.userListTenantInvites():i.userListTenantInvites())).data}),tenantMemberListQuery:t=>({queryKey:["tenant-member:list",t],queryFn:async()=>(await(n?a.tenantMemberList(t):i.tenantMemberList(t))).data}),tenantInviteListQuery:t=>({queryKey:["tenant-invite:list",t],queryFn:async()=>(await(n?a.tenantInviteList(t):i.tenantInviteList(t))).data}),tenantInviteRejectMutation:()=>({mutationKey:["tenant-invite:reject"],mutationFn:async t=>(await(n?a.tenantInviteReject(t):i.tenantInviteReject(t))).data}),tenantInviteAcceptMutation:()=>({mutationKey:["tenant-invite:accept"],mutationFn:async t=>(await(n?a.tenantInviteAccept(t):i.tenantInviteAccept(t))).data}),tenantMemberUpdateMutation:(t,e)=>({mutationKey:["tenant-member:update",t,e],mutationFn:async s=>(await(n?a.tenantMemberUpdate(t,e,s):i.tenantMemberUpdate(t,e,s))).data}),tenantMemberDeleteMutation:(t,e)=>({mutationKey:["tenant-member:delete",t,e],mutationFn:async()=>(await(n?a.tenantMemberDelete(t,e):i.tenantMemberDelete(t,e))).data}),tenantInviteCreateMutation:t=>({mutationKey:["tenant-invite:create",t],mutationFn:async e=>(await(n?a.tenantInviteCreate(t,e):i.tenantInviteCreate(t,e))).data}),tenantInviteUpdateMutation:(t,e)=>({mutationKey:["tenant-invite:update",t,e],mutationFn:async s=>(await(n?a.tenantInviteUpdate(t,e,s):i.tenantInviteUpdate(t,e,s))).data}),tenantInviteDeleteMutation:(t,e)=>({mutationKey:["tenant-invite:delete",t,e],mutationFn:async()=>(await(n?a.tenantInviteDelete(t,e):i.tenantInviteDelete(t,e))).data})}),[n])}export{y as u}; diff --git a/hatchetembed/dashboard/assets/top-nav-DUjg_srB.js b/hatchetembed/dashboard/assets/top-nav-DUjg_srB.js deleted file mode 100644 index 1336887079..0000000000 --- a/hatchetembed/dashboard/assets/top-nav-DUjg_srB.js +++ /dev/null @@ -1,26 +0,0 @@ -import{v,k as b,m as R,N,O as C,b as w,bL as ne,bT as k,bp as se,h as E,j as n,ak as A,ai as H,B as L,e as x,al as U,am as z,aB as ae,bU as oe,a as re,bO as ie,bV as ce,aI as G,au as Q,at as le,ae as ue,af as de,H as y,R as F,g as ge,bW as me,bX as he,as as $,bY as fe,bZ as be,b_ as xe,be as ke,b$ as we,c0 as pe}from"./index-NcPpBRAY.js";import{O as M}from"./organization-selector-CCw2_tjm.js";import{T as P}from"./tenant-switcher-DKarkPe5.js";import{u as ve}from"./use-pending-invites-DdxsIf8r.js";import{g as je}from"./global-emitter-kjRqhIKI.js";import{u as q}from"./use-auth-disabled-3jxVUpNe.js";import{g as ye}from"./resource-limit-status-BK8AB43u.js";import{m as Ne}from"./index-DOf3AD-4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b99aa9dd-53ea-492b-98fd-100656c16846",t._sentryDebugIdIdentifier="sentry-dbid-b99aa9dd-53ea-492b-98fd-100656c16846")}catch{}})();/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Te=[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ce=v("circle-user-round",Te);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ze=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Re=v("menu",ze);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Le=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Se=v("monitor",Le);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ie=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Oe=v("moon",Ie);/** - * @license lucide-react v1.8.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $e=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Me=v("sun",$e),Pe=()=>{const{pendingInvitesQuery:t,isLoading:e}=ve();return{notifications:b.useMemo(()=>{const s=t.data;if(!s||s.inviteCount===0)return[];const o=s.inviteCount,r=[...s.tenantInvites,...s.organizationInvites].map(c=>c.metadata.createdAt).filter(c=>!!c).reduce((c,l)=>l>c?l:c,"");return[{color:"green",shortTitle:o===1?"Invite":"Invites",title:o===1?s.tenantInvites[0]?`Invite to join ${s.tenantInvites[0].tenantName??"a tenant"}`:"Organization invite":`${o} pending invites`,message:`You have ${o} pending invite${o>1?"s":""} awaiting your response.`,timestamp:r,onClick:()=>je.emit("open-invite-modal",{})}]},[t.data]),isLoading:e}};function De(t){return t.length===1}const Be=()=>{const{tenantMemberships:t}=R(),e=q(),a=b.useMemo(()=>(t??[]).map(i=>i.tenant).filter(i=>i!=null),[t]),s=De(a),o=s?a[0].metadata.id:"",r=N({...C.workflows.list(o,{limit:1}),enabled:s}),c=N({...C.tokens.list(o),enabled:s&&!e}),l=r.isLoading||c.isLoading;return{notifications:b.useMemo(()=>{var d,m,h,f;if(!s||l)return[];if(e)return[];const i=(((m=(d=r.data)==null?void 0:d.rows)==null?void 0:m.length)??0)>0,u=(((f=(h=c.data)==null?void 0:h.rows)==null?void 0:f.length)??0)>0;return i||u?[]:[{color:"blue",shortTitle:"Get started",title:"Get started with Hatchet",message:"Create an API token and run your first workflow",timestamp:new Date().toISOString(),url:w.tenantOverviewRoute.to.replace("$tenant",o)}]},[s,l,o,r.data,c.data,e]),isLoading:l}},We=2*6e4,_e={[k.WORKER]:"Total Workers",[k.WORKER_SLOT]:"Concurrency Slots",[k.EVENT]:"Events",[k.TASK_RUN]:"Task Runs",[k.CRON]:"Cron Triggers",[k.SCHEDULE]:"Schedule Triggers",[k.INCOMING_WEBHOOK]:"Incoming Webhooks"},Ee={warn:"yellow",exhausted:"red"},Ae=(t,e,a)=>{const s=ye(t);if(s==="ok")return null;const o=_e[t.resource]??t.resource;return{color:Ee[s],shortTitle:s==="exhausted"?"Limit reached":"Approaching limit",title:s==="exhausted"?`${o} limit reached`:`Approaching ${o} limit`,message:`${a}: ${t.value} / ${t.limitValue} used`,timestamp:t.metadata.createdAt,url:w.tenantSettingsBillingRoute.to.replace("$tenant",e)}},He=()=>{const{tenantId:t,tenant:e}=ne(),a=N({...C.tenantResourcePolicy.get(t??""),refetchInterval:We,enabled:!!t});return{notifications:b.useMemo(()=>{var o;return(((o=a.data)==null?void 0:o.limits)??[]).map(r=>Ae(r,t??"",(e==null?void 0:e.name)??t??"")).filter(r=>r!==null)},[t,e==null?void 0:e.name,a.data]),isLoading:a.isLoading}},Ue=()=>{const t=He(),e=Pe(),a=Be();return{notifications:b.useMemo(()=>[...t.notifications,...e.notifications,...a.notifications].sort((o,r)=>r.timestamp>o.timestamp?1:-1),[t.notifications,e.notifications,a.notifications]),isLoading:t.isLoading||e.isLoading||a.isLoading}},D={blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500"},B={blue:0,green:1,yellow:2,red:3},Ge=t=>t.reduce((e,a)=>B[a.color]>B[e]?a.color:e,"green");function W(){const{notifications:t}=Ue(),{currentUser:e}=se(),a=E(),s=t.length,o=s>0?Ge(t):null,r=`${s} notification${s!==1?"s":""}`,c=e!=null&&e.email?`${r} for ${e.email}`:r,l=s>0?t[0].shortTitle:"Notifications";return s>0?n.jsxs(A,{children:[n.jsx(H,{asChild:!0,children:n.jsxs(L,{variant:"icon",title:c,"aria-label":c,"data-cy":"notifications-button",className:"relative gap-1.5 rounded-md border border-border px-2.5",size:"sm",children:[n.jsx(Ne,{className:"size-4"}),n.jsx("span",{className:"text-xs font-medium leading-none",children:l}),s>1&&n.jsx("span",{className:"text-xs font-medium leading-none text-muted-foreground",children:s}),o&&n.jsx("span",{className:x("absolute -top-0.5 -right-0.5 size-2.5 rounded-full border-2 border-background",D[o])})]})}),n.jsx(U,{className:"w-80",align:"end",children:t.map((i,u)=>n.jsxs(z,{variant:"interactive",className:"flex cursor-pointer items-start gap-2 px-3 py-2",onClick:()=>i.onClick?i.onClick():a({to:i.url}),children:[n.jsx("span",{className:x("mt-1.5 size-2 shrink-0 rounded-full",D[i.color])}),n.jsxs("div",{className:"min-w-0 flex-1",title:i.message,children:[n.jsx("p",{className:"truncate text-sm font-medium",children:i.title}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.message})]})]},`${i.title}-${i.timestamp}`))})]}):null}const K=b.forwardRef(({...t},e)=>n.jsx("nav",{ref:e,"aria-label":"breadcrumb",...t}));K.displayName="Breadcrumb";const V=b.forwardRef(({className:t,...e},a)=>n.jsx("ol",{ref:a,className:x("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));V.displayName="BreadcrumbList";const Y=b.forwardRef(({className:t,...e},a)=>n.jsx("li",{ref:a,className:x("inline-flex items-center gap-1.5",t),...e}));Y.displayName="BreadcrumbItem";const J=b.forwardRef(({asChild:t,className:e,...a},s)=>{const o=t?oe:"a";return n.jsx(o,{ref:s,className:x("transition-colors hover:text-foreground",e),...a})});J.displayName="BreadcrumbLink";const X=b.forwardRef(({className:t,...e},a)=>n.jsx("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:x("font-normal text-foreground",t),...e}));X.displayName="BreadcrumbPage";const Z=({children:t,className:e,...a})=>n.jsx("li",{role:"presentation","aria-hidden":"true",className:x("[&>svg]:size-3.5",e),...a,children:t??n.jsx(ae,{})});Z.displayName="BreadcrumbSeparator";function ee(t){var s;const e=N({queryKey:["tenant-home-route",t],queryFn:async()=>{if(!t)return{hasWorkflows:!1};try{const o=await re.workflowList(t,{limit:1});return{hasWorkflows:o.data.rows&&o.data.rows.length>0}}catch{return{hasWorkflows:!0}}},enabled:!!t,staleTime:6e4,retry:!1});return{homeRoute:((s=e.data)==null?void 0:s.hasWorkflows)??!0?w.tenantRunsRoute.to:w.tenantOverviewRoute.to,isLoading:e.isLoading}}const Qe=(t,e)=>{switch(t){case"/tenants/:tenant/events":return"Events";case"/tenants/:tenant/filters":return"Filters";case"/tenants/:tenant/webhooks":return"Webhooks";case"/tenants/:tenant/rate-limits":return"Rate Limits";case"/tenants/:tenant/scheduled":return"Scheduled Runs";case"/tenants/:tenant/cron-jobs":return"Cron Jobs";case"/tenants/:tenant/tasks":return"Tasks";case"/tenants/:tenant/tasks/:workflow":return"Task Detail";case"/tenants/:tenant/runs":return"Runs";case"/tenants/:tenant/runs/:run":return"Run Detail";case"/tenants/:tenant/task-runs/:run":return"Task Run Detail";case"/tenants/:tenant/workers":return"Workers";case"/tenants/:tenant/workers/all":return"All Workers";case"/tenants/:tenant/workers/:worker":return"Worker Detail";case"/tenants/:tenant/managed-workers":return"Managed Workers";case"/tenants/:tenant/managed-workers/create":return"Create";case"/tenants/:tenant/managed-workers/demo-template":return"Demo Template";case"/tenants/:tenant/managed-workers/:managed-worker":return"Managed Worker Detail";case"/tenants/:tenant/settings/overview":return"General";case"/tenants/:tenant/settings/resource-limits":return"Resource Limits";case"/tenants/:tenant/settings/api-tokens":return"API Tokens";case"/tenants/:tenant/settings/github":return"GitHub";case"/tenants/:tenant/settings/members":return"Members";case"/tenants/:tenant/settings/alerting":return"Alerting";case"/tenants/:tenant/settings/billing-and-limits":return"Billing & Limits";case"/tenants/:tenant/settings/ingestors":return"Ingestors";case"/tenants/:tenant/settings/integrations":return"Integrations";case"/tenants/:tenant/settings/organization":return e?"Organization":"Tenants";case"/tenants/:tenant/workflow-runs":case"/tenants/:tenant/workflow-runs/:run":case"/tenants/:tenant/":case"/tenants/:tenant/workflows":case"/tenants/:tenant/workflows/:workflow":case"/tenants/:tenant/settings":return"";default:const a=t;throw new Error(`Unhandled tenanted path: ${a}`)}},Fe=t=>{switch(t){case"/organizations/:organization/settings":return"General";case"/organizations/:organization/settings/team":return"Team";case"/organizations/:organization/settings/tenants":return"Tenants";case"/organizations/:organization/settings/tokens":return"Management Tokens";case"/organizations/:organization/settings/regions":return"Available Regions";case"/organizations/:organization/settings/sso":return"SSO";case"/organizations/:organization/settings/audit-log":return"Audit Log";case"/organizations/:organization/settings/billing":return"Billing & Usage";default:const e=t;throw new Error(`Unhandled organization path: ${e}`)}};function qe(t,e){const a=t.replace(/\/+$/,"").replace(`/organizations/${e}`,"/organizations/:organization");let s;try{s=Fe(a)}catch{return[]}return[{label:"Home"},{label:"Settings",href:`/organizations/${e}/settings`},{label:s,isCurrentPage:!0}]}function Ke(t,e,a){const o=("/"+t.join("/")).replace(`/tenants/${e}`,"/tenants/:tenant");try{return Qe(o,a)||null}catch{return null}}function Ve(t,e,a){const s=`/tenants/${a}`;return e===0?s:s+"/"+t.slice(2,e+1).join("/")}function Ye(t,e,a){const s=[];if(t.includes("/auth")||t.includes("/onboarding"))return s;if(t.startsWith("/organizations/")){const l=e==null?void 0:e.organization;return l?qe(t,l):s}if(!t.startsWith("/tenants/"))return s;const o=e==null?void 0:e.tenant;if(!o)return s;s.push({label:"Home",href:`/tenants/${o}/runs`});const r=t.split("/").filter(Boolean),c=r.slice(2);for(let l=0;lf.charAt(0).toUpperCase()+f.slice(1)).join(" ");s.push({label:h,href:i?void 0:g,isCurrentPage:i})}}return s}function Je(){const t=ie(),e=ce(),a=G({strict:!1}),s=Object.entries(a).reduce((h,[f,p])=>(p!==void 0&&(h[f]=p),h),{}),{isCloudEnabled:o}=R(),{tenantId:r}=Q(),c=s.tenant??r,{homeRoute:l}=ee(c),g=e.matches.some(h=>h.routeId==="/tenants/$tenant"),u=t.pathname.split("/").filter(Boolean).length>2;if(g&&u&&e.matches.length===3)return[];const m=Ye(t.pathname,s,o);return m.length>0&&m[0].label==="Home"&&c&&(m[0].href=l.replace(":tenant",c)),m}const T=[{value:"light",label:"Light",icon:Me},{value:"dark",label:"Dark",icon:Oe},{value:"system",label:"System",icon:Se}];function _({user:t}){const[e,a]=F.useState(!1),{logoutMutation:s}=R(),{theme:o,setTheme:r}=me(),c=q();if(!t)return null;const l=t.name||t.email,g=T.find(u=>u.value===o)??T[2],i=g.icon;return n.jsxs(A,{open:e,onOpenChange:a,children:[n.jsx(H,{asChild:!0,children:n.jsxs(L,{variant:"outline",size:"sm","aria-label":"Open account menu",className:x("justify-between gap-2 bg-muted/20 shadow-none hover:bg-muted/30",e&&"bg-muted/30"),children:[n.jsx(Ce,{className:"size-4"}),n.jsx("span",{className:"max-w-32 truncate text-sm font-medium",children:l}),n.jsx(he,{className:"size-3.5 text-muted-foreground"})]})}),n.jsxs(U,{align:"end",className:"w-64",children:[n.jsxs("div",{className:"px-2 py-1.5",children:[n.jsx("p",{className:"truncate text-sm font-semibold",children:t.name||t.email}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.email})]}),n.jsx($,{}),n.jsxs(fe,{children:[n.jsxs(be,{className:"cursor-pointer",children:[n.jsx(i,{className:"mr-2 size-4"}),"Theme: ",g.label]}),n.jsx(xe,{children:T.map(u=>n.jsxs(z,{variant:"interactive",className:"cursor-pointer",onClick:()=>r(u.value),children:[n.jsx(u.icon,{className:"mr-2 size-4"}),u.label,o===u.value&&n.jsx(ke,{className:"ml-auto size-4"})]},u.value))})]}),!c&&n.jsxs(n.Fragment,{children:[n.jsx($,{}),n.jsxs(z,{variant:"interactive",className:"cursor-pointer",onClick:()=>s.mutate(),disabled:s.isPending,children:[n.jsx(we,{className:"mr-2 size-4"}),s.isPending?"Logging out...":"Log out",n.jsx(pe,{children:"⇧⌘Q"})]})]})]})]})}function rt({user:t,tenantMemberships:e}){const{toggleSidebarOpen:a,isWide:s,sidebarWidth:o,collapsed:r,setCollapsed:c}=le(),l=Je(),g=E(),i=ue(),d=G({strict:!1}).tenant,{homeRoute:m}=ee(d),h=!!i({to:w.tenantRoute.to,params:d?{tenant:d}:void 0,fuzzy:!0}),f=()=>{if(h&&d){g({to:m,params:{tenant:d}});return}g({to:w.authenticatedRoute.to})},p=()=>{if(!s){f();return}c(!r)},{isCloudEnabled:S}=de(),{tenant:te}=Q(),I=!!t&&(e==null?void 0:e.length)>0&&!!te;return n.jsxs("header",{className:"z-50 h-16 w-full bg-background",children:[n.jsxs("div",{className:"flex h-16 items-center px-4 md:hidden",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(L,{variant:"icon",onClick:()=>a(),"aria-label":"Toggle sidebar",size:"icon",children:n.jsx(Re,{className:"size-4"})}),n.jsx("button",{type:"button",onClick:f,"aria-label":"Go to Runs",className:"rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:n.jsx(y,{variant:"mark",className:"h-5 w-5"})})]}),n.jsxs("div",{className:"flex ml-auto items-center justify-end gap-2",children:[n.jsx(W,{}),I&&(S?n.jsx(M,{memberships:e}):n.jsx(P,{memberships:e})),n.jsx(_,{user:t})]})]}),n.jsxs("div",{className:"hidden h-16 md:grid md:grid-cols-[var(--v1-sidebar-width)_minmax(0,1fr)_auto] md:items-center",style:o?{"--v1-sidebar-width":`${o}px`}:void 0,children:[n.jsx("div",{className:x("flex h-16 items-center",r?"justify-center":"pl-6"),children:r?n.jsx("button",{type:"button",onClick:p,"aria-label":"Expand sidebar",className:"rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:n.jsx(y,{variant:"mark",className:"h-5 w-5"})}):n.jsxs("button",{type:"button",onClick:p,"aria-label":"Collapse sidebar",className:"flex items-center gap-2 rounded-sm outline-none ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[n.jsx(y,{variant:"mark",className:"h-4 w-4"}),n.jsx(y,{variant:"wordmark",className:"h-4 w-auto"})]})}),n.jsx("div",{className:"min-w-0 px-8",children:l.length>0&&n.jsx(K,{children:n.jsx(V,{children:l.map((j,O)=>n.jsxs(F.Fragment,{children:[O>0&&n.jsx(Z,{}),n.jsx(Y,{children:j.isCurrentPage?n.jsx(X,{children:j.label}):n.jsx(J,{asChild:!0,children:n.jsx(ge,{to:j.href,children:j.label})})})]},O))})})}),n.jsxs("div",{className:"flex items-center justify-end gap-2 pr-4",children:[n.jsx(W,{}),I&&(S?n.jsx(M,{memberships:e}):n.jsx(P,{memberships:e})),n.jsx(_,{user:t})]})]})]})}export{rt as T}; diff --git a/hatchetembed/dashboard/assets/use-analytics-Jv1fF8RR.js b/hatchetembed/dashboard/assets/use-analytics-Jv1fF8RR.js deleted file mode 100644 index 5a8e177c5a..0000000000 --- a/hatchetembed/dashboard/assets/use-analytics-Jv1fF8RR.js +++ /dev/null @@ -1,2 +0,0 @@ -import{k as qe,R as it,au as fa}from"./index-NcPpBRAY.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="32190ca1-3651-4ddf-a879-4ebcaef1dd8f",i._sentryDebugIdIdentifier="sentry-dbid-32190ca1-3651-4ddf-a879-4ebcaef1dd8f")}catch{}})();var p=typeof window<"u"?window:void 0,K=typeof globalThis<"u"?globalThis:p;typeof self>"u"&&(K.self=K),typeof File>"u"&&(K.File=function(){});var ce=K==null?void 0:K.navigator,b=K==null?void 0:K.document,Q=K==null?void 0:K.location,Yi=K==null?void 0:K.fetch,Ji=K!=null&&K.XMLHttpRequest&&"withCredentials"in new K.XMLHttpRequest?K.XMLHttpRequest:void 0,Vs=K==null?void 0:K.AbortController,_a=K==null?void 0:K.CompressionStream,oe=ce==null?void 0:ce.userAgent,F=p??{},Bs="1.369.2",ne={DEBUG:!1,LIB_VERSION:Bs,LIB_NAME:"web",JS_SDK_VERSION:Bs};function Gs(i,e,t,s,r,n,a){try{var o=i[n](a),l=o.value}catch(c){return void t(c)}o.done?e(l):Promise.resolve(l).then(s,r)}function we(i){return function(){var e=this,t=arguments;return new Promise((function(s,r){var n=i.apply(e,t);function a(l){Gs(n,s,r,a,o,"next",l)}function o(l){Gs(n,s,r,a,o,"throw",l)}a(void 0)}))}}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var e=1;arguments.length>e;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i},y.apply(null,arguments)}function en(i,e){if(i==null)return{};var t={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(e.indexOf(s)!==-1)continue;t[s]=i[s]}return t}function tn(){return(tn=we((function*(i,e,t){e===void 0&&(e=!0);try{var s=new Blob([i],{type:"text/plain"}).stream().pipeThrough(new CompressionStream("gzip"));return yield new Response(s).blob()}catch(r){if(t!=null&&t.rethrow)throw r;return e&&console.error("Failed to gzip compress data",r),null}}))).apply(this,arguments)}var ma=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],ya=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ws=function(i,e){if(e===void 0&&(e=[]),!i)return!1;var t=i.toLowerCase();return ya.concat(e).some((s=>{var r=s.toLowerCase();return t.indexOf(r)!==-1}))};function M(i,e){return i.indexOf(e)!==-1}var yi=function(i){return i.trim()},Ki=function(i){return i.replace(/^\$/,"")},sn=Object.prototype,rn=sn.hasOwnProperty,bi=sn.toString,D=Array.isArray||function(i){return bi.call(i)==="[object Array]"},Ce=i=>typeof i=="function",J=i=>i===Object(i)&&!D(i),ot=i=>{if(J(i)){for(var e in i)if(rn.call(i,e))return!1;return!0}return!1},E=i=>i===void 0,W=i=>bi.call(i)=="[object String]",Zt=i=>W(i)&&i.trim().length===0,Oe=i=>i===null,L=i=>E(i)||Oe(i),xe=i=>bi.call(i)=="[object Number]"&&i==i,st=i=>xe(i)&&i>0,Pe=i=>bi.call(i)==="[object Boolean]",ba=i=>i instanceof FormData,wa=i=>M(ma,i);function nn(i){return i===null||typeof i!="object"}function ii(i,e){return{}.toString.call(i)==="[object "+e+"]"}function Fs(i){return typeof Event<"u"&&(function(e,t){try{return e instanceof t}catch{return!1}})(i,Event)}var Ea=[!0,"true",1,"1","yes"],Pi=i=>M(Ea,i),xa=[!1,"false",0,"0","no"];function Re(i,e,t,s,r){return e>t&&(s.warn("min cannot be greater than max."),e=t),xe(i)?i>t?(s.warn(" cannot be greater than max: "+t+". Using max value instead."),t):e>i?(s.warn(" cannot be less than min: "+e+". Using min value instead."),e):i:(s.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+r),Re(r||t,e,t,s))}class ka{constructor(e){this.Pt={},this.Dt=e.Dt,this.jt=Re(e.bucketSize,0,100,e.qt),this.$t=Re(e.refillRate,0,this.jt,e.qt),this.Vt=Re(e.refillInterval,0,864e5,e.qt)}Ht(e,t){var s=Math.floor((t-e.lastAccess)/this.Vt);s>0&&(e.tokens=Math.min(e.tokens+s*this.$t,this.jt),e.lastAccess=e.lastAccess+s*this.Vt)}consumeRateLimit(e){var t,s=Date.now(),r=String(e),n=this.Pt[r];return n?this.Ht(n,s):this.Pt[r]=n={tokens:this.jt,lastAccess:s},n.tokens===0||(n.tokens--,n.tokens===0&&((t=this.Dt)==null||t.call(this,e)),n.tokens===0)}stop(){this.Pt={}}}var Xt,Ys,Ri,he="Mobile",si="iOS",Te="Android",dt="Tablet",an=Te+" "+dt,on="iPad",ln="Apple",un=ln+" Watch",Tt="Safari",pt="BlackBerry",cn="Samsung",hn=cn+"Browser",dn=cn+" Internet",We="Chrome",Sa=We+" OS",pn=We+" "+si,Is="Internet Explorer",vn=Is+" "+he,$s="Opera",Pa=$s+" Mini",Cs="Edge",gn="Microsoft "+Cs,ct="Firefox",fn=ct+" "+si,Dt="Nintendo",Nt="PlayStation",ht="Xbox",_n=Te+" "+he,mn=he+" "+Tt,St="Windows",Zi=St+" Phone",Js="Nokia",Qi="Ouya",yn="Generic",Ra=yn+" "+he.toLowerCase(),bn=yn+" "+dt.toLowerCase(),es="Konqueror",re="(\\d+(\\.\\d+)?)",Fi=new RegExp("Version/"+re),Fa=new RegExp(ht,"i"),Ia=new RegExp(Nt+" \\w+","i"),$a=new RegExp(Dt+" \\w+","i"),Ts=new RegExp(pt+"|PlayBook|BB10","i"),Ca={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},wn=function(i,e){return e=e||"",M(i," OPR/")&&M(i,"Mini")?Pa:M(i," OPR/")?$s:Ts.test(i)?pt:M(i,"IE"+he)||M(i,"WPDesktop")?vn:M(i,hn)?dn:M(i,Cs)||M(i,"Edg/")?gn:M(i,"FBIOS")?"Facebook "+he:M(i,"UCWEB")||M(i,"UCBrowser")?"UC Browser":M(i,"CriOS")?pn:M(i,"CrMo")||M(i,We)?We:M(i,Te)&&M(i,Tt)?_n:M(i,"FxiOS")?fn:M(i.toLowerCase(),es.toLowerCase())?es:((t,s)=>s&&M(s,ln)||(function(r){return M(r,Tt)&&!M(r,We)&&!M(r,Te)})(t))(i,e)?M(i,he)?mn:Tt:M(i,ct)?ct:M(i,"MSIE")||M(i,"Trident/")?Is:M(i,"Gecko")?ct:""},Ta={[vn]:[new RegExp("rv:"+re)],[gn]:[new RegExp(Cs+"?\\/"+re)],[We]:[new RegExp("("+We+"|CrMo)\\/"+re)],[pn]:[new RegExp("CriOS\\/"+re)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+re)],[Tt]:[Fi],[mn]:[Fi],[$s]:[new RegExp("(Opera|OPR)\\/"+re)],[ct]:[new RegExp(ct+"\\/"+re)],[fn]:[new RegExp("FxiOS\\/"+re)],[es]:[new RegExp("Konqueror[:/]?"+re,"i")],[pt]:[new RegExp(pt+" "+re),Fi],[_n]:[new RegExp("android\\s"+re,"i")],[dn]:[new RegExp(hn+"\\/"+re)],[Is]:[new RegExp("(rv:|MSIE )"+re)],Mozilla:[new RegExp("rv:"+re)]},Oa=function(i,e){var t=wn(i,e),s=Ta[t];if(E(s))return null;for(var r=0;s.length>r;r++){var n=i.match(s[r]);if(n)return parseFloat(n[n.length-2])}return null},Ks=[[new RegExp(ht+"; "+ht+" (.*?)[);]","i"),i=>[ht,i&&i[1]||""]],[new RegExp(Dt,"i"),[Dt,""]],[new RegExp(Nt,"i"),[Nt,""]],[Ts,[pt,""]],[new RegExp(St,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Zi,""];if(new RegExp(he).test(e)&&!/IEMobile\b/.test(e))return[St+" "+he,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var s=Ca[t[1]]||"";return/arm/i.test(e)&&(s="RT"),[St,s]}return[St,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>i&&i[3]?[si,[i[3],i[4],i[5]||"0"].join(".")]:[si,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=E(i[2])?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+Te+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Te+")","i"),i=>i&&i[2]?[Te,[i[2],i[3],i[4]||"0"].join(".")]:[Te,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];return i&&i[1]&&(e[1]=[i[1],i[2],i[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Sa,""]],[/Linux|debian/i,["Linux",""]]],Zs=function(i){return $a.test(i)?Dt:Ia.test(i)?Nt:Fa.test(i)?ht:new RegExp(Qi,"i").test(i)?Qi:new RegExp("("+Zi+"|WPDesktop)","i").test(i)?Zi:/iPad/.test(i)?on:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?un:Ts.test(i)?pt:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(Js,"i").test(i)?Js:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?new RegExp(he).test(i)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)||/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?Te:an:new RegExp("(pda|"+he+")","i").test(i)?Ra:new RegExp(dt,"i").test(i)&&!new RegExp(dt+" pc","i").test(i)?bn:""},Ma=i=>i instanceof Error;function Aa(i){var e=globalThis._posthogChunkIds;if(e){var t=Object.keys(e);return Ri&&t.length===Ys||(Ys=t.length,Ri=t.reduce(((s,r)=>{Xt||(Xt={});var n=Xt[r];if(n)s[n[0]]=n[1];else for(var a=i(r),o=a.length-1;o>=0;o--){var l=a[o],c=l==null?void 0:l.filename,u=e[r];if(c&&u){s[c]=u,Xt[r]=[c,u];break}}return s}),{})),Ri}}class La{constructor(e,t,s){s===void 0&&(s=[]),this.coercers=e,this.stackParser=t,this.modifiers=s}buildFromUnknown(e,t){t===void 0&&(t={});var s=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(s,t,0).apply(e),n=this.buildParsingContext(t),a=this.parseStacktrace(r,n);return{$exception_list:this.convertToExceptionList(a,s),$exception_level:"error"}}modifyFrames(e){var t=this;return we((function*(){for(var s of e)s.stacktrace&&s.stacktrace.frames&&D(s.stacktrace.frames)&&(s.stacktrace.frames=yield t.applyModifiers(s.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)==null?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var s,r;return e.cause!=null&&(s=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),y({},e,{cause:s,stack:r})}applyChunkIds(e,t){return e.map((s=>(s.filename&&t&&(s.chunk_id=t[s.filename]),s)))}applyCoercers(e,t){for(var s of this.coercers)if(s.match(e))return s.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return we((function*(){var s=e;for(var r of t.modifiers)s=yield r(s);return s}))()}convertToExceptionList(e,t){var s,r,n,a={type:e.type,value:e.value,mechanism:{type:(s=t.type)!==null&&s!==void 0?s:"generic",handled:(r=t.handled)===null||r===void 0||r,synthetic:(n=e.synthetic)!==null&&n!==void 0&&n}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var o=[a];return e.cause!=null&&o.push(...this.convertToExceptionList(e.cause,y({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:Aa(this.stackParser),skipFirstLines:(t=e.skipFirstLines)!==null&&t!==void 0?t:1}}buildCoercingContext(e,t,s){s===void 0&&(s=0);var r=(n,a)=>{if(4>=a){var o=this.buildCoercingContext(e,t,a);return this.applyCoercers(n,o)}};return y({},t,{syntheticException:s==0?t.syntheticException:void 0,mechanism:e,apply:n=>r(n,s),next:n=>r(n,s+1)})}}var vt="?";function ts(i,e,t,s,r){var n={platform:i,filename:e,function:t===""?vt:t,in_app:!0};return E(s)||(n.lineno=s),E(r)||(n.colno=r),n}var En=(i,e)=>{var t=i.indexOf("safari-extension")!==-1,s=i.indexOf("safari-web-extension")!==-1;return t||s?[i.indexOf("@")!==-1?i.split("@")[0]:vt,t?"safari-extension:"+e:"safari-web-extension:"+e]:[i,e]},Da=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Na=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ha=/\((\S*)(?::(\d+))(?::(\d+))\)/,ja=(i,e)=>{var t=Da.exec(i);if(t){var[,s,r,n]=t;return ts(e,s,vt,+r,+n)}var a=Na.exec(i);if(a){if(a[2]&&a[2].indexOf("eval")===0){var o=Ha.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,c]=En(a[1]||vt,a[2]);return ts(e,c,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},qa=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ua=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,za=(i,e)=>{var t=qa.exec(i);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var s=Ua.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}var r=t[3],n=t[1]||vt;return[n,r]=En(n,r),ts(e,r,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Qs=/\(error: (.*)\)/;class Xa{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var s=W(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:s?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ii(e,"DOMException")}isDOMError(e){return ii(e,"DOMError")}}class Va{match(e){return(t=>t instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var s=e.message;return String(s.error&&typeof s.error.message=="string"?s.error.message:s)}getStack(e){return e.stacktrace||e.stack||void 0}}class Ba{constructor(){}match(e){return ii(e,"ErrorEvent")&&e.error!=null}coerce(e,t){var s;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}var Ga=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Wa{match(e){return typeof e=="string"}coerce(e,t){var s,[r,n]=this.getInfos(e);return{type:r??"Error",value:n??e,stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}getInfos(e){var t="Error",s=e,r=e.match(Ga);return r&&(t=r[1],s=r[2]),[t,s]}}var Ya=["fatal","error","warning","log","info","debug"];function xn(i,e){e===void 0&&(e=40);var t=Object.keys(i);if(t.sort(),!t.length)return"[object has no keys]";for(var s=t.length;s>0;s--){var r=t.slice(0,s).join(", ");if(e>=r.length)return s===t.length?r:r.length>e?r.slice(0,e)+"...":r}return""}class Ja{match(e){return typeof e=="object"&&e!==null}coerce(e,t){var s,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(s=t.syntheticException)==null?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return Fs(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var t="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&typeof e.message=="string")return e.message;var s=this.getObjectClassName(e);return(s&&s!=="Object"?"'"+s+"'":"Object")+" captured as exception with keys: "+xn(e)}isSeverityLevel(e){return W(e)&&!Zt(e)&&Ya.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var s=e[t];if(Ma(s))return s}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}}class Ka{match(e){return Fs(e)}coerce(e,t){var s,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+xn(e),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class Za{match(e){return nn(e)}coerce(e,t){var s;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}}}class Qa{match(e){return ii(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!Fs(e))return!1;try{var t=e.detail;return t!=null&&typeof t=="object"&&"reason"in t}catch{return!1}}coerce(e,t){var s,r=this.getUnhandledRejectionReason(e);return nn(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(s=t.syntheticException)==null?void 0:s.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var kn=function(i,e){var{debugEnabled:t}=e===void 0?{}:e,s={C(r){if(p&&(ne.DEBUG||F.POSTHOG_DEBUG||t)&&!E(p.console)&&p.console){for(var n=("__rrweb_original__"in p.console[r])?p.console[r].__rrweb_original__:p.console[r],a=arguments.length,o=new Array(a>1?a-1:0),l=1;a>l;l++)o[l-1]=arguments[l];n(i,...o)}},info(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("log",...n)},warn(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("warn",...n)},error(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];s.C("error",...n)},critical(){for(var r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];console.error(i,...n)},uninitializedWarning(r){s.error("You must initialize PostHog before calling "+r)},createLogger:(r,n)=>kn(i+" "+r,n)};return s},w=kn("[PostHog.js]"),z=w.createLogger,eo=z("[ExternalScriptsLoader]"),Ii=(i,e,t)=>{if(i.config.disable_external_dependency_loading)return eo.warn(e+" was requested but loading of external scripts is disabled."),t("Loading of external scripts is disabled");var s=b==null?void 0:b.querySelectorAll("script");if(s){for(var r,n=function(){if(s[a].src===e){var l=s[a];return l.__posthog_loading_callback_fired?{v:t()}:(l.addEventListener("load",(c=>{l.__posthog_loading_callback_fired=!0,t(void 0,c)})),l.onerror=c=>t(c),{v:void 0})}},a=0;s.length>a;a++)if(r=n())return r.v}var o=()=>{if(!b)return t("document not found");var l=b.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=h=>{l.__posthog_loading_callback_fired=!0,t(void 0,h)},l.onerror=h=>t(h),i.config.prepare_external_dependency_script&&(l=i.config.prepare_external_dependency_script(l)),!l)return t("prepare_external_dependency_script returned null");if(i.config.external_scripts_inject_target==="head")b.head.appendChild(l);else{var c,u=b.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):b.body.appendChild(l)}};b!=null&&b.body?o():b==null||b.addEventListener("DOMContentLoaded",o)};F.__PosthogExtensions__=F.__PosthogExtensions__||{},F.__PosthogExtensions__.loadExternalDependency=(i,e,t)=>{if(e!=="remote-config"){var s;if(i.config.__preview_external_dependency_versioned_paths)s=i.requestRouter.endpointFor("assets","/static/"+i.version+"/"+e+".js");else{var r="/static/"+e+".js?v="+i.version;if(e==="toolbar"){var n=3e5;r=r+"&t="+Math.floor(Date.now()/n)*n}s=i.requestRouter.endpointFor("assets",r)}Ii(i,s,t)}else{var a=i.requestRouter.endpointFor("assets","/array/"+i.config.token+"/config.js");Ii(i,a,t)}},F.__PosthogExtensions__.loadSiteApp=(i,e,t)=>{var s=i.requestRouter.endpointFor("api",e);Ii(i,s,t)};var Sn="$people_distinct_id",ri="$device_id",Pt="__alias",Rt="__timers",er="$autocapture_disabled_server_side",is="$heatmaps_enabled_server_side",tr="$exception_capture_enabled_server_side",ss="$error_tracking_suppression_rules",ir="$error_tracking_capture_extension_exceptions",sr="$web_vitals_enabled_server_side",Pn="$dead_clicks_enabled_server_side",rs="$product_tours_enabled_server_side",rr="$web_vitals_allowed_metrics",Ft="$session_recording_remote_config",ni="$sesid",Rn="$session_is_sampled",lt="$enabled_feature_flags",It="$early_access_features",ns="$feature_flag_details",as="$feature_flag_payloads",rt="$override_feature_flag_payloads",$t="$stored_person_properties",Ge="$stored_group_properties",os="$surveys",Fn="$surveys_activated",Qt="ph_product_tours",Ot="$flag_call_reported",ls="$flag_call_reported_session_id",us="$feature_flag_errors",ai="$feature_flag_evaluated_at",be="$user_state",cs="$client_session_props",hs="$capture_rate_limit",ds="$initial_campaign_params",ps="$initial_referrer_info",oi="$initial_person_info",li="$epp",In="__POSTHOG_TOOLBAR__",Vt="$posthog_cookieless",to=[Sn,Pt,"__cmpns",Rt,"$session_recording_enabled_server_side",is,ni,lt,ss,be,It,ns,Ge,$t,os,Ot,ls,us,ai,cs,hs,ds,ps,li,oi,Qt,"$product_tours_activated",rs,Fn,Ft,as,rt],Os="PostHog loadExternalDependency extension not found.",$e="on_reject",Ee="always",Ke="anonymous",Ze="identified",vs="identified_only",ui="visibilitychange",ci="beforeunload",nt="$pageview",$i="$pageleave",Ci="$identify",nr="$groupidentify";function Bt(i,e){D(i)&&i.forEach(e)}function q(i,e){if(!L(i))if(D(i))i.forEach(e);else if(ba(i))i.forEach(((s,r)=>e(s,r)));else for(var t in i)rn.call(i,t)&&e(i[t],t)}var B=function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;e>s;s++)t[s-1]=arguments[s];for(var r of t)for(var n in r)r[n]!==void 0&&(i[n]=r[n]);return i};function ei(i){for(var e=Object.keys(i),t=e.length,s=new Array(t);t--;)s[t]=[e[t],i[e[t]]];return s}var ar=function(i){try{return i()}catch{return}},io=function(i){return function(){try{for(var e=arguments.length,t=new Array(e),s=0;e>s;s++)t[s]=arguments[s];return i.apply(this,t)}catch(r){w.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),w.critical(r)}}},Ms=function(i){var e={};return q(i,(function(t,s){(W(t)&&t.length>0||xe(t))&&(e[s]=t)})),e},so=["herokuapp.com","vercel.app","netlify.app"];function ro(i){var e=i==null?void 0:i.hostname;if(!W(e))return!1;var t=e.split(".").slice(-2).join(".");for(var s of so)if(t===s)return!1;return!0}function G(i,e,t,s){var{capture:r=!1,passive:n=!0}=s??{};i==null||i.addEventListener(e,t,{capture:r,passive:n})}function $n(i){return i.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(i){return 0>i?Math.ceil(i):Math.floor(i)}),Number.isInteger||(Number.isInteger=function(i){return xe(i)&&isFinite(i)&&Math.floor(i)===i});class hi{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,s,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(s)||!Number.isInteger(r)||0>e||0>t||0>s||0>r||e>0xffffffffffff||t>4095||s>1073741823||r>4294967295)throw new RangeError("invalid field value");var n=new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/Math.pow(2,8),n[5]=e,n[6]=112|t>>>8,n[7]=t,n[8]=128|s>>>24,n[9]=s>>>16,n[10]=s>>>8,n[11]=s,n[12]=r>>>24,n[13]=r>>>16,n[14]=r>>>8,n[15]=r,new hi(n)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new hi(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;16>t;t++){var s=this.bytes[t]-e.bytes[t];if(s!==0)return Math.sign(s)}return 0}}class no{constructor(){this.I=0,this.S=0,this.k=new ao}generate(){var e=this.generateOrAbort();if(E(e)){this.I=0;var t=this.generateOrAbort();if(E(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.I)this.I=e,this.A();else{if(this.I>=e+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return hi.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var or,Cn=i=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;i.length>e;e++)i[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return i};p&&!E(p.crypto)&&crypto.getRandomValues&&(Cn=i=>crypto.getRandomValues(i));class ao{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(Cn(this.T),this.N=0),this.T[this.N++]}}var je=()=>oo().toString(),oo=()=>(or||(or=new no)).generate(),_t="",lo=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Se={Ut:()=>!!b,Yt(i){w.error("cookieStore error: "+i)},Gt(i){if(b){try{for(var e=i+"=",t=b.cookie.split(";").filter((n=>n.length)),s=0;t.length>s;s++){for(var r=t[s];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},Wt(i){var e;try{e=JSON.parse(Se.Gt(i))||{}}catch{}return e},Xt(i,e,t,s,r){if(b)try{var n="",a="",o=(function(u,h){if(h){var d=(function(g,f){if(f===void 0&&(f=b),_t)return _t;if(!f||["localhost","127.0.0.1"].includes(g))return"";for(var $=g.split("."),k=Math.min($.length,8),C="dmn_chk_"+je();!_t&&k--;){var R=$.slice(k).join("."),I=C+"=1;domain=."+R+";path=/";f.cookie=I+";max-age=3",f.cookie.includes(C)&&(f.cookie=I+";max-age=0",_t=R)}return _t})(u);if(!d){var v=(g=>{var f=g.match(lo);return f?f[0]:""})(u);v!==d&&w.info("Warning: cookie subdomain discovery mismatch",v,d),d=v}return d?"; domain=."+d:""}return""})(b.location.hostname,s);if(t){var l=new Date;l.setTime(l.getTime()+864e5*t),n="; expires="+l.toUTCString()}r&&(a="; secure");var c=i+"="+encodeURIComponent(JSON.stringify(e))+n+"; SameSite=Lax; path=/"+o+a;return c.length>3686.4&&w.warn("cookieStore warning: large cookie, len="+c.length),b.cookie=c,c}catch{return}},Jt(i,e){if(b!=null&&b.cookie)try{Se.Xt(i,"",-1,e)}catch{return}}},Ti=null,X={Ut(){if(!Oe(Ti))return Ti;var i=!0;if(E(p))i=!1;else try{var e="__mplssupport__";X.Xt(e,"xyz"),X.Gt(e)!=='"xyz"'&&(i=!1),X.Jt(e)}catch{i=!1}return i||w.error("localStorage unsupported; falling back to cookie store"),Ti=i,i},Yt(i){w.error("localStorage error: "+i)},Gt(i){try{return p==null?void 0:p.localStorage.getItem(i)}catch(e){X.Yt(e)}return null},Wt(i){try{return JSON.parse(X.Gt(i))||{}}catch{}return null},Xt(i,e){try{p==null||p.localStorage.setItem(i,JSON.stringify(e))}catch(t){X.Yt(t)}},Jt(i){try{p==null||p.localStorage.removeItem(i)}catch(e){X.Yt(e)}}},uo=[ri,"distinct_id",ni,Rn,li,oi,be],Gt={},co={Ut:()=>!0,Yt(i){w.error("memoryStorage error: "+i)},Gt:i=>Gt[i]||null,Wt:i=>Gt[i]||null,Xt(i,e){Gt[i]=e},Jt(i){delete Gt[i]}},Xe=null,ee={Ut(){if(!Oe(Xe))return Xe;if(Xe=!0,E(p))Xe=!1;else try{var i="__support__";ee.Xt(i,"xyz"),ee.Gt(i)!=='"xyz"'&&(Xe=!1),ee.Jt(i)}catch{Xe=!1}return Xe},Yt(i){w.error("sessionStorage error: ",i)},Gt(i){try{return p==null?void 0:p.sessionStorage.getItem(i)}catch(e){ee.Yt(e)}return null},Wt(i){try{return JSON.parse(ee.Gt(i))||null}catch{}return null},Xt(i,e){try{p==null||p.sessionStorage.setItem(i,JSON.stringify(e))}catch(t){ee.Yt(t)}},Jt(i){try{p==null||p.sessionStorage.removeItem(i)}catch(e){ee.Yt(e)}}};class ho{constructor(e){this._instance=e}get Rt(){return this._instance.config}get consent(){return this.Kt()?0:this.Qt}isOptedOut(){return this.Rt.cookieless_mode===Ee||this.consent===0||this.consent===-1&&(this.Rt.opt_out_capturing_by_default||this.Rt.cookieless_mode===$e)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}optInOut(e){this.ti.Xt(this.ei,e?1:0,this.Rt.cookie_expiration,this.Rt.cross_subdomain_cookie,this.Rt.secure_cookie)}reset(){this.ti.Jt(this.ei,this.Rt.cross_subdomain_cookie)}get ei(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:s}=this._instance.config;return s||(t?t+e:"__ph_opt_in_out_"+e)}get Qt(){var e=this.ti.Gt(this.ei);return Pi(e)?1:M(xa,e)?0:-1}get ti(){var e=this.Rt.opt_out_capturing_persistence_type,t=e==="localStorage"?X:Se;if(!this.ii||this.ii!==t){this.ii=t;var s=e==="localStorage"?Se:X;s.Gt(this.ei)&&(this.ii.Gt(this.ei)||this.optInOut(Pi(s.Gt(this.ei))),s.Jt(this.ei,this.Rt.cross_subdomain_cookie))}return this.ii}Kt(){return!!this.Rt.respect_dnt&&[ce==null?void 0:ce.doNotTrack,ce==null?void 0:ce.msDoNotTrack,F.doNotTrack].some((e=>Pi(e)))}}var Wt=z("[Dead Clicks]"),po=()=>!0,vo=i=>{var e,t=!((e=i.instance.persistence)==null||!e.get_property(Pn)),s=i.instance.config.capture_dead_clicks;return Pe(s)?s:!!J(s)||t};class lr{get lazyLoadedDeadClicksAutocapture(){return this.ri}constructor(e,t,s){this.instance=e,this.isEnabled=t,this.onCapture=s,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[Pn]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ni((()=>{this.si()})):this.stop()}ni(e){var t,s;(t=F.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture&&e(),(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?Wt.error("failed to load script",r):e()}))}si(){var e;if(b){if(!this.ri&&(e=F.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=J(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ri=F.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ri.start(b),Wt.info("starting...")}}else Wt.error("`document` not found. Cannot start.")}stop(){this.ri&&(this.ri.stop(),this.ri=void 0,Wt.info("stopping..."))}}var Oi=z("[SegmentIntegration]"),Tn="posthog-js";function On(i,e){var{organization:t,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=e===void 0?{}:e;return o=>{var l,c,u,h,d;if(n!=="*"&&!n.includes(o.level)||!i.__loaded)return o;o.tags||(o.tags={});var v=i.requestRouter.endpointFor("ui","/project/"+i.config.token+"/person/"+i.get_distinct_id());o.tags["PostHog Person URL"]=v,i.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=i.get_session_replay_url({withTimestamp:!0}));var g,f=((l=o.exception)==null?void 0:l.values)||[],$=f.map((C=>y({},C,{stacktrace:C.stacktrace?y({},C.stacktrace,{type:"raw",frames:(C.stacktrace.frames||[]).map((R=>y({},R,{platform:"web:javascript"})))}):void 0}))),k={$exception_message:((c=f[0])==null?void 0:c.value)||o.message,$exception_type:(u=f[0])==null?void 0:u.type,$exception_level:o.level,$exception_list:$,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:((h=f[0])==null?void 0:h.value)||o.message,$sentry_exception_type:(d=f[0])==null?void 0:d.type,$sentry_tags:o.tags};return t&&s&&(k.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+s+"&query="+o.event_id),a&&((g=i.exceptions)==null||g.sendExceptionEvent(k)),o}}class go{constructor(e,t,s,r,n,a){this.name=Tn,this.setupOnce=function(o){o(On(e,{organization:t,projectId:s,prefix:r,severityAllowList:n,sendExceptionsToPostHog:a==null||a}))}}}class ur{constructor(e){this.oi=(t,s,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength)&&(w.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:t,changeReason:r}),this.ai=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.li()}li(){var e;this.ui=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.oi)}destroy(){var e;(e=this.ui)==null||e.call(this),this.ui=void 0}doPageView(e,t){var s,r=this.hi(e,t);return this.ai={pathname:(s=p==null?void 0:p.location.pathname)!==null&&s!==void 0?s:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.hi(e,(t=this.ai)==null?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.ai)==null?void 0:e.pageViewId}}hi(e,t){var s=this.ai;if(!s)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:s.pageViewId},n=this._instance.scrollManager.getContext();if(n&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:o,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:h}=n;if(!(E(a)||E(o)||E(l)||E(c)||E(u)||E(h))){a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h);var d=a>1?Re(o/a,0,1,w):1,v=a>1?Re(l/a,0,1,w):1,g=c>1?Re(u/c,0,1,w):1,f=c>1?Re(h/c,0,1,w):1;r=B(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:f})}}return s.pathname&&(r.$prev_pageview_pathname=s.pathname),s.timestamp&&(r.$prev_pageview_duration=(e.getTime()-s.timestamp.getTime())/1e3),r}}var di=i=>{var e=b==null?void 0:b.createElement("a");return E(e)?null:(e.href=i,e)},pi=function(i,e){for(var t,s=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===e){t=n;break}}if(!D(t)||2>t.length)return"";var a=t[1];try{a=decodeURIComponent(a)}catch{w.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Ht=function(i,e,t){if(!i||!e||!e.length)return i;for(var s=i.split("#"),r=s[1],n=(s[0]||"").split("?"),a=n[1],o=n[0],l=(a||"").split("&"),c=[],u=0;l.length>u;u++){var h=l[u].split("=");D(h)&&(e.includes(h[0])?c.push(h[0]+"="+t):c.push(l[u]))}var d=o;return a!=null&&(d+="?"+c.join("&")),r!=null&&(d+="#"+r),d},vi=function(i,e){var t=i.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Yt="https?://(.*)",gt=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],fo=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...gt],jt="",_o=["li_fat_id"];function Mn(i,e,t){if(!b)return{};var s,r=e?[...gt,...t||[]]:[],n=An(Ht(b.URL,r,jt),i),a=(s={},q(_o,(function(o){var l=Se.Gt(o);s[o]=l||null})),s);return B(a,n)}function An(i,e){var t=fo.concat(e||[]),s={};return q(t,(function(r){var n=pi(i,r);s[r]=n||null})),s}function Ln(i){var e=(function(n){return n?n.search(Yt+"google.([^/?]*)")===0?"google":n.search(Yt+"bing.com")===0?"bing":n.search(Yt+"yahoo.com")===0?"yahoo":n.search(Yt+"duckduckgo.com")===0?"duckduckgo":null:null})(i),t=e!="yahoo"?"q":"p",s={};if(!Oe(e)){s.$search_engine=e;var r=b?pi(b.referrer,t):"";r.length&&(s.ph_keyword=r)}return s}function cr(){return navigator.language||navigator.userLanguage}var gi="$direct";function Dn(){return(b==null?void 0:b.referrer)||gi}function Nn(i,e){var t=i?[...gt,...e||[]]:[],s=Q==null?void 0:Q.href.substring(0,1e3);return{r:Dn().substring(0,1e3),u:s?Ht(s,t,jt):void 0}}function Hn(i){var e,{r:t,u:s}=i,r={$referrer:t,$referring_domain:t==null?void 0:t==gi?gi:(e=di(t))==null?void 0:e.host};if(s){r.$current_url=s;var n=di(s);r.$host=n==null?void 0:n.host,r.$pathname=n==null?void 0:n.pathname;var a=An(s);B(r,a)}if(t){var o=Ln(t);B(r,o)}return r}function jn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function mo(){try{return new Date().getTimezoneOffset()}catch{return}}var yo=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Mi{constructor(e,t){this.Rt=e,this.props={},this.ci=!1,this.di=(s=>{var r="";return s.token&&(r=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+r+"_posthog"})(e),this.ti=this.vi(e),this.load(),e.debug&&w.info("Persistence loaded",e.persistence,y({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.fi}vi(e){yo.indexOf(e.persistence.toLowerCase())===-1&&(w.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=(function(r){r===void 0&&(r=[]);var n=[...uo,...r];return y({},X,{Wt(a){try{var o={};try{o=Se.Wt(a)||{}}catch{}var l=B(o,JSON.parse(X.Gt(a)||"{}"));return X.Xt(a,l),l}catch{}return null},Xt(a,o,l,c,u,h){try{X.Xt(a,o,void 0,void 0,h);var d={};n.forEach((v=>{o[v]&&(d[v]=o[v])})),Object.keys(d).length&&Se.Xt(a,d,l,c,u,h)}catch(v){X.Yt(v)}},Jt(a,o){try{p==null||p.localStorage.removeItem(a),Se.Jt(a,o)}catch(l){X.Yt(l)}}})})(e.cookie_persisted_properties||[]),s=e.persistence.toLowerCase();return s==="localstorage"&&X.Ut()?X:s==="localstorage+cookie"&&t.Ut()?t:s==="sessionstorage"&&ee.Ut()?ee:s==="memory"?co:s==="cookie"?Se:t.Ut()?t:Se}pi(e){var t=e??this.Rt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var s=this.props[ai];return!s||typeof s!="number"||Date.now()-s>t}properties(){var e={};return q(this.props,((t,s)=>{if(s===lt&&J(t)){if(!this.pi())for(var r=Object.keys(t),n=0;r.length>n;n++)e["$feature/"+r[n]]=t[r[n]]}else to.indexOf(s)===-1&&(e[s]=t)})),e}load(){if(!this.fi){var e=this.ti.Wt(this.di);e&&(this.props=B({},e))}}save(){this.fi||this.ti.Xt(this.di,this.props,this.gi,this.mi,this.yi,this.Rt.debug)}remove(){this.ti.Jt(this.di,!1),this.ti.Jt(this.di,!0)}clear(){this.remove(),this.props={}}register_once(e,t,s){if(J(e)){E(t)&&(t="None"),this.gi=E(s)?this.bi:s;var r=!1;if(q(e,((n,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==t||(this.props[a]=n,r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(J(e)){this.gi=E(t)?this.bi:t;var s=!1;if(q(e,((r,n)=>{e.hasOwnProperty(n)&&this.props[n]!==r&&(this.props[n]=r,s=!0)})),s)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.ci){var e=Mn(this.Rt.custom_campaign_params,this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties);ot(Ms(e))||this.register(e),this.ci=!0}}update_search_keyword(){var e;this.register((e=b==null?void 0:b.referrer)?Ln(e):{})}update_referrer_info(){var e;this.register_once({$referrer:Dn(),$referring_domain:b!=null&&b.referrer&&((e=di(b.referrer))==null?void 0:e.host)||gi},void 0)}set_initial_person_info(){this.props[ds]||this.props[ps]||this.register_once({[oi]:Nn(this.Rt.mask_personal_data_properties,this.Rt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};q([ps,ds],(a=>{var o=this.props[a];o&&q(o,(function(l,c){e["$initial_"+Ki(c)]=l}))}));var t,s,r=this.props[oi];if(r){var n=(t=Hn(r),s={},q(t,(function(a,o){s["$initial_"+Ki(o)]=a})),s);B(e,n)}return e}safe_merge(e){return q(this.props,(function(t,s){s in e||(e[s]=t)})),e}update_config(e,t,s){if(this.bi=this.gi=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!s),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((a,o)=>{if(a.length!==o.length)return!1;var l=[...a].sort(),c=[...o].sort();return l.every(((u,h)=>u===c[h]))})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.vi(e),n=this.props;this.clear(),this.ti=r,this.props=n,this.save()}}set_disabled(e){this.fi=e,this.fi?this.remove():this.save()}set_cross_subdomain(e){e!==this.mi&&(this.mi=e,this.remove(),this.save())}set_secure(e){e!==this.yi&&(this.yi=e,this.remove(),this.save())}set_event_timer(e,t){var s=this.props[Rt]||{};s[e]=t,this.props[Rt]=s,this.save()}remove_event_timer(e){var t=(this.props[Rt]||{})[e];return E(t)||(delete this.props[Rt][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var mt={Activation:"events",Cancellation:"cancelEvents"},Ai={Popover:"popover",API:"api",Widget:"widget"},Ct={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Li={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},gs={Popover:"popover",Inline:"inline"},bo={SHOWN:"product tour shown"},hr={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},dr=z("[RateLimiter]");class wo{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=t=>{var s=t.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach((r=>{dr.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void dr.warn('could not rate limit - continuing. Error: "'+(r==null?void 0:r.message)+'"',{text:s})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var t,s,r;e===void 0&&(e=!1);var{captureEventsBurstLimit:n,captureEventsPerSecond:a}=this,o=new Date().getTime(),l=(t=(s=this.instance.persistence)==null?void 0:s.get_property(hs))!==null&&t!==void 0?t:{tokens:n,last:o};l.tokens+=(o-l.last)/1e3*a,l.last=o,l.tokens>n&&(l.tokens=n);var c=1>l.tokens;return c||e||(l.tokens=Math.max(0,l.tokens-1)),!c||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+n+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(r=this.instance.persistence)==null||r.set_property(hs,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()e(this.remoteConfig))):e()}Ii(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return yt.info("Using preloaded remote config",this.remoteConfig),this.Ci(this.remoteConfig),void this.Si();if(this._instance.ki())return void yt.warn("Remote config is disabled. Falling back to local config.");this.wi((e=>{if(!e)return yt.info("No config found after loading remote JS config. Falling back to JSON."),void this.Ii((t=>{this.Ci(t),this.Si()}));this.Ci(e),this.Si()}))}catch(e){yt.error("Error loading remote config",e)}}stop(){this.xi&&(clearInterval(this.xi),this.xi=void 0)}refresh(){this._instance.ki()||(b==null?void 0:b.visibilityState)==="hidden"||this._instance.reloadFeatureFlags()}Si(){var e;if(!this.xi){var t=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;t!==0&&(this.xi=setInterval((()=>{this.refresh()}),t))}}Ci(e){var t;e||yt.error("Failed to fetch remote config from PostHog."),this._instance.Ci(e??{}),(e==null?void 0:e.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(t=this._instance.featureFlags)==null||t.ensureFlagsLoaded())}}var ke={GZipJS:"gzip-js",Base64:"base64"},fe=Uint8Array,le=Uint16Array,ft=Uint32Array,As=new fe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ls=new fe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pr=new fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Un=function(i,e){for(var t=new le(31),s=0;31>s;++s)t[s]=e+=1<s;++s)for(var n=t[s];t[s+1]>n;++n)r[n]=n-t[s]<<5|s;return[t,r]},zn=Un(As,2),fs=zn[1];zn[0][28]=258,fs[258]=28;for(var vr=Un(Ls,0)[1],Xn=new le(32768),U=0;32768>U;++U){var Qe=(43690&U)>>>1|(21845&U)<<1;Xn[U]=((65280&(Qe=(61680&(Qe=(52428&Qe)>>>2|(13107&Qe)<<2))>>>4|(3855&Qe)<<4))>>>8|(255&Qe)<<8)>>>1}var Mt=function(i,e,t){for(var s=i.length,r=0,n=new le(e);s>r;++r)++n[i[r]-1];var a,o=new le(e);for(r=0;e>r;++r)o[r]=o[r-1]+n[r-1]<<1;for(a=new le(s),r=0;s>r;++r)a[r]=Xn[o[i[r]-1]++]>>>15-i[r];return a},Ye=new fe(288);for(U=0;144>U;++U)Ye[U]=8;for(U=144;256>U;++U)Ye[U]=9;for(U=256;280>U;++U)Ye[U]=7;for(U=280;288>U;++U)Ye[U]=8;var fi=new fe(32);for(U=0;32>U;++U)fi[U]=5;var Eo=Mt(Ye,9),xo=Mt(fi,5),Vn=function(i){return(i/8>>0)+(7&i&&1)},Bn=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var s=new(i instanceof le?le:i instanceof ft?ft:fe)(t-e);return s.set(i.subarray(e,t)),s},Ie=function(i,e,t){var s=e/8>>0;i[s]|=t<<=7&e,i[s+1]|=t>>>8},bt=function(i,e,t){var s=e/8>>0;i[s]|=t<<=7&e,i[s+1]|=t>>>8,i[s+2]|=t>>>16},Di=function(i,e){for(var t=[],s=0;i.length>s;++s)i[s]&&t.push({s,f:i[s]});var r=t.length,n=t.slice();if(!r)return[new fe(0),0];if(r==1){var a=new fe(t[0].s+1);return a[t[0].s]=1,[a,1]}t.sort((function(_,S){return _.f-S.f})),t.push({s:-1,f:25001});var o=t[0],l=t[1],c=0,u=1,h=2;for(t[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=r-1;)o=t[t[h].f>t[c].f?c++:h++],l=t[c!=u&&t[h].f>t[c].f?c++:h++],t[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var v=new le(d+1),g=_s(t[u-1],v,0);if(g>e){s=0;var f=0,$=g-e,k=1<<$;for(n.sort((function(_,S){return v[S.s]-v[_.s]||_.f-S.f}));r>s;++s){var C=n[s].s;if(e>=v[C])break;f+=k-(1<>>=$;f>0;){var R=n[s].s;e>v[R]?f-=1<=0&&f;--s){var I=n[s].s;v[I]==e&&(--v[I],++f)}g=e}return[new fe(v),g]},_s=function(i,e,t){return i.s==-1?Math.max(_s(i.l,e,t+1),_s(i.r,e,t+1)):e[i.s]=t},gr=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new le(++e),s=0,r=i[0],n=1,a=function(l){t[s++]=l},o=1;e>=o;++o)if(i[o]==r&&o!=e)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=i[o]}return[t.subarray(0,s),e]},wt=function(i,e){for(var t=0,s=0;e.length>s;++s)t+=i[s]*e[s];return t},ms=function(i,e,t){var s=t.length,r=Vn(e+2);i[r]=255&s,i[r+1]=s>>>8,i[r+2]=255^i[r],i[r+3]=255^i[r+1];for(var n=0;s>n;++n)i[r+n+4]=t[n];return 8*(r+4+s)},fr=function(i,e,t,s,r,n,a,o,l,c,u){Ie(e,u++,t),++r[256];for(var h=Di(r,15),d=h[0],v=h[1],g=Di(n,15),f=g[0],$=g[1],k=gr(d),C=k[0],R=k[1],I=gr(f),_=I[0],S=I[1],x=new le(19),m=0;C.length>m;++m)x[31&C[m]]++;for(m=0;_.length>m;++m)x[31&_[m]]++;for(var P=Di(x,7),T=P[0],O=P[1],A=19;A>4&&!T[pr[A-1]];--A);var H,N,Y,Z,ae=c+5<<3,V=wt(r,Ye)+wt(n,fi)+a,ie=wt(r,d)+wt(n,f)+a+14+3*A+wt(x,T)+(2*x[16]+3*x[17]+7*x[18]);if(V>=ae&&ie>=ae)return ms(e,u,i.subarray(l,l+c));if(Ie(e,u,1+(V>ie)),u+=2,V>ie){H=Mt(d,v),N=d,Y=Mt(f,$),Z=f;var de=Mt(T,O);for(Ie(e,u,R-257),Ie(e,u+5,S-1),Ie(e,u+10,A-4),u+=14,m=0;A>m;++m)Ie(e,u+3*m,T[pr[m]]);u+=3*A;for(var pe=[C,_],Fe=0;2>Fe;++Fe){var ue=pe[Fe];for(m=0;ue.length>m;++m)Ie(e,u,de[_e=31&ue[m]]),u+=T[_e],_e>15&&(Ie(e,u,ue[m]>>>5&127),u+=ue[m]>>>12)}}else H=Eo,N=Ye,Y=xo,Z=fi;for(m=0;o>m;++m)if(s[m]>255){var _e;bt(e,u,H[257+(_e=s[m]>>>18&31)]),u+=N[_e+257],_e>7&&(Ie(e,u,s[m]>>>23&31),u+=As[_e]);var me=31&s[m];bt(e,u,Y[me]),u+=Z[me],me>3&&(bt(e,u,s[m]>>>5&8191),u+=Ls[me])}else bt(e,u,H[s[m]]),u+=N[s[m]];return bt(e,u,H[256]),u+N[256]},ko=new ft([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),So=(function(){for(var i=new ft(256),e=0;256>e;++e){for(var t=e,s=9;--s;)t=(1&t&&3988292384)^t>>>1;i[e]=t}return i})(),Ni=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function Po(i,e){e===void 0&&(e={});var t=(function(){var h=4294967295;return{p(d){for(var v=h,g=0;d.length>g;++g)v=So[255&v^d[g]]^v>>>8;h=v},d(){return 4294967295^h}}})(),s=i.length;t.p(i);var r,n,a,o,l,c=(o=10+((r=e).filename&&r.filename.length+1||0),l=8,(function(h,d,v,g,f,$){var k=h.length,C=new fe(g+k+5*(1+Math.floor(k/7e3))+f),R=C.subarray(g,C.length-f),I=0;if(!d||8>k)for(var _=0;k>=_;_+=65535){var S=_+65535;k>S?I=ms(R,I,h.subarray(_,S)):(R[_]=!0,I=ms(R,I,h.subarray(_,k)))}else{for(var x=ko[d-1],m=x>>>13,P=8191&x,T=(1<_;++_){var _e=Y(_),me=32767&_,Je=A[_e];if(O[me]=Je,A[_e]=me,_>=Fe){var Ut=k-_;if((ie>7e3||pe>24576)&&Ut>423){I=fr(h,R,0,Z,ae,V,de,pe,ue,_-ue,I),pe=ie=de=0,ue=_;for(var ye=0;286>ye;++ye)ae[ye]=0;for(ye=0;30>ye;++ye)V[ye]=0}var ze=2,zt=0,ha=P,Me=me-Je&32767;if(Ut>2&&_e==Y(_-Me))for(var da=Math.min(m,Ut)-1,pa=Math.min(32767,_),va=Math.min(258,Ut);pa>=Me&&--ha&&me!=Je;){if(h[_+ze]==h[_+ze-Me]){for(var Ae=0;va>Ae&&h[_+Ae]==h[_+Ae-Me];++Ae);if(Ae>ze){if(ze=Ae,zt=Me,Ae>da)break;var ga=Math.min(Me,Ae-2),qs=0;for(ye=0;ga>ye;++ye){var ki=_-Me+ye+32768&32767,Us=ki-O[ki]+32768&32767;Us>qs&&(qs=Us,Je=ki)}}}Me+=(me=Je)-(Je=O[me])+32768&32767}if(zt){Z[pe++]=268435456|fs[ze]<<18|vr[zt];var zs=31&fs[ze],Xs=31&vr[zt];de+=As[zs]+Ls[Xs],++ae[257+zs],++V[Xs],Fe=_+ze,++ie}else Z[pe++]=h[_],++ae[h[_]]}}I=fr(h,R,!0,Z,ae,V,de,pe,ue,_-ue,I)}return Bn(C,0,g+Vn(I)+f)})(n=i,(a=e).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+a.mem,o,l)),u=c.length;return(function(h,d){var v=d.filename;if(h[0]=31,h[1]=139,h[2]=8,h[8]=2>d.level?4:d.level==9?2:0,h[9]=3,d.mtime!=0&&Ni(h,4,Math.floor(new Date(d.mtime||Date.now())/1e3)),v){h[3]=8;for(var g=0;v.length>=g;++g)h[g+10]=v.charCodeAt(g)}})(c,e),Ni(c,u-8,t.d()),Ni(c,u-4,s),c}var Ro=!!Ji||!!Yi,Gn="text/plain",_r=!1,wi=function(i,e,t){var s;t===void 0&&(t=!0);var[r,n]=i.split("?"),a=y({},e),o=(s=n==null?void 0:n.split("&").map((c=>{var u,[h,d]=c.split("="),v=t&&(u=a[h])!==null&&u!==void 0?u:d;return delete a[h],h+"="+v})))!==null&&s!==void 0?s:[],l=(function(c,u){var h,d;u===void 0&&(u="&");var v=[];return q(c,(function(g,f){E(g)||E(f)||f==="undefined"||(h=encodeURIComponent(($=>$ instanceof File)(g)?g.name:g.toString()),d=encodeURIComponent(f),v[v.length]=d+"="+h)})),v.join(u)})(a);return l&&o.push(l),r+"?"+o.join("&")},ut=(i,e)=>JSON.stringify(i,((t,s)=>typeof s=="bigint"?s.toString():s),e),Hi=i=>{if(i.zt)return i.zt;var{data:e,compression:t}=i;if(e){if(t===ke.GZipJS){var s=Po((function(o,l){var c=o.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(o);for(var u=new fe(o.length+(o.length>>>1)),h=0,d=function($){u[h++]=$},v=0;c>v;++v){if(h+5>u.length){var g=new fe(h+8+(c-v<<1));g.set(u),u=g}var f=o.charCodeAt(v);128>f?d(f):2048>f?(d(192|f>>>6),d(128|63&f)):f>55295&&57344>f?(d(240|(f=65536+(1047552&f)|1023&o.charCodeAt(++v))>>>18),d(128|f>>>12&63),d(128|f>>>6&63),d(128|63&f)):(d(224|f>>>12),d(128|f>>>6&63),d(128|63&f))}return Bn(u,0,h)})(ut(e)),{mtime:0});return{contentType:Gn,body:s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength),estimatedSize:s.byteLength}}if(t===ke.Base64){var r=(function(o){return o&&btoa(encodeURIComponent(o).replace(/%([0-9A-F]{2})/g,((l,c)=>String.fromCharCode(parseInt(c,16)))))})(ut(e)),n=(o=>"data="+encodeURIComponent(typeof o=="string"?o:ut(o)))(r);return{contentType:"application/x-www-form-urlencoded",body:n,estimatedSize:new Blob([n]).size}}var a=ut(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},Fo=(function(){var i=we((function*(e){var t=ut(e.data),s=yield(function(n,a,o){return tn.apply(this,arguments)})(t,ne.DEBUG,{rethrow:!0});if(!s)return e;var r=yield s.arrayBuffer();return y({},e,{zt:{contentType:Gn,body:r,estimatedSize:r.byteLength}})}));return function(e){return i.apply(this,arguments)}})(),mr=(i,e)=>wi(i,{_:new Date().getTime().toString(),ver:ne.JS_SDK_VERSION,compression:e}),ti=[];Yi&&ti.push({transport:"fetch",method(i){var e,t,{contentType:s,body:r,estimatedSize:n}=(e=Hi(i))!==null&&e!==void 0?e:{},a=new Headers;q(i.headers,(function(u,h){a.append(h,u)})),s&&a.append("Content-Type",s);var o=i.url,l=null;if(Vs){var c=new Vs;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),i.timeout)}}Yi(o,y({method:(i==null?void 0:i.method)||"GET",headers:a,keepalive:i.method==="POST"&&52428.8>(n||0),body:r,signal:(t=l)==null?void 0:t.signal},i.fetchOptions)).then((u=>u.text().then((h=>{var d={statusCode:u.status,text:h};if(u.status===200)try{d.json=JSON.parse(h)}catch(v){w.error(v)}i.callback==null||i.callback(d)})))).catch((u=>{w.error(u),i.callback==null||i.callback({statusCode:0,error:u})})).finally((()=>l?clearTimeout(l.timeout):null))}}),Ji&&ti.push({transport:"XHR",method(i){var e,t=new Ji;t.open(i.method||"GET",i.url,!0);var{contentType:s,body:r}=(e=Hi(i))!==null&&e!==void 0?e:{};q(i.headers,(function(n,a){t.setRequestHeader(a,n)})),s&&t.setRequestHeader("Content-Type",s),i.timeout&&(t.timeout=i.timeout),i.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(t.readyState===4){var n={statusCode:t.status,text:t.responseText};if(t.status===200)try{n.json=JSON.parse(t.responseText)}catch{}i.callback==null||i.callback(n)}},t.send(r)}}),ce!=null&&ce.sendBeacon&&ti.push({transport:"sendBeacon",method(i){var e=wi(i.url,{beacon:"1"});try{var t,{contentType:s,body:r}=(t=Hi(i))!==null&&t!==void 0?t:{};if(!r)return;var n=r instanceof Blob?r:new Blob([r],{type:s});ce.sendBeacon(e,n)}catch{}}});var ys=3e3;class Io{constructor(e,t){this.Ti=!0,this.Ai=[],this.Ei=Re((t==null?void 0:t.flush_interval_ms)||ys,250,5e3,w.createLogger("flush interval"),ys),this.Ri=e}enqueue(e){this.Ai.push(e),this.Ni||this.Mi()}unload(){this.Fi();var e=this.Ai.length>0?this.Oi():{},t=Object.values(e);[...t.filter((s=>s.url.indexOf("/e")===0)),...t.filter((s=>s.url.indexOf("/e")!==0))].map((s=>{this.Ri(y({},s,{transport:"sendBeacon"}))}))}enable(){this.Ti=!1,this.Mi()}Mi(){var e=this;this.Ti||(this.Ni=setTimeout((()=>{if(this.Fi(),this.Ai.length>0){var t=this.Oi(),s=function(){var n=t[r],a=new Date().getTime();n.data&&D(n.data)&&q(n.data,(o=>{o.offset=Math.abs(o.timestamp-a),delete o.timestamp})),e.Ri(n)};for(var r in t)s()}}),this.Ei))}Fi(){clearTimeout(this.Ni),this.Ni=void 0}Oi(){var e={};return q(this.Ai,(t=>{var s,r=t,n=(r?r.batchKey:null)||r.url;E(e[n])&&(e[n]=y({},r,{data:[]})),(s=e[n].data)==null||s.push(r.data)})),this.Ai=[],e}}var $o=["retriesPerformedSoFar"];class Co{constructor(e){this.Pi=!1,this.Li=3e3,this.Ai=[],this._instance=e,this.Ai=[],this.Di=!0,!E(p)&&"onLine"in p.navigator&&(this.Di=p.navigator.onLine,this.Bi=()=>{this.Di=!0,this.ji()},this.qi=()=>{this.Di=!1},G(p,"online",this.Bi),G(p,"offline",this.qi))}get length(){return this.Ai.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,s=en(e,$o);st(t)&&(s.url=wi(s.url,{retry_count:t})),this._instance._send_request(y({},s,{callback:r=>{r.statusCode===200||r.statusCode>=400&&500>r.statusCode||(t??0)>=10?s.callback==null||s.callback(r):this.Zi(y({retriesPerformedSoFar:t},s))}}))}Zi(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var s=(function(a){var o=3e3*Math.pow(2,a),l=o/2,c=Math.min(18e5,o),u=Math.random()-.5;return Math.ceil(c+u*(c-l))})(t),r=Date.now()+s;this.Ai.push({retryAt:r,requestOptions:e});var n="Enqueued failed request for retry in "+s;navigator.onLine||(n+=" (Browser is offline)"),w.warn(n),this.Pi||(this.Pi=!0,this.$i())}$i(){if(this.Vi&&clearTimeout(this.Vi),this.Ai.length===0)return this.Pi=!1,void(this.Vi=void 0);this.Vi=setTimeout((()=>{this.Di&&this.Ai.length>0&&this.ji(),this.$i()}),this.Li)}ji(){var e=Date.now(),t=[],s=this.Ai.filter((n=>e>n.retryAt||(t.push(n),!1)));if(this.Ai=t,s.length>0)for(var{requestOptions:r}of s)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Vi&&(clearTimeout(this.Vi),this.Vi=void 0),this.Pi=!1,E(p)||(this.Bi&&(p.removeEventListener("online",this.Bi),this.Bi=void 0),this.qi&&(p.removeEventListener("offline",this.qi),this.qi=void 0)),this.Ai))try{this._instance._send_request(y({},e,{transport:"sendBeacon"}))}catch(t){w.error(t)}this.Ai=[]}}class To{constructor(e){this.Hi=()=>{var t,s,r,n;this.zi||(this.zi={});var a=this.scrollElement(),o=this.scrollY(),l=a?Math.max(0,a.scrollHeight-a.clientHeight):0,c=o+((a==null?void 0:a.clientHeight)||0),u=(a==null?void 0:a.scrollHeight)||0;this.zi.lastScrollY=Math.ceil(o),this.zi.maxScrollY=Math.max(o,(t=this.zi.maxScrollY)!==null&&t!==void 0?t:0),this.zi.maxScrollHeight=Math.max(l,(s=this.zi.maxScrollHeight)!==null&&s!==void 0?s:0),this.zi.lastContentY=c,this.zi.maxContentY=Math.max(c,(r=this.zi.maxContentY)!==null&&r!==void 0?r:0),this.zi.maxContentHeight=Math.max(u,(n=this.zi.maxContentHeight)!==null&&n!==void 0?n:0)},this._instance=e}get Ui(){return this._instance.config.scroll_root_selector}getContext(){return this.zi}resetContext(){var e=this.zi;return setTimeout(this.Hi,0),e}startMeasuringScrollPosition(){G(p,"scroll",this.Hi,{capture:!0}),G(p,"scrollend",this.Hi,{capture:!0}),G(p,"resize",this.Hi)}scrollElement(){if(!this.Ui)return p==null?void 0:p.document.documentElement;var e=D(this.Ui)?this.Ui:[this.Ui];for(var t of e){var s=p==null?void 0:p.document.querySelector(t);if(s)return s}}scrollY(){if(this.Ui){var e=this.scrollElement();return e&&e.scrollTop||0}return p&&(p.scrollY||p.pageYOffset||p.document.documentElement.scrollTop)||0}scrollX(){if(this.Ui){var e=this.scrollElement();return e&&e.scrollLeft||0}return p&&(p.scrollX||p.pageXOffset||p.document.documentElement.scrollLeft)||0}}var Oo=i=>Nn(i==null?void 0:i.config.mask_personal_data_properties,i==null?void 0:i.config.custom_personal_data_properties);class yr{constructor(e,t,s,r){this.Yi=n=>{var a=this.Gi();if(!a||a.sessionId!==n){var o={sessionId:n,props:this.Wi(this._instance)};this.Xi.register({[cs]:o})}},this._instance=e,this.Ji=t,this.Xi=s,this.Wi=r||Oo,this.Ji.onSessionId(this.Yi)}Gi(){return this.Xi.props[cs]}getSetOnceProps(){var e,t=(e=this.Gi())==null?void 0:e.props;return t?"r"in t?Hn(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return q(Ms(this.getSetOnceProps()),((t,s)=>{s==="$current_url"&&(s="url"),e["$session_entry_"+Ki(s)]=t})),e}}class Ds{constructor(){this.Ki={}}on(e,t){return this.Ki[e]||(this.Ki[e]=[]),this.Ki[e].push(t),()=>{this.Ki[e]=this.Ki[e].filter((s=>s!==t))}}emit(e,t){for(var s of this.Ki[e]||[])s(t);for(var r of this.Ki["*"]||[])r(e,t)}}var ji=z("[SessionId]");class br{on(e,t){return this.Qi.on(e,t)}constructor(e,t,s){var r;if(this.tr=[],this.er=void 0,this.Qi=new Ds,this.ir=(c,u)=>!(!st(c)||!st(u))&&Math.abs(c-u)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Ee)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Rt=e.config,this.Xi=e.persistence,this.rr=void 0,this.nr=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.sr=t||je,this.ar=s||je;var n=this.Rt.persistence_name||this.Rt.token;if(this._sessionTimeoutMs=1e3*Re(this.Rt.session_idle_timeout_seconds||1800,60,36e3,ji.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.lr(),this.ur="ph_"+n+"_window_id",this.hr="ph_"+n+"_primary_window_exists",this.cr()){var a=ee.Wt(this.ur),o=ee.Wt(this.hr);a&&!o?this.rr=a:ee.Jt(this.ur),ee.Xt(this.hr,!0)}if((r=this.Rt.bootstrap)!=null&&r.sessionID)try{var l=(c=>{var u=this.Rt.bootstrap.sessionID.replace(/-/g,"");if(u.length!==32)throw new Error("Not a valid UUID");if(u[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(u.substring(0,12),16)})();this.dr(this.Rt.bootstrap.sessionID,new Date().getTime(),l)}catch(c){ji.error("Invalid sessionID in bootstrap",c)}this.vr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return E(this.tr)&&(this.tr=[]),this.tr.push(e),this.nr&&e(this.nr,this.rr),()=>{this.tr=this.tr.filter((t=>t!==e))}}cr(){return this.Rt.persistence!=="memory"&&!this.Xi.fi&&ee.Ut()}pr(e){e!==this.rr&&(this.rr=e,this.cr()&&ee.Xt(this.ur,e))}gr(){return this.rr?this.rr:this.cr()?ee.Wt(this.ur):null}dr(e,t,s){e===this.nr&&t===this._sessionActivityTimestamp&&s===this._sessionStartTimestamp||(this._sessionStartTimestamp=s,this._sessionActivityTimestamp=t,this.nr=e,this.Xi.register({[ni]:[t,e,s]}))}mr(){var e=this.Xi.props[ni];return D(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.dr(null,null,null)}destroy(){clearTimeout(this.yr),this.yr=void 0,this.er&&p&&(p.removeEventListener(ci,this.er,{capture:!1}),this.er=void 0),this.tr=[]}vr(){this.er=()=>{this.cr()&&ee.Jt(this.hr)},G(p,ci,this.er,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.Rt.cookieless_mode===Ee)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s=t||new Date().getTime(),[r,n,a]=this.mr(),o=this.gr(),l=st(a)&&Math.abs(s-a)>864e5,c=!1,u=!n,h=!u&&!e&&this.ir(s,r);u||h||l?(n=this.sr(),o=this.ar(),ji.info("new session ID generated",{sessionId:n,windowId:o,changeReason:{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}}),a=s,c=!0):o||(o=this.ar(),c=!0);var d=st(r)&&e&&!l?r:s,v=st(a)?a:new Date().getTime();return this.pr(o),this.dr(n,d,v),e||this.lr(),c&&this.tr.forEach((g=>g(n,o,c?{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}:void 0))),{sessionId:n,windowId:o,sessionStartTimestamp:v,changeReason:c?{noSessionId:u,activityTimeout:h,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:r}}lr(){clearTimeout(this.yr),this.yr=setTimeout((()=>{var[e]=this.mr();if(this.ir(new Date().getTime(),e)){var t=this.nr;this.resetSessionId(),this.Qi.emit("forcedIdleReset",{idleSessionId:t})}}),1.1*this.sessionTimeoutMs)}}var Wn=function(i,e){if(!i)return!1;var t=i.userAgent;if(t&&Ws(t,e))return!0;try{var s=i==null?void 0:i.userAgentData;if(s!=null&&s.brands&&s.brands.some((r=>Ws(r==null?void 0:r.brand,e))))return!0}catch{}return!!i.webdriver},_i=function(i,e){if(!(function(t){try{new RegExp(t)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(i)}catch{return!1}};function wr(i,e,t){return ut({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}var Yn={exact:(i,e)=>e.some((t=>i.some((s=>t===s)))),is_not:(i,e)=>e.every((t=>i.every((s=>t!==s)))),regex:(i,e)=>e.some((t=>i.some((s=>_i(t,s))))),not_regex:(i,e)=>e.every((t=>i.every((s=>!_i(t,s))))),icontains:(i,e)=>e.map(Jt).some((t=>i.map(Jt).some((s=>t.includes(s))))),not_icontains:(i,e)=>e.map(Jt).every((t=>i.map(Jt).every((s=>!t.includes(s))))),gt:(i,e)=>e.some((t=>{var s=parseFloat(t);return!isNaN(s)&&i.some((r=>s>parseFloat(r)))})),lt:(i,e)=>e.some((t=>{var s=parseFloat(t);return!isNaN(s)&&i.some((r=>si.toLowerCase();function Jn(i,e){return!i||Object.entries(i).every((t=>{var[s,r]=t,n=e==null?void 0:e[s];if(E(n)||Oe(n))return!1;var a=[String(n)],o=Yn[r.operator];return!!o&&o(r.values,a)}))}var bs="custom",Er="i.posthog.com",Mo=/^\/static\//;class Ao{constructor(e){this.br={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Er,".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this.br[this.apiHost]||(this.br[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":bs),this.br[this.apiHost]}wr(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof t=="string"&&Mo.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(t===void 0&&(t=""),t&&(t=t[0]==="/"?t:"/"+t),e==="ui")return this.uiHost+t;if(e==="flags")return this.flagsApiHost+t;if(e==="assets"){var s=this.wr(t);if(s)return""+s+t}if(this.region===bs)return this.apiHost+t;var r=Er+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var j=z("[Surveys]"),ws="seenSurvey_",Lo=(i,e)=>{var t="$survey_"+e+"/"+i.id;return i.current_iteration&&i.current_iteration>0&&(t="$survey_"+e+"/"+i.id+"/"+i.current_iteration),t},xr=i=>((e,t)=>{var s=""+ws+t.id;return t.current_iteration&&t.current_iteration>0&&(s=""+ws+t.id+"_"+t.current_iteration),s})(0,i),Do=[Ai.Popover,Ai.Widget,Ai.API],No={ignoreConditions:!1,ignoreDelay:!1,displayType:gs.Popover},Ho=z("[PostHog ExternalIntegrations]"),jo={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class qo{constructor(e){this._instance=e}ni(e,t){var s;(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,e,(r=>{if(r)return Ho.error("failed to load script",r);t()}))}startIfEnabledOrStop(){var e=this,t=function(a){var o,l,c;!r||(o=F.__PosthogExtensions__)!=null&&(o=o.integrations)!=null&&o[a]||e.ni(jo[a],(()=>{var u;(u=F.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[a])==null||u.start(e._instance)})),!r&&(l=F.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[a]&&((c=F.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[a])==null||c.stop())};for(var[s,r]of Object.entries((n=this._instance.config.integrations)!==null&&n!==void 0?n:{})){var n;t(s)}}}var et,At={},qi=0,Es=()=>{},kr='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Et="Surveys module not available",Sr="sanitize_properties is deprecated. Use before_send instead",Kn="Invalid value for property_denylist config: ",at="posthog",Zn=!Ro&&(oe==null?void 0:oe.indexOf("MSIE"))===-1&&(oe==null?void 0:oe.indexOf("Mozilla"))===-1,Pr=i=>{var e;return y({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ro(b==null?void 0:b.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Es,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:i??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Q&&W(Q==null?void 0:Q.search)&&Q.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(p==null||(e=p.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(t){w.error("Bad HTTP status: "+t.statusCode+" "+t.text)},get_device_id:t=>t,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:vs,before_send:void 0,request_queue_config:{flush_interval_ms:ys},error_tracking:{},_onCapture:Es,__preview_eager_load_replay:!1},(t=>({rageclick:!t||"2025-11-30">t||{content_ignorelist:!0},capture_pageview:!t||"2025-05-24">t||"history_change",session_recording:t&&t>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:t&&t>="2026-01-30"?"head":"body",internal_or_test_user_hostname:t&&t>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(i))},Uo=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Rr=i=>{var e={};for(var[t,s]of Uo)E(i[t])||(e[s]=i[t]);var r=B({},e,i);return D(i.property_blacklist)&&(E(i.property_denylist)?r.property_denylist=i.property_blacklist:D(i.property_denylist)?r.property_denylist=[...i.property_blacklist,...i.property_denylist]:w.error(Kn+i.property_denylist)),r};class zo{constructor(){this.__forceAllowLocalhost=!1}get _r(){return this.__forceAllowLocalhost}set _r(e){w.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class ge{Ir(e,t){if(e){var s=this.Cr.indexOf(e);s!==-1&&this.Cr.splice(s,1)}return this.Cr.push(t),t.initialize==null||t.initialize(),t}get decideEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new zo,this.Sr=!1,this.version=ne.LIB_VERSION,this.kr=new Ds,this.Cr=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Pr(),this.SentryIntegration=go,this.sentryIntegration=s=>(function(r,n){var a=On(r,n);return{name:Tn,processEvent:o=>a(o)}})(this,s),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Tr=!1,this.Ar=null,this.Er=null,this.Rr=null,this.scrollManager=new To(this),this.pageViewManager=new ur(this),this.rateLimiter=new wo(this),this.requestRouter=new Ao(this),this.consent=new ho(this),this.externalIntegrations=new qo(this);var t=(e=ge.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(s,r,n)=>{var a=W(s)?{[s]:r}:s;this.setPersonProperties(a),n==null||n({})},set_once:(s,r,n)=>{var a=W(s)?{[s]:r}:s;this.setPersonProperties(void 0,a),n==null||n({})}},this.on("eventCaptured",(s=>w.info('send "'+(s==null?void 0:s.event)+'"',s)))}init(e,t,s){if(s&&s!==at){var r,n=(r=At[s])!==null&&r!==void 0?r:new ge;return n._init(e,t,s),At[s]=n,At[at][s]=n,n}return this._init(e,t,s)}_init(e,t,s){var r,n;if(t===void 0&&(t={}),E(e)||Zt(e))return w.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.Nr(t.debug),this.Mr=t,this.Fr=[],t.person_profiles?this.Er=t.person_profiles:t.process_person&&(this.Er=t.process_person),this.set_config(B({},Pr(t.defaults),Rr(t),{name:s,token:e})),this.config.on_xhr_error&&w.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:ke.GZipJS;var a=this.Or();this.persistence=new Mi(this.config,a),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Mi(y({},this.config,{persistence:"sessionStorage"}),a);var o=y({},this.persistence.props),l=y({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Pr=new Io(($=>this.Lr($)),this.config.request_queue_config),this.Dr=new Co(this),this.__request_queue=[];var c=this.config.cookieless_mode===Ee||this.config.cookieless_mode===$e&&this.consent.isExplicitlyOptedOut();if(c||(this.sessionManager=new br(this),this.sessionPropsManager=new yr(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(w.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Br(c)}),0)):(w.info("Initializing extensions synchronously"),this.Br(c)),ne.DEBUG=ne.DEBUG||this.config.debug,ne.DEBUG&&w.info("Starting in debug mode",{this:this,config:t,thisC:y({},this.config),p:o,s:l}),!this.config.identity_distinct_id||(r=t.bootstrap)!=null&&r.distinctID||(t.bootstrap=y({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((n=t.bootstrap)==null?void 0:n.distinctID)!==void 0){var u=t.bootstrap.distinctID,h=this.get_distinct_id(),d=this.persistence.get_property(be);if(t.bootstrap.isIdentifiedID&&h!=null&&h!==u&&d===Ke)this.identify(u);else if(t.bootstrap.isIdentifiedID&&h!=null&&h!==u&&d===Ze)w.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(je()),g=t.bootstrap.isIdentifiedID?v:u;this.persistence.set_property(be,t.bootstrap.isIdentifiedID?Ze:Ke),this.register({distinct_id:u,$device_id:g})}}if(c)this.register_once({distinct_id:Vt,$device_id:null},"");else if(!this.get_distinct_id()){var f=this.config.get_device_id(je());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(be,Ke)}return G(p,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?(function($,k){var C=$.config.segment;if(!C)return k();(function(R,I){var _=R.config.segment;if(!_)return I();var S=m=>{var P=()=>m.anonymousId()||je();R.config.get_device_id=P,m.id()&&(R.register({distinct_id:m.id(),$device_id:P()}),R.persistence.set_property(be,Ze)),I()},x=_.user();"then"in x&&Ce(x.then)?x.then(S):S(x)})($,(()=>{C.register((R=>{Promise&&Promise.resolve||Oi.warn("This browser does not have Promise support, and can not use the segment integration");var I=(_,S)=>{if(!S)return _;_.event.userId||_.event.anonymousId===R.get_distinct_id()||(Oi.info("No userId set, resetting PostHog"),R.reset()),_.event.userId&&_.event.userId!==R.get_distinct_id()&&(Oi.info("UserId set, identifying with PostHog"),R.identify(_.event.userId));var x=R.calculateEventProperties(S,_.event.properties);return _.event.properties=Object.assign({},x,_.event.properties),_};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:_=>I(_,_.event.event),page:_=>I(_,nt),identify:_=>I(_,Ci),screen:_=>I(_,"$screen")}})($)).then((()=>{k()}))}))})(this,(()=>this.jr())):this.jr(),Ce(this.config._onCapture)&&this.config._onCapture!==Es&&(w.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",($=>this.config._onCapture($.event,$)))),this.config.ip&&w.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Br(e){var t,s,r,n,a,o,l,c=performance.now(),u=y({},ge.__defaultExtensionClasses,this.config.__extensionClasses),h=[];u.featureFlags&&this.Cr.push(this.featureFlags=(t=this.featureFlags)!==null&&t!==void 0?t:new u.featureFlags(this)),u.exceptions&&this.Cr.push(this.exceptions=(s=this.exceptions)!==null&&s!==void 0?s:new u.exceptions(this)),u.historyAutocapture&&this.Cr.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Cr.push(new u.tracingHeaders(this)),u.siteApps&&this.Cr.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Cr.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||h.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),u.autocapture&&this.Cr.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Cr.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new u.surveys(this)),u.logs&&this.Cr.push(this.logs=(n=this.logs)!==null&&n!==void 0?n:new u.logs(this)),u.conversations&&this.Cr.push(this.conversations=(a=this.conversations)!==null&&a!==void 0?a:new u.conversations(this)),u.productTours&&this.Cr.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Cr.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Cr.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Cr.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Cr.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,vo)),u.toolbar&&this.Cr.push(this.toolbar=(o=this.toolbar)!==null&&o!==void 0?o:new u.toolbar(this)),u.experiments&&this.Cr.push(this.experiments=(l=this.experiments)!==null&&l!==void 0?l:new u.experiments(this)),this.Cr.forEach((d=>{d.initialize&&h.push((()=>{d.initialize==null||d.initialize()}))})),h.push((()=>{if(this.qr){var d=this.qr;this.qr=void 0,this.Ci(d)}})),this.Zr(h,c)}Zr(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.Zr(e,t)}),0);var s=e.shift();if(s)try{s()}catch(n){w.error("Error initializing extension:",n)}}var r=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:r}),this.config.__preview_deferred_init_extensions&&w.info("PostHog extensions initialized ("+r+"ms)")}Ci(e){var t;if(!b||!b.body)return w.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ci(e)}),500);this.config.__preview_deferred_init_extensions&&(this.qr=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=M(e.supportedCompression,ke.GZipJS)?ke.GZipJS:M(e.supportedCompression,ke.Base64)?ke.Base64:void 0),(t=e.analytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Er?this.Er:vs}),this.Cr.forEach((s=>s.onRemoteConfig==null?void 0:s.onRemoteConfig(e)))}jr(){try{this.config.loaded(this)}catch(s){w.critical("`loaded` function failed",s)}if(this.$r(),this.config.internal_or_test_user_hostname&&Q!=null&&Q.hostname){var e=Q.hostname,t=this.config.internal_or_test_user_hostname;(typeof t=="string"?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode===Ee)&&this.Vr()}),1),this.Hr=new qn(this),this.Hr.load()}$r(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Pr)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Bt(this.__request_queue,(e=>this.Lr(e))),this.__request_queue=[],this.$r()}_handle_unload(){var e,t,s,r;(e=this.surveys)==null||e.handlePageUnload(),this.config.request_batching?(this.zr()&&this.capture($i),(t=this.logs)==null||t.flushLogs("sendBeacon"),(s=this.Pr)==null||s.unload(),(r=this.Dr)==null||r.unload()):this.zr()&&this.capture($i,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(Zn?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=wi(e.url,{ip:this.config.ip?1:0}),e.headers=y({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(t=>{var s,r,n,a=y({},t);a.timeout=a.timeout||6e4,a.url=mr(a.url,a.compression);var o=(s=a.transport)!==null&&s!==void 0?s:"fetch",l=ti.filter((u=>!a.disableTransport||!u.transport||!a.disableTransport.includes(u.transport))),c=(r=(n=(function(u,h){for(var d=0;u.length>d;d++)if(u[d].transport===o)return u[d]})(l))==null?void 0:n.method)!==null&&r!==void 0?r:l[0].method;if(!c)throw new Error("No available transport method");o!=="sendBeacon"&&a.data&&a.compression===ke.GZipJS&&_a&&!_r?Fo(a).then((u=>{c(u)})).catch((u=>{if((h=>!(!h||typeof h!="object")&&("name"in h?String(h.name):"")==="NotReadableError")(u))return _r=!0,void c(y({},a,{compression:void 0,url:mr(t.url,void 0)}));c(a)})):c(a)})(y({},e,{callback:t=>{var s,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||(s=(r=this.config).on_request_error)==null||s.call(r,t),e.callback==null||e.callback(t)}}))))}Lr(e){this.Dr?this.Dr.retriableRequest(e):this._send_request(e)}_execute_array(e){qi++;try{var t,s=[],r=[],n=[];Bt(e,(o=>{o&&(D(t=o[0])?n.push(o):Ce(o)?o.call(this):D(o)&&t==="alias"?s.push(o):D(o)&&t.indexOf("capture")!==-1&&Ce(this[t])?n.push(o):r.push(o))}));var a=function(o,l){Bt(o,(function(c){if(D(c[0])){var u=l;q(c,(function(h){u=u[h[0]].apply(u,h.slice(1))}))}else l[c[0]].apply(l,c.slice(1))}))};a(s,this),a(r,this),a(n,this)}finally{qi--}}push(e){if(qi>0&&D(e)&&W(e[0])){var t=ge.prototype[e[0]];Ce(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,s){var r,n,a,o,l;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Pr){if(this.is_capturing())if(!E(e)&&W(e)){var c=!this.config.opt_out_useragent_filter&&this._is_bot();if(!c||this.config.__preview_capture_bot_pageviews){var u=s!=null&&s.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(u==null||!u.isRateLimited){t!=null&&t.$current_url&&!W(t==null?void 0:t.$current_url)&&(w.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!=="$exception"||s!=null&&s.Ur||w.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var h=new Date,d=(s==null?void 0:s.timestamp)||h,v=je(),g={uuid:v,event:e,properties:this.calculateEventProperties(e,t||{},d,v)};e===nt&&this.config.__preview_capture_bot_pageviews&&c&&(g.event="$bot_pageview",g.properties.$browser_type="bot"),u&&(g.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),s!=null&&s.$set&&(g.$set=s==null?void 0:s.$set);var f,$=this.Yr(s==null?void 0:s.$set_once,e!==nr,e===Ci);if($&&(g.$set_once=$),s!=null&&s._noTruncate||(n=this.config.properties_string_max_length,a=g,o=x=>W(x)?x.slice(0,n):x,l=new Set,g=(function x(m,P){return m!==Object(m)?o?o(m):m:l.has(m)?void 0:(l.add(m),D(m)?(T=[],Bt(m,(O=>{T.push(x(O))}))):(T={},q(m,((O,A)=>{l.has(O)||(T[A]=x(O))}))),T);var T})(a)),g.timestamp=d,E(s==null?void 0:s.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=h),e===Ct.DISMISSED||e===Ct.SENT){var k=t==null?void 0:t[Li.SURVEY_ID],C=t==null?void 0:t[Li.SURVEY_ITERATION];f={id:k,current_iteration:C},localStorage.getItem(xr(f))||localStorage.setItem(xr(f),"true"),g.$set=y({},g.$set,{[Lo({id:k,current_iteration:C},e===Ct.SENT?"responded":"dismissed")]:!0})}else e===Ct.SHOWN&&(g.$set=y({},g.$set,{[Li.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===bo.SHOWN){var R=t==null?void 0:t[hr.TOUR_TYPE];R&&(g.$set=y({},g.$set,{[hr.TOUR_LAST_SEEN_DATE+"/"+R]:new Date().toISOString()}))}var I=y({},g.properties.$set,g.$set);if(ot(I)||this.setPersonPropertiesForFlags(I),!L(this.config.before_send)){var _=this.Gr(g);if(!_)return;g=_}this.kr.emit("eventCaptured",g);var S={method:"POST",url:(r=s==null?void 0:s._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:g,compression:"best-available",batchKey:s==null?void 0:s._batchKey};return!this.config.request_batching||s&&(s==null||!s._batchKey)||s!=null&&s.send_instantly?this.Lr(S):this.Pr.enqueue(S),g}w.critical("This capture call is ignored due to client rate limiting.")}}else w.error("No event name provided to posthog.capture")}else w.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(t=>e(t.event,t)))}calculateEventProperties(e,t,s,r,n){if(s=s||new Date,!this.persistence||!this.sessionPersistence)return t;var a=n?void 0:this.persistence.remove_event_timer(e),o=y({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,(this.config.cookieless_mode==Ee||this.config.cookieless_mode==$e&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),e==="$snapshot"){var l=y({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!W(o.distinct_id)&&!xe(o.distinct_id)||Zt(o.distinct_id))&&w.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var c,u=(function(k,C){var R,I,_,S;if(!oe)return{};var x,m,P,T,O,A,H,N,Y=k?[...gt,...C||[]]:[],[Z,ae]=(function(V){for(var ie=0;Ks.length>ie;ie++){var[de,pe]=Ks[ie],Fe=de.exec(V),ue=Fe&&(Ce(pe)?pe(Fe,V):pe);if(ue)return ue}return["",""]})(oe);return B(Ms({$os:Z,$os_version:ae,$browser:wn(oe,navigator.vendor),$device:Zs(oe),$device_type:(m=oe,P={userAgentDataPlatform:(R=navigator)==null||(R=R.userAgentData)==null?void 0:R.platform,maxTouchPoints:(I=navigator)==null?void 0:I.maxTouchPoints,screenWidth:p==null||(_=p.screen)==null?void 0:_.width,screenHeight:p==null||(S=p.screen)==null?void 0:S.height,devicePixelRatio:p==null?void 0:p.devicePixelRatio},N=Zs(m),N===on||N===an||N==="Kobo"||N==="Kindle Fire"||N===bn?dt:N===Dt||N===ht||N===Nt||N===Qi?"Console":N===un?"Wearable":N?he:(P==null?void 0:P.userAgentDataPlatform)==="Android"&&((T=P==null?void 0:P.maxTouchPoints)!==null&&T!==void 0?T:0)>0?600>Math.min((O=P==null?void 0:P.screenWidth)!==null&&O!==void 0?O:0,(A=P==null?void 0:P.screenHeight)!==null&&A!==void 0?A:0)/((H=P==null?void 0:P.devicePixelRatio)!==null&&H!==void 0?H:1)?he:dt:"Desktop"),$timezone:jn(),$timezone_offset:mo()}),{$current_url:Ht(Q==null?void 0:Q.href,Y,jt),$host:Q==null?void 0:Q.host,$pathname:Q==null?void 0:Q.pathname,$raw_user_agent:oe.length>1e3?oe.substring(0,997)+"...":oe,$browser_version:Oa(oe,navigator.vendor),$browser_language:cr(),$browser_language_prefix:(x=cr(),typeof x=="string"?x.split("-")[0]:void 0),$screen_height:p==null?void 0:p.screen.height,$screen_width:p==null?void 0:p.screen.width,$viewport_height:p==null?void 0:p.innerHeight,$viewport_width:p==null?void 0:p.innerWidth,$lib:ne.LIB_NAME,$lib_version:ne.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(n,s.getTime());o.$session_id=h,o.$window_id=d}this.sessionPropsManager&&B(o,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&B(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=(v=this.Dr)==null?void 0:v.length}catch(k){o.$sdk_debug_error_capturing_properties=String(k)}if(this.requestRouter.region===bs&&(o.$lib_custom_api_host=this.config.api_host),c=e!==nt||n?e!==$i||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(s):this.pageViewManager.doPageView(s,r),o=B(o,c),e===nt&&b&&(o.title=b.title),!E(a)){var g=s.getTime()-a;o.$duration=parseFloat((g/1e3).toFixed(3))}oe&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=B({},u,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),D(this.config.property_denylist)?q(this.config.property_denylist,(function(k){delete o[k]})):w.error(Kn+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(w.error(Sr),o=f(o,e));var $=this.Wr();return o.$process_person_profile=$,$&&!n&&this.Xr("_calculate_event_properties"),o}Yr(e,t,s){var r;if(t===void 0&&(t=!0),s===void 0&&(s=!1),!this.persistence||!this.Wr()||this.Sr&&!s)return e;var n=this.persistence.get_initial_props(),a=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),o=B({},n,a||{},e||{}),l=this.config.sanitize_properties;return l&&(w.error(Sr),o=l(o,"$set_once")),t&&(this.Sr=!0),ot(o)?void 0:o}register(e,t){var s;(s=this.persistence)==null||s.register(e,t)}register_once(e,t,s){var r;(r=this.persistence)==null||r.register_once(e,t,s)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}Jr(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return(t=this.featureFlags)==null?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var s;return(s=this.featureFlags)==null?void 0:s.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var s;return(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,s){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,s)}updateEarlyAccessFeatureEnrollment(e,t,s){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,s)}getEarlyAccessFeatures(e,t,s){var r;return t===void 0&&(t=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(e,t,s)}on(e,t){return this.kr.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Et}),()=>{})}onSessionId(e){var t,s;return(t=(s=this.sessionManager)==null?void 0:s.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:Et})}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:Et})}renderSurvey(e,t){var s;(s=this.surveys)==null||s.renderSurvey(e,t)}displaySurvey(e,t){var s;t===void 0&&(t=No),(s=this.surveys)==null||s.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,s;return(t=(s=this.surveys)==null?void 0:s.canRenderSurvey(e))!==null&&t!==void 0?t:{visible:!1,disabledReason:Et}}canRenderSurveyAsync(e,t){var s,r;return t===void 0&&(t=!1),(s=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(e,t))!==null&&s!==void 0?s:Promise.resolve({visible:!1,disabledReason:Et})}Kr(e){return!e||Zt(e)?(w.critical("Unique user id has not been set in posthog.identify"),!1):e===Vt?(w.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(w.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,s){if(!this.__loaded||!this.persistence)return w.uninitializedWarning("posthog.identify");if(xe(e)&&(e=e.toString(),w.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Kr(e)&&this.Xr("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(ri)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(Pt)&&(this.unregister(Pt),this.register({distinct_id:e}));var n,a=(this.persistence.get_property(be)||Ke)===Ke;e!==r&&a?(this.persistence.set_property(be,Ze),this.setPersonPropertiesForFlags({$set:t||{},$set_once:s||{}},!1),this.capture(Ci,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:s||{}}),this.Rr=wr(e,t,s),(n=this.featureFlags)==null||n.setAnonymousDistinctId(r)):(t||s)&&this.setPersonProperties(t,s),e!==r&&(this.reloadFeatureFlags(),this.unregister(Ot))}}setPersonProperties(e,t){if((e||t)&&this.Xr("posthog.setPersonProperties")){var s=wr(this.get_distinct_id(),e,t);this.Rr!==s?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Rr=s):w.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,s){if(e&&t){var r=this.getGroups(),n=r[e]!==t;if(n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:y({},r,{[e]:t})}),n||s){var a={$group_type:e,$group_key:t};s&&(a.$group_set=s),this.capture(nr,a)}s&&this.setGroupPropertiesForFlags({[e]:s}),n&&!s&&this.reloadFeatureFlags()}else w.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var s;t===void 0&&(t=!0),(s=this.featureFlags)==null||s.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;(e=this.featureFlags)==null||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var s;t===void 0&&(t=!0),this.Xr("posthog.setGroupPropertiesForFlags")&&((s=this.featureFlags)==null||s.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){var t,s,r,n,a,o,l,c;if(w.info("reset"),!this.__loaded)return w.uninitializedWarning("posthog.reset");var u=this.get_property(ri);if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(s=this.sessionPersistence)==null||s.clear(),(r=this.surveys)==null||r.reset(),(n=this.Hr)==null||n.stop(),(a=this.featureFlags)==null||a.reset(),(o=this.conversations)==null||o.reset(),(l=this.persistence)==null||l.set_property(be,Ke),(c=this.sessionManager)==null||c.resetSessionId(),this.Rr=null,this.config.cookieless_mode===Ee)this.register_once({distinct_id:Vt,$device_id:null},"");else{var h=this.config.get_device_id(je());this.register_once({distinct_id:h,$device_id:e?h:u},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var s;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(s=this.conversations)==null||s.Qr()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)==null?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:s}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(e!=null&&e.withTimestamp&&s){var n,a=(n=e.timestampLookBack)!==null&&n!==void 0?n:10;if(!s)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-s)/1e3)-a,0)}return r}alias(e,t){return e===this.get_property(Sn)?(w.critical("Attempting to create alias for existing People user - aborting."),-2):this.Xr("posthog.alias")?(E(t)&&(t=this.get_distinct_id()),e!==t?(this.Jr(Pt,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(w.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=y({},this.config);if(J(e)){var s,r,n,a,o,l,c,u,h;B(this.config,Rr(e));var d=this.Or();(s=this.persistence)==null||s.update_config(this.config,t,d),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Mi(y({},this.config,{persistence:"sessionStorage"}),d);var v=this.Nr(this.config.debug);Pe(v)&&(this.config.debug=v),Pe(this.config.debug)&&(this.config.debug?(ne.DEBUG=!0,X.Ut()&&X.Xt("ph_debug",!0),w.info("set_config",{config:e,oldConfig:t,newConfig:y({},this.config)})):(ne.DEBUG=!1,X.Ut()&&X.Jt("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),(a=this.autocapture)==null||a.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(c=this.deadClicksAutocapture)==null||c.startIfEnabledOrStop(),(u=this.surveys)==null||u.loadIfEnabled(),this.en(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){ne.LIB_NAME=e,ne.LIB_VERSION=t}startSessionRecording(e){var t,s,r,n,a,o=e===!0,l={sampling:o||!(e==null||!e.sampling),linked_flag:o||!(e==null||!e.linked_flag),url_trigger:o||!(e==null||!e.url_trigger),event_trigger:o||!(e==null||!e.event_trigger)};Object.values(l).some(Boolean)&&((t=this.sessionManager)==null||t.checkAndGetSessionAndWindowId(),l.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),l.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),l.url_trigger&&((n=this.sessionRecording)==null||n.overrideTrigger("url")),l.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){if(this.exceptions){var s=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:s});return this.exceptions.sendExceptionEvent(y({},r,t))}}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){var e,t;return(e=(t=this.logs)==null?void 0:t.logger)!==null&&e!==void 0?e:ge.rn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,s;return(t=(s=this.toolbar)==null?void 0:s.loadToolbar(e))!==null&&t!==void 0&&t}get_property(e){var t;return(t=this.persistence)==null?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)==null?void 0:t.props[e]}toString(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:at;return t!==at&&(t=at+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)==null?void 0:e.get_property(be))===Ze||((t=this.sessionPersistence)==null?void 0:t.get_property(be))===Ze}Wr(){var e,t;return!(this.config.person_profiles==="never"||this.config.person_profiles===vs&&!this._isIdentified()&&ot(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Pt])&&((t=this.persistence)==null||(t=t.props)==null||!t[li]))}zr(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Wr()||this.Xr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Xr("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Xr(e){return this.config.person_profiles==="never"?(w.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Jr(li,!0),!0)}Or(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==$e)}en(){var e,t,s,r,n=this.Or();return((e=this.persistence)==null?void 0:e.fi)!==n&&((s=this.persistence)==null||s.set_disabled(n)),((t=this.sessionPersistence)==null?void 0:t.fi)!==n&&((r=this.sessionPersistence)==null||r.set_disabled(n)),n}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==Ee){if(this.config.cookieless_mode===$e&&this.consent.isExplicitlyOptedOut()){var s,r,n,a,o;this.reset(!0),(s=this.sessionManager)==null||s.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new br(this),this.pageViewManager=new ur(this),this.persistence&&(this.sessionPropsManager=new yr(this,this.sessionManager,this.persistence));var l=(n=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&n!==void 0?n:(o=ge.__defaultExtensionClasses)==null?void 0:o.sessionRecording;l&&(this.sessionRecording=this.Ir(this.sessionRecording,new l(this)))}var c,u;this.consent.optInOut(!0),this.en(),this.$r(),(t=this.sessionRecording)==null||t.startIfEnabledOrStop(),this.config.cookieless_mode==$e&&((c=this.surveys)==null||c.loadIfEnabled()),(E(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((u=e==null?void 0:e.captureEventName)!==null&&u!==void 0?u:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vr()}else w.warn(kr)}opt_out_capturing(){var e,t,s;this.config.cookieless_mode!==Ee?(this.config.cookieless_mode===$e&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.en(),this.config.cookieless_mode===$e&&(this.register({distinct_id:Vt,$device_id:null}),(e=this.sessionManager)==null||e.destroy(),(t=this.pageViewManager)==null||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(s=this.sessionRecording)==null||s.stopRecording(),this.sessionRecording=void 0,this.Vr())):w.warn(kr)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Ee||(this.config.cookieless_mode===$e?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.en()}_is_bot(){return ce?Wn(ce,this.config.custom_blocked_useragents):void 0}Vr(){b&&(b.visibilityState==="visible"?this.Tr||(this.Tr=!0,this.capture(nt,{title:b.title},{send_instantly:!0}),this.Ar&&(b.removeEventListener(ui,this.Ar),this.Ar=null)):this.Ar||(this.Ar=this.Vr.bind(this),G(b,ui,this.Ar)))}debug(e){e===!1?(p==null||p.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(p==null||p.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}ki(){var e,t,s,r,n,a,o=this.Mr||{};return"advanced_disable_flags"in o?!!o.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(w.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(s="advanced_disable_decide",r=w,n=(t="advanced_disable_flags")in(e=o)&&!L(e[t]),a=s in e&&!L(e[s]),n?e[t]:!!a&&(r&&r.warn("Config field '"+s+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[s]))}Gr(e){if(L(this.config.before_send))return e;var t=D(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var r of t){if(s=r(s),L(s)){var n="Event '"+e.event+"' was rejected in beforeSend function";return wa(e.event)?w.warn(n+". This can cause unexpected behavior."):w.info(n),null}s.properties&&!ot(s.properties)||w.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return s}getPageViewId(){var e;return(e=this.pageViewManager.ai)==null?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,s){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(s)})}Nr(e){var t=Pe(e)&&!e,s=X.Ut()&&X.Gt("ph_debug")==="true";return!t&&(!!s||e)}}function Fr(i){return i instanceof Element&&(i.id===In||!(i.closest==null||!i.closest(".toolbar-global-fade-container")))}function Ei(i){return!!i&&i.nodeType===1}function Ue(i,e){return!!i&&!!i.tagName&&i.tagName.toLowerCase()===e.toLowerCase()}function Qn(i){return!!i&&i.nodeType===3}function ea(i){return!!i&&i.nodeType===11}function Ns(i){return i?yi(i).split(/\s+/):[]}function Ir(i){var e=p==null?void 0:p.location.href;return!!(e&&i&&i.some((t=>e.match(t))))}function mi(i){var e="";switch(typeof i.className){case"string":e=i.className;break;case"object":e=(i.className&&"baseVal"in i.className?i.className.baseVal:null)||i.getAttribute("class")||"";break;default:e=""}return Ns(e)}function ta(i){return L(i)?null:yi(i).split(/(\s+)/).filter((e=>Lt(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function qt(i){var e="";return ks(i)&&!sa(i)&&i.childNodes&&i.childNodes.length&&q(i.childNodes,(function(t){var s;Qn(t)&&t.textContent&&(e+=(s=ta(t.textContent))!==null&&s!==void 0?s:"")})),yi(e)}function $r(i){return E(i.target)?i.srcElement||null:(e=i.target)!=null&&e.shadowRoot?i.composedPath()[0]||null:i.target||null;var e}ge.__defaultExtensionClasses={},ge.rn={trace:et=()=>{},debug:et,info:et,warn:et,error:et,fatal:et},(function(i,e){for(var t=0;e.length>t;t++)i.prototype[e[t]]=io(i.prototype[e[t]])})(ge,["identify"]);var Hs=["a","button","form","input","select","textarea","label"];function Cr(i,e){if(E(e))return!0;var t,s=function(n){if(e.some((a=>n.matches(a))))return{v:!0}};for(var r of i)if(t=s(r))return t.v;return!1}function ia(i){var e=i.parentNode;return!(!e||!Ei(e))&&e}var Xo=["next","previous","prev",">","<"],Tr=[".ph-no-rageclick",".ph-no-capture"],xs=i=>!i||Ue(i,"html")||!Ei(i),Or=(i,e)=>{if(!p||xs(i))return{parentIsUsefulElement:!1,targetElementList:[]};for(var t=!1,s=[i],r=i;r.parentNode&&!Ue(r,"body");)if(ea(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var n=ia(r);if(!n)break;if(e||Hs.indexOf(n.tagName.toLowerCase())>-1)t=!0;else{var a=p.getComputedStyle(n);a&&a.getPropertyValue("cursor")==="pointer"&&(t=!0)}s.push(n),r=n}return{parentIsUsefulElement:t,targetElementList:s}};function ks(i){for(var e=i;e.parentNode&&!Ue(e,"body");e=e.parentNode){var t=mi(e);if(M(t,"ph-sensitive")||M(t,"ph-no-capture"))return!1}if(M(mi(i),"ph-include"))return!0;var s=i.type||"";if(W(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=i.name||i.id||"";return!W(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function sa(i){return!!(Ue(i,"input")&&!["button","checkbox","submit","reset"].includes(i.type)||Ue(i,"select")||Ue(i,"textarea")||i.getAttribute("contenteditable")==="true")}var ra="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Vo=new RegExp("^(?:"+ra+")$"),Bo=new RegExp(ra),na="\\d{3}-?\\d{2}-?\\d{4}",Go=new RegExp("^("+na+")$"),Wo=new RegExp("("+na+")");function Lt(i,e){return e===void 0&&(e=!0),!(L(i)||W(i)&&(i=yi(i),(e?Vo:Bo).test((i||"").replace(/[- ]/g,""))||(e?Go:Wo).test(i)))}function Mr(i){var e=qt(i);return Lt(e=(e+" "+aa(i)).trim())?e:""}function aa(i){var e="";return i&&i.childNodes&&i.childNodes.length&&q(i.childNodes,(function(t){var s;if(t&&((s=t.tagName)==null?void 0:s.toLowerCase())==="span")try{var r=qt(t);e=(e+" "+r).trim(),t.childNodes&&t.childNodes.length&&(e=(e+" "+aa(t)).trim())}catch(n){w.error("[AutoCapture]",n)}})),e}function Ar(i){return i.replace(/"|\\"/g,'\\"')}function Yo(i){var e=i.attr__class;return e?D(e)?e:Ns(e):void 0}class Lr{constructor(e){this.disabled=e===!1;var t=J(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,s){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)s-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:s}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:s}];return!1}}var Ui="$copy_autocapture",Dr=z("[AutoCapture]");function zi(i,e){return e.length>i?e.slice(0,i)+"...":e}function Jo(i){if(i.previousElementSibling)return i.previousElementSibling;var e=i;do e=e.previousSibling;while(e&&!Ei(e));return e}function Ko(i,e){for(var t,s,{e:r,maskAllElementAttributes:n,maskAllText:a,elementAttributeIgnoreList:o,elementsChainAsString:l}=e,c=[i],u=i;u.parentNode&&!Ue(u,"body");)ea(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var h,d,v=[],g={},f=!1,$=!1;if(q(c,(_=>{var S=ks(_);_.tagName.toLowerCase()==="a"&&(f=_.getAttribute("href"),f=S&&f&&Lt(f)&&f),M(mi(_),"ph-no-capture")&&($=!0),v.push((function(m,P,T,O){var A=m.tagName.toLowerCase(),H={tag_name:A};Hs.indexOf(A)>-1&&!T&&(H.$el_text=A.toLowerCase()==="a"||A.toLowerCase()==="button"?zi(1024,Mr(m)):zi(1024,qt(m)));var N=mi(m);N.length>0&&(H.classes=N.filter((function(V){return V!==""}))),q(m.attributes,(function(V){var ie;if((!sa(m)||["name","id","class","aria-label"].indexOf(V.name)!==-1)&&(O==null||!O.includes(V.name))&&!P&&Lt(V.value)&&(!W(ie=V.name)||ie.substring(0,10)!=="_ngcontent"&&ie.substring(0,7)!=="_nghost")){var de=V.value;V.name==="class"&&(de=Ns(de).join(" ")),H["attr__"+V.name]=zi(1024,de)}}));for(var Y=1,Z=1,ae=m;ae=Jo(ae);)Y++,ae.tagName===m.tagName&&Z++;return H.nth_child=Y,H.nth_of_type=Z,H})(_,n,a,o));var x=(function(m){if(!ks(m))return{};var P={};return q(m.attributes,(function(T){if(T.name&&T.name.indexOf("data-ph-capture-attribute")===0){var O=T.name.replace("data-ph-capture-attribute-",""),A=T.value;O&&A&&Lt(A)&&(P[O]=A)}})),P})(_);B(g,x)})),$)return{props:{},explicitNoCapture:$};if(a||(v[0].$el_text=i.tagName.toLowerCase()==="a"||i.tagName.toLowerCase()==="button"?Mr(i):qt(i)),f){var k,C;v[0].attr__href=f;var R=(k=di(f))==null?void 0:k.host,I=p==null||(C=p.location)==null?void 0:C.host;R&&I&&R!==I&&(h=f)}return{props:B({$event_type:r.type,$ce_version:1},l?{}:{$elements:v},{$elements_chain:(d=v,(function(_){return _.map((S=>{var x,m,P="";if(S.tag_name&&(P+=S.tag_name),S.attr_class)for(var T of(S.attr_class.sort(),S.attr_class))P+="."+T.replace(/"/g,"");var O=y({},S.text?{text:S.text}:{},{"nth-child":(x=S.nth_child)!==null&&x!==void 0?x:0,"nth-of-type":(m=S.nth_of_type)!==null&&m!==void 0?m:0},S.href?{href:S.href}:{},S.attr_id?{attr_id:S.attr_id}:{},S.attributes),A={};return ei(O).sort(((H,N)=>{var[Y]=H,[Z]=N;return Y.localeCompare(Z)})).forEach((H=>{var[N,Y]=H;return A[Ar(N.toString())]=Ar(Y.toString())})),(P+=":")+ei(A).map((H=>{var[N,Y]=H;return N+'="'+Y+'"'})).join("")})).join(";")})((function(_){return _.map((S=>{var x,m,P={text:(x=S.$el_text)==null?void 0:x.slice(0,400),tag_name:S.tag_name,href:(m=S.attr__href)==null?void 0:m.slice(0,2048),attr_class:Yo(S),attr_id:S.attr__id,nth_child:S.nth_child,nth_of_type:S.nth_of_type,attributes:{}};return ei(S).filter((T=>{var[O]=T;return O.indexOf("attr__")===0})).forEach((T=>{var[O,A]=T;return P.attributes[O]=A})),P}))})(d)))},(t=v[0])!=null&&t.$el_text?{$el_text:(s=v[0])==null?void 0:s.$el_text}:{},h&&r.type==="click"?{$external_click_url:h}:{},g)}}var xt=z("[ExceptionAutocapture]");function Nr(i,e,t){try{if(!(e in i))return()=>{};var s=i[e],r=t(s);return Ce(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),i[e]=r,()=>{i[e]=s}}catch{return()=>{}}}var Zo=z("[TracingHeaders]"),Le=z("[Web Vitals]"),Hr=9e5,jr="disabled",qr="lazy_loading",kt="awaiting_config",Kt="missing_config";z("[SessionRecording]"),z("[SessionRecording]");var Ss="[SessionRecording]",De=z(Ss),Qo=z("[Heatmaps]");function Ur(i){return J(i)&&"clientX"in i&&"clientY"in i&&xe(i.clientX)&&xe(i.clientY)}var zr=z("[Product Tours]"),el=["$set_once","$set"],Ne=z("[SiteApps]"),Xr="Error while initializing PostHog app with config id ";function tt(i,e,t){if(L(i))return!1;switch(t){case"exact":return i===e;case"contains":var s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(s,"i").test(i);case"regex":try{return new RegExp(e).test(i)}catch{return!1}default:return!1}}class tl{constructor(e){this.nn=new Ds,this.sn=(t,s)=>this.an(t,s)&&this.ln(t,s)&&this.un(t,s)&&this.hn(t,s),this.an=(t,s)=>s==null||!s.event||(t==null?void 0:t.event)===(s==null?void 0:s.event),this._instance=e,this.cn=new Set,this.dn=new Set}init(){var e,t;E((e=this._instance)==null?void 0:e._addCaptureHook)||(t=this._instance)==null||t._addCaptureHook(((s,r)=>{this.on(s,r)}))}register(e){var t,s;if(!E((t=this._instance)==null?void 0:t._addCaptureHook)&&(e.forEach((a=>{var o,l;(o=this.dn)==null||o.add(a),(l=a.steps)==null||l.forEach((c=>{var u;(u=this.cn)==null||u.add((c==null?void 0:c.event)||"")}))})),(s=this._instance)!=null&&s.autocapture)){var r,n=new Set;e.forEach((a=>{var o;(o=a.steps)==null||o.forEach((l=>{l!=null&&l.selector&&n.add(l==null?void 0:l.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(n)}}on(e,t){var s;t!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(t==null?void 0:t.event))&&this.dn&&((s=this.dn)==null?void 0:s.size)>0&&this.dn.forEach((r=>{this.vn(t,r)&&this.nn.emit("actionCaptured",r.name)}))}fn(e){this.onAction("actionCaptured",(t=>e(t)))}vn(e,t){if((t==null?void 0:t.steps)==null)return!1;for(var s of t.steps)if(this.sn(e,s))return!0;return!1}onAction(e,t){return this.nn.on(e,t)}ln(e,t){if(t!=null&&t.url){var s,r=e==null||(s=e.properties)==null?void 0:s.$current_url;if(!r||typeof r!="string"||!tt(r,t.url,t.url_matching||"contains"))return!1}return!0}un(e,t){return!!this.pn(e,t)&&!!this.gn(e,t)&&!!this.mn(e,t)}pn(e,t){var s;if(t==null||!t.href)return!0;var r=this.yn(e);if(r.length>0)return r.some((o=>tt(o.href,t.href,t.href_matching||"exact")));var n,a=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";return!!a&&tt((n=a.match(/(?::|")href="(.*?)"/))?n[1]:"",t.href,t.href_matching||"exact")}gn(e,t){var s;if(t==null||!t.text)return!0;var r=this.yn(e);if(r.length>0)return r.some((c=>tt(c.text,t.text,t.text_matching||"exact")||tt(c.$el_text,t.text,t.text_matching||"exact")));var n,a,o,l=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";return!!l&&(n=(function(c){for(var u,h=[],d=/(?::|")text="(.*?)"/g;!L(u=d.exec(c));)h.includes(u[1])||h.push(u[1]);return h})(l),a=t.text,o=t.text_matching||"exact",n.some((c=>tt(c,a,o))))}mn(e,t){var s,r;if(t==null||!t.selector)return!0;var n=e==null||(s=e.properties)==null?void 0:s.$element_selectors;if(n!=null&&n.includes(t.selector))return!0;var a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";if(t.selector_regex&&a)try{return new RegExp(t.selector_regex).test(a)}catch{return!1}return!1}yn(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e==null?void 0:e.properties.$elements}hn(e,t){return t==null||!t.properties||t.properties.length===0||Jn(t.properties.reduce(((s,r)=>{var n=D(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return s[r.key]={values:n,operator:r.operator||"exact"},s}),{}),e==null?void 0:e.properties)}}class il{constructor(e){this._instance=e,this.bn=new Map,this.wn=new Map,this._n=new Map}In(e,t){return!!e&&Jn(e.propertyFilters,t==null?void 0:t.properties)}Cn(e,t){var s=new Map;return e.forEach((r=>{var n;(n=r.conditions)==null||(n=n[t])==null||(n=n.values)==null||n.forEach((a=>{if(a!=null&&a.name){var o=s.get(a.name)||[];o.push(r.id),s.set(a.name,o)}}))})),s}Sn(e,t,s){var r=(s===mt.Activation?this.bn:this.wn).get(e),n=[];return this.kn((a=>{n=a.filter((o=>r==null?void 0:r.includes(o.id)))})),n.filter((a=>{var o,l=(o=a.conditions)==null||(o=o[s])==null||(o=o.values)==null?void 0:o.find((c=>c.name===e));return this.In(l,t)}))}register(e){var t;E((t=this._instance)==null?void 0:t._addCaptureHook)||(this.xn(e),this.Tn(e))}Tn(e){var t=e.filter((s=>{var r,n;return((r=s.conditions)==null?void 0:r.actions)&&((n=s.conditions)==null||(n=n.actions)==null||(n=n.values)==null?void 0:n.length)>0}));t.length!==0&&(this.An==null&&(this.An=new tl(this._instance),this.An.init(),this.An.fn((s=>{this.onAction(s)}))),t.forEach((s=>{var r,n,a,o,l;s.conditions&&(r=s.conditions)!=null&&r.actions&&(n=s.conditions)!=null&&(n=n.actions)!=null&&n.values&&((a=s.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((o=this.An)==null||o.register(s.conditions.actions.values),(l=s.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((c=>{if(c&&c.name){var u=this._n.get(c.name);u&&u.push(s.id),this._n.set(c.name,u||[s.id])}})))})))}xn(e){var t,s=e.filter((n=>{var a,o;return((a=n.conditions)==null?void 0:a.events)&&((o=n.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})),r=e.filter((n=>{var a,o;return((a=n.conditions)==null?void 0:a.cancelEvents)&&((o=n.conditions)==null||(o=o.cancelEvents)==null||(o=o.values)==null?void 0:o.length)>0}));s.length===0&&r.length===0||((t=this._instance)==null||t._addCaptureHook(((n,a)=>{this.onEvent(n,a)})),this.bn=this.Cn(e,mt.Activation),this.wn=this.Cn(e,mt.Cancellation))}onEvent(e,t){var s,r=this.re(),n=this.En(),a=this.Rn(),o=((s=this._instance)==null||(s=s.persistence)==null?void 0:s.props[n])||[];if(a===e&&t&&o.length>0){var l,c;r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var u=(t==null||(l=t.properties)==null?void 0:l.$survey_id)||(t==null||(c=t.properties)==null?void 0:c.$product_tour_id);if(u){var h=o.indexOf(u);0>h||(o.splice(h,1),this.Nn(o))}}else{if(this.wn.has(e)){var d=this.Sn(e,t,mt.Cancellation);d.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map((g=>g.id))}),d.forEach((g=>{var f=o.indexOf(g.id);0>f||o.splice(f,1),this.Mn(g.id)})),this.Nn(o))}if(this.bn.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.bn.get(e)});var v=this.Sn(e,t,mt.Activation);this.Nn(o.concat(v.map((g=>g.id))||[]))}}}onAction(e){var t,s=this.En(),r=((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[s])||[];this._n.has(e)&&this.Nn(r.concat(this._n.get(e)||[]))}Nn(e){var t,s=this.re(),r=this.En(),n=[...new Set(e)].filter((a=>!this.Fn(a)));s.info("updating activated items",{activatedItems:n}),(t=this._instance)==null||(t=t.persistence)==null||t.register({[r]:n})}getActivatedIds(){var e,t=this.En();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}getEventToItemsMap(){return this.bn}On(){return this.An}}class sl extends il{constructor(e){super(e)}En(){return Fn}Rn(){return Ct.SHOWN}kn(e){var t;(t=this._instance)==null||t.getSurveys(e)}Mn(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}re(){return j}Fn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Xi="SDK is not enabled or survey functionality is not yet loaded",Vr="Disabled. Not loading surveys.",rl=p!=null&&p.location?vi(p.location.hash,"__posthog")||vi(location.hash,"state"):null,Br="_postHogToolbarParams",Gr=z("[Toolbar]"),se=z("[FeatureFlags]"),Ve=z("[FeatureFlags]",{debugEnabled:!0}),Vi=`" failed. Feature flags didn't load in time.`,Bi="$active_feature_flags",He="$override_feature_flags",Wr="$feature_flag_request_id",Yr=i=>{for(var e={},t=0;i.length>t;t++)e[i[t]]=!0;return e},Jr=i=>{var e={};for(var[t,s]of ei(i||{}))s&&(e[t]=s);return e},Gi=z("[Error tracking]"),Kr="Refusing to render web experiment since the viewer is a likely bot",nl={icontains:(i,e)=>!!p&&e.href.toLowerCase().indexOf(i.toLowerCase())>-1,not_icontains:(i,e)=>!!p&&e.href.toLowerCase().indexOf(i.toLowerCase())===-1,regex:(i,e)=>!!p&&_i(e.href,i),not_regex:(i,e)=>!!p&&!_i(e.href,i),exact:(i,e)=>e.href===i,is_not:(i,e)=>e.href!==i};class te{get Rt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(s){s===void 0&&(s=!1),t.getWebExperiments((r=>{te.Pn("retrieved web experiments from the server"),t.Ln=new Map,r.forEach((n=>{if(n.feature_flag_key){var a;t.Ln&&(te.Pn("setting flag key ",n.feature_flag_key," to web experiment ",n),(a=t.Ln)==null||a.set(n.feature_flag_key,n));var o=t._instance.getFeatureFlag(n.feature_flag_key);W(o)&&n.variants[o]&&t.Dn(n.name,o,n.variants[o].transforms)}else if(n.variants)for(var l in n.variants){var c=n.variants[l];te.Bn(c)&&t.Dn(n.name,l,c.transforms)}}))}),s)},this._instance=e,this._instance.onFeatureFlags((s=>{this.onFeatureFlags(s)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())te.Pn(Kr);else if(!this.Rt.disable_web_experiments){if(L(this.Ln))return this.Ln=new Map,this.loadIfEnabled(),void this.previewWebExperiment();te.Pn("applying feature flags",e),e.forEach((t=>{var s;if(this.Ln&&(s=this.Ln)!=null&&s.has(t)){var r,n=this._instance.getFeatureFlag(t),a=(r=this.Ln)==null?void 0:r.get(t);n&&a!=null&&a.variants[n]&&this.Dn(a.name,n,a.variants[n].transforms)}}))}}previewWebExperiment(){var e=te.getWindowLocation();if(e!=null&&e.search){var t=pi(e==null?void 0:e.search,"__experiment_id"),s=pi(e==null?void 0:e.search,"__experiment_variant");t&&s&&(te.Pn("previewing web experiments "+t+" && "+s),this.getWebExperiments((r=>{this.jn(parseInt(t),s,r)}),!1,!0))}}loadIfEnabled(){this.Rt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,s){if(this.Rt.disable_web_experiments&&!s)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Rt.token),method:"GET",callback:n=>e(n.statusCode===200&&n.json&&n.json.experiments||[])})}jn(e,t,s){var r=s.filter((n=>n.id===e));r&&r.length>0&&(te.Pn("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Dn(r[0].name,t,r[0].variants[t].transforms))}static Bn(e){return!L(e.conditions)&&te.qn(e)&&te.Zn(e)}static qn(e){var t;if(L(e.conditions)||L((t=e.conditions)==null?void 0:t.url))return!0;var s,r,n,a=te.getWindowLocation();return!!a&&((s=e.conditions)==null||!s.url||nl[(r=(n=e.conditions)==null?void 0:n.urlMatchType)!==null&&r!==void 0?r:"icontains"](e.conditions.url,a))}static getWindowLocation(){return p==null?void 0:p.location}static Zn(e){var t;if(L(e.conditions)||L((t=e.conditions)==null?void 0:t.utm))return!0;var s=Mn();if(s.utm_source){var r,n,a,o,l,c,u,h,d=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((n=e.conditions)==null||(n=n.utm)==null?void 0:n.utm_campaign)==s.utm_campaign,v=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_source||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_source)==s.utm_source,g=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==s.utm_medium,f=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_term||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_term)==s.utm_term;return d&&g&&f&&v}return!1}static Pn(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;t>r;r++)s[r-1]=arguments[r];w.info("[WebExperiments] "+e,s)}Dn(e,t,s){this._is_bot()?te.Pn(Kr):t!=="control"?s.forEach((r=>{if(r.selector){var n;te.Pn("applying transform of variant "+t+" for experiment "+e+" ",r);var a=(n=document)==null?void 0:n.querySelectorAll(r.selector);a==null||a.forEach((o=>{var l=o;r.html&&(l.innerHTML=r.html),r.css&&l.setAttribute("style",r.css)}))}})):te.Pn("Control variants leave the page unmodified.")}_is_bot(){return ce&&this._instance?Wn(ce,this.Rt.custom_blocked_useragents):void 0}}var ve=z("[Conversations]"),Be="Conversations not available yet.",oa={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},al=oa.info;function la(i){if(Pe(i))return{boolValue:i};if(xe(i))return Number.isInteger(i)?{intValue:i}:{doubleValue:i};if(typeof i=="string")return{stringValue:i};if(D(i))return{arrayValue:{values:i.map((e=>la(e)))}};try{return{stringValue:JSON.stringify(i)}}catch{return{stringValue:String(i)}}}function Zr(i){var e=[];for(var t in i){var s=i[t];Oe(s)||E(s)||e.push({key:t,value:la(s)})}return e}var xi={featureFlags:class{constructor(i){this.$n=!1,this.Vn=!1,this.Hn=!1,this.zn=!1,this.Un=!1,this.Yn=!1,this.Gn=!1,this.Wn=!1,this._instance=i,this.featureFlagEventHandlers=[]}get Rt(){return this._instance.config}get Xi(){return this._instance.persistence}Xn(i){return this._instance.get_property(i)}Jn(){var i,e;return(i=(e=this.Xi)==null?void 0:e.pi(this.Rt.feature_flag_cache_ttl_ms))!==null&&i!==void 0&&i}Kn(){return!!this.Jn()&&(this.Wn||this.Hn||(this.Wn=!0,se.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Qn(){var i,e=(i=this.Rt.evaluation_contexts)!==null&&i!==void 0?i:this.Rt.evaluation_environments;return!this.Rt.evaluation_environments||this.Rt.evaluation_contexts||this.Gn||(se.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Gn=!0),e!=null&&e.length?e.filter((t=>{var s=t&&typeof t=="string"&&t.trim().length>0;return s||se.error("Invalid evaluation context found:",t,"Expected non-empty string"),s})):[]}ts(){return this.Qn().length>0}initialize(){var i,e,{config:t}=this._instance,s=(i=(e=t.bootstrap)==null?void 0:e.featureFlags)!==null&&i!==void 0?i:{};if(Object.keys(s).length){var r,n,a=(r=(n=t.bootstrap)==null?void 0:n.featureFlagPayloads)!==null&&r!==void 0?r:{},o=Object.keys(s).filter((c=>!!s[c])).reduce(((c,u)=>(c[u]=s[u]||!1,c)),{}),l=Object.keys(a).filter((c=>o[c])).reduce(((c,u)=>(a[u]&&(c[u]=a[u]),c)),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:l})}}updateFlags(i,e,t){var s=t!=null&&t.merge?this.getFlagVariants():{},r=t!=null&&t.merge?this.getFlagPayloads():{},n=y({},s,i),a=y({},r,e),o={};for(var[l,c]of Object.entries(n)){var u=typeof c=="string";o[l]={key:l,enabled:!!u||!!c,variant:u?c:void 0,reason:void 0,metadata:E(a==null?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.receivedFeatureFlags({flags:o})}get hasLoadedFlags(){return this.Vn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var i=this.Xn(ns),e=this.Xn(He),t=this.Xn(rt);if(!t&&!e)return i||{};var s=B({},i||{}),r=[...new Set([...Object.keys(t||{}),...Object.keys(e||{})])];for(var n of r){var a,o,l=s[n],c=e==null?void 0:e[n],u=E(c)?(a=l==null?void 0:l.enabled)!==null&&a!==void 0&&a:!!c,h=E(c)?l.variant:typeof c=="string"?c:void 0,d=t==null?void 0:t[n],v=y({},l,{enabled:u,variant:u?h??(l==null?void 0:l.variant):void 0});u!==(l==null?void 0:l.enabled)&&(v.original_enabled=l==null?void 0:l.enabled),h!==(l==null?void 0:l.variant)&&(v.original_variant=l==null?void 0:l.variant),d&&(v.metadata=y({},l==null?void 0:l.metadata,{payload:d,original_payload:l==null||(o=l.metadata)==null?void 0:o.payload})),s[n]=v}return this.$n||(se.warn(" Overriding feature flag details!",{flagDetails:i,overriddenPayloads:t,finalDetails:s}),this.$n=!0),s}getFlagVariants(){var i=this.Xn(lt),e=this.Xn(He);if(!e)return i||{};for(var t=B({},i),s=Object.keys(e),r=0;s.length>r;r++)t[s[r]]=e[s[r]];return this.$n||(se.warn(" Overriding feature flags!",{enabledFlags:i,overriddenFlags:e,finalFlags:t}),this.$n=!0),t}getFlagPayloads(){var i=this.Xn(as),e=this.Xn(rt);if(!e)return i||{};for(var t=B({},i||{}),s=Object.keys(e),r=0;s.length>r;r++)t[s[r]]=e[s[r]];return this.$n||(se.warn(" Overriding feature flag payloads!",{flagPayloads:i,overriddenPayloads:e,finalPayloads:t}),this.$n=!0),t}reloadFeatureFlags(){this.zn||this.Rt.advanced_disable_feature_flags||this.es||(this._instance.kr.emit("featureFlagsReloading",!0),this.es=setTimeout((()=>{this.rs()}),5))}ns(){clearTimeout(this.es),this.es=void 0}ensureFlagsLoaded(){this.Vn||this.Hn||this.es||this.reloadFeatureFlags()}setAnonymousDistinctId(i){this.$anon_distinct_id=i}setReloadingPaused(i){this.zn=i}rs(i){var e;if(this.ns(),!this._instance.ki())if(this.Hn)this.Un=!0;else{var t=this.Rt.token,s=this.Xn(ri),r={token:t,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:y({},((e=this.Xi)==null?void 0:e.get_initial_props())||{},this.Xn($t)||{}),group_properties:this.Xn(Ge),timezone:jn()};Oe(s)||E(s)||(r.$device_id=s),(i!=null&&i.disableFlags||this.Rt.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.ts()&&(r.evaluation_contexts=this.Qn());var n=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Rt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Hn=!0,this._instance._send_request({method:"POST",url:n,data:r,compression:this.Rt.disable_compression?void 0:ke.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback:a=>{var o,l,c,u=!0;if(a.statusCode===200&&(this.Un||(this.$anon_distinct_id=void 0),u=!1),this.Hn=!1,!r.disable_flags||this.Un){this.Yn=!u;var h=[];a.error?a.error instanceof Error?h.push(a.error.name==="AbortError"?"timeout":"connection_error"):h.push("unknown_error"):a.statusCode!==200&&h.push("api_error_"+a.statusCode),(o=a.json)!=null&&o.errorsWhileComputingFlags&&h.push("errors_while_computing_flags");var d,v=!((l=a.json)==null||(l=l.quotaLimited)==null||!l.includes("feature_flags"));v&&h.push("quota_limited"),(c=this.Xi)==null||c.register({[us]:h}),v?se.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags((d=a.json)!==null&&d!==void 0?d:{},u,{partialResponse:!!this.Rt.advanced_only_evaluate_survey_feature_flags}),this.Un&&(this.Un=!1,this.rs()))}}})}}getFeatureFlag(i,e){var t;if(e===void 0&&(e={}),!e.fresh||this.Yn)if(this.Vn||this.getFlags()&&this.getFlags().length>0){if(!this.Kn()){var s=this.getFeatureFlagResult(i,e);return(t=s==null?void 0:s.variant)!==null&&t!==void 0?t:s==null?void 0:s.enabled}}else se.warn('getFeatureFlag for key "'+i+Vi)}getFeatureFlagDetails(i){return this.getFlagsWithDetails()[i]}getFeatureFlagPayload(i){var e=this.getFeatureFlagResult(i,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(i,e){if(e===void 0&&(e={}),!e.fresh||this.Yn)if(this.Vn||this.getFlags()&&this.getFlags().length>0){if(!this.Kn()){var t=this.getFlagVariants(),s=i in t,r=t[i],n=this.getFlagPayloads()[i],a=String(r),o=this.Xn(Wr)||void 0,l=this.Xn(ai)||void 0,c=this.Xn(Ot)||{};if(this.Rt.advanced_feature_flags_dedup_per_session){var u,h=this._instance.get_session_id(),d=this.Xn(ls);h&&h!==d&&(c={},(u=this.Xi)==null||u.register({[Ot]:c,[ls]:h}))}if((e.send_event||!("send_event"in e))&&(!(i in c)||!c[i].includes(a))){var v,g,f,$,k,C,R,I,_,S;D(c[i])?c[i].push(a):c[i]=[a],(v=this.Xi)==null||v.register({[Ot]:c});var x=this.getFeatureFlagDetails(i),m=[...(g=this.Xn(us))!==null&&g!==void 0?g:[]];E(r)&&m.push("flag_missing");var P={$feature_flag:i,$feature_flag_response:r,$feature_flag_payload:n||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:((f=this.Rt.bootstrap)==null||(f=f.featureFlags)==null?void 0:f[i])||null,$feature_flag_bootstrapped_payload:(($=this.Rt.bootstrap)==null||($=$.featureFlagPayloads)==null?void 0:$[i])||null,$used_bootstrap_value:!this.Yn};E(x==null||(k=x.metadata)==null?void 0:k.version)||(P.$feature_flag_version=x.metadata.version);var T,O=(C=x==null||(R=x.reason)==null?void 0:R.description)!==null&&C!==void 0?C:x==null||(I=x.reason)==null?void 0:I.code;O&&(P.$feature_flag_reason=O),x!=null&&(_=x.metadata)!=null&&_.id&&(P.$feature_flag_id=x.metadata.id),E(x==null?void 0:x.original_variant)&&E(x==null?void 0:x.original_enabled)||(P.$feature_flag_original_response=E(x.original_variant)?x.original_enabled:x.original_variant),x!=null&&(S=x.metadata)!=null&&S.original_payload&&(P.$feature_flag_original_payload=x==null||(T=x.metadata)==null?void 0:T.original_payload),m.length&&(P.$feature_flag_error=m.join(",")),this._instance.capture("$feature_flag_called",P)}if(s){var A=n;if(!E(n))try{A=JSON.parse(n)}catch{}return{key:i,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:A}}}}else se.warn('getFeatureFlagResult for key "'+i+Vi)}getRemoteConfigPayload(i,e){var t=this.Rt.token,s={distinct_id:this._instance.get_distinct_id(),token:t};this.ts()&&(s.evaluation_contexts=this.Qn()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this.Rt.disable_compression?void 0:ke.Base64,timeout:this.Rt.feature_flag_request_timeout_ms,callback(r){var n,a=(n=r.json)==null?void 0:n.featureFlagPayloads;e((a==null?void 0:a[i])||void 0)}})}isFeatureEnabled(i,e){if(e===void 0&&(e={}),!e.fresh||this.Yn){if(this.Vn||this.getFlags()&&this.getFlags().length>0){var t=this.getFeatureFlag(i,e);return E(t)?void 0:!!t}se.warn('isFeatureEnabled for key "'+i+Vi)}}addFeatureFlagsHandler(i){this.featureFlagEventHandlers.push(i)}removeFeatureFlagsHandler(i){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==i))}receivedFeatureFlags(i,e,t){if(this.Xi){this.Vn=!0;var s=this.getFlagVariants(),r=this.getFlagPayloads(),n=this.getFlagsWithDetails();(function(a,o,l,c,u,h){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var d=(m=>{var P=m.flags;return P?(m.featureFlags=Object.fromEntries(Object.keys(P).map((T=>{var O;return[T,(O=P[T].variant)!==null&&O!==void 0?O:P[T].enabled]}))),m.featureFlagPayloads=Object.fromEntries(Object.keys(P).filter((T=>P[T].enabled)).filter((T=>{var O;return(O=P[T].metadata)==null?void 0:O.payload})).map((T=>{var O;return[T,(O=P[T].metadata)==null?void 0:O.payload]})))):se.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),m})(a),v=d.flags,g=d.featureFlags,f=d.featureFlagPayloads;if(g){var $=a.requestId,k=a.evaluatedAt;if(D(g)){se.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var C={};if(g)for(var R=0;g.length>R;R++)C[g[R]]=!0;o&&o.register({[Bi]:g,[lt]:C})}else{var I=g,_=f,S=v;if(h!=null&&h.partialResponse)I=y({},l,I),_=y({},c,_),S=y({},u,S);else if(a.errorsWhileComputingFlags)if(v){var x=new Set(Object.keys(v).filter((m=>{var P;return!((P=v[m])!=null&&P.failed)})));I=y({},l,Object.fromEntries(Object.entries(I).filter((m=>{var[P]=m;return x.has(P)})))),_=y({},c,Object.fromEntries(Object.entries(_||{}).filter((m=>{var[P]=m;return x.has(P)})))),S=y({},u,Object.fromEntries(Object.entries(S||{}).filter((m=>{var[P]=m;return x.has(P)}))))}else I=y({},l,I),_=y({},c,_),S=y({},u,S);o&&o.register(y({[Bi]:Object.keys(Jr(I)),[lt]:I||{},[as]:_||{},[ns]:S||{}},$?{[Wr]:$}:{},k?{[ai]:k}:{}))}}})(i,this.Xi,s,r,n,t),e||(this.Wn=!1),this.ss(e)}}override(i,e){e===void 0&&(e=!1),se.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:i,suppressWarning:e})}overrideFeatureFlags(i){if(!this._instance.__loaded||!this.Xi)return se.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(i===!1)return this.Xi.unregister(He),this.Xi.unregister(rt),this.ss(),Ve.info("All overrides cleared");if(D(i)){var e=Yr(i);return this.Xi.register({[He]:e}),this.ss(),Ve.info("Flag overrides set",{flags:i})}if(i&&typeof i=="object"&&("flags"in i||"payloads"in i)){var t,s=i;if(this.$n=!!((t=s.suppressWarning)!==null&&t!==void 0&&t),"flags"in s){if(s.flags===!1)this.Xi.unregister(He),Ve.info("Flag overrides cleared");else if(s.flags){if(D(s.flags)){var r=Yr(s.flags);this.Xi.register({[He]:r})}else this.Xi.register({[He]:s.flags});Ve.info("Flag overrides set",{flags:s.flags})}}return"payloads"in s&&(s.payloads===!1?(this.Xi.unregister(rt),Ve.info("Payload overrides cleared")):s.payloads&&(this.Xi.register({[rt]:s.payloads}),Ve.info("Payload overrides set",{payloads:s.payloads}))),void this.ss()}if(i&&typeof i=="object")return this.Xi.register({[He]:i}),this.ss(),Ve.info("Flag overrides set",{flags:i});se.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:i})}onFeatureFlags(i){if(this.addFeatureFlagsHandler(i),this.Vn){var{flags:e,flagVariants:t}=this.os();i(e,t)}return()=>this.removeFeatureFlagsHandler(i)}updateEarlyAccessFeatureEnrollment(i,e,t){var s,r=(this.Xn(It)||[]).find((l=>l.flagKey===i)),n={["$feature_enrollment/"+i]:e},a={$feature_flag:i,$feature_enrollment:e,$set:n};r&&(a.$early_access_feature_name=r.name),t&&(a.$feature_enrollment_stage=t),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=y({},this.getFlagVariants(),{[i]:e});(s=this.Xi)==null||s.register({[Bi]:Object.keys(Jr(o)),[lt]:o}),this.ss()}getEarlyAccessFeatures(i,e,t){e===void 0&&(e=!1);var s=this.Xn(It),r=t?"&"+t.map((n=>"stage="+n)).join("&"):"";if(s&&!e)return i(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Rt.token+r),method:"GET",callback:n=>{var a,o;if(n.json){var l=n.json.earlyAccessFeatures;return(a=this.Xi)==null||a.unregister(It),(o=this.Xi)==null||o.register({[It]:l}),i(l)}}})}os(){var i=this.getFlags(),e=this.getFlagVariants();return{flags:i.filter((t=>e[t])),flagVariants:Object.keys(e).filter((t=>e[t])).reduce(((t,s)=>(t[s]=e[s],t)),{})}}ss(i){var{flags:e,flagVariants:t}=this.os();this.featureFlagEventHandlers.forEach((s=>s(e,t,{errorsLoading:i})))}setPersonPropertiesForFlags(i,e){e===void 0&&(e=!0);var t=this.Xn($t)||{},s=(i==null?void 0:i.$set)||(i!=null&&i.$set_once?{}:i),r=i==null?void 0:i.$set_once,n={};if(r)for(var a in r)({}).hasOwnProperty.call(r,a)&&(a in t||(n[a]=r[a]));this._instance.register({[$t]:y({},t,n,s)}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister($t)}setGroupPropertiesForFlags(i,e){e===void 0&&(e=!0);var t=this.Xn(Ge)||{};Object.keys(t).length!==0&&Object.keys(t).forEach((s=>{t[s]=y({},t[s],i[s]),delete i[s]})),this._instance.register({[Ge]:y({},t,i)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(i){if(i){var e=this.Xn(Ge)||{};this._instance.register({[Ge]:y({},e,{[i]:{}})})}else this._instance.unregister(Ge)}reset(){this.Vn=!1,this.Hn=!1,this.zn=!1,this.Un=!1,this.Yn=!1,this.$anon_distinct_id=void 0,this.ns(),this.$n=!1}}},ol={sessionRecording:class{get Rt(){return this._instance.config}get Xi(){return this._instance.persistence}get started(){var i;return!((i=this.ls)==null||!i.isStarted)}get status(){var i,e;return this.us===kt||this.us===Kt?this.us:(i=(e=this.ls)==null?void 0:e.status)!==null&&i!==void 0?i:this.us}constructor(i){if(this._forceAllowLocalhostNetworkCapture=!1,this.us=jr,this.hs=void 0,this._instance=i,!this._instance.sessionManager)throw De.error("started without valid sessionManager"),new Error(Ss+" started without valid sessionManager. This is a bug.");if(this.Rt.cookieless_mode===Ee)throw new Error(Ss+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get cs(){var i,e=!((i=this._instance.get_property(Ft))==null||!i.enabled),t=!this.Rt.disable_session_recording,s=this.Rt.disable_session_recording||this._instance.consent.isOptedOut();return p&&e&&t&&!s}startIfEnabledOrStop(i){var e;if(!this.cs||(e=this.ls)==null||!e.isStarted){var t=!E(Object.assign)&&!E(Array.from);this.cs&&t?(this.ds(i),De.info("starting")):(this.us=jr,this.stopRecording())}}ds(i){var e,t,s;this.cs&&(this.us!==kt&&this.us!==Kt&&(this.us=qr),F!=null&&(e=F.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(t=F.__PosthogExtensions__)!=null&&t.initSessionRecording?this.vs(i):(s=F.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,this.fs,(r=>{if(r)return De.error("could not load recorder",r);this.vs(i)})))}stopRecording(){var i,e;(i=this.hs)==null||i.call(this),this.hs=void 0,(e=this.ls)==null||e.stop()}ps(){var i,e;(i=this.hs)==null||i.call(this),this.hs=void 0,(e=this.ls)==null||e.discard()}gs(){var i;(i=this.Xi)==null||i.unregister(Rn)}ys(i,e){if(L(i))return null;var t,s=xe(i)?i:parseFloat(i);return typeof(t=s)!="number"||!Number.isFinite(t)||0>t||t>1?(De.warn(e+" must be between 0 and 1. Ignoring invalid value:",i),null):s}bs(i){if(this.Xi){var e,t,s=this.Xi,r=()=>{var n,a=i.sessionRecording===!1?void 0:i.sessionRecording,o=this.ys((n=this.Rt.session_recording)==null?void 0:n.sampleRate,"session_recording.sampleRate"),l=this.ys(a==null?void 0:a.sampleRate,"remote config sampleRate"),c=o??l;L(c)&&this.gs();var u=a==null?void 0:a.minimumDurationMilliseconds;s.register({[Ft]:y({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:y({capturePerformance:i.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:c,minimumDurationMilliseconds:E(u)?null:u,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};r(),(e=this.hs)==null||e.call(this),this.hs=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(r)}}onRemoteConfig(i){return"sessionRecording"in i?i.sessionRecording===!1?(this.bs(i),void this.ps()):(this.bs(i),void this.startIfEnabledOrStop()):(this.us===kt&&(this.us=Kt,De.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(i,e){var t;e===void 0&&(e="log"),(t=this.ls)!=null&&t.log?this.ls.log(i,e):De.warn("log called before recorder was ready")}get fs(){var i,e,t=(i=this._instance)==null||(i=i.persistence)==null?void 0:i.get_property(Ft);return(t==null||(e=t.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}ws(){var i,e=this._instance.get_property(Ft);if(!e)return!1;var t=(i=(typeof e=="object"?e:JSON.parse(e)).cache_timestamp)!==null&&i!==void 0?i:Date.now();return 36e5>=Date.now()-t}vs(i){var e,t;if((e=F.__PosthogExtensions__)==null||!e.initSessionRecording)return De.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0});if(this.ls||(this.ls=(t=F.__PosthogExtensions__)==null?void 0:t.initSessionRecording(this._instance),this.ls._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ws())return this.us===Kt||this.us===kt?void 0:(this.us=kt,De.info("persisted remote config is stale, requesting fresh config before starting"),void new qn(this._instance).load());this.us=qr,this.ls.start(i)}onRRwebEmit(i){var e;(e=this.ls)==null||e.onRRwebEmit==null||e.onRRwebEmit(i)}overrideLinkedFlag(){var i,e;this.ls||(e=this.Xi)==null||e.register({$replay_override_linked_flag:!0}),(i=this.ls)==null||i.overrideLinkedFlag()}overrideSampling(){var i,e;this.ls||(e=this.Xi)==null||e.register({$replay_override_sampling:!0}),(i=this.ls)==null||i.overrideSampling()}overrideTrigger(i){var e,t;this.ls||(t=this.Xi)==null||t.register({[i==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(e=this.ls)==null||e.overrideTrigger(i)}get sdkDebugProperties(){var i;return((i=this.ls)==null?void 0:i.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(i,e){var t;return!((t=this.ls)==null||!t.tryAddCustomEvent(i,e))}}},ll={autocapture:class{constructor(i){this._s=!1,this.Is=null,this.Cs=!1,this.instance=i,this.rageclicks=new Lr(i.config.rageclick),this.Ss=null}initialize(){this.startIfEnabled()}get Rt(){var i,e,t=J(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=(i=t.url_allowlist)==null?void 0:i.map((s=>new RegExp(s))),t.url_ignorelist=(e=t.url_ignorelist)==null?void 0:e.map((s=>new RegExp(s))),t}ks(){if(this.isBrowserSupported()){if(p&&b){var i=t=>{t=t||(p==null?void 0:p.event);try{this.xs(t)}catch(s){Dr.error("Failed to capture event",s)}};if(G(b,"submit",i,{capture:!0}),G(b,"change",i,{capture:!0}),G(b,"click",i,{capture:!0}),this.Rt.capture_copied_text){var e=t=>{this.xs(t=t||(p==null?void 0:p.event),Ui)};G(b,"copy",e,{capture:!0}),G(b,"cut",e,{capture:!0})}}}else Dr.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this._s&&(this.ks(),this._s=!0)}onRemoteConfig(i){i.elementsChainAsString&&(this.Cs=i.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[er]:!!i.autocapture_opt_out}),this.Is=!!i.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(i){this.Ss=i}getElementSelectors(i){var e,t=[];return(e=this.Ss)==null||e.forEach((s=>{var r=b==null?void 0:b.querySelectorAll(s);r==null||r.forEach((n=>{i===n&&t.push(s)}))})),t}get isEnabled(){var i,e,t=(i=this.instance.persistence)==null?void 0:i.props[er];if(Oe(this.Is)&&!Pe(t)&&!this.instance.ki())return!1;var s=(e=this.Is)!==null&&e!==void 0?e:!!t;return!!this.instance.config.autocapture&&!s}xs(i,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var t,s=$r(i);Qn(s)&&(s=s.parentNode||null),e==="$autocapture"&&i.type==="click"&&i instanceof MouseEvent&&this.instance.config.rageclick&&(t=this.rageclicks)!=null&&t.isRageClick(i.clientX,i.clientY,i.timeStamp||new Date().getTime())&&(function(h,d){if(!p||xs(h))return!1;var v,g,f;if(Pe(d)?(v=!!d&&Tr,g=void 0):(v=(f=d==null?void 0:d.css_selector_ignorelist)!==null&&f!==void 0?f:Tr,g=d==null?void 0:d.content_ignorelist),v===!1)return!1;var{targetElementList:$}=Or(h,!1);return!(function(k,C){if(k===!1||E(k))return!1;var R;if(k===!0)R=Xo;else{if(!D(k))return!1;if(k.length>10)return w.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;R=k.map((I=>I.toLowerCase()))}return C.some((I=>{var{safeText:_,ariaLabel:S}=I;return R.some((x=>_.includes(x)||S.includes(x)))}))})(g,$.map((k=>{var C;return{safeText:qt(k).toLowerCase(),ariaLabel:((C=k.getAttribute("aria-label"))==null?void 0:C.toLowerCase().trim())||""}})))&&!Cr($,v)})(s,this.instance.config.rageclick)&&this.xs(i,"$rageclick");var r=e===Ui;if(s&&(function(h,d,v,g,f){var $,k,C,R;if(v===void 0&&(v=void 0),!p||xs(h)||($=v)!=null&&$.url_allowlist&&!Ir(v.url_allowlist)||(k=v)!=null&&k.url_ignorelist&&Ir(v.url_ignorelist))return!1;if((C=v)!=null&&C.dom_event_allowlist){var I=v.dom_event_allowlist;if(I&&!I.some((P=>d.type===P)))return!1}var{parentIsUsefulElement:_,targetElementList:S}=Or(h,g);if(!(function(P,T){var O=T==null?void 0:T.element_allowlist;if(E(O))return!0;var A,H=function(Y){if(O.some((Z=>Y.tagName.toLowerCase()===Z)))return{v:!0}};for(var N of P)if(A=H(N))return A.v;return!1})(S,v)||!Cr(S,(R=v)==null?void 0:R.css_selector_allowlist))return!1;var x=p.getComputedStyle(h);if(x&&x.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var m=h.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return(f||["submit"]).indexOf(d.type)>=0;case"input":case"select":case"textarea":return(f||["change","click"]).indexOf(d.type)>=0;default:return _?(f||["click"]).indexOf(d.type)>=0:(f||["click"]).indexOf(d.type)>=0&&(Hs.indexOf(m)>-1||h.getAttribute("contenteditable")==="true")}})(s,i,this.Rt,r,r?["copy","cut"]:void 0)){var{props:n,explicitNoCapture:a}=Ko(s,{e:i,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Rt.element_attribute_ignorelist,elementsChainAsString:this.Cs});if(a)return!1;var o=this.getElementSelectors(s);if(o&&o.length>0&&(n.$element_selectors=o),e===Ui){var l,c=ta(p==null||(l=p.getSelection())==null?void 0:l.toString()),u=i.type||"clipboard";if(!c)return!1;n.$selected_content=c,n.$copy_type=u}return this.instance.capture(e,n),!0}}}isBrowserSupported(){return Ce(b==null?void 0:b.querySelectorAll)}},historyAutocapture:class{constructor(i){var e;this._instance=i,this.Ts=(p==null||(e=p.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(w.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.As&&this.As(),this.As=void 0,w.info("History API monitoring stopped")}monitorHistoryChanges(){var i,e;if(p&&p.history){var t=this;(i=p.history.pushState)!=null&&i.__posthog_wrapped__||Nr(p.history,"pushState",(s=>function(r,n,a){s.call(this,r,n,a),t.Es("pushState")})),(e=p.history.replaceState)!=null&&e.__posthog_wrapped__||Nr(p.history,"replaceState",(s=>function(r,n,a){s.call(this,r,n,a),t.Es("replaceState")})),this.Rs()}}Es(i){try{var e,t=p==null||(e=p.location)==null?void 0:e.pathname;if(!t)return;t!==this.Ts&&this.isEnabled&&this._instance.capture(nt,{navigation_type:i}),this.Ts=t}catch(s){w.error("Error capturing "+i+" pageview",s)}}Rs(){if(!this.As){var i=()=>{this.Es("popstate")};G(p,"popstate",i),this.As=()=>{p&&p.removeEventListener("popstate",i)}}}},heatmaps:class{get Rt(){return this.instance.config}constructor(i){var e;this.Ns=!1,this._s=!1,this.Ms=null,this.instance=i,this.Ns=!((e=this.instance.persistence)==null||!e.props[is]),this.rageclicks=new Lr(i.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var i=5e3;return J(this.Rt.capture_heatmaps)&&this.Rt.capture_heatmaps.flush_interval_milliseconds&&(i=this.Rt.capture_heatmaps.flush_interval_milliseconds),i}get isEnabled(){return L(this.Rt.capture_heatmaps)?L(this.Rt.enable_heatmaps)?this.Ns:this.Rt.enable_heatmaps:this.Rt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this._s)return;Qo.info("starting..."),this.Fs(),this.Tt()}else{var i;clearInterval((i=this.Ms)!==null&&i!==void 0?i:void 0),this.Os(),this.getAndClearBuffer()}}onRemoteConfig(i){if("heatmaps"in i){var e=!!i.heatmaps;this.instance.persistence&&this.instance.persistence.register({[is]:e}),this.Ns=e,this.startIfEnabled()}}getAndClearBuffer(){var i=this.T;return this.T=void 0,i}Ps(i){this.wt(i.originalEvent,"deadclick")}Tt(){this.Ms&&clearInterval(this.Ms),this.Ms=(b==null?void 0:b.visibilityState)==="visible"?setInterval(this.ji.bind(this),this.flushIntervalMilliseconds):null}Fs(){p&&b&&(this.Ls=this.ji.bind(this),G(p,ci,this.Ls),this.Ds=i=>this.wt(i||(p==null?void 0:p.event)),G(b,"click",this.Ds,{capture:!0}),this.Bs=i=>this.js(i||(p==null?void 0:p.event)),G(b,"mousemove",this.Bs,{capture:!0}),this.qs=new lr(this.instance,po,this.Ps.bind(this)),this.qs.startIfEnabledOrStop(),this.Zs=this.Tt.bind(this),G(b,ui,this.Zs),this._s=!0)}Os(){var i;p&&b&&(this.Ls&&p.removeEventListener(ci,this.Ls),this.Ds&&b.removeEventListener("click",this.Ds,{capture:!0}),this.Bs&&b.removeEventListener("mousemove",this.Bs,{capture:!0}),this.Zs&&b.removeEventListener(ui,this.Zs),clearTimeout(this.$s),(i=this.qs)==null||i.stop(),this._s=!1)}Vs(i,e){var t=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),n=(function(a,o,l){for(var c=a;c&&Ei(c)&&!Ue(c,"body");){if(c===l)return!1;if(M(o,p==null?void 0:p.getComputedStyle(c).position))return!0;c=ia(c)}return!1})($r(i),["fixed","sticky"],r);return{x:i.clientX+(n?0:s),y:i.clientY+(n?0:t),target_fixed:n,type:e}}wt(i,e){var t;if(e===void 0&&(e="click"),!Fr(i.target)&&Ur(i)){var s=this.Vs(i,e);(t=this.rageclicks)!=null&&t.isRageClick(i.clientX,i.clientY,new Date().getTime())&&this.Hs(y({},s,{type:"rageclick"})),this.Hs(s)}}js(i){!Fr(i.target)&&Ur(i)&&(clearTimeout(this.$s),this.$s=setTimeout((()=>{this.Hs(this.Vs(i,"mousemove"))}),500))}Hs(i){if(p){var e=p.location.href,t=this.Rt.custom_personal_data_properties,s=this.Rt.mask_personal_data_properties?[...gt,...t||[]]:[],r=Ht(e,s,jt);this.T=this.T||{},this.T[r]||(this.T[r]=[]),this.T[r].push(i)}}ji(){this.T&&!ot(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:lr,webVitalsAutocapture:class{constructor(i){var e;this.Ns=!1,this._s=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.zs=()=>{clearTimeout(this.Us),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((t,s)=>y({},t,{["$web_vitals_"+s.name+"_event"]:y({},s),["$web_vitals_"+s.name+"_value"]:s.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.nt=t=>{var s,r=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0);if(E(r))Le.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this.Ys();E(n)||(L(t==null?void 0:t.name)||L(t==null?void 0:t.value)?Le.error("Invalid metric received",t):!this.Gs||this.Gs>t.value?(this.T.url!==n&&(this.zs(),this.Us=setTimeout(this.zs,this.flushToCaptureTimeoutMs)),E(this.T.url)&&(this.T.url=n),this.T.firstMetricTimestamp=E(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,t.attribution&&t.attribution.interactionTargetElement&&(t.attribution.interactionTargetElement=void 0),this.T.metrics.push(y({},t,{$current_url:n,$session_id:r.sessionId,$window_id:r.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.zs()):Le.error("Ignoring metric with value >= "+this.Gs,t))}},this.Ws=()=>{if(!this._s){var t,s,r,n,a=F.__PosthogExtensions__;E(a)||E(a.postHogWebVitalsCallbacks)||({onLCP:t,onCLS:s,onFCP:r,onINP:n}=a.postHogWebVitalsCallbacks),t&&s&&r&&n?(this.allowedMetrics.indexOf("LCP")>-1&&t(this.nt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.nt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.nt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&n(this.nt.bind(this)),this._s=!0):Le.error("web vitals callbacks not loaded - not starting")}},this._instance=i,this.Ns=!((e=this._instance.persistence)==null||!e.props[sr]),this.startIfEnabled()}get Xs(){return this._instance.config.capture_performance}get allowedMetrics(){var i,e,t=J(this.Xs)?(i=this.Xs)==null?void 0:i.web_vitals_allowed_metrics:void 0;return L(t)?((e=this._instance.persistence)==null?void 0:e.props[rr])||["CLS","FCP","INP","LCP"]:t}get flushToCaptureTimeoutMs(){return(J(this.Xs)?this.Xs.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var i=J(this.Xs)?this.Xs.web_vitals_attribution:void 0;return i!=null&&i}get Gs(){var i=J(this.Xs)&&xe(this.Xs.__web_vitals_max_value)?this.Xs.__web_vitals_max_value:Hr;return i>0&&6e4>=i?Hr:i}get isEnabled(){var i=Q==null?void 0:Q.protocol;if(i!=="http:"&&i!=="https:")return Le.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=J(this.Xs)?this.Xs.web_vitals:Pe(this.Xs)?this.Xs:void 0;return Pe(e)?e:this.Ns}startIfEnabled(){this.isEnabled&&!this._s&&(Le.info("enabled, starting..."),this.ni(this.Ws))}onRemoteConfig(i){if("capturePerformance"in i){var e=J(i.capturePerformance)&&!!i.capturePerformance.web_vitals,t=J(i.capturePerformance)?i.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[sr]:e}),this._instance.persistence.register({[rr]:t})),this.Ns=e,this.startIfEnabled()}}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?i():(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(s=>{s?Le.error("failed to load script",s):i()}))}Ys(){var i=p?p.location.href:void 0;if(i){var e=this._instance.config.custom_personal_data_properties,t=this._instance.config.mask_personal_data_properties?[...gt,...e||[]]:[];return Ht(i,t,jt)}Le.error("Could not determine current URL")}}},ul={exceptionObserver:class{constructor(i){var e,t,s;this.Ws=()=>{var r;if(p&&this.isEnabled&&(r=F.__PosthogExtensions__)!=null&&r.errorWrappingFunctions){var n=F.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=F.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,o=F.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Js&&this.Rt.capture_unhandled_errors&&(this.Js=n(this.captureException.bind(this))),!this.Ks&&this.Rt.capture_unhandled_rejections&&(this.Ks=a(this.captureException.bind(this))),!this.Qs&&this.Rt.capture_console_errors&&(this.Qs=o(this.captureException.bind(this)))}catch(l){xt.error("failed to start",l),this.eo()}}},this._instance=i,this.io=!((e=this._instance.persistence)==null||!e.props[tr]),this.ro=new ka({refillRate:(t=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&t!==void 0?t:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4,qt:xt}),this.Rt=this.no(),this.startIfEnabledOrStop()}no(){var i=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return J(i)?e=y({},e,i):(E(i)?this.io:i)&&(e=y({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Rt.capture_console_errors||this.Rt.capture_unhandled_errors||this.Rt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(xt.info("enabled"),this.eo(),this.ni(this.Ws)):this.eo()}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.errorWrappingFunctions&&i(),(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"exception-autocapture",(s=>{if(s)return xt.error("failed to load script",s);i()}))}eo(){var i,e,t;(i=this.Js)==null||i.call(this),this.Js=void 0,(e=this.Ks)==null||e.call(this),this.Ks=void 0,(t=this.Qs)==null||t.call(this),this.Qs=void 0}onRemoteConfig(i){"autocaptureExceptions"in i&&(this.io=!!i.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[tr]:this.io}),this.Rt=this.no(),this.startIfEnabledOrStop())}onConfigChange(){this.Rt=this.no()}captureException(i){var e,t,s,r=(e=i==null||(t=i.$exception_list)==null||(t=t[0])==null?void 0:t.type)!==null&&e!==void 0?e:"Exception";this.ro.consumeRateLimit(r)?xt.info("Skipping exception capture because of client rate limiting.",{exception:r}):(s=this._instance.exceptions)==null||s.sendExceptionEvent(i)}},exceptions:class{constructor(i){var e,t;this.so=[],this.oo=new La([new Xa,new Qa,new Ba,new Va,new Ka,new Ja,new Wa,new Za],(function(s){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;r>a;a++)n[a-1]=arguments[a];return function(o,l){l===void 0&&(l=0);for(var c=[],u=o.split(` -`),h=l;u.length>h;h++){var d=u[h];if(1024>=d.length){var v=Qs.test(d)?d.replace(Qs,"$1"):d;if(!v.match(/\S*Error: /)){for(var g of n){var f=g(v,s);if(f){c.push(f);break}}if(c.length>=50)break}}}return(function($){if(!$.length)return[];var k=Array.from($);return k.reverse(),k.slice(0,50).map((C=>{return y({},C,{filename:C.filename||(R=k,R[R.length-1]||{}).filename,function:C.function||vt});var R}))})(c)}})("web:javascript",ja,za)),this._instance=i,this.so=(e=(t=this._instance.persistence)==null?void 0:t.get_property(ss))!==null&&e!==void 0?e:[]}onRemoteConfig(i){var e,t,s;if("errorTracking"in i){var r=(e=(t=i.errorTracking)==null?void 0:t.suppressionRules)!==null&&e!==void 0?e:[],n=(s=i.errorTracking)==null?void 0:s.captureExtensionExceptions;this.so=r,this._instance.persistence&&this._instance.persistence.register({[ss]:this.so,[ir]:n})}}get ao(){var i,e=!!this._instance.get_property(ir),t=this._instance.config.error_tracking.captureExtensionExceptions;return(i=t??e)!==null&&i!==void 0&&i}buildProperties(i,e){return this.oo.buildFromUnknown(i,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}sendExceptionEvent(i){var e=i.$exception_list;if(this.lo(e)){if(this.uo(e))return void Gi.info("Skipping exception capture because a suppression rule matched");if(!this.ao&&this.ho(e))return void Gi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.co(e))return void Gi.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",Ur:!0})}uo(i){if(i.length===0)return!1;var e=i.reduce(((t,s)=>{var{type:r,value:n}=s;return W(r)&&r.length>0&&t.$exception_types.push(r),W(n)&&n.length>0&&t.$exception_values.push(n),t}),{$exception_types:[],$exception_values:[]});return this.so.some((t=>{var s=t.values.map((r=>{var n,a=Yn[r.operator],o=D(r.value)?r.value:[r.value],l=(n=e[r.key])!==null&&n!==void 0?n:[];return o.length>0&&a(o,l)}));return t.type==="OR"?s.some(Boolean):s.every(Boolean)}))}ho(i){return i.flatMap((e=>{var t,s;return(t=(s=e.stacktrace)==null?void 0:s.frames)!==null&&t!==void 0?t:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}co(i){if(i.length>0){var e,t,s,r,n=(e=(t=i[0].stacktrace)==null?void 0:t.frames)!==null&&e!==void 0?e:[],a=n[n.length-1];return(s=a==null||(r=a.filename)==null?void 0:r.includes("posthog.com/static"))!==null&&s!==void 0&&s}return!1}lo(i){return!L(i)&&D(i)}}},cl=y({productTours:class{get Xi(){return this._instance.persistence}constructor(i){this.do=null,this.vo=null,this._instance=i}initialize(){this.loadIfEnabled()}onRemoteConfig(i){"productTours"in i&&(this.Xi&&this.Xi.register({[rs]:!!i.productTours}),this.loadIfEnabled())}loadIfEnabled(){var i,e;this.do||(i=this._instance).config.disable_product_tours||(e=i.persistence)==null||!e.get_property(rs)||this.ni((()=>this.fo()))}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.generateProductTours?i():(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"product-tours",(s=>{s?zr.error("Could not load product tours script",s):i()}))}fo(){var i;!this.do&&(i=F.__PosthogExtensions__)!=null&&i.generateProductTours&&(this.do=F.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(i,e){if(e===void 0&&(e=!1),!D(this.vo)||e){var t=this.Xi;if(t){var s=t.props[Qt];if(D(s)&&!e)return this.vo=s,void i(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:r=>{var n=r.statusCode;if(n!==200||!r.json){var a="Product Tours API could not be loaded, status: "+n;return zr.error(a),void i([],{isLoaded:!1,error:a})}var o=D(r.json.product_tours)?r.json.product_tours:[];this.vo=o,t&&t.register({[Qt]:o}),i(o,{isLoaded:!0})}})}else i(this.vo,{isLoaded:!0})}getActiveProductTours(i){L(this.do)?i([],{isLoaded:!1,error:"Product tours not loaded"}):this.do.getActiveProductTours(i)}showProductTour(i){var e;(e=this.do)==null||e.showTourById(i)}previewTour(i){this.do?this.do.previewTour(i):this.ni((()=>{var e;this.fo(),(e=this.do)==null||e.previewTour(i)}))}dismissProductTour(){var i;(i=this.do)==null||i.dismissTour("user_clicked_skip")}nextStep(){var i;(i=this.do)==null||i.nextStep()}previousStep(){var i;(i=this.do)==null||i.previousStep()}clearCache(){var i;this.vo=null,(i=this.Xi)==null||i.unregister(Qt)}resetTour(i){var e;(e=this.do)==null||e.resetTour(i)}resetAllTours(){var i;(i=this.do)==null||i.resetAllTours()}cancelPendingTour(i){var e;(e=this.do)==null||e.cancelPendingTour(i)}}},xi),hl={siteApps:class{constructor(i){this._instance=i,this.po=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}mo(i,e){if(e){var t=this.globalsForEvent(e);this.po.push(t),this.po.length>1e3&&(this.po=this.po.slice(10))}}get siteAppLoaders(){var i;return(i=F._POSTHOG_REMOTE_CONFIG)==null||(i=i[this._instance.config.token])==null?void 0:i.siteApps}initialize(){if(this.isEnabled){var i=this._instance._addCaptureHook(this.mo.bind(this));this.yo=()=>{i(),this.po=[],this.yo=void 0}}}globalsForEvent(i){var e,t,s,r,n,a,o;if(!i)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[h,d]of Object.entries(u))l[h]={id:c[h],type:h,properties:d};var{$set_once:v,$set:g}=i;return{event:y({},en(i,el),{properties:y({},i.properties,g?{$set:y({},(e=(t=i.properties)==null?void 0:t.$set)!==null&&e!==void 0?e:{},g)}:{},v?{$set_once:y({},(s=(r=i.properties)==null?void 0:r.$set_once)!==null&&s!==void 0?s:{},v)}:{}),elements_chain:(n=(a=i.properties)==null?void 0:a.$elements_chain)!==null&&n!==void 0?n:"",distinct_id:(o=i.properties)==null?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(i){var e=this.apps[i.id],t=()=>{var a;!e.errored&&this.po.length&&(Ne.info("Processing "+this.po.length+" events for site app with id "+i.id),this.po.forEach((o=>e.processEvent==null?void 0:e.processEvent(o))),e.processedBuffer=!0),Object.values(this.apps).every((o=>o.processedBuffer||o.errored))&&((a=this.yo)==null||a.call(this))},s=!1,r=a=>{e.errored=!a,e.loaded=!0,Ne.info("Site app with id "+i.id+" "+(a?"loaded":"errored")),s&&t()};try{var{processEvent:n}=i.init({posthog:this._instance,callback(a){r(a)}});n&&(e.processEvent=n),s=!0}catch(a){Ne.error(Xr+i.id,a),r(!1)}if(s&&e.loaded)try{t()}catch(a){Ne.error("Error while processing buffered events PostHog app with config id "+i.id,a),e.errored=!0}}bo(){var i=this.siteAppLoaders||[];for(var e of i)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var t of i)this.setupSiteApp(t)}wo(i){if(Object.keys(this.apps).length!==0){var e=this.globalsForEvent(i);for(var t of Object.values(this.apps))try{t.processEvent==null||t.processEvent(e)}catch(s){Ne.error("Error while processing event "+i.event+" for site app "+t.id,s)}}}onRemoteConfig(i){var e,t,s,r=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.bo(),void this._instance.on("eventCaptured",(l=>this.wo(l)))):void Ne.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((t=this.yo)==null||t.call(this),(s=i.siteApps)!=null&&s.length)if(this.isEnabled){var n=function(l){var c;F["__$$ph_site_app_"+l]=r._instance,(c=F.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(r._instance,o,(u=>{if(u)return Ne.error(Xr+l,u)}))};for(var{id:a,url:o}of i.siteApps)n(a)}else Ne.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},dl={tracingHeaders:class{constructor(i){this._o=void 0,this.Io=void 0,this.Ws=()=>{var e,t;E(this._o)&&((e=F.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),E(this.Io)&&((t=F.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=i}initialize(){this.startIfEnabledOrStop()}ni(i){var e,t;(e=F.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns&&i(),(t=F.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,"tracing-headers",(s=>{if(s)return Zo.error("failed to load script",s);i()}))}startIfEnabledOrStop(){var i,e;this._instance.config.__add_tracing_headers?this.ni(this.Ws):((i=this._o)==null||i.call(this),(e=this.Io)==null||e.call(this),this._o=void 0,this.Io=void 0)}}},pl=y({surveys:class{get Rt(){return this._instance.config}constructor(i){this.Co=void 0,this._surveyManager=null,this.So=!1,this.ko=[],this.xo=null,this._instance=i,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(i){if(!this.Rt.disable_surveys){var e=i.surveys;if(L(e))return j.warn("Flags not loaded yet. Not loading surveys.");var t=D(e);this.Co=t?e.length>0:e,j.info("flags response received, isSurveysEnabled: "+this.Co),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var i=[],e=0;elocalStorage.removeItem(s)))}loadIfEnabled(){if(!this._surveyManager)if(this.So)j.info("Already initializing surveys, skipping...");else if(this.Rt.disable_surveys)j.info(Vr);else if(this.Rt.cookieless_mode&&this._instance.consent.isOptedOut())j.info("Not loading surveys in cookieless mode without consent.");else{var i=F==null?void 0:F.__PosthogExtensions__;if(i){if(!E(this.Co)||this.Rt.advanced_enable_surveys){var e=this.Co||this.Rt.advanced_enable_surveys;this.So=!0;try{var t=i.generateSurveys;if(t)return void this.To(t,e);var s=i.loadExternalDependency;if(!s)return void this.Ao(Os);s(this._instance,"surveys",(r=>{r||!i.generateSurveys?this.Ao("Could not load surveys script",r):this.To(i.generateSurveys,e)}))}catch(r){throw this.Ao("Error initializing surveys",r),r}finally{this.So=!1}}}else j.error("PostHog Extensions not found.")}}To(i,e){this._surveyManager=i(this._instance,e),this._surveyEventReceiver=new sl(this._instance),j.info("Surveys loaded successfully"),this.Eo({isLoaded:!0})}Ao(i,e){j.error(i,e),this.Eo({isLoaded:!1,error:i})}onSurveysLoaded(i){return this.ko.push(i),this._surveyManager&&this.Eo({isLoaded:!0}),()=>{this.ko=this.ko.filter((e=>e!==i))}}getSurveys(i,e){if(e===void 0&&(e=!1),this.Rt.disable_surveys)return j.info(Vr),i([]);var t,s=this._instance.get_property(os);if(s&&!e)return i(s,{isLoaded:!0});typeof Promise<"u"&&this.xo?this.xo.then((r=>{var{surveys:n,context:a}=r;return i(n,a)})):(typeof Promise<"u"&&(this.xo=new Promise((r=>{t=r}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Rt.token),method:"GET",timeout:this.Rt.surveys_request_timeout_ms,callback:r=>{var n;this.xo=null;var a=r.statusCode;if(a!==200||!r.json){var o="Surveys API could not be loaded, status: "+a;j.error(o);var l={isLoaded:!1,error:o};return i([],l),void(t==null||t({surveys:[],context:l}))}var c,u=r.json.surveys||[],h=u.filter((v=>(function(g){return!(!g.start_date||g.end_date)})(v)&&((function(g){var f;return!((f=g.conditions)==null||(f=f.events)==null||(f=f.values)==null||!f.length)})(v)||(function(g){var f;return!((f=g.conditions)==null||(f=f.actions)==null||(f=f.values)==null||!f.length)})(v))));h.length>0&&((c=this._surveyEventReceiver)==null||c.register(h)),(n=this._instance.persistence)==null||n.register({[os]:u});var d={isLoaded:!0};i(u,d),t==null||t({surveys:u,context:d})}}))}Eo(i){for(var e of this.ko)try{if(!i.isLoaded)return e([],i);this.getSurveys(e)}catch(t){j.error("Error in survey callback",t)}}getActiveMatchingSurveys(i,e){if(e===void 0&&(e=!1),!L(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(i,e);j.warn("init was not called")}Ro(i){var e=null;return this.getSurveys((t=>{var s;e=(s=t.find((r=>r.id===i)))!==null&&s!==void 0?s:null})),e}No(i){if(L(this._surveyManager))return{eligible:!1,reason:Xi};var e=typeof i=="string"?this.Ro(i):i;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(i){if(L(this._surveyManager))return j.warn("init was not called"),{visible:!1,disabledReason:Xi};var e=this.No(i);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(i,e){return L(this._surveyManager)?(j.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Xi})):new Promise((t=>{this.getSurveys((s=>{var r,n=(r=s.find((o=>o.id===i)))!==null&&r!==void 0?r:null;if(n){var a=this.No(n);t({visible:a.eligible,disabledReason:a.reason})}else t({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(i,e,t){var s;if(L(this._surveyManager))j.warn("init was not called");else{var r=typeof i=="string"?this.Ro(i):i;if(r!=null&&r.id)if(Do.includes(r.type)){var n=b==null?void 0:b.querySelector(e);if(n)return(s=r.appearance)!=null&&s.surveyPopupDelaySeconds?(j.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,o;j.info("Rendering survey "+r.id+" with delay of "+((a=r.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(o=this._surveyManager)==null||o.renderSurvey(r,n,t),j.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n,t);j.warn("Survey element not found")}else j.warn("Surveys of type "+r.type+" cannot be rendered in the app");else j.warn("Survey not found")}}displaySurvey(i,e){var t;if(L(this._surveyManager))j.warn("init was not called");else{var s=this.Ro(i);if(s){var r=s;if((t=s.appearance)!=null&&t.surveyPopupDelaySeconds&&e.ignoreDelay&&(r=y({},s,{appearance:y({},s.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==gs.Popover&&e.initialResponses&&j.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var n=this.canRenderSurvey(s);if(!n.visible)return void j.warn("Survey is not eligible to be displayed: ",n.disabledReason)}e.displayType!==gs.Inline?this._surveyManager.handlePopoverSurvey(r,e):this.renderSurvey(r,e.selector,e.properties)}else j.warn("Survey not found")}}cancelPendingSurvey(i){L(this._surveyManager)?j.warn("init was not called"):this._surveyManager.cancelSurvey(i)}handlePageUnload(){var i;(i=this._surveyManager)==null||i.handlePageUnload()}}},xi),vl={toolbar:class{constructor(i){this.instance=i}Mo(i){F.ph_toolbar_state=i}Fo(){var i;return(i=F.ph_toolbar_state)!==null&&i!==void 0?i:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(i,e,t){if(i===void 0&&(i=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),$n(this.instance.config)||!p||!b)return!1;i=i??p.location,t=t??p.history;try{if(!e){try{p.localStorage.setItem("test","test"),p.localStorage.removeItem("test")}catch{return!1}e=p==null?void 0:p.localStorage}var s,r=rl||vi(i.hash,"__posthog")||vi(i.hash,"state"),n=r?ar((()=>JSON.parse(atob(decodeURIComponent(r)))))||ar((()=>JSON.parse(decodeURIComponent(r)))):null;return n&&n.action==="ph_authorize"?((s=n).source="url",s&&Object.keys(s).length>0&&(n.desiredHash?i.hash=n.desiredHash:t?t.replaceState(t.state,"",i.pathname+i.search):i.hash="")):((s=JSON.parse(e.getItem(Br)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch{return!1}}Oo(i){var e=F.ph_load_toolbar||F.ph_load_editor;!L(e)&&Ce(e)?e(i,this.instance):Gr.warn("No toolbar load function found")}loadToolbar(i){var e=!(b==null||!b.getElementById(In));if(!p||e)return!1;var t=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=y({token:this.instance.config.token},i,{apiURL:this.instance.requestRouter.endpointFor("ui")},t?{instrument:!1}:{});if(p.localStorage.setItem(Br,JSON.stringify(y({},s,{source:void 0}))),this.Fo()===2)this.Oo(s);else if(this.Fo()===0){var r;this.Mo(1),(r=F.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"toolbar",(n=>{if(n)return Gr.error("[Toolbar] Failed to load",n),void this.Mo(0);this.Mo(2),this.Oo(s)})),G(p,"turbolinks:load",(()=>{this.Mo(0),this.loadToolbar(s)}))}return!0}Po(i){return this.loadToolbar(i)}maybeLoadEditor(i,e,t){return i===void 0&&(i=void 0),e===void 0&&(e=void 0),t===void 0&&(t=void 0),this.maybeLoadToolbar(i,e,t)}}},gl=y({experiments:te},xi),fl={conversations:class{constructor(i){this.Lo=void 0,this._conversationsManager=null,this.Do=!1,this.Bo=null,this._instance=i}initialize(){this.loadIfEnabled()}onRemoteConfig(i){if(!this._instance.config.disable_conversations){var e=i.conversations;L(e)||(Pe(e)?this.Lo=e:(this.Lo=e.enabled,this.Bo=e),this.loadIfEnabled())}}reset(){var i;(i=this._conversationsManager)==null||i.reset(),this._conversationsManager=null,this.Lo=void 0,this.Bo=null}loadIfEnabled(){if(!(this._conversationsManager||this.Do||this._instance.config.disable_conversations||$n(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var i=F==null?void 0:F.__PosthogExtensions__;if(i&&!E(this.Lo)&&this.Lo)if(this.Bo&&this.Bo.token){this.Do=!0;try{var e=i.initConversations;if(e)return this.jo(e),void(this.Do=!1);var t=i.loadExternalDependency;if(!t)return void this.qo(Os);t(this._instance,"conversations",(s=>{s||!i.initConversations?this.qo("Could not load conversations script",s):this.jo(i.initConversations),this.Do=!1}))}catch(s){this.qo("Error initializing conversations",s),this.Do=!1}}else ve.error("Conversations enabled but missing token in remote config.")}}jo(i){if(this.Bo)try{this._conversationsManager=i(this.Bo,this._instance),ve.info("Conversations loaded successfully")}catch(e){this.qo("Error completing conversations initialization",e)}else ve.error("Cannot complete initialization: remote config is null")}qo(i,e){ve.error(i,e),this._conversationsManager=null,this.Do=!1}show(){this._conversationsManager?this._conversationsManager.show():ve.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Lo===!0&&!Oe(this._conversationsManager)}isVisible(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&i!==void 0&&i}sendMessage(i,e,t){var s=this;return we((function*(){return s._conversationsManager?s._conversationsManager.sendMessage(i,e,t):(ve.warn(Be),null)}))()}getMessages(i,e){var t=this;return we((function*(){return t._conversationsManager?t._conversationsManager.getMessages(i,e):(ve.warn(Be),null)}))()}markAsRead(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(i):(ve.warn(Be),null)}))()}getTickets(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.getTickets(i):(ve.warn(Be),null)}))()}requestRestoreLink(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(i):(ve.warn(Be),null)}))()}restoreFromToken(i){var e=this;return we((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(i):(ve.warn(Be),null)}))()}restoreFromUrlToken(){var i=this;return we((function*(){return i._conversationsManager?i._conversationsManager.restoreFromUrlToken():(ve.warn(Be),null)}))()}getCurrentTicketId(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&i!==void 0?i:null}getWidgetSessionId(){var i,e;return(i=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&i!==void 0?i:null}Qr(){var i;(i=this._conversationsManager)==null||i.setIdentity()}tn(){var i;(i=this._conversationsManager)==null||i.clearIdentity()}}},_l={logs:class{constructor(i){var e;this.Zo=!1,this.$o=!1,this.qt=z("[logs]"),this.Vo=[],this.Ho=0,this.zo=0,this.Uo=!1,this._instance=i,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.Zo=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(i){var e,t=(e=i.logs)==null?void 0:e.captureConsoleLogs;!L(t)&&t&&(this.Zo=!0,this.loadIfEnabled())}reset(){this.Vo=[],this.Ni&&(clearTimeout(this.Ni),this.Ni=void 0),this.Ho=0,this.zo=0,this.Uo=!1}loadIfEnabled(){if(this.Zo&&!this.$o){var i=F==null?void 0:F.__PosthogExtensions__;if(i){var e=i.loadExternalDependency;e?e(this._instance,"logs",(t=>{var s;t||(s=i.logs)==null||!s.initializeLogs?this.qt.error("Could not load logs script",t):(i.logs.initializeLogs(this._instance),this.$o=!0)})):this.qt.error(Os)}else this.qt.error("PostHog Extensions not found.")}}captureLog(i){var e,t,s,r,n,a;if(this._instance.is_capturing())if(i&&i.body){var o=(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3,l=(s=(r=this._instance.config.logs)==null?void 0:r.maxLogsPerInterval)!==null&&s!==void 0?s:1e3,c=Date.now();if(o>c-this.zo||(this.zo=c,this.Ho=0,this.Uo=!1),l>this.Ho){this.Ho++;var u=(function(h,d){var v=h.level||"info",{text:g,number:f}=oa[v]||al,$=String(Date.now())+"000000",k={};d.distinctId&&(k.posthogDistinctId=d.distinctId),d.sessionId&&(k.sessionId=d.sessionId),d.currentUrl&&(k["url.full"]=d.currentUrl),d.activeFeatureFlags&&d.activeFeatureFlags.length>0&&(k.feature_flags=d.activeFeatureFlags);var C=y({},k,h.attributes||{}),R={timeUnixNano:$,observedTimeUnixNano:$,severityNumber:f,severityText:g,body:{stringValue:h.body},attributes:Zr(C)};return h.trace_id&&(R.traceId=h.trace_id),h.span_id&&(R.spanId=h.span_id),E(h.trace_flags)||(R.flags=h.trace_flags),R})(i,this.Yo());this.Vo.push({record:u}),((n=(a=this._instance.config.logs)==null?void 0:a.maxBufferSize)!==null&&n!==void 0?n:100)>this.Vo.length?this.Go():this.flushLogs()}else this.Uo||(this.qt.warn("captureLog dropping logs: exceeded "+l+" logs per "+o+"ms"),this.Uo=!0)}else this.qt.warn("captureLog requires a body")}get logger(){return this.Wo||(this.Wo={trace:(i,e)=>this.captureLog({body:i,level:"trace",attributes:e}),debug:(i,e)=>this.captureLog({body:i,level:"debug",attributes:e}),info:(i,e)=>this.captureLog({body:i,level:"info",attributes:e}),warn:(i,e)=>this.captureLog({body:i,level:"warn",attributes:e}),error:(i,e)=>this.captureLog({body:i,level:"error",attributes:e}),fatal:(i,e)=>this.captureLog({body:i,level:"fatal",attributes:e})}),this.Wo}flushLogs(i){if(this.Ni&&(clearTimeout(this.Ni),this.Ni=void 0),this.Vo.length!==0){var e=this.Vo;this.Vo=[];var t=this._instance.config.logs,s=y({"service.name":(t==null?void 0:t.serviceName)||"unknown_service"},(t==null?void 0:t.environment)&&{"deployment.environment":t.environment},(t==null?void 0:t.serviceVersion)&&{"service.version":t.serviceVersion},t==null?void 0:t.resourceAttributes),r=(function(a,o){return{resourceLogs:[{resource:{attributes:Zr(o)},scopeLogs:[{scope:{name:ne.LIB_NAME},logRecords:a}]}]}})(e.map((a=>a.record)),s),n=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Lr({method:"POST",url:n,data:r,compression:"best-available",batchKey:"logs",transport:i})}}Go(){var i,e;this.Ni||(this.Ni=setTimeout((()=>{this.Ni=void 0,this.flushLogs()}),(i=(e=this._instance.config.logs)==null?void 0:e.flushIntervalMs)!==null&&i!==void 0?i:3e3))}Yo(){var i,e={lib:ne.LIB_NAME};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:t}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=t}if(F!=null&&(i=F.location)!=null&&i.href&&(e.currentUrl=F.location.href),this._instance.featureFlags){var s=this._instance.featureFlags.getFlags();s&&s.length>0&&(e.activeFeatureFlags=s)}return e}}},ml=y({},xi,ol,ll,ul,cl,hl,pl,dl,vl,gl,fl,_l);ge.__defaultExtensionClasses=y({},ml);var Qr,yl=(Qr=At[at]=new ge,(function(){function i(){i.done||(i.done=!0,Zn=!1,q(At,(function(e){e._dom_loaded()})))}b!=null&&b.addEventListener?b.readyState==="complete"?i():G(b,"DOMContentLoaded",i,{capture:!1}):p&&w.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),Qr),ua;function bl(i){ua=i}function Ps(){return ua}var js=qe.createContext({get client(){return Ps()},bootstrap:void 0});function ca(i,e,t){if(t===void 0&&(t=new WeakMap),i===e)return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;if(t.has(i)&&t.get(i)===e)return!0;t.set(i,e);var s=Object.keys(i),r=Object.keys(e);if(s.length!==r.length)return!1;for(var n=0,a=s;n!!i&&(!e||!e.analyticsOptOut),[i,e]),s=qe.useCallback((n,a)=>{if(t())try{i.capture(n,a)}catch(o){console.warn("Analytics capture failed:",o)}},[i,t]),r=qe.useCallback((n,a,o)=>{if(t())try{i.identify(n,a,o)}catch(l){console.warn("Analytics identify failed:",l)}},[i,t]);return{capture:s,identify:r,isAvailable:t()}}export{Pl as P,wl as a,yl as c,Rl as u}; diff --git a/hatchetembed/dashboard/assets/use-auth-disabled-3jxVUpNe.js b/hatchetembed/dashboard/assets/use-auth-disabled-3jxVUpNe.js deleted file mode 100644 index c7fa6131c9..0000000000 --- a/hatchetembed/dashboard/assets/use-auth-disabled-3jxVUpNe.js +++ /dev/null @@ -1 +0,0 @@ -import{C as t}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="65bb4c8e-e112-4a48-8b5a-61385f970544",e._sentryDebugIdIdentifier="sentry-dbid-65bb4c8e-e112-4a48-8b5a-61385f970544")}catch{}})();function d(){const{meta:e}=t();return!!(e&&"authDisabled"in e&&e.authDisabled)}export{d as u}; diff --git a/hatchetembed/dashboard/assets/use-pending-invites-DdxsIf8r.js b/hatchetembed/dashboard/assets/use-pending-invites-DdxsIf8r.js deleted file mode 100644 index 872f16bfb3..0000000000 --- a/hatchetembed/dashboard/assets/use-pending-invites-DdxsIf8r.js +++ /dev/null @@ -1 +0,0 @@ -import{af as g,y as v,G as y,N as b,k as u,c as l,a as I,Q as C}from"./index-NcPpBRAY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="57c1335b-31f7-455d-9b14-e0763d5f62b7",e._sentryDebugIdIdentifier="sentry-dbid-57c1335b-31f7-455d-9b14-e0763d5f62b7")}catch{}})();const h=(e,n)=>({queryKey:["pending-invites",e,n],queryFn:async()=>{const[t,a]=await Promise.allSettled([n?l.userListTenantInvites():I.userListTenantInvites(),e||n?n?l.userListOrganizationInvites():C.userListOrganizationInvites():Promise.resolve({data:{rows:[]}})]),i=t.status==="fulfilled"?t.value.data.rows||[]:[],r=a.status==="fulfilled"?a.value.data.rows||[]:[],o=i.length,s=r.length;return{inviteCount:o+s,tenantInvites:i,organizationInvites:r}},refetchInterval:3e4,staleTime:3e4}),L=e=>{const{isCloudEnabled:n,isCloudLoading:t}=g(),{isControlPlaneEnabled:a}=v(),i=y(),r=(e==null?void 0:e.isCloudEnabled)??n,o=(e==null?void 0:e.isControlPlaneEnabled)??a,s=b(h(r,o)),c=u.useCallback(()=>{i.invalidateQueries({queryKey:["pending-invites"]})},[i]),f=u.useCallback(()=>s.refetch({cancelRefetch:!1}).then(d=>{if(d.isSuccess)return d.data;throw d.error}),[s]);return{pendingInvitesQuery:s,isLoading:t||s.isLoading,isLoaded:s.isSuccess,invalidate:c,get:f}};export{h as p,L as u}; diff --git a/hatchetembed/dashboard/assets/welcome-modal-state-YrY6roPC.js b/hatchetembed/dashboard/assets/welcome-modal-state-YrY6roPC.js deleted file mode 100644 index a1eed124fc..0000000000 --- a/hatchetembed/dashboard/assets/welcome-modal-state-YrY6roPC.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,L as f,a6 as u,a7 as b,a8 as h,a9 as m,aa as p}from"./index-NcPpBRAY.js";import{s as y,f as x}from"./shard-deployment-key-in4ZPoWA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2b86765-eb8b-470f-91d0-aa4494aff04d",e._sentryDebugIdIdentifier="sentry-dbid-b2b86765-eb8b-470f-91d0-aa4494aff04d")}catch{}})();function S(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")+"-"+Math.random().toString(36).substring(2,7)}function w({shards:e,value:n,onValueChange:s,isLoading:o,disabled:d=!1,id:i="deployment-region"}){const c=d||o||e.length<=1;return t.jsxs("div",{className:"grid gap-2",children:[t.jsx(f,{htmlFor:i,children:"Region"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose where this tenant is deployed."}),t.jsxs(u,{value:n,onValueChange:s,disabled:c,children:[t.jsx(b,{id:i,children:t.jsx(h,{placeholder:o?"Loading regions…":"Select a region"})}),t.jsx(m,{children:e.map(l=>{const a=y(l),g=x(a)??l.region;return t.jsx(p,{value:a,children:g},a)})})]})]})}const E="hatchet:show-welcome",r={OrganizationCreated:"organization_created",TenantCreated:"tenant_created"};function T(e){return e==="1"?r.OrganizationCreated:e===r.OrganizationCreated||e===r.TenantCreated?e:null}export{w as R,E as W,r as a,S as g,T as r}; diff --git a/hatchetembed/dashboard/favicon.svg b/hatchetembed/dashboard/favicon.svg deleted file mode 100644 index 26cf2bef37..0000000000 --- a/hatchetembed/dashboard/favicon.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/hatchetembed/dashboard/index.html b/hatchetembed/dashboard/index.html deleted file mode 100644 index 0d1e2f6f0e..0000000000 --- a/hatchetembed/dashboard/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Hatchet - - - - - - Hatchet - - - - -
    - - diff --git a/hatchetembed/dashboard/noise.png b/hatchetembed/dashboard/noise.png deleted file mode 100644 index 0892047599d8925efb44c0541b04bf0053f35184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663717 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
  • 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%0A0jKcN}^{qt$Guul|41~j+SX_KL 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