From fdb5cca77e3e90459a12e3a35eb26cc68b222863 Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:47:00 +1100 Subject: [PATCH] feat: delete-volumes (#18) --- .claude/settings.json | 8 +- TODO.md | 14 +-- hive/daemon/daemon.go | 3 +- hive/daemon/daemon_handlers.go | 35 ++++++ hive/gateway/ec2.go | 22 ++++ hive/gateway/ec2/volume/DeleteVolume.go | 44 +++++++ hive/gateway/ec2/volume/DeleteVolume_test.go | 99 ++++++++++++++++ hive/handlers/ec2/volume/service.go | 1 + hive/handlers/ec2/volume/service_impl.go | 108 +++++++++++++++++- hive/handlers/ec2/volume/service_impl_test.go | 44 +++++++ hive/handlers/ec2/volume/service_nats.go | 26 +++++ .../services/hiveui/frontend/dist/assets/_.js | 2 +- .../hiveui/frontend/dist/assets/_id.js | 2 +- .../hiveui/frontend/dist/assets/_id2.js | 2 +- .../hiveui/frontend/dist/assets/_id3.js | 2 +- .../hiveui/frontend/dist/assets/_id4.js | 2 +- .../hiveui/frontend/dist/assets/_id5.js | 2 +- .../frontend/dist/assets/ami-details.js | 2 +- .../hiveui/frontend/dist/assets/badge.js | 2 +- .../hiveui/frontend/dist/assets/ec2.js | 2 +- .../hiveui/frontend/dist/assets/field.js | 2 +- .../hiveui/frontend/dist/assets/index.js | 32 +++--- .../hiveui/frontend/dist/assets/index2.js | 2 +- .../hiveui/frontend/dist/assets/index6.js | 2 +- .../hiveui/frontend/dist/assets/index8.js | 2 +- .../frontend/dist/assets/upload-button.js | 4 +- .../frontend/dist/assets/useMutation.js | 2 +- .../frontend/dist/assets/useSuspenseQuery.js | 2 +- .../hiveui/frontend/src/mutations/ec2.ts | 16 +++ .../ec2/(volumes)/describe-volumes/$id.tsx | 57 ++++++++- hive/services/viperblockd/viperblockd.go | 54 ++++++++- tests/e2e/run-e2e.sh | 34 +++++- tests/e2e/run-multinode-e2e.sh | 31 ++++- 33 files changed, 598 insertions(+), 64 deletions(-) create mode 100644 hive/gateway/ec2/volume/DeleteVolume.go create mode 100644 hive/gateway/ec2/volume/DeleteVolume_test.go diff --git a/.claude/settings.json b/.claude/settings.json index b76c699d6..9e189c61c 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -51,11 +51,11 @@ "Bash(cd ../viperblock && *)", "Bash(cd ../predastore && *)", - "Bash(pnpm fix *)", - "Bash(pnpm check *)", - "Bash(pnpm build *)", + "Bash(pnpm fix:*)", + "Bash(pnpm check:*)", + "Bash(pnpm build:*)", "Bash(pnpm tsc *)", - "Bash(pnpx @tanstack/router-cli generate *)", + "Bash(pnpx @tanstack/router-cli generate:*)", "Bash(git diff*)", "Bash(git diff --staged*)", diff --git a/TODO.md b/TODO.md index 4990f2fdc..3fcf49e54 100644 --- a/TODO.md +++ b/TODO.md @@ -82,18 +82,6 @@ aws ec2 detach-volume --volume-id vol-1234567890abcdef0 - Use QMP to detach specified volume - Terminate running `nbdkit` process for specified volume, ensure WAL state synced to predastore. -## EC2 delete-volume - -Allow a volume to be deleted once detached from any running instances. - -```sh -aws ec2 delete-volume --volume-id vol-049df61146c4d7901 -``` - -- Confirm volume detached -- Terminate running `nbdkit` process for specified volume, ensure WAL state synced to predastore. -- Delete volume in predastore - ## EC2 modify-volume Example increasing a volume to 64GiB @@ -226,7 +214,7 @@ Instance `dmesg`: | `describe-volumes` | `--volume-ids` (fast-path lookup) | `--filters`, `--max-results`, `--next-token`, `--dry-run` | None | NATS `ec2.DescribeVolumes` → daemon queries viperblock for volume metadata → returns volume list with state, size, attachments, type | 1. List all volumes
2. Filter by volume ID
3. Filter by attachment state
4. Non-existent volume returns empty | **DONE** | | `modify-volume` | `--volume-id`, `--size`, `--volume-type`, `--iops` | `--throughput`, `--dry-run`, `--multi-attach-enabled` | Volume must exist | NATS `ec2.ModifyVolume` → daemon sends resize request to viperblock → NBD does not support live resize, instance must be stopped → returns modification state | 1. Increase volume size
2. Modify volume type
3. Decrease size (error - not supported)
4. Modify attached volume (requires stop/start) | **DONE** | | `create-volume` | `--size`, `--availability-zone`, `--volume-type` (gp3 only) | `--iops`, `--encrypted`, `--snapshot-id`, `--tag-specifications` | Valid AZ configured via `hive init` | Gateway validates input → NATS `ec2.CreateVolume` → daemon generates vol-ID via viperblock → creates empty volume of specified size → persists config.json to Predastore S3 → returns vol-ID with state=available | 1. Create 80GB gp3 volume
2. Boundary sizes (1 GiB min, 16384 GiB max)
3. Invalid AZ (error)
4. Verify volume in describe-volumes
5. Unsupported volume type (error - only gp3)
6. Size out of range (error) | **DONE** | -| `delete-volume` | — | `--volume-id` | Volume must exist and be detached | Confirm volume detached → terminate nbdkit process → sync WAL to Predastore → delete volume bucket in Predastore → return success | 1. Delete detached volume
2. Delete attached volume (error: VolumeInUse)
3. Delete non-existent volume (error)
4. Verify volume gone from describe-volumes | **NOT STARTED** | +| `delete-volume` | `--volume-id` | `--dry-run` | Volume must exist and be detached (state=available) | Gateway validates vol- prefix → NATS `ec2.DeleteVolume` → daemon confirms state=available and no AttachedInstance → NATS `ebs.delete` to viperblockd (stops nbdkit/WAL) → deletes S3 objects under vol-id/, vol-id-efi/, vol-id-cloudinit/ → returns success | 1. Delete detached volume
2. Delete attached volume (error: VolumeInUse)
3. Delete non-existent volume (error: InvalidVolume.NotFound)
4. Verify volume gone from describe-volumes
5. Malformed volume ID (error: InvalidVolumeID.Malformed)
6. Double delete (idempotent NotFound) | **DONE** | | `attach-volume` | — | `--volume-id`, `--instance-id`, `--device` (e.g. /dev/sdf) | Volume must exist (available), instance must exist (running) | NATS to node running instance → start nbdkit for volume → QMP `blockdev-add` (NBD socket) → QMP `device_add` (virtio-blk-pci) → update instance metadata with attachment | 1. Attach volume to running instance
2. Verify device visible in guest OS
3. Attach already-attached volume (error)
4. Attach to non-existent instance (error)
5. Volume persists across stop/start | **NOT STARTED** | | `detach-volume` | — | `--volume-id`, `--instance-id`, `--device`, `--force` | Volume must be attached | NATS to node running instance → QMP `device_del` → QMP `blockdev-del` → terminate nbdkit for volume → sync WAL to Predastore → update instance metadata | 1. Detach from running instance
2. Force detach
3. Detach already-detached volume (error)
4. Verify device removed from guest OS | **NOT STARTED** | | `describe-volume-status` | — | `--volume-ids`, `--filters`, `--max-results` | None | Query viperblock for volume health status → return io-enabled status, availability zone, events | 1. Check healthy volume status
2. Check volume during modification
3. Filter by volume ID | **NOT STARTED** | diff --git a/hive/daemon/daemon.go b/hive/daemon/daemon.go index 1bc8bf78d..aad1ac5eb 100644 --- a/hive/daemon/daemon.go +++ b/hive/daemon/daemon.go @@ -430,6 +430,7 @@ func (d *Daemon) subscribeAll() error { {"ec2.CreateVolume", d.handleEC2CreateVolume, "hive-workers"}, {"ec2.DescribeVolumes", d.handleEC2DescribeVolumes, "hive-workers"}, {"ec2.ModifyVolume", d.handleEC2ModifyVolume, "hive-workers"}, + {"ec2.DeleteVolume", d.handleEC2DeleteVolume, "hive-workers"}, {"ec2.DescribeInstances", d.handleEC2DescribeInstances, ""}, {"ec2.DescribeInstanceTypes", d.handleEC2DescribeInstanceTypes, ""}, {"ec2.startinstances", d.handleEC2StartInstances, "hive-workers"}, @@ -474,7 +475,7 @@ func (d *Daemon) Start() error { d.instanceService = handlers_ec2_instance.NewInstanceServiceImpl(d.config, d.resourceMgr.instanceTypes, d.natsConn, &d.Instances) d.keyService = handlers_ec2_key.NewKeyServiceImpl(d.config) d.imageService = handlers_ec2_image.NewImageServiceImpl(d.config) - d.volumeService = handlers_ec2_volume.NewVolumeServiceImpl(d.config) + d.volumeService = handlers_ec2_volume.NewVolumeServiceImpl(d.config, d.natsConn) d.restoreInstances() diff --git a/hive/daemon/daemon_handlers.go b/hive/daemon/daemon_handlers.go index 2d1ffd683..30c7e3c58 100644 --- a/hive/daemon/daemon_handlers.go +++ b/hive/daemon/daemon_handlers.go @@ -772,6 +772,41 @@ func (d *Daemon) handleEC2ModifyVolume(msg *nats.Msg) { slog.Info("handleEC2ModifyVolume completed", "volumeId", modifyVolumeInput.VolumeId) } +// handleEC2DeleteVolume processes incoming EC2 DeleteVolume requests +func (d *Daemon) handleEC2DeleteVolume(msg *nats.Msg) { + slog.Debug("Received message", "subject", msg.Subject, "data", string(msg.Data)) + + deleteVolumeInput := &ec2.DeleteVolumeInput{} + errResp := utils.UnmarshalJsonPayload(deleteVolumeInput, msg.Data) + if errResp != nil { + msg.Respond(errResp) + slog.Error("Request does not match DeleteVolumeInput") + return + } + + slog.Info("Processing DeleteVolume request", "volumeId", aws.StringValue(deleteVolumeInput.VolumeId)) + + output, err := d.volumeService.DeleteVolume(deleteVolumeInput) + + if err != nil { + slog.Error("handleEC2DeleteVolume service.DeleteVolume failed", "err", err) + errResp = utils.GenerateErrorPayload(err.Error()) + msg.Respond(errResp) + return + } + + jsonResponse, err := json.Marshal(output) + if err != nil { + slog.Error("handleEC2DeleteVolume failed to marshal output", "err", err) + errResp = utils.GenerateErrorPayload(awserrors.ErrorServerInternal) + msg.Respond(errResp) + return + } + msg.Respond(jsonResponse) + + slog.Info("handleEC2DeleteVolume completed", "volumeId", aws.StringValue(deleteVolumeInput.VolumeId)) +} + // handleEC2DescribeInstanceTypes processes incoming EC2 DescribeInstanceTypes requests // This handler responds with instance types that can currently be provisioned on this node // based on available resources (CPU and memory not already allocated to running instances) diff --git a/hive/gateway/ec2.go b/hive/gateway/ec2.go index 744e2a5b0..348d5de5a 100644 --- a/hive/gateway/ec2.go +++ b/hive/gateway/ec2.go @@ -371,6 +371,28 @@ func (gw *GatewayConfig) EC2_Request(ctx *fiber.Ctx) error { return errors.New("failed to marshal response to XML") } + case "DeleteVolume": + var input = &ec2.DeleteVolumeInput{} + err = awsec2query.QueryParamsToStruct(queryArgs, input) + + if err != nil { + return err + } + + output, err := gateway_ec2_volume.DeleteVolume(input, gw.NATSConn) + + if err != nil { + return err + } + + // Convert to XML + payload := utils.GenerateXMLPayload("DeleteVolumeResponse", output) + xmlOutput, err = utils.MarshalToXML(payload) + + if err != nil { + return errors.New("failed to marshal response to XML") + } + default: err = errors.New("InvalidAction") } diff --git a/hive/gateway/ec2/volume/DeleteVolume.go b/hive/gateway/ec2/volume/DeleteVolume.go new file mode 100644 index 000000000..b0570a9ab --- /dev/null +++ b/hive/gateway/ec2/volume/DeleteVolume.go @@ -0,0 +1,44 @@ +package gateway_ec2_volume + +import ( + "errors" + "strings" + + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/hive/hive/awserrors" + handlers_ec2_volume "github.com/mulgadc/hive/hive/handlers/ec2/volume" + "github.com/nats-io/nats.go" +) + +// ValidateDeleteVolumeInput validates the input parameters +func ValidateDeleteVolumeInput(input *ec2.DeleteVolumeInput) error { + if input == nil { + return errors.New(awserrors.ErrorInvalidParameterValue) + } + + if input.VolumeId == nil || len(*input.VolumeId) <= len("vol-") || !strings.HasPrefix(*input.VolumeId, "vol-") { + return errors.New(awserrors.ErrorInvalidVolumeIDMalformed) + } + + return nil +} + +// DeleteVolume handles the DeleteVolume API call +func DeleteVolume(input *ec2.DeleteVolumeInput, natsConn *nats.Conn) (ec2.DeleteVolumeOutput, error) { + var output ec2.DeleteVolumeOutput + + err := ValidateDeleteVolumeInput(input) + if err != nil { + return output, err + } + + volumeService := handlers_ec2_volume.NewNATSVolumeService(natsConn) + result, err := volumeService.DeleteVolume(input) + + if err != nil { + return output, err + } + + output = *result + return output, nil +} diff --git a/hive/gateway/ec2/volume/DeleteVolume_test.go b/hive/gateway/ec2/volume/DeleteVolume_test.go new file mode 100644 index 000000000..8d7102c79 --- /dev/null +++ b/hive/gateway/ec2/volume/DeleteVolume_test.go @@ -0,0 +1,99 @@ +package gateway_ec2_volume + +import ( + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/hive/hive/awserrors" + "github.com/stretchr/testify/assert" +) + +func TestValidateDeleteVolumeInput(t *testing.T) { + tests := []struct { + name string + input *ec2.DeleteVolumeInput + wantErr bool + errMsg string + }{ + { + name: "NilInput", + input: nil, + wantErr: true, + errMsg: awserrors.ErrorInvalidParameterValue, + }, + { + name: "EmptyInput_NoVolumeId", + input: &ec2.DeleteVolumeInput{}, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + { + name: "ValidVolumeId", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String("vol-0123456789abcdef0"), + }, + wantErr: false, + }, + { + name: "ValidVolumeId_Short", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String("vol-abc123"), + }, + wantErr: false, + }, + { + name: "InvalidVolumeId_NoPrefix", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String("invalid-id"), + }, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + { + name: "InvalidVolumeId_WrongPrefix", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String("ami-0123456789abcdef0"), + }, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + { + name: "InvalidVolumeId_BarePrefix", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String("vol-"), + }, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + { + name: "InvalidVolumeId_EmptyString", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String(""), + }, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + { + name: "InvalidVolumeId_Nil", + input: &ec2.DeleteVolumeInput{ + VolumeId: nil, + }, + wantErr: true, + errMsg: awserrors.ErrorInvalidVolumeIDMalformed, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := ValidateDeleteVolumeInput(tt.input) + + if tt.wantErr { + assert.Error(t, err) + assert.Equal(t, tt.errMsg, err.Error()) + } else { + assert.NoError(t, err) + } + }) + } +} diff --git a/hive/handlers/ec2/volume/service.go b/hive/handlers/ec2/volume/service.go index 3b38de267..18c948d68 100644 --- a/hive/handlers/ec2/volume/service.go +++ b/hive/handlers/ec2/volume/service.go @@ -7,4 +7,5 @@ type VolumeService interface { CreateVolume(input *ec2.CreateVolumeInput) (*ec2.Volume, error) DescribeVolumes(input *ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error) ModifyVolume(input *ec2.ModifyVolumeInput) (*ec2.ModifyVolumeOutput, error) + DeleteVolume(input *ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error) } diff --git a/hive/handlers/ec2/volume/service_impl.go b/hive/handlers/ec2/volume/service_impl.go index 983e741bb..2607eed19 100644 --- a/hive/handlers/ec2/volume/service_impl.go +++ b/hive/handlers/ec2/volume/service_impl.go @@ -26,6 +26,7 @@ import ( "github.com/mulgadc/hive/hive/utils" "github.com/mulgadc/viperblock/viperblock" s3backend "github.com/mulgadc/viperblock/viperblock/backends/s3" + "github.com/nats-io/nats.go" "golang.org/x/net/http2" ) @@ -35,10 +36,11 @@ const defaultGP3IOPS = 3000 type VolumeServiceImpl struct { config *config.Config s3Client *s3.S3 + natsConn *nats.Conn } // NewVolumeServiceImpl creates a new daemon-side volume service -func NewVolumeServiceImpl(cfg *config.Config) *VolumeServiceImpl { +func NewVolumeServiceImpl(cfg *config.Config, natsConn *nats.Conn) *VolumeServiceImpl { // Create HTTP client with TLS verification disabled and HTTP/2 support tr := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -69,6 +71,7 @@ func NewVolumeServiceImpl(cfg *config.Config) *VolumeServiceImpl { return &VolumeServiceImpl{ config: cfg, s3Client: s3Client, + natsConn: natsConn, } } @@ -555,3 +558,106 @@ func (s *VolumeServiceImpl) ModifyVolume(input *ec2.ModifyVolumeInput) (*ec2.Mod VolumeModification: modification, }, nil } + +// DeleteVolume deletes an EBS volume: validates state, notifies viperblockd, and removes S3 data +func (s *VolumeServiceImpl) DeleteVolume(input *ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error) { + if input == nil || input.VolumeId == nil || *input.VolumeId == "" { + return nil, errors.New(awserrors.ErrorInvalidParameterValue) + } + + volumeID := *input.VolumeId + slog.Info("DeleteVolume request", "volumeId", volumeID) + + // Fetch volume config to validate state + cfg, err := s.getVolumeConfig(volumeID) + if err != nil { + slog.Error("DeleteVolume failed to get volume config", "volumeId", volumeID, "err", err) + return nil, err + } + + // Validate: volume must be available and not attached + if cfg.VolumeMetadata.State != "available" || cfg.VolumeMetadata.AttachedInstance != "" { + slog.Error("DeleteVolume: volume is in use", "volumeId", volumeID, "state", cfg.VolumeMetadata.State, "attachedInstance", cfg.VolumeMetadata.AttachedInstance) + return nil, errors.New(awserrors.ErrorVolumeInUse) + } + + // Notify viperblockd to stop nbdkit/WAL syncer (best-effort) + if s.natsConn != nil { + deleteReq := config.EBSDeleteRequest{Volume: volumeID} + deleteData, err := json.Marshal(deleteReq) + if err != nil { + slog.Error("DeleteVolume failed to marshal ebs.delete request", "volumeId", volumeID, "err", err) + } else { + msg, err := s.natsConn.Request("ebs.delete", deleteData, 5*time.Second) + if err != nil { + slog.Warn("ebs.delete notification failed (volume may not be mounted)", "volumeId", volumeID, "err", err) + } else { + var deleteResp config.EBSDeleteResponse + if json.Unmarshal(msg.Data, &deleteResp) == nil && deleteResp.Error != "" { + slog.Error("ebs.delete returned error", "volumeId", volumeID, "err", deleteResp.Error) + return nil, errors.New(awserrors.ErrorServerInternal) + } + } + } + } else { + slog.Warn("DeleteVolume: natsConn is nil, skipping viperblockd notification", "volumeId", volumeID) + } + + // Delete all S3 objects for this volume and its sub-volumes. + // Auxiliary prefixes are deleted first so the main config.json remains + // available for retry if an auxiliary deletion fails. + prefixes := []string{ + volumeID + "-efi/", + volumeID + "-cloudinit/", + volumeID + "/", + } + + for _, prefix := range prefixes { + if err := s.deleteS3Prefix(prefix); err != nil { + slog.Error("DeleteVolume failed to delete S3 prefix", "prefix", prefix, "err", err) + return nil, errors.New(awserrors.ErrorServerInternal) + } + } + + slog.Info("DeleteVolume completed", "volumeId", volumeID) + + return &ec2.DeleteVolumeOutput{}, nil +} + +// deleteS3Prefix deletes all S3 objects under the given prefix +func (s *VolumeServiceImpl) deleteS3Prefix(prefix string) error { + bucket := s.config.Predastore.Bucket + + var continuationToken *string + for { + listOutput, err := s.s3Client.ListObjectsV2(&s3.ListObjectsV2Input{ + Bucket: aws.String(bucket), + Prefix: aws.String(prefix), + ContinuationToken: continuationToken, + }) + if err != nil { + return fmt.Errorf("failed to list objects with prefix %s: %w", prefix, err) + } + + if len(listOutput.Contents) == 0 { + break + } + + for _, obj := range listOutput.Contents { + _, err := s.s3Client.DeleteObject(&s3.DeleteObjectInput{ + Bucket: aws.String(bucket), + Key: obj.Key, + }) + if err != nil { + return fmt.Errorf("failed to delete object %s: %w", *obj.Key, err) + } + } + + if !aws.BoolValue(listOutput.IsTruncated) { + break + } + continuationToken = listOutput.NextContinuationToken + } + + return nil +} diff --git a/hive/handlers/ec2/volume/service_impl_test.go b/hive/handlers/ec2/volume/service_impl_test.go index b6ee316c5..e88443192 100644 --- a/hive/handlers/ec2/volume/service_impl_test.go +++ b/hive/handlers/ec2/volume/service_impl_test.go @@ -8,6 +8,7 @@ import ( "github.com/mulgadc/hive/hive/awserrors" "github.com/mulgadc/hive/hive/config" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func newTestVolumeService(az string) *VolumeServiceImpl { @@ -185,3 +186,46 @@ func TestCreateVolume_PassesValidation(t *testing.T) { }) } } + +func TestDeleteVolume_Validation(t *testing.T) { + tests := []struct { + name string + input *ec2.DeleteVolumeInput + wantErr string + }{ + { + name: "NilInput", + input: nil, + wantErr: awserrors.ErrorInvalidParameterValue, + }, + { + name: "EmptyInput", + input: &ec2.DeleteVolumeInput{}, + wantErr: awserrors.ErrorInvalidParameterValue, + }, + { + name: "NilVolumeId", + input: &ec2.DeleteVolumeInput{ + VolumeId: nil, + }, + wantErr: awserrors.ErrorInvalidParameterValue, + }, + { + name: "EmptyVolumeId", + input: &ec2.DeleteVolumeInput{ + VolumeId: aws.String(""), + }, + wantErr: awserrors.ErrorInvalidParameterValue, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + svc := newTestVolumeService("ap-southeast-2a") + _, err := svc.DeleteVolume(tt.input) + require.Error(t, err) + assert.Equal(t, tt.wantErr, err.Error()) + }) + } +} + diff --git a/hive/handlers/ec2/volume/service_nats.go b/hive/handlers/ec2/volume/service_nats.go index 24486afe2..c35dfd41f 100644 --- a/hive/handlers/ec2/volume/service_nats.go +++ b/hive/handlers/ec2/volume/service_nats.go @@ -98,3 +98,29 @@ func (s *NATSVolumeService) ModifyVolume(input *ec2.ModifyVolumeInput) (*ec2.Mod return &output, nil } + +// DeleteVolume sends a DeleteVolume request via NATS and waits for response +func (s *NATSVolumeService) DeleteVolume(input *ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error) { + jsonData, err := json.Marshal(input) + if err != nil { + return nil, fmt.Errorf("failed to marshal input: %w", err) + } + + msg, err := s.natsConn.Request("ec2.DeleteVolume", jsonData, 30*time.Second) + if err != nil { + return nil, fmt.Errorf("NATS request failed: %w", err) + } + + responseError, err := utils.ValidateErrorPayload(msg.Data) + if err != nil { + return nil, errors.New(*responseError.Code) + } + + var output ec2.DeleteVolumeOutput + err = json.Unmarshal(msg.Data, &output) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal response: %w", err) + } + + return &output, nil +} diff --git a/hive/services/hiveui/frontend/dist/assets/_.js b/hive/services/hiveui/frontend/dist/assets/_.js index 0e951e8ce..b59bdc9e2 100644 --- a/hive/services/hiveui/frontend/dist/assets/_.js +++ b/hive/services/hiveui/frontend/dist/assets/_.js @@ -1 +1 @@ -import{c as k,aH as v,aI as B,aC as $,j as s,aB as C,aJ as P,aK as y,aE as K}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as E,U as I}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function W(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=F($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(I,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(E,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(K,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{W as component}; +import{c as k,aG as v,aH as B,aC as $,j as s,aB as C,aI as P,aJ as y,aE as K}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as E,U as I}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function J(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=F($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(I,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(E,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(K,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{J as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id.js b/hive/services/hiveui/frontend/dist/assets/_id.js index 7a83ea564..ce393c167 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id.js +++ b/hive/services/hiveui/frontend/dist/assets/_id.js @@ -1 +1 @@ -import{c as O,bo as T,u as D,bp as J,j as s,bq as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as q}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{d as le}from"./ec2.js";import"./useMutation.js";function fe(){const e=O.c(58),{id:R}=T.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:H}=se(S),A=H.Volumes?.[0],t=A?.VolumeId,l=le(),i=A?.Size??1;let a;e[2]!==i?(a=U(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==i?(n={size:i},e[4]=i,e[5]=n):n=e[5];let B;e[6]!==a||e[7]!==n?(B={resolver:a,defaultValues:n},e[6]=a,e[7]=n,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:L}=W(B),{errors:V,isSubmitting:$}=L;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(q,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let F;e[10]!==l||e[11]!==o||e[12]!==t?(F=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(q,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(te,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||l.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||l.isPending,M=$||l.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{fe as component}; +import{c as T,bn as q,u as D,bo as J,j as s,bp as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as H}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{d as le}from"./ec2.js";import"./useMutation.js";function fe(){const e=T.c(58),{id:R}=q.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:L}=se(S),A=L.Volumes?.[0],t=A?.VolumeId,l=le(),i=A?.Size??1;let n;e[2]!==i?(n=U(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=n):n=e[3];let a;e[4]!==i?(a={size:i},e[4]=i,e[5]=a):a=e[5];let B;e[6]!==n||e[7]!==a?(B={resolver:n,defaultValues:a},e[6]=n,e[7]=a,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:O}=W(B),{errors:V,isSubmitting:$}=O;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(H,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let F;e[10]!==l||e[11]!==o||e[12]!==t?(F=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(H,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(te,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||l.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||l.isPending,M=$||l.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{fe as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id2.js b/hive/services/hiveui/frontend/dist/assets/_id2.js index bc58ce908..e057bc2d8 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id2.js +++ b/hive/services/hiveui/frontend/dist/assets/_id2.js @@ -1 +1 @@ -import{c as E,bz as N,bA as K,j as l,aE as R,aF as k,B as z,bq as Z}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as p,a}from"./detail-row.js";import{P as H}from"./page-heading.js";import{B as P}from"./badge.js";function G(){const e=E.c(49),{id:A}=N.useParams();let V;e[0]!==A?(V=Z(A),e[0]=A,e[1]=V):V=e[1];const{data:_}=F(V),t=_.Volumes?.[0];if(!t?.VolumeId){let T;return e[2]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsxs(l.Fragment,{children:[l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[2]=T):T=e[2],T}let h;e[3]!==t.CreateTime?(h=K(t.CreateTime),e[3]=t.CreateTime,e[4]=h):h=e[4];const D=h;let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=I):I=e[5];let s;e[6]!==t.State||e[7]!==t.VolumeId?(s=t.State==="available"?l.jsx(R,{className:k({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(z,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[6]=t.State,e[7]=t.VolumeId,e[8]=s):s=e[8];let i;e[9]!==t.State?(i=t.State&&l.jsx(P,{variant:t.State==="available"?"default":"outline",children:t.State}),e[9]=t.State,e[10]=i):i=e[10];let o;e[11]!==s||e[12]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[s,i]}),e[11]=s,e[12]=i,e[13]=o):o=e[13];let n;e[14]!==o||e[15]!==t.VolumeId?(n=l.jsx(H,{actions:o,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[14]=o,e[15]=t.VolumeId,e[16]=n):n=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(p.Header,{children:"Volume Information"}),e[17]=y):y=e[17];let m;e[18]!==t.VolumeId?(m=l.jsx(a,{label:"Volume ID",value:t.VolumeId}),e[18]=t.VolumeId,e[19]=m):m=e[19];const B=`${t.Size} GiB`;let r;e[20]!==B?(r=l.jsx(a,{label:"Size",value:B}),e[20]=B,e[21]=r):r=e[21];let u;e[22]!==t.VolumeType?(u=l.jsx(a,{label:"Volume Type",value:t.VolumeType}),e[22]=t.VolumeType,e[23]=u):u=e[23];let c;e[24]!==t.State?(c=l.jsx(a,{label:"State",value:t.State}),e[24]=t.State,e[25]=c):c=e[25];let d;e[26]!==t.AvailabilityZone?(d=l.jsx(a,{label:"Availability Zone",value:t.AvailabilityZone}),e[26]=t.AvailabilityZone,e[27]=d):d=e[27];let f;e[28]!==D?(f=l.jsx(a,{label:"Create Time",value:D}),e[28]=D,e[29]=f):f=e[29];const g=t.Encrypted?"Yes":"No";let x;e[30]!==g?(x=l.jsx(a,{label:"Encrypted",value:g}),e[30]=g,e[31]=x):x=e[31];let j;e[32]!==t.KmsKeyId?(j=l.jsx(a,{label:"KMS Key ID",value:t.KmsKeyId}),e[32]=t.KmsKeyId,e[33]=j):j=e[33];let v;e[34]!==r||e[35]!==u||e[36]!==c||e[37]!==d||e[38]!==f||e[39]!==x||e[40]!==j||e[41]!==m?(v=l.jsxs(p,{children:[y,l.jsxs(p.Content,{children:[m,r,u,c,d,f,x,j]})]}),e[34]=r,e[35]=u,e[36]=c,e[37]=d,e[38]=f,e[39]=x,e[40]=j,e[41]=m,e[42]=v):v=e[42];let b;e[43]!==t.Attachments?(b=t.Attachments&&t.Attachments.length>0&&l.jsxs(p,{children:[l.jsx(p.Header,{children:"Attachments"}),t.Attachments.map($)]}),e[43]=t.Attachments,e[44]=b):b=e[44];let S;return e[45]!==v||e[46]!==b||e[47]!==n?(S=l.jsxs(l.Fragment,{children:[I,l.jsxs("div",{className:"space-y-6",children:[n,v,b]})]}),e[45]=v,e[46]=b,e[47]=n,e[48]=S):S=e[48],S}function $(e){return l.jsxs(p.Content,{children:[l.jsx(a,{label:"Instance ID",value:e.InstanceId}),l.jsx(a,{label:"Device",value:e.Device}),l.jsx(a,{label:"Status",value:e.State}),l.jsx(a,{label:"Attach Time",value:K(e.AttachTime)}),l.jsx(a,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{G as component}; +import{c as W,by as X,u as ee,r as te,bz as q,j as l,aE as le,bA as se,B as Y,bp as ae}from"./index.js";import{u as ie}from"./useSuspenseQuery.js";import{B as G}from"./back-link.js";import{D as I,a as s}from"./detail-row.js";import{P as oe}from"./page-heading.js";import{b as ne,c as re,d as me,h as ce,a as ue,e as de,f as fe,g as he}from"./alert-dialog.js";import{B as xe}from"./badge.js";import{e as je}from"./ec2.js";import{T as be}from"./trash-2.js";import"./useMutation.js";function Ce(){const e=W.c(75),{id:i}=X.useParams(),w=ee();let T;e[0]!==i?(T=ae(i),e[0]=i,e[1]=T):T=e[1];const{data:J}=ie(T),t=J.Volumes?.[0],a=je(),[H,Q]=te.useState(!1),U=t?.State==="available"&&(!t.Attachments||t.Attachments.length===0);let _;e[2]!==a||e[3]!==i||e[4]!==w?(_=async()=>{await a.mutateAsync(i),w({to:"/ec2/describe-volumes"})},e[2]=a,e[3]=i,e[4]=w,e[5]=_):_=e[5];const Z=_;if(!t?.VolumeId){let R;return e[6]===Symbol.for("react.memo_cache_sentinel")?(R=l.jsxs(l.Fragment,{children:[l.jsx(G,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[6]=R):R=e[6],R}let C;e[7]!==t.CreateTime?(C=q(t.CreateTime),e[7]=t.CreateTime,e[8]=C):C=e[8];const F=C;let B;e[9]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx(G,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[9]=B):B=e[9];const O=!U;let K;e[10]===Symbol.for("react.memo_cache_sentinel")?(K=()=>Q(!0),e[10]=K):K=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(be,{className:"size-4"}),e[11]=N):N=e[11];let o;e[12]!==O?(o=l.jsxs(Y,{disabled:O,onClick:K,size:"sm",variant:"destructive",children:[N,"Delete"]}),e[12]=O,e[13]=o):o=e[13];let n;e[14]!==t.State||e[15]!==t.VolumeId?(n=t.State==="available"?l.jsx(le,{className:se({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(Y,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[14]=t.State,e[15]=t.VolumeId,e[16]=n):n=e[16];let r;e[17]!==t.State?(r=t.State&&l.jsx(xe,{variant:t.State==="available"?"default":"outline",children:t.State}),e[17]=t.State,e[18]=r):r=e[18];let m;e[19]!==o||e[20]!==n||e[21]!==r?(m=l.jsxs("div",{className:"flex items-center gap-2",children:[o,n,r]}),e[19]=o,e[20]=n,e[21]=r,e[22]=m):m=e[22];let c;e[23]!==m||e[24]!==t.VolumeId?(c=l.jsx(oe,{actions:m,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[23]=m,e[24]=t.VolumeId,e[25]=c):c=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(I.Header,{children:"Volume Information"}),e[26]=k):k=e[26];let u;e[27]!==t.VolumeId?(u=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[27]=t.VolumeId,e[28]=u):u=e[28];const $=`${t.Size} GiB`;let d;e[29]!==$?(d=l.jsx(s,{label:"Size",value:$}),e[29]=$,e[30]=d):d=e[30];let f;e[31]!==t.VolumeType?(f=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[31]=t.VolumeType,e[32]=f):f=e[32];let h;e[33]!==t.State?(h=l.jsx(s,{label:"State",value:t.State}),e[33]=t.State,e[34]=h):h=e[34];let x;e[35]!==t.AvailabilityZone?(x=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[35]=t.AvailabilityZone,e[36]=x):x=e[36];let j;e[37]!==F?(j=l.jsx(s,{label:"Create Time",value:F}),e[37]=F,e[38]=j):j=e[38];const L=t.Encrypted?"Yes":"No";let b;e[39]!==L?(b=l.jsx(s,{label:"Encrypted",value:L}),e[39]=L,e[40]=b):b=e[40];let v;e[41]!==t.KmsKeyId?(v=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[41]=t.KmsKeyId,e[42]=v):v=e[42];let p;e[43]!==u||e[44]!==d||e[45]!==f||e[46]!==h||e[47]!==x||e[48]!==j||e[49]!==b||e[50]!==v?(p=l.jsxs(I,{children:[k,l.jsxs(I.Content,{children:[u,d,f,h,x,j,b,v]})]}),e[43]=u,e[44]=d,e[45]=f,e[46]=h,e[47]=x,e[48]=j,e[49]=b,e[50]=v,e[51]=p):p=e[51];let D;e[52]!==t.Attachments?(D=t.Attachments&&t.Attachments.length>0&&l.jsxs(I,{children:[l.jsx(I.Header,{children:"Attachments"}),t.Attachments.map(ve)]}),e[52]=t.Attachments,e[53]=D):D=e[53];let y;e[54]!==c||e[55]!==p||e[56]!==D?(y=l.jsxs("div",{className:"space-y-6",children:[c,p,D]}),e[54]=c,e[55]=p,e[56]=D,e[57]=y):y=e[57];let z;e[58]===Symbol.for("react.memo_cache_sentinel")?(z=l.jsx(ue,{children:"Delete Volume"}),e[58]=z):z=e[58];let V;e[59]!==t.VolumeId?(V=l.jsxs(ne,{children:[z,l.jsxs(re,{children:['Are you sure you want to delete the volume "',t.VolumeId,'"? This action cannot be undone.']})]}),e[59]=t.VolumeId,e[60]=V):V=e[60];let E;e[61]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx(de,{children:"Cancel"}),e[61]=E):E=e[61];const M=a.isPending?"Deleting…":"Delete";let g;e[62]!==a.isPending||e[63]!==Z||e[64]!==M?(g=l.jsxs(me,{children:[E,l.jsx(ce,{disabled:a.isPending,onClick:Z,children:M})]}),e[62]=a.isPending,e[63]=Z,e[64]=M,e[65]=g):g=e[65];let S;e[66]!==V||e[67]!==g?(S=l.jsxs(fe,{children:[V,g]}),e[66]=V,e[67]=g,e[68]=S):S=e[68];let A;e[69]!==H||e[70]!==S?(A=l.jsx(he,{onOpenChange:Q,open:H,children:S}),e[69]=H,e[70]=S,e[71]=A):A=e[71];let P;return e[72]!==y||e[73]!==A?(P=l.jsxs(l.Fragment,{children:[B,y,A]}),e[72]=y,e[73]=A,e[74]=P):P=e[74],P}function ve(e){return l.jsxs(I.Content,{children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:q(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{Ce as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id3.js b/hive/services/hiveui/frontend/dist/assets/_id3.js index 76dafda07..a09fba710 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id3.js +++ b/hive/services/hiveui/frontend/dist/assets/_id3.js @@ -1 +1 @@ -import{c as O,bB as Q,u as L,r as M,bA as V,j as t,bC as $,B as q}from"./index.js";import{u as G}from"./useSuspenseQuery.js";import{B as R}from"./back-link.js";import{D as x,a as j}from"./detail-row.js";import{P as J}from"./page-heading.js";import{b as U,c as W,d as X,h as Y,a as Z,e as ee,f as te,g as se}from"./alert-dialog.js";import{e as ie}from"./ec2.js";import{T as ae}from"./trash-2.js";import"./useMutation.js";function he(){const e=O.c(54),{id:a}=Q.useParams(),S=L();let K;e[0]!==a?(K=$(a),e[0]=a,e[1]=K):K=e[1];const{data:z}=G(K),s=z.KeyPairs?.[0],i=ie(),[w,H]=M.useState(!1);let D;e[2]!==i||e[3]!==a||e[4]!==S?(D=async()=>{await i.mutateAsync(a),S({to:"/ec2/describe-key-pairs"})},e[2]=i,e[3]=a,e[4]=S,e[5]=D):D=e[5];const B=D;if(!s?.KeyPairId){let v;return e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(t.Fragment,{children:[t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=v):v=e[6],v}let b;e[7]!==s.CreateTime?(b=V(s.CreateTime),e[7]=s.CreateTime,e[8]=b):b=e[8];const F=b;let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=P):P=e[9];let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=()=>H(!0),e[10]=T):T=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(q,{onClick:T,size:"sm",variant:"destructive",children:[t.jsx(ae,{className:"size-4"}),"Delete"]}),e[11]=C):C=e[11];const I=s.KeyName??"";let l;e[12]!==I?(l=t.jsx(J,{actions:C,subtitle:"EC2 Key Pair Details",title:I}),e[12]=I,e[13]=l):l=e[13];let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(x.Header,{children:"Key Pair Information"}),e[14]=_):_=e[14];let r;e[15]!==s.KeyName?(r=t.jsx(j,{label:"Key Name",value:s.KeyName}),e[15]=s.KeyName,e[16]=r):r=e[16];let n;e[17]!==s.KeyPairId?(n=t.jsx(j,{label:"Key Pair ID",value:s.KeyPairId}),e[17]=s.KeyPairId,e[18]=n):n=e[18];let o;e[19]!==s.KeyType?(o=t.jsx(j,{label:"Key Type",value:s.KeyType}),e[19]=s.KeyType,e[20]=o):o=e[20];let c;e[21]!==s.KeyFingerprint?(c=t.jsx(j,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[21]=s.KeyFingerprint,e[22]=c):c=e[22];let m;e[23]!==F?(m=t.jsx(j,{label:"Creation Date",value:F}),e[23]=F,e[24]=m):m=e[24];let y;e[25]!==n||e[26]!==o||e[27]!==c||e[28]!==m||e[29]!==r?(y=t.jsxs(x,{children:[_,t.jsxs(x.Content,{children:[r,n,o,c,m]})]}),e[25]=n,e[26]=o,e[27]=c,e[28]=m,e[29]=r,e[30]=y):y=e[30];let d;e[31]!==s.Tags?(d=s.Tags&&s.Tags.length>0&&t.jsxs(x,{children:[t.jsx(x.Header,{children:"Tags"}),t.jsx(x.Content,{children:s.Tags.map(le)})]}),e[31]=s.Tags,e[32]=d):d=e[32];let f;e[33]!==y||e[34]!==d||e[35]!==l?(f=t.jsxs("div",{className:"space-y-6",children:[l,y,d]}),e[33]=y,e[34]=d,e[35]=l,e[36]=f):f=e[36];let k;e[37]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Z,{children:"Delete Key Pair"}),e[37]=k):k=e[37];let p;e[38]!==s.KeyName?(p=t.jsxs(U,{children:[k,t.jsxs(W,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[38]=s.KeyName,e[39]=p):p=e[39];let A;e[40]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ee,{children:"Cancel"}),e[40]=A):A=e[40];const E=i.isPending?"Deleting…":"Delete";let h;e[41]!==i.isPending||e[42]!==B||e[43]!==E?(h=t.jsxs(X,{children:[A,t.jsx(Y,{disabled:i.isPending,onClick:B,children:E})]}),e[41]=i.isPending,e[42]=B,e[43]=E,e[44]=h):h=e[44];let u;e[45]!==p||e[46]!==h?(u=t.jsxs(te,{children:[p,h]}),e[45]=p,e[46]=h,e[47]=u):u=e[47];let g;e[48]!==w||e[49]!==u?(g=t.jsx(se,{onOpenChange:H,open:w,children:u}),e[48]=w,e[49]=u,e[50]=g):g=e[50];let N;return e[51]!==f||e[52]!==g?(N=t.jsxs(t.Fragment,{children:[P,f,g]}),e[51]=f,e[52]=g,e[53]=N):N=e[53],N}function le(e){return t.jsx(j,{label:e.Key||"",value:e.Value},e.Key)}export{he as component}; +import{c as O,bB as Q,u as L,r as M,bz as V,j as t,bC as $,B as q}from"./index.js";import{u as G}from"./useSuspenseQuery.js";import{B as R}from"./back-link.js";import{D as x,a as j}from"./detail-row.js";import{P as J}from"./page-heading.js";import{b as U,c as W,d as X,h as Y,a as Z,e as ee,f as te,g as se}from"./alert-dialog.js";import{f as ie}from"./ec2.js";import{T as ae}from"./trash-2.js";import"./useMutation.js";function he(){const e=O.c(54),{id:a}=Q.useParams(),S=L();let K;e[0]!==a?(K=$(a),e[0]=a,e[1]=K):K=e[1];const{data:z}=G(K),s=z.KeyPairs?.[0],i=ie(),[w,H]=M.useState(!1);let D;e[2]!==i||e[3]!==a||e[4]!==S?(D=async()=>{await i.mutateAsync(a),S({to:"/ec2/describe-key-pairs"})},e[2]=i,e[3]=a,e[4]=S,e[5]=D):D=e[5];const B=D;if(!s?.KeyPairId){let v;return e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(t.Fragment,{children:[t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=v):v=e[6],v}let b;e[7]!==s.CreateTime?(b=V(s.CreateTime),e[7]=s.CreateTime,e[8]=b):b=e[8];const F=b;let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=P):P=e[9];let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=()=>H(!0),e[10]=T):T=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(q,{onClick:T,size:"sm",variant:"destructive",children:[t.jsx(ae,{className:"size-4"}),"Delete"]}),e[11]=C):C=e[11];const I=s.KeyName??"";let l;e[12]!==I?(l=t.jsx(J,{actions:C,subtitle:"EC2 Key Pair Details",title:I}),e[12]=I,e[13]=l):l=e[13];let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(x.Header,{children:"Key Pair Information"}),e[14]=_):_=e[14];let r;e[15]!==s.KeyName?(r=t.jsx(j,{label:"Key Name",value:s.KeyName}),e[15]=s.KeyName,e[16]=r):r=e[16];let n;e[17]!==s.KeyPairId?(n=t.jsx(j,{label:"Key Pair ID",value:s.KeyPairId}),e[17]=s.KeyPairId,e[18]=n):n=e[18];let o;e[19]!==s.KeyType?(o=t.jsx(j,{label:"Key Type",value:s.KeyType}),e[19]=s.KeyType,e[20]=o):o=e[20];let c;e[21]!==s.KeyFingerprint?(c=t.jsx(j,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[21]=s.KeyFingerprint,e[22]=c):c=e[22];let m;e[23]!==F?(m=t.jsx(j,{label:"Creation Date",value:F}),e[23]=F,e[24]=m):m=e[24];let y;e[25]!==n||e[26]!==o||e[27]!==c||e[28]!==m||e[29]!==r?(y=t.jsxs(x,{children:[_,t.jsxs(x.Content,{children:[r,n,o,c,m]})]}),e[25]=n,e[26]=o,e[27]=c,e[28]=m,e[29]=r,e[30]=y):y=e[30];let d;e[31]!==s.Tags?(d=s.Tags&&s.Tags.length>0&&t.jsxs(x,{children:[t.jsx(x.Header,{children:"Tags"}),t.jsx(x.Content,{children:s.Tags.map(le)})]}),e[31]=s.Tags,e[32]=d):d=e[32];let f;e[33]!==y||e[34]!==d||e[35]!==l?(f=t.jsxs("div",{className:"space-y-6",children:[l,y,d]}),e[33]=y,e[34]=d,e[35]=l,e[36]=f):f=e[36];let k;e[37]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Z,{children:"Delete Key Pair"}),e[37]=k):k=e[37];let p;e[38]!==s.KeyName?(p=t.jsxs(U,{children:[k,t.jsxs(W,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[38]=s.KeyName,e[39]=p):p=e[39];let A;e[40]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ee,{children:"Cancel"}),e[40]=A):A=e[40];const E=i.isPending?"Deleting…":"Delete";let h;e[41]!==i.isPending||e[42]!==B||e[43]!==E?(h=t.jsxs(X,{children:[A,t.jsx(Y,{disabled:i.isPending,onClick:B,children:E})]}),e[41]=i.isPending,e[42]=B,e[43]=E,e[44]=h):h=e[44];let u;e[45]!==p||e[46]!==h?(u=t.jsxs(te,{children:[p,h]}),e[45]=p,e[46]=h,e[47]=u):u=e[47];let g;e[48]!==w||e[49]!==u?(g=t.jsx(se,{onOpenChange:H,open:w,children:u}),e[48]=w,e[49]=u,e[50]=g):g=e[50];let N;return e[51]!==f||e[52]!==g?(N=t.jsxs(t.Fragment,{children:[P,f,g]}),e[51]=f,e[52]=g,e[53]=N):N=e[53],N}function le(e){return t.jsx(j,{label:e.Key||"",value:e.Value},e.Key)}export{he as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id4.js b/hive/services/hiveui/frontend/dist/assets/_id4.js index 1f0e9fed4..c72d5feb4 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id4.js +++ b/hive/services/hiveui/frontend/dist/assets/_id4.js @@ -1 +1 @@ -import{g as z,c as $,j as s,B as A,bN as F,bA as E,bO as H,bP as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D,a as r}from"./detail-row.js";import{P as V}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{f as G,g as Y,h as J,i as K}from"./ec2.js";import{T as U}from"./trash-2.js";import"./useMutation.js";const W=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],X=z("pause",W);const ee=[["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"}]],te=z("play",ee);const se=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ne=z("rotate-cw",se),ae=["pending","stopping","shutting-down","terminated"];function ie(e){const t=$.c(21),{instanceId:l,state:a}=e,n=G(),p=Y(),d=J(),f=K();if(ae.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=x):x=t[3];let m;t[4]!==l||t[5]!==n||t[6]!==a?(m=a==="stopped"&&s.jsxs(A,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(te,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=l,t[5]=n,t[6]=a,t[7]=m):m=t[7];let c;t[8]!==l||t[9]!==d||t[10]!==a||t[11]!==p?(c=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(A,{disabled:p.isPending,onClick:()=>p.mutate(l),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),p.isPending?"Stopping":"Stop"]}),s.jsxs(A,{disabled:d.isPending,onClick:()=>d.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ne,{className:"size-4"}),d.isPending?"Rebooting":"Reboot"]})]}),t[8]=l,t[9]=d,t[10]=a,t[11]=p,t[12]=c):c=t[12];let u;t[13]!==l||t[14]!==a||t[15]!==f?(u=(a==="stopped"||a==="running")&&s.jsxs(A,{disabled:f.isPending,onClick:()=>f.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(U,{className:"size-4"}),f.isPending?"Terminating":"Terminate"]}),t[13]=l,t[14]=a,t[15]=f,t[16]=u):u=t[16];let o;return t[17]!==m||t[18]!==c||t[19]!==u?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[x,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[m,c,u]})]}),t[17]=m,t[18]=c,t[19]=u,t[20]=o):o=t[20],o}function ge(){const e=$.c(48),{id:t}=F.useParams();let l;e[0]!==t?(l=H(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],p=n?.ImageId;let d;e[2]!==p?(d=Q(p),e[2]=p,e[3]=d):d=e[3];const{data:f}=L(d),B=f?.Images?.[0];if(!n?.InstanceId){let P;return e[4]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=P):P=e[4],P}let x;e[5]!==n.LaunchTime?(x=E(n.LaunchTime),e[5]=n.LaunchTime,e[6]=x):x=e[6];const m=x;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=c):c=e[7];const u=n.State?.Name;let o;e[8]!==u?(o=s.jsx(Z,{state:u}),e[8]=u,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(V,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const C=n.State?.Name;let g;e[13]!==n.InstanceId||e[14]!==C?(g=s.jsx(ie,{instanceId:n.InstanceId,state:C}),e[13]=n.InstanceId,e[14]=C,e[15]=g):g=e[15];let M;e[16]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(D.Header,{children:"Instance Information"}),e[16]=M):M=e[16];let h;e[17]!==n.InstanceId?(h=s.jsx(r,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=h):h=e[18];let I;e[19]!==n.InstanceType?(I=s.jsx(r,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=I):I=e[20];const w=n.State?.Name;let b;e[21]!==w?(b=s.jsx(r,{label:"Instance State",value:w}),e[21]=w,e[22]=b):b=e[22];let j;e[23]!==n.State?.Code?(j=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(r,{label:"State Code",value:j}),e[25]=j,e[26]=v):v=e[26];let S;e[27]!==m?(S=s.jsx(r,{label:"Launch Time",value:m}),e[27]=m,e[28]=S):S=e[28];const R=n.Placement?.AvailabilityZone;let N;e[29]!==R?(N=s.jsx(r,{label:"Availability Zone",value:R}),e[29]=R,e[30]=N):N=e[30];let T;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==N?(T=s.jsxs(D,{children:[M,s.jsxs(D.Content,{children:[h,I,b,v,S,N]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=N,e[37]=T):T=e[37];let k;e[38]!==n.BlockDeviceMappings?(k=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(D,{children:[s.jsx(D.Header,{children:"Block Device Mappings"}),s.jsxs(D.Content,{children:[s.jsx(r,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(r,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(r,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(r,{label:"Attach Time",value:E(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(r,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=k):k=e[39];let y;e[40]!==B?(y=B&&s.jsx(q,{image:B}),e[40]=B,e[41]=y):y=e[41];let _;return e[42]!==T||e[43]!==k||e[44]!==y||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,T,k,y]})]}),e[42]=T,e[43]=k,e[44]=y,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; +import{g as R,c as $,j as s,B as C,bN as F,bz as E,bO as H,bP as Q}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D,a as r}from"./detail-row.js";import{P as V}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{g as G,h as Y,i as J,j as K}from"./ec2.js";import{T as U}from"./trash-2.js";import"./useMutation.js";const W=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],X=R("pause",W);const ee=[["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"}]],te=R("play",ee);const se=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ne=R("rotate-cw",se),ae=["pending","stopping","shutting-down","terminated"];function ie(e){const t=$.c(21),{instanceId:l,state:a}=e,n=G(),p=Y(),d=J(),f=K();if(ae.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=x):x=t[3];let m;t[4]!==l||t[5]!==n||t[6]!==a?(m=a==="stopped"&&s.jsxs(C,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(te,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=l,t[5]=n,t[6]=a,t[7]=m):m=t[7];let c;t[8]!==l||t[9]!==d||t[10]!==a||t[11]!==p?(c=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(C,{disabled:p.isPending,onClick:()=>p.mutate(l),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),p.isPending?"Stopping":"Stop"]}),s.jsxs(C,{disabled:d.isPending,onClick:()=>d.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ne,{className:"size-4"}),d.isPending?"Rebooting":"Reboot"]})]}),t[8]=l,t[9]=d,t[10]=a,t[11]=p,t[12]=c):c=t[12];let u;t[13]!==l||t[14]!==a||t[15]!==f?(u=(a==="stopped"||a==="running")&&s.jsxs(C,{disabled:f.isPending,onClick:()=>f.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(U,{className:"size-4"}),f.isPending?"Terminating":"Terminate"]}),t[13]=l,t[14]=a,t[15]=f,t[16]=u):u=t[16];let o;return t[17]!==m||t[18]!==c||t[19]!==u?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[x,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[m,c,u]})]}),t[17]=m,t[18]=c,t[19]=u,t[20]=o):o=t[20],o}function ge(){const e=$.c(48),{id:t}=F.useParams();let l;e[0]!==t?(l=H(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],p=n?.ImageId;let d;e[2]!==p?(d=Q(p),e[2]=p,e[3]=d):d=e[3];const{data:f}=L(d),B=f?.Images?.[0];if(!n?.InstanceId){let P;return e[4]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=P):P=e[4],P}let x;e[5]!==n.LaunchTime?(x=E(n.LaunchTime),e[5]=n.LaunchTime,e[6]=x):x=e[6];const m=x;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=c):c=e[7];const u=n.State?.Name;let o;e[8]!==u?(o=s.jsx(Z,{state:u}),e[8]=u,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(V,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const A=n.State?.Name;let g;e[13]!==n.InstanceId||e[14]!==A?(g=s.jsx(ie,{instanceId:n.InstanceId,state:A}),e[13]=n.InstanceId,e[14]=A,e[15]=g):g=e[15];let M;e[16]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(D.Header,{children:"Instance Information"}),e[16]=M):M=e[16];let h;e[17]!==n.InstanceId?(h=s.jsx(r,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=h):h=e[18];let I;e[19]!==n.InstanceType?(I=s.jsx(r,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=I):I=e[20];const w=n.State?.Name;let b;e[21]!==w?(b=s.jsx(r,{label:"Instance State",value:w}),e[21]=w,e[22]=b):b=e[22];let j;e[23]!==n.State?.Code?(j=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(r,{label:"State Code",value:j}),e[25]=j,e[26]=v):v=e[26];let S;e[27]!==m?(S=s.jsx(r,{label:"Launch Time",value:m}),e[27]=m,e[28]=S):S=e[28];const z=n.Placement?.AvailabilityZone;let N;e[29]!==z?(N=s.jsx(r,{label:"Availability Zone",value:z}),e[29]=z,e[30]=N):N=e[30];let T;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==N?(T=s.jsxs(D,{children:[M,s.jsxs(D.Content,{children:[h,I,b,v,S,N]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=N,e[37]=T):T=e[37];let k;e[38]!==n.BlockDeviceMappings?(k=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(D,{children:[s.jsx(D.Header,{children:"Block Device Mappings"}),s.jsxs(D.Content,{children:[s.jsx(r,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(r,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(r,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(r,{label:"Attach Time",value:E(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(r,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=k):k=e[39];let y;e[40]!==B?(y=B&&s.jsx(q,{image:B}),e[40]=B,e[41]=y):y=e[41];let _;return e[42]!==T||e[43]!==k||e[44]!==y||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,T,k,y]})]}),e[42]=T,e[43]=k,e[44]=y,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id5.js b/hive/services/hiveui/frontend/dist/assets/_id5.js index d9ce7d6c9..0c60bd405 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id5.js +++ b/hive/services/hiveui/frontend/dist/assets/_id5.js @@ -1 +1 @@ -import{c as g,c7 as u,j as s,bP as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),s.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==t.State?(a=t.State?s.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=a):a=e[5];let i;e[6]!==t.ImageId||e[7]!==a?(i=s.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==t?(m=s.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=s.jsxs(s.Fragment,{children:[r,s.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E as component}; +import{c as g,c8 as u,j as s,bP as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),s.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==t.State?(a=t.State?s.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=a):a=e[5];let i;e[6]!==t.ImageId||e[7]!==a?(i=s.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==t?(m=s.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=s.jsxs(s.Fragment,{children:[r,s.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/ami-details.js b/hive/services/hiveui/frontend/dist/assets/ami-details.js index 2c874a20e..6f1009454 100644 --- a/hive/services/hiveui/frontend/dist/assets/ami-details.js +++ b/hive/services/hiveui/frontend/dist/assets/ami-details.js @@ -1 +1 @@ -import{c as S,bA as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function C(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,A=s?"AMI Information":"AMI Details";let o;e[2]!==A?(o=t.jsx(T.Header,{children:A}),e[2]=A,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const R=l.Platform||"Linux";let v;e[14]!==R?(v=t.jsx(a,{label:"Platform",value:R}),e[14]=R,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let N;e[46]!==h||e[47]!==o?(N=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=N):N=e[48];let p;e[49]!==l.BlockDeviceMappings||e[50]!==s?(p=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(w),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=p):p=e[51];let E;return e[52]!==N||e[53]!==p?(E=t.jsxs(t.Fragment,{children:[N,p]}),e[52]=N,e[53]=p,e[54]=E):E=e[54],E}function w(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{C as A}; +import{c as S,bz as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function C(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,R=s?"AMI Information":"AMI Details";let o;e[2]!==R?(o=t.jsx(T.Header,{children:R}),e[2]=R,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const A=l.Platform||"Linux";let v;e[14]!==A?(v=t.jsx(a,{label:"Platform",value:A}),e[14]=A,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let N;e[46]!==h||e[47]!==o?(N=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=N):N=e[48];let p;e[49]!==l.BlockDeviceMappings||e[50]!==s?(p=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(z),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=p):p=e[51];let E;return e[52]!==N||e[53]!==p?(E=t.jsxs(t.Fragment,{children:[N,p]}),e[52]=N,e[53]=p,e[54]=E):E=e[54],E}function z(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{C as A}; diff --git a/hive/services/hiveui/frontend/dist/assets/badge.js b/hive/services/hiveui/frontend/dist/assets/badge.js index 137a3f166..59d658974 100644 --- a/hive/services/hiveui/frontend/dist/assets/badge.js +++ b/hive/services/hiveui/frontend/dist/assets/badge.js @@ -1 +1 @@ -import{c as g,a5 as f,a as b,by as p,c8 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; +import{c as g,a5 as f,a as b,bx as p,c9 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; diff --git a/hive/services/hiveui/frontend/dist/assets/ec2.js b/hive/services/hiveui/frontend/dist/assets/ec2.js index 5e05b573b..1d9b2c88d 100644 --- a/hive/services/hiveui/frontend/dist/assets/ec2.js +++ b/hive/services/hiveui/frontend/dist/assets/ec2.js @@ -1 +1 @@ -import{b4 as c,bQ as o,b6 as i,bR as I,bS as p,bT as f,bU as E,bV as b,bW as K,bX as P,bY as S,bZ as w,b_ as q,c as r,bl as u,b$ as m,aG as d,ax as y}from"./index.js";import{u as l}from"./useMutation.js";class v extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(I).build(){}class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateVolume",{}).n("EC2Client","CreateVolumeCommand").sc(p).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(f).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(E).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(b).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(P).build(){}class V extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(S).build(){}class A extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(w).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(q).build(){}const _=/\s+/;function j(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function B(e){const n=new V({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function F(e){const n=new A({InstanceIds:[e]});return await m().send(n)}function U(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function M(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function Y(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function D(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:async s=>{await n.cancelQueries(d);const a=n.getQueryData(d.queryKey);if(a&&s.Instances){const C={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(d.queryKey,{...a,Reservations:[...a.Reservations||[],C]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function N(e){const n=new z({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function k(e){const n=new v({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function ee(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function G(e){const t=e.publicKeyMaterial.trim().split(_).slice(0,2).join(" "),s=new g({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function ne(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:O,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function O(e){const n=new R({KeyPairId:e});return await m().send(n)}function te(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:Z,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function Z(e){const n=new $({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:"gp3"});return await m().send(n)}function se(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function W(e){const n=new Q({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}export{ee as a,L as b,J as c,se as d,ne as e,j as f,H as g,Y as h,U as i,te as u}; +import{b3 as c,bQ as o,b5 as i,bR as I,bS as f,bT as p,bU as E,bV as b,bW as K,bX as P,bY as w,bZ as S,b_ as q,b$ as v,c as u,bk as r,c0 as m,aF as d,ax as y}from"./index.js";import{u as l}from"./useMutation.js";class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(I).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateVolume",{}).n("EC2Client","CreateVolumeCommand").sc(f).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class V extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteVolume",{}).n("EC2Client","DeleteVolumeCommand").sc(E).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(b).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(P).build(){}class A extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(w).build(){}class D extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(S).build(){}class _ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(q).build(){}class F extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(v).build(){}const T=/\s+/;function Y(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function B(e){const n=new D({InstanceIds:[e]});return await m().send(n)}function J(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function M(e){const n=new _({InstanceIds:[e]});return await m().send(n)}function L(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function k(e){const n=new F({InstanceIds:[e]});return await m().send(n)}function ee(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function N(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function ne(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:async s=>{await n.cancelQueries(d);const a=n.getQueryData(d.queryKey);if(a&&s.Instances){const C={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(d.queryKey,{...a,Reservations:[...a.Reservations||[],C]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function G(e){const n=new A({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function te(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:O,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function O(e){const n=new $({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function se(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:Z,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function Z(e){const t=e.publicKeyMaterial.trim().split(T).slice(0,2).join(" "),s=new Q({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function ae(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:j,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function j(e){const n=new R({KeyPairId:e});return await m().send(n)}function ce(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function W(e){const n=new g({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:"gp3"});return await m().send(n)}function oe(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:X,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function X(e){const n=new x({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}function ie(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:h,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function h(e){const n=new V({VolumeId:e});return await m().send(n)}export{se as a,te as b,ne as c,oe as d,ie as e,ae as f,Y as g,J as h,ee as i,L as j,ce as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/field.js b/hive/services/hiveui/frontend/dist/assets/field.js index 6f6fedc51..778bc933a 100644 --- a/hive/services/hiveui/frontend/dist/assets/field.js +++ b/hive/services/hiveui/frontend/dist/assets/field.js @@ -1 +1 @@ -import{r as ee,br as re,V as Wt,E as st,bs as Ht,G as he,bt as $t,I as _t,ap as zt,ab as Gt,w as Kt,a9 as Yt,j as le,c as _e,a as xe,bu as _,bv as Zt,bw as Jt,bx as Qt,by as Xt}from"./index.js";let it=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const er={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tr={valid(e){return e===null?null:e?{[it.valid]:""}:{[it.invalid]:""}}},rr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:er,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=st)=>e,getInputValidationProps:(e=st)=>e,inputRef:{current:null},commit:async()=>{}}});function Ie(e=!0){const r=ee.useContext(rr);if(r.setValidityData===re&&!e)throw new Error(Wt(28));return r}const sr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function ir(){return ee.useContext(sr)}const ar=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function xt(){return ee.useContext(ar)}function nr(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function lr({controlled:e,default:r,name:t,state:s="value"}){const{current:n}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=n?e:a,b=ee.useCallback(x=>{n||o(x)},[]);return[d,b]}function or(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:n,setControlId:a}=xt(),o=Ht(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;$t(d)&&d.closest("label")!=null?a(r??null):a(n??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,n,a,t,o]),n??o}function ur(e){const{enabled:r=!0,value:t,id:s,name:n,controlRef:a,commit:o}=e,{formRef:d}=ir(),{invalid:b,markedDirtyRef:x,validityData:C,setValidityData:m}=Ie(),V=_t(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=V()),C.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,C.initialValue,V]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:V,name:n,controlRef:a,validityData:nr(C,b),validate(h=!0){let O=t;O===void 0&&(O=V()),x.current=!0,h?zt.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,V,s,b,x,n,C,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const dr=ee.forwardRef(function(r,t){const{render:s,className:n,id:a,name:o,value:d,disabled:b=!1,onValueChange:x,defaultValue:C,...m}=r,{state:V,name:h,disabled:O}=Ie(),T=O||b,U=h??o,M=ee.useMemo(()=>({...V,disabled:T}),[V,T]),{setTouched:p,setDirty:H,validityData:F,setFocused:E,setFilled:q,validationMode:te,validation:W}=Ie(),{labelId:X}=xt(),z=or({id:a});he(()=>{const R=d!=null;W.inputRef.current?.value||R&&d!==""?q(!0):R&&d===""&&q(!1)},[W.inputRef,q,d]);const[oe,w]=lr({controlled:d,default:C,name:"FieldControl",state:"value"}),k=d!==void 0,N=_t((R,L)=>{x?.(R,L),!L.isCanceled&&w(R)});return ur({id:z,name:U,commit:W.commit,value:oe,getValue:()=>W.inputRef.current?.value,controlRef:W.inputRef}),Gt("input",r,{ref:t,state:M,props:[{id:z,disabled:T,name:U,ref:W.inputRef,"aria-labelledby":X,...k?{value:oe}:{defaultValue:C},onChange(R){const L=R.currentTarget.value;N(L,Kt(Yt,R.nativeEvent)),H(L!==F.initialValue),q(L!=="")},onFocus(){E(!0)},onBlur(R){p(!0),E(!1),te==="onBlur"&&W.commit(R.currentTarget.value)},onKeyDown(R){R.currentTarget.tagName==="INPUT"&&R.key==="Enter"&&(p(!0),W.commit(R.currentTarget.value))}},W.getInputValidationProps(),m],stateAttributesMapping:tr})}),fr=ee.forwardRef(function(r,t){return le.jsx(dr,{ref:t,...r})});function Br(e){const r=_e.c(10);let t,s,n;r[0]!==e?({className:t,type:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);let a;r[4]!==t?(a=xe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==n?(o=le.jsx(fr,{className:a,"data-slot":"input",type:n,...s}),r[6]=s,r[7]=a,r[8]=n,r[9]=o):o=r[9],o}var pe=e=>e.type==="checkbox",de=e=>e instanceof Date,Z=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&pt(e)&&!de(e),Ft=e=>j(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,cr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wt=(e,r)=>e.has(cr(r)),yr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Le&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&yr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=P(e[n]));return s}var ke=e=>/^\w*$/.test(e),I=e=>e===void 0,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(ke(r)?[r]:Be(r)).reduce((n,a)=>Z(n)?n:n[a],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",Y=e=>typeof e=="function",S=(e,r,t)=>{let s=-1;const n=ke(r)?[r]:Be(r),a=n.length,o=a-1;for(;++s_.useContext(Et);var kt=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return n};const qe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gr(e){const r=je(),{control:t=r,disabled:s,name:n,exact:a}=e||{},[o,d]=_.useState(t._formState),b=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return qe(()=>t._subscribe({name:n,formState:b.current,exact:a,callback:x=>{!s&&d({...t._formState,...x})}}),[n,s,a]),_.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>kt(o,t,b.current,!1),[o,t])}var Q=e=>typeof e=="string",Te=(e,r,t,s,n)=>Q(e)?(s&&r.watch.add(e),y(t,e,n)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Me=e=>Z(e)||!pt(e);function ie(e,r,t=new WeakSet){if(Me(e)||Me(r))return Object.is(e,r);if(de(e)&&de(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),n=Object.keys(r);if(s.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=r[a];if(de(o)&&de(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function mr(e){const r=je(),{control:t=r,name:s,defaultValue:n,disabled:a,exact:o,compute:d}=e||{},b=_.useRef(n),x=_.useRef(d),C=_.useRef(void 0),m=_.useRef(t),V=_.useRef(s);x.current=d;const[h,O]=_.useState(()=>{const F=t._getWatch(s,b.current);return x.current?x.current(F):F}),T=_.useCallback(F=>{const E=Te(s,t._names,F||t._formValues,!1,b.current);return x.current?x.current(E):E},[t._formValues,t._names,s]),U=_.useCallback(F=>{if(!a){const E=Te(s,t._names,F||t._formValues,!1,b.current);if(x.current){const q=x.current(E);ie(q,C.current)||(O(q),C.current=q)}else O(E)}},[t._formValues,t._names,a,s]);qe(()=>((m.current!==t||!ie(V.current,s))&&(m.current=t,V.current=s,U()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:F=>{U(F.values)}})),[t,o,s,U]),_.useEffect(()=>t._removeUnmounted());const M=m.current!==t,p=V.current,H=_.useMemo(()=>{if(a)return null;const F=!M&&!ie(p,s);return M||F?T():null},[a,M,s,p,T]);return H!==null?H:h}function vr(e){const r=je(),{name:t,disabled:s,control:n=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,b=wt(n._names.array,t),x=_.useMemo(()=>y(n._formValues,t,y(n._defaultValues,t,o)),[n,t,o]),C=mr({control:n,name:t,defaultValue:x,exact:d}),m=gr({control:n,name:t,exact:d}),V=_.useRef(e),h=_.useRef(void 0),O=_.useRef(n.register(t,{...e.rules,value:C,...J(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const T=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),U=_.useCallback(F=>O.current.onChange({target:{value:Ft(F),name:t},type:Fe.CHANGE}),[t]),M=_.useCallback(()=>O.current.onBlur({target:{value:y(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),p=_.useCallback(F=>{const E=y(n._fields,t);E&&E._f&&F&&(E._f.ref={focus:()=>Y(F.focus)&&F.focus(),select:()=>Y(F.select)&&F.select(),setCustomValidity:q=>Y(F.setCustomValidity)&&F.setCustomValidity(q),reportValidity:()=>Y(F.reportValidity)&&F.reportValidity()})},[n._fields,t]),H=_.useMemo(()=>({name:t,value:C,...J(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:U,onBlur:M,ref:p}),[t,s,m.disabled,U,M,p,C]);return _.useEffect(()=>{const F=n._options.shouldUnregister||a,E=h.current;E&&E!==t&&!b&&n.unregister(E),n.register(t,{...V.current.rules,...J(V.current.disabled)?{disabled:V.current.disabled}:{}});const q=(te,W)=>{const X=y(n._fields,te);X&&X._f&&(X._f.mount=W)};if(q(t,!0),F){const te=P(y(n._options.defaultValues,t,V.current.defaultValue));S(n._defaultValues,t,te),I(y(n._formValues,t))&&S(n._formValues,t,te)}return!b&&n.register(t),h.current=t,()=>{(b?F&&!n._state.action:F)?n.unregister(t):q(t,!1)}},[t,n,b,a]),_.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),_.useMemo(()=>({field:H,formState:m,fieldState:T}),[H,m,T])}const jr=e=>e.render(vr(e)),hr=_.createContext(null);hr.displayName="HookFormContext";var We=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Ct(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const n=e[s],a=r[s];if(n&&j(n)&&a){const o=Ct(n,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var K=e=>j(e)&&!Object.keys(e).length,He=e=>e.type==="file",we=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},At=e=>e.type==="select-multiple",$e=e=>e.type==="radio",br=e=>$e(e)||pe(e),Oe=e=>we(e)&&e.isConnected;function Vr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(Y(e[r]))return!0;return!1};function Dt(e){return Array.isArray(e)||j(e)&&!xr(e)}function Ne(e,r={}){for(const t in e){const s=e[t];Dt(s)?(r[t]=Array.isArray(s)?[]:{},Ne(s,r[t])):I(s)||(r[t]=!0)}return r}function ce(e,r,t){t||(t=Ne(r));for(const s in e){const n=e[s];if(Dt(n))I(r)||Me(t[s])?t[s]=Ne(n,Array.isArray(n)?[]:{}):ce(n,Z(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(n,a)}}return t}const nt={value:!1,isValid:!1},lt={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:nt}return nt},Rt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&Q(e)?new Date(e):s?s(e):e;const ot={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ut(e){const r=e.ref;return He(r)?r.files:$e(r)?Ot(e.refs).value:At(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?St(e.refs).value:Rt(I(r.value)?e.ref.value:r.value,e)}var pr=(e,r,t,s)=>{const n={};for(const a of e){const o=y(r,a);o&&S(n,a,o._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>I(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,dt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ft="AsyncFunction";var Fr=e=>!!e&&!!e.validate&&!!(Y(e.validate)&&e.validate.constructor.name===ft||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ft)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ct=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ve=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const a=y(e,n);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],n)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ve(d,r))break}else if(j(d)&&Ve(d,r))break}}};function yt(e,r,t){const s=y(e,t);if(s||ke(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};n.pop()}return{name:t}}var Er=(e,r,t,s)=>{t(e);const{name:n,...a}=e;return K(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},kr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Cr=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Ar=(e,r)=>!Pe(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=be(y(e,t));return S(s,"root",r[t]),S(e,t,s),e};function gt(e,r,t="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||J(e)&&!e)return{type:t,message:Q(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},mt=async(e,r,t,s,n,a)=>{const{ref:o,refs:d,required:b,maxLength:x,minLength:C,min:m,max:V,pattern:h,validate:O,name:T,valueAsNumber:U,mount:M}=e._f,p=y(t,T);if(!M||r.has(T))return{};const H=d?d[0]:o,F=w=>{n&&H.reportValidity&&(H.setCustomValidity(J(w)?"":w||""),H.reportValidity())},E={},q=$e(o),te=pe(o),W=q||te,X=(U||He(o))&&I(o.value)&&I(p)||we(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,z=We.bind(null,T,s,E),oe=(w,k,N,$=ae.maxLength,R=ae.minLength)=>{const L=w?k:N;E[T]={type:w?$:R,message:L,ref:o,...z(w?$:R,L)}};if(a?!Array.isArray(p)||!p.length:b&&(!W&&(X||Z(p))||J(p)&&!p||te&&!St(d).isValid||q&&!Ot(d).isValid)){const{value:w,message:k}=Q(b)?{value:!!b,message:b}:fe(b);if(w&&(E[T]={type:ae.required,message:k,ref:H,...z(ae.required,k)},!s))return F(k),E}if(!X&&(!Z(m)||!Z(V))){let w,k;const N=fe(V),$=fe(m);if(!Z(p)&&!isNaN(p)){const R=o.valueAsNumber||p&&+p;Z(N.value)||(w=R>N.value),Z($.value)||(k=R<$.value)}else{const R=o.valueAsDate||new Date(p),L=me=>new Date(new Date().toDateString()+" "+me),ye=o.type=="time",ge=o.type=="week";Q(N.value)&&p&&(w=ye?L(p)>L(N.value):ge?p>N.value:R>new Date(N.value)),Q($.value)&&p&&(k=ye?L(p)+w.value,$=!Z(k.value)&&p.length<+k.value;if((N||$)&&(oe(N,w.message,k.message),!s))return F(E[T].message),E}if(h&&!X&&Q(p)){const{value:w,message:k}=fe(h);if(Ee(w)&&!p.match(w)&&(E[T]={type:ae.pattern,message:k,ref:o,...z(ae.pattern,k)},!s))return F(k),E}if(O){if(Y(O)){const w=await O(p,t),k=gt(w,H);if(k&&(E[T]={...k,...z(ae.validate,k.message)},!s))return F(k.message),E}else if(j(O)){let w={};for(const k in O){if(!K(w)&&!s)break;const N=gt(await O[k](p,t),H,k);N&&(w={...N,...z(k,N.message)},F(N.message),s&&(E[T]=w))}if(!K(w)&&(E[T]={ref:H,...w},!s))return E}}return F(!0),E};const Sr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Rr(e={}){let r={...Sr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Y(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const C={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...C};let V={...m};const h={array:at(),state:at()},O=r.criteriaMode===se.all,T=i=>l=>{clearTimeout(x),x=setTimeout(i,l)},U=async i=>{if(!o.keepIsValid&&!r.disabled&&(m.isValid||V.isValid||i)){let l;r.resolver?(l=K((await W()).errors),M()):l=await z(s,!0),l!==t.isValid&&h.state.next({isValid:l})}},M=(i,l)=>{!r.disabled&&(m.isValidating||m.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(l?S(t.validatingFields,u,l):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!K(t.validatingFields)}))},p=(i,l=[],u,g,c=!0,f=!0)=>{if(g&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const v=u(y(s,i),g.argA,g.argB);c&&S(s,i,v)}if(f&&Array.isArray(y(t.errors,i))){const v=u(y(t.errors,i),g.argA,g.argB);c&&S(t.errors,i,v),Ar(t.errors,i)}if((m.touchedFields||V.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const v=u(y(t.touchedFields,i),g.argA,g.argB);c&&S(t.touchedFields,i,v)}(m.dirtyFields||V.dirtyFields)&&(t.dirtyFields=ce(n,a)),h.state.next({name:i,isDirty:w(i,l),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else S(a,i,l)},H=(i,l)=>{S(t.errors,i,l),h.state.next({errors:t.errors})},F=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},E=(i,l,u,g)=>{const c=y(s,i);if(c){const f=y(a,i,I(u)?y(n,i):u);I(f)||g&&g.defaultChecked||l?S(a,i,l?f:ut(c._f)):$(i,f),o.mount&&!o.action&&U()}},q=(i,l,u,g,c)=>{let f=!1,v=!1;const A={name:i};if(!r.disabled){if(!u||g){(m.isDirty||V.isDirty)&&(v=t.isDirty,t.isDirty=A.isDirty=w(),f=v!==A.isDirty);const D=ie(y(n,i),l);v=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):S(t.dirtyFields,i,!0),A.dirtyFields=t.dirtyFields,f=f||(m.dirtyFields||V.dirtyFields)&&v!==!D}if(u){const D=y(t.touchedFields,i);D||(S(t.touchedFields,i,u),A.touchedFields=t.touchedFields,f=f||(m.touchedFields||V.touchedFields)&&D!==u)}f&&c&&h.state.next(A)}return f?A:{}},te=(i,l,u,g)=>{const c=y(t.errors,i),f=(m.isValid||V.isValid)&&J(l)&&t.isValid!==l;if(r.delayError&&u?(b=T(()=>H(i,u)),b(r.delayError)):(clearTimeout(x),b=null,u?S(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!K(g)||f){const v={...g,...f&&J(l)?{isValid:l}:{},errors:t.errors,name:i};t={...t,...v},h.state.next(v)}},W=async i=>(M(i,!0),await r.resolver(a,r.context,pr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),X=async i=>{const{errors:l}=await W(i);if(M(i),i)for(const u of i){const g=y(l,u);g?S(t.errors,u,g):B(t.errors,u)}else t.errors=l;return l},z=async(i,l,u={valid:!0})=>{for(const g in i){const c=i[g];if(c){const{_f:f,...v}=c;if(f){const A=d.array.has(f.name),D=c._f&&Fr(c._f);D&&m.validatingFields&&M([f.name],!0);const G=await mt(c,d.disabled,a,O,r.shouldUseNativeValidation&&!l,A);if(D&&m.validatingFields&&M([f.name]),G[f.name]&&(u.valid=!1,l||e.shouldUseNativeValidation))break;!l&&(y(G,f.name)?A?Dr(t.errors,G,f.name):S(t.errors,f.name,G[f.name]):B(t.errors,f.name))}!K(v)&&await z(v,l,u)}}return u.valid},oe=()=>{for(const i of d.unMount){const l=y(s,i);l&&(l._f.refs?l._f.refs.every(u=>!Oe(u)):!Oe(l._f.ref))&&Ce(i)}d.unMount=new Set},w=(i,l)=>!r.disabled&&(i&&l&&S(a,i,l),!ie(ze(),n)),k=(i,l,u)=>Te(i,d,{...o.mount?a:I(l)?n:Q(i)?{[i]:l}:l},u,l),N=i=>Pe(y(o.mount?a:n,i,r.shouldUnregister?y(n,i,[]):[])),$=(i,l,u={})=>{const g=y(s,i);let c=l;if(g){const f=g._f;f&&(!f.disabled&&S(a,i,Rt(l,f)),c=we(f.ref)&&Z(l)?"":l,At(f.ref)?[...f.ref.options].forEach(v=>v.selected=c.includes(v.value)):f.refs?pe(f.ref)?f.refs.forEach(v=>{(!v.defaultChecked||!v.disabled)&&(Array.isArray(c)?v.checked=!!c.find(A=>A===v.value):v.checked=c===v.value||!!c)}):f.refs.forEach(v=>v.checked=v.value===c):He(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&me(i)},R=(i,l,u)=>{for(const g in l){if(!l.hasOwnProperty(g))return;const c=l[g],f=i+"."+g,v=y(s,f);(d.array.has(i)||j(c)||v&&!v._f)&&!de(c)?R(f,c,u):$(f,c,u)}},L=(i,l,u={})=>{const g=y(s,i),c=d.array.has(i),f=P(l);S(a,i,f),c?(h.array.next({name:i,values:P(a)}),(m.isDirty||m.dirtyFields||V.isDirty||V.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:ce(n,a),isDirty:w(i,f)})):g&&!g._f&&!Z(f)?R(i,f,u):$(i,f,u),ct(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ye=async i=>{o.mount=!0;const l=i.target;let u=l.name,g=!0;const c=y(s,u),f=D=>{g=Number.isNaN(D)||de(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},v=dt(r.mode),A=dt(r.reValidateMode);if(c){let D,G;const ue=l.type?ut(c._f):Ft(i),ne=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,Bt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Cr(ne,y(t.touchedFields,u),t.isSubmitted,A,v),Se=ct(u,d,ne);S(a,u,ue),ne?(!l||!l.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),b&&b(0)):c._f.onChange&&c._f.onChange(i);const Re=q(u,ue,ne),jt=!K(Re)||Se;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Bt)return(m.isValid||V.isValid)&&(r.mode==="onBlur"?ne&&U():ne||U()),jt&&h.state.next({name:u,...Se?{}:Re});if(!ne&&Se&&h.state.next({...t}),r.resolver){const{errors:tt}=await W([u]);if(M([u]),f(ue),g){const qt=yt(t.errors,s,u),rt=yt(tt,s,qt.name||u);D=rt.error,u=rt.name,G=K(tt)}}else M([u],!0),D=(await mt(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(ue),g&&(D?G=!1:(m.isValid||V.isValid)&&(G=await z(s,!0)));g&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&me(c._f.deps),te(u,G,D,Re))}},ge=(i,l)=>{if(y(t.errors,l)&&i.focus)return i.focus(),1},me=async(i,l={})=>{let u,g;const c=be(i);if(r.resolver){const f=await X(I(i)?i:c);u=K(f),g=i?!c.some(v=>y(f,v)):u}else i?(g=(await Promise.all(c.map(async f=>{const v=y(s,f);return await z(v&&v._f?{[f]:v}:v)}))).every(Boolean),!(!g&&!t.isValid)&&U()):g=u=await z(s);return h.state.next({...!Q(i)||(m.isValid||V.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),l.shouldFocus&&!g&&Ve(s,ge,i?c:d.mount),g},ze=(i,l)=>{let u={...o.mount?a:n};return l&&(u=Ct(l.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:Q(i)?y(u,i):i.map(g=>y(u,g))},Ge=(i,l)=>({invalid:!!y((l||t).errors,i),isDirty:!!y((l||t).dirtyFields,i),error:y((l||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((l||t).touchedFields,i)}),It=i=>{i&&be(i).forEach(l=>B(t.errors,l)),h.state.next({errors:i?t.errors:{}})},Ke=(i,l,u)=>{const g=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:v,type:A,...D}=c;S(t.errors,i,{...D,...l,ref:g}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},Tt=(i,l)=>Y(i)?h.state.subscribe({next:u=>"values"in u&&i(k(void 0,l),u)}):k(i,l,!0),Ye=i=>h.state.subscribe({next:l=>{kr(i.name,l.name,i.exact)&&Er(l,i.formState||m,Pt,i.reRenderRoot)&&i.callback({values:{...a},...t,...l,defaultValues:n})}}).unsubscribe,Mt=i=>(o.mount=!0,V={...V,...i.formState},Ye({...i,formState:{...C,...i.formState}})),Ce=(i,l={})=>{for(const u of i?be(i):d.mount)d.mount.delete(u),d.array.delete(u),l.keepValue||(B(s,u),B(a,u)),!l.keepError&&B(t.errors,u),!l.keepDirty&&B(t.dirtyFields,u),!l.keepTouched&&B(t.touchedFields,u),!l.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!l.keepDefaultValue&&B(n,u);h.state.next({values:P(a)}),h.state.next({...t,...l.keepDirty?{isDirty:w()}:{}}),!l.keepIsValid&&U()},Ze=({disabled:i,name:l})=>{if(J(i)&&o.mount||i||d.disabled.has(l)){const c=d.disabled.has(l)!==!!i;i?d.disabled.add(l):d.disabled.delete(l),c&&o.mount&&!o.action&&U()}},Ae=(i,l={})=>{let u=y(s,i);const g=J(l.disabled)||J(r.disabled);return S(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...l}}),d.mount.add(i),u?Ze({disabled:J(l.disabled)?l.disabled:r.disabled,name:i}):E(i,!0,l.value),{...g?{disabled:l.disabled||r.disabled}:{},...r.progressive?{required:!!l.required,min:ve(l.min),max:ve(l.max),minLength:ve(l.minLength),maxLength:ve(l.maxLength),pattern:ve(l.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:c=>{if(c){Ae(i,l),u=y(s,i);const f=I(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,v=br(f),A=u._f.refs||[];if(v?A.find(D=>D===f):f===u._f.ref)return;S(s,i,{_f:{...u._f,...v?{refs:[...A.filter(Oe),f,...Array.isArray(y(n,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),E(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||l.shouldUnregister)&&!(wt(d.array,i)&&o.action)&&d.unMount.add(i)}}},De=()=>r.shouldFocusError&&Ve(s,ge,d.mount),Nt=i=>{J(i)&&(h.state.next({disabled:i}),Ve(s,(l,u)=>{const g=y(s,u);g&&(l.disabled=g._f.disabled||i,Array.isArray(g._f.refs)&&g._f.refs.forEach(c=>{c.disabled=g._f.disabled||i}))},0,!1))},Je=(i,l)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:v}=await W();M(),t.errors=f,c=P(v)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),K(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){g=f}}else l&&await l({...t.errors},u),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(i,l={})=>{y(s,i)&&(I(l.defaultValue)?L(i,P(y(n,i))):(L(i,l.defaultValue),S(n,i,P(l.defaultValue))),l.keepTouched||B(t.touchedFields,i),l.keepDirty||(B(t.dirtyFields,i),t.isDirty=l.defaultValue?w(i,P(y(n,i))):w()),l.keepError||(B(t.errors,i),m.isValid&&U()),h.state.next({...t}))},Qe=(i,l={})=>{const u=i?P(i):n,g=P(u),c=K(i),f=c?n:g;if(l.keepDefaultValues||(n=u),!l.keepValues){if(l.keepDirtyValues){const v=new Set([...d.mount,...Object.keys(ce(n,a))]);for(const A of Array.from(v)){const D=y(t.dirtyFields,A),G=y(a,A),ue=y(f,A);D&&!I(G)?S(f,A,G):!D&&!I(ue)&&L(A,ue)}}else{if(Le&&I(i))for(const v of d.mount){const A=y(s,v);if(A&&A._f){const D=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(we(D)){const G=D.closest("form");if(G){G.reset();break}}}}if(l.keepFieldsRef)for(const v of d.mount)L(v,y(f,v));else s={}}a=r.shouldUnregister?l.keepDefaultValues?P(n):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:l.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!r.shouldUnregister&&!K(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,l.keepErrors||(t.errors={}),h.state.next({submitCount:l.keepSubmitCount?t.submitCount:0,isDirty:c?!1:l.keepDirty?t.isDirty:!!(l.keepDefaultValues&&!ie(i,n)),isSubmitted:l.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:l.keepDirtyValues?l.keepDefaultValues&&a?ce(n,a):t.dirtyFields:l.keepDefaultValues&&i?ce(n,i):l.keepDirty?t.dirtyFields:{},touchedFields:l.keepTouched?t.touchedFields:{},errors:l.keepErrors?t.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Xe=(i,l)=>Qe(Y(i)?i(a):i,{...r.resetOptions,...l}),Lt=(i,l={})=>{const u=y(s,i),g=u&&u._f;if(g){const c=g.refs?g.refs[0]:g.ref;c.focus&&setTimeout(()=>{c.focus(),l.shouldSelect&&Y(c.select)&&c.select()})}},Pt=i=>{t={...t,...i}},et={control:{register:Ae,unregister:Ce,getFieldState:Ge,handleSubmit:Je,setError:Ke,_subscribe:Ye,_runSchema:W,_updateIsValidating:M,_focusError:De,_getWatch:k,_getDirty:w,_setValid:U,_setFieldArray:p,_setDisabledField:Ze,_setErrors:F,_getFieldArray:N,_reset:Qe,_resetDefaultValues:()=>Y(r.defaultValues)&&r.defaultValues().then(i=>{Xe(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Nt,_subjects:h,_proxyFormState:m,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return n},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Mt,trigger:me,register:Ae,handleSubmit:Je,watch:Tt,setValue:L,getValues:ze,reset:Xe,resetField:Ut,clearErrors:It,unregister:Ce,setError:Ke,setFocus:Lt,getFieldState:Ge};return{...et,formControl:et}}function qr(e={}){const r=_.useRef(void 0),t=_.useRef(void 0),[s,n]=_.useState({isDirty:!1,isValidating:!1,isLoading:Y(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:Y(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!Y(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Rr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,qe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),_.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,n(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),_.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=_.useMemo(()=>kt(s,a),[a,s]),r.current}const vt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ue=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?vt(s.ref,t,e):s&&s.refs&&s.refs.forEach(n=>vt(n,t,e))}},ht=(e,r)=>{r.shouldUseNativeValidation&&Ue(e,r);const t={};for(const s in e){const n=y(r.fields,s),a=Object.assign(e[s]||{},{ref:n&&n.ref});if(Or(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));S(o,"root",a),S(t,s,o)}else S(t,s,a)}return t},Or=(e,r)=>{const t=bt(r);return e.some(s=>bt(s).match(`^${t}\\.\\d+`))};function bt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Ir(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(C){return C.errors.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Tr(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if(s.code==="invalid_union"&&s.errors.forEach(function(C){return C.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Wr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:ht(Ir(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?Zt:Jt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Qt})(o))return{values:{},errors:ht(Tr(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function Hr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-group",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}const Mr=Xt("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function $r(e){const r=_e.c(11);let t,s,n;r[0]!==e?({className:t,orientation:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);const a=n===void 0?"vertical":n;let o;r[4]!==t||r[5]!==a?(o=xe(Mr({orientation:a}),t),r[4]=t,r[5]=a,r[6]=o):o=r[6];let d;return r[7]!==a||r[8]!==s||r[9]!==o?(d=le.jsx("div",{className:o,"data-orientation":a,"data-slot":"field",role:"group",...s}),r[7]=a,r[8]=s,r[9]=o,r[10]=d):d=r[10],d}function zr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-label",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}function Gr(e){const r=_e.c(15);let t,s,n,a;r[0]!==e?({className:s,children:t,errors:n,...a}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n,r[4]=a):(t=r[1],s=r[2],n=r[3],a=r[4]);let o;e:{if(t){o=t;break e}if(!n?.length){o=null;break e}let C;r[5]!==n?(C=[...new Map(n.map(Ur)).values()],r[5]=n,r[6]=C):C=r[6];const m=C;if(m?.length===1){o=m[0]?.message;break e}let V;r[7]!==m?(V=le.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:m.map(Nr)}),r[7]=m,r[8]=V):V=r[8],o=V}const d=o;if(!d)return null;let b;r[9]!==s?(b=xe("font-normal text-destructive text-xs/relaxed",s),r[9]=s,r[10]=b):b=r[10];let x;return r[11]!==d||r[12]!==a||r[13]!==b?(x=le.jsx("div",{className:b,"data-slot":"field-error",role:"alert",...a,children:d}),r[11]=d,r[12]=a,r[13]=b,r[14]=x):x=r[14],x}function Nr(e){return e?.message&&le.jsx("li",{children:e.message},e.message)}function Ur(e){return[e?.message,e]}export{jr as C,Gr as F,Br as I,Wr as a,zr as b,$r as c,Hr as d,ir as e,Ie as f,or as g,lr as h,ur as i,xt as j,tr as k,qr as u}; +import{r as ee,bq as re,V as Wt,E as st,br as Ht,G as he,bs as $t,I as _t,ap as zt,ab as Gt,w as Kt,a9 as Yt,j as le,c as _e,a as xe,bt as _,bu as Zt,bv as Jt,bw as Qt,bx as Xt}from"./index.js";let it=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const er={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tr={valid(e){return e===null?null:e?{[it.valid]:""}:{[it.invalid]:""}}},rr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:er,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=st)=>e,getInputValidationProps:(e=st)=>e,inputRef:{current:null},commit:async()=>{}}});function Ie(e=!0){const r=ee.useContext(rr);if(r.setValidityData===re&&!e)throw new Error(Wt(28));return r}const sr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function ir(){return ee.useContext(sr)}const ar=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function xt(){return ee.useContext(ar)}function nr(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function lr({controlled:e,default:r,name:t,state:s="value"}){const{current:n}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=n?e:a,b=ee.useCallback(x=>{n||o(x)},[]);return[d,b]}function or(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:n,setControlId:a}=xt(),o=Ht(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;$t(d)&&d.closest("label")!=null?a(r??null):a(n??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,n,a,t,o]),n??o}function ur(e){const{enabled:r=!0,value:t,id:s,name:n,controlRef:a,commit:o}=e,{formRef:d}=ir(),{invalid:b,markedDirtyRef:x,validityData:C,setValidityData:m}=Ie(),V=_t(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=V()),C.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,C.initialValue,V]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:V,name:n,controlRef:a,validityData:nr(C,b),validate(h=!0){let O=t;O===void 0&&(O=V()),x.current=!0,h?zt.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,V,s,b,x,n,C,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const dr=ee.forwardRef(function(r,t){const{render:s,className:n,id:a,name:o,value:d,disabled:b=!1,onValueChange:x,defaultValue:C,...m}=r,{state:V,name:h,disabled:O}=Ie(),T=O||b,U=h??o,M=ee.useMemo(()=>({...V,disabled:T}),[V,T]),{setTouched:p,setDirty:H,validityData:F,setFocused:E,setFilled:q,validationMode:te,validation:W}=Ie(),{labelId:X}=xt(),z=or({id:a});he(()=>{const R=d!=null;W.inputRef.current?.value||R&&d!==""?q(!0):R&&d===""&&q(!1)},[W.inputRef,q,d]);const[oe,w]=lr({controlled:d,default:C,name:"FieldControl",state:"value"}),k=d!==void 0,N=_t((R,L)=>{x?.(R,L),!L.isCanceled&&w(R)});return ur({id:z,name:U,commit:W.commit,value:oe,getValue:()=>W.inputRef.current?.value,controlRef:W.inputRef}),Gt("input",r,{ref:t,state:M,props:[{id:z,disabled:T,name:U,ref:W.inputRef,"aria-labelledby":X,...k?{value:oe}:{defaultValue:C},onChange(R){const L=R.currentTarget.value;N(L,Kt(Yt,R.nativeEvent)),H(L!==F.initialValue),q(L!=="")},onFocus(){E(!0)},onBlur(R){p(!0),E(!1),te==="onBlur"&&W.commit(R.currentTarget.value)},onKeyDown(R){R.currentTarget.tagName==="INPUT"&&R.key==="Enter"&&(p(!0),W.commit(R.currentTarget.value))}},W.getInputValidationProps(),m],stateAttributesMapping:tr})}),fr=ee.forwardRef(function(r,t){return le.jsx(dr,{ref:t,...r})});function Br(e){const r=_e.c(10);let t,s,n;r[0]!==e?({className:t,type:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);let a;r[4]!==t?(a=xe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==n?(o=le.jsx(fr,{className:a,"data-slot":"input",type:n,...s}),r[6]=s,r[7]=a,r[8]=n,r[9]=o):o=r[9],o}var pe=e=>e.type==="checkbox",de=e=>e instanceof Date,Z=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&pt(e)&&!de(e),Ft=e=>j(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,cr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wt=(e,r)=>e.has(cr(r)),yr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Le&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&yr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=P(e[n]));return s}var ke=e=>/^\w*$/.test(e),I=e=>e===void 0,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(ke(r)?[r]:Be(r)).reduce((n,a)=>Z(n)?n:n[a],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",Y=e=>typeof e=="function",S=(e,r,t)=>{let s=-1;const n=ke(r)?[r]:Be(r),a=n.length,o=a-1;for(;++s_.useContext(Et);var kt=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return n};const qe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gr(e){const r=je(),{control:t=r,disabled:s,name:n,exact:a}=e||{},[o,d]=_.useState(t._formState),b=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return qe(()=>t._subscribe({name:n,formState:b.current,exact:a,callback:x=>{!s&&d({...t._formState,...x})}}),[n,s,a]),_.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>kt(o,t,b.current,!1),[o,t])}var Q=e=>typeof e=="string",Te=(e,r,t,s,n)=>Q(e)?(s&&r.watch.add(e),y(t,e,n)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Me=e=>Z(e)||!pt(e);function ie(e,r,t=new WeakSet){if(Me(e)||Me(r))return Object.is(e,r);if(de(e)&&de(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),n=Object.keys(r);if(s.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=r[a];if(de(o)&&de(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function mr(e){const r=je(),{control:t=r,name:s,defaultValue:n,disabled:a,exact:o,compute:d}=e||{},b=_.useRef(n),x=_.useRef(d),C=_.useRef(void 0),m=_.useRef(t),V=_.useRef(s);x.current=d;const[h,O]=_.useState(()=>{const F=t._getWatch(s,b.current);return x.current?x.current(F):F}),T=_.useCallback(F=>{const E=Te(s,t._names,F||t._formValues,!1,b.current);return x.current?x.current(E):E},[t._formValues,t._names,s]),U=_.useCallback(F=>{if(!a){const E=Te(s,t._names,F||t._formValues,!1,b.current);if(x.current){const q=x.current(E);ie(q,C.current)||(O(q),C.current=q)}else O(E)}},[t._formValues,t._names,a,s]);qe(()=>((m.current!==t||!ie(V.current,s))&&(m.current=t,V.current=s,U()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:F=>{U(F.values)}})),[t,o,s,U]),_.useEffect(()=>t._removeUnmounted());const M=m.current!==t,p=V.current,H=_.useMemo(()=>{if(a)return null;const F=!M&&!ie(p,s);return M||F?T():null},[a,M,s,p,T]);return H!==null?H:h}function vr(e){const r=je(),{name:t,disabled:s,control:n=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,b=wt(n._names.array,t),x=_.useMemo(()=>y(n._formValues,t,y(n._defaultValues,t,o)),[n,t,o]),C=mr({control:n,name:t,defaultValue:x,exact:d}),m=gr({control:n,name:t,exact:d}),V=_.useRef(e),h=_.useRef(void 0),O=_.useRef(n.register(t,{...e.rules,value:C,...J(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const T=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),U=_.useCallback(F=>O.current.onChange({target:{value:Ft(F),name:t},type:Fe.CHANGE}),[t]),M=_.useCallback(()=>O.current.onBlur({target:{value:y(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),p=_.useCallback(F=>{const E=y(n._fields,t);E&&E._f&&F&&(E._f.ref={focus:()=>Y(F.focus)&&F.focus(),select:()=>Y(F.select)&&F.select(),setCustomValidity:q=>Y(F.setCustomValidity)&&F.setCustomValidity(q),reportValidity:()=>Y(F.reportValidity)&&F.reportValidity()})},[n._fields,t]),H=_.useMemo(()=>({name:t,value:C,...J(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:U,onBlur:M,ref:p}),[t,s,m.disabled,U,M,p,C]);return _.useEffect(()=>{const F=n._options.shouldUnregister||a,E=h.current;E&&E!==t&&!b&&n.unregister(E),n.register(t,{...V.current.rules,...J(V.current.disabled)?{disabled:V.current.disabled}:{}});const q=(te,W)=>{const X=y(n._fields,te);X&&X._f&&(X._f.mount=W)};if(q(t,!0),F){const te=P(y(n._options.defaultValues,t,V.current.defaultValue));S(n._defaultValues,t,te),I(y(n._formValues,t))&&S(n._formValues,t,te)}return!b&&n.register(t),h.current=t,()=>{(b?F&&!n._state.action:F)?n.unregister(t):q(t,!1)}},[t,n,b,a]),_.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),_.useMemo(()=>({field:H,formState:m,fieldState:T}),[H,m,T])}const jr=e=>e.render(vr(e)),hr=_.createContext(null);hr.displayName="HookFormContext";var We=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Ct(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const n=e[s],a=r[s];if(n&&j(n)&&a){const o=Ct(n,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var K=e=>j(e)&&!Object.keys(e).length,He=e=>e.type==="file",we=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},At=e=>e.type==="select-multiple",$e=e=>e.type==="radio",br=e=>$e(e)||pe(e),Oe=e=>we(e)&&e.isConnected;function Vr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(Y(e[r]))return!0;return!1};function Dt(e){return Array.isArray(e)||j(e)&&!xr(e)}function Ne(e,r={}){for(const t in e){const s=e[t];Dt(s)?(r[t]=Array.isArray(s)?[]:{},Ne(s,r[t])):I(s)||(r[t]=!0)}return r}function ce(e,r,t){t||(t=Ne(r));for(const s in e){const n=e[s];if(Dt(n))I(r)||Me(t[s])?t[s]=Ne(n,Array.isArray(n)?[]:{}):ce(n,Z(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(n,a)}}return t}const nt={value:!1,isValid:!1},lt={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:nt}return nt},Rt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&Q(e)?new Date(e):s?s(e):e;const ot={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ut(e){const r=e.ref;return He(r)?r.files:$e(r)?Ot(e.refs).value:At(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?St(e.refs).value:Rt(I(r.value)?e.ref.value:r.value,e)}var pr=(e,r,t,s)=>{const n={};for(const a of e){const o=y(r,a);o&&S(n,a,o._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>I(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,dt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ft="AsyncFunction";var Fr=e=>!!e&&!!e.validate&&!!(Y(e.validate)&&e.validate.constructor.name===ft||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ft)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ct=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ve=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const a=y(e,n);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],n)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ve(d,r))break}else if(j(d)&&Ve(d,r))break}}};function yt(e,r,t){const s=y(e,t);if(s||ke(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};n.pop()}return{name:t}}var Er=(e,r,t,s)=>{t(e);const{name:n,...a}=e;return K(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},kr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Cr=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Ar=(e,r)=>!Pe(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=be(y(e,t));return S(s,"root",r[t]),S(e,t,s),e};function gt(e,r,t="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||J(e)&&!e)return{type:t,message:Q(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},mt=async(e,r,t,s,n,a)=>{const{ref:o,refs:d,required:b,maxLength:x,minLength:C,min:m,max:V,pattern:h,validate:O,name:T,valueAsNumber:U,mount:M}=e._f,p=y(t,T);if(!M||r.has(T))return{};const H=d?d[0]:o,F=w=>{n&&H.reportValidity&&(H.setCustomValidity(J(w)?"":w||""),H.reportValidity())},E={},q=$e(o),te=pe(o),W=q||te,X=(U||He(o))&&I(o.value)&&I(p)||we(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,z=We.bind(null,T,s,E),oe=(w,k,N,$=ae.maxLength,R=ae.minLength)=>{const L=w?k:N;E[T]={type:w?$:R,message:L,ref:o,...z(w?$:R,L)}};if(a?!Array.isArray(p)||!p.length:b&&(!W&&(X||Z(p))||J(p)&&!p||te&&!St(d).isValid||q&&!Ot(d).isValid)){const{value:w,message:k}=Q(b)?{value:!!b,message:b}:fe(b);if(w&&(E[T]={type:ae.required,message:k,ref:H,...z(ae.required,k)},!s))return F(k),E}if(!X&&(!Z(m)||!Z(V))){let w,k;const N=fe(V),$=fe(m);if(!Z(p)&&!isNaN(p)){const R=o.valueAsNumber||p&&+p;Z(N.value)||(w=R>N.value),Z($.value)||(k=R<$.value)}else{const R=o.valueAsDate||new Date(p),L=me=>new Date(new Date().toDateString()+" "+me),ye=o.type=="time",ge=o.type=="week";Q(N.value)&&p&&(w=ye?L(p)>L(N.value):ge?p>N.value:R>new Date(N.value)),Q($.value)&&p&&(k=ye?L(p)+w.value,$=!Z(k.value)&&p.length<+k.value;if((N||$)&&(oe(N,w.message,k.message),!s))return F(E[T].message),E}if(h&&!X&&Q(p)){const{value:w,message:k}=fe(h);if(Ee(w)&&!p.match(w)&&(E[T]={type:ae.pattern,message:k,ref:o,...z(ae.pattern,k)},!s))return F(k),E}if(O){if(Y(O)){const w=await O(p,t),k=gt(w,H);if(k&&(E[T]={...k,...z(ae.validate,k.message)},!s))return F(k.message),E}else if(j(O)){let w={};for(const k in O){if(!K(w)&&!s)break;const N=gt(await O[k](p,t),H,k);N&&(w={...N,...z(k,N.message)},F(N.message),s&&(E[T]=w))}if(!K(w)&&(E[T]={ref:H,...w},!s))return E}}return F(!0),E};const Sr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Rr(e={}){let r={...Sr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Y(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const C={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...C};let V={...m};const h={array:at(),state:at()},O=r.criteriaMode===se.all,T=i=>l=>{clearTimeout(x),x=setTimeout(i,l)},U=async i=>{if(!o.keepIsValid&&!r.disabled&&(m.isValid||V.isValid||i)){let l;r.resolver?(l=K((await W()).errors),M()):l=await z(s,!0),l!==t.isValid&&h.state.next({isValid:l})}},M=(i,l)=>{!r.disabled&&(m.isValidating||m.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(l?S(t.validatingFields,u,l):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!K(t.validatingFields)}))},p=(i,l=[],u,g,c=!0,f=!0)=>{if(g&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const v=u(y(s,i),g.argA,g.argB);c&&S(s,i,v)}if(f&&Array.isArray(y(t.errors,i))){const v=u(y(t.errors,i),g.argA,g.argB);c&&S(t.errors,i,v),Ar(t.errors,i)}if((m.touchedFields||V.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const v=u(y(t.touchedFields,i),g.argA,g.argB);c&&S(t.touchedFields,i,v)}(m.dirtyFields||V.dirtyFields)&&(t.dirtyFields=ce(n,a)),h.state.next({name:i,isDirty:w(i,l),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else S(a,i,l)},H=(i,l)=>{S(t.errors,i,l),h.state.next({errors:t.errors})},F=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},E=(i,l,u,g)=>{const c=y(s,i);if(c){const f=y(a,i,I(u)?y(n,i):u);I(f)||g&&g.defaultChecked||l?S(a,i,l?f:ut(c._f)):$(i,f),o.mount&&!o.action&&U()}},q=(i,l,u,g,c)=>{let f=!1,v=!1;const A={name:i};if(!r.disabled){if(!u||g){(m.isDirty||V.isDirty)&&(v=t.isDirty,t.isDirty=A.isDirty=w(),f=v!==A.isDirty);const D=ie(y(n,i),l);v=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):S(t.dirtyFields,i,!0),A.dirtyFields=t.dirtyFields,f=f||(m.dirtyFields||V.dirtyFields)&&v!==!D}if(u){const D=y(t.touchedFields,i);D||(S(t.touchedFields,i,u),A.touchedFields=t.touchedFields,f=f||(m.touchedFields||V.touchedFields)&&D!==u)}f&&c&&h.state.next(A)}return f?A:{}},te=(i,l,u,g)=>{const c=y(t.errors,i),f=(m.isValid||V.isValid)&&J(l)&&t.isValid!==l;if(r.delayError&&u?(b=T(()=>H(i,u)),b(r.delayError)):(clearTimeout(x),b=null,u?S(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!K(g)||f){const v={...g,...f&&J(l)?{isValid:l}:{},errors:t.errors,name:i};t={...t,...v},h.state.next(v)}},W=async i=>(M(i,!0),await r.resolver(a,r.context,pr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),X=async i=>{const{errors:l}=await W(i);if(M(i),i)for(const u of i){const g=y(l,u);g?S(t.errors,u,g):B(t.errors,u)}else t.errors=l;return l},z=async(i,l,u={valid:!0})=>{for(const g in i){const c=i[g];if(c){const{_f:f,...v}=c;if(f){const A=d.array.has(f.name),D=c._f&&Fr(c._f);D&&m.validatingFields&&M([f.name],!0);const G=await mt(c,d.disabled,a,O,r.shouldUseNativeValidation&&!l,A);if(D&&m.validatingFields&&M([f.name]),G[f.name]&&(u.valid=!1,l||e.shouldUseNativeValidation))break;!l&&(y(G,f.name)?A?Dr(t.errors,G,f.name):S(t.errors,f.name,G[f.name]):B(t.errors,f.name))}!K(v)&&await z(v,l,u)}}return u.valid},oe=()=>{for(const i of d.unMount){const l=y(s,i);l&&(l._f.refs?l._f.refs.every(u=>!Oe(u)):!Oe(l._f.ref))&&Ce(i)}d.unMount=new Set},w=(i,l)=>!r.disabled&&(i&&l&&S(a,i,l),!ie(ze(),n)),k=(i,l,u)=>Te(i,d,{...o.mount?a:I(l)?n:Q(i)?{[i]:l}:l},u,l),N=i=>Pe(y(o.mount?a:n,i,r.shouldUnregister?y(n,i,[]):[])),$=(i,l,u={})=>{const g=y(s,i);let c=l;if(g){const f=g._f;f&&(!f.disabled&&S(a,i,Rt(l,f)),c=we(f.ref)&&Z(l)?"":l,At(f.ref)?[...f.ref.options].forEach(v=>v.selected=c.includes(v.value)):f.refs?pe(f.ref)?f.refs.forEach(v=>{(!v.defaultChecked||!v.disabled)&&(Array.isArray(c)?v.checked=!!c.find(A=>A===v.value):v.checked=c===v.value||!!c)}):f.refs.forEach(v=>v.checked=v.value===c):He(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&me(i)},R=(i,l,u)=>{for(const g in l){if(!l.hasOwnProperty(g))return;const c=l[g],f=i+"."+g,v=y(s,f);(d.array.has(i)||j(c)||v&&!v._f)&&!de(c)?R(f,c,u):$(f,c,u)}},L=(i,l,u={})=>{const g=y(s,i),c=d.array.has(i),f=P(l);S(a,i,f),c?(h.array.next({name:i,values:P(a)}),(m.isDirty||m.dirtyFields||V.isDirty||V.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:ce(n,a),isDirty:w(i,f)})):g&&!g._f&&!Z(f)?R(i,f,u):$(i,f,u),ct(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ye=async i=>{o.mount=!0;const l=i.target;let u=l.name,g=!0;const c=y(s,u),f=D=>{g=Number.isNaN(D)||de(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},v=dt(r.mode),A=dt(r.reValidateMode);if(c){let D,G;const ue=l.type?ut(c._f):Ft(i),ne=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,Bt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Cr(ne,y(t.touchedFields,u),t.isSubmitted,A,v),Se=ct(u,d,ne);S(a,u,ue),ne?(!l||!l.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),b&&b(0)):c._f.onChange&&c._f.onChange(i);const Re=q(u,ue,ne),jt=!K(Re)||Se;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Bt)return(m.isValid||V.isValid)&&(r.mode==="onBlur"?ne&&U():ne||U()),jt&&h.state.next({name:u,...Se?{}:Re});if(!ne&&Se&&h.state.next({...t}),r.resolver){const{errors:tt}=await W([u]);if(M([u]),f(ue),g){const qt=yt(t.errors,s,u),rt=yt(tt,s,qt.name||u);D=rt.error,u=rt.name,G=K(tt)}}else M([u],!0),D=(await mt(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(ue),g&&(D?G=!1:(m.isValid||V.isValid)&&(G=await z(s,!0)));g&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&me(c._f.deps),te(u,G,D,Re))}},ge=(i,l)=>{if(y(t.errors,l)&&i.focus)return i.focus(),1},me=async(i,l={})=>{let u,g;const c=be(i);if(r.resolver){const f=await X(I(i)?i:c);u=K(f),g=i?!c.some(v=>y(f,v)):u}else i?(g=(await Promise.all(c.map(async f=>{const v=y(s,f);return await z(v&&v._f?{[f]:v}:v)}))).every(Boolean),!(!g&&!t.isValid)&&U()):g=u=await z(s);return h.state.next({...!Q(i)||(m.isValid||V.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),l.shouldFocus&&!g&&Ve(s,ge,i?c:d.mount),g},ze=(i,l)=>{let u={...o.mount?a:n};return l&&(u=Ct(l.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:Q(i)?y(u,i):i.map(g=>y(u,g))},Ge=(i,l)=>({invalid:!!y((l||t).errors,i),isDirty:!!y((l||t).dirtyFields,i),error:y((l||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((l||t).touchedFields,i)}),It=i=>{i&&be(i).forEach(l=>B(t.errors,l)),h.state.next({errors:i?t.errors:{}})},Ke=(i,l,u)=>{const g=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:v,type:A,...D}=c;S(t.errors,i,{...D,...l,ref:g}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},Tt=(i,l)=>Y(i)?h.state.subscribe({next:u=>"values"in u&&i(k(void 0,l),u)}):k(i,l,!0),Ye=i=>h.state.subscribe({next:l=>{kr(i.name,l.name,i.exact)&&Er(l,i.formState||m,Pt,i.reRenderRoot)&&i.callback({values:{...a},...t,...l,defaultValues:n})}}).unsubscribe,Mt=i=>(o.mount=!0,V={...V,...i.formState},Ye({...i,formState:{...C,...i.formState}})),Ce=(i,l={})=>{for(const u of i?be(i):d.mount)d.mount.delete(u),d.array.delete(u),l.keepValue||(B(s,u),B(a,u)),!l.keepError&&B(t.errors,u),!l.keepDirty&&B(t.dirtyFields,u),!l.keepTouched&&B(t.touchedFields,u),!l.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!l.keepDefaultValue&&B(n,u);h.state.next({values:P(a)}),h.state.next({...t,...l.keepDirty?{isDirty:w()}:{}}),!l.keepIsValid&&U()},Ze=({disabled:i,name:l})=>{if(J(i)&&o.mount||i||d.disabled.has(l)){const c=d.disabled.has(l)!==!!i;i?d.disabled.add(l):d.disabled.delete(l),c&&o.mount&&!o.action&&U()}},Ae=(i,l={})=>{let u=y(s,i);const g=J(l.disabled)||J(r.disabled);return S(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...l}}),d.mount.add(i),u?Ze({disabled:J(l.disabled)?l.disabled:r.disabled,name:i}):E(i,!0,l.value),{...g?{disabled:l.disabled||r.disabled}:{},...r.progressive?{required:!!l.required,min:ve(l.min),max:ve(l.max),minLength:ve(l.minLength),maxLength:ve(l.maxLength),pattern:ve(l.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:c=>{if(c){Ae(i,l),u=y(s,i);const f=I(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,v=br(f),A=u._f.refs||[];if(v?A.find(D=>D===f):f===u._f.ref)return;S(s,i,{_f:{...u._f,...v?{refs:[...A.filter(Oe),f,...Array.isArray(y(n,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),E(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||l.shouldUnregister)&&!(wt(d.array,i)&&o.action)&&d.unMount.add(i)}}},De=()=>r.shouldFocusError&&Ve(s,ge,d.mount),Nt=i=>{J(i)&&(h.state.next({disabled:i}),Ve(s,(l,u)=>{const g=y(s,u);g&&(l.disabled=g._f.disabled||i,Array.isArray(g._f.refs)&&g._f.refs.forEach(c=>{c.disabled=g._f.disabled||i}))},0,!1))},Je=(i,l)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:v}=await W();M(),t.errors=f,c=P(v)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),K(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){g=f}}else l&&await l({...t.errors},u),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(i,l={})=>{y(s,i)&&(I(l.defaultValue)?L(i,P(y(n,i))):(L(i,l.defaultValue),S(n,i,P(l.defaultValue))),l.keepTouched||B(t.touchedFields,i),l.keepDirty||(B(t.dirtyFields,i),t.isDirty=l.defaultValue?w(i,P(y(n,i))):w()),l.keepError||(B(t.errors,i),m.isValid&&U()),h.state.next({...t}))},Qe=(i,l={})=>{const u=i?P(i):n,g=P(u),c=K(i),f=c?n:g;if(l.keepDefaultValues||(n=u),!l.keepValues){if(l.keepDirtyValues){const v=new Set([...d.mount,...Object.keys(ce(n,a))]);for(const A of Array.from(v)){const D=y(t.dirtyFields,A),G=y(a,A),ue=y(f,A);D&&!I(G)?S(f,A,G):!D&&!I(ue)&&L(A,ue)}}else{if(Le&&I(i))for(const v of d.mount){const A=y(s,v);if(A&&A._f){const D=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(we(D)){const G=D.closest("form");if(G){G.reset();break}}}}if(l.keepFieldsRef)for(const v of d.mount)L(v,y(f,v));else s={}}a=r.shouldUnregister?l.keepDefaultValues?P(n):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:l.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!r.shouldUnregister&&!K(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,l.keepErrors||(t.errors={}),h.state.next({submitCount:l.keepSubmitCount?t.submitCount:0,isDirty:c?!1:l.keepDirty?t.isDirty:!!(l.keepDefaultValues&&!ie(i,n)),isSubmitted:l.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:l.keepDirtyValues?l.keepDefaultValues&&a?ce(n,a):t.dirtyFields:l.keepDefaultValues&&i?ce(n,i):l.keepDirty?t.dirtyFields:{},touchedFields:l.keepTouched?t.touchedFields:{},errors:l.keepErrors?t.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Xe=(i,l)=>Qe(Y(i)?i(a):i,{...r.resetOptions,...l}),Lt=(i,l={})=>{const u=y(s,i),g=u&&u._f;if(g){const c=g.refs?g.refs[0]:g.ref;c.focus&&setTimeout(()=>{c.focus(),l.shouldSelect&&Y(c.select)&&c.select()})}},Pt=i=>{t={...t,...i}},et={control:{register:Ae,unregister:Ce,getFieldState:Ge,handleSubmit:Je,setError:Ke,_subscribe:Ye,_runSchema:W,_updateIsValidating:M,_focusError:De,_getWatch:k,_getDirty:w,_setValid:U,_setFieldArray:p,_setDisabledField:Ze,_setErrors:F,_getFieldArray:N,_reset:Qe,_resetDefaultValues:()=>Y(r.defaultValues)&&r.defaultValues().then(i=>{Xe(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Nt,_subjects:h,_proxyFormState:m,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return n},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Mt,trigger:me,register:Ae,handleSubmit:Je,watch:Tt,setValue:L,getValues:ze,reset:Xe,resetField:Ut,clearErrors:It,unregister:Ce,setError:Ke,setFocus:Lt,getFieldState:Ge};return{...et,formControl:et}}function qr(e={}){const r=_.useRef(void 0),t=_.useRef(void 0),[s,n]=_.useState({isDirty:!1,isValidating:!1,isLoading:Y(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:Y(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!Y(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Rr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,qe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),_.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,n(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),_.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=_.useMemo(()=>kt(s,a),[a,s]),r.current}const vt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ue=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?vt(s.ref,t,e):s&&s.refs&&s.refs.forEach(n=>vt(n,t,e))}},ht=(e,r)=>{r.shouldUseNativeValidation&&Ue(e,r);const t={};for(const s in e){const n=y(r.fields,s),a=Object.assign(e[s]||{},{ref:n&&n.ref});if(Or(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));S(o,"root",a),S(t,s,o)}else S(t,s,a)}return t},Or=(e,r)=>{const t=bt(r);return e.some(s=>bt(s).match(`^${t}\\.\\d+`))};function bt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Ir(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(C){return C.errors.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Tr(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if(s.code==="invalid_union"&&s.errors.forEach(function(C){return C.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Wr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:ht(Ir(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?Zt:Jt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Qt})(o))return{values:{},errors:ht(Tr(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function Hr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-group",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}const Mr=Xt("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function $r(e){const r=_e.c(11);let t,s,n;r[0]!==e?({className:t,orientation:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);const a=n===void 0?"vertical":n;let o;r[4]!==t||r[5]!==a?(o=xe(Mr({orientation:a}),t),r[4]=t,r[5]=a,r[6]=o):o=r[6];let d;return r[7]!==a||r[8]!==s||r[9]!==o?(d=le.jsx("div",{className:o,"data-orientation":a,"data-slot":"field",role:"group",...s}),r[7]=a,r[8]=s,r[9]=o,r[10]=d):d=r[10],d}function zr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-label",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}function Gr(e){const r=_e.c(15);let t,s,n,a;r[0]!==e?({className:s,children:t,errors:n,...a}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n,r[4]=a):(t=r[1],s=r[2],n=r[3],a=r[4]);let o;e:{if(t){o=t;break e}if(!n?.length){o=null;break e}let C;r[5]!==n?(C=[...new Map(n.map(Ur)).values()],r[5]=n,r[6]=C):C=r[6];const m=C;if(m?.length===1){o=m[0]?.message;break e}let V;r[7]!==m?(V=le.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:m.map(Nr)}),r[7]=m,r[8]=V):V=r[8],o=V}const d=o;if(!d)return null;let b;r[9]!==s?(b=xe("font-normal text-destructive text-xs/relaxed",s),r[9]=s,r[10]=b):b=r[10];let x;return r[11]!==d||r[12]!==a||r[13]!==b?(x=le.jsx("div",{className:b,"data-slot":"field-error",role:"alert",...a,children:d}),r[11]=d,r[12]=a,r[13]=b,r[14]=x):x=r[14],x}function Nr(e){return e?.message&&le.jsx("li",{children:e.message},e.message)}function Ur(e){return[e?.message,e]}export{jr as C,Gr as F,Br as I,Wr as a,zr as b,$r as c,Hr as d,ir as e,Ie as f,or as g,lr as h,ur as i,xt as j,tr as k,qr as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/index.js b/hive/services/hiveui/frontend/dist/assets/index.js index 0370fc455..90557fea8 100644 --- a/hive/services/hiveui/frontend/dist/assets/index.js +++ b/hive/services/hiveui/frontend/dist/assets/index.js @@ -1,13 +1,13 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/field.js","assets/index3.js","assets/useSuspenseQuery.js","assets/page-heading.js","assets/index4.js","assets/list-card.js","assets/create-volume.js","assets/back-link.js","assets/error-banner.js","assets/ec2.js","assets/useMutation.js","assets/import-key-pair.js","assets/textarea.js","assets/create-key-pair.js","assets/alert-dialog.js","assets/check.js","assets/download.js","assets/run-instances.js","assets/index5.js","assets/upload-button.js","assets/trash-2.js","assets/index6.js","assets/badge.js","assets/index7.js","assets/index8.js","assets/state-badge.js","assets/index9.js","assets/_.js","assets/_id.js","assets/_id2.js","assets/detail-row.js","assets/_id3.js","assets/_id4.js","assets/ami-details.js","assets/_id5.js"])))=>i.map(i=>d[i]); -function fL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var p0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function JA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m0e(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?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 i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ny={exports:{}},Au={};var H1;function dL(){if(H1)return Au;H1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return Au.Fragment=t,Au.jsx=n,Au.jsxs=n,Au}var F1;function hL(){return F1||(F1=1,Ny.exports=dL()),Ny.exports}var $=hL(),Rp=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(){}},pL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},mL=class{#e=pL;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},rv=new mL;function gL(e){setTimeout(e,0)}var Cp=typeof window>"u"||"Deno"in globalThis;function br(){}function yL(e,t){return typeof e=="function"?e(t):e}function vL(e){return typeof e=="number"&&e>=0&&e!==1/0}function bL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ov(e,t){return typeof e=="function"?e(t):e}function SL(e,t){return typeof e=="function"?e(t):e}function V1(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==Fv(l,t.options))return!1}else if(!nf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||i&&i!==t.state.fetchStatus||c&&!c(t))}function q1(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(tf(t.options.mutationKey)!==tf(c))return!1}else if(!nf(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Fv(e,t){return(t?.queryKeyHashFn||tf)(e)}function tf(e){return JSON.stringify(e,(t,n)=>iv(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function nf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nf(e[n],t[n])):!1}var _L=Object.prototype.hasOwnProperty;function eI(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=G1(e)&&G1(t);if(!r&&!(iv(e)&&iv(t)))return t;const c=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),f=l.length,d=r?new Array(f):{};let h=0;for(let y=0;y{rv.setTimeout(t,e)})}function EL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eI(e,t):t}function xL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function RL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vv=Symbol();function tI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Vv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function y0e(e,t){return typeof e=="function"?e(...t):!!e}function CL(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var TL=class extends Rp{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Cp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nI=new TL;function AL(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var IL=gL;function OL(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=IL;const c=f=>{t?e.push(f):i(()=>{n(f)})},l=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},batchCalls:f=>(...d)=>{c(()=>{f(...d)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var rs=OL(),ML=class extends Rp{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Cp&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jh=new ML;function DL(e){return Math.min(1e3*2**e,3e4)}function sI(e){return(e??"online")==="online"?jh.isOnline():!0}var av=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rI(e){let t=!1,n=0,r;const i=AL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new av(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>nI.isFocused()&&(e.networkMode==="always"||jh.isOnline())&&e.canRun(),y=()=>sI(e.networkMode)&&e.canRun(),g=x=>{c()||(r?.(),i.resolve(x))},v=x=>{c()||(r?.(),i.reject(x))},b=()=>new Promise(x=>{r=R=>{(c()||h())&&x(R)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const R=n===0?e.initialPromise:void 0;try{x=R??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(g).catch(C=>{if(c())return;const A=e.retry??(Cp?0:3),O=e.retryDelay??DL,D=typeof O=="function"?O(n,C):O,N=A===!0||typeof A=="number"&&nh()?void 0:b()).then(()=>{t?v(C):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?_():b().then(_),i)}}var oI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vL(this.gcTime)&&(this.#e=rv.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(rv.clearTimeout(this.#e),this.#e=void 0)}},kL=class extends oI{#e;#n;#t;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Q1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Q1(this.options);t.data!==void 0&&(this.setState(Z1(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=EL(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>SL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ov(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!bL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const f=tI(this.options,t),h=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(f,h,this):f(h)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=rI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof av&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,d)=>{this.#o({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#s.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof av){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...PL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Z1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),rs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function PL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Z1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Q1(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"}}function Y1(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let y=!1;const g=_=>{CL(_,()=>t.signal,()=>y=!0)},v=tI(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(j),j})(),O=await v(A),{maxPages:D}=t.options,N=R?RL:xL;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?NL:X1,R={pages:c,pageParams:l},C=x(r,R);f=await b(R,C,_)}else{const _=e??c.length;do{const x=d===0?l[0]??r.initialPageParam:X1(r,f);if(d>0&&x==null)break;f=await b(f,x),d++}while(d<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function X1(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 NL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var zL=class extends oI{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||LL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=rI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,l)=>{this.#s({type:"failed",failureCount:c,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#s({type:"pending",context:l,variables:e,isPaused:i})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#s({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#s({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),rs.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function LL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var BL=class extends Rp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const r=new zL({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ah(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ah(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rs.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>q1(t,n))}findAll(e={}){return this.getAll().filter(t=>q1(e,t))}notify(e){rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return rs.batch(()=>Promise.all(e.map(t=>t.continue().catch(br))))}};function ah(e){return e.options.scope?.id}var $L=class extends Rp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Fv(r,t);let c=this.get(i);return c||(c=new kL({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>V1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>V1(e,n)):t}notify(e){rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){rs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},UL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new $L,this.#n=e.mutationCache||new BL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=nI.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ov(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(r.queryHash)?.state.data,l=yL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return rs.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;rs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return rs.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=rs.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(e,t={}){return rs.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=rs.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ov(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=Y1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=Y1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jh.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(tf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{nf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(tf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{nf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fv(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===Vv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},zy={exports:{}},Ge={};var W1;function jL(){if(W1)return Ge;W1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,R={};function C(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,ne){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ne,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function j(){}var B={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Z(P,ne,ie){var de=ie.ref;return{$$typeof:e,type:P,key:ne,ref:de!==void 0?de:null,props:ie}}function se(P,ne){return Z(P.type,ne,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var ne={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return ne[ie]})}var Q=/\/+/g;function ye(P,ne){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):ne.toString(36)}function fe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(ne){P.status==="pending"&&(P.status="fulfilled",P.value=ne)},function(ne){P.status==="pending"&&(P.status="rejected",P.reason=ne)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,ne,ie,de,Ce){var Se=typeof P;(Se==="undefined"||Se==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(Se){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case e:case t:be=!0;break;case y:return be=P._init,q(be(P._payload),ne,ie,de,Ce)}}if(be)return Ce=Ce(P),be=de===""?"."+ye(P,0):de,N(Ce)?(ie="",be!=null&&(ie=be.replace(Q,"$&/")+"/"),q(Ce,ne,ie,"",function(ht){return ht})):Ce!=null&&(le(Ce)&&(Ce=se(Ce,ie+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Q,"$&/")+"/")+be)),ne.push(Ce)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(iI);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},HL=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(iI.Provider,{value:e,children:t}));const cv=new WeakMap,FL=new WeakMap,Hh={current:[]};let Ly=!1,Fu=0;const $u=new Set,ch=new Map;function cI(e){for(const t of e){if(Hh.current.includes(t))continue;Hh.current.push(t),t.recompute();const n=FL.get(t);if(n)for(const r of n){const i=cv.get(r);i?.length&&cI(i)}}}function VL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function qL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lI(e){if(Fu>0&&!ch.has(e)&&ch.set(e,e.prevState),$u.add(e),!(Fu>0)&&!Ly)try{for(Ly=!0;$u.size>0;){const t=Array.from($u);$u.clear();for(const n of t){const r=ch.get(n)??n.prevState;n.prevState=r,VL(n)}for(const n of t){const r=cv.get(n);r&&(Hh.current.push(n),cI(r))}for(const n of t){const r=cv.get(n);if(r)for(const i of r)qL(i)}}}finally{Ly=!1,Hh.current=[],ch.clear()}}function Vu(e){Fu++;try{e()}finally{if(Fu--,Fu===0){const t=$u.values().next().value;t&&lI(t)}}}function GL(e){return typeof e=="function"}let KL=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,c;this.listeners.add(r);const l=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):GL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),lI(this)}};const Ci="__TSR_index",eR="popstate",tR="beforeunload";function ZL(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(f=>f({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},c=async({task:l,navigateOpts:f,...d})=>{if(f?.ignoreBlocker??!1){l();return}const y=e.getBlockers?.()??[],g=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const v of y){const b=Fh(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,f,d)=>{const h=t.state[Ci];f=nR(h+1,f),c({task:()=>{e.pushState(l,f),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:f})},replace:(l,f,d)=>{const h=t.state[Ci];f=nR(h,f),c({task:()=>{e.replaceState(l,f),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:f})},go:(l,f)=>{c({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:f,type:"GO"})},back:l=>{c({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{c({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ci]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function nR(e,t){t||(t={});const n=Gv();return{...t,key:n,__TSR_key:n,[Ci]:e}}function QL(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const c=()=>i,l=k=>i=k,f=(k=>k),d=(()=>Fh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Gv();t.history.replaceState({[Ci]:0,key:k,__TSR_key:k},"")}let h=d(),y,g=!1,v=!1,b=!1,_=!1;const x=()=>h;let R,C;const A=()=>{R&&(B._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),B._ignoreSubscribers=!1,R=void 0,C=void 0,y=void 0)},O=(k,Z,se)=>{const le=f(Z);C||(y=h),h=Fh(Z,se),R={href:le,state:se,isPush:R?.isPush||k==="push"},C||(C=Promise.resolve().then(()=>A()))},D=k=>{h=d(),B.notify({type:k})},N=async()=>{if(v){v=!1;return}const k=d(),Z=k.state[Ci]-h.state[Ci],se=Z===1,le=Z===-1,K=!se&&!le||g;g=!1;const Q=K?"GO":le?"BACK":"FORWARD",ye=K?{type:"GO",index:Z}:{type:le?"BACK":"FORWARD"};if(b)b=!1;else{const fe=c();if(typeof document<"u"&&fe.length){for(const q of fe)if(await q.blockerFn({currentLocation:h,nextLocation:k,action:Q})){v=!0,t.history.go(1),B.notify(ye);return}}}h=d(),B.notify(ye)},j=k=>{if(_){_=!1;return}let Z=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const K=le.enableBeforeUnload??!0;if(K===!0){Z=!0;break}if(typeof K=="function"&&K()===!0){Z=!0;break}}if(Z)return k.preventDefault(),k.returnValue=""},B=ZL({getLocation:x,getLength:()=>t.history.length,pushState:(k,Z)=>O("push",k,Z),replaceState:(k,Z)=>O("replace",k,Z),back:k=>(k&&(b=!0),_=!0,t.history.back()),forward:k=>{k&&(b=!0),_=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>f(k),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(tR,j,{capture:!0}),t.removeEventListener(eR,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(tR,j,{capture:!0}),t.addEventListener(eR,N),t.history.pushState=function(...k){const Z=n.apply(t.history,k);return B._ignoreSubscribers||D("PUSH"),Z},t.history.replaceState=function(...k){const Z=r.apply(t.history,k);return B._ignoreSubscribers||D("REPLACE"),Z},B}function YL(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Fh(e,t){const n=YL(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Gv();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[Ci]:0,key:c,__TSR_key:c}}}function Gv(){return(Math.random()+1).toString(36).substring(7)}const XL=!1;function sf(e){return e[e.length-1]}function WL(e){return typeof e=="function"}function _i(e,t){return WL(e)?e(t):e}const JL=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=iR(e)&&iR(r);if(!i&&!(Vh(e)&&Vh(r)))return r;const c=i?e:rR(e);if(!c)return r;const l=i?r:rR(r);if(!l)return r;const f=c.length,d=l.length,h=i?new Array(d):{};let y=0;for(let g=0;g"u")return!0;const n=t.prototype;return!(!oR(n)||!n.hasOwnProperty("isPrototypeOf"))}function oR(e){return Object.prototype.toString.call(e)==="[object Object]"}function iR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ea(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,i=e.length;ri||!Ea(e[l],t[l],n)))return!1;return i===c}return!1}function Wc(e){let t,n;const r=new Promise((i,c)=>{t=i,n=c});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function e6(e){return typeof 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 Fc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function t6(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function aR(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return t6(t)}const uI=["http:","https:","mailto:","tel:"];function qh(e){if(!e)return!1;try{const t=new URL(e);return!uI.includes(t.protocol)}catch{return!1}}const n6={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},s6=/[&><\u2028\u2029]/g;function r6(e){return e.replace(s6,t=>n6[t])}function By(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=aR(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+aR(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function o6(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var i6="Invariant failed";function yo(e,t){if(!e)throw new Error(i6)}function Gh(e){const t=new Map;let n,r;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,r&&(r.next=c,c.prev=r)):(c.next.prev=void 0,n=c.next,c.next=void 0,r&&(c.prev=r,r.next=c)),r=c)};return{get(c){const l=t.get(c);if(l)return i(l),l.value},set(c,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const f=t.get(c);if(f)f.value=l,i(f);else{const d={key:c,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(c,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const Jc=0,Aa=1,Ia=2,rf=3,ba=4,fI=5;function a6(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Kv(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,c=e.substring(t,i);if(!c||!c.includes("$"))return n[0]=Jc,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(c==="$"){const f=e.length;return n[0]=Ia,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Aa,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=a6(c);if(l){const[f,d]=l,h=c.charCodeAt(f+1);if(h===45){if(f+2!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Uy(Aa,n.fullPath??n.from,D,N,j);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case rf:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Uy(rf,n.fullPath??n.from,D,N,j);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Ia:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=Uy(Ia,n.fullPath??n.from,D,N,j);_=B,B.parent=i,B.depth=c,i.wildcard??=[],i.wildcard.push(B)}}i=_}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=Sa(n.fullPath??n.from);b.kind=fI,b.parent=i,c++,b.depth=c,i.pathless??=[],i.pathless.push(b),i=b}const v=(n.path||!n.children)&&!n.isRoot;if(v&&d.endsWith("/")){const b=Sa(n.fullPath??n.from);b.kind=ba,b.parent=i,c++,b.depth=c,i.index=b,i=b}i.parse=n.options?.params?.parse??null,i.skipOnParamError=g,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,v&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Tp(e,t,d,f,i,c,l)}function $y(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 bi(e){if(e.pathless)for(const t of e.pathless)bi(t);if(e.static)for(const t of e.static.values())bi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())bi(t);if(e.dynamic?.length){e.dynamic.sort($y);for(const t of e.dynamic)bi(t)}if(e.optional?.length){e.optional.sort($y);for(const t of e.optional)bi(t)}if(e.wildcard?.length){e.wildcard.sort($y);for(const t of e.wildcard)bi(t)}}function Sa(e){return{kind:Jc,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Uy(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function c6(e,t){const n=Sa("/"),r=new Uint16Array(6);for(const i of e)Tp(!1,r,i,1,n,0);bi(n),t.masksTree=n,t.flatCache=Gh(1e3)}function l6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Zv(e,t.masksTree);return t.flatCache.set(e,r),r}function u6(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=Sa("/");const f=new Uint16Array(6);Tp(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Zv(r,l,n)}function f6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";let c;try{c=Zv(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=p6(c.route)),t.matchCache.set(r,c),c}function d6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function h6(e,t=!1,n){const r=Sa(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Tp(t,i,e,1,r,0,h=>{if(n?.(h,f),yo(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=d6(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),bi(r),{processedTree:{segmentTree:r,singleCache:Gh(1e3),matchCache:Gh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Zv(e,t,n=!1){const r=e.split("/"),i=g6(e,r,t,n);if(!i)return null;const[c]=dI(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function dI(e,t,n){const r=m6(n.node);let i=null;const c={};let l=n.extract?.part??0,f=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;f=0;le--){const K=v.optional[le];f.push({node:K,index:b,skipped:Z,depth:se,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j)for(let le=v.optional.length-1;le>=0;le--){const K=v.optional[le],{prefix:Q,suffix:ye}=K;if(Q||ye){const fe=K.caseSensitive?B:k??=B.toLowerCase();if(Q&&!fe.startsWith(Q)||ye&&!fe.endsWith(ye))continue}f.push({node:K,index:b+1,skipped:_,depth:se,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!j&&v.dynamic&&B)for(let Z=v.dynamic.length-1;Z>=0;Z--){const se=v.dynamic[Z],{prefix:le,suffix:K}=se;if(le||K){const Q=se.caseSensitive?B:k??=B.toLowerCase();if(le&&!Q.startsWith(le)||K&&!Q.endsWith(K))continue}f.push({node:se,index:b+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.staticInsensitive){const Z=v.staticInsensitive.get(k??=B.toLowerCase());Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.static){const Z=v.static.get(B);Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(v.pathless){const Z=x+1;for(let se=v.pathless.length-1;se>=0;se--){const le=v.pathless[se];f.push({node:le,index:b,skipped:_,depth:Z,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return Iu(d,y)?y:d;if(y)return y;if(d)return d;if(r&&h){let g=h.index;for(let b=0;be.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ba)>(e.node.kind===ba)||t.node.kind===ba==(e.node.kind===ba)&&t.depth>e.depth))):!0}function Oh(e){return Qv(e.filter(t=>t!==void 0).join("/"))}function Qv(e){return e.replace(/\/{2,}/g,"/")}function hI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ho(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function pI(e){return ho(hI(e))}function Kh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function y6(e,t,n){return Kh(e,n)===Kh(t,n)}function v6({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),c=!i&&t===".";let l;if(r){l=i?t:c?e:e+"\0"+t;const g=r.get(l);if(g)return g}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&sf(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(sf(f)===""?n==="never"&&f.pop():n==="always"&&f.push(""));let d,h="";for(let g=0;g0&&(h+="/");const v=f[g];if(!v)continue;d=Kv(v,0,d);const b=d[0];if(b===Jc){h+=v;continue}const _=d[5],x=v.substring(0,d[1]),R=v.substring(d[4],_),C=v.substring(d[2],d[3]);b===Aa?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===Ia?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=Qv(h);const y=h||"/";return l&&r&&r.set(l,y),y}function b6(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,c=>t.get(c)??c)}function Hy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):S6(r,n)}function Fy({path:e,params:t,decoder:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const c=e.length;let l=0,f,d="";for(;l{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function E6(){const e=_6();if(!e)return null;const t=e.getItem(lv);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=_i(r,n)||n;try{e.setItem(lv,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const lh=E6(),x6=e=>e.state.__TSR_key||e.href;function R6(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 Zh=!1;function C6({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:c}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=t||window.history.state?.__TSR_key,d=l[f];Zh=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const g in d){const v=d[g];if(g==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(g){const b=document.querySelector(g);b&&(b.scrollLeft=v.scrollX,b.scrollTop=v.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const v=document.getElementById(h);v&&v.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:n};if(window.scrollTo(y),i)for(const g of i){if(g==="window")continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(y)}}Zh=!1}function T6(e,t){if(!lh||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!lh))return;e.isScrollRestorationSetup=!0,Zh=!1;const r=e.options.getScrollRestorationKey||x6;window.history.scrollRestoration="manual";const i=c=>{if(Zh||!e.isScrollRestoring)return;let l="";if(c.target===document||c.target===window)l="window";else{const d=c.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=R6(c.target)}const f=r(e.state.location);lh.set(d=>{const h=d[f]||={},y=h[l]||={};if(l==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(l){const g=document.querySelector(l);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",w6(i,100),!0),e.subscribe("onRendered",c=>{const l=r(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(C6({storageKey:lv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&lh.set(f=>(f[l]||={},f)))})}function A6(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 I6(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Vy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function O6(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=Vy(i):Array.isArray(c)?c.push(Vy(i)):n[r]=[c,Vy(i)]}return n}const M6=k6(JSON.parse),D6=P6(JSON.stringify,JSON.parse);function k6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=O6(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function P6(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=I6(i,r);return c?`?${c}`:""}}const sr="__root__";function Yv(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&qh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${uI.join(", ")} protocols are allowed.`);if(!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 ir(e){return e instanceof Response&&!!e.options}const Mh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ap=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Vc=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let c=0;c<=i;c++){const l=e.matches[c];if(!l)continue;const f=e.router.getMatch(l.id);f&&Object.assign(r,f.__routeContext,f.__beforeLoadContext)}return r},mI=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),yo(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);yo(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,mI(e,t))},wi=(e,t,n)=>{if(!(!ir(n)&&!Ps(n))){if(ir(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ir(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:Vc(e,t.index),isFetching:!1,error:n})),Ps(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ir(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(mI(e,n),n)}},gI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Ou=(e,t,n,r)=>{const{id:i,routeId:c}=e.matches[t],l=e.router.looseRoutesById[c];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,wi(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,wi(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},yI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ap(e,t)&&(n.options.loader||n.options.beforeLoad||SI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Mh(e)},i);r._nonReactive.pendingTimeout=l}},N6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;yI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&wi(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},z6=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Wc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Ou(e,n,l,"PARSE_PARAMS"),f&&Ou(e,n,f,"VALIDATE_SEARCH"),yI(e,t,r,i);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let g=!1;const v=()=>{g||(g=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,j=>({...j,isFetching:!1}))};if(!r.options.beforeLoad){Vu(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Wc();const _={...Vc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Ap(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=j=>{if(j===void 0){Vu(()=>{v(),b()});return}(ir(j)||Ps(j))&&(v(),Ou(e,n,j,"BEFORE_LOAD")),Vu(()=>{v(),e.updateMatch(t,B=>({...B,__beforeLoadContext:j})),b()})};let N;try{if(N=r.options.beforeLoad(O),Fc(N))return v(),N.catch(j=>{Ou(e,n,j,"BEFORE_LOAD")}).then(D)}catch(j){v(),Ou(e,n,j,"BEFORE_LOAD")}D(N)},L6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>z6(e,n,t,i),f=()=>{if(gI(e,n))return;const d=N6(e,n,i);return Fc(d)?d.then(l):l()};return c()},B6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([c,l,f])=>{const d=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:d,links:h,headScripts:y,headers:f,scripts:l,styles:g}})},vI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=Vc(e,n),y=Ap(e,t);return{params:c,deps:l,preload:!!y,parentMatchPromise:i,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":d,route:r,...e.router.options.additionalContext}},cR=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(XL??e.router.isServer)||i.ssr===!0)&&bI(r);const c=r.options.loader?.(vI(e,t,n,r)),l=r.options.loader&&Fc(c);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=l?await c:c;wi(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,y=>({...y,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Vc(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let l=c;if(l?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Vc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Ps(c)&&await r.options.notFoundComponent?.preload?.(),wi(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,wi(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:Vc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),wi(e,c,i)}},$6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!gI(e,n)){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 y=e.router.getMatch(n),g=y._nonReactive.error||y.error;g&&wi(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Ap(e,n),v=g?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,b=l.options.shouldReload,_=typeof b=="function"?b(vI(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Wc(),x!==R.preload&&e.updateMatch(n,O=>({...O,preload:x}));const{status:C,invalid:A}=R;i=C==="success"&&(A||(_??y>v)),g&&l.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await cR(e,n,t,l);const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){ir(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await cR(e,n,t,l))}}const f=e.router.getMatch(n);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const d=c?f.isFetching:!1;return d!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):f};async function lR(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Mh(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(ir(f))throw f;!c&&Ps(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=B6(t,d,y);if(g){const v=await g;t.updateMatch(d,b=>({...b,...v}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const l=Mh(t);Fc(l)&&await l}catch(n){if(Ps(n)&&!t.preload){const r=Mh(t);throw Fc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function bI(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{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=()=>{const n=[];for(const r of _I){const i=e.options[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 SI(e){for(const t of _I)if(e.options[t]?.preload)return!0;return!1}const _I=["component","errorComponent","pendingComponent","notFoundComponent"];function U6(e){return{input:({url:t})=>{for(const n of e)t=uv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wI(e[n],t);return t}}}function j6(e){const t=pI(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),c=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const f=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return f===i?l.pathname="/":f.startsWith(c)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Oh(["/",t,l.pathname]),l)}}function uv(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function wI(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function xa(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,c=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:c}}class H6{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=>{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,i=this.basepath??r?.basepath??"/",c=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=b6(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=QL()),this.origin=this.options.origin,this.origin||(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;let v;this.resolvePathCache=Gh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new KL(V6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),T6(this));let f=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(c||i!==d||l!==h){this.basepath=d;const v=[],b=pI(d);b&&b!=="/"&&v.push(j6({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:U6(v),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.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 n=h6(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&c6(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:h})=>{const y=new URL(d,this.origin),g=uv(this.rewrite,y),v=this.options.parseSearch(g.search),b=this.options.stringifySearch(v);return g.search=b,{href:g.href.replace(g.origin,""),publicHref:d,pathname:By(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:er(r?.search,v),hash:By(g.hash.split("#").reverse()[0]??""),state:er(r?.state,h)}},c=i(n),{__tempLocation:l,__tempKey:f}=c.state;if(l&&(!f||f===this.tempLocationKey)){const d=i(l);return d.state.key=c.state.key,d.state.__TSR_key=c.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:c}}return c},this.resolvePathWithBase=(n,r)=>v6({base:n,to:Qv(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>q6({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(c=>c.status==="pending"),r=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=n=>{const r=(c={})=>{const l=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(l);c.from;const d=c.unsafeRelative==="path"?l.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(d,"."),y=f.search,g={...f.params},v=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),b=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,_i(c.params,g)),_=Fy({path:v,params:b}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:ho(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:uR(this.options.notFoundMode,R)),Object.keys(b).length>0)for(const K of R){const Q=K.options.params?.stringify??K.options.stringifyParams;Q&&Object.assign(b,Q(b))}const A=n.leaveParams?v:By(Fy({path:v,params:b,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const K={};R.forEach(Q=>{if(Q.options.validateSearch)try{Object.assign(K,Dh(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=G6({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=er(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?_i(c.hash,l.hash):void 0,j=N?`#${N}`:"";let B=c.state===!0?l.state:c.state?_i(c.state,l.state):{};B=er(l.state,B);const k=`${A}${D}${j}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=wI(this.rewrite,K);Z=K.href.replace(K.origin,""),Q.origin!==this.origin?(se=Q.href,le=!0):se=Q.pathname+Q.search+Q.hash}else Z=o6(k),se=Z;return{publicHref:se,href:Z,pathname:A,search:O,searchStr:D,state:B,hash:N??"",external:le,unmaskOnReload:c.unmaskOnReload}},i=(c={},l)=>{const f=r(c);let d=l?r(l):void 0;if(!d){const h={};if(this.options.routeMasks){const y=l6(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:v,...b}=y.route,_=v===!1||v===null?{}:(v??!0)===!0?h:Object.assign(h,_i(v,h));l={from:n.from,...b,params:_},d=r(l)}}}return d&&(f.maskedLocation=d),f};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const c=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const h=Ea(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=ho(this.latestLocation.href)===ho(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Wc(()=>{f?.resolve()}),l&&c())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...y}=i;d&&(y={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:l,href:f,...d}={})=>{if(f){const g=this.history.location.state.__TSR_index,v=Fh(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=uv(this.rewrite,b);d.to=_.pathname,d.search=this.options.parseSearch(v.search),d.hash=v.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:c,...l})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...l});i=i??h.publicHref,c=c??h.publicHref}const d=!f&&c?c:i;if(qh(d))return Promise.resolve();if(!l.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();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(i=>!n.some(c=>c.id===i.id))}))},this.load=async n=>{let r,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...xa({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...xa({resolvedLocation:h,location:d})}),await lR({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],v=[];Vu(()=>{this.__store.setState(b=>{const _=b.matches,x=b.pendingMatches||b.matches;return y=_.filter(R=>!x.some(C=>C.id===R.id)),g=x.filter(R=>!_.some(C=>C.id===R.id)),v=x.filter(R=>_.some(C=>C.id===R.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...y.filter(R=>R.status!=="error"&&R.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,_])=>{b.forEach(x=>{this.looseRoutesById[x.routeId].options[_]?.(x)})})})})}})}catch(d){ir(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ps(d)&&(i=d),this.__store.setState(h=>({...h,statusCode:r?r.status:i?404:h.matches.some(y=>y.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(f=>f.status==="error")&&(l=500),l!==void 0&&this.__store.setState(f=>({...f,statusCode:l}))},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 i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,l=this.state.resolvedLocation,f=typeof r.types=="function"?r.types(xa({resolvedLocation:l,location:c})):r.types;if(f===!1){n();return}i={update:n,types:f}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===n)?"pendingMatches":this.state.matches.some(c=>c.id===n)?"matches":this.state.cachedMatches.some(c=>c.id===n)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;n.options.href=c,n.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(n.options),c=this.getParsedLocationHref(i);n.options.href=c,n.headers.set("Location",c)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!r(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const c=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=c};this.clearCache({filter:n})},this.loadRouteChunk=bI,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),l=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);Vu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await lR({router:this,matches:i,location:r,preload:!0,updateMatch:(f,d)=>{c.has(f)?i=i.map(h=>h.id===f?d(h):h):this.updateMatch(f,d)}}),i}catch(f){if(ir(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});Ps(f)||console.error(f);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},c=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const f=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=u6(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!Ea(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ea(f.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},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??D6,parseSearch:t.parseSearch??M6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:l}=r;let{matchedRoutes:f}=r,d=!1;(i?i.path!=="/"&&c["**"]:ho(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?uR(this.options.notFoundMode,f):void 0,y=[],g=v=>v?.id?v.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((v,b)=>{const _=y[b-1],[x,R,C]=(()=>{const ye=_?.search??t.search,fe=_?._strictSearch??void 0;try{const q=Dh(v.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let W=q;if(q instanceof Qh||(W=new Qh(q.message,{cause:q})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Fy({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),j=v.id+D+O,B=this.getMatch(j),k=this.state.matches.find(ye=>ye.routeId===v.id),Z=B?._strictParams??N;let se;if(!B)try{fR(v,N,l,Z)}catch(ye){if(Ps(ye)||ir(ye)?se=ye:se=new F6(ye.message,{cause:ye}),n?.throwOnError)throw se}Object.assign(c,Z);const le=k?"stay":"enter";let K;if(B)K={...B,cause:le,params:k?er(k.params,c):c,_strictParams:Z,search:er(k?k.search:B.search,x),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||SI(v)?"pending":"success";K={id:j,ssr:v.options.ssr,index:b,routeId:v.id,params:k?er(k.params,c):c,_strictParams:Z,pathname:D,updatedAt:Date.now(),search:k?er(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:Wc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?er(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}n?.preload||(K.globalNotFound=h===v.id),K.searchError=C;const Q=g(_);K.context={...Q,...K.__routeContext,...K.__beforeLoadContext},y.push(K)}),y.forEach((v,b)=>{const _=this.looseRoutesById[v.routeId];if(!this.getMatch(v.id)){const R=y[b-1],C=g(R);if(_.options.context){const A={deps:v.loaderDeps,params:v.params,context:C??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:y};v.__routeContext=_.options.context(A)??void 0}v.context={...C,...v.__routeContext,...v.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=sf(n),l={...t.search};for(const y of n)try{Object.assign(l,Dh(y.options.validateSearch,l))}catch{}const f=sf(this.state.matches),d=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let h;if(d)h=f.params;else{const y={...r};for(const g of n)try{fR(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Qh extends Error{}class F6 extends Error{}function V6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Dh(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qh("Async validation not supported");if(n.issues)throw new Qh(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 q6({pathname:e,routesById:t,processedTree:n}){const r={},i=ho(e);let c,l;const f=f6(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[sr]],routeParams:r,foundRoute:c,parsedParams:l}}function G6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return K6(n)(e,t,r??!1)}function K6(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:l,next:f})=>{let d=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(d=i.options.preSearchFilters.reduce((y,g)=>g(y),l));const h=f(d);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,g)=>g(y),h):h};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:l,next:f})=>{const d=f(l);if(!t._includeValidateSearch)return d;try{return{...d,...Dh(i.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(c)}}const n=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:_i(c.search,i):{}};t.middlewares.push(n);const r=(i,c,l)=>{if(i>=l.length)return c;const f=l[i];return f({search:c,next:h=>r(i+1,h,l)})};return function(c,l,f){return t.dest=l,t._includeValidateSearch=f,r(0,c,t.middlewares)}}function uR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return sr}function fR(e,t,n,r){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in n&&(r[c]=n[c]);else{const c=i(r);Object.assign(r,c)}}const Z6="Error preloading route! ☝️";class EI{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=sr:this.parentRoute||yo(!1);let c=i?sr:r?.path;c&&c!=="/"&&(c=hI(c));const l=r?.id||c;let f=i?sr:Oh([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Oh(["/",f]));const d=f===sr?"/":Oh([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=ho(d)},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.redirect=n=>Yv({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&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 Q6 extends EI{constructor(t){super(t)}}const Y6="use",dR=qv[Y6],uh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function qy(e){const t=I.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function X6(e,t,n={},r={}){I.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function W6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Xv(e){const t=e.errorComponent??Wv;return $.jsx(J6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class J6 extends I.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 Wv({error:e}){const[t,n]=I.useState(!1);return $.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[$.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),$.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"})]}),$.jsx("div",{style:{height:".25rem"}}),t?$.jsx("div",{children:$.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?$.jsx("code",{children:e.message}):null})}):null]})}function eB({children:e,fallback:t=null}){return xI()?$.jsx(Xc.Fragment,{children:e}):$.jsx(Xc.Fragment,{children:t})}function xI(){return Xc.useSyncExternalStore(tB,()=>!0,()=>!1)}function tB(){return()=>{}}var Gy={exports:{}},Ky={},Zy={exports:{}},Qy={};var hR;function nB(){if(hR)return Qy;hR=1;var e=al();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function f(g,v){var b=v(),_=r({inst:{value:b,getSnapshot:v}}),x=_[0].inst,R=_[1];return c(function(){x.value=b,x.getSnapshot=v,d(x)&&R({inst:x})},[g,b,v]),i(function(){return d(x)&&R({inst:x}),g(function(){d(x)&&R({inst:x})})},[g]),l(b),b}function d(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!n(g,b)}catch{return!0}}function h(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Qy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Qy}var pR;function RI(){return pR||(pR=1,Zy.exports=nB()),Zy.exports}var mR;function sB(){if(mR)return Ky;mR=1;var e=al(),t=RI();function n(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,c=e.useRef,l=e.useEffect,f=e.useMemo,d=e.useDebugValue;return Ky.useSyncExternalStoreWithSelector=function(h,y,g,v,b){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function C(j){if(!A){if(A=!0,O=j,j=v(j),b!==void 0&&x.hasValue){var B=x.value;if(b(B,j))return D=B}return D=j}if(B=D,r(O,j))return B;var k=v(j);return b!==void 0&&b(B,k)?(O=j,B):(O=j,D=k)}var A=!1,O,D,N=g===void 0?null:g;return[function(){return C(y())},N===null?void 0:function(){return C(N())}]},[y,g,v,b]);var R=i(h,_[0],_[1]);return l(function(){x.hasValue=!0,x.value=R},[R]),d(R),R},Ky}var gR;function rB(){return gR||(gR=1,Gy.exports=sB()),Gy.exports}var CI=rB();function oB(e,t=r=>r,n={}){const r=n.equal??iB;return CI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function iB(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,i]of e)if(!t.has(r)||!Object.is(i,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=yR(e);if(n.length!==yR(t).length)return!1;for(let r=0;r"u"?Yy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Yy,Yy)}function Wn(e){const t=I.useContext(TI());return e?.warn,t}function dn(e){const t=Wn({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return oB(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=er(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Ip=I.createContext(void 0),aB=I.createContext(void 0);function Nr(e){const t=I.useContext(e.from?aB:Ip);return dn({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(yo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function Jv(e){return Nr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function eb(e){const{select:t,...n}=e;return Nr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function tb(e){return Nr({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 nb(e){return Nr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Op(e){const t=Wn();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Xy={exports:{}},qn={};var vR;function cB(){if(vR)return qn;vR=1;var e=al();function t(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Xy.exports=cB(),Xy.exports}var ki=AI();function lB(e,t){const n=Wn(),r=W6(t),{activeProps:i,inactiveProps:c,activeOptions:l,to:f,preload:d,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:v,resetScroll:b,viewTransition:_,children:x,target:R,disabled:C,style:A,className:O,onClick:D,onFocus:N,onMouseEnter:j,onMouseLeave:B,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:q,from:W,_fromLocation:H,...ve}=e,Te=xI(),P=dn({select:gt=>gt.location.search,structuralSharing:!0}),ne=e.from,ie=I.useMemo(()=>({...e,from:ne}),[n,P,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...ie}),[n,ie]),Ce=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Se=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>mB(Ce,Se,n.history,C),[C,Se,Ce,n.history]),Ye=I.useMemo(()=>{if(be?.external)return qh(be.href)?void 0:be.href;if(!gB(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),qh(f)?void 0:f}catch{}},[f,be]),He=dn({select:gt=>{if(Ye)return!1;if(l?.exact){if(!y6(gt.location.pathname,de.pathname,n.basepath))return!1}else{const $t=Kh(gt.location.pathname,n.basepath),Ut=Kh(de.pathname,n.basepath);if(!($t.startsWith(Ut)&&($t.length===Ut.length||$t[Ut.length]==="/")))return!1}return(l?.includeSearch??!0)&&!Ea(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?_i(i,{})??uB:Wy,Ft=He?Wy:_i(c,{})??Wy,oe=[O,ht.className,Ft.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ft.style)&&{...A,...ht.style,...Ft.style},[Ie,Pt]=I.useState(!1),_e=I.useRef(!1),Ne=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,qe=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(Z6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);X6(r,ut,pB,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{_e.current||!C&&Ne==="render"&&(Qe(),_e.current=!0)},[C,Qe,Ne]);const Be=gt=>{const $t=gt.currentTarget.getAttribute("target"),Ut=R!==void 0?R:$t;if(!C&&!yB(gt)&&!gt.defaultPrevented&&(!Ut||Ut==="_self")&>.button===0){gt.preventDefault(),ki.flushSync(()=>{Pt(!0)});const on=n.subscribe("onResolved",()=>{on(),Pt(!1)});n.navigate({...ie,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:_,ignoreBlocker:Z})}};if(Ye)return{...ve,ref:r,href:Ye,...x&&{children:x},...R&&{target:R},...C&&{disabled:C},...A&&{style:A},...O&&{className:O},...D&&{onClick:D},...N&&{onFocus:N},...j&&{onMouseEnter:j},...B&&{onMouseLeave:B},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},rn=Le,it=gt=>{if(!(C||!Ne))if(!qe)Qe();else{const $t=gt.target;if(Mu.has($t))return;const Ut=setTimeout(()=>{Mu.delete($t),Qe()},qe);Mu.set($t,Ut)}},_s=gt=>{if(C||!Ne||!qe)return;const $t=gt.target,Ut=Mu.get($t);Ut&&(clearTimeout(Ut),Mu.delete($t))};return{...ve,...ht,...Ft,href:be?.href,ref:r,onClick:Du([D,Be]),onFocus:Du([N,Le]),onMouseEnter:Du([j,it]),onMouseLeave:Du([B,_s]),onTouchStart:Du([k,rn]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&fB,...He&&dB,...Te&&Ie&&hB}}const Wy={},uB={className:"active"},fB={role:"link","aria-disabled":!0},dB={"data-status":"active","aria-current":"page"},hB={"data-transitioning":"transitioning"},Mu=new WeakMap,pB={rootMargin:"100px"},Du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function mB(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function gB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Or=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=lB(r,t),l=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;if(!n){const{disabled:f,...d}=c;return I.createElement("a",d,l)}return I.createElement(n,c,l)});function yB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let vB=class extends EI{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>eb({...n,from:this.id}),this.useLoaderData=n=>Jv({...n,from:this.id}),this.useNavigate=()=>Op({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function bB(e){return new vB(e)}function SB(){return e=>wB(e)}class _B extends Q6{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>eb({...n,from:this.id}),this.useLoaderData=n=>Jv({...n,from:this.id}),this.useNavigate=()=>Op({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function wB(e){return new _B(e)}function Xt(e){return typeof e=="object"?new SR(e,{silent:!0}).createRoute(e):new SR(e,{silent:!0}).createRoute}class SR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=bB(r);return i.isRoot=!1,i},this.silent=n?.silent}}class _R{constructor(t){this.useMatch=n=>Nr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>eb({...n,from:this.options.id}),this.useLoaderData=n=>Jv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Wn();return Op({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function wR(e){return typeof e=="object"?new _R(e):t=>new _R({id:e,...t})}function yn(e,t){let n,r,i,c;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t]}).catch(d=>{if(i=d,e6(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),n),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(dR)dR(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function EB(){const e=Wn(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=dn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=qy(c),f=c||n||i,d=qy(f),h=c||i,y=qy(h);return e.startTransition=g=>{r(!0),I.startTransition(()=>{g(),r(!1)})},I.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ho(e.latestLocation.publicHref)!==ho(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),uh(()=>{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(v){console.error(v)}})()},[e]),uh(()=>{l&&!c&&e.emit({type:"onLoad",...xa(e.state)})},[l,e,c]),uh(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...xa(e.state)})},[h,y,e]),uh(()=>{if(d&&!f){const g=xa(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&A6(e)}},[f,d,e]),null}function xB(e){const t=dn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return $.jsx(Xv,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ps(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ps(n))return e.fallback?.(n);throw n},children:e.children})}function RB(){return $.jsx("p",{children:"Not Found"})}function Uc(e){return $.jsx($.Fragment,{children:e.children})}function II(e,t,n){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...n}):$.jsx(RB,{})}function CB(){return Wn().isScrollRestoring,null}const OI=I.memo(function({matchId:t}){const n=Wn(),r=dn({select:C=>{const A=C.matches.find(O=>O.id===t);return yo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],c=i.options.pendingComponent??n.options.defaultPendingComponent,l=c?$.jsx(c,{}):null,f=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=r.ssr===!1||r.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?I.Suspense:Uc,v=f?Xv:Uc,b=h?xB:Uc,_=dn({select:C=>C.loadedAt}),x=dn({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??Uc:Uc;return $.jsxs(R,{children:[$.jsx(Ip.Provider,{value:t,children:$.jsx(g,{fallback:l,children:$.jsx(v,{getResetKey:()=>_,errorComponent:f||Wv,onCatch:(C,A)=>{if(Ps(C))throw C;d?.(C,A)},children:$.jsx(b,{fallback:C=>{if(!h||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!i.isRoot)throw C;return I.createElement(h,C)},children:y||r._displayPending?$.jsx(eB,{fallback:l,children:$.jsx(ER,{matchId:t})}):$.jsx(ER,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?$.jsxs($.Fragment,{children:[$.jsx(TB,{}),$.jsx(CB,{})]}):null]})});function TB(){const e=Wn(),t=I.useRef(void 0);return $.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...xa(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const ER=I.memo(function({matchId:t}){const n=Wn(),{match:r,key:i,routeId:c}=dn({select:d=>{const h=d.matches.find(_=>_.id===t),y=h.routeId,v=(n.routesById[y].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),l=n.routesById[c],f=I.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?$.jsx(d,{},i):$.jsx(MI,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(r.id);if(h&&!h._nonReactive.minPendingPromise){const y=Wc();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return yo(Ps(r.error)),II(n,l,r.error);if(r.status==="redirected")throw yo(ir(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),MI=I.memo(function(){const t=Wn(),n=I.useContext(Ip),r=dn({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=dn({select:h=>{const g=h.matches.find(v=>v.id===n);return yo(g),g.globalNotFound}}),l=dn({select:h=>{const y=h.matches,g=y.findIndex(v=>v.id===n);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?$.jsx(t.options.defaultPendingComponent,{}):null;if(c)return II(t,i,void 0);if(!l)return null;const d=$.jsx(OI,{matchId:l});return r===sr?$.jsx(I.Suspense,{fallback:f,children:d}):d});function AB(){const e=Wn(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?$.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?Uc:I.Suspense,c=$.jsxs(i,{fallback:r,children:[$.jsx(EB,{}),$.jsx(IB,{})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:c}):c}function IB(){const e=Wn(),t=dn({select:i=>i.matches[0]?.id}),n=dn({select:i=>i.loadedAt}),r=t?$.jsx(OI,{matchId:t}):null;return $.jsx(Ip.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:$.jsx(Xv,{getResetKey:()=>n,errorComponent:Wv,onCatch:i=>{i.message||i.toString()},children:r})})}const OB=e=>new MB(e);class MB extends H6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Xt,globalThis.createLazyFileRoute=wR):typeof window<"u"&&(window.createFileRoute=Xt,window.createLazyFileRoute=wR);function DB({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=TI(),i=$.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:i}):i}function kB({router:e,...t}){return $.jsx(DB,{router:e,...t,children:$.jsx(AB,{})})}function PB(e){return dn({select:t=>e?.select?e.select(t.location):t.location})}function NB({tag:e,attrs:t,children:n,nonce:r}){switch(e){case"title":return $.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return $.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return $.jsx("link",{...t,nonce:r,suppressHydrationWarning:!0});case"style":return $.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case"script":return $.jsx(zB,{attrs:t,children:n});default:return null}}function zB({attrs:e,children:t}){Wn(),I.useEffect(()=>{if(e?.src){const n=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===n))return;const i=document.createElement("script");for(const[c,l]of Object.entries(e))c!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(c,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const n=typeof e?.type=="string"?e.type:"text/javascript",r=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(l=>{if(!(l instanceof HTMLScriptElement))return!1;const f=l.getAttribute("type")??"text/javascript",d=l.getAttribute("nonce")??void 0;return l.textContent===t&&f===n&&d===r}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[l,f]of Object.entries(e))l!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(l,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:n,...r}=e||{};return $.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}}const LB=()=>{const e=Wn(),t=e.options.ssr?.nonce,n=dn({select:d=>d.matches.map(h=>h.meta).filter(Boolean)}),r=I.useMemo(()=>{const d=[],h={};let y;for(let g=n.length-1;g>=0;g--){const v=n[g];for(let b=v.length-1;b>=0;b--){const _=v[b];if(_)if(_.title)y||(y={tag:"title",children:_.title});else if("script:ld+json"in _)try{const x=JSON.stringify(_["script:ld+json"]);d.push({tag:"script",attrs:{type:"application/ld+json"},children:r6(x)})}catch{}else{const x=_.name??_.property;if(x){if(h[x])continue;h[x]=!0}d.push({tag:"meta",attrs:{..._,nonce:t}})}}}return y&&d.push(y),t&&d.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),d.reverse(),d},[n,t]),i=dn({select:d=>{const h=d.matches.map(v=>v.links).filter(Boolean).flat(1).map(v=>({tag:"link",attrs:{...v,nonce:t}})),y=e.ssr?.manifest,g=d.matches.map(v=>y?.routes[v.routeId]?.assets??[]).filter(Boolean).flat(1).filter(v=>v.tag==="link").map(v=>({tag:"link",attrs:{...v.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...h,...g]},structuralSharing:!0}),c=dn({select:d=>{const h=[];return d.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),h},structuralSharing:!0}),l=dn({select:d=>d.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:t},children:h})),structuralSharing:!0}),f=dn({select:d=>d.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:t},children:h})),structuralSharing:!0});return BB([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function BB(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function $B(){const e=LB(),n=Wn().options.ssr?.nonce;return $.jsx($.Fragment,{children:e.map(r=>I.createElement(NB,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var Jy={exports:{}},ku={},e0={exports:{}},t0={};var xR;function UB(){return xR||(xR=1,(function(e){function t(q,W){var H=q.length;q.push(W);e:for(;0>>1,Te=q[ve];if(0>>1;vei(ie,H))dei(Ce,ie)?(q[ve]=Ce,q[de]=H,ve=de):(q[ve]=ie,q[ne]=H,ve=ne);else if(dei(Ce,H))q[ve]=Ce,q[de]=H,ve=de;else break e}}return W}function i(q,W){var H=q.sortIndex-W.sortIndex;return H!==0?H:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],y=1,g=null,v=3,b=!1,_=!1,x=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,j||(j=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-q)}}var j=!1,B=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-Zq&&se());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Te=ve(g.expirationTime<=q);if(q=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(q),W=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),W=!1}}break e}finally{g=null,v=H,b=!1}W=void 0}}finally{W?K():j=!1}}}var K;if(typeof O=="function")K=function(){O(le)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ye=Q.port2;Q.port1.onmessage=le,K=function(){ye.postMessage(null)}}else K=function(){C(le,0)};function fe(q,W){B=C(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125ve?(q.sortIndex=H,t(h,q),n(d)===null&&q===n(h)&&(x?(A(B),B=-1):x=!0,fe(N,H-ve))):(q.sortIndex=Te,t(d,q),_||b||(_=!0,j||(j=!0,K()))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var W=v;return function(){var H=v;v=W;try{return q.apply(this,arguments)}finally{v=H}}}})(t0)),t0}var RR;function jB(){return RR||(RR=1,e0.exports=UB()),e0.exports}var CR;function HB(){if(CR)return ku;CR=1;var e=jB(),t=al(),n=AI();function r(s){var o="https://react.dev/errors/"+s;if(1Te||(s.current=ve[Te],ve[Te]=null,Te--)}function ie(s,o){Te++,ve[Te]=s.current,s.current=o}var de=P(null),Ce=P(null),Se=P(null),be=P(null);function Ye(s,o){switch(ie(Se,o),ie(Ce,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?f1(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=f1(o),s=d1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ne(de),ie(de,s)}function He(){ne(de),ne(Ce),ne(Se)}function ht(s){s.memoizedState!==null&&ie(be,s);var o=de.current,a=d1(o,s.type);o!==a&&(ie(Ce,s),ie(de,a))}function Ft(s){Ce.current===s&&(ne(de),ne(Ce)),be.current===s&&(ne(be),xu._currentValue=H)}var oe,Fe;function Ie(s){if(oe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",Fe=-1r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var y0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function JA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v0e(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?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 i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ny={exports:{}},Au={};var H1;function hL(){if(H1)return Au;H1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return Au.Fragment=t,Au.jsx=n,Au.jsxs=n,Au}var F1;function pL(){return F1||(F1=1,Ny.exports=hL()),Ny.exports}var $=pL(),Rp=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(){}},mL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gL=class{#e=mL;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},rv=new gL;function yL(e){setTimeout(e,0)}var Cp=typeof window>"u"||"Deno"in globalThis;function br(){}function vL(e,t){return typeof e=="function"?e(t):e}function bL(e){return typeof e=="number"&&e>=0&&e!==1/0}function SL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ov(e,t){return typeof e=="function"?e(t):e}function _L(e,t){return typeof e=="function"?e(t):e}function V1(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==Fv(l,t.options))return!1}else if(!nf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||i&&i!==t.state.fetchStatus||c&&!c(t))}function q1(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(tf(t.options.mutationKey)!==tf(c))return!1}else if(!nf(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Fv(e,t){return(t?.queryKeyHashFn||tf)(e)}function tf(e){return JSON.stringify(e,(t,n)=>iv(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function nf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nf(e[n],t[n])):!1}var wL=Object.prototype.hasOwnProperty;function eI(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=G1(e)&&G1(t);if(!r&&!(iv(e)&&iv(t)))return t;const c=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),f=l.length,d=r?new Array(f):{};let h=0;for(let y=0;y{rv.setTimeout(t,e)})}function xL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eI(e,t):t}function RL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function CL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vv=Symbol();function tI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Vv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function S0e(e,t){return typeof e=="function"?e(...t):!!e}function TL(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var AL=class extends Rp{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Cp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nI=new AL;function IL(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var OL=yL;function ML(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=OL;const c=f=>{t?e.push(f):i(()=>{n(f)})},l=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},batchCalls:f=>(...d)=>{c(()=>{f(...d)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var rs=ML(),DL=class extends Rp{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Cp&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jh=new DL;function kL(e){return Math.min(1e3*2**e,3e4)}function sI(e){return(e??"online")==="online"?jh.isOnline():!0}var av=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rI(e){let t=!1,n=0,r;const i=IL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new av(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>nI.isFocused()&&(e.networkMode==="always"||jh.isOnline())&&e.canRun(),y=()=>sI(e.networkMode)&&e.canRun(),g=x=>{c()||(r?.(),i.resolve(x))},v=x=>{c()||(r?.(),i.reject(x))},b=()=>new Promise(x=>{r=R=>{(c()||h())&&x(R)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const R=n===0?e.initialPromise:void 0;try{x=R??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(g).catch(C=>{if(c())return;const A=e.retry??(Cp?0:3),O=e.retryDelay??kL,D=typeof O=="function"?O(n,C):O,N=A===!0||typeof A=="number"&&nh()?void 0:b()).then(()=>{t?v(C):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?_():b().then(_),i)}}var oI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bL(this.gcTime)&&(this.#e=rv.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(rv.clearTimeout(this.#e),this.#e=void 0)}},PL=class extends oI{#e;#n;#t;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Q1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Q1(this.options);t.data!==void 0&&(this.setState(Z1(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=xL(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>_L(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ov(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!SL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const f=tI(this.options,t),h=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(f,h,this):f(h)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=rI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof av&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,d)=>{this.#o({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#s.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof av){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...NL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Z1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),rs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function NL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Z1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Q1(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"}}function Y1(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let y=!1;const g=_=>{TL(_,()=>t.signal,()=>y=!0)},v=tI(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(j),j})(),O=await v(A),{maxPages:D}=t.options,N=R?CL:RL;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?zL:X1,R={pages:c,pageParams:l},C=x(r,R);f=await b(R,C,_)}else{const _=e??c.length;do{const x=d===0?l[0]??r.initialPageParam:X1(r,f);if(d>0&&x==null)break;f=await b(f,x),d++}while(d<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function X1(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 zL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var LL=class extends oI{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||BL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=rI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,l)=>{this.#s({type:"failed",failureCount:c,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#s({type:"pending",context:l,variables:e,isPaused:i})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#s({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#s({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),rs.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function BL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $L=class extends Rp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const r=new LL({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ah(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ah(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rs.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>q1(t,n))}findAll(e={}){return this.getAll().filter(t=>q1(e,t))}notify(e){rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return rs.batch(()=>Promise.all(e.map(t=>t.continue().catch(br))))}};function ah(e){return e.options.scope?.id}var UL=class extends Rp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Fv(r,t);let c=this.get(i);return c||(c=new PL({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>V1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>V1(e,n)):t}notify(e){rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){rs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new UL,this.#n=e.mutationCache||new $L,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=nI.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ov(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(r.queryHash)?.state.data,l=vL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return rs.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;rs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return rs.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=rs.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(e,t={}){return rs.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=rs.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ov(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=Y1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=Y1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jh.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(tf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{nf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(tf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{nf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fv(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===Vv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},zy={exports:{}},Ge={};var W1;function HL(){if(W1)return Ge;W1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,R={};function C(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,ne){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ne,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function j(){}var B={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Z(P,ne,ie){var de=ie.ref;return{$$typeof:e,type:P,key:ne,ref:de!==void 0?de:null,props:ie}}function se(P,ne){return Z(P.type,ne,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var ne={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return ne[ie]})}var Q=/\/+/g;function ye(P,ne){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):ne.toString(36)}function fe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(ne){P.status==="pending"&&(P.status="fulfilled",P.value=ne)},function(ne){P.status==="pending"&&(P.status="rejected",P.reason=ne)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,ne,ie,de,Ce){var Se=typeof P;(Se==="undefined"||Se==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(Se){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case e:case t:be=!0;break;case y:return be=P._init,q(be(P._payload),ne,ie,de,Ce)}}if(be)return Ce=Ce(P),be=de===""?"."+ye(P,0):de,N(Ce)?(ie="",be!=null&&(ie=be.replace(Q,"$&/")+"/"),q(Ce,ne,ie,"",function(ht){return ht})):Ce!=null&&(le(Ce)&&(Ce=se(Ce,ie+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Q,"$&/")+"/")+be)),ne.push(Ce)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(iI);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},FL=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(iI.Provider,{value:e,children:t}));const cv=new WeakMap,VL=new WeakMap,Hh={current:[]};let Ly=!1,Fu=0;const $u=new Set,ch=new Map;function cI(e){for(const t of e){if(Hh.current.includes(t))continue;Hh.current.push(t),t.recompute();const n=VL.get(t);if(n)for(const r of n){const i=cv.get(r);i?.length&&cI(i)}}}function qL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function GL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lI(e){if(Fu>0&&!ch.has(e)&&ch.set(e,e.prevState),$u.add(e),!(Fu>0)&&!Ly)try{for(Ly=!0;$u.size>0;){const t=Array.from($u);$u.clear();for(const n of t){const r=ch.get(n)??n.prevState;n.prevState=r,qL(n)}for(const n of t){const r=cv.get(n);r&&(Hh.current.push(n),cI(r))}for(const n of t){const r=cv.get(n);if(r)for(const i of r)GL(i)}}}finally{Ly=!1,Hh.current=[],ch.clear()}}function Vu(e){Fu++;try{e()}finally{if(Fu--,Fu===0){const t=$u.values().next().value;t&&lI(t)}}}function KL(e){return typeof e=="function"}let ZL=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,c;this.listeners.add(r);const l=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):KL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),lI(this)}};const Ci="__TSR_index",eR="popstate",tR="beforeunload";function QL(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(f=>f({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},c=async({task:l,navigateOpts:f,...d})=>{if(f?.ignoreBlocker??!1){l();return}const y=e.getBlockers?.()??[],g=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const v of y){const b=Fh(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,f,d)=>{const h=t.state[Ci];f=nR(h+1,f),c({task:()=>{e.pushState(l,f),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:f})},replace:(l,f,d)=>{const h=t.state[Ci];f=nR(h,f),c({task:()=>{e.replaceState(l,f),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:f})},go:(l,f)=>{c({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:f,type:"GO"})},back:l=>{c({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{c({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ci]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function nR(e,t){t||(t={});const n=Gv();return{...t,key:n,__TSR_key:n,[Ci]:e}}function YL(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const c=()=>i,l=k=>i=k,f=(k=>k),d=(()=>Fh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Gv();t.history.replaceState({[Ci]:0,key:k,__TSR_key:k},"")}let h=d(),y,g=!1,v=!1,b=!1,_=!1;const x=()=>h;let R,C;const A=()=>{R&&(B._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),B._ignoreSubscribers=!1,R=void 0,C=void 0,y=void 0)},O=(k,Z,se)=>{const le=f(Z);C||(y=h),h=Fh(Z,se),R={href:le,state:se,isPush:R?.isPush||k==="push"},C||(C=Promise.resolve().then(()=>A()))},D=k=>{h=d(),B.notify({type:k})},N=async()=>{if(v){v=!1;return}const k=d(),Z=k.state[Ci]-h.state[Ci],se=Z===1,le=Z===-1,K=!se&&!le||g;g=!1;const Q=K?"GO":le?"BACK":"FORWARD",ye=K?{type:"GO",index:Z}:{type:le?"BACK":"FORWARD"};if(b)b=!1;else{const fe=c();if(typeof document<"u"&&fe.length){for(const q of fe)if(await q.blockerFn({currentLocation:h,nextLocation:k,action:Q})){v=!0,t.history.go(1),B.notify(ye);return}}}h=d(),B.notify(ye)},j=k=>{if(_){_=!1;return}let Z=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const K=le.enableBeforeUnload??!0;if(K===!0){Z=!0;break}if(typeof K=="function"&&K()===!0){Z=!0;break}}if(Z)return k.preventDefault(),k.returnValue=""},B=QL({getLocation:x,getLength:()=>t.history.length,pushState:(k,Z)=>O("push",k,Z),replaceState:(k,Z)=>O("replace",k,Z),back:k=>(k&&(b=!0),_=!0,t.history.back()),forward:k=>{k&&(b=!0),_=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>f(k),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(tR,j,{capture:!0}),t.removeEventListener(eR,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(tR,j,{capture:!0}),t.addEventListener(eR,N),t.history.pushState=function(...k){const Z=n.apply(t.history,k);return B._ignoreSubscribers||D("PUSH"),Z},t.history.replaceState=function(...k){const Z=r.apply(t.history,k);return B._ignoreSubscribers||D("REPLACE"),Z},B}function XL(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Fh(e,t){const n=XL(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Gv();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[Ci]:0,key:c,__TSR_key:c}}}function Gv(){return(Math.random()+1).toString(36).substring(7)}const WL=!1;function sf(e){return e[e.length-1]}function JL(e){return typeof e=="function"}function _i(e,t){return JL(e)?e(t):e}const e6=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=iR(e)&&iR(r);if(!i&&!(Vh(e)&&Vh(r)))return r;const c=i?e:rR(e);if(!c)return r;const l=i?r:rR(r);if(!l)return r;const f=c.length,d=l.length,h=i?new Array(d):{};let y=0;for(let g=0;g"u")return!0;const n=t.prototype;return!(!oR(n)||!n.hasOwnProperty("isPrototypeOf"))}function oR(e){return Object.prototype.toString.call(e)==="[object Object]"}function iR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xa(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,i=e.length;ri||!xa(e[l],t[l],n)))return!1;return i===c}return!1}function Wc(e){let t,n;const r=new Promise((i,c)=>{t=i,n=c});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function t6(e){return typeof 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 Fc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function n6(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function aR(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return n6(t)}const uI=["http:","https:","mailto:","tel:"];function qh(e){if(!e)return!1;try{const t=new URL(e);return!uI.includes(t.protocol)}catch{return!1}}const s6={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},r6=/[&><\u2028\u2029]/g;function o6(e){return e.replace(r6,t=>s6[t])}function By(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=aR(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+aR(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function i6(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var a6="Invariant failed";function yo(e,t){if(!e)throw new Error(a6)}function Gh(e){const t=new Map;let n,r;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,r&&(r.next=c,c.prev=r)):(c.next.prev=void 0,n=c.next,c.next=void 0,r&&(c.prev=r,r.next=c)),r=c)};return{get(c){const l=t.get(c);if(l)return i(l),l.value},set(c,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const f=t.get(c);if(f)f.value=l,i(f);else{const d={key:c,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(c,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const Jc=0,Ia=1,Oa=2,rf=3,Sa=4,fI=5;function c6(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Kv(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,c=e.substring(t,i);if(!c||!c.includes("$"))return n[0]=Jc,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(c==="$"){const f=e.length;return n[0]=Oa,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Ia,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=c6(c);if(l){const[f,d]=l,h=c.charCodeAt(f+1);if(h===45){if(f+2!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Uy(Ia,n.fullPath??n.from,D,N,j);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case rf:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if(B)_=B;else{const k=Uy(rf,n.fullPath??n.from,D,N,j);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Oa:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,B=Uy(Oa,n.fullPath??n.from,D,N,j);_=B,B.parent=i,B.depth=c,i.wildcard??=[],i.wildcard.push(B)}}i=_}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=_a(n.fullPath??n.from);b.kind=fI,b.parent=i,c++,b.depth=c,i.pathless??=[],i.pathless.push(b),i=b}const v=(n.path||!n.children)&&!n.isRoot;if(v&&d.endsWith("/")){const b=_a(n.fullPath??n.from);b.kind=Sa,b.parent=i,c++,b.depth=c,i.index=b,i=b}i.parse=n.options?.params?.parse??null,i.skipOnParamError=g,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,v&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Tp(e,t,d,f,i,c,l)}function $y(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 bi(e){if(e.pathless)for(const t of e.pathless)bi(t);if(e.static)for(const t of e.static.values())bi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())bi(t);if(e.dynamic?.length){e.dynamic.sort($y);for(const t of e.dynamic)bi(t)}if(e.optional?.length){e.optional.sort($y);for(const t of e.optional)bi(t)}if(e.wildcard?.length){e.wildcard.sort($y);for(const t of e.wildcard)bi(t)}}function _a(e){return{kind:Jc,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Uy(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function l6(e,t){const n=_a("/"),r=new Uint16Array(6);for(const i of e)Tp(!1,r,i,1,n,0);bi(n),t.masksTree=n,t.flatCache=Gh(1e3)}function u6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Zv(e,t.masksTree);return t.flatCache.set(e,r),r}function f6(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=_a("/");const f=new Uint16Array(6);Tp(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Zv(r,l,n)}function d6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";let c;try{c=Zv(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=m6(c.route)),t.matchCache.set(r,c),c}function h6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function p6(e,t=!1,n){const r=_a(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Tp(t,i,e,1,r,0,h=>{if(n?.(h,f),yo(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=h6(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),bi(r),{processedTree:{segmentTree:r,singleCache:Gh(1e3),matchCache:Gh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Zv(e,t,n=!1){const r=e.split("/"),i=y6(e,r,t,n);if(!i)return null;const[c]=dI(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function dI(e,t,n){const r=g6(n.node);let i=null;const c={};let l=n.extract?.part??0,f=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;f=0;le--){const K=v.optional[le];f.push({node:K,index:b,skipped:Z,depth:se,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j)for(let le=v.optional.length-1;le>=0;le--){const K=v.optional[le],{prefix:Q,suffix:ye}=K;if(Q||ye){const fe=K.caseSensitive?B:k??=B.toLowerCase();if(Q&&!fe.startsWith(Q)||ye&&!fe.endsWith(ye))continue}f.push({node:K,index:b+1,skipped:_,depth:se,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!j&&v.dynamic&&B)for(let Z=v.dynamic.length-1;Z>=0;Z--){const se=v.dynamic[Z],{prefix:le,suffix:K}=se;if(le||K){const Q=se.caseSensitive?B:k??=B.toLowerCase();if(le&&!Q.startsWith(le)||K&&!Q.endsWith(K))continue}f.push({node:se,index:b+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.staticInsensitive){const Z=v.staticInsensitive.get(k??=B.toLowerCase());Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.static){const Z=v.static.get(B);Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(v.pathless){const Z=x+1;for(let se=v.pathless.length-1;se>=0;se--){const le=v.pathless[se];f.push({node:le,index:b,skipped:_,depth:Z,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return Iu(d,y)?y:d;if(y)return y;if(d)return d;if(r&&h){let g=h.index;for(let b=0;be.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Sa)>(e.node.kind===Sa)||t.node.kind===Sa==(e.node.kind===Sa)&&t.depth>e.depth))):!0}function Oh(e){return Qv(e.filter(t=>t!==void 0).join("/"))}function Qv(e){return e.replace(/\/{2,}/g,"/")}function hI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ho(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function pI(e){return ho(hI(e))}function Kh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function v6(e,t,n){return Kh(e,n)===Kh(t,n)}function b6({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),c=!i&&t===".";let l;if(r){l=i?t:c?e:e+"\0"+t;const g=r.get(l);if(g)return g}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&sf(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(sf(f)===""?n==="never"&&f.pop():n==="always"&&f.push(""));let d,h="";for(let g=0;g0&&(h+="/");const v=f[g];if(!v)continue;d=Kv(v,0,d);const b=d[0];if(b===Jc){h+=v;continue}const _=d[5],x=v.substring(0,d[1]),R=v.substring(d[4],_),C=v.substring(d[2],d[3]);b===Ia?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===Oa?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=Qv(h);const y=h||"/";return l&&r&&r.set(l,y),y}function S6(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,c=>t.get(c)??c)}function Hy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):_6(r,n)}function Fy({path:e,params:t,decoder:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const c=e.length;let l=0,f,d="";for(;l{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function x6(){const e=w6();if(!e)return null;const t=e.getItem(lv);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=_i(r,n)||n;try{e.setItem(lv,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const lh=x6(),R6=e=>e.state.__TSR_key||e.href;function C6(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 Zh=!1;function T6({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:c}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=t||window.history.state?.__TSR_key,d=l[f];Zh=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const g in d){const v=d[g];if(g==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(g){const b=document.querySelector(g);b&&(b.scrollLeft=v.scrollX,b.scrollTop=v.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const v=document.getElementById(h);v&&v.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:n};if(window.scrollTo(y),i)for(const g of i){if(g==="window")continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(y)}}Zh=!1}function A6(e,t){if(!lh||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!lh))return;e.isScrollRestorationSetup=!0,Zh=!1;const r=e.options.getScrollRestorationKey||R6;window.history.scrollRestoration="manual";const i=c=>{if(Zh||!e.isScrollRestoring)return;let l="";if(c.target===document||c.target===window)l="window";else{const d=c.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=C6(c.target)}const f=r(e.state.location);lh.set(d=>{const h=d[f]||={},y=h[l]||={};if(l==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(l){const g=document.querySelector(l);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",E6(i,100),!0),e.subscribe("onRendered",c=>{const l=r(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(T6({storageKey:lv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&lh.set(f=>(f[l]||={},f)))})}function I6(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 O6(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Vy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function M6(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=Vy(i):Array.isArray(c)?c.push(Vy(i)):n[r]=[c,Vy(i)]}return n}const D6=P6(JSON.parse),k6=N6(JSON.stringify,JSON.parse);function P6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=M6(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function N6(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=O6(i,r);return c?`?${c}`:""}}const sr="__root__";function Yv(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&qh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${uI.join(", ")} protocols are allowed.`);if(!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 ir(e){return e instanceof Response&&!!e.options}const Mh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ap=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Vc=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let c=0;c<=i;c++){const l=e.matches[c];if(!l)continue;const f=e.router.getMatch(l.id);f&&Object.assign(r,f.__routeContext,f.__beforeLoadContext)}return r},mI=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),yo(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);yo(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,mI(e,t))},wi=(e,t,n)=>{if(!(!ir(n)&&!Ps(n))){if(ir(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ir(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:Vc(e,t.index),isFetching:!1,error:n})),Ps(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ir(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(mI(e,n),n)}},gI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Ou=(e,t,n,r)=>{const{id:i,routeId:c}=e.matches[t],l=e.router.looseRoutesById[c];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,wi(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,wi(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},yI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ap(e,t)&&(n.options.loader||n.options.beforeLoad||SI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Mh(e)},i);r._nonReactive.pendingTimeout=l}},z6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;yI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&wi(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},L6=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Wc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Ou(e,n,l,"PARSE_PARAMS"),f&&Ou(e,n,f,"VALIDATE_SEARCH"),yI(e,t,r,i);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let g=!1;const v=()=>{g||(g=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,j=>({...j,isFetching:!1}))};if(!r.options.beforeLoad){Vu(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Wc();const _={...Vc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Ap(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=j=>{if(j===void 0){Vu(()=>{v(),b()});return}(ir(j)||Ps(j))&&(v(),Ou(e,n,j,"BEFORE_LOAD")),Vu(()=>{v(),e.updateMatch(t,B=>({...B,__beforeLoadContext:j})),b()})};let N;try{if(N=r.options.beforeLoad(O),Fc(N))return v(),N.catch(j=>{Ou(e,n,j,"BEFORE_LOAD")}).then(D)}catch(j){v(),Ou(e,n,j,"BEFORE_LOAD")}D(N)},B6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>L6(e,n,t,i),f=()=>{if(gI(e,n))return;const d=z6(e,n,i);return Fc(d)?d.then(l):l()};return c()},$6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([c,l,f])=>{const d=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:d,links:h,headScripts:y,headers:f,scripts:l,styles:g}})},vI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=Vc(e,n),y=Ap(e,t);return{params:c,deps:l,preload:!!y,parentMatchPromise:i,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":d,route:r,...e.router.options.additionalContext}},cR=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(WL??e.router.isServer)||i.ssr===!0)&&bI(r);const c=r.options.loader?.(vI(e,t,n,r)),l=r.options.loader&&Fc(c);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=l?await c:c;wi(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,y=>({...y,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Vc(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let l=c;if(l?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Vc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Ps(c)&&await r.options.notFoundComponent?.preload?.(),wi(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,wi(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:Vc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),wi(e,c,i)}},U6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!gI(e,n)){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 y=e.router.getMatch(n),g=y._nonReactive.error||y.error;g&&wi(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Ap(e,n),v=g?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,b=l.options.shouldReload,_=typeof b=="function"?b(vI(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Wc(),x!==R.preload&&e.updateMatch(n,O=>({...O,preload:x}));const{status:C,invalid:A}=R;i=C==="success"&&(A||(_??y>v)),g&&l.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await cR(e,n,t,l);const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){ir(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await cR(e,n,t,l))}}const f=e.router.getMatch(n);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const d=c?f.isFetching:!1;return d!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):f};async function lR(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Mh(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(ir(f))throw f;!c&&Ps(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=$6(t,d,y);if(g){const v=await g;t.updateMatch(d,b=>({...b,...v}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const l=Mh(t);Fc(l)&&await l}catch(n){if(Ps(n)&&!t.preload){const r=Mh(t);throw Fc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function bI(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{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=()=>{const n=[];for(const r of _I){const i=e.options[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 SI(e){for(const t of _I)if(e.options[t]?.preload)return!0;return!1}const _I=["component","errorComponent","pendingComponent","notFoundComponent"];function j6(e){return{input:({url:t})=>{for(const n of e)t=uv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wI(e[n],t);return t}}}function H6(e){const t=pI(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),c=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const f=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return f===i?l.pathname="/":f.startsWith(c)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Oh(["/",t,l.pathname]),l)}}function uv(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function wI(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ra(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,c=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:c}}class F6{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=>{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,i=this.basepath??r?.basepath??"/",c=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=S6(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=YL()),this.origin=this.options.origin,this.origin||(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;let v;this.resolvePathCache=Gh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new ZL(q6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),A6(this));let f=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(c||i!==d||l!==h){this.basepath=d;const v=[],b=pI(d);b&&b!=="/"&&v.push(H6({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:j6(v),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.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 n=p6(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&l6(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:h})=>{const y=new URL(d,this.origin),g=uv(this.rewrite,y),v=this.options.parseSearch(g.search),b=this.options.stringifySearch(v);return g.search=b,{href:g.href.replace(g.origin,""),publicHref:d,pathname:By(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:er(r?.search,v),hash:By(g.hash.split("#").reverse()[0]??""),state:er(r?.state,h)}},c=i(n),{__tempLocation:l,__tempKey:f}=c.state;if(l&&(!f||f===this.tempLocationKey)){const d=i(l);return d.state.key=c.state.key,d.state.__TSR_key=c.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:c}}return c},this.resolvePathWithBase=(n,r)=>b6({base:n,to:Qv(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>G6({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(c=>c.status==="pending"),r=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=n=>{const r=(c={})=>{const l=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(l);c.from;const d=c.unsafeRelative==="path"?l.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(d,"."),y=f.search,g={...f.params},v=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),b=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,_i(c.params,g)),_=Fy({path:v,params:b}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:ho(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:uR(this.options.notFoundMode,R)),Object.keys(b).length>0)for(const K of R){const Q=K.options.params?.stringify??K.options.stringifyParams;Q&&Object.assign(b,Q(b))}const A=n.leaveParams?v:By(Fy({path:v,params:b,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const K={};R.forEach(Q=>{if(Q.options.validateSearch)try{Object.assign(K,Dh(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=K6({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=er(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?_i(c.hash,l.hash):void 0,j=N?`#${N}`:"";let B=c.state===!0?l.state:c.state?_i(c.state,l.state):{};B=er(l.state,B);const k=`${A}${D}${j}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=wI(this.rewrite,K);Z=K.href.replace(K.origin,""),Q.origin!==this.origin?(se=Q.href,le=!0):se=Q.pathname+Q.search+Q.hash}else Z=i6(k),se=Z;return{publicHref:se,href:Z,pathname:A,search:O,searchStr:D,state:B,hash:N??"",external:le,unmaskOnReload:c.unmaskOnReload}},i=(c={},l)=>{const f=r(c);let d=l?r(l):void 0;if(!d){const h={};if(this.options.routeMasks){const y=u6(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:v,...b}=y.route,_=v===!1||v===null?{}:(v??!0)===!0?h:Object.assign(h,_i(v,h));l={from:n.from,...b,params:_},d=r(l)}}}return d&&(f.maskedLocation=d),f};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const c=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const h=xa(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=ho(this.latestLocation.href)===ho(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Wc(()=>{f?.resolve()}),l&&c())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...y}=i;d&&(y={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:l,href:f,...d}={})=>{if(f){const g=this.history.location.state.__TSR_index,v=Fh(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=uv(this.rewrite,b);d.to=_.pathname,d.search=this.options.parseSearch(v.search),d.hash=v.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:c,...l})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...l});i=i??h.publicHref,c=c??h.publicHref}const d=!f&&c?c:i;if(qh(d))return Promise.resolve();if(!l.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();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(i=>!n.some(c=>c.id===i.id))}))},this.load=async n=>{let r,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ra({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Ra({resolvedLocation:h,location:d})}),await lR({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],v=[];Vu(()=>{this.__store.setState(b=>{const _=b.matches,x=b.pendingMatches||b.matches;return y=_.filter(R=>!x.some(C=>C.id===R.id)),g=x.filter(R=>!_.some(C=>C.id===R.id)),v=x.filter(R=>_.some(C=>C.id===R.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...y.filter(R=>R.status!=="error"&&R.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,_])=>{b.forEach(x=>{this.looseRoutesById[x.routeId].options[_]?.(x)})})})})}})}catch(d){ir(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ps(d)&&(i=d),this.__store.setState(h=>({...h,statusCode:r?r.status:i?404:h.matches.some(y=>y.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(f=>f.status==="error")&&(l=500),l!==void 0&&this.__store.setState(f=>({...f,statusCode:l}))},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 i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,l=this.state.resolvedLocation,f=typeof r.types=="function"?r.types(Ra({resolvedLocation:l,location:c})):r.types;if(f===!1){n();return}i={update:n,types:f}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===n)?"pendingMatches":this.state.matches.some(c=>c.id===n)?"matches":this.state.cachedMatches.some(c=>c.id===n)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;n.options.href=c,n.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(n.options),c=this.getParsedLocationHref(i);n.options.href=c,n.headers.set("Location",c)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!r(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const c=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=c};this.clearCache({filter:n})},this.loadRouteChunk=bI,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),l=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);Vu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await lR({router:this,matches:i,location:r,preload:!0,updateMatch:(f,d)=>{c.has(f)?i=i.map(h=>h.id===f?d(h):h):this.updateMatch(f,d)}}),i}catch(f){if(ir(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});Ps(f)||console.error(f);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},c=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const f=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=f6(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!xa(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?xa(f.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},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??k6,parseSearch:t.parseSearch??D6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:l}=r;let{matchedRoutes:f}=r,d=!1;(i?i.path!=="/"&&c["**"]:ho(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?uR(this.options.notFoundMode,f):void 0,y=[],g=v=>v?.id?v.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((v,b)=>{const _=y[b-1],[x,R,C]=(()=>{const ye=_?.search??t.search,fe=_?._strictSearch??void 0;try{const q=Dh(v.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let W=q;if(q instanceof Qh||(W=new Qh(q.message,{cause:q})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Fy({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),j=v.id+D+O,B=this.getMatch(j),k=this.state.matches.find(ye=>ye.routeId===v.id),Z=B?._strictParams??N;let se;if(!B)try{fR(v,N,l,Z)}catch(ye){if(Ps(ye)||ir(ye)?se=ye:se=new V6(ye.message,{cause:ye}),n?.throwOnError)throw se}Object.assign(c,Z);const le=k?"stay":"enter";let K;if(B)K={...B,cause:le,params:k?er(k.params,c):c,_strictParams:Z,search:er(k?k.search:B.search,x),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||SI(v)?"pending":"success";K={id:j,ssr:v.options.ssr,index:b,routeId:v.id,params:k?er(k.params,c):c,_strictParams:Z,pathname:D,updatedAt:Date.now(),search:k?er(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:Wc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?er(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}n?.preload||(K.globalNotFound=h===v.id),K.searchError=C;const Q=g(_);K.context={...Q,...K.__routeContext,...K.__beforeLoadContext},y.push(K)}),y.forEach((v,b)=>{const _=this.looseRoutesById[v.routeId];if(!this.getMatch(v.id)){const R=y[b-1],C=g(R);if(_.options.context){const A={deps:v.loaderDeps,params:v.params,context:C??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:y};v.__routeContext=_.options.context(A)??void 0}v.context={...C,...v.__routeContext,...v.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=sf(n),l={...t.search};for(const y of n)try{Object.assign(l,Dh(y.options.validateSearch,l))}catch{}const f=sf(this.state.matches),d=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let h;if(d)h=f.params;else{const y={...r};for(const g of n)try{fR(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Qh extends Error{}class V6 extends Error{}function q6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Dh(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qh("Async validation not supported");if(n.issues)throw new Qh(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 G6({pathname:e,routesById:t,processedTree:n}){const r={},i=ho(e);let c,l;const f=d6(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[sr]],routeParams:r,foundRoute:c,parsedParams:l}}function K6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Z6(n)(e,t,r??!1)}function Z6(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:l,next:f})=>{let d=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(d=i.options.preSearchFilters.reduce((y,g)=>g(y),l));const h=f(d);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,g)=>g(y),h):h};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:l,next:f})=>{const d=f(l);if(!t._includeValidateSearch)return d;try{return{...d,...Dh(i.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(c)}}const n=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:_i(c.search,i):{}};t.middlewares.push(n);const r=(i,c,l)=>{if(i>=l.length)return c;const f=l[i];return f({search:c,next:h=>r(i+1,h,l)})};return function(c,l,f){return t.dest=l,t._includeValidateSearch=f,r(0,c,t.middlewares)}}function uR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return sr}function fR(e,t,n,r){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in n&&(r[c]=n[c]);else{const c=i(r);Object.assign(r,c)}}const Q6="Error preloading route! ☝️";class EI{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=sr:this.parentRoute||yo(!1);let c=i?sr:r?.path;c&&c!=="/"&&(c=hI(c));const l=r?.id||c;let f=i?sr:Oh([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Oh(["/",f]));const d=f===sr?"/":Oh([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=ho(d)},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.redirect=n=>Yv({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&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 Y6 extends EI{constructor(t){super(t)}}const X6="use",dR=qv[X6],uh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function qy(e){const t=I.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function W6(e,t,n={},r={}){I.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function J6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Xv(e){const t=e.errorComponent??Wv;return $.jsx(eB,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class eB extends I.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 Wv({error:e}){const[t,n]=I.useState(!1);return $.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[$.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),$.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"})]}),$.jsx("div",{style:{height:".25rem"}}),t?$.jsx("div",{children:$.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?$.jsx("code",{children:e.message}):null})}):null]})}function tB({children:e,fallback:t=null}){return xI()?$.jsx(Xc.Fragment,{children:e}):$.jsx(Xc.Fragment,{children:t})}function xI(){return Xc.useSyncExternalStore(nB,()=>!0,()=>!1)}function nB(){return()=>{}}var Gy={exports:{}},Ky={},Zy={exports:{}},Qy={};var hR;function sB(){if(hR)return Qy;hR=1;var e=al();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function f(g,v){var b=v(),_=r({inst:{value:b,getSnapshot:v}}),x=_[0].inst,R=_[1];return c(function(){x.value=b,x.getSnapshot=v,d(x)&&R({inst:x})},[g,b,v]),i(function(){return d(x)&&R({inst:x}),g(function(){d(x)&&R({inst:x})})},[g]),l(b),b}function d(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!n(g,b)}catch{return!0}}function h(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Qy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Qy}var pR;function RI(){return pR||(pR=1,Zy.exports=sB()),Zy.exports}var mR;function rB(){if(mR)return Ky;mR=1;var e=al(),t=RI();function n(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,c=e.useRef,l=e.useEffect,f=e.useMemo,d=e.useDebugValue;return Ky.useSyncExternalStoreWithSelector=function(h,y,g,v,b){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function C(j){if(!A){if(A=!0,O=j,j=v(j),b!==void 0&&x.hasValue){var B=x.value;if(b(B,j))return D=B}return D=j}if(B=D,r(O,j))return B;var k=v(j);return b!==void 0&&b(B,k)?(O=j,B):(O=j,D=k)}var A=!1,O,D,N=g===void 0?null:g;return[function(){return C(y())},N===null?void 0:function(){return C(N())}]},[y,g,v,b]);var R=i(h,_[0],_[1]);return l(function(){x.hasValue=!0,x.value=R},[R]),d(R),R},Ky}var gR;function oB(){return gR||(gR=1,Gy.exports=rB()),Gy.exports}var CI=oB();function iB(e,t=r=>r,n={}){const r=n.equal??aB;return CI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function aB(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,i]of e)if(!t.has(r)||!Object.is(i,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=yR(e);if(n.length!==yR(t).length)return!1;for(let r=0;r"u"?Yy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Yy,Yy)}function Jn(e){const t=I.useContext(TI());return e?.warn,t}function dn(e){const t=Jn({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return iB(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=er(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Ip=I.createContext(void 0),cB=I.createContext(void 0);function Nr(e){const t=I.useContext(e.from?cB:Ip);return dn({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(yo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function Jv(e){return Nr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function eb(e){const{select:t,...n}=e;return Nr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function tb(e){return Nr({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 nb(e){return Nr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Op(e){const t=Jn();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Xy={exports:{}},Gn={};var vR;function lB(){if(vR)return Gn;vR=1;var e=al();function t(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Xy.exports=lB(),Xy.exports}var ki=AI();function uB(e,t){const n=Jn(),r=J6(t),{activeProps:i,inactiveProps:c,activeOptions:l,to:f,preload:d,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:v,resetScroll:b,viewTransition:_,children:x,target:R,disabled:C,style:A,className:O,onClick:D,onFocus:N,onMouseEnter:j,onMouseLeave:B,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:q,from:W,_fromLocation:F,...ve}=e,Te=xI(),P=dn({select:gt=>gt.location.search,structuralSharing:!0}),ne=e.from,ie=I.useMemo(()=>({...e,from:ne}),[n,P,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...ie}),[n,ie]),Ce=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,Se=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>gB(Ce,Se,n.history,C),[C,Se,Ce,n.history]),Ye=I.useMemo(()=>{if(be?.external)return qh(be.href)?void 0:be.href;if(!yB(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),qh(f)?void 0:f}catch{}},[f,be]),He=dn({select:gt=>{if(Ye)return!1;if(l?.exact){if(!v6(gt.location.pathname,de.pathname,n.basepath))return!1}else{const $t=Kh(gt.location.pathname,n.basepath),Ut=Kh(de.pathname,n.basepath);if(!($t.startsWith(Ut)&&($t.length===Ut.length||$t[Ut.length]==="/")))return!1}return(l?.includeSearch??!0)&&!xa(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?_i(i,{})??fB:Wy,Ft=He?Wy:_i(c,{})??Wy,oe=[O,ht.className,Ft.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ft.style)&&{...A,...ht.style,...Ft.style},[Ie,Pt]=I.useState(!1),_e=I.useRef(!1),Ne=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,qe=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(Q6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);W6(r,ut,mB,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{_e.current||!C&&Ne==="render"&&(Qe(),_e.current=!0)},[C,Qe,Ne]);const Be=gt=>{const $t=gt.currentTarget.getAttribute("target"),Ut=R!==void 0?R:$t;if(!C&&!vB(gt)&&!gt.defaultPrevented&&(!Ut||Ut==="_self")&>.button===0){gt.preventDefault(),ki.flushSync(()=>{Pt(!0)});const on=n.subscribe("onResolved",()=>{on(),Pt(!1)});n.navigate({...ie,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:_,ignoreBlocker:Z})}};if(Ye)return{...ve,ref:r,href:Ye,...x&&{children:x},...R&&{target:R},...C&&{disabled:C},...A&&{style:A},...O&&{className:O},...D&&{onClick:D},...N&&{onFocus:N},...j&&{onMouseEnter:j},...B&&{onMouseLeave:B},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},rn=Le,it=gt=>{if(!(C||!Ne))if(!qe)Qe();else{const $t=gt.target;if(Mu.has($t))return;const Ut=setTimeout(()=>{Mu.delete($t),Qe()},qe);Mu.set($t,Ut)}},_s=gt=>{if(C||!Ne||!qe)return;const $t=gt.target,Ut=Mu.get($t);Ut&&(clearTimeout(Ut),Mu.delete($t))};return{...ve,...ht,...Ft,href:be?.href,ref:r,onClick:Du([D,Be]),onFocus:Du([N,Le]),onMouseEnter:Du([j,it]),onMouseLeave:Du([B,_s]),onTouchStart:Du([k,rn]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&dB,...He&&hB,...Te&&Ie&&pB}}const Wy={},fB={className:"active"},dB={role:"link","aria-disabled":!0},hB={"data-status":"active","aria-current":"page"},pB={"data-transitioning":"transitioning"},Mu=new WeakMap,mB={rootMargin:"100px"},Du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function gB(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function yB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Or=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=uB(r,t),l=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;if(!n){const{disabled:f,...d}=c;return I.createElement("a",d,l)}return I.createElement(n,c,l)});function vB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let bB=class extends EI{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>eb({...n,from:this.id}),this.useLoaderData=n=>Jv({...n,from:this.id}),this.useNavigate=()=>Op({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function SB(e){return new bB(e)}function _B(){return e=>EB(e)}class wB extends Y6{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>eb({...n,from:this.id}),this.useLoaderData=n=>Jv({...n,from:this.id}),this.useNavigate=()=>Op({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>$.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function EB(e){return new wB(e)}function Xt(e){return typeof e=="object"?new SR(e,{silent:!0}).createRoute(e):new SR(e,{silent:!0}).createRoute}class SR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=SB(r);return i.isRoot=!1,i},this.silent=n?.silent}}class _R{constructor(t){this.useMatch=n=>Nr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>nb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>tb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>eb({...n,from:this.options.id}),this.useLoaderData=n=>Jv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Jn();return Op({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function wR(e){return typeof e=="object"?new _R(e):t=>new _R({id:e,...t})}function yn(e,t){let n,r,i,c;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t]}).catch(d=>{if(i=d,t6(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),n),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(dR)dR(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function xB(){const e=Jn(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=dn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=qy(c),f=c||n||i,d=qy(f),h=c||i,y=qy(h);return e.startTransition=g=>{r(!0),I.startTransition(()=>{g(),r(!1)})},I.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ho(e.latestLocation.publicHref)!==ho(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),uh(()=>{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(v){console.error(v)}})()},[e]),uh(()=>{l&&!c&&e.emit({type:"onLoad",...Ra(e.state)})},[l,e,c]),uh(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...Ra(e.state)})},[h,y,e]),uh(()=>{if(d&&!f){const g=Ra(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&I6(e)}},[f,d,e]),null}function RB(e){const t=dn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return $.jsx(Xv,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ps(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ps(n))return e.fallback?.(n);throw n},children:e.children})}function CB(){return $.jsx("p",{children:"Not Found"})}function Uc(e){return $.jsx($.Fragment,{children:e.children})}function II(e,t,n){return t.options.notFoundComponent?$.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?$.jsx(e.options.defaultNotFoundComponent,{...n}):$.jsx(CB,{})}function TB(){return Jn().isScrollRestoring,null}const OI=I.memo(function({matchId:t}){const n=Jn(),r=dn({select:C=>{const A=C.matches.find(O=>O.id===t);return yo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],c=i.options.pendingComponent??n.options.defaultPendingComponent,l=c?$.jsx(c,{}):null,f=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=r.ssr===!1||r.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?I.Suspense:Uc,v=f?Xv:Uc,b=h?RB:Uc,_=dn({select:C=>C.loadedAt}),x=dn({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??Uc:Uc;return $.jsxs(R,{children:[$.jsx(Ip.Provider,{value:t,children:$.jsx(g,{fallback:l,children:$.jsx(v,{getResetKey:()=>_,errorComponent:f||Wv,onCatch:(C,A)=>{if(Ps(C))throw C;d?.(C,A)},children:$.jsx(b,{fallback:C=>{if(!h||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!i.isRoot)throw C;return I.createElement(h,C)},children:y||r._displayPending?$.jsx(tB,{fallback:l,children:$.jsx(ER,{matchId:t})}):$.jsx(ER,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?$.jsxs($.Fragment,{children:[$.jsx(AB,{}),$.jsx(TB,{})]}):null]})});function AB(){const e=Jn(),t=I.useRef(void 0);return $.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ra(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const ER=I.memo(function({matchId:t}){const n=Jn(),{match:r,key:i,routeId:c}=dn({select:d=>{const h=d.matches.find(_=>_.id===t),y=h.routeId,v=(n.routesById[y].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),l=n.routesById[c],f=I.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?$.jsx(d,{},i):$.jsx(MI,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(r.id);if(h&&!h._nonReactive.minPendingPromise){const y=Wc();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return yo(Ps(r.error)),II(n,l,r.error);if(r.status==="redirected")throw yo(ir(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),MI=I.memo(function(){const t=Jn(),n=I.useContext(Ip),r=dn({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=dn({select:h=>{const g=h.matches.find(v=>v.id===n);return yo(g),g.globalNotFound}}),l=dn({select:h=>{const y=h.matches,g=y.findIndex(v=>v.id===n);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?$.jsx(t.options.defaultPendingComponent,{}):null;if(c)return II(t,i,void 0);if(!l)return null;const d=$.jsx(OI,{matchId:l});return r===sr?$.jsx(I.Suspense,{fallback:f,children:d}):d});function IB(){const e=Jn(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?$.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?Uc:I.Suspense,c=$.jsxs(i,{fallback:r,children:[$.jsx(xB,{}),$.jsx(OB,{})]});return e.options.InnerWrap?$.jsx(e.options.InnerWrap,{children:c}):c}function OB(){const e=Jn(),t=dn({select:i=>i.matches[0]?.id}),n=dn({select:i=>i.loadedAt}),r=t?$.jsx(OI,{matchId:t}):null;return $.jsx(Ip.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:$.jsx(Xv,{getResetKey:()=>n,errorComponent:Wv,onCatch:i=>{i.message||i.toString()},children:r})})}const MB=e=>new DB(e);class DB extends F6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Xt,globalThis.createLazyFileRoute=wR):typeof window<"u"&&(window.createFileRoute=Xt,window.createLazyFileRoute=wR);function kB({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=TI(),i=$.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?$.jsx(e.options.Wrap,{children:i}):i}function PB({router:e,...t}){return $.jsx(kB,{router:e,...t,children:$.jsx(IB,{})})}function NB(e){return dn({select:t=>e?.select?e.select(t.location):t.location})}function zB({tag:e,attrs:t,children:n,nonce:r}){switch(e){case"title":return $.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return $.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return $.jsx("link",{...t,nonce:r,suppressHydrationWarning:!0});case"style":return $.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case"script":return $.jsx(LB,{attrs:t,children:n});default:return null}}function LB({attrs:e,children:t}){Jn(),I.useEffect(()=>{if(e?.src){const n=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===n))return;const i=document.createElement("script");for(const[c,l]of Object.entries(e))c!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(c,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const n=typeof e?.type=="string"?e.type:"text/javascript",r=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(l=>{if(!(l instanceof HTMLScriptElement))return!1;const f=l.getAttribute("type")??"text/javascript",d=l.getAttribute("nonce")??void 0;return l.textContent===t&&f===n&&d===r}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[l,f]of Object.entries(e))l!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(l,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:n,...r}=e||{};return $.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}}const BB=()=>{const e=Jn(),t=e.options.ssr?.nonce,n=dn({select:d=>d.matches.map(h=>h.meta).filter(Boolean)}),r=I.useMemo(()=>{const d=[],h={};let y;for(let g=n.length-1;g>=0;g--){const v=n[g];for(let b=v.length-1;b>=0;b--){const _=v[b];if(_)if(_.title)y||(y={tag:"title",children:_.title});else if("script:ld+json"in _)try{const x=JSON.stringify(_["script:ld+json"]);d.push({tag:"script",attrs:{type:"application/ld+json"},children:o6(x)})}catch{}else{const x=_.name??_.property;if(x){if(h[x])continue;h[x]=!0}d.push({tag:"meta",attrs:{..._,nonce:t}})}}}return y&&d.push(y),t&&d.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),d.reverse(),d},[n,t]),i=dn({select:d=>{const h=d.matches.map(v=>v.links).filter(Boolean).flat(1).map(v=>({tag:"link",attrs:{...v,nonce:t}})),y=e.ssr?.manifest,g=d.matches.map(v=>y?.routes[v.routeId]?.assets??[]).filter(Boolean).flat(1).filter(v=>v.tag==="link").map(v=>({tag:"link",attrs:{...v.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...h,...g]},structuralSharing:!0}),c=dn({select:d=>{const h=[];return d.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),h},structuralSharing:!0}),l=dn({select:d=>d.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:t},children:h})),structuralSharing:!0}),f=dn({select:d=>d.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:t},children:h})),structuralSharing:!0});return $B([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function $B(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function UB(){const e=BB(),n=Jn().options.ssr?.nonce;return $.jsx($.Fragment,{children:e.map(r=>I.createElement(zB,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var Jy={exports:{}},ku={},e0={exports:{}},t0={};var xR;function jB(){return xR||(xR=1,(function(e){function t(q,W){var F=q.length;q.push(W);e:for(;0>>1,Te=q[ve];if(0>>1;vei(ie,F))dei(Ce,ie)?(q[ve]=Ce,q[de]=F,ve=de):(q[ve]=ie,q[ne]=F,ve=ne);else if(dei(Ce,F))q[ve]=Ce,q[de]=F,ve=de;else break e}}return W}function i(q,W){var F=q.sortIndex-W.sortIndex;return F!==0?F:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],y=1,g=null,v=3,b=!1,_=!1,x=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,j||(j=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-q)}}var j=!1,B=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-Zq&&se());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Te=ve(g.expirationTime<=q);if(q=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(q),W=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),W=!1}}break e}finally{g=null,v=F,b=!1}W=void 0}}finally{W?K():j=!1}}}var K;if(typeof O=="function")K=function(){O(le)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ye=Q.port2;Q.port1.onmessage=le,K=function(){ye.postMessage(null)}}else K=function(){C(le,0)};function fe(q,W){B=C(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125ve?(q.sortIndex=F,t(h,q),n(d)===null&&q===n(h)&&(x?(A(B),B=-1):x=!0,fe(N,F-ve))):(q.sortIndex=Te,t(d,q),_||b||(_=!0,j||(j=!0,K()))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var W=v;return function(){var F=v;v=W;try{return q.apply(this,arguments)}finally{v=F}}}})(t0)),t0}var RR;function HB(){return RR||(RR=1,e0.exports=jB()),e0.exports}var CR;function FB(){if(CR)return ku;CR=1;var e=HB(),t=al(),n=AI();function r(s){var o="https://react.dev/errors/"+s;if(1Te||(s.current=ve[Te],ve[Te]=null,Te--)}function ie(s,o){Te++,ve[Te]=s.current,s.current=o}var de=P(null),Ce=P(null),Se=P(null),be=P(null);function Ye(s,o){switch(ie(Se,o),ie(Ce,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?f1(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=f1(o),s=d1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ne(de),ie(de,s)}function He(){ne(de),ne(Ce),ne(Se)}function ht(s){s.memoizedState!==null&&ie(be,s);var o=de.current,a=d1(o,s.type);o!==a&&(ie(Ce,s),ie(de,a))}function Ft(s){Ce.current===s&&(ne(de),ne(Ce)),be.current===s&&(ne(be),xu._currentValue=F)}var oe,Fe;function Ie(s){if(oe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",Fe=-1)":-1p||z[u]!==X[p]){var ae=` `+z[u].replace(" at new "," at ");return s.displayName&&ae.includes("")&&(ae=ae.replace("",s.displayName)),ae}while(1<=u&&0<=p);break}}}finally{Pt=!1,Error.prepareStackTrace=a}return(a=s?s.displayName||s.name:"")?Ie(a):""}function Ne(s,o){switch(s.tag){case 26:case 27:case 5:return Ie(s.type);case 16:return Ie("Lazy");case 13:return s.child!==o&&o!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return _e(s.type,!1);case 11:return _e(s.type.render,!1);case 1:return _e(s.type,!0);case 31:return Ie("Activity");default:return""}}function qe(s){try{var o="",a=null;do o+=Ne(s,a),a=s,s=s.return;while(s);return o}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,rn=e.unstable_requestPaint,it=e.unstable_now,_s=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,$t=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,on=e.unstable_LowPriority,ws=e.unstable_IdlePriority,$s=e.log,Ff=e.unstable_setDisableYieldValue,jo=null,Hn=null;function fr(s){if(typeof $s=="function"&&Ff(s),Hn&&typeof Hn.setStrictMode=="function")try{Hn.setStrictMode(jo,s)}catch{}}var Fn=Math.clz32?Math.clz32:Us,Zt=Math.log,Vn=Math.LN2;function Us(s){return s>>>=0,s===0?32:31-(Zt(s)/Vn|0)|0}var Dn=256,dr=262144,hr=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Ho(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=js(u):(w&=T,w!==0?p=js(w):a||(a=T&~s,a!==0&&(p=js(a))))):(T=u&~m,T!==0?p=js(T):w!==0?p=js(w):a||(a=u&~s,a!==0&&(p=js(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Fo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Rm(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vf(){var s=hr;return hr<<=1,(hr&62914560)===0&&(hr=4194304),s}function Nl(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Yi(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function zl(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,z=s.expirationTimes,X=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var oz=/[\n"\\]/g;function Fs(s){return s.replace(oz,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Im(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Hs(o)):s.value!==""+Hs(o)&&(s.value=""+Hs(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?Om(s,w,Hs(o)):a!=null?Om(s,w,Hs(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Hs(T):s.removeAttribute("name")}function ow(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Am(s);return}a=a!=null?""+Hs(a):"",o=o!=null?""+Hs(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Am(s)}function Om(s,o,a){o==="number"&&Xf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function tc(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nm=!1;if(qr)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){Nm=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{Nm=!1}var qo=null,zm=null,Jf=null;function dw(){if(Jf)return Jf;var s,o=zm,a=o.length,u,p="value"in qo?qo.value:qo.textContent,m=p.length;for(s=0;s=ql),vw=" ",bw=!1;function Sw(s,o){switch(s){case"keyup":return kz.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _w(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var oc=!1;function Nz(s,o){switch(s){case"compositionend":return _w(o);case"keypress":return o.which!==32?null:(bw=!0,vw);case"textInput":return s=o.data,s===vw&&bw?null:s;default:return null}}function zz(s,o){if(oc)return s==="compositionend"||!jm&&Sw(s,o)?(s=dw(),Jf=zm=qo=null,oc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Iw(a)}}function Mw(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?Mw(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function Dw(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Xf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=Xf(s.document)}return o}function Vm(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var Vz=qr&&"documentMode"in document&&11>=document.documentMode,ic=null,qm=null,Ql=null,Gm=!1;function kw(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gm||ic==null||ic!==Xf(u)||(u=ic,"selectionStart"in u&&Vm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ql&&Zl(Ql,u)||(Ql=u,u=Gd(qm,"onSelect"),0>=w,p-=w,Er=1<<32-Fn(o)+p|a<Je?(ct=Pe,Pe=null):ct=Pe.sibling;var vt=J(G,Pe,Y[Je],he);if(vt===null){Pe===null&&(Pe=ct);break}s&&Pe&&vt.alternate===null&&o(G,Pe),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt,Pe=ct}if(Je===Y.length)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;JeJe?(ct=Pe,Pe=null):ct=Pe.sibling;var hi=J(G,Pe,vt.value,he);if(hi===null){Pe===null&&(Pe=ct);break}s&&Pe&&hi.alternate===null&&o(G,Pe),V=m(hi,V,Je),yt===null?ze=hi:yt.sibling=hi,yt=hi,Pe=ct}if(vt.done)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;!vt.done;Je++,vt=Y.next())vt=pe(G,vt.value,he),vt!==null&&(V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return ft&&Kr(G,Je),ze}for(Pe=u(Pe);!vt.done;Je++,vt=Y.next())vt=re(Pe,G,Je,vt.value,he),vt!==null&&(s&&vt.alternate!==null&&Pe.delete(vt.key===null?Je:vt.key),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return s&&Pe.forEach(function(uL){return o(G,uL)}),ft&&Kr(G,Je),ze}function It(G,V,Y,he){if(typeof Y=="object"&&Y!==null&&Y.type===x&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:e:{for(var ze=Y.key;V!==null;){if(V.key===ze){if(ze=Y.type,ze===x){if(V.tag===7){a(G,V.sibling),he=p(V,Y.props.children),he.return=G,G=he;break e}}else if(V.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&aa(ze)===V.type){a(G,V.sibling),he=p(V,Y.props),tu(he,Y),he.return=G,G=he;break e}a(G,V);break}else o(G,V);V=V.sibling}Y.type===x?(he=na(Y.props.children,G.mode,he,Y.key),he.return=G,G=he):(he=ld(Y.type,Y.key,Y.props,null,G.mode,he),tu(he,Y),he.return=G,G=he)}return w(G);case _:e:{for(ze=Y.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===Y.containerInfo&&V.stateNode.implementation===Y.implementation){a(G,V.sibling),he=p(V,Y.children||[]),he.return=G,G=he;break e}else{a(G,V);break}else o(G,V);V=V.sibling}he=Jm(Y,G.mode,he),he.return=G,G=he}return w(G);case k:return Y=aa(Y),It(G,V,Y,he)}if(fe(Y))return Oe(G,V,Y,he);if(K(Y)){if(ze=K(Y),typeof ze!="function")throw Error(r(150));return Y=ze.call(Y),Ue(G,V,Y,he)}if(typeof Y.then=="function")return It(G,V,gd(Y),he);if(Y.$$typeof===O)return It(G,V,dd(G,Y),he);yd(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,V!==null&&V.tag===6?(a(G,V.sibling),he=p(V,Y),he.return=G,G=he):(a(G,V),he=Wm(Y,G.mode,he),he.return=G,G=he),w(G)):a(G,V)}return function(G,V,Y,he){try{eu=0;var ze=It(G,V,Y,he);return yc=null,ze}catch(Pe){if(Pe===gc||Pe===pd)throw Pe;var yt=xs(29,Pe,null,G.mode);return yt.lanes=he,yt.return=G,yt}}}var la=nE(!0),sE=nE(!1),Yo=!1;function fg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dg(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Wo(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=cd(s),Uw(s,null,a),o}return ad(s,u,o,a),cd(s)}function nu(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}function hg(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var pg=!1;function su(){if(pg){var s=mc;if(s!==null)throw s}}function ru(s,o,a,u){pg=!1;var p=s.updateQueue;Yo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var z=T,X=z.next;z.next=null,w===null?m=X:w.next=X,w=z;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==w&&(T===null?ae.firstBaseUpdate=X:T.next=X,ae.lastBaseUpdate=z))}if(m!==null){var pe=p.baseState;w=0,ae=X=z=null,T=m;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(at&J)===J:(u&J)===J){J!==0&&J===pc&&(pg=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Oe=s,Ue=T;J=o;var It=a;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){pe=Oe.call(It,pe,J);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,J=typeof Oe=="function"?Oe.call(It,pe,J):Oe,J==null)break e;pe=g({},pe,J);break e;case 2:Yo=!0}}J=T.callback,J!==null&&(s.flags|=64,re&&(s.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(X=ae=re,z=pe):ae=ae.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);ae===null&&(z=pe),p.baseState=z,p.firstBaseUpdate=X,p.lastBaseUpdate=ae,m===null&&(p.shared.lanes=0),si|=w,s.lanes=w,s.memoizedState=pe}}function rE(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function oE(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=q.T,T={};q.T=T,kg(s,!1,o,a);try{var z=p(),X=q.S;if(X!==null&&X(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ae=Jz(z,u);au(s,o,ae,Is(s))}else au(s,o,u,Is(s))}catch(pe){au(s,o,{then:function(){},status:"rejected",reason:pe},Is())}finally{W.p=m,w!==null&&T.types!==null&&(w.types=T.types),q.T=w}}function o4(){}function Mg(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=LE(s).queue;zE(s,p,o,H,a===null?o4:function(){return BE(s),a(u)})}function LE(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:H},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function BE(s){var o=LE(s);o.next===null&&(o=s.alternate.memoizedState),au(s,o.next.queue,{},Is())}function Dg(){return Nn(xu)}function $E(){return Jt().memoizedState}function UE(){return Jt().memoizedState}function i4(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=Is();s=Xo(a);var u=Wo(o,s,a);u!==null&&(hs(u,o,a),nu(u,o,a)),o={cache:ag()},s.payload=o;return}o=o.return}}function a4(s,o,a){var u=Is();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Td(s)?HE(o,a):(a=Ym(s,o,a,u),a!==null&&(hs(a,s,u),FE(a,o,u)))}function jE(s,o,a){var u=Is();au(s,o,a,u)}function au(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Td(s))HE(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,Es(T,w))return ad(s,o,p,0),Dt===null&&id(),!1}catch{}if(a=Ym(s,o,p,u),a!==null)return hs(a,s,u),FE(a,o,u),!0}return!1}function kg(s,o,a,u){if(u={lane:2,revertLane:fy(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Td(s)){if(o)throw Error(r(479))}else o=Ym(s,a,u,2),o!==null&&hs(o,s,2)}function Td(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function HE(s,o){bc=Sd=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function FE(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}var cu={readContext:Nn,use:Ed,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};cu.useEffectEvent=Qt;var VE={readContext:Nn,use:Ed,useCallback:function(s,o){return es().memoizedState=[s,o===void 0?null:o],s},useContext:Nn,useEffect:TE,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,Rd(4194308,4,ME.bind(null,o,s),a)},useLayoutEffect:function(s,o){return Rd(4194308,4,s,o)},useInsertionEffect:function(s,o){Rd(4,2,s,o)},useMemo:function(s,o){var a=es();o=o===void 0?null:o;var u=s();if(ua){fr(!0);try{s()}finally{fr(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=es();if(a!==void 0){var p=a(o);if(ua){fr(!0);try{a(o)}finally{fr(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=a4.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=es();return s={current:s},o.memoizedState=s},useState:function(s){s=Cg(s);var o=s.queue,a=jE.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:Ig,useDeferredValue:function(s,o){var a=es();return Og(a,s,o)},useTransition:function(){var s=Cg(!1);return s=zE.bind(null,Xe,s.queue,!0,!1),es().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=es();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||fE(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,TE(hE.bind(null,u,m,s),[s]),u.flags|=2048,_c(9,{destroy:void 0},dE.bind(null,u,m,a,o),null),a},useId:function(){var s=es(),o=Dt.identifierPrefix;if(ft){var a=xr,u=Er;a=(u&~(1<<32-Fn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=_d++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[kn]=o,m[as]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Ln(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Jr(o)}}return Lt(o),Kg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&Jr(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=Se.current,dc(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Pn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[kn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||l1(s.nodeValue,a)),s||Zo(o,!0)}else s=Kd(s).createTextNode(u),s[kn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=dc(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[kn]=o}else sa(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=sg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Cs(o),o):(Cs(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=dc(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[kn]=o}else sa(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=sg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Cs(o),o):(Cs(o),null)}return Cs(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Dd(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&my(o.stateNode.containerInfo),Lt(o),null;case 10:return Qr(o.type),Lt(o),null;case 19:if(ne(Wt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)uu(u,!1);else{if(Yt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=bd(s),m!==null){for(o.flags|=128,uu(u,!1),s=m.updateQueue,o.updateQueue=s,Dd(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)jw(a,s),a=a.sibling;return ie(Wt,Wt.current&1|2),ft&&Kr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>Ld&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304)}else{if(!p)if(s=bd(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Dd(o,s),uu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>Ld&&a!==536870912&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Wt.current,ie(Wt,p?a&1|2:a&1),ft&&Kr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Cs(o),gg(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Dd(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&ne(ia),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),Qr(an),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function d4(s,o){switch(tg(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Qr(an),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ft(o),null;case 31:if(o.memoizedState!==null){if(Cs(o),o.alternate===null)throw Error(r(340));sa()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Cs(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));sa()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return ne(Wt),null;case 4:return He(),null;case 10:return Qr(o.type),null;case 22:case 23:return Cs(o),gg(),s!==null&&ne(ia),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Qr(an),null;case 25:return null;default:return null}}function px(s,o){switch(tg(o),o.tag){case 3:Qr(an),He();break;case 26:case 27:case 5:Ft(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Cs(o);break;case 13:Cs(o);break;case 19:ne(Wt);break;case 10:Qr(o.type);break;case 22:case 23:Cs(o),gg(),s!==null&&ne(ia);break;case 24:Qr(an)}}function fu(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function ti(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var z=a,X=T;try{X()}catch(ae){xt(p,z,ae)}}}u=u.next}while(u!==m)}}catch(ae){xt(o,o.return,ae)}}function mx(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{oE(o,a)}catch(u){xt(s,s.return,u)}}}function gx(s,o,a){a.props=fa(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function du(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function Rr(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function yx(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function Zg(s,o,a){try{var u=s.stateNode;P4(u,s.type,a,o),u[as]=o}catch(p){xt(s,s.return,p)}}function vx(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ci(s.type)||s.tag===4}function Qg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||vx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ci(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Yg(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=Vr));else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for(Yg(s,o,a),s=s.sibling;s!==null;)Yg(s,o,a),s=s.sibling}function kd(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(kd(s,o,a),s=s.sibling;s!==null;)kd(s,o,a),s=s.sibling}function bx(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Ln(o,u,a),o[kn]=s,o[as]=a}catch(m){xt(s,s.return,m)}}var eo=!1,un=!1,Xg=!1,Sx=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function h4(s,o){if(s=s.containerInfo,vy=eh,s=Dw(s),Vm(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,z=-1,X=0,ae=0,pe=s,J=null;t:for(;;){for(var re;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(z=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(re=pe.firstChild)!==null;)J=pe,pe=re;for(;;){if(pe===s)break t;if(J===a&&++X===p&&(T=w),J===m&&++ae===u&&(z=w),(re=pe.nextSibling)!==null)break;pe=J,J=pe.parentNode}pe=re}a=T===-1||z===-1?null:{start:T,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(by={focusedElem:s,selectionRange:a},eh=!1,Cn=o;Cn!==null;)if(o=Cn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Cn=s;else for(;Cn!==null;){switch(o=Cn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Ln(m,u,a),m[kn]=s,Rn(m),u=m;break e;case"link":var w=C1("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var G=Ow(T,Ue),V=Ow(T,It);if(G&&V&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var Y=pe.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ue>It?(re.addRange(Y),re.extend(V.node,V.offset)):(Y.setEnd(V.node,V.offset),re.addRange(Y))}}}}for(pe=[],re=T;re=re.parentNode;)re.nodeType===1&&pe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,q.T=null,a=ry,ry=null;var m=oi,w=oo;if(Sn=0,Cc=oi=null,oo=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,Mx(m.current),Ax(m,m.current,w,a),St=T,vu(0,!1),Hn&&typeof Hn.onPostCommitFiberRoot=="function")try{Hn.onPostCommitFiberRoot(jo,m)}catch{}return!0}finally{W.p=p,q.T=u,Qx(s,o)}}function Xx(s,o,a){o=qs(a,o),o=Lg(s.stateNode,o,2),s=Wo(s,o,2),s!==null&&(Yi(s,2),Cr(s))}function xt(s,o,a){if(s.tag===3)Xx(s,s,a);else for(;o!==null;){if(o.tag===3){Xx(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){s=qs(a,s),a=WE(2),u=Wo(o,a,2),u!==null&&(JE(a,u,o,s),Yi(u,2),Cr(u));break}}o=o.return}}function cy(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new g4;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(ey=!0,p.add(a),s=_4.bind(null,s,o,a),o.then(s,s))}function _4(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Yt===4||Yt===3&&(at&62914560)===at&&300>it()-zd?(St&2)===0&&Tc(s,0):ty|=a,Rc===at&&(Rc=0)),Cr(s)}function Wx(s,o){o===0&&(o=Vf()),s=ta(s,o),s!==null&&(Yi(s,o),Cr(s))}function w4(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),Wx(s,a)}function E4(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),Wx(s,a)}function x4(s,o){return ut(s,o)}var Fd=null,Ic=null,ly=!1,Vd=!1,uy=!1,ai=0;function Cr(s){s!==Ic&&s.next===null&&(Ic===null?Fd=Ic=s:Ic=Ic.next=s),Vd=!0,ly||(ly=!0,C4())}function vu(s,o){if(!uy&&Vd){uy=!0;do for(var a=!1,u=Fd;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Fn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,n1(u,m))}else m=at,m=Ho(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Fo(u,m)||(a=!0,n1(u,m));u=u.next}while(a);uy=!1}}function R4(){Jx()}function Jx(){Vd=ly=!1;var s=0;ai!==0&&z4()&&(s=ai);for(var o=it(),a=null,u=Fd;u!==null;){var p=u.next,m=e1(u,o);m===0?(u.next=null,a===null?Fd=p:a.next=p,p===null&&(Ic=a)):(a=u,(s!==0||(m&3)!==0)&&(Vd=!0)),u=p}Sn!==0&&Sn!==5||vu(s),ai!==0&&(ai=0)}function e1(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ae=z.transferSize,pe=z.initiatorType;ae&&u1(pe)&&(z=z.responseEnd,w+=ae*(z"u"?null:document;function w1(s,o,a){var u=Oc;if(u&&typeof o=="string"&&o){var p=Fs(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),_1.has(p)||(_1.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Ln(o,"link",s),Rn(o),u.head.appendChild(o)))}}function q4(s){io.D(s),w1("dns-prefetch",s,null)}function G4(s,o){io.C(s,o),w1("preconnect",s,o)}function K4(s,o,a){io.L(s,o,a);var u=Oc;if(u&&s&&o){var p='link[rel="preload"][as="'+Fs(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Fs(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Fs(a.imageSizes)+'"]')):p+='[href="'+Fs(s)+'"]';var m=p;switch(o){case"style":m=Mc(s);break;case"script":m=Dc(s)}Xs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Xs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(wu(m))||o==="script"&&u.querySelector(Eu(m))||(o=u.createElement("link"),Ln(o,"link",s),Rn(o),u.head.appendChild(o)))}}function Z4(s,o){io.m(s,o);var a=Oc;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fs(u)+'"][href="'+Fs(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Dc(s)}if(!Xs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Xs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Eu(m)))return}u=a.createElement("link"),Ln(u,"link",s),Rn(u),a.head.appendChild(u)}}}function Q4(s,o,a){io.S(s,o,a);var u=Oc;if(u&&s){var p=Ja(u).hoistableStyles,m=Mc(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(wu(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Xs.get(m))&&Cy(s,a);var z=w=u.createElement("link");Rn(z),Ln(z,"link",s),z._p=new Promise(function(X,ae){z.onload=X,z.onerror=ae}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function Y4(s,o){io.X(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0},o),(o=Xs.get(p))&&Ty(s,o),m=a.createElement("script"),Rn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function X4(s,o){io.M(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Xs.get(p))&&Ty(s,o),m=a.createElement("script"),Rn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function E1(s,o,a,u){var p=(p=Se.current)?Zd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=Mc(a.href),a=Ja(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=Mc(a.href);var m=Ja(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(wu(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Xs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xs.set(s,a),m||W4(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Dc(a),a=Ja(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Mc(s){return'href="'+Fs(s)+'"'}function wu(s){return'link[rel="stylesheet"]['+s+"]"}function x1(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function W4(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Ln(o,"link",a),Rn(o),s.head.appendChild(o))}function Dc(s){return'[src="'+Fs(s)+'"]'}function Eu(s){return"script[async]"+s}function R1(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+Fs(a.href)+'"]');if(u)return o.instance=u,Rn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),Rn(u),Ln(u,"style",p),Qd(u,a.precedence,s),o.instance=u;case"stylesheet":p=Mc(a.href);var m=s.querySelector(wu(p));if(m)return o.state.loading|=4,o.instance=m,Rn(m),m;u=x1(a),(p=Xs.get(p))&&Cy(u,p),m=(s.ownerDocument||s).createElement("link"),Rn(m);var w=m;return w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),o.state.loading|=4,Qd(m,a.precedence,s),o.instance=m;case"script":return m=Dc(a.src),(p=s.querySelector(Eu(m)))?(o.instance=p,Rn(p),p):(u=a,(p=Xs.get(m))&&(u=g({},a),Ty(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),Rn(p),Ln(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Qd(u,a.precedence,s));return o.instance}function Qd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function J4(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function A1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function eL(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Mc(u.href),m=o.querySelector(wu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Xd.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,Rn(m);return}m=o.ownerDocument||o,u=x1(u),(p=Xs.get(p))&&Cy(u,p),m=m.createElement("link"),Rn(m);var w=m;w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=Xd.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var Ay=0;function tL(s,o){return s.stylesheets&&s.count===0&&Jd(s,s.stylesheets),0Ay?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Wd=null;function Jd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Wd=new Map,o.forEach(nL,s),Wd=null,Xd.call(s))}function nL(s,o){if(!(o.state.loading&4)){var a=Wd.get(s);if(a)var u=a.get(null);else{a=new Map,Wd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jy.exports=HB(),Jy.exports}var VB=FB();const qB=JA(VB);var n0={exports:{}},s0={};var AR;function GB(){if(AR)return s0;AR=1;var e=al().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return s0.c=function(t){return e.H.useMemoCache(t)},s0}var IR;function KB(){return IR||(IR=1,n0.exports=GB()),n0.exports}var Ct=KB();const DI=I.createContext(void 0);function ZB(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function QB(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>ZB(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let v;t[6]!==l?(v=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=v):v=t[7];let b;t[8]!==v||t[9]!==d?(b={theme:d,setTheme:v},t[8]=v,t[9]=d,t[10]=b):b=t[10];const _=b;let x;return t[11]!==n||t[12]!==_?(x=$.jsx(DI.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function YB(){const e=I.useContext(DI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function fv(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const qu={};function Mp(e,t,n,r,i){let c={...dv(e,qu)};return t&&(c=Uu(c,t)),n&&(c=Uu(c,n)),r&&(c=Uu(c,r)),i&&(c=Uu(c,i)),c}function XB(e){if(e.length===0)return qu;if(e.length===1)return dv(e[0],qu);let t={...dv(e[0],qu)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function kI(e){return typeof e=="function"}function dv(e,t){return kI(e)?e(t):e??qu}function e$(e,t){return t?e?n=>{if(t$(n)){const i=n;hv(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function hv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function PI(e,t){return t?e?t+" "+e:t:e}function t$(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const OR={};function zr(e,t){const n=I.useRef(OR);return n.current===OR&&(n.current=e(t)),n}function Yh(e,t,n,r){const i=zr(NI).current;return s$(i,e,t,n,r)&&zI(i,[e,t,n,r]),i.callback}function n$(e){const t=zr(NI).current;return r$(t,e)&&zI(t,e),t.callback}function NI(){return{callback:null,cleanup:null,refs:[]}}function s$(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function r$(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function zI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function MR(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(sb(19)?n?.ref:t.ref)??null}function i$(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function a$(e,t){return typeof e=="function"?e(t):e}function c$(e,t){return typeof e=="function"?e(t):e}function LI(){}const S0e=Object.freeze([]),Ds=Object.freeze({}),l$={style:{transition:"none"}},u$="data-base-ui-click-trigger",_0e={fallbackAxisSide:"none"},f$={fallbackAxisSide:"end"},d$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function cr(e,t,n={}){const r=t.render,i=h$(t,n);if(n.enabled===!1)return null;const c=n.state??Ds;return p$(e,r,i,c)}function h$(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Ds,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?a$(n,c):void 0,g=h?c$(r,c):void 0,v=h?i$(c,d):Ds,b=h?fv(v,Array.isArray(f)?XB(f):f)??Ds:Ds;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=n$([b.ref,MR(i),...l]):b.ref=Yh(b.ref,MR(i),l):Yh(null,null)),h?(y!==void 0&&(b.className=PI(b.className,y)),g!==void 0&&(b.style=fv(b.style,g)),b):Ds}function p$(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Mp(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return m$(e,n);throw new Error(wo(8))}function m$(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function BI(e){return cr(e.defaultTagName??"div",e,e)}function $I(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,kR=UI,jI=(e,t)=>n=>{var r;if(t?.variants==null)return kR(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const v=DR(y)||DR(g);return i[h][v]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,v]:h},[]);return kR(e,l,d,n?.class,n?.className)};const HI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const g$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const y$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const PR=e=>{const t=y$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var v$={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"};const b$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const S$=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...v$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:HI("lucide",i),...!c&&!b$(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const _r=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(S$,{ref:c,iconNode:t,className:HI(`lucide-${g$(PR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=PR(e),n};const _$=[["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"}]],w$=_r("circle-alert",_$);const E$=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],x$=_r("hard-drive",E$);const R$=[["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"}]],C$=_r("house",R$);const T$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],A$=_r("image",T$);const I$=[["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"}]],O$=_r("key",I$);const M$=[["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"}]],D$=_r("log-out",M$);const k$=[["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"}]],P$=_r("moon",k$);const N$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],z$=_r("panel-left",N$);const L$=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],NR=_r("server",L$);const B$=[["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"}]],$$=_r("sun",B$);const U$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],j$=_r("x",U$);function Dp(){return typeof window<"u"}function Pi(e){return rb(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rb(e){return Dp()?e instanceof Node||e instanceof mn(e).Node:!1}function _t(e){return Dp()?e instanceof Element||e instanceof mn(e).Element:!1}function xn(e){return Dp()?e instanceof HTMLElement||e instanceof mn(e).HTMLElement:!1}function pv(e){return!Dp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}const H$=new Set(["inline","contents"]);function za(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!H$.has(i)}const F$=new Set(["table","td","th"]);function V$(e){return F$.has(Pi(e))}const q$=[":popover-open",":modal"];function kp(e){return q$.some(t=>{try{return e.matches(t)}catch{return!1}})}const G$=["transform","translate","scale","rotate","perspective"],K$=["transform","translate","scale","rotate","perspective","filter"],Z$=["paint","layout","strict","content"];function ob(e){const t=Pp(),n=_t(e)?zs(e):e;return G$.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)||K$.some(r=>(n.willChange||"").includes(r))||Z$.some(r=>(n.contain||"").includes(r))}function Q$(e){let t=vo(e);for(;xn(t)&&!mo(t);){if(ob(t))return t;if(kp(t))return null;t=vo(t)}return null}function Pp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Y$=new Set(["html","body","#document"]);function mo(e){return Y$.has(Pi(e))}function zs(e){return mn(e).getComputedStyle(e)}function Np(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vo(e){if(Pi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pv(e)&&e.host||Lr(e);return pv(t)?t.host:t}function FI(e){const t=vo(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:xn(t)&&za(t)?t:FI(t)}function Ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FI(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=mn(i);if(c){const f=mv(l);return t.concat(l,l.visualViewport||[],za(i)?i:[],f&&n?Ti(f):[])}return t.concat(i,Ti(i,[],n))}function mv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const r0=qv[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],X$=r0&&r0!==I.useLayoutEffect?r0:e=>e();function Ze(e){const t=zr(W$).current;return t.next=e,X$(t.effect),t.trampoline}function W$(){const e={next:void 0,callback:J$,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function J$(){}const eU=()=>{},mt=typeof document<"u"?I.useLayoutEffect:eU,tU=I.createContext(void 0);function nU(e=!1){const t=I.useContext(tU);if(t===void 0&&!e)throw new Error(wo(16));return t}function sU(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function VI(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=nU(!0)!==void 0,f=Ze(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=sU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const v=c.current;rU(v)&&l&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((v={})=>{const{onClick:b,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=v;return Mp({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}b?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(hv(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,j=D.key==="Enter",B=D.key===" ";N&&((B||j)&&D.preventDefault(),j&&b?.(D))},onKeyUp(D){t||(hv(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&b?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function rU(e){return xn(e)&&e.tagName==="BUTTON"}const oU=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=VI({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:g,ref:[n,y],props:[d,h]})}),iU=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),qI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xh="-",zR=[],cU="arbitrary..",lU=e=>{const t=fU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return uU(l);const f=l.split(Xh),d=f[0]===""&&f.length>1?1:0;return GI(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?iU(h,d):d:h||zR}return n[l]||zR}}},GI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=GI(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Xh):e.slice(t).join(Xh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?cU+r:void 0})(),fU=e=>{const{theme:t,classGroups:n}=e;return dU(n,t)},dU=(e,t)=>{const n=qI();for(const r in e){const i=e[r];ib(i,n,r,t)}return n},ib=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){pU(e,t,n);return}if(typeof e=="function"){mU(e,t,n,r);return}gU(e,t,n,r)},pU=(e,t,n)=>{const r=e===""?t:KI(t,e);r.classGroupId=n},mU=(e,t,n,r)=>{if(yU(e)){ib(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(aU(n,e))},gU=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(Xh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,vU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},gv="!",LR=":",bU=[],BR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),SU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return BR(c,b,v,_)};if(t){const i=t+LR,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):BR(bU,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},_U=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},wU=e=>({cache:vU(e.cacheSize),parseClassName:SU(e),sortModifiers:_U(e),...lU(e)}),EU=/\s+/,xU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(EU);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=b?A+gv:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let j=0;j0?" "+d:d)}return d},RU=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=wU(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=xU(d,n);return i(d,y),y};return c=l,(...d)=>c(RU(...d))},TU=[],_n=e=>{const t=n=>n[e]||TU;return t.isThemeGetter=!0,t},QI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,YI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AU=/^\d+\/\d+$/,IU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OU=/\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$/,MU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pc=e=>AU.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),o0=e=>e.endsWith("%")&&tt(e.slice(0,-1)),ao=e=>IU.test(e),PU=()=>!0,NU=e=>OU.test(e)&&!MU.test(e),XI=()=>!1,zU=e=>DU.test(e),LU=e=>kU.test(e),BU=e=>!Me(e)&&!De(e),$U=e=>cl(e,e2,XI),Me=e=>QI.test(e),pa=e=>cl(e,t2,NU),i0=e=>cl(e,VU,tt),$R=e=>cl(e,WI,XI),UU=e=>cl(e,JI,LU),fh=e=>cl(e,n2,zU),De=e=>YI.test(e),Pu=e=>ll(e,t2),jU=e=>ll(e,qU),UR=e=>ll(e,WI),HU=e=>ll(e,e2),FU=e=>ll(e,JI),dh=e=>ll(e,n2,!0),cl=(e,t,n)=>{const r=QI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ll=(e,t,n=!1)=>{const r=YI.exec(e);return r?r[1]?t(r[1]):n:!1},WI=e=>e==="position"||e==="percentage",JI=e=>e==="image"||e==="url",e2=e=>e==="length"||e==="size"||e==="bg-size",t2=e=>e==="length",VU=e=>e==="number",qU=e=>e==="family-name",n2=e=>e==="shadow",GU=()=>{const e=_n("color"),t=_n("font"),n=_n("text"),r=_n("font-weight"),i=_n("tracking"),c=_n("leading"),l=_n("breakpoint"),f=_n("container"),d=_n("spacing"),h=_n("radius"),y=_n("shadow"),g=_n("inset-shadow"),v=_n("text-shadow"),b=_n("drop-shadow"),_=_n("blur"),x=_n("perspective"),R=_n("aspect"),C=_n("ease"),A=_n("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),De,Me],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],k=()=>[De,Me,d],Z=()=>[Pc,"full","auto",...k()],se=()=>[pi,"none","subgrid",De,Me],le=()=>["auto",{span:["full",pi,De,Me]},pi,De,Me],K=()=>[pi,"auto",De,Me],Q=()=>["auto","min","max","fr",De,Me],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...k()],W=()=>[Pc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],H=()=>[e,De,Me],ve=()=>[...D(),UR,$R,{position:[De,Me]}],Te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",HU,$U,{size:[De,Me]}],ne=()=>[o0,Pu,pa],ie=()=>["","none","full",h,De,Me],de=()=>["",tt,Pu,pa],Ce=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[tt,o0,UR,$R],Ye=()=>["","none",_,De,Me],He=()=>["none",tt,De,Me],ht=()=>["none",tt,De,Me],Ft=()=>[tt,De,Me],oe=()=>[Pc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ao],breakpoint:[ao],color:[PU],container:[ao],"drop-shadow":[ao],ease:["in","out","in-out"],font:[BU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ao],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ao],shadow:[ao],spacing:["px",tt],text:[ao],"text-shadow":[ao],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pc,Me,De,R]}],container:["container"],columns:[{columns:[tt,Me,De,f]}],"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:N()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",De,Me]}],basis:[{basis:[Pc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,Pc,"auto","initial","none",Me]}],grow:[{grow:["",tt,De,Me]}],shrink:[{shrink:["",tt,De,Me]}],order:[{order:[pi,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:le()}],"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":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Pu,pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,i0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",o0,Me]}],"font-family":[{font:[jU,Me,t]}],"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:[i,De,Me]}],"line-clamp":[{"line-clamp":[tt,"none",De,i0]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,pa]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],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",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:Te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,De,Me],radial:["",De,Me],conic:[pi,De,Me]},FU,UU]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Me]}],"outline-w":[{outline:["",tt,Pu,pa]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",y,dh,fh]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",g,dh,fh]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[tt,pa]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,dh,fh]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[tt,De,Me]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"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":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:Te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,De,Me]}],contrast:[{contrast:[tt,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",b,dh,fh]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",tt,De,Me]}],"hue-rotate":[{"hue-rotate":[tt,De,Me]}],invert:[{invert:["",tt,De,Me]}],saturate:[{saturate:[tt,De,Me]}],sepia:[{sepia:["",tt,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Me]}],ease:[{ease:["linear","initial",C,De,Me]}],delay:[{delay:[tt,De,Me]}],animate:[{animate:["none",A,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,De,Me]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",De,Me]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",De,Me]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[tt,Pu,pa,i0]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},KU=CU(GU);function tn(...e){return KU(UI(e))}function w0e(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function E0e(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const ZU=/\/$/;function x0e(e){return e.replace(ZU,"")}function QU(e){return e&&(e.endsWith("/")?e:`${e}/`)}function YU(e,t){return e.startsWith(t)?e:`${t}${e}`}function R0e(e,t){return e.startsWith(t)?e.slice(t.length):e}const XU=jI("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function el(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=tn(XU({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=$.jsx(oU,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const WU={...qv};let jR=0;function JU(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(jR+=1,r(`${t}-${jR}`))},[n,t]),i}const HR=WU.useId;function _f(e,t){if(HR!==void 0){const n=HR();return e??(t?`${t}-${n}`:n)}return JU(e,t)}function ab(e){return _f(e,"base-ui")}const e5=[];function s2(e){I.useEffect(e,e5)}const Nu=0;class Ii{static create(){return new Ii}currentId=Nu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nu,n()},t)}isStarted(){return this.currentId!==Nu}clear=()=>{this.currentId!==Nu&&(clearTimeout(this.currentId),this.currentId=Nu)};disposeEffect=()=>this.clear}function Oi(){const e=zr(Ii.create).current;return s2(e.disposeEffect),e}function La(e){return e?.ownerDocument||document}const ul=typeof navigator<"u",a0=s5(),r2=o5(),o2=r5(),t5=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),i2=a0.platform==="MacIntel"&&a0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(a0.platform),a2=ul&&/apple/i.test(navigator.vendor),yv=ul&&/android/i.test(r2)||/android/i.test(o2),n5=ul&&r2.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,c2=o2.includes("jsdom/");function s5(){if(!ul)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function r5(){if(!ul)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function o5(){if(!ul)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const vv="data-base-ui-focusable",l2="active",u2="selected",f2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",C0e="ArrowLeft",T0e="ArrowRight",A0e="ArrowUp",I0e="ArrowDown";function Si(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&pv(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function os(e){return"composedPath"in e?e.composedPath()[0]:e.target}function yr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function i5(e){return e.matches("html,body")}function En(e){return e?.ownerDocument||document}function d2(e){return xn(e)&&e.matches(f2)}function FR(e){return e?e.getAttribute("role")==="combobox"&&d2(e):!1}function a5(e){if(!e||c2)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function bv(e){return e?e.hasAttribute(vv)?e:e.querySelector(`[${vv}]`)||e:null}function Ra(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Ra(e,i.id,n)])}function VR(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function c5(e){e.preventDefault(),e.stopPropagation()}function l5(e){return"nativeEvent"in e}function u5(e){return e.mozInputSource===0&&e.isTrusted?!0:yv&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function f5(e){return c2?!1:!yv&&e.width===0&&e.height===0||yv&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function of(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function d5(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const h5=["top","right","bottom","left"],tl=Math.min,Ms=Math.max,Wh=Math.round,hh=Math.floor,kr=e=>({x:e,y:e}),p5={left:"right",right:"left",bottom:"top",top:"bottom"},m5={start:"end",end:"start"};function Sv(e,t,n){return Ms(e,tl(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function gs(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function cb(e){return e==="x"?"y":"x"}function lb(e){return e==="y"?"height":"width"}const g5=new Set(["top","bottom"]);function ar(e){return g5.has(gs(e))?"y":"x"}function ub(e){return cb(ar(e))}function y5(e,t,n){n===void 0&&(n=!1);const r=Ni(e),i=ub(e),c=lb(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Jh(l)),[l,Jh(l)]}function v5(e){const t=Jh(e);return[_v(e),t,_v(t)]}function _v(e){return e.replace(/start|end/g,t=>m5[t])}const qR=["left","right"],GR=["right","left"],b5=["top","bottom"],S5=["bottom","top"];function _5(e,t,n){switch(e){case"top":case"bottom":return n?t?GR:qR:t?qR:GR;case"left":case"right":return t?b5:S5;default:return[]}}function w5(e,t,n,r){const i=Ni(e);let c=_5(gs(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(_v)))),c}function Jh(e){return e.replace(/left|right|bottom|top/g,t=>p5[t])}function E5(e){return{top:0,right:0,bottom:0,left:0,...e}}function h2(e){return typeof e!="number"?E5(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var x5=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tp=x5.join(","),p2=typeof Element>"u",nl=p2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,np=!p2&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},sp=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):sp(t.parentNode));return l},R5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m2=function(t,n,r){if(sp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(tp));return n&&nl.call(t,tp)&&i.unshift(t),i=i.filter(r),i},rp=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!sp(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=rp(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=nl.call(l,tp);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),v=!sp(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&v){var b=rp(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},g2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},y2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||R5(t))&&!g2(t)?0:t.tabIndex},C5=function(t,n){var r=y2(t);return r<0&&n&&!g2(t)?0:r},T5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},v2=function(t){return t.tagName==="INPUT"},A5=function(t){return v2(t)&&t.type==="hidden"},I5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},O5=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(nl.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=np(t);if(h&&!h.shadowRoot&&i(h)===!0)return KR(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(P5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return KR(t);return!1},z5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},b2=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=C5(f,l),h=l?b2(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(T5).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},zp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:Ev.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:L5}):r=m2(t,n.includeContainer,Ev.bind(null,n)),b2(r)},B5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:wv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=m2(t,n.includeContainer,wv.bind(null,n)),r},S2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return nl.call(t,tp)===!1?!1:Ev(n,t)};const wf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _2(e,t){const n=zp(e,wf()),r=n.length;if(r===0)return;const i=Si(En(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function w2(e){return _2(En(e).body,1)||e}function E2(e){return _2(En(e).body,-1)||e}function Gu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function $5(e){zp(e,wf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ZR(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const fb="none",op="trigger-press",Sr="trigger-hover",kh="trigger-focus",x2="outside-press",O0e="item-press",U5="close-press",R2="focus-out",db="escape-key",M0e="list-navigation",D0e="cancel-open",j5="disabled",C2="imperative-action",k0e="window-resize";function qt(e,t,n,r){let i=!1,c=!1;const l=Ds;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const T2=I.createContext(void 0);function Ba(e){const t=I.useContext(T2);if(e===!1&&t===void 0)throw new Error(wo(27));return t}let af=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const H5={[af.startingStyle]:""},F5={[af.endingStyle]:""},hb={transitionStatus(e){return e==="starting"?H5:e==="ending"?F5:null}};let _a=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=af.startingStyle]="startingStyle",e[e.endingStyle=af.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),xv=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const V5={[xv.popupOpen]:""},q5={[xv.popupOpen]:"",[xv.pressed]:""},G5={[_a.open]:""},K5={[_a.closed]:""},Z5={[_a.anchorHidden]:""},Q5={open(e){return e?V5:null}},P0e={open(e){return e?q5:null}},Ef={open(e){return e?G5:K5},anchorHidden(e){return e?Z5:null}},Y5={...Ef,...hb},X5=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=Ba(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),v=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return cr("div",t,{state:v,ref:[f.context.backdropRef,n],stateAttributesMapping:Y5,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),W5=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=Ba(),h=d.useState("open");function y(_){h&&d.setOpen(!1,qt(U5,_.nativeEvent))}const{getButtonProps:g,buttonRef:v}=VI({disabled:c,native:l}),b=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:b,ref:[n,v],props:[{onClick:y},f,g]})}),J5=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=Ba(),d=ab(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),cr("p",t,{ref:n,props:[{id:d},l]})});function Dr(e){const t=zr(e8,e).current;return t.next=e,mt(t.effect),t}function e8(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function t8(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const n8=I.createContext(null),s8=I.createContext(null),Lp=()=>I.useContext(n8)?.id||null,xf=e=>{const t=I.useContext(s8);return e??t};function sl(e){return`data-base-ui-${e}`}function Ph(e,t,n){if(n&&!of(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const A2=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function r8(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=Oi();return $.jsx(A2.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function o8(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(A2),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:v,timeout:b}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return b.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{b.clear()}}R()}},[i,c,r,f,d,h,y,g,b,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;b.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Ph(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,qt(fb))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,b]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:v,delayRef:d,isInstantPhase:_}),[v,d,_])}const I2={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},O2={...I2,position:"fixed",top:0,left:0},N0e={...I2,position:"absolute"},ph=null;class i8{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const mh=new i8;class Mr{static create(){return new Mr}static request(t){return mh.request(t)}static cancel(t){return mh.cancel(t)}currentId=ph;request(t){this.cancel(),this.currentId=mh.request(()=>{this.currentId=ph,t()})}cancel=()=>{this.currentId!==ph&&(mh.cancel(this.currentId),this.currentId=ph)};disposeEffect=()=>this.cancel}function M2(){const e=zr(Mr.create).current;return s2(e.disposeEffect),e}const ip=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{a2&&i("button")},[]);const c={tabIndex:0,role:r};return $.jsx("span",{...t,ref:n,style:O2,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let QR=0;function c0(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(QR);const c=()=>e?.focus({preventScroll:n});i?c():QR=requestAnimationFrame(c)}const qc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function YR(e){return e==="inert"?qc.inert:e==="aria-hidden"?qc["aria-hidden"]:qc.none}let gh=new WeakSet,yh={},l0=0;const D2=e=>e&&(e.host||D2(e.parentNode)),a8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=D2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function c8(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=a8(t,e),f=new Set,d=new Set(l),h=[];yh[i]||(yh[i]=new WeakMap);const y=yh[i];l.forEach(g),v(t),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||d.has(b)||[].forEach.call(b.children,_=>{if(Pi(_)!=="script")if(f.has(_))v(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=YR(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&gh.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return l0+=1,()=>{h.forEach(b=>{const _=YR(c),R=(_.get(b)||0)-1,C=(y.get(b)||0)-1;_.set(b,R),y.set(b,C),R||(!gh.has(b)&&c&&b.removeAttribute(c),gh.delete(b)),C||b.removeAttribute(i)}),l0-=1,l0||(qc.inert=new WeakMap,qc["aria-hidden"]=new WeakMap,qc.none=new WeakMap,gh=new WeakSet,yh={})}}function l8(e,t=!1,n=!1){const r=En(e[0]).body;return c8(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const k2=I.createContext(null),P2=()=>I.useContext(k2),u8=sl("portal");function N2(e={}){const{ref:t,container:n,componentProps:r=Ds,elementProps:i,elementState:c}=e,l=_f(),d=P2()?.portalNode,[h,y]=I.useState(null),[g,v]=I.useState(null),b=Ze(C=>{C!==null&&v(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,v(null),y(null));return}if(l==null)return;const C=(n&&(rb(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,v(null),y(null));return}_.current!==C&&(_.current=C,v(null),y(C))},[n,d,l]);const x=cr("div",r,{ref:[t,b],state:c,props:[{id:l,[u8]:""},i]});return{portalNode:g,portalSubtree:h&&x?ki.createPortal(x,h):null}}const f8=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=N2({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),v=I.useRef(null),b=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(j){h&&j.relatedTarget&&Gu(j)&&(j.type==="focusin"?ZR:$5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||ZR(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return $.jsxs(I.Fragment,{children:[y,$.jsxs(k2.Provider,{value:D,children:[O&&h&&$.jsx(ip,{"data-type":"outside",ref:g,onFocus:N=>{if(Gu(N,h))b.current?.focus();else{const j=x?x.domReference:null;E2(j)?.focus()}}}),O&&h&&$.jsx("span",{"aria-owns":h.id,style:d$}),h&&ki.createPortal(r,h),O&&h&&$.jsx(ip,{"data-type":"outside",ref:v,onFocus:N=>{if(Gu(N,h))_.current?.focus();else{const j=x?x.domReference:null;w2(j)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qt(R2,N.nativeEvent))}}})]})]})});function lo(e){return e==null?e:"current"in e?e.current:e}function d8(e,t){const n=mn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const XR=20;let Ei=[];function pb(){Ei=Ei.filter(e=>e.isConnected)}function h8(e){pb(),e&&Pi(e)!=="body"&&(Ei.push(e),Ei.length>XR&&(Ei=Ei.slice(-XR)))}function u0(){return pb(),Ei[Ei.length-1]}function p8(e){if(!e)return null;const t=wf();return S2(e,t)?e:zp(e,t)[0]||e}function m8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zs(e).display!=="none"}function WR(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=wf(),i=B5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return S2(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function g8(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,j=Ze(()=>N.current.floatingContext?.nodeId),B=Ze(g),k=c===!1,Z=FR(A)&&k,se=Dr(i),le=Dr(c),K=Dr(l),Q=Dr(y),ye=xf(x),fe=P2(),q=I.useRef(null),W=I.useRef(null),H=I.useRef(!1),ve=I.useRef(!1),Te=I.useRef(!1),P=I.useRef(-1),ne=I.useRef(""),ie=I.useRef(""),de=I.useRef(null),Ce=I.useRef(null),Se=Yh(de,_,fe?.beforeInsideRef),be=Yh(Ce,fe?.afterInsideRef),Ye=Oi(),He=Oi(),ht=M2(),Ft=fe!=null,oe=bv(O),Fe=Ze((_e=oe)=>_e?zp(_e,wf()):[]),Ie=Ze(_e=>{const Ne=Fe(_e);return se.current.map(()=>Ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function _e(qe){qe.key==="Tab"&&bt(oe,Si(En(oe)))&&Fe().length===0&&!Z&&c5(qe)}const Ne=En(oe);return Ne.addEventListener("keydown",_e),()=>{Ne.removeEventListener("keydown",_e)}},[r,A,oe,d,se,Z,Fe,Ie]),I.useEffect(()=>{if(r||!O)return;function _e(Ne){const qe=os(Ne),ut=Fe().indexOf(qe);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",_e),()=>{O.removeEventListener("focusin",_e)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const _e=En(oe);function Ne(){Te.current=!1}function qe(ut){const Be=os(ut),Le=bt(O,Be)||bt(A,Be)||bt(fe?.portalNode,Be);Te.current=!Le,ie.current=ut.pointerType||"keyboard"}function Qe(){ie.current="keyboard"}return _e.addEventListener("pointerdown",qe,!0),_e.addEventListener("pointerup",Ne,!0),_e.addEventListener("pointercancel",Ne,!0),_e.addEventListener("keydown",Qe,!0),()=>{_e.removeEventListener("pointerdown",qe,!0),_e.removeEventListener("pointerup",Ne,!0),_e.removeEventListener("pointercancel",Ne,!0),_e.removeEventListener("keydown",Qe,!0)}},[r,O,A,oe,C,fe]),I.useEffect(()=>{if(r||!h)return;function _e(){ve.current=!0,He.start(0,()=>{ve.current=!1})}function Ne(Be){const Le=Be.relatedTarget,rn=Be.currentTarget,it=os(Be);queueMicrotask(()=>{const _s=j(),gt=R.context.triggerElements,$t=Le?.hasAttribute(sl("focus-guard"))&&[de.current,Ce.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v)].includes(Le),Ut=!(bt(A,Le)||bt(O,Le)||bt(Le,O)||bt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(on=>bt(on,Le))||$t||ye&&(Ra(ye.nodesRef.current,_s).find(on=>bt(on.context?.elements.floating,Le)||bt(on.context?.elements.domReference,Le))||VR(ye.nodesRef.current,_s).find(on=>[on.context?.elements.floating,bv(on.context?.elements.floating)].includes(Le)||on.context?.elements.domReference===Le)));if(rn===A&&oe&&WR(oe,se),f&&rn!==A&&!m8(it)&&Si(En(oe))===En(oe).body){if(xn(oe)&&(oe.focus(),f==="popup")){ht.request(()=>{oe.focus()});return}const on=P.current,ws=Fe(),$s=ws[on]||ws[ws.length-1]||oe;xn($s)&&$s.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(Z||!d)&&Le&&Ut&&!ve.current&&(Z||Le!==u0())&&(H.current=!0,R.setOpen(!1,qt(R2,Be)))})}function qe(){Te.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=xn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Ne),Qe.addEventListener("pointerdown",_e),ut.push(()=>{Qe.removeEventListener("focusout",Ne),Qe.removeEventListener("pointerdown",_e)})),O&&(O.addEventListener("focusout",Ne),fe&&(O.addEventListener("focusout",qe,!0),ut.push(()=>{O.removeEventListener("focusout",qe,!0)})),ut.push(()=>{O.removeEventListener("focusout",Ne)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,oe,d,ye,fe,R,h,f,Fe,Z,j,se,N,Ye,He,ht,v,b]),I.useEffect(()=>{if(r||!O||!C)return;const _e=Array.from(fe?.portalNode?.querySelectorAll(`[${sl("portal")}]`)||[]),qe=(ye?VR(ye.nodesRef.current,j()):[]).find(Be=>FR(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,qe,..._e,...B(),q.current,W.current,de.current,Ce.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v),Z?A:null].filter(Be=>Be!=null),ut=l8(Qe,d||Z);return()=>{ut()}},[C,r,A,O,d,se,fe,Z,ye,j,B,v,b]),mt(()=>{if(!C||r||!xn(oe))return;const _e=En(oe),Ne=Si(_e);queueMicrotask(()=>{const qe=Ie(oe),Qe=le.current,ut=typeof Qe=="function"?Qe(Q.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=qe[0]||oe:Be=lo(ut),Be=Be||qe[0]||oe,!bt(oe,Ne)&&c0(Be,{preventScroll:Be===oe})})},[r,C,oe,k,Ie,le,Q]),mt(()=>{if(r||!oe)return;const _e=En(oe),Ne=Si(_e);h8(Ne);function qe(Be){if(Be.open||(ne.current=d8(Be.nativeEvent,ie.current)),Be.reason===Sr&&Be.nativeEvent.type==="mouseleave"&&(H.current=!0),Be.reason===x2)if(Be.nested)H.current=!1;else if(u5(Be.nativeEvent)||f5(Be.nativeEvent))H.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?H.current=!1:H.current=!0}}D.on("openchange",qe);const Qe=_e.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,O2),Ft&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=K.current;let Le=typeof Be=="function"?Be(ne.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||u0();return it&&it.isConnected?it:Qe}const rn=A||u0()||Qe;return lo(Le)||rn}return()=>{D.off("openchange",qe);const Be=Si(_e),Le=bt(O,Be)||ye&&Ra(ye.nodesRef.current,j(),!1).some(it=>bt(it.context?.elements.floating,Be)),rn=ut();queueMicrotask(()=>{const it=p8(rn),_s=typeof K.current!="boolean";K.current&&!H.current&&xn(it)&&(!(!_s&&it!==Be&&Be!==_e.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,oe,K,N,D,ye,Ft,A,j]),I.useEffect(()=>{queueMicrotask(()=>{H.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function _e(qe){os(qe)?.closest(`[${u$}]`)&&(ve.current=!0)}const Ne=En(oe);return Ne.addEventListener("pointerdown",_e,!0),()=>{Ne.removeEventListener("pointerdown",_e,!0)}},[r,C,oe]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!oe))return WR(oe,se),()=>{queueMicrotask(pb)}},[r,oe,se]);const Pt=!r&&(d?!Z:!0)&&(Ft||d);return $.jsxs(I.Fragment,{children:[Pt&&$.jsx(ip,{"data-type":"inside",ref:Se,onFocus:_e=>{if(d){const Ne=Ie();c0(Ne[Ne.length-1])}else fe?.portalNode&&(H.current=!1,Gu(_e,fe.portalNode)?w2(A)?.focus():lo(b??fe.beforeOutsideRef)?.focus())}}),n,Pt&&$.jsx(ip,{"data-type":"inside",ref:be,onFocus:_e=>{d?c0(Ie()[0]):fe?.portalNode&&(h&&(H.current=!0),Gu(_e,fe.portalNode)?E2(A)?.focus():lo(v??fe.afterOutsideRef)?.focus())}})]})}function y8(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,v-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,v=f&&t.y!=null?t.y:v):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function JR(e){return e!=null&&e.clientX!=null}function v8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),v=I.useRef(null),[b,_]=I.useState(),[x,R]=I.useState([]),C=Ze((j,B,k)=>{g.current||l.current.openEvent&&!JR(l.current.openEvent)||n.set("positionReference",y8(k??c,{x:j,y:B,axis:d,dataRef:l,pointerType:b}))}),A=Ze(j=>{h!=null||y!=null||(r?v.current||R([]):C(j.clientX,j.clientY,j.currentTarget))}),O=of(b)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const j=mn(i);function B(k){const Z=os(k);bt(i,Z)?(j.removeEventListener("mousemove",B),v.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||JR(l.current.openEvent)){j.addEventListener("mousemove",B);const k=()=>{j.removeEventListener("mousemove",B),v.current=null};return v.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function j(B){_(B.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function eC(e,t,n){let{reference:r,floating:i}=e;const c=ar(t),l=ub(t),f=lb(l),d=gs(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,v=r[f]/2-i[f]/2;let b;switch(d){case"top":b={x:y,y:r.y-i.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-i.width,y:g};break;default:b={x:r.x,y:r.y}}switch(Ni(t)){case"start":b[l]-=v*(n&&h?-1:1);break;case"end":b[l]+=v*(n&&h?-1:1);break}return b}const b8=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=eC(h,r,d),v=r,b={},_=0;for(let x=0;xye<=0)){var le,K;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=B[ye];if(fe&&(!(g==="alignment"?A!==ar(fe):!1)||se.every(H=>ar(H.placement)===A?H.overflows[0]>0:!0)))return{data:{index:ye,overflows:se},reset:{placement:fe}};let q=(K=se.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:K.placement;if(!q)switch(b){case"bestFit":{var Q;const W=(Q=se.filter(H=>{if(j){const ve=ar(H.placement);return ve===A||ve==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ve=>ve>0).reduce((ve,Te)=>ve+Te,0)]).sort((H,ve)=>H[1]-ve[1])[0])==null?void 0:Q[0];W&&(q=W);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function tC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nC(e){return h5.some(t=>e[t]>=0)}const _8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=bo(e,t);switch(r){case"referenceHidden":{const c=await cf(t,{...i,elementContext:"reference"}),l=tC(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:nC(l)}}}case"escaped":{const c=await cf(t,{...i,altBoundary:!0}),l=tC(c,n.floating);return{data:{escapedOffsets:l,escaped:nC(l)}}}default:return{}}}}},z2=new Set(["left","top"]);async function w8(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=gs(n),f=Ni(n),d=ar(n)==="y",h=z2.has(l)?-1:1,y=c&&d?-1:1,g=bo(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(b=f==="end"?_*-1:_),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const E8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await w8(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},x8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=bo(e,t),h={x:n,y:r},y=await cf(t,d),g=ar(gs(i)),v=cb(g);let b=h[v],_=h[g];if(c){const R=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=b+y[R],O=b-y[C];b=Sv(A,b,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=Sv(A,_,O)}const x=f.fn({...t,[v]:b,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:c,[g]:l}}}}}},R8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=bo(e,t),y={x:n,y:r},g=ar(i),v=cb(g);let b=y[v],_=y[g];const x=bo(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=v==="y"?"height":"width",D=c.reference[v]-c.floating[O]+R.mainAxis,N=c.reference[v]+c.reference[O]-R.mainAxis;bN&&(b=N)}if(h){var C,A;const O=v==="y"?"width":"height",D=z2.has(gs(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),j=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_j&&(_=j)}return{[v]:b,[g]:_}}}},C8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=bo(e,t),y=await cf(t,h),g=gs(i),v=Ni(i),b=ar(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=v===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=v==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=tl(x-y[R],A),N=tl(_-y[C],O),j=!t.middlewareData.shift;let B=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=A),j&&!v){const se=Ms(y.left,0),le=Ms(y.right,0),K=Ms(y.top,0),Q=Ms(y.bottom,0);b?k=_-2*(se!==0||le!==0?se+le:Ms(y.left,y.right)):B=x-2*(K!==0||Q!==0?K+Q:Ms(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:B});const Z=await l.getDimensions(f.floating);return _!==Z.width||x!==Z.height?{reset:{rects:!0}}:{}}}};function L2(e){const t=zs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=Wh(n)!==c||Wh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function mb(e){return _t(e)?e:e.contextElement}function Gc(e){const t=mb(e);if(!xn(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=L2(t);let l=(c?Wh(n.width):n.width)/r,f=(c?Wh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const T8=kr(0);function B2(e){const t=mn(e);return!Pp()||!t.visualViewport?T8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mn(e)?!1:t}function Oa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=mb(e);let l=kr(1);t&&(r?_t(r)&&(l=Gc(r)):l=Gc(e));const f=A8(c,n,r)?B2(c):kr(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const v=mn(c),b=r&&_t(r)?mn(r):r;let _=v,x=mv(_);for(;x&&r&&b!==_;){const R=Gc(x),C=x.getBoundingClientRect(),A=zs(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=mn(x),x=mv(_)}}return ep({width:y,height:g,x:d,y:h})}function Bp(e,t){const n=Np(e).scrollLeft;return t?t.left+n:Oa(Lr(e)).left+n}function $2(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function I8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=Lr(r),f=t?kp(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=kr(1);const y=kr(0),g=xn(r);if((g||!g&&!c)&&((Pi(r)!=="body"||za(l))&&(d=Np(r)),xn(r))){const b=Oa(r);h=Gc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=l&&!g&&!c?$2(l,d):kr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:n.y*h.y-d.scrollTop*h.y+y.y+v.y}}function O8(e){return Array.from(e.getClientRects())}function M8(e){const t=Lr(e),n=Np(e),r=e.ownerDocument.body,i=Ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bp(e);const f=-n.scrollTop;return zs(r).direction==="rtl"&&(l+=Ms(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const sC=25;function D8(e,t){const n=mn(e),r=Lr(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Pp();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=Bp(r);if(h<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-b);_<=sC&&(c-=_)}else h<=sC&&(c+=h);return{width:c,height:l,x:f,y:d}}const k8=new Set(["absolute","fixed"]);function P8(e,t){const n=Oa(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=xn(e)?Gc(e):kr(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function rC(e,t,n){let r;if(t==="viewport")r=D8(e,n);else if(t==="document")r=M8(Lr(e));else if(_t(t))r=P8(t,n);else{const i=B2(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function U2(e,t){const n=vo(e);return n===t||!_t(n)||mo(n)?!1:zs(n).position==="fixed"||U2(n,t)}function N8(e,t){const n=t.get(e);if(n)return n;let r=Ti(e,[],!1).filter(f=>_t(f)&&Pi(f)!=="body"),i=null;const c=zs(e).position==="fixed";let l=c?vo(e):e;for(;_t(l)&&!mo(l);){const f=zs(l),d=ob(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&k8.has(i.position)||za(l)&&!d&&U2(e,l))?r=r.filter(y=>y!==l):i=f,l=vo(l)}return t.set(e,r),r}function z8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?kp(t)?[]:N8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=rC(t,y,i);return h.top=Ms(g.top,h.top),h.right=tl(g.right,h.right),h.bottom=tl(g.bottom,h.bottom),h.left=Ms(g.left,h.left),h},rC(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function L8(e){const{width:t,height:n}=L2(e);return{width:t,height:n}}function B8(e,t,n){const r=xn(t),i=Lr(t),c=n==="fixed",l=Oa(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=kr(0);function h(){d.x=Bp(i)}if(r||!r&&!c)if((Pi(t)!=="body"||za(i))&&(f=Np(t)),r){const b=Oa(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?$2(i,f):kr(0),g=l.left+f.scrollLeft-d.x-y.x,v=l.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:l.width,height:l.height}}function f0(e){return zs(e).position==="static"}function oC(e,t){if(!xn(e)||zs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lr(e)===n&&(n=n.ownerDocument.body),n}function j2(e,t){const n=mn(e);if(kp(e))return n;if(!xn(e)){let i=vo(e);for(;i&&!mo(i);){if(_t(i)&&!f0(i))return i;i=vo(i)}return n}let r=oC(e,t);for(;r&&V$(r)&&f0(r);)r=oC(r,t);return r&&mo(r)&&f0(r)&&!ob(r)?n:r||Q$(e)||n}const $8=async function(e){const t=this.getOffsetParent||j2,n=this.getDimensions,r=await n(e.floating);return{reference:B8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function U8(e){return zs(e).direction==="rtl"}const j8={convertOffsetParentRelativeRectToViewportRelativeRect:I8,getDocumentElement:Lr,getClippingRect:z8,getOffsetParent:j2,getElementRects:$8,getClientRects:O8,getDimensions:L8,getScale:Gc,isElement:_t,isRTL:U8};function H2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function H8(e,t){let n=null,r;const i=Lr(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||t(),!v||!b)return;const _=hh(g),x=hh(i.clientWidth-(y+v)),R=hh(i.clientHeight-(g+b)),C=hh(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:Ms(0,tl(1,d))||1};let D=!0;function N(j){const B=j[0].intersectionRatio;if(B!==d){if(!D)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!H2(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function iC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=mb(e),y=i||c?[...h?Ti(h):[],...Ti(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?H8(h,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,x=d?Oa(e):null;d&&R();function R(){const C=Oa(e);x&&!H2(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const F8=E8,V8=x8,q8=S8,G8=C8,K8=_8,Z8=R8,Q8=(e,t,n)=>{const r=new Map,i={platform:j8,...n},c={...i.platform,_c:r};return b8(e,t,{...i,platform:c})};var Y8=typeof document<"u",X8=function(){},Nh=Y8?I.useLayoutEffect:X8;function ap(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,i;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(!ap(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!ap(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function F2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aC(e,t){const n=F2(e);return Math.round(t*n)/n}function d0(e){const t=I.useRef(e);return Nh(()=>{t.current=e}),t}function W8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=I.useState(r);ap(v,r)||b(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(H=>{H!==j.current&&(j.current=H,x(H))},[]),O=I.useCallback(H=>{H!==B.current&&(B.current=H,C(H))},[]),D=c||_,N=l||R,j=I.useRef(null),B=I.useRef(null),k=I.useRef(y),Z=d!=null,se=d0(d),le=d0(i),K=d0(h),Q=I.useCallback(()=>{if(!j.current||!B.current)return;const H={placement:t,strategy:n,middleware:v};le.current&&(H.platform=le.current),Q8(j.current,B.current,H).then(ve=>{const Te={...ve,isPositioned:K.current!==!1};ye.current&&!ap(k.current,Te)&&(k.current=Te,ki.flushSync(()=>{g(Te)}))})},[v,t,n,le,K]);Nh(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(H=>({...H,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Nh(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Nh(()=>{if(D&&(j.current=D),N&&(B.current=N),D&&N){if(se.current)return se.current(D,N,Q);Q()}},[D,N,Q,se,Z]);const fe=I.useMemo(()=>({reference:j,floating:B,setReference:A,setFloating:O}),[A,O]),q=I.useMemo(()=>({reference:D,floating:N}),[D,N]),W=I.useMemo(()=>{const H={position:n,left:0,top:0};if(!q.floating)return H;const ve=aC(q.floating,y.x),Te=aC(q.floating,y.y);return f?{...H,transform:"translate("+ve+"px, "+Te+"px)",...F2(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:Te}},[n,f,q.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Q,refs:fe,elements:q,floatingStyles:W}),[y,Q,fe,q,W])}const J8=(e,t)=>({...F8(e),options:[e,t]}),ej=(e,t)=>({...V8(e),options:[e,t]}),tj=(e,t)=>({...Z8(e),options:[e,t]}),nj=(e,t)=>({...q8(e),options:[e,t]}),sj=(e,t)=>({...G8(e),options:[e,t]}),rj=(e,t)=>({...K8(e),options:[e,t]}),oj={intentional:"onClick",sloppy:"onPointerDown"};function ij(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function V2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=xf(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:j,outsidePress:B}=ij(R),k=I.useRef(null),Z=Oi(),se=Oi(),le=Ze(()=>{se.clear(),d.current.insideReactTree=!1}),K=I.useRef(!1),Q=I.useRef(""),ye=Ze(oe=>{Q.current=oe.pointerType}),fe=Ze(()=>{const oe=Q.current,Fe=oe==="pen"||!oe?"mouse":oe,Ie=typeof v=="function"?v():v;return typeof Ie=="string"?Ie:Ie[Fe]}),q=Ze(oe=>{if(!r||!h||!y||oe.key!=="Escape"||K.current)return;const Fe=d.current.floatingContext?.nodeId,Ie=A?Ra(A.nodesRef.current,Fe):[];if(!j&&Ie.length>0){let Ne=!0;if(Ie.forEach(qe=>{qe.context?.open&&!qe.context.dataRef.current.__escapeKeyBubbles&&(Ne=!1)}),!Ne)return}const Pt=l5(oe)?oe.nativeEvent:oe,_e=qt(db,Pt);n.setOpen(!1,_e),!j&&!_e.isPropagationAllowed&&oe.stopPropagation()}),W=Ze(oe=>{const Fe=fe();return Fe==="intentional"&&oe.type!=="click"||Fe==="sloppy"&&oe.type==="click"}),H=Ze(()=>{d.current.insideReactTree=!0,se.start(0,le)}),ve=Ze((oe,Fe=!1)=>{if(W(oe)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(oe))return;const Ie=os(oe),Pt=`[${sl("inert")}]`,_e=En(n.select("floatingElement")).querySelectorAll(Pt),Ne=n.context.triggerElements;if(Ie&&(Ne.hasElement(Ie)||Ne.hasMatchingElement(Le=>bt(Le,Ie))))return;let qe=_t(Ie)?Ie:null;for(;qe&&!mo(qe);){const Le=vo(qe);if(mo(Le)||!_t(Le))break;qe=Le}if(_e.length&&_t(Ie)&&!i5(Ie)&&!bt(Ie,n.select("floatingElement"))&&Array.from(_e).every(Le=>!bt(qe,Le)))return;if(xn(Ie)&&!("touches"in oe)){const Le=mo(Ie),rn=zs(Ie),it=/auto|scroll/,_s=Le||it.test(rn.overflowX),gt=Le||it.test(rn.overflowY),$t=_s&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,Ut=gt&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,on=rn.direction==="rtl",ws=Ut&&(on?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),$s=$t&&oe.offsetY>Ie.clientHeight;if(ws||$s)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&Ra(A.nodesRef.current,Qe).some(Le=>yr(oe,Le.context?.elements.floating));if(yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||ut)return;const Be=A?Ra(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(rn=>{rn.context?.open&&!rn.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,qt(x2,oe)),le()}),Te=Ze(oe=>{fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!h||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||ve(oe)}),P=Ze(oe=>{if(fe()!=="sloppy"||!n.select("open")||!h||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),ne=Ze(oe=>{const Fe=os(oe);function Ie(){P(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),ie=Ze(oe=>{const Fe=N.current;if(N.current=!1,Z.clear(),oe.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ie=os(oe);function Pt(){oe.type==="pointerdown"?Te(oe):ve(oe,Fe),Ie?.removeEventListener(oe.type,Pt)}Ie?.addEventListener(oe.type,Pt)}),de=Ze(oe=>{if(fe()!=="sloppy"||!k.current||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];if(!Fe)return;const Ie=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),_e=Math.sqrt(Ie*Ie+Pt*Pt);_e>5&&(k.current.dismissOnTouchEnd=!0),_e>10&&(ve(oe),Z.clear(),k.current=null)}),Ce=Ze(oe=>{const Fe=os(oe);function Ie(){de(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),Se=Ze(oe=>{fe()!=="sloppy"||!k.current||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&ve(oe),Z.clear(),k.current=null)}),be=Ze(oe=>{const Fe=os(oe);function Ie(){Se(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=j,d.current.__outsidePressBubbles=B;const oe=new Ii;function Fe(qe){n.setOpen(!1,qt(fb,qe))}function Ie(){oe.clear(),K.current=!0}function Pt(){oe.start(Pp()?5:0,()=>{K.current=!1})}const _e=En(i);_e.addEventListener("pointerdown",ye,!0),y&&(_e.addEventListener("keydown",q),_e.addEventListener("compositionstart",Ie),_e.addEventListener("compositionend",Pt)),D&&(_e.addEventListener("click",ie,!0),_e.addEventListener("pointerdown",ie,!0),_e.addEventListener("touchstart",ne,!0),_e.addEventListener("touchmove",Ce,!0),_e.addEventListener("touchend",be,!0),_e.addEventListener("mousedown",ie,!0));let Ne=[];return x&&(_t(l)&&(Ne=Ti(l)),_t(i)&&(Ne=Ne.concat(Ti(i))),!_t(c)&&c&&c.contextElement&&(Ne=Ne.concat(Ti(c.contextElement)))),Ne=Ne.filter(qe=>qe!==_e.defaultView?.visualViewport),Ne.forEach(qe=>{qe.addEventListener("scroll",Fe,{passive:!0})}),()=>{_e.removeEventListener("pointerdown",ye,!0),y&&(_e.removeEventListener("keydown",q),_e.removeEventListener("compositionstart",Ie),_e.removeEventListener("compositionend",Pt)),D&&(_e.removeEventListener("click",ie,!0),_e.removeEventListener("pointerdown",ie,!0),_e.removeEventListener("touchstart",ne,!0),_e.removeEventListener("touchmove",Ce,!0),_e.removeEventListener("touchend",be,!0),_e.removeEventListener("mousedown",ie,!0)),Ne.forEach(qe=>{qe.removeEventListener("scroll",Fe)}),oe.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,j,B,q,ve,ie,Te,ne,Ce,be,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:q,...b&&{[oj[_]]:oe=>{n.setOpen(!1,qt(op,oe.nativeEvent))},..._!=="intentional"&&{onClick(oe){n.setOpen(!1,qt(op,oe.nativeEvent))}}}}),[q,n,b,_]),He=Ze(oe=>{const Fe=os(oe.nativeEvent);!bt(n.select("floatingElement"),Fe)||oe.button!==0||(N.current=!0)}),ht=Ze(oe=>{!r||!h||oe.button!==0||(N.current=!0)}),Ft=I.useMemo(()=>({onKeyDown:q,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:H,onMouseDownCapture(oe){H(),ht(oe)},onPointerDownCapture(oe){H(),ht(oe)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[q,He,H,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ft,trigger:Ye}:{},[h,Ye,Ft])}var cp=Symbol("NOT_FOUND");function aj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function cj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function lj(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var cC=e=>Array.isArray(e)?e:[e];function uj(e){const t=Array.isArray(e[0])?e[0]:e;return lj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function fj(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return cp}function i(f,d){r(f)===cp&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var pj=(e,t)=>e===t;function mj(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(b.value,y));v&&(y=v.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var yj=class{constructor(e){this.value=e}deref(){return this.value}},vj=typeof WeakRef<"u"?WeakRef:yj,bj=0,lC=1;function vh(){return{s:bj,v:void 0,o:null,p:null}}function q2(e,t={}){let n=vh();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,v=d;g{n=vh(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function G2(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),aj(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:b=q2,argsMemoizeOptions:_=[]}=y,x=cC(v),R=cC(_),C=uj(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=b(function(){l++;const N=fj(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var Sj=G2(q2),_j=Object.assign((e,t=Sj)=>{cj(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>_j});G2({memoize:gj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(wo(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var wj=RI();const Ej=sb(19),xj=Ej?Cj:Tj;function Rj(e,t,n,r,i){return xj(e,t,n,r,i)}function Cj(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return wj.useSyncExternalStore(e.subscribe,c,c)}function Tj(e,t,n,r,i){return CI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class Ku{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Ku.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Ku.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Ku.prototype.setState.call(this,t)}}class gb extends Ku{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return Rj(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??LI);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const Aj={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class yb extends gb{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:t8(),nested:n,noEmit:r,triggerElements:c},Aj)}setOpen=(t,n)=>{if((!t||!this.state.open||d5(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Ij(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function Oj(e,t=!1,n=!0){const r=M2();return Ze((i,c=null)=>{r.cancel();function l(){ki.flushSync(i)}const f=lo(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=af.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(g)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function vb(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=Oj(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function Mj(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Dj(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=Mj(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function K2(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function Z2(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=Ij(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return vb({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class $p{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function kj(){return new yb({open:!1,floatingElement:null,referenceElement:null,triggerElements:new $p,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Q2(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:kj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ds,inactiveTriggerProps:Ds,popupProps:Ds}}const Y2={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function Pj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=_f(),c=Lp()!=null,l=zr(()=>new yb({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new $p,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function Nj(e={}){const{nodeId:t,externalTree:n}=e,r=Pj(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=xf(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=W8({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback(B=>{const k=_t(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;f(k),y.refs.setReference(k)},[y.refs]),[v,b]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",v),i.useSyncedValue("domReferenceElement",_t(v)?v:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback(B=>{(_t(B)||B===null)&&(d.current=B,b(B)),(_t(y.refs.reference.current)||y.refs.reference.current===null||B!==null&&!_t(B))&&y.refs.setReference(B)},[y.refs,b]),C=I.useCallback(B=>{x(B),y.refs.setFloating(B)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),j=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=j;const B=h?.nodesRef.current.find(k=>k.id===t);B&&(B.context=j)}),I.useMemo(()=>({...y,context:j,refs:A,elements:O,rootStore:i}),[y,A,O,j,i])}function X2(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=_f(),l=Lp()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=zr(()=>new yb({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const v={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const h0=n5&&a2;function zj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=Oi(),g=I.useRef(!0);I.useEffect(()=>{const b=n.select("domReferenceElement");if(!c)return;const _=mn(b);function x(){const A=n.select("domReferenceElement");!n.select("open")&&xn(A)&&A===Si(En(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),h0&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),h0&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function b(_){if(_.reason===op||_.reason===db){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",b),()=>{r.off("openchange",b)}},[r,c,n]);const v=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(b){const _=b.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=os(b.nativeEvent);if(l&&_t(x)){if(h0&&!b.relatedTarget){if(!g.current&&!d2(x))return}else if(!a5(x))return}const R=b.relatedTarget&&n.context.triggerElements.hasElement(b.relatedTarget),{nativeEvent:C,currentTarget:A}=b,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,qt(kh,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,qt(kh,C,A))})},onBlur(b){d.current=!1,h.current=null;const _=b.relatedTarget,x=b.nativeEvent,R=_t(_)&&_.hasAttribute(sl("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=Si(C?C.ownerDocument:document);if(!_&&A===C||bt(i.current.floatingContext?.refs.floating.current,A)||bt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>bt(N,O)))return}n.setOpen(!1,qt(kh,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:v,trigger:v}:{},[c,v])}const Rv=sl("safe-polygon"),Lj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${f2}`;function Bj(e){return e?!!e.closest(Lj):!1}function W2(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=Oi(),h=Oi(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const $j=new Set(["click","mousedown"]);function Uj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:b,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=W2(n),A=xf(h),O=Lp(),D=Ze(()=>g.current?!0:l.current.openEvent?$j.has(l.current.openEvent.type):!1),N=Ze(()=>{const se=l.current.openEvent?.type;return se?.includes("mouse")&&se!=="mousedown"}),j=I.useCallback((se,le=!0)=>{const K=jj(d,y.current);K&&!v.current?R.start(K,()=>n.setOpen(!1,qt(Sr,se))):le&&(R.clear(),n.setOpen(!1,qt(Sr,se)))},[d,v,n,y,R]),B=Ze(()=>{_.current(),v.current=void 0}),k=Ze(()=>{if(b.current){const se=En(i).body;se.style.pointerEvents="",se.removeAttribute(Rv),b.current=!1}}),Z=Ze(se=>{const le=os(se);if(!Bj(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,B(),k())},[r,y,x,g,B,k]),I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){b.current=!0;const se=En(i).body;se.setAttribute(Rv,"");const le=c,K=i,Q=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Q&&(Q.style.pointerEvents=""),se.style.pointerEvents="none",le.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{se.style.pointerEvents="",le.style.pointerEvents="",K.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,b]),I.useEffect(()=>{if(!f)return;function se(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),B(),D()||j(ye))}function le(ye){R.clear(),k(),v.current?.(ye),B()}function K(ye){D()||j(ye,!1)}const Q=i;return Q&&(Q.addEventListener("mouseleave",se),Q.addEventListener("mouseenter",le),Q.addEventListener("mouseleave",K),Q.addEventListener("pointerdown",Z,!0)),()=>{Q&&(Q.removeEventListener("mouseleave",se),Q.removeEventListener("mouseenter",le),Q.removeEventListener("mouseleave",K),Q.removeEventListener("pointerdown",Z,!0))}})}function jj(e,t){return t&&!of(t)?0:typeof e=="function"?e():e}function p0(e){return typeof e=="function"?e():e}const Hj={current:null};function Fj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=Hj,externalTree:v,isActiveTrigger:b=!0}=t,_=xf(v),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:j,restTimeout:B,handleCloseOptionsRef:k}=W2(n),Z=Dr(f),se=Dr(l),le=Dr(h);b&&(k.current=Z.current?.__options);const K=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Q=I.useCallback((W,H=!0)=>{const ve=Ph(se.current,"close",x.current);ve&&!C.current?j.start(ve,()=>n.setOpen(!1,qt(Sr,W))):H&&(j.clear(),n.setOpen(!1,qt(Sr,W)))},[se,C,n,x,j]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const W=En(n.select("domReferenceElement")).body;W.style.pointerEvents="",W.removeAttribute(Rv),O.current=!1}});I.useEffect(()=>{if(!c)return;function W(H){H.open||(j.clear(),B.clear(),A.current=!0,N.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[c,i,j,B,A,N]);const q=Ze(W=>{if(K()||!r.current.floatingContext)return;const H=n.context.triggerElements;if(W.relatedTarget&&H.hasElement(W.relatedTarget))return;const ve=g.current;Z.current?.({...r.current.floatingContext,tree:_,x:W.clientX,y:W.clientY,onClose(){fe(),ye(),!K()&&ve===n.select("domReferenceElement")&&Q(W)}})(W)});return I.useEffect(()=>{if(!c)return;const W=g.current??(b?n.select("domReferenceElement"):null);if(!_t(W))return;function H(P){if(j.clear(),A.current=!1,d&&!of(x.current)||p0(le.current)>0&&!Ph(se.current,"open"))return;const ne=Ph(se.current,"open",x.current),ie=n.select("domReferenceElement"),de=n.context.triggerElements,Ce=(de.hasElement(P.target)||de.hasMatchingElement(He=>bt(He,P.target)))&&(!ie||!bt(ie,P.target)),Se=P.currentTarget??null,be=n.select("open"),Ye=!be||Ce;Ce&&be?n.setOpen(!0,qt(Sr,P,Se)):ne?j.start(ne,()=>{Ye&&n.setOpen(!0,qt(Sr,P,Se))}):Ye&&n.setOpen(!0,qt(Sr,P,Se))}function ve(P){if(K()){fe();return}D.current();const ne=n.select("domReferenceElement"),ie=En(ne);B.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(Z.current&&r.current.floatingContext){n.select("open")||j.clear();const Se=g.current;C.current=Z.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!K()&&Se===n.select("domReferenceElement")&&Q(P,!0)}});const be=C.current;be(P),ie.addEventListener("mousemove",be),D.current=()=>{ie.removeEventListener("mousemove",be)};return}(x.current!=="touch"||!bt(n.select("floatingElement"),P.relatedTarget))&&Q(P)}function Te(P){q(P)}return n.select("open")&&W.addEventListener("mouseleave",Te),y&&W.addEventListener("mousemove",H,{once:!0}),W.addEventListener("mouseenter",H),W.addEventListener("mouseleave",ve),()=>{W.removeEventListener("mouseleave",Te),y&&W.removeEventListener("mousemove",H),W.removeEventListener("mouseenter",H),W.removeEventListener("mouseleave",ve)}},[ye,fe,A,r,se,Q,n,c,Z,q,b,K,d,y,x,le,B,N,j,g,_,D,C]),I.useMemo(()=>{function W(H){x.current=H.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(H){const{nativeEvent:ve}=H,Te=H.currentTarget,P=n.select("domReferenceElement"),ne=n.context.triggerElements,ie=n.select("open"),de=(ne.hasElement(H.target)||ne.hasMatchingElement(Se=>bt(Se,H.target)))&&(!P||!bt(P,H.target));if(d&&!of(x.current)||ie&&!de||p0(le.current)===0||!de&&N.current&&H.movementX**2+H.movementY**2<2)return;B.clear();function Ce(){if(N.current=!1,K())return;const Se=n.select("open");!A.current&&(!Se||de)&&n.setOpen(!0,qt(Sr,ve,Te))}x.current==="touch"?ki.flushSync(()=>{Ce()}):de&&ie?Ce():(N.current=!0,B.start(p0(le.current),Ce))}}},[A,K,d,n,x,le,B,N])}function J2(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>bh(h,e,"reference"),t),l=I.useCallback(h=>bh(h,e,"floating"),n),f=I.useCallback(h=>bh(h,e,"item"),r),d=I.useCallback(h=>bh(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function bh(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[vv]="");for(const l in e)i&&e&&(l===l2||l===u2)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const Vj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=_f(),y=c?.id||h,g=I.useMemo(()=>bv(l)?.id||i,[l,i]),v=Vj.get(d)??d,_=Lp()!=null,x=I.useMemo(()=>v==="tooltip"||d==="label"?Ds:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,_,d]),R=I.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...v==="menu"&&{id:y}},[v,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?O:{...O,...v==="menu"&&{"aria-labelledby":y}}},[v,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function fC(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function Gj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Kj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ii;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),_=b-d;if(l===null||f===null||_===0)return l=g,f=v,d=b,null;const x=g-l,R=v-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=v,d=b,A}const y=({x:g,y:v,placement:b,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||b==null||g==null||v==null)return;const{clientX:N,clientY:j}=O,B=[N,j],k=os(O),Z=O.type==="mouseleave",se=bt(_.floating,k),le=bt(_.domReference,k),K=_.domReference.getBoundingClientRect(),Q=_.floating.getBoundingClientRect(),ye=b.split("-")[0],fe=g>Q.right-Q.width/2,q=v>Q.bottom-Q.height/2,W=Gj(B,K),H=Q.width>K.width,ve=Q.height>K.height,Te=(H?K:Q).left,P=(H?K:Q).right,ne=(ve?K:Q).top,ie=(ve?K:Q).bottom;if(se&&(c=!0,!Z))return;if(le&&(c=!1),le&&!Z){c=!0;return}if(Z&&_t(O.relatedTarget)&&bt(_.floating,O.relatedTarget)||C&&Ra(C.nodesRef.current,R).some(({context:Se})=>Se?.open))return;if(ye==="top"&&v>=K.bottom-1||ye==="bottom"&&v<=K.top+1||ye==="left"&&g>=K.right-1||ye==="right"&&g<=K.left+1)return D();let de=[];switch(ye){case"top":de=[[Te,K.top+1],[Te,Q.bottom-1],[P,Q.bottom-1],[P,K.top+1]];break;case"bottom":de=[[Te,Q.top+1],[Te,K.bottom-1],[P,K.bottom-1],[P,Q.top+1]];break;case"left":de=[[Q.right-1,ie],[Q.right-1,ne],[K.left+1,ne],[K.left+1,ie]];break;case"right":de=[[K.right-1,ie],[K.right-1,ne],[Q.left+1,ne],[Q.left+1,ie]];break}function Ce([Se,be]){switch(ye){case"top":{const Ye=[H?Se+t/2:fe?Se+t*4:Se-t*4,be+t+1],He=[H?Se-t/2:fe?Se+t*4:Se-t*4,be+t+1],ht=[[Q.left,fe||H?Q.bottom-t:Q.top],[Q.right,fe?H?Q.bottom-t:Q.top:Q.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[H?Se+t/2:fe?Se+t*4:Se-t*4,be-t],He=[H?Se-t/2:fe?Se+t*4:Se-t*4,be-t],ht=[[Q.left,fe||H?Q.top+t:Q.bottom],[Q.right,fe?H?Q.top+t:Q.bottom:Q.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[Se+t+1,ve?be+t/2:q?be+t*4:be-t*4],He=[Se+t+1,ve?be-t/2:q?be+t*4:be-t*4];return[...[[q||ve?Q.right-t:Q.left,Q.top],[q?ve?Q.right-t:Q.left:Q.right-t,Q.bottom]],Ye,He]}case"right":{const Ye=[Se-t,ve?be+t/2:q?be+t*4:be-t*4],He=[Se-t,ve?be-t/2:q?be+t*4:be-t*4],ht=[[q||ve?Q.left+t:Q.right,Q.top],[q?ve?Q.left+t:Q.right:Q.left+t,Q.bottom]];return[Ye,He,...ht]}default:return[]}}if(!fC([N,j],de)){if(c&&!W)return D();if(!Z&&r){const Se=h(O.clientX,O.clientY);if(Se!==null&&Se<.1)return D()}fC([N,j],Ce([g,v]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let Zj=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Qj=(function(e){return e[e.open=_a.open]="open",e[e.closed=_a.closed]="closed",e[e.startingStyle=_a.startingStyle]="startingStyle",e[e.endingStyle=_a.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const eO=I.createContext(void 0);function Yj(){const e=I.useContext(eO);if(e===void 0)throw new Error(wo(26));return e}const tO="ArrowUp",nO="ArrowDown",sO="ArrowLeft",rO="ArrowRight",oO="Home",iO="End",Xj=new Set([sO,rO]),Wj=new Set([tO,nO]),Jj=new Set([...Xj,...Wj]);[...Jj];const e9=new Set([tO,nO,sO,rO,oO,iO]),t9={...Ef,...hb,nestedDialogOpen(e){return e?{[Qj.nestedDialogOpen]:""}:null}},n9=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=Ba(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),b=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");Yj(),vb({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function j(le){return le==="touch"?d.context.popupRef.current:!0}const B=c===void 0?j:c,k=R>0,Z=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),se=cr("div",t,{state:Z,props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){e9.has(le.key)&&le.stopPropagation()},style:{[Zj.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:t9});return $.jsx(g8,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:B,returnFocus:i,modal:b!==!1,restoreFocus:"popup",children:se})});function s9(e){return sb(19)?e:e?"true":void 0}const r9=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( +`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,rn=e.unstable_requestPaint,it=e.unstable_now,_s=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,$t=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,on=e.unstable_LowPriority,ws=e.unstable_IdlePriority,$s=e.log,Ff=e.unstable_setDisableYieldValue,jo=null,Fn=null;function fr(s){if(typeof $s=="function"&&Ff(s),Fn&&typeof Fn.setStrictMode=="function")try{Fn.setStrictMode(jo,s)}catch{}}var Vn=Math.clz32?Math.clz32:Us,Zt=Math.log,qn=Math.LN2;function Us(s){return s>>>=0,s===0?32:31-(Zt(s)/qn|0)|0}var Dn=256,dr=262144,hr=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Ho(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=js(u):(w&=T,w!==0?p=js(w):a||(a=T&~s,a!==0&&(p=js(a))))):(T=u&~m,T!==0?p=js(T):w!==0?p=js(w):a||(a=u&~s,a!==0&&(p=js(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Fo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Rm(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vf(){var s=hr;return hr<<=1,(hr&62914560)===0&&(hr=4194304),s}function Nl(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Xi(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function zl(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,z=s.expirationTimes,X=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var iz=/[\n"\\]/g;function Fs(s){return s.replace(iz,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Im(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Hs(o)):s.value!==""+Hs(o)&&(s.value=""+Hs(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?Om(s,w,Hs(o)):a!=null?Om(s,w,Hs(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Hs(T):s.removeAttribute("name")}function ow(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Am(s);return}a=a!=null?""+Hs(a):"",o=o!=null?""+Hs(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Am(s)}function Om(s,o,a){o==="number"&&Xf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function tc(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nm=!1;if(qr)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){Nm=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{Nm=!1}var qo=null,zm=null,Jf=null;function dw(){if(Jf)return Jf;var s,o=zm,a=o.length,u,p="value"in qo?qo.value:qo.textContent,m=p.length;for(s=0;s=ql),vw=" ",bw=!1;function Sw(s,o){switch(s){case"keyup":return Pz.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _w(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var oc=!1;function zz(s,o){switch(s){case"compositionend":return _w(o);case"keypress":return o.which!==32?null:(bw=!0,vw);case"textInput":return s=o.data,s===vw&&bw?null:s;default:return null}}function Lz(s,o){if(oc)return s==="compositionend"||!jm&&Sw(s,o)?(s=dw(),Jf=zm=qo=null,oc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Iw(a)}}function Mw(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?Mw(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function Dw(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Xf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=Xf(s.document)}return o}function Vm(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var qz=qr&&"documentMode"in document&&11>=document.documentMode,ic=null,qm=null,Ql=null,Gm=!1;function kw(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gm||ic==null||ic!==Xf(u)||(u=ic,"selectionStart"in u&&Vm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ql&&Zl(Ql,u)||(Ql=u,u=Gd(qm,"onSelect"),0>=w,p-=w,Er=1<<32-Vn(o)+p|a<Je?(ct=Pe,Pe=null):ct=Pe.sibling;var vt=J(G,Pe,Y[Je],he);if(vt===null){Pe===null&&(Pe=ct);break}s&&Pe&&vt.alternate===null&&o(G,Pe),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt,Pe=ct}if(Je===Y.length)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;JeJe?(ct=Pe,Pe=null):ct=Pe.sibling;var hi=J(G,Pe,vt.value,he);if(hi===null){Pe===null&&(Pe=ct);break}s&&Pe&&hi.alternate===null&&o(G,Pe),V=m(hi,V,Je),yt===null?ze=hi:yt.sibling=hi,yt=hi,Pe=ct}if(vt.done)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;!vt.done;Je++,vt=Y.next())vt=pe(G,vt.value,he),vt!==null&&(V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return ft&&Kr(G,Je),ze}for(Pe=u(Pe);!vt.done;Je++,vt=Y.next())vt=re(Pe,G,Je,vt.value,he),vt!==null&&(s&&vt.alternate!==null&&Pe.delete(vt.key===null?Je:vt.key),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return s&&Pe.forEach(function(fL){return o(G,fL)}),ft&&Kr(G,Je),ze}function It(G,V,Y,he){if(typeof Y=="object"&&Y!==null&&Y.type===x&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:e:{for(var ze=Y.key;V!==null;){if(V.key===ze){if(ze=Y.type,ze===x){if(V.tag===7){a(G,V.sibling),he=p(V,Y.props.children),he.return=G,G=he;break e}}else if(V.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&ca(ze)===V.type){a(G,V.sibling),he=p(V,Y.props),tu(he,Y),he.return=G,G=he;break e}a(G,V);break}else o(G,V);V=V.sibling}Y.type===x?(he=sa(Y.props.children,G.mode,he,Y.key),he.return=G,G=he):(he=ld(Y.type,Y.key,Y.props,null,G.mode,he),tu(he,Y),he.return=G,G=he)}return w(G);case _:e:{for(ze=Y.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===Y.containerInfo&&V.stateNode.implementation===Y.implementation){a(G,V.sibling),he=p(V,Y.children||[]),he.return=G,G=he;break e}else{a(G,V);break}else o(G,V);V=V.sibling}he=Jm(Y,G.mode,he),he.return=G,G=he}return w(G);case k:return Y=ca(Y),It(G,V,Y,he)}if(fe(Y))return Oe(G,V,Y,he);if(K(Y)){if(ze=K(Y),typeof ze!="function")throw Error(r(150));return Y=ze.call(Y),Ue(G,V,Y,he)}if(typeof Y.then=="function")return It(G,V,gd(Y),he);if(Y.$$typeof===O)return It(G,V,dd(G,Y),he);yd(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,V!==null&&V.tag===6?(a(G,V.sibling),he=p(V,Y),he.return=G,G=he):(a(G,V),he=Wm(Y,G.mode,he),he.return=G,G=he),w(G)):a(G,V)}return function(G,V,Y,he){try{eu=0;var ze=It(G,V,Y,he);return yc=null,ze}catch(Pe){if(Pe===gc||Pe===pd)throw Pe;var yt=xs(29,Pe,null,G.mode);return yt.lanes=he,yt.return=G,yt}}}var ua=nE(!0),sE=nE(!1),Yo=!1;function fg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dg(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Wo(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=cd(s),Uw(s,null,a),o}return ad(s,u,o,a),cd(s)}function nu(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}function hg(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var pg=!1;function su(){if(pg){var s=mc;if(s!==null)throw s}}function ru(s,o,a,u){pg=!1;var p=s.updateQueue;Yo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var z=T,X=z.next;z.next=null,w===null?m=X:w.next=X,w=z;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==w&&(T===null?ae.firstBaseUpdate=X:T.next=X,ae.lastBaseUpdate=z))}if(m!==null){var pe=p.baseState;w=0,ae=X=z=null,T=m;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(at&J)===J:(u&J)===J){J!==0&&J===pc&&(pg=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Oe=s,Ue=T;J=o;var It=a;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){pe=Oe.call(It,pe,J);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,J=typeof Oe=="function"?Oe.call(It,pe,J):Oe,J==null)break e;pe=g({},pe,J);break e;case 2:Yo=!0}}J=T.callback,J!==null&&(s.flags|=64,re&&(s.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(X=ae=re,z=pe):ae=ae.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);ae===null&&(z=pe),p.baseState=z,p.firstBaseUpdate=X,p.lastBaseUpdate=ae,m===null&&(p.shared.lanes=0),si|=w,s.lanes=w,s.memoizedState=pe}}function rE(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function oE(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=q.T,T={};q.T=T,kg(s,!1,o,a);try{var z=p(),X=q.S;if(X!==null&&X(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ae=e4(z,u);au(s,o,ae,Is(s))}else au(s,o,u,Is(s))}catch(pe){au(s,o,{then:function(){},status:"rejected",reason:pe},Is())}finally{W.p=m,w!==null&&T.types!==null&&(w.types=T.types),q.T=w}}function i4(){}function Mg(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=LE(s).queue;zE(s,p,o,F,a===null?i4:function(){return BE(s),a(u)})}function LE(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:F},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function BE(s){var o=LE(s);o.next===null&&(o=s.alternate.memoizedState),au(s,o.next.queue,{},Is())}function Dg(){return Nn(xu)}function $E(){return Jt().memoizedState}function UE(){return Jt().memoizedState}function a4(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=Is();s=Xo(a);var u=Wo(o,s,a);u!==null&&(ps(u,o,a),nu(u,o,a)),o={cache:ag()},s.payload=o;return}o=o.return}}function c4(s,o,a){var u=Is();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Td(s)?HE(o,a):(a=Ym(s,o,a,u),a!==null&&(ps(a,s,u),FE(a,o,u)))}function jE(s,o,a){var u=Is();au(s,o,a,u)}function au(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Td(s))HE(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,Es(T,w))return ad(s,o,p,0),Dt===null&&id(),!1}catch{}if(a=Ym(s,o,p,u),a!==null)return ps(a,s,u),FE(a,o,u),!0}return!1}function kg(s,o,a,u){if(u={lane:2,revertLane:fy(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Td(s)){if(o)throw Error(r(479))}else o=Ym(s,a,u,2),o!==null&&ps(o,s,2)}function Td(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function HE(s,o){bc=Sd=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function FE(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}var cu={readContext:Nn,use:Ed,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};cu.useEffectEvent=Qt;var VE={readContext:Nn,use:Ed,useCallback:function(s,o){return es().memoizedState=[s,o===void 0?null:o],s},useContext:Nn,useEffect:TE,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,Rd(4194308,4,ME.bind(null,o,s),a)},useLayoutEffect:function(s,o){return Rd(4194308,4,s,o)},useInsertionEffect:function(s,o){Rd(4,2,s,o)},useMemo:function(s,o){var a=es();o=o===void 0?null:o;var u=s();if(fa){fr(!0);try{s()}finally{fr(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=es();if(a!==void 0){var p=a(o);if(fa){fr(!0);try{a(o)}finally{fr(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=c4.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=es();return s={current:s},o.memoizedState=s},useState:function(s){s=Cg(s);var o=s.queue,a=jE.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:Ig,useDeferredValue:function(s,o){var a=es();return Og(a,s,o)},useTransition:function(){var s=Cg(!1);return s=zE.bind(null,Xe,s.queue,!0,!1),es().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=es();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||fE(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,TE(hE.bind(null,u,m,s),[s]),u.flags|=2048,_c(9,{destroy:void 0},dE.bind(null,u,m,a,o),null),a},useId:function(){var s=es(),o=Dt.identifierPrefix;if(ft){var a=xr,u=Er;a=(u&~(1<<32-Vn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=_d++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[kn]=o,m[cs]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Ln(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Jr(o)}}return Lt(o),Kg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&Jr(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=Se.current,dc(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Pn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[kn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||l1(s.nodeValue,a)),s||Zo(o,!0)}else s=Kd(s).createTextNode(u),s[kn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=dc(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[kn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=sg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Cs(o),o):(Cs(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=dc(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[kn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=sg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Cs(o),o):(Cs(o),null)}return Cs(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Dd(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&my(o.stateNode.containerInfo),Lt(o),null;case 10:return Qr(o.type),Lt(o),null;case 19:if(ne(Wt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)uu(u,!1);else{if(Yt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=bd(s),m!==null){for(o.flags|=128,uu(u,!1),s=m.updateQueue,o.updateQueue=s,Dd(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)jw(a,s),a=a.sibling;return ie(Wt,Wt.current&1|2),ft&&Kr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>Ld&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304)}else{if(!p)if(s=bd(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Dd(o,s),uu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>Ld&&a!==536870912&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Wt.current,ie(Wt,p?a&1|2:a&1),ft&&Kr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Cs(o),gg(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Dd(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&ne(aa),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),Qr(an),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function h4(s,o){switch(tg(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Qr(an),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ft(o),null;case 31:if(o.memoizedState!==null){if(Cs(o),o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Cs(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return ne(Wt),null;case 4:return He(),null;case 10:return Qr(o.type),null;case 22:case 23:return Cs(o),gg(),s!==null&&ne(aa),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Qr(an),null;case 25:return null;default:return null}}function px(s,o){switch(tg(o),o.tag){case 3:Qr(an),He();break;case 26:case 27:case 5:Ft(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Cs(o);break;case 13:Cs(o);break;case 19:ne(Wt);break;case 10:Qr(o.type);break;case 22:case 23:Cs(o),gg(),s!==null&&ne(aa);break;case 24:Qr(an)}}function fu(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function ti(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var z=a,X=T;try{X()}catch(ae){xt(p,z,ae)}}}u=u.next}while(u!==m)}}catch(ae){xt(o,o.return,ae)}}function mx(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{oE(o,a)}catch(u){xt(s,s.return,u)}}}function gx(s,o,a){a.props=da(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function du(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function Rr(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function yx(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function Zg(s,o,a){try{var u=s.stateNode;N4(u,s.type,a,o),u[cs]=o}catch(p){xt(s,s.return,p)}}function vx(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ci(s.type)||s.tag===4}function Qg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||vx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ci(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Yg(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=Vr));else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for(Yg(s,o,a),s=s.sibling;s!==null;)Yg(s,o,a),s=s.sibling}function kd(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(kd(s,o,a),s=s.sibling;s!==null;)kd(s,o,a),s=s.sibling}function bx(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Ln(o,u,a),o[kn]=s,o[cs]=a}catch(m){xt(s,s.return,m)}}var eo=!1,un=!1,Xg=!1,Sx=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function p4(s,o){if(s=s.containerInfo,vy=eh,s=Dw(s),Vm(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,z=-1,X=0,ae=0,pe=s,J=null;t:for(;;){for(var re;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(z=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(re=pe.firstChild)!==null;)J=pe,pe=re;for(;;){if(pe===s)break t;if(J===a&&++X===p&&(T=w),J===m&&++ae===u&&(z=w),(re=pe.nextSibling)!==null)break;pe=J,J=pe.parentNode}pe=re}a=T===-1||z===-1?null:{start:T,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(by={focusedElem:s,selectionRange:a},eh=!1,Cn=o;Cn!==null;)if(o=Cn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Cn=s;else for(;Cn!==null;){switch(o=Cn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Ln(m,u,a),m[kn]=s,Rn(m),u=m;break e;case"link":var w=C1("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var G=Ow(T,Ue),V=Ow(T,It);if(G&&V&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var Y=pe.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ue>It?(re.addRange(Y),re.extend(V.node,V.offset)):(Y.setEnd(V.node,V.offset),re.addRange(Y))}}}}for(pe=[],re=T;re=re.parentNode;)re.nodeType===1&&pe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,q.T=null,a=ry,ry=null;var m=oi,w=oo;if(Sn=0,Cc=oi=null,oo=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,Mx(m.current),Ax(m,m.current,w,a),St=T,vu(0,!1),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(jo,m)}catch{}return!0}finally{W.p=p,q.T=u,Qx(s,o)}}function Xx(s,o,a){o=qs(a,o),o=Lg(s.stateNode,o,2),s=Wo(s,o,2),s!==null&&(Xi(s,2),Cr(s))}function xt(s,o,a){if(s.tag===3)Xx(s,s,a);else for(;o!==null;){if(o.tag===3){Xx(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){s=qs(a,s),a=WE(2),u=Wo(o,a,2),u!==null&&(JE(a,u,o,s),Xi(u,2),Cr(u));break}}o=o.return}}function cy(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new y4;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(ey=!0,p.add(a),s=w4.bind(null,s,o,a),o.then(s,s))}function w4(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Yt===4||Yt===3&&(at&62914560)===at&&300>it()-zd?(St&2)===0&&Tc(s,0):ty|=a,Rc===at&&(Rc=0)),Cr(s)}function Wx(s,o){o===0&&(o=Vf()),s=na(s,o),s!==null&&(Xi(s,o),Cr(s))}function E4(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),Wx(s,a)}function x4(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),Wx(s,a)}function R4(s,o){return ut(s,o)}var Fd=null,Ic=null,ly=!1,Vd=!1,uy=!1,ai=0;function Cr(s){s!==Ic&&s.next===null&&(Ic===null?Fd=Ic=s:Ic=Ic.next=s),Vd=!0,ly||(ly=!0,T4())}function vu(s,o){if(!uy&&Vd){uy=!0;do for(var a=!1,u=Fd;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Vn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,n1(u,m))}else m=at,m=Ho(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Fo(u,m)||(a=!0,n1(u,m));u=u.next}while(a);uy=!1}}function C4(){Jx()}function Jx(){Vd=ly=!1;var s=0;ai!==0&&L4()&&(s=ai);for(var o=it(),a=null,u=Fd;u!==null;){var p=u.next,m=e1(u,o);m===0?(u.next=null,a===null?Fd=p:a.next=p,p===null&&(Ic=a)):(a=u,(s!==0||(m&3)!==0)&&(Vd=!0)),u=p}Sn!==0&&Sn!==5||vu(s),ai!==0&&(ai=0)}function e1(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ae=z.transferSize,pe=z.initiatorType;ae&&u1(pe)&&(z=z.responseEnd,w+=ae*(z"u"?null:document;function w1(s,o,a){var u=Oc;if(u&&typeof o=="string"&&o){var p=Fs(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),_1.has(p)||(_1.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Ln(o,"link",s),Rn(o),u.head.appendChild(o)))}}function G4(s){io.D(s),w1("dns-prefetch",s,null)}function K4(s,o){io.C(s,o),w1("preconnect",s,o)}function Z4(s,o,a){io.L(s,o,a);var u=Oc;if(u&&s&&o){var p='link[rel="preload"][as="'+Fs(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Fs(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Fs(a.imageSizes)+'"]')):p+='[href="'+Fs(s)+'"]';var m=p;switch(o){case"style":m=Mc(s);break;case"script":m=Dc(s)}Xs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Xs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(wu(m))||o==="script"&&u.querySelector(Eu(m))||(o=u.createElement("link"),Ln(o,"link",s),Rn(o),u.head.appendChild(o)))}}function Q4(s,o){io.m(s,o);var a=Oc;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fs(u)+'"][href="'+Fs(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Dc(s)}if(!Xs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Xs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Eu(m)))return}u=a.createElement("link"),Ln(u,"link",s),Rn(u),a.head.appendChild(u)}}}function Y4(s,o,a){io.S(s,o,a);var u=Oc;if(u&&s){var p=Ja(u).hoistableStyles,m=Mc(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(wu(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Xs.get(m))&&Cy(s,a);var z=w=u.createElement("link");Rn(z),Ln(z,"link",s),z._p=new Promise(function(X,ae){z.onload=X,z.onerror=ae}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function X4(s,o){io.X(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0},o),(o=Xs.get(p))&&Ty(s,o),m=a.createElement("script"),Rn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function W4(s,o){io.M(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Xs.get(p))&&Ty(s,o),m=a.createElement("script"),Rn(m),Ln(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function E1(s,o,a,u){var p=(p=Se.current)?Zd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=Mc(a.href),a=Ja(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=Mc(a.href);var m=Ja(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(wu(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Xs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xs.set(s,a),m||J4(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Dc(a),a=Ja(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Mc(s){return'href="'+Fs(s)+'"'}function wu(s){return'link[rel="stylesheet"]['+s+"]"}function x1(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function J4(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Ln(o,"link",a),Rn(o),s.head.appendChild(o))}function Dc(s){return'[src="'+Fs(s)+'"]'}function Eu(s){return"script[async]"+s}function R1(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+Fs(a.href)+'"]');if(u)return o.instance=u,Rn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),Rn(u),Ln(u,"style",p),Qd(u,a.precedence,s),o.instance=u;case"stylesheet":p=Mc(a.href);var m=s.querySelector(wu(p));if(m)return o.state.loading|=4,o.instance=m,Rn(m),m;u=x1(a),(p=Xs.get(p))&&Cy(u,p),m=(s.ownerDocument||s).createElement("link"),Rn(m);var w=m;return w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),o.state.loading|=4,Qd(m,a.precedence,s),o.instance=m;case"script":return m=Dc(a.src),(p=s.querySelector(Eu(m)))?(o.instance=p,Rn(p),p):(u=a,(p=Xs.get(m))&&(u=g({},a),Ty(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),Rn(p),Ln(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Qd(u,a.precedence,s));return o.instance}function Qd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function eL(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function A1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function tL(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Mc(u.href),m=o.querySelector(wu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Xd.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,Rn(m);return}m=o.ownerDocument||o,u=x1(u),(p=Xs.get(p))&&Cy(u,p),m=m.createElement("link"),Rn(m);var w=m;w._p=new Promise(function(T,z){w.onload=T,w.onerror=z}),Ln(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=Xd.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var Ay=0;function nL(s,o){return s.stylesheets&&s.count===0&&Jd(s,s.stylesheets),0Ay?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Wd=null;function Jd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Wd=new Map,o.forEach(sL,s),Wd=null,Xd.call(s))}function sL(s,o){if(!(o.state.loading&4)){var a=Wd.get(s);if(a)var u=a.get(null);else{a=new Map,Wd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jy.exports=FB(),Jy.exports}var qB=VB();const GB=JA(qB);var n0={exports:{}},s0={};var AR;function KB(){if(AR)return s0;AR=1;var e=al().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return s0.c=function(t){return e.H.useMemoCache(t)},s0}var IR;function ZB(){return IR||(IR=1,n0.exports=KB()),n0.exports}var Ct=ZB();const DI=I.createContext(void 0);function QB(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function YB(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>QB(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let v;t[6]!==l?(v=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=v):v=t[7];let b;t[8]!==v||t[9]!==d?(b={theme:d,setTheme:v},t[8]=v,t[9]=d,t[10]=b):b=t[10];const _=b;let x;return t[11]!==n||t[12]!==_?(x=$.jsx(DI.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function XB(){const e=I.useContext(DI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function fv(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const qu={};function Mp(e,t,n,r,i){let c={...dv(e,qu)};return t&&(c=Uu(c,t)),n&&(c=Uu(c,n)),r&&(c=Uu(c,r)),i&&(c=Uu(c,i)),c}function WB(e){if(e.length===0)return qu;if(e.length===1)return dv(e[0],qu);let t={...dv(e[0],qu)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function kI(e){return typeof e=="function"}function dv(e,t){return kI(e)?e(t):e??qu}function t$(e,t){return t?e?n=>{if(n$(n)){const i=n;hv(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function hv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function PI(e,t){return t?e?t+" "+e:t:e}function n$(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const OR={};function zr(e,t){const n=I.useRef(OR);return n.current===OR&&(n.current=e(t)),n}function Yh(e,t,n,r){const i=zr(NI).current;return r$(i,e,t,n,r)&&zI(i,[e,t,n,r]),i.callback}function s$(e){const t=zr(NI).current;return o$(t,e)&&zI(t,e),t.callback}function NI(){return{callback:null,cleanup:null,refs:[]}}function r$(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function o$(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function zI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function MR(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(sb(19)?n?.ref:t.ref)??null}function a$(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function c$(e,t){return typeof e=="function"?e(t):e}function l$(e,t){return typeof e=="function"?e(t):e}function LI(){}const E0e=Object.freeze([]),Ds=Object.freeze({}),u$={style:{transition:"none"}},f$="data-base-ui-click-trigger",x0e={fallbackAxisSide:"none"},d$={fallbackAxisSide:"end"},h$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function cr(e,t,n={}){const r=t.render,i=p$(t,n);if(n.enabled===!1)return null;const c=n.state??Ds;return m$(e,r,i,c)}function p$(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Ds,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?c$(n,c):void 0,g=h?l$(r,c):void 0,v=h?a$(c,d):Ds,b=h?fv(v,Array.isArray(f)?WB(f):f)??Ds:Ds;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=s$([b.ref,MR(i),...l]):b.ref=Yh(b.ref,MR(i),l):Yh(null,null)),h?(y!==void 0&&(b.className=PI(b.className,y)),g!==void 0&&(b.style=fv(b.style,g)),b):Ds}function m$(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Mp(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return g$(e,n);throw new Error(wo(8))}function g$(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function BI(e){return cr(e.defaultTagName??"div",e,e)}function $I(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,kR=UI,jI=(e,t)=>n=>{var r;if(t?.variants==null)return kR(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const v=DR(y)||DR(g);return i[h][v]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,v]:h},[]);return kR(e,l,d,n?.class,n?.className)};const HI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const y$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const v$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const PR=e=>{const t=v$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var b$={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"};const S$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const _$=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...b$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:HI("lucide",i),...!c&&!S$(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const _r=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(_$,{ref:c,iconNode:t,className:HI(`lucide-${y$(PR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=PR(e),n};const w$=[["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"}]],E$=_r("circle-alert",w$);const x$=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],R$=_r("hard-drive",x$);const C$=[["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"}]],T$=_r("house",C$);const A$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],I$=_r("image",A$);const O$=[["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"}]],M$=_r("key",O$);const D$=[["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"}]],k$=_r("log-out",D$);const P$=[["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"}]],N$=_r("moon",P$);const z$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],L$=_r("panel-left",z$);const B$=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],NR=_r("server",B$);const $$=[["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"}]],U$=_r("sun",$$);const j$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],H$=_r("x",j$);function Dp(){return typeof window<"u"}function Pi(e){return rb(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(rb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rb(e){return Dp()?e instanceof Node||e instanceof mn(e).Node:!1}function _t(e){return Dp()?e instanceof Element||e instanceof mn(e).Element:!1}function xn(e){return Dp()?e instanceof HTMLElement||e instanceof mn(e).HTMLElement:!1}function pv(e){return!Dp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}const F$=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!F$.has(i)}const V$=new Set(["table","td","th"]);function q$(e){return V$.has(Pi(e))}const G$=[":popover-open",":modal"];function kp(e){return G$.some(t=>{try{return e.matches(t)}catch{return!1}})}const K$=["transform","translate","scale","rotate","perspective"],Z$=["transform","translate","scale","rotate","perspective","filter"],Q$=["paint","layout","strict","content"];function ob(e){const t=Pp(),n=_t(e)?zs(e):e;return K$.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)||Z$.some(r=>(n.willChange||"").includes(r))||Q$.some(r=>(n.contain||"").includes(r))}function Y$(e){let t=vo(e);for(;xn(t)&&!mo(t);){if(ob(t))return t;if(kp(t))return null;t=vo(t)}return null}function Pp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const X$=new Set(["html","body","#document"]);function mo(e){return X$.has(Pi(e))}function zs(e){return mn(e).getComputedStyle(e)}function Np(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vo(e){if(Pi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pv(e)&&e.host||Lr(e);return pv(t)?t.host:t}function FI(e){const t=vo(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:xn(t)&&La(t)?t:FI(t)}function Ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FI(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=mn(i);if(c){const f=mv(l);return t.concat(l,l.visualViewport||[],La(i)?i:[],f&&n?Ti(f):[])}return t.concat(i,Ti(i,[],n))}function mv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const r0=qv[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],W$=r0&&r0!==I.useLayoutEffect?r0:e=>e();function Ze(e){const t=zr(J$).current;return t.next=e,W$(t.effect),t.trampoline}function J$(){const e={next:void 0,callback:eU,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function eU(){}const tU=()=>{},mt=typeof document<"u"?I.useLayoutEffect:tU,nU=I.createContext(void 0);function sU(e=!1){const t=I.useContext(nU);if(t===void 0&&!e)throw new Error(wo(16));return t}function rU(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function VI(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=sU(!0)!==void 0,f=Ze(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=rU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const v=c.current;oU(v)&&l&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((v={})=>{const{onClick:b,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=v;return Mp({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}b?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(hv(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,j=D.key==="Enter",B=D.key===" ";N&&((B||j)&&D.preventDefault(),j&&b?.(D))},onKeyUp(D){t||(hv(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&b?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function oU(e){return xn(e)&&e.tagName==="BUTTON"}const iU=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=VI({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:g,ref:[n,y],props:[d,h]})}),aU=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),qI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xh="-",zR=[],lU="arbitrary..",uU=e=>{const t=dU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return fU(l);const f=l.split(Xh),d=f[0]===""&&f.length>1?1:0;return GI(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?aU(h,d):d:h||zR}return n[l]||zR}}},GI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=GI(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Xh):e.slice(t).join(Xh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?lU+r:void 0})(),dU=e=>{const{theme:t,classGroups:n}=e;return hU(n,t)},hU=(e,t)=>{const n=qI();for(const r in e){const i=e[r];ib(i,n,r,t)}return n},ib=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){mU(e,t,n);return}if(typeof e=="function"){gU(e,t,n,r);return}yU(e,t,n,r)},mU=(e,t,n)=>{const r=e===""?t:KI(t,e);r.classGroupId=n},gU=(e,t,n,r)=>{if(vU(e)){ib(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(cU(n,e))},yU=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(Xh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,bU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},gv="!",LR=":",SU=[],BR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),_U=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return BR(c,b,v,_)};if(t){const i=t+LR,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):BR(SU,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},wU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},EU=e=>({cache:bU(e.cacheSize),parseClassName:_U(e),sortModifiers:wU(e),...uU(e)}),xU=/\s+/,RU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(xU);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=b?A+gv:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let j=0;j0?" "+d:d)}return d},CU=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=EU(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=RU(d,n);return i(d,y),y};return c=l,(...d)=>c(CU(...d))},AU=[],_n=e=>{const t=n=>n[e]||AU;return t.isThemeGetter=!0,t},QI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,YI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IU=/^\d+\/\d+$/,OU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MU=/\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$/,DU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pc=e=>IU.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),o0=e=>e.endsWith("%")&&tt(e.slice(0,-1)),ao=e=>OU.test(e),NU=()=>!0,zU=e=>MU.test(e)&&!DU.test(e),XI=()=>!1,LU=e=>kU.test(e),BU=e=>PU.test(e),$U=e=>!Me(e)&&!De(e),UU=e=>cl(e,e2,XI),Me=e=>QI.test(e),ma=e=>cl(e,t2,zU),i0=e=>cl(e,qU,tt),$R=e=>cl(e,WI,XI),jU=e=>cl(e,JI,BU),fh=e=>cl(e,n2,LU),De=e=>YI.test(e),Pu=e=>ll(e,t2),HU=e=>ll(e,GU),UR=e=>ll(e,WI),FU=e=>ll(e,e2),VU=e=>ll(e,JI),dh=e=>ll(e,n2,!0),cl=(e,t,n)=>{const r=QI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ll=(e,t,n=!1)=>{const r=YI.exec(e);return r?r[1]?t(r[1]):n:!1},WI=e=>e==="position"||e==="percentage",JI=e=>e==="image"||e==="url",e2=e=>e==="length"||e==="size"||e==="bg-size",t2=e=>e==="length",qU=e=>e==="number",GU=e=>e==="family-name",n2=e=>e==="shadow",KU=()=>{const e=_n("color"),t=_n("font"),n=_n("text"),r=_n("font-weight"),i=_n("tracking"),c=_n("leading"),l=_n("breakpoint"),f=_n("container"),d=_n("spacing"),h=_n("radius"),y=_n("shadow"),g=_n("inset-shadow"),v=_n("text-shadow"),b=_n("drop-shadow"),_=_n("blur"),x=_n("perspective"),R=_n("aspect"),C=_n("ease"),A=_n("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),De,Me],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],k=()=>[De,Me,d],Z=()=>[Pc,"full","auto",...k()],se=()=>[pi,"none","subgrid",De,Me],le=()=>["auto",{span:["full",pi,De,Me]},pi,De,Me],K=()=>[pi,"auto",De,Me],Q=()=>["auto","min","max","fr",De,Me],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...k()],W=()=>[Pc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],F=()=>[e,De,Me],ve=()=>[...D(),UR,$R,{position:[De,Me]}],Te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",FU,UU,{size:[De,Me]}],ne=()=>[o0,Pu,ma],ie=()=>["","none","full",h,De,Me],de=()=>["",tt,Pu,ma],Ce=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[tt,o0,UR,$R],Ye=()=>["","none",_,De,Me],He=()=>["none",tt,De,Me],ht=()=>["none",tt,De,Me],Ft=()=>[tt,De,Me],oe=()=>[Pc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ao],breakpoint:[ao],color:[NU],container:[ao],"drop-shadow":[ao],ease:["in","out","in-out"],font:[$U],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ao],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ao],shadow:[ao],spacing:["px",tt],text:[ao],"text-shadow":[ao],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pc,Me,De,R]}],container:["container"],columns:[{columns:[tt,Me,De,f]}],"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:N()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",De,Me]}],basis:[{basis:[Pc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,Pc,"auto","initial","none",Me]}],grow:[{grow:["",tt,De,Me]}],shrink:[{shrink:["",tt,De,Me]}],order:[{order:[pi,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:le()}],"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":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Pu,ma]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,i0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",o0,Me]}],"font-family":[{font:[HU,Me,t]}],"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:[i,De,Me]}],"line-clamp":[{"line-clamp":[tt,"none",De,i0]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,ma]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],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",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:Te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,De,Me],radial:["",De,Me],conic:[pi,De,Me]},VU,jU]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Me]}],"outline-w":[{outline:["",tt,Pu,ma]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",y,dh,fh]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,dh,fh]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[tt,ma]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",v,dh,fh]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[tt,De,Me]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"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":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:Te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,De,Me]}],contrast:[{contrast:[tt,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",b,dh,fh]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",tt,De,Me]}],"hue-rotate":[{"hue-rotate":[tt,De,Me]}],invert:[{invert:["",tt,De,Me]}],saturate:[{saturate:[tt,De,Me]}],sepia:[{sepia:["",tt,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Me]}],ease:[{ease:["linear","initial",C,De,Me]}],delay:[{delay:[tt,De,Me]}],animate:[{animate:["none",A,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,De,Me]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",De,Me]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",De,Me]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[tt,Pu,ma,i0]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},ZU=TU(KU);function tn(...e){return ZU(UI(e))}function R0e(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function C0e(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const QU=/\/$/;function T0e(e){return e.replace(QU,"")}function YU(e){return e&&(e.endsWith("/")?e:`${e}/`)}function XU(e,t){return e.startsWith(t)?e:`${t}${e}`}function A0e(e,t){return e.startsWith(t)?e.slice(t.length):e}const WU=jI("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function el(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=tn(WU({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=$.jsx(iU,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const JU={...qv};let jR=0;function e5(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(jR+=1,r(`${t}-${jR}`))},[n,t]),i}const HR=JU.useId;function _f(e,t){if(HR!==void 0){const n=HR();return e??(t?`${t}-${n}`:n)}return e5(e,t)}function ab(e){return _f(e,"base-ui")}const t5=[];function s2(e){I.useEffect(e,t5)}const Nu=0;class Ii{static create(){return new Ii}currentId=Nu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nu,n()},t)}isStarted(){return this.currentId!==Nu}clear=()=>{this.currentId!==Nu&&(clearTimeout(this.currentId),this.currentId=Nu)};disposeEffect=()=>this.clear}function Oi(){const e=zr(Ii.create).current;return s2(e.disposeEffect),e}function Ba(e){return e?.ownerDocument||document}const ul=typeof navigator<"u",a0=r5(),r2=i5(),o2=o5(),n5=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),i2=a0.platform==="MacIntel"&&a0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(a0.platform),a2=ul&&/apple/i.test(navigator.vendor),yv=ul&&/android/i.test(r2)||/android/i.test(o2),s5=ul&&r2.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,c2=o2.includes("jsdom/");function r5(){if(!ul)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function o5(){if(!ul)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function i5(){if(!ul)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const vv="data-base-ui-focusable",l2="active",u2="selected",f2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",I0e="ArrowLeft",O0e="ArrowRight",M0e="ArrowUp",D0e="ArrowDown";function Si(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&pv(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function os(e){return"composedPath"in e?e.composedPath()[0]:e.target}function yr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function a5(e){return e.matches("html,body")}function En(e){return e?.ownerDocument||document}function d2(e){return xn(e)&&e.matches(f2)}function FR(e){return e?e.getAttribute("role")==="combobox"&&d2(e):!1}function c5(e){if(!e||c2)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function bv(e){return e?e.hasAttribute(vv)?e:e.querySelector(`[${vv}]`)||e:null}function Ca(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Ca(e,i.id,n)])}function VR(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function l5(e){e.preventDefault(),e.stopPropagation()}function u5(e){return"nativeEvent"in e}function f5(e){return e.mozInputSource===0&&e.isTrusted?!0:yv&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function d5(e){return c2?!1:!yv&&e.width===0&&e.height===0||yv&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function of(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function h5(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const p5=["top","right","bottom","left"],tl=Math.min,Ms=Math.max,Wh=Math.round,hh=Math.floor,kr=e=>({x:e,y:e}),m5={left:"right",right:"left",bottom:"top",top:"bottom"},g5={start:"end",end:"start"};function Sv(e,t,n){return Ms(e,tl(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function cb(e){return e==="x"?"y":"x"}function lb(e){return e==="y"?"height":"width"}const y5=new Set(["top","bottom"]);function ar(e){return y5.has(ys(e))?"y":"x"}function ub(e){return cb(ar(e))}function v5(e,t,n){n===void 0&&(n=!1);const r=Ni(e),i=ub(e),c=lb(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Jh(l)),[l,Jh(l)]}function b5(e){const t=Jh(e);return[_v(e),t,_v(t)]}function _v(e){return e.replace(/start|end/g,t=>g5[t])}const qR=["left","right"],GR=["right","left"],S5=["top","bottom"],_5=["bottom","top"];function w5(e,t,n){switch(e){case"top":case"bottom":return n?t?GR:qR:t?qR:GR;case"left":case"right":return t?S5:_5;default:return[]}}function E5(e,t,n,r){const i=Ni(e);let c=w5(ys(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(_v)))),c}function Jh(e){return e.replace(/left|right|bottom|top/g,t=>m5[t])}function x5(e){return{top:0,right:0,bottom:0,left:0,...e}}function h2(e){return typeof e!="number"?x5(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var R5=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tp=R5.join(","),p2=typeof Element>"u",nl=p2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,np=!p2&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},sp=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):sp(t.parentNode));return l},C5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m2=function(t,n,r){if(sp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(tp));return n&&nl.call(t,tp)&&i.unshift(t),i=i.filter(r),i},rp=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!sp(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=rp(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=nl.call(l,tp);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),v=!sp(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&v){var b=rp(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},g2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},y2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||C5(t))&&!g2(t)?0:t.tabIndex},T5=function(t,n){var r=y2(t);return r<0&&n&&!g2(t)?0:r},A5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},v2=function(t){return t.tagName==="INPUT"},I5=function(t){return v2(t)&&t.type==="hidden"},O5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},M5=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(nl.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=np(t);if(h&&!h.shadowRoot&&i(h)===!0)return KR(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(N5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return KR(t);return!1},L5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},b2=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=T5(f,l),h=l?b2(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(A5).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},zp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:Ev.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:B5}):r=m2(t,n.includeContainer,Ev.bind(null,n)),b2(r)},$5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:wv.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=m2(t,n.includeContainer,wv.bind(null,n)),r},S2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return nl.call(t,tp)===!1?!1:Ev(n,t)};const wf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _2(e,t){const n=zp(e,wf()),r=n.length;if(r===0)return;const i=Si(En(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function w2(e){return _2(En(e).body,1)||e}function E2(e){return _2(En(e).body,-1)||e}function Gu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function U5(e){zp(e,wf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ZR(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const fb="none",op="trigger-press",Sr="trigger-hover",kh="trigger-focus",x2="outside-press",k0e="item-press",j5="close-press",R2="focus-out",db="escape-key",P0e="list-navigation",N0e="cancel-open",H5="disabled",C2="imperative-action",z0e="window-resize";function qt(e,t,n,r){let i=!1,c=!1;const l=Ds;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const T2=I.createContext(void 0);function $a(e){const t=I.useContext(T2);if(e===!1&&t===void 0)throw new Error(wo(27));return t}let af=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const F5={[af.startingStyle]:""},V5={[af.endingStyle]:""},hb={transitionStatus(e){return e==="starting"?F5:e==="ending"?V5:null}};let wa=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=af.startingStyle]="startingStyle",e[e.endingStyle=af.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),xv=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const q5={[xv.popupOpen]:""},G5={[xv.popupOpen]:"",[xv.pressed]:""},K5={[wa.open]:""},Z5={[wa.closed]:""},Q5={[wa.anchorHidden]:""},Y5={open(e){return e?q5:null}},L0e={open(e){return e?G5:null}},Ef={open(e){return e?K5:Z5},anchorHidden(e){return e?Q5:null}},X5={...Ef,...hb},W5=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=$a(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),v=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return cr("div",t,{state:v,ref:[f.context.backdropRef,n],stateAttributesMapping:X5,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),J5=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=$a(),h=d.useState("open");function y(_){h&&d.setOpen(!1,qt(j5,_.nativeEvent))}const{getButtonProps:g,buttonRef:v}=VI({disabled:c,native:l}),b=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:b,ref:[n,v],props:[{onClick:y},f,g]})}),e8=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=ab(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),cr("p",t,{ref:n,props:[{id:d},l]})});function Dr(e){const t=zr(t8,e).current;return t.next=e,mt(t.effect),t}function t8(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function n8(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const s8=I.createContext(null),r8=I.createContext(null),Lp=()=>I.useContext(s8)?.id||null,xf=e=>{const t=I.useContext(r8);return e??t};function sl(e){return`data-base-ui-${e}`}function Ph(e,t,n){if(n&&!of(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const A2=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function o8(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=Oi();return $.jsx(A2.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function i8(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(A2),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:v,timeout:b}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return b.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{b.clear()}}R()}},[i,c,r,f,d,h,y,g,b,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;b.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Ph(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,qt(fb))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,b]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:v,delayRef:d,isInstantPhase:_}),[v,d,_])}const I2={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},O2={...I2,position:"fixed",top:0,left:0},B0e={...I2,position:"absolute"},ph=null;class a8{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const mh=new a8;class Mr{static create(){return new Mr}static request(t){return mh.request(t)}static cancel(t){return mh.cancel(t)}currentId=ph;request(t){this.cancel(),this.currentId=mh.request(()=>{this.currentId=ph,t()})}cancel=()=>{this.currentId!==ph&&(mh.cancel(this.currentId),this.currentId=ph)};disposeEffect=()=>this.cancel}function M2(){const e=zr(Mr.create).current;return s2(e.disposeEffect),e}const ip=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{a2&&i("button")},[]);const c={tabIndex:0,role:r};return $.jsx("span",{...t,ref:n,style:O2,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let QR=0;function c0(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(QR);const c=()=>e?.focus({preventScroll:n});i?c():QR=requestAnimationFrame(c)}const qc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function YR(e){return e==="inert"?qc.inert:e==="aria-hidden"?qc["aria-hidden"]:qc.none}let gh=new WeakSet,yh={},l0=0;const D2=e=>e&&(e.host||D2(e.parentNode)),c8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=D2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function l8(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=c8(t,e),f=new Set,d=new Set(l),h=[];yh[i]||(yh[i]=new WeakMap);const y=yh[i];l.forEach(g),v(t),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||d.has(b)||[].forEach.call(b.children,_=>{if(Pi(_)!=="script")if(f.has(_))v(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=YR(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&gh.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return l0+=1,()=>{h.forEach(b=>{const _=YR(c),R=(_.get(b)||0)-1,C=(y.get(b)||0)-1;_.set(b,R),y.set(b,C),R||(!gh.has(b)&&c&&b.removeAttribute(c),gh.delete(b)),C||b.removeAttribute(i)}),l0-=1,l0||(qc.inert=new WeakMap,qc["aria-hidden"]=new WeakMap,qc.none=new WeakMap,gh=new WeakSet,yh={})}}function u8(e,t=!1,n=!1){const r=En(e[0]).body;return l8(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const k2=I.createContext(null),P2=()=>I.useContext(k2),f8=sl("portal");function N2(e={}){const{ref:t,container:n,componentProps:r=Ds,elementProps:i,elementState:c}=e,l=_f(),d=P2()?.portalNode,[h,y]=I.useState(null),[g,v]=I.useState(null),b=Ze(C=>{C!==null&&v(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,v(null),y(null));return}if(l==null)return;const C=(n&&(rb(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,v(null),y(null));return}_.current!==C&&(_.current=C,v(null),y(C))},[n,d,l]);const x=cr("div",r,{ref:[t,b],state:c,props:[{id:l,[f8]:""},i]});return{portalNode:g,portalSubtree:h&&x?ki.createPortal(x,h):null}}const d8=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=N2({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),v=I.useRef(null),b=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(j){h&&j.relatedTarget&&Gu(j)&&(j.type==="focusin"?ZR:U5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||ZR(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return $.jsxs(I.Fragment,{children:[y,$.jsxs(k2.Provider,{value:D,children:[O&&h&&$.jsx(ip,{"data-type":"outside",ref:g,onFocus:N=>{if(Gu(N,h))b.current?.focus();else{const j=x?x.domReference:null;E2(j)?.focus()}}}),O&&h&&$.jsx("span",{"aria-owns":h.id,style:h$}),h&&ki.createPortal(r,h),O&&h&&$.jsx(ip,{"data-type":"outside",ref:v,onFocus:N=>{if(Gu(N,h))_.current?.focus();else{const j=x?x.domReference:null;w2(j)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qt(R2,N.nativeEvent))}}})]})]})});function lo(e){return e==null?e:"current"in e?e.current:e}function h8(e,t){const n=mn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const XR=20;let Ei=[];function pb(){Ei=Ei.filter(e=>e.isConnected)}function p8(e){pb(),e&&Pi(e)!=="body"&&(Ei.push(e),Ei.length>XR&&(Ei=Ei.slice(-XR)))}function u0(){return pb(),Ei[Ei.length-1]}function m8(e){if(!e)return null;const t=wf();return S2(e,t)?e:zp(e,t)[0]||e}function g8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zs(e).display!=="none"}function WR(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=wf(),i=$5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return S2(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function y8(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,j=Ze(()=>N.current.floatingContext?.nodeId),B=Ze(g),k=c===!1,Z=FR(A)&&k,se=Dr(i),le=Dr(c),K=Dr(l),Q=Dr(y),ye=xf(x),fe=P2(),q=I.useRef(null),W=I.useRef(null),F=I.useRef(!1),ve=I.useRef(!1),Te=I.useRef(!1),P=I.useRef(-1),ne=I.useRef(""),ie=I.useRef(""),de=I.useRef(null),Ce=I.useRef(null),Se=Yh(de,_,fe?.beforeInsideRef),be=Yh(Ce,fe?.afterInsideRef),Ye=Oi(),He=Oi(),ht=M2(),Ft=fe!=null,oe=bv(O),Fe=Ze((_e=oe)=>_e?zp(_e,wf()):[]),Ie=Ze(_e=>{const Ne=Fe(_e);return se.current.map(()=>Ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function _e(qe){qe.key==="Tab"&&bt(oe,Si(En(oe)))&&Fe().length===0&&!Z&&l5(qe)}const Ne=En(oe);return Ne.addEventListener("keydown",_e),()=>{Ne.removeEventListener("keydown",_e)}},[r,A,oe,d,se,Z,Fe,Ie]),I.useEffect(()=>{if(r||!O)return;function _e(Ne){const qe=os(Ne),ut=Fe().indexOf(qe);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",_e),()=>{O.removeEventListener("focusin",_e)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const _e=En(oe);function Ne(){Te.current=!1}function qe(ut){const Be=os(ut),Le=bt(O,Be)||bt(A,Be)||bt(fe?.portalNode,Be);Te.current=!Le,ie.current=ut.pointerType||"keyboard"}function Qe(){ie.current="keyboard"}return _e.addEventListener("pointerdown",qe,!0),_e.addEventListener("pointerup",Ne,!0),_e.addEventListener("pointercancel",Ne,!0),_e.addEventListener("keydown",Qe,!0),()=>{_e.removeEventListener("pointerdown",qe,!0),_e.removeEventListener("pointerup",Ne,!0),_e.removeEventListener("pointercancel",Ne,!0),_e.removeEventListener("keydown",Qe,!0)}},[r,O,A,oe,C,fe]),I.useEffect(()=>{if(r||!h)return;function _e(){ve.current=!0,He.start(0,()=>{ve.current=!1})}function Ne(Be){const Le=Be.relatedTarget,rn=Be.currentTarget,it=os(Be);queueMicrotask(()=>{const _s=j(),gt=R.context.triggerElements,$t=Le?.hasAttribute(sl("focus-guard"))&&[de.current,Ce.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v)].includes(Le),Ut=!(bt(A,Le)||bt(O,Le)||bt(Le,O)||bt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(on=>bt(on,Le))||$t||ye&&(Ca(ye.nodesRef.current,_s).find(on=>bt(on.context?.elements.floating,Le)||bt(on.context?.elements.domReference,Le))||VR(ye.nodesRef.current,_s).find(on=>[on.context?.elements.floating,bv(on.context?.elements.floating)].includes(Le)||on.context?.elements.domReference===Le)));if(rn===A&&oe&&WR(oe,se),f&&rn!==A&&!g8(it)&&Si(En(oe))===En(oe).body){if(xn(oe)&&(oe.focus(),f==="popup")){ht.request(()=>{oe.focus()});return}const on=P.current,ws=Fe(),$s=ws[on]||ws[ws.length-1]||oe;xn($s)&&$s.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(Z||!d)&&Le&&Ut&&!ve.current&&(Z||Le!==u0())&&(F.current=!0,R.setOpen(!1,qt(R2,Be)))})}function qe(){Te.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=xn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Ne),Qe.addEventListener("pointerdown",_e),ut.push(()=>{Qe.removeEventListener("focusout",Ne),Qe.removeEventListener("pointerdown",_e)})),O&&(O.addEventListener("focusout",Ne),fe&&(O.addEventListener("focusout",qe,!0),ut.push(()=>{O.removeEventListener("focusout",qe,!0)})),ut.push(()=>{O.removeEventListener("focusout",Ne)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,oe,d,ye,fe,R,h,f,Fe,Z,j,se,N,Ye,He,ht,v,b]),I.useEffect(()=>{if(r||!O||!C)return;const _e=Array.from(fe?.portalNode?.querySelectorAll(`[${sl("portal")}]`)||[]),qe=(ye?VR(ye.nodesRef.current,j()):[]).find(Be=>FR(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,qe,..._e,...B(),q.current,W.current,de.current,Ce.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v),Z?A:null].filter(Be=>Be!=null),ut=u8(Qe,d||Z);return()=>{ut()}},[C,r,A,O,d,se,fe,Z,ye,j,B,v,b]),mt(()=>{if(!C||r||!xn(oe))return;const _e=En(oe),Ne=Si(_e);queueMicrotask(()=>{const qe=Ie(oe),Qe=le.current,ut=typeof Qe=="function"?Qe(Q.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=qe[0]||oe:Be=lo(ut),Be=Be||qe[0]||oe,!bt(oe,Ne)&&c0(Be,{preventScroll:Be===oe})})},[r,C,oe,k,Ie,le,Q]),mt(()=>{if(r||!oe)return;const _e=En(oe),Ne=Si(_e);p8(Ne);function qe(Be){if(Be.open||(ne.current=h8(Be.nativeEvent,ie.current)),Be.reason===Sr&&Be.nativeEvent.type==="mouseleave"&&(F.current=!0),Be.reason===x2)if(Be.nested)F.current=!1;else if(f5(Be.nativeEvent)||d5(Be.nativeEvent))F.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?F.current=!1:F.current=!0}}D.on("openchange",qe);const Qe=_e.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,O2),Ft&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=K.current;let Le=typeof Be=="function"?Be(ne.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||u0();return it&&it.isConnected?it:Qe}const rn=A||u0()||Qe;return lo(Le)||rn}return()=>{D.off("openchange",qe);const Be=Si(_e),Le=bt(O,Be)||ye&&Ca(ye.nodesRef.current,j(),!1).some(it=>bt(it.context?.elements.floating,Be)),rn=ut();queueMicrotask(()=>{const it=m8(rn),_s=typeof K.current!="boolean";K.current&&!F.current&&xn(it)&&(!(!_s&&it!==Be&&Be!==_e.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,oe,K,N,D,ye,Ft,A,j]),I.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function _e(qe){os(qe)?.closest(`[${f$}]`)&&(ve.current=!0)}const Ne=En(oe);return Ne.addEventListener("pointerdown",_e,!0),()=>{Ne.removeEventListener("pointerdown",_e,!0)}},[r,C,oe]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!oe))return WR(oe,se),()=>{queueMicrotask(pb)}},[r,oe,se]);const Pt=!r&&(d?!Z:!0)&&(Ft||d);return $.jsxs(I.Fragment,{children:[Pt&&$.jsx(ip,{"data-type":"inside",ref:Se,onFocus:_e=>{if(d){const Ne=Ie();c0(Ne[Ne.length-1])}else fe?.portalNode&&(F.current=!1,Gu(_e,fe.portalNode)?w2(A)?.focus():lo(b??fe.beforeOutsideRef)?.focus())}}),n,Pt&&$.jsx(ip,{"data-type":"inside",ref:be,onFocus:_e=>{d?c0(Ie()[0]):fe?.portalNode&&(h&&(F.current=!0),Gu(_e,fe.portalNode)?E2(A)?.focus():lo(v??fe.afterOutsideRef)?.focus())}})]})}function v8(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,v-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,v=f&&t.y!=null?t.y:v):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function JR(e){return e!=null&&e.clientX!=null}function b8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),v=I.useRef(null),[b,_]=I.useState(),[x,R]=I.useState([]),C=Ze((j,B,k)=>{g.current||l.current.openEvent&&!JR(l.current.openEvent)||n.set("positionReference",v8(k??c,{x:j,y:B,axis:d,dataRef:l,pointerType:b}))}),A=Ze(j=>{h!=null||y!=null||(r?v.current||R([]):C(j.clientX,j.clientY,j.currentTarget))}),O=of(b)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const j=mn(i);function B(k){const Z=os(k);bt(i,Z)?(j.removeEventListener("mousemove",B),v.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||JR(l.current.openEvent)){j.addEventListener("mousemove",B);const k=()=>{j.removeEventListener("mousemove",B),v.current=null};return v.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function j(B){_(B.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function eC(e,t,n){let{reference:r,floating:i}=e;const c=ar(t),l=ub(t),f=lb(l),d=ys(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,v=r[f]/2-i[f]/2;let b;switch(d){case"top":b={x:y,y:r.y-i.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-i.width,y:g};break;default:b={x:r.x,y:r.y}}switch(Ni(t)){case"start":b[l]-=v*(n&&h?-1:1);break;case"end":b[l]+=v*(n&&h?-1:1);break}return b}const S8=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=eC(h,r,d),v=r,b={},_=0;for(let x=0;xye<=0)){var le,K;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=B[ye];if(fe&&(!(g==="alignment"?A!==ar(fe):!1)||se.every(F=>ar(F.placement)===A?F.overflows[0]>0:!0)))return{data:{index:ye,overflows:se},reset:{placement:fe}};let q=(K=se.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!q)switch(b){case"bestFit":{var Q;const W=(Q=se.filter(F=>{if(j){const ve=ar(F.placement);return ve===A||ve==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ve=>ve>0).reduce((ve,Te)=>ve+Te,0)]).sort((F,ve)=>F[1]-ve[1])[0])==null?void 0:Q[0];W&&(q=W);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function tC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nC(e){return p5.some(t=>e[t]>=0)}const w8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=bo(e,t);switch(r){case"referenceHidden":{const c=await cf(t,{...i,elementContext:"reference"}),l=tC(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:nC(l)}}}case"escaped":{const c=await cf(t,{...i,altBoundary:!0}),l=tC(c,n.floating);return{data:{escapedOffsets:l,escaped:nC(l)}}}default:return{}}}}},z2=new Set(["left","top"]);async function E8(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ys(n),f=Ni(n),d=ar(n)==="y",h=z2.has(l)?-1:1,y=c&&d?-1:1,g=bo(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(b=f==="end"?_*-1:_),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const x8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await E8(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},R8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=bo(e,t),h={x:n,y:r},y=await cf(t,d),g=ar(ys(i)),v=cb(g);let b=h[v],_=h[g];if(c){const R=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=b+y[R],O=b-y[C];b=Sv(A,b,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=Sv(A,_,O)}const x=f.fn({...t,[v]:b,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:c,[g]:l}}}}}},C8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=bo(e,t),y={x:n,y:r},g=ar(i),v=cb(g);let b=y[v],_=y[g];const x=bo(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=v==="y"?"height":"width",D=c.reference[v]-c.floating[O]+R.mainAxis,N=c.reference[v]+c.reference[O]-R.mainAxis;bN&&(b=N)}if(h){var C,A;const O=v==="y"?"width":"height",D=z2.has(ys(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),j=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_j&&(_=j)}return{[v]:b,[g]:_}}}},T8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=bo(e,t),y=await cf(t,h),g=ys(i),v=Ni(i),b=ar(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=v===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=v==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=tl(x-y[R],A),N=tl(_-y[C],O),j=!t.middlewareData.shift;let B=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=A),j&&!v){const se=Ms(y.left,0),le=Ms(y.right,0),K=Ms(y.top,0),Q=Ms(y.bottom,0);b?k=_-2*(se!==0||le!==0?se+le:Ms(y.left,y.right)):B=x-2*(K!==0||Q!==0?K+Q:Ms(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:B});const Z=await l.getDimensions(f.floating);return _!==Z.width||x!==Z.height?{reset:{rects:!0}}:{}}}};function L2(e){const t=zs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=Wh(n)!==c||Wh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function mb(e){return _t(e)?e:e.contextElement}function Gc(e){const t=mb(e);if(!xn(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=L2(t);let l=(c?Wh(n.width):n.width)/r,f=(c?Wh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const A8=kr(0);function B2(e){const t=mn(e);return!Pp()||!t.visualViewport?A8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mn(e)?!1:t}function Ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=mb(e);let l=kr(1);t&&(r?_t(r)&&(l=Gc(r)):l=Gc(e));const f=I8(c,n,r)?B2(c):kr(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const v=mn(c),b=r&&_t(r)?mn(r):r;let _=v,x=mv(_);for(;x&&r&&b!==_;){const R=Gc(x),C=x.getBoundingClientRect(),A=zs(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=mn(x),x=mv(_)}}return ep({width:y,height:g,x:d,y:h})}function Bp(e,t){const n=Np(e).scrollLeft;return t?t.left+n:Ma(Lr(e)).left+n}function $2(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function O8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=Lr(r),f=t?kp(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=kr(1);const y=kr(0),g=xn(r);if((g||!g&&!c)&&((Pi(r)!=="body"||La(l))&&(d=Np(r)),xn(r))){const b=Ma(r);h=Gc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=l&&!g&&!c?$2(l,d):kr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:n.y*h.y-d.scrollTop*h.y+y.y+v.y}}function M8(e){return Array.from(e.getClientRects())}function D8(e){const t=Lr(e),n=Np(e),r=e.ownerDocument.body,i=Ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bp(e);const f=-n.scrollTop;return zs(r).direction==="rtl"&&(l+=Ms(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const sC=25;function k8(e,t){const n=mn(e),r=Lr(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Pp();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=Bp(r);if(h<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-b);_<=sC&&(c-=_)}else h<=sC&&(c+=h);return{width:c,height:l,x:f,y:d}}const P8=new Set(["absolute","fixed"]);function N8(e,t){const n=Ma(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=xn(e)?Gc(e):kr(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function rC(e,t,n){let r;if(t==="viewport")r=k8(e,n);else if(t==="document")r=D8(Lr(e));else if(_t(t))r=N8(t,n);else{const i=B2(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function U2(e,t){const n=vo(e);return n===t||!_t(n)||mo(n)?!1:zs(n).position==="fixed"||U2(n,t)}function z8(e,t){const n=t.get(e);if(n)return n;let r=Ti(e,[],!1).filter(f=>_t(f)&&Pi(f)!=="body"),i=null;const c=zs(e).position==="fixed";let l=c?vo(e):e;for(;_t(l)&&!mo(l);){const f=zs(l),d=ob(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&P8.has(i.position)||La(l)&&!d&&U2(e,l))?r=r.filter(y=>y!==l):i=f,l=vo(l)}return t.set(e,r),r}function L8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?kp(t)?[]:z8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=rC(t,y,i);return h.top=Ms(g.top,h.top),h.right=tl(g.right,h.right),h.bottom=tl(g.bottom,h.bottom),h.left=Ms(g.left,h.left),h},rC(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function B8(e){const{width:t,height:n}=L2(e);return{width:t,height:n}}function $8(e,t,n){const r=xn(t),i=Lr(t),c=n==="fixed",l=Ma(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=kr(0);function h(){d.x=Bp(i)}if(r||!r&&!c)if((Pi(t)!=="body"||La(i))&&(f=Np(t)),r){const b=Ma(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?$2(i,f):kr(0),g=l.left+f.scrollLeft-d.x-y.x,v=l.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:l.width,height:l.height}}function f0(e){return zs(e).position==="static"}function oC(e,t){if(!xn(e)||zs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lr(e)===n&&(n=n.ownerDocument.body),n}function j2(e,t){const n=mn(e);if(kp(e))return n;if(!xn(e)){let i=vo(e);for(;i&&!mo(i);){if(_t(i)&&!f0(i))return i;i=vo(i)}return n}let r=oC(e,t);for(;r&&q$(r)&&f0(r);)r=oC(r,t);return r&&mo(r)&&f0(r)&&!ob(r)?n:r||Y$(e)||n}const U8=async function(e){const t=this.getOffsetParent||j2,n=this.getDimensions,r=await n(e.floating);return{reference:$8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function j8(e){return zs(e).direction==="rtl"}const H8={convertOffsetParentRelativeRectToViewportRelativeRect:O8,getDocumentElement:Lr,getClippingRect:L8,getOffsetParent:j2,getElementRects:U8,getClientRects:M8,getDimensions:B8,getScale:Gc,isElement:_t,isRTL:j8};function H2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function F8(e,t){let n=null,r;const i=Lr(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||t(),!v||!b)return;const _=hh(g),x=hh(i.clientWidth-(y+v)),R=hh(i.clientHeight-(g+b)),C=hh(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:Ms(0,tl(1,d))||1};let D=!0;function N(j){const B=j[0].intersectionRatio;if(B!==d){if(!D)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!H2(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function iC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=mb(e),y=i||c?[...h?Ti(h):[],...Ti(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?F8(h,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,x=d?Ma(e):null;d&&R();function R(){const C=Ma(e);x&&!H2(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const V8=x8,q8=R8,G8=_8,K8=T8,Z8=w8,Q8=C8,Y8=(e,t,n)=>{const r=new Map,i={platform:H8,...n},c={...i.platform,_c:r};return S8(e,t,{...i,platform:c})};var X8=typeof document<"u",W8=function(){},Nh=X8?I.useLayoutEffect:W8;function ap(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,i;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(!ap(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!ap(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function F2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aC(e,t){const n=F2(e);return Math.round(t*n)/n}function d0(e){const t=I.useRef(e);return Nh(()=>{t.current=e}),t}function J8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=I.useState(r);ap(v,r)||b(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(F=>{F!==j.current&&(j.current=F,x(F))},[]),O=I.useCallback(F=>{F!==B.current&&(B.current=F,C(F))},[]),D=c||_,N=l||R,j=I.useRef(null),B=I.useRef(null),k=I.useRef(y),Z=d!=null,se=d0(d),le=d0(i),K=d0(h),Q=I.useCallback(()=>{if(!j.current||!B.current)return;const F={placement:t,strategy:n,middleware:v};le.current&&(F.platform=le.current),Y8(j.current,B.current,F).then(ve=>{const Te={...ve,isPositioned:K.current!==!1};ye.current&&!ap(k.current,Te)&&(k.current=Te,ki.flushSync(()=>{g(Te)}))})},[v,t,n,le,K]);Nh(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Nh(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Nh(()=>{if(D&&(j.current=D),N&&(B.current=N),D&&N){if(se.current)return se.current(D,N,Q);Q()}},[D,N,Q,se,Z]);const fe=I.useMemo(()=>({reference:j,floating:B,setReference:A,setFloating:O}),[A,O]),q=I.useMemo(()=>({reference:D,floating:N}),[D,N]),W=I.useMemo(()=>{const F={position:n,left:0,top:0};if(!q.floating)return F;const ve=aC(q.floating,y.x),Te=aC(q.floating,y.y);return f?{...F,transform:"translate("+ve+"px, "+Te+"px)",...F2(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:Te}},[n,f,q.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Q,refs:fe,elements:q,floatingStyles:W}),[y,Q,fe,q,W])}const ej=(e,t)=>({...V8(e),options:[e,t]}),tj=(e,t)=>({...q8(e),options:[e,t]}),nj=(e,t)=>({...Q8(e),options:[e,t]}),sj=(e,t)=>({...G8(e),options:[e,t]}),rj=(e,t)=>({...K8(e),options:[e,t]}),oj=(e,t)=>({...Z8(e),options:[e,t]}),ij={intentional:"onClick",sloppy:"onPointerDown"};function aj(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function V2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=xf(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:j,outsidePress:B}=aj(R),k=I.useRef(null),Z=Oi(),se=Oi(),le=Ze(()=>{se.clear(),d.current.insideReactTree=!1}),K=I.useRef(!1),Q=I.useRef(""),ye=Ze(oe=>{Q.current=oe.pointerType}),fe=Ze(()=>{const oe=Q.current,Fe=oe==="pen"||!oe?"mouse":oe,Ie=typeof v=="function"?v():v;return typeof Ie=="string"?Ie:Ie[Fe]}),q=Ze(oe=>{if(!r||!h||!y||oe.key!=="Escape"||K.current)return;const Fe=d.current.floatingContext?.nodeId,Ie=A?Ca(A.nodesRef.current,Fe):[];if(!j&&Ie.length>0){let Ne=!0;if(Ie.forEach(qe=>{qe.context?.open&&!qe.context.dataRef.current.__escapeKeyBubbles&&(Ne=!1)}),!Ne)return}const Pt=u5(oe)?oe.nativeEvent:oe,_e=qt(db,Pt);n.setOpen(!1,_e),!j&&!_e.isPropagationAllowed&&oe.stopPropagation()}),W=Ze(oe=>{const Fe=fe();return Fe==="intentional"&&oe.type!=="click"||Fe==="sloppy"&&oe.type==="click"}),F=Ze(()=>{d.current.insideReactTree=!0,se.start(0,le)}),ve=Ze((oe,Fe=!1)=>{if(W(oe)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(oe))return;const Ie=os(oe),Pt=`[${sl("inert")}]`,_e=En(n.select("floatingElement")).querySelectorAll(Pt),Ne=n.context.triggerElements;if(Ie&&(Ne.hasElement(Ie)||Ne.hasMatchingElement(Le=>bt(Le,Ie))))return;let qe=_t(Ie)?Ie:null;for(;qe&&!mo(qe);){const Le=vo(qe);if(mo(Le)||!_t(Le))break;qe=Le}if(_e.length&&_t(Ie)&&!a5(Ie)&&!bt(Ie,n.select("floatingElement"))&&Array.from(_e).every(Le=>!bt(qe,Le)))return;if(xn(Ie)&&!("touches"in oe)){const Le=mo(Ie),rn=zs(Ie),it=/auto|scroll/,_s=Le||it.test(rn.overflowX),gt=Le||it.test(rn.overflowY),$t=_s&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,Ut=gt&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,on=rn.direction==="rtl",ws=Ut&&(on?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),$s=$t&&oe.offsetY>Ie.clientHeight;if(ws||$s)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&Ca(A.nodesRef.current,Qe).some(Le=>yr(oe,Le.context?.elements.floating));if(yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||ut)return;const Be=A?Ca(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(rn=>{rn.context?.open&&!rn.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,qt(x2,oe)),le()}),Te=Ze(oe=>{fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!h||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||ve(oe)}),P=Ze(oe=>{if(fe()!=="sloppy"||!n.select("open")||!h||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),ne=Ze(oe=>{const Fe=os(oe);function Ie(){P(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),ie=Ze(oe=>{const Fe=N.current;if(N.current=!1,Z.clear(),oe.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ie=os(oe);function Pt(){oe.type==="pointerdown"?Te(oe):ve(oe,Fe),Ie?.removeEventListener(oe.type,Pt)}Ie?.addEventListener(oe.type,Pt)}),de=Ze(oe=>{if(fe()!=="sloppy"||!k.current||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];if(!Fe)return;const Ie=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),_e=Math.sqrt(Ie*Ie+Pt*Pt);_e>5&&(k.current.dismissOnTouchEnd=!0),_e>10&&(ve(oe),Z.clear(),k.current=null)}),Ce=Ze(oe=>{const Fe=os(oe);function Ie(){de(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),Se=Ze(oe=>{fe()!=="sloppy"||!k.current||yr(oe,n.select("floatingElement"))||yr(oe,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&ve(oe),Z.clear(),k.current=null)}),be=Ze(oe=>{const Fe=os(oe);function Ie(){Se(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=j,d.current.__outsidePressBubbles=B;const oe=new Ii;function Fe(qe){n.setOpen(!1,qt(fb,qe))}function Ie(){oe.clear(),K.current=!0}function Pt(){oe.start(Pp()?5:0,()=>{K.current=!1})}const _e=En(i);_e.addEventListener("pointerdown",ye,!0),y&&(_e.addEventListener("keydown",q),_e.addEventListener("compositionstart",Ie),_e.addEventListener("compositionend",Pt)),D&&(_e.addEventListener("click",ie,!0),_e.addEventListener("pointerdown",ie,!0),_e.addEventListener("touchstart",ne,!0),_e.addEventListener("touchmove",Ce,!0),_e.addEventListener("touchend",be,!0),_e.addEventListener("mousedown",ie,!0));let Ne=[];return x&&(_t(l)&&(Ne=Ti(l)),_t(i)&&(Ne=Ne.concat(Ti(i))),!_t(c)&&c&&c.contextElement&&(Ne=Ne.concat(Ti(c.contextElement)))),Ne=Ne.filter(qe=>qe!==_e.defaultView?.visualViewport),Ne.forEach(qe=>{qe.addEventListener("scroll",Fe,{passive:!0})}),()=>{_e.removeEventListener("pointerdown",ye,!0),y&&(_e.removeEventListener("keydown",q),_e.removeEventListener("compositionstart",Ie),_e.removeEventListener("compositionend",Pt)),D&&(_e.removeEventListener("click",ie,!0),_e.removeEventListener("pointerdown",ie,!0),_e.removeEventListener("touchstart",ne,!0),_e.removeEventListener("touchmove",Ce,!0),_e.removeEventListener("touchend",be,!0),_e.removeEventListener("mousedown",ie,!0)),Ne.forEach(qe=>{qe.removeEventListener("scroll",Fe)}),oe.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,j,B,q,ve,ie,Te,ne,Ce,be,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:q,...b&&{[ij[_]]:oe=>{n.setOpen(!1,qt(op,oe.nativeEvent))},..._!=="intentional"&&{onClick(oe){n.setOpen(!1,qt(op,oe.nativeEvent))}}}}),[q,n,b,_]),He=Ze(oe=>{const Fe=os(oe.nativeEvent);!bt(n.select("floatingElement"),Fe)||oe.button!==0||(N.current=!0)}),ht=Ze(oe=>{!r||!h||oe.button!==0||(N.current=!0)}),Ft=I.useMemo(()=>({onKeyDown:q,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:F,onMouseDownCapture(oe){F(),ht(oe)},onPointerDownCapture(oe){F(),ht(oe)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[q,He,F,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ft,trigger:Ye}:{},[h,Ye,Ft])}var cp=Symbol("NOT_FOUND");function cj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function lj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function uj(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var cC=e=>Array.isArray(e)?e:[e];function fj(e){const t=Array.isArray(e[0])?e[0]:e;return uj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function dj(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return cp}function i(f,d){r(f)===cp&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var mj=(e,t)=>e===t;function gj(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(b.value,y));v&&(y=v.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var vj=class{constructor(e){this.value=e}deref(){return this.value}},bj=typeof WeakRef<"u"?WeakRef:vj,Sj=0,lC=1;function vh(){return{s:Sj,v:void 0,o:null,p:null}}function q2(e,t={}){let n=vh();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,v=d;g{n=vh(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function G2(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),cj(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:b=q2,argsMemoizeOptions:_=[]}=y,x=cC(v),R=cC(_),C=fj(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=b(function(){l++;const N=dj(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var _j=G2(q2),wj=Object.assign((e,t=_j)=>{lj(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>wj});G2({memoize:yj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(wo(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Ej=RI();const xj=sb(19),Rj=xj?Tj:Aj;function Cj(e,t,n,r,i){return Rj(e,t,n,r,i)}function Tj(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Ej.useSyncExternalStore(e.subscribe,c,c)}function Aj(e,t,n,r,i){return CI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class Ku{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Ku.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Ku.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Ku.prototype.setState.call(this,t)}}class gb extends Ku{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return Cj(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??LI);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const Ij={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class yb extends gb{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:n8(),nested:n,noEmit:r,triggerElements:c},Ij)}setOpen=(t,n)=>{if((!t||!this.state.open||h5(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Oj(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function Mj(e,t=!1,n=!0){const r=M2();return Ze((i,c=null)=>{r.cancel();function l(){ki.flushSync(i)}const f=lo(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=af.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(g)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function vb(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=Mj(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function Dj(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function kj(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=Dj(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function K2(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function Z2(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=Oj(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return vb({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class $p{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function Pj(){return new yb({open:!1,floatingElement:null,referenceElement:null,triggerElements:new $p,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Q2(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:Pj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ds,inactiveTriggerProps:Ds,popupProps:Ds}}const Y2={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function Nj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=_f(),c=Lp()!=null,l=zr(()=>new yb({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new $p,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function zj(e={}){const{nodeId:t,externalTree:n}=e,r=Nj(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=xf(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=J8({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback(B=>{const k=_t(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;f(k),y.refs.setReference(k)},[y.refs]),[v,b]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",v),i.useSyncedValue("domReferenceElement",_t(v)?v:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback(B=>{(_t(B)||B===null)&&(d.current=B,b(B)),(_t(y.refs.reference.current)||y.refs.reference.current===null||B!==null&&!_t(B))&&y.refs.setReference(B)},[y.refs,b]),C=I.useCallback(B=>{x(B),y.refs.setFloating(B)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),j=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=j;const B=h?.nodesRef.current.find(k=>k.id===t);B&&(B.context=j)}),I.useMemo(()=>({...y,context:j,refs:A,elements:O,rootStore:i}),[y,A,O,j,i])}function X2(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=_f(),l=Lp()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=zr(()=>new yb({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const v={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const h0=s5&&a2;function Lj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=Oi(),g=I.useRef(!0);I.useEffect(()=>{const b=n.select("domReferenceElement");if(!c)return;const _=mn(b);function x(){const A=n.select("domReferenceElement");!n.select("open")&&xn(A)&&A===Si(En(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),h0&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),h0&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function b(_){if(_.reason===op||_.reason===db){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",b),()=>{r.off("openchange",b)}},[r,c,n]);const v=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(b){const _=b.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=os(b.nativeEvent);if(l&&_t(x)){if(h0&&!b.relatedTarget){if(!g.current&&!d2(x))return}else if(!c5(x))return}const R=b.relatedTarget&&n.context.triggerElements.hasElement(b.relatedTarget),{nativeEvent:C,currentTarget:A}=b,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,qt(kh,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,qt(kh,C,A))})},onBlur(b){d.current=!1,h.current=null;const _=b.relatedTarget,x=b.nativeEvent,R=_t(_)&&_.hasAttribute(sl("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=Si(C?C.ownerDocument:document);if(!_&&A===C||bt(i.current.floatingContext?.refs.floating.current,A)||bt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>bt(N,O)))return}n.setOpen(!1,qt(kh,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:v,trigger:v}:{},[c,v])}const Rv=sl("safe-polygon"),Bj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${f2}`;function $j(e){return e?!!e.closest(Bj):!1}function W2(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=Oi(),h=Oi(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const Uj=new Set(["click","mousedown"]);function jj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:b,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=W2(n),A=xf(h),O=Lp(),D=Ze(()=>g.current?!0:l.current.openEvent?Uj.has(l.current.openEvent.type):!1),N=Ze(()=>{const se=l.current.openEvent?.type;return se?.includes("mouse")&&se!=="mousedown"}),j=I.useCallback((se,le=!0)=>{const K=Hj(d,y.current);K&&!v.current?R.start(K,()=>n.setOpen(!1,qt(Sr,se))):le&&(R.clear(),n.setOpen(!1,qt(Sr,se)))},[d,v,n,y,R]),B=Ze(()=>{_.current(),v.current=void 0}),k=Ze(()=>{if(b.current){const se=En(i).body;se.style.pointerEvents="",se.removeAttribute(Rv),b.current=!1}}),Z=Ze(se=>{const le=os(se);if(!$j(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,B(),k())},[r,y,x,g,B,k]),I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){b.current=!0;const se=En(i).body;se.setAttribute(Rv,"");const le=c,K=i,Q=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Q&&(Q.style.pointerEvents=""),se.style.pointerEvents="none",le.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{se.style.pointerEvents="",le.style.pointerEvents="",K.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,b]),I.useEffect(()=>{if(!f)return;function se(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),B(),D()||j(ye))}function le(ye){R.clear(),k(),v.current?.(ye),B()}function K(ye){D()||j(ye,!1)}const Q=i;return Q&&(Q.addEventListener("mouseleave",se),Q.addEventListener("mouseenter",le),Q.addEventListener("mouseleave",K),Q.addEventListener("pointerdown",Z,!0)),()=>{Q&&(Q.removeEventListener("mouseleave",se),Q.removeEventListener("mouseenter",le),Q.removeEventListener("mouseleave",K),Q.removeEventListener("pointerdown",Z,!0))}})}function Hj(e,t){return t&&!of(t)?0:typeof e=="function"?e():e}function p0(e){return typeof e=="function"?e():e}const Fj={current:null};function Vj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=Fj,externalTree:v,isActiveTrigger:b=!0}=t,_=xf(v),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:j,restTimeout:B,handleCloseOptionsRef:k}=W2(n),Z=Dr(f),se=Dr(l),le=Dr(h);b&&(k.current=Z.current?.__options);const K=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Q=I.useCallback((W,F=!0)=>{const ve=Ph(se.current,"close",x.current);ve&&!C.current?j.start(ve,()=>n.setOpen(!1,qt(Sr,W))):F&&(j.clear(),n.setOpen(!1,qt(Sr,W)))},[se,C,n,x,j]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const W=En(n.select("domReferenceElement")).body;W.style.pointerEvents="",W.removeAttribute(Rv),O.current=!1}});I.useEffect(()=>{if(!c)return;function W(F){F.open||(j.clear(),B.clear(),A.current=!0,N.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[c,i,j,B,A,N]);const q=Ze(W=>{if(K()||!r.current.floatingContext)return;const F=n.context.triggerElements;if(W.relatedTarget&&F.hasElement(W.relatedTarget))return;const ve=g.current;Z.current?.({...r.current.floatingContext,tree:_,x:W.clientX,y:W.clientY,onClose(){fe(),ye(),!K()&&ve===n.select("domReferenceElement")&&Q(W)}})(W)});return I.useEffect(()=>{if(!c)return;const W=g.current??(b?n.select("domReferenceElement"):null);if(!_t(W))return;function F(P){if(j.clear(),A.current=!1,d&&!of(x.current)||p0(le.current)>0&&!Ph(se.current,"open"))return;const ne=Ph(se.current,"open",x.current),ie=n.select("domReferenceElement"),de=n.context.triggerElements,Ce=(de.hasElement(P.target)||de.hasMatchingElement(He=>bt(He,P.target)))&&(!ie||!bt(ie,P.target)),Se=P.currentTarget??null,be=n.select("open"),Ye=!be||Ce;Ce&&be?n.setOpen(!0,qt(Sr,P,Se)):ne?j.start(ne,()=>{Ye&&n.setOpen(!0,qt(Sr,P,Se))}):Ye&&n.setOpen(!0,qt(Sr,P,Se))}function ve(P){if(K()){fe();return}D.current();const ne=n.select("domReferenceElement"),ie=En(ne);B.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(Z.current&&r.current.floatingContext){n.select("open")||j.clear();const Se=g.current;C.current=Z.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!K()&&Se===n.select("domReferenceElement")&&Q(P,!0)}});const be=C.current;be(P),ie.addEventListener("mousemove",be),D.current=()=>{ie.removeEventListener("mousemove",be)};return}(x.current!=="touch"||!bt(n.select("floatingElement"),P.relatedTarget))&&Q(P)}function Te(P){q(P)}return n.select("open")&&W.addEventListener("mouseleave",Te),y&&W.addEventListener("mousemove",F,{once:!0}),W.addEventListener("mouseenter",F),W.addEventListener("mouseleave",ve),()=>{W.removeEventListener("mouseleave",Te),y&&W.removeEventListener("mousemove",F),W.removeEventListener("mouseenter",F),W.removeEventListener("mouseleave",ve)}},[ye,fe,A,r,se,Q,n,c,Z,q,b,K,d,y,x,le,B,N,j,g,_,D,C]),I.useMemo(()=>{function W(F){x.current=F.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(F){const{nativeEvent:ve}=F,Te=F.currentTarget,P=n.select("domReferenceElement"),ne=n.context.triggerElements,ie=n.select("open"),de=(ne.hasElement(F.target)||ne.hasMatchingElement(Se=>bt(Se,F.target)))&&(!P||!bt(P,F.target));if(d&&!of(x.current)||ie&&!de||p0(le.current)===0||!de&&N.current&&F.movementX**2+F.movementY**2<2)return;B.clear();function Ce(){if(N.current=!1,K())return;const Se=n.select("open");!A.current&&(!Se||de)&&n.setOpen(!0,qt(Sr,ve,Te))}x.current==="touch"?ki.flushSync(()=>{Ce()}):de&&ie?Ce():(N.current=!0,B.start(p0(le.current),Ce))}}},[A,K,d,n,x,le,B,N])}function J2(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>bh(h,e,"reference"),t),l=I.useCallback(h=>bh(h,e,"floating"),n),f=I.useCallback(h=>bh(h,e,"item"),r),d=I.useCallback(h=>bh(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function bh(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[vv]="");for(const l in e)i&&e&&(l===l2||l===u2)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const qj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Gj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=_f(),y=c?.id||h,g=I.useMemo(()=>bv(l)?.id||i,[l,i]),v=qj.get(d)??d,_=Lp()!=null,x=I.useMemo(()=>v==="tooltip"||d==="label"?Ds:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,_,d]),R=I.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...v==="menu"&&{id:y}},[v,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?O:{...O,...v==="menu"&&{"aria-labelledby":y}}},[v,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function fC(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function Kj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Zj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ii;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),_=b-d;if(l===null||f===null||_===0)return l=g,f=v,d=b,null;const x=g-l,R=v-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=v,d=b,A}const y=({x:g,y:v,placement:b,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||b==null||g==null||v==null)return;const{clientX:N,clientY:j}=O,B=[N,j],k=os(O),Z=O.type==="mouseleave",se=bt(_.floating,k),le=bt(_.domReference,k),K=_.domReference.getBoundingClientRect(),Q=_.floating.getBoundingClientRect(),ye=b.split("-")[0],fe=g>Q.right-Q.width/2,q=v>Q.bottom-Q.height/2,W=Kj(B,K),F=Q.width>K.width,ve=Q.height>K.height,Te=(F?K:Q).left,P=(F?K:Q).right,ne=(ve?K:Q).top,ie=(ve?K:Q).bottom;if(se&&(c=!0,!Z))return;if(le&&(c=!1),le&&!Z){c=!0;return}if(Z&&_t(O.relatedTarget)&&bt(_.floating,O.relatedTarget)||C&&Ca(C.nodesRef.current,R).some(({context:Se})=>Se?.open))return;if(ye==="top"&&v>=K.bottom-1||ye==="bottom"&&v<=K.top+1||ye==="left"&&g>=K.right-1||ye==="right"&&g<=K.left+1)return D();let de=[];switch(ye){case"top":de=[[Te,K.top+1],[Te,Q.bottom-1],[P,Q.bottom-1],[P,K.top+1]];break;case"bottom":de=[[Te,Q.top+1],[Te,K.bottom-1],[P,K.bottom-1],[P,Q.top+1]];break;case"left":de=[[Q.right-1,ie],[Q.right-1,ne],[K.left+1,ne],[K.left+1,ie]];break;case"right":de=[[K.right-1,ie],[K.right-1,ne],[Q.left+1,ne],[Q.left+1,ie]];break}function Ce([Se,be]){switch(ye){case"top":{const Ye=[F?Se+t/2:fe?Se+t*4:Se-t*4,be+t+1],He=[F?Se-t/2:fe?Se+t*4:Se-t*4,be+t+1],ht=[[Q.left,fe||F?Q.bottom-t:Q.top],[Q.right,fe?F?Q.bottom-t:Q.top:Q.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[F?Se+t/2:fe?Se+t*4:Se-t*4,be-t],He=[F?Se-t/2:fe?Se+t*4:Se-t*4,be-t],ht=[[Q.left,fe||F?Q.top+t:Q.bottom],[Q.right,fe?F?Q.top+t:Q.bottom:Q.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[Se+t+1,ve?be+t/2:q?be+t*4:be-t*4],He=[Se+t+1,ve?be-t/2:q?be+t*4:be-t*4];return[...[[q||ve?Q.right-t:Q.left,Q.top],[q?ve?Q.right-t:Q.left:Q.right-t,Q.bottom]],Ye,He]}case"right":{const Ye=[Se-t,ve?be+t/2:q?be+t*4:be-t*4],He=[Se-t,ve?be-t/2:q?be+t*4:be-t*4],ht=[[q||ve?Q.left+t:Q.right,Q.top],[q?ve?Q.left+t:Q.right:Q.left+t,Q.bottom]];return[Ye,He,...ht]}default:return[]}}if(!fC([N,j],de)){if(c&&!W)return D();if(!Z&&r){const Se=h(O.clientX,O.clientY);if(Se!==null&&Se<.1)return D()}fC([N,j],Ce([g,v]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let Qj=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Yj=(function(e){return e[e.open=wa.open]="open",e[e.closed=wa.closed]="closed",e[e.startingStyle=wa.startingStyle]="startingStyle",e[e.endingStyle=wa.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const eO=I.createContext(void 0);function Xj(){const e=I.useContext(eO);if(e===void 0)throw new Error(wo(26));return e}const tO="ArrowUp",nO="ArrowDown",sO="ArrowLeft",rO="ArrowRight",oO="Home",iO="End",Wj=new Set([sO,rO]),Jj=new Set([tO,nO]),e9=new Set([...Wj,...Jj]);[...e9];const t9=new Set([tO,nO,sO,rO,oO,iO]),n9={...Ef,...hb,nestedDialogOpen(e){return e?{[Yj.nestedDialogOpen]:""}:null}},s9=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=$a(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),b=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");Xj(),vb({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function j(le){return le==="touch"?d.context.popupRef.current:!0}const B=c===void 0?j:c,k=R>0,Z=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),se=cr("div",t,{state:Z,props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){t9.has(le.key)&&le.stopPropagation()},style:{[Qj.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:n9});return $.jsx(y8,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:B,returnFocus:i,modal:b!==!1,restoreFocus:"popup",children:se})});function r9(e){return sb(19)?e:e?"true":void 0}const o9=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( 0% 0%, 100% 0%, 100% 100%, @@ -18,9 +18,9 @@ Error generating stack: `+u.message+` ${l.right}px ${l.bottom}px, ${l.right}px ${l.top}px, ${l.left}px ${l.top}px - )`}return $.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),o9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=Ba(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?$.jsx(eO.Provider,{value:r,children:$.jsxs(f8,{ref:n,...i,children:[l&&f===!0&&$.jsx(r9,{ref:c.context.internalBackdropRef,inert:s9(!d)}),t.children]})}):null});let dC={},hC={},pC="";function i9(e){if(typeof document>"u")return!1;const t=La(e);return mn(t).innerWidth-t.documentElement.clientWidth>0}function a9(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=La(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function c9(e){const t=La(e),n=t.documentElement,r=t.body,i=za(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function l9(e){const t=La(e),n=t.documentElement,r=t.body,i=mn(n);let c=0,l=0,f=!1;const d=Mr.create();if(t5&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=i.getComputedStyle(n),b=i.getComputedStyle(r),R=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,dC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},pC=n.style.scrollBehavior,hC={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||b.overflowY==="scroll",D=v.overflowX==="scroll"||b.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),j=Math.max(0,i.innerHeight-r.clientHeight),B=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),Z=za(n)?n:r;if(f=a9(e),f){n.style.scrollbarGutter=R,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:B||j?`calc(100dvh - ${B+j}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,dC),Object.assign(r.style,hC),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=pC)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class u9{lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=La(t).documentElement,i=mn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=LI;return}const c=i2||!i9(t);this.restore=c?c9(t):l9(t)}}const f9=new u9;function d9(e=!0,t=null){mt(()=>{if(e)return f9.acquire(t)},[e,t])}function h9(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function p9(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(i2?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=h9(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function m9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=p9(i);K2(t);const{forceUnmount:g}=Z2(i,t,()=>{y()}),v=Ze(se=>{const le=qt(se);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),b=I.useCallback(()=>{t.setOpen(!1,v(C2))},[t,v]);I.useImperativeHandle(r,()=>({unmount:g,close:b}),[g,b]);const _=X2({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=qj(_),O=V2(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(se){if("button"in se&&se.button!==0||"touches"in se&&se.touches.length!==1)return!1;const le=os(se);if(C&&!c){const K=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||bt(K,f)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});d9(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:j}=J2([A,O]);t.useContextCallback("onNestedDialogOpen",se=>{R(se+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const B=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>j(h),[j,h]),Z=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:B,inactiveTriggerProps:k,popupProps:Z,floatingRootContext:_,nestedOpenDialogCount:x})}const g9={...Y2,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class y9 extends gb{constructor(t){super(v9(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new $p,onOpenChange:void 0,onOpenChangeComplete:void 0},g9)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function v9(e={}){return{...Q2(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function b9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=Ba(!0),b=!!v,_=zr(()=>h?.store??new y9({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:b})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:b,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");m9({store:_,actionsRef:d,parentContext:v?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return $.jsx(T2.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const S9=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=Ba(),d=ab(c);return f.useSyncedValueWithCleanup("titleElementId",d),cr("h2",t,{ref:n,props:[{id:d},l]})});function _9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(b9,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function w9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(o9,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function E9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(X5,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function x9(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(E9,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=tn("data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&$.jsxs(W5,{"data-slot":"sheet-close",render:$.jsx(el,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[$.jsx(j$,{}),$.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let v;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(v=$.jsxs(w9,{children:[h,$.jsxs(n9,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=v):v=t[16],v}function R9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function C9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(S9,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function T9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(J5,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const aO=I.createContext(void 0);function Rf(e){const t=I.useContext(aO);if(t===void 0&&!e)throw new Error(wo(72));return t}const A9={...Y2,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class bb extends gb{constructor(t){super({...I9(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new $p},A9)}setOpen=(t,n)=>{const r=n.reason,i=r===Sr,c=t&&r===kh,l=!t&&(r===op||r===db);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===Sr&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?ki.flushSync(f):f()};static useStore(t,n){const r=zr(()=>new bb(n)).current,i=t??r,c=X2({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function I9(){return{...Q2(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function O9(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:v}=e,b=bb.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});b.useControlledProp("open",r,n),b.useControlledProp("activeTriggerId",y,g),b.useContextCallback("onOpenChange",f),b.useContextCallback("onOpenChangeComplete",d);const _=b.useState("open"),x=!t&&_,R=b.useState("activeTriggerId"),C=b.useState("payload");b.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&b.setOpen(!1,qt(j5))},[_,t,b]),b.useSyncedValue("disabled",t),K2(b);const{forceUnmount:A,transitionStatus:O}=Z2(x,b),D=b.useState("isInstantPhase"),N=b.useState("instantType"),j=b.useState("lastOpenChangeReason"),B=I.useRef(null);mt(()=>{O==="ending"&&j===fb||O!=="ending"&&D?(N!=="delay"&&(B.current=N),b.set("instantType","delay")):B.current!==null&&(b.set("instantType",B.current),B.current=null)},[O,D,j,N,b]),mt(()=>{x&&R==null&&b.set("payload",void 0)},[b,R,x]);const k=I.useCallback(()=>{b.setOpen(!1,M9(b,C2))},[b]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const Z=b.useState("floatingRootContext"),se=zj(Z,{enabled:!t}),le=V2(Z,{enabled:!t,referencePress:!0}),K=v8(Z,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Q,getFloatingProps:ye,getTriggerProps:fe}=J2([se,le,K]),q=I.useMemo(()=>Q(),[Q]),W=I.useMemo(()=>fe(),[fe]),H=I.useMemo(()=>ye(),[ye]);return b.useSyncedValues({activeTriggerProps:q,inactiveTriggerProps:W,popupProps:H}),$.jsx(aO.Provider,{value:b,children:typeof v=="function"?v({payload:C}):v})}function M9(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const cO=I.createContext(void 0);function D9(){return I.useContext(cO)}const k9=600,P9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,v=Rf(!0),b=c?.store??v;if(!b)throw new Error(wo(82));const _=ab(y),x=b.useState("isTriggerActive",_),R=b.useState("isOpenedByTrigger",_),C=b.useState("floatingRootContext"),A=I.useRef(null),O=d??k9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:j}=Dj(_,A,b,{payload:l,closeDelay:D}),B=D9(),{delayRef:k,isInstantPhase:Z,hasProvider:se}=o8(C,{open:R});b.useSyncedValue("isInstantPhase",Z);const le=b.useState("disabled"),K=f??le,Q=b.useState("trackCursorAxis"),ye=b.useState("disableHoverablePopup"),fe=Fj(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!ye&&Q!=="both"?Kj():null,restMs(){const ve=B?.delay,Te=typeof k.current=="object"?k.current.open:void 0;let P=O;return se&&(Te!==0?P=d??ve??O:P=0),P},delay(){const ve=typeof k.current=="object"?k.current.close:void 0;let Te=D;return h==null&&se&&(Te=ve),{close:Te}},triggerElementRef:A,isActiveTrigger:x}),q=I.useMemo(()=>({open:R}),[R]),W=b.useState("triggerProps",j);return cr("button",t,{state:q,ref:[n,N,A],props:[fe,W,{id:_},g],stateAttributesMapping:Q5})}),lO=I.createContext(void 0);function N9(){const e=I.useContext(lO);if(e===void 0)throw new Error(wo(70));return e}const z9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=N2({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:$.jsxs(I.Fragment,{children:[h,d&&ki.createPortal(r,d)]})}),L9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Rf().useState("mounted")||r?$.jsx(lO.Provider,{value:r,children:$.jsx(z9,{ref:n,...i})}):null}),uO=I.createContext(void 0);function fO(){const e=I.useContext(uO);if(e===void 0)throw new Error(wo(71));return e}const B9=I.createContext(void 0);function $9(){return I.useContext(B9)?.direction??"ltr"}const U9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=bo(e,t)||{};if(h==null)return{};const v=h2(y),b={x:n,y:r},_=ub(i),x=lb(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-b[_]-c.floating[x],j=b[_]-c.reference[_],B=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.(B))&&(k=f.floating[D]||c.floating[x]);const Z=N/2-j/2,se=k/2-R[x]/2-1,le=Math.min(v[A],se),K=Math.min(v[O],se),Q=le,ye=k-R[x]-K,fe=k/2-R[x]/2+Z,q=Sv(Q,fe,ye),W=!d.arrow&&Ni(i)!=null&&fe!==q&&c.reference[x]/2-(fe({...U9(e),options:[e,t]}),H9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await rj().fn(e)).data?.referenceHidden||c}}}},zh={sideX:"left",sideY:"top"},F9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=mn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:zh};const g=await c.getOffsetParent?.(i);let v={width:0,height:0};if(l==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=La(i);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=gs(f);let _=t,x=n;b==="left"&&(_=v.width-(t+r.width)),b==="top"&&(x=v.height-(n+r.height));const R=b==="left"?"right":zh.sideX,C=b==="top"?"bottom":zh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function dO(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function mC(e,t,n){const{rects:r,placement:i}=e;return{side:dO(t,gs(i),n),align:Ni(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function V9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,j]=I.useState(null);!_&&N!==null&&j(null);const B=x.side||"flip",k=x.align||"flip",Z=x.fallbackAxisSide||"end",se=typeof t=="function"?t:void 0,le=Ze(se),K=se?le:t,Q=Dr(t),fe=$9()==="rtl",q=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],W=c==="center"?q:`${q}-${c}`;let H=d;const ve=1,Te=r==="bottom"?ve:0,P=r==="top"?ve:0,ne=r==="right"?ve:0,ie=r==="left"?ve:0;typeof H=="number"?H={top:H+Te,right:H+ie,bottom:H+P,left:H+ne}:H&&(H={top:(H.top||0)+Te,right:(H.right||0)+ie,bottom:(H.bottom||0)+P,left:(H.left||0)+ne});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:H},Ce=I.useRef(null),Se=Dr(i),be=Dr(l),ht=[J8(Zt=>{const Vn=mC(Zt,r,fe),Us=typeof Se.current=="function"?Se.current(Vn):Se.current,Dn=typeof be.current=="function"?be.current(Vn):be.current;return{mainAxis:Us,crossAxis:Dn,alignmentAxis:Dn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ft=k==="none"&&B!=="shift",oe=!Ft&&(h||R||B==="shift"),Fe=B==="none"?null:nj({...de,padding:{top:H.top+ve,right:H.right+ve,bottom:H.bottom+ve,left:H.left+ve},mainAxis:!R&&B==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),Ie=Ft?null:ej(Zt=>{const Vn=La(Zt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:Vn.clientWidth,height:Vn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:oe,limiter:h||R?void 0:tj(Us=>{if(!Ce.current)return{};const{width:Dn,height:dr}=Ce.current.getBoundingClientRect(),hr=ar(gs(Us.placement)),js=hr==="y"?Dn:dr,Ho=hr==="y"?H.left+H.right:H.top+H.bottom;return{offset:js/2+Ho/2}})}},[de,h,R,H,k]);B==="shift"||k==="shift"||c==="center"?ht.push(Ie,Fe):ht.push(Fe,Ie),ht.push(sj({...de,apply({elements:{floating:Zt},rects:{reference:Vn},availableWidth:Us,availableHeight:Dn}){Object.entries({"--available-width":`${Us}px`,"--available-height":`${Dn}px`,"--anchor-width":`${Vn.width}px`,"--anchor-height":`${Vn.height}px`}).forEach(([dr,hr])=>{Zt.style.setProperty(dr,hr)})}}),j9(()=>({element:Ce.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Zt){const{elements:Vn,middlewareData:Us,placement:Dn,rects:dr,y:hr}=Zt,js=gs(Dn),Ho=ar(js),Fo=Ce.current,Rm=Us.arrow?.x||0,Vf=Us.arrow?.y||0,Nl=Fo?.clientWidth||0,Yi=Fo?.clientHeight||0,zl=Rm+Nl/2,Ll=Vf+Yi/2,qf=Math.abs(Us.shift?.y||0),Gf=dr.reference.height/2,Hr=typeof i=="function"?i(mC(Zt,r,fe)):i,Bl=qf>Hr,Kf={top:`${zl}px calc(100% + ${Hr}px)`,bottom:`${zl}px ${-Hr}px`,left:`calc(100% + ${Hr}px) ${Ll}px`,right:`${-Hr}px ${Ll}px`}[js],Zf=`${zl}px ${dr.reference.y+Gf-hr}px`;return Vn.floating.style.setProperty("--transform-origin",oe&&Ho==="y"&&Bl?Zf:Kf),{}}},H9,A),mt(()=>{!_&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,b]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:_e,elements:Ne,x:qe,y:Qe,middlewareData:ut,update:Be,placement:Le,context:rn,isPositioned:it,floatingStyles:_s}=Nj({rootContext:b,placement:W,middleware:ht,strategy:n,whileElementsMounted:v?void 0:(...Zt)=>iC(...Zt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:$t}=ut.adaptiveOrigin||zh,Ut=it?n:"fixed",on=I.useMemo(()=>A?{position:Ut,[gt]:qe,[$t]:Qe}:{position:Ut,..._s},[A,Ut,gt,qe,$t,Qe,_s]),ws=I.useRef(null);mt(()=>{if(!_)return;const Zt=Q.current,Vn=typeof Zt=="function"?Zt():Zt,Dn=(gC(Vn)?Vn.current:Vn)||null||null;Dn!==ws.current&&(_e.setPositionReference(Dn),ws.current=Dn)},[_,_e,K,Q]),I.useEffect(()=>{if(!_)return;const Zt=Q.current;typeof Zt!="function"&&gC(Zt)&&Zt.current!==ws.current&&(_e.setPositionReference(Zt.current),ws.current=Zt.current)},[_,_e,K,Q]),I.useEffect(()=>{if(v&&_&&Ne.domReference&&Ne.floating)return iC(Ne.domReference,Ne.floating,Be,Pt)},[v,_,Ne,Be,Pt]);const $s=gs(Le),Ff=dO(r,$s,fe),jo=Ni(Le)||"center",Hn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&j($s)},[O,_,it,$s]);const fr=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Fn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:on,arrowStyles:fr,arrowRef:Ce,arrowUncentered:Fn,side:Ff,align:jo,physicalSide:$s,anchorHidden:Hn,refs:_e,context:rn,isPositioned:it,update:Be}),[on,fr,Ce,Fn,Ff,jo,$s,Hn,_e,rn,it,Be])}function gC(e){return e!=null&&"current"in e}function hO(e){return e==="starting"?l$:Ds}const q9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=f$,...C}=t,A=Rf(),O=N9(),D=A.useState("open"),N=A.useState("mounted"),j=A.useState("trackCursorAxis"),B=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),Z=A.useState("instantType"),se=A.useState("transitionStatus"),le=A.useState("hasViewport"),K=V9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:_,arrowPadding:b,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?F9:void 0}),Q=I.useMemo(()=>{const W={};return(!D||j==="both"||B)&&(W.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...W}}},[D,j,B,N,K.positionerStyles]),ye=I.useMemo(()=>({open:D,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":Z}),[D,K.side,K.align,K.anchorHidden,j,Z]),fe=I.useMemo(()=>({...ye,arrowRef:K.arrowRef,arrowStyles:K.arrowStyles,arrowUncentered:K.arrowUncentered}),[ye,K.arrowRef,K.arrowStyles,K.arrowUncentered]),q=cr("div",t,{state:ye,props:[Q,hO(se),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:Ef});return $.jsx(uO.Provider,{value:fe,children:q})}),G9={...Ef,...hb},K9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Rf(),{side:f,align:d}=fO(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("floatingRootContext");vb({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");Uj(b,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return cr("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[v,hO(g),c],stateAttributesMapping:G9})}),Z9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Rf().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=fO(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:v,instant:f}),[d,y,g,v,f]);return cr("div",t,{state:_,ref:[n,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Ef})}),Q9=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return $.jsx(cO.Provider,{value:c,children:$.jsx(r8,{delay:l,timeoutMs:i,children:t.children})})};function Y9(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=$.jsx(Q9,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function X9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(Y9,{children:$.jsx(O9,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function W9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(P9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function J9(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,v=d===void 0?0:d;let b;t[8]!==r?(b=tn("data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=b):b=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=$.jsx(Z9,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==b?(x=$.jsxs(K9,{className:b,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=b,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==v||t[17]!==h||t[18]!==y||t[19]!==x?(R=$.jsx(L9,{children:$.jsx(q9,{align:g,alignOffset:v,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=v,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const eH=768,pO=`(max-width: ${eH-1}px)`;function tH(e){const t=window.matchMedia(pO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function nH(){return window.matchMedia(pO).matches}function sH(){return I.useSyncExternalStore(tH,nH)}const rH="sidebar_state",oH=3600*24*7,iH="12rem",aH="16rem",cH="3rem",lH="b",mO=I.createContext(null);function Up(){const e=I.useContext(mO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function uH(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=sH(),[g,v]=I.useState(!1),[b,_]=I.useState(h),x=i??b;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${rH}=${fe}; path=/; max-age=${oH}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?v(dH):C(fH),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===lH&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const j=x?"expanded":"collapsed";let B;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==j||t[22]!==O?(B={state:j,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:v,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=j,t[22]=O,t[23]=B):B=t[23];const k=B;let Z;t[24]!==r?(Z=tn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=Z):Z=t[25];let se;t[26]!==f?(se={"--sidebar-width":iH,"--sidebar-width-icon":cH,...f},t[26]=f,t[27]=se):se=t[27];const le=se;let K;t[28]!==n||t[29]!==c||t[30]!==Z||t[31]!==le?(K=$.jsx("div",{className:Z,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=Z,t[31]=le,t[32]=K):K=t[32];let Q;return t[33]!==k||t[34]!==K?(Q=$.jsx(mO.Provider,{value:k,children:K}),t[33]=k,t[34]=K,t[35]=Q):Q=t[35],Q}function fH(e){return!e}function dH(e){return!e}function hH(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:v,openMobile:b,setOpenMobile:_}=Up();if(y==="none"){let Z;t[7]!==r?(Z=tn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=Z):Z=t[8];let se;return t[9]!==n||t[10]!==i||t[11]!==Z?(se=$.jsx("div",{className:Z,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=Z,t[12]=se):se=t[12],se}if(g){let Z;t[13]===Symbol.for("react.memo_cache_sentinel")?(Z={"--sidebar-width":aH},t[13]=Z):Z=t[13];let se;t[14]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsxs(R9,{className:"sr-only",children:[$.jsx(C9,{children:"Sidebar"}),$.jsx(T9,{children:"Displays the mobile sidebar."})]}),t[14]=se):se=t[14];let le;t[15]!==n?(le=$.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let K;t[17]!==d||t[18]!==le?(K=$.jsxs(x9,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:Z,children:[se,le]}),t[17]=d,t[18]=le,t[19]=K):K=t[19];let Q;return t[20]!==b||t[21]!==i||t[22]!==_||t[23]!==K?(Q=$.jsx(_9,{onOpenChange:_,open:b,...i,children:K}),t[20]=b,t[21]=i,t[22]=_,t[23]=K,t[24]=Q):Q=t[24],Q}const x=v==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=tn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=$.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",D=h==="floating"||h==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=tn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let j;t[33]!==n?(j=$.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:n}),t[33]=n,t[34]=j):j=t[34];let B;t[35]!==i||t[36]!==N||t[37]!==j?(B=$.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:j}),t[35]=i,t[36]=N,t[37]=j,t[38]=B):B=t[38];let k;return t[39]!==d||t[40]!==v||t[41]!==B||t[42]!==x||t[43]!==A||t[44]!==h?(k=$.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":v,"data-variant":h,children:[A,B]}),t[39]=d,t[40]=v,t[41]=B,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function pH(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=Up();let l;t[4]!==n?(l=tn(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(z$,{}),h=$.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=$.jsxs(el,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function mH(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=Up();let c;t[3]!==n?(c=tn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offExamples]:translate-x-0 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=$.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function gH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function yH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function m0(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function g0(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=BI,r="div",i=Mp({className:tn("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function Sh(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function ma(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const vH=jI("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ga(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:v,state:b}=Up(),_="button",x=Mp({className:tn(vH({variant:y,size:g}),f)},d),R=l?W9:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=BI(A);if(!l)return O;if(typeof l=="string"){let B;t[7]!==l?(B={children:l},t[7]=l,t[8]=B):B=t[8],l=B}const D=b!=="collapsed"||v;let N;t[9]!==D||t[10]!==l?(N=$.jsx(J9,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let j;return t[12]!==O||t[13]!==N?(j=$.jsxs(X9,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=j):j=t[14],j}function bH(){const e=Ct.c(8),{theme:t,setTheme:n}=YB();let r;e[0]!==n||e[1]!==t?(r=()=>{n(t==="light"?"dark":t==="dark"?"light":"dark")},e[0]=n,e[1]=t,e[2]=r):r=e[2];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=$.jsx($$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=$.jsx(P$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=$.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=$.jsxs(el,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function gO(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=tn("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=$.jsx(pH,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("header",{className:t,children:[n,$.jsx("div",{className:"flex w-full justify-end",children:$.jsx(bH,{})})]}),e[2]=r):r=e[2],r}function SH(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=$.jsx("p",{className:"text-muted-foreground",children:"Page not found"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Kc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class yO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const vO={};function Ma(e){return vO}function bO(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Cv(e,t){return typeof t=="bigint"?t.toString():t}function Sb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _b(e){return e==null}function wb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function _H(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const yC=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==yC)return r===void 0&&(r=yC,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function $a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zi(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function vC(e){return JSON.stringify(e)}function wH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const SO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const EH=Sb(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lf(e){if(lp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(lp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function _O(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e}const xH=new Set(["string","number","symbol"]);function jp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function RH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const CH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function TH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return $a(this,"shape",l),l},checks:[]});return Li(e,c)}function AH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return $a(this,"shape",l),l},checks:[]});return Li(e,c)}function IH(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=zi(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return $a(this,"shape",c),c}});return Li(e,i)}function OH(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return $a(this,"shape",r),r}});return Li(e,n)}function MH(e,t){const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return $a(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function DH(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=zi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return $a(this,"shape",d),d},checks:[]});return Li(t,l)}function kH(e,t,n){const r=zi(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return $a(this,"shape",c),c}});return Li(t,r)}function jc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _h(e){return typeof e=="string"?e:e?.message}function Da(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=_h(e.inst?._zod.def?.error?.(e))??_h(t?.error?.(e))??_h(n.customError?.(e))??_h(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Eb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const EO=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Cv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},xO=ge("$ZodError",EO),Hp=ge("$ZodError",EO,{Parent:Error});function PH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function NH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new Kc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>Da(d,c,Ma())));throw SO(f,i?.callee),f}return l.value},z0e=Fp(Hp),Vp=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>Da(d,c,Ma())));throw SO(f,i?.callee),f}return l.value},L0e=Vp(Hp),qp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Kc;return c.issues.length?{success:!1,error:new(e??xO)(c.issues.map(l=>Da(l,i,Ma())))}:{success:!0,data:c.value}},zH=qp(Hp),Gp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>Da(l,i,Ma())))}:{success:!0,data:c.value}},LH=Gp(Hp),BH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fp(e)(t,n,i)},$H=e=>(t,n,r)=>Fp(e)(t,n,r),UH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(t,n,i)},jH=e=>async(t,n,r)=>Vp(e)(t,n,r),HH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qp(e)(t,n,i)},FH=e=>(t,n,r)=>qp(e)(t,n,r),VH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gp(e)(t,n,i)},qH=e=>async(t,n,r)=>Gp(e)(t,n,r),GH=/^[cC][^\s-]{8,}$/,KH=/^[0-9a-z]+$/,ZH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,QH=/^[0-9a-vA-V]{20}$/,YH=/^[A-Za-z0-9]{27}$/,XH=/^[a-zA-Z0-9_-]{21}$/,WH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JH=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bC=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,e7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function n7(){return new RegExp(t7,"u")}const s7=/^(?:(?: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])$/,r7=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,o7=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,i7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,a7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,RO=/^[A-Za-z0-9_-]*$/,c7=/^\+[1-9]\d{6,14}$/,CO="(?:(?:\\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])))",l7=new RegExp(`^${CO}$`);function TO(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function u7(e){return new RegExp(`^${TO(e)}$`)}function f7(e){const t=TO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${CO}T(?:${r})$`)}const d7=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},h7=/^-?\d+$/,p7=/^-?\d+(?:\.\d+)?$/,m7=/^[^A-Z]*$/,g7=/^[^a-z]*$/,ys=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),AO={number:"number",bigint:"bigint",object:"date"},IO=ge("$ZodCheckLessThan",(e,t)=>{ys.init(e,t);const n=AO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{ys.init(e,t);const n=AO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),y7=ge("$ZodCheckMultipleOf",(e,t)=>{ys.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):_H(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),v7=ge("$ZodCheckNumberFormat",(e,t)=>{ys.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=CH[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=h7)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),b7=ge("$ZodCheckMaxLength",(e,t)=>{var n;ys.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=Eb(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),S7=ge("$ZodCheckMinLength",(e,t)=>{var n;ys.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Eb(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),_7=ge("$ZodCheckLengthEquals",(e,t)=>{var n;ys.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=Eb(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Kp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;ys.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),w7=ge("$ZodCheckRegex",(e,t)=>{Kp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),E7=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=m7),Kp.init(e,t)}),x7=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=g7),Kp.init(e,t)}),R7=ge("$ZodCheckIncludes",(e,t)=>{ys.init(e,t);const n=jp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),C7=ge("$ZodCheckStartsWith",(e,t)=>{ys.init(e,t);const n=new RegExp(`^${jp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),T7=ge("$ZodCheckEndsWith",(e,t)=>{ys.init(e,t);const n=new RegExp(`.*${jp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),A7=ge("$ZodCheckOverwrite",(e,t)=>{ys.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class I7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` + )`}return $.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),i9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=$a(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?$.jsx(eO.Provider,{value:r,children:$.jsxs(d8,{ref:n,...i,children:[l&&f===!0&&$.jsx(o9,{ref:c.context.internalBackdropRef,inert:r9(!d)}),t.children]})}):null});let dC={},hC={},pC="";function a9(e){if(typeof document>"u")return!1;const t=Ba(e);return mn(t).innerWidth-t.documentElement.clientWidth>0}function c9(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=Ba(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function l9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=La(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function u9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=mn(n);let c=0,l=0,f=!1;const d=Mr.create();if(n5&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=i.getComputedStyle(n),b=i.getComputedStyle(r),R=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,dC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},pC=n.style.scrollBehavior,hC={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||b.overflowY==="scroll",D=v.overflowX==="scroll"||b.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),j=Math.max(0,i.innerHeight-r.clientHeight),B=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),Z=La(n)?n:r;if(f=c9(e),f){n.style.scrollbarGutter=R,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:B||j?`calc(100dvh - ${B+j}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,dC),Object.assign(r.style,hC),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=pC)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class f9{lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ba(t).documentElement,i=mn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=LI;return}const c=i2||!a9(t);this.restore=c?l9(t):u9(t)}}const d9=new f9;function h9(e=!0,t=null){mt(()=>{if(e)return d9.acquire(t)},[e,t])}function p9(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function m9(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(i2?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=p9(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function g9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=m9(i);K2(t);const{forceUnmount:g}=Z2(i,t,()=>{y()}),v=Ze(se=>{const le=qt(se);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),b=I.useCallback(()=>{t.setOpen(!1,v(C2))},[t,v]);I.useImperativeHandle(r,()=>({unmount:g,close:b}),[g,b]);const _=X2({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=Gj(_),O=V2(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(se){if("button"in se&&se.button!==0||"touches"in se&&se.touches.length!==1)return!1;const le=os(se);if(C&&!c){const K=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||bt(K,f)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});h9(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:j}=J2([A,O]);t.useContextCallback("onNestedDialogOpen",se=>{R(se+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const B=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>j(h),[j,h]),Z=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:B,inactiveTriggerProps:k,popupProps:Z,floatingRootContext:_,nestedOpenDialogCount:x})}const y9={...Y2,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class v9 extends gb{constructor(t){super(b9(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new $p,onOpenChange:void 0,onOpenChangeComplete:void 0},y9)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function b9(e={}){return{...Q2(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function S9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=$a(!0),b=!!v,_=zr(()=>h?.store??new v9({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:b})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:b,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");g9({store:_,actionsRef:d,parentContext:v?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return $.jsx(T2.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const _9=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=ab(c);return f.useSyncedValueWithCleanup("titleElementId",d),cr("h2",t,{ref:n,props:[{id:d},l]})});function w9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(S9,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function E9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(i9,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function x9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(W5,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function R9(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(x9,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=tn("data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&$.jsxs(J5,{"data-slot":"sheet-close",render:$.jsx(el,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[$.jsx(H$,{}),$.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let v;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(v=$.jsxs(E9,{children:[h,$.jsxs(s9,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=v):v=t[16],v}function C9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function T9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(_9,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function A9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx(e8,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const aO=I.createContext(void 0);function Rf(e){const t=I.useContext(aO);if(t===void 0&&!e)throw new Error(wo(72));return t}const I9={...Y2,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class bb extends gb{constructor(t){super({...O9(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new $p},I9)}setOpen=(t,n)=>{const r=n.reason,i=r===Sr,c=t&&r===kh,l=!t&&(r===op||r===db);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===Sr&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?ki.flushSync(f):f()};static useStore(t,n){const r=zr(()=>new bb(n)).current,i=t??r,c=X2({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function O9(){return{...Q2(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function M9(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:v}=e,b=bb.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});b.useControlledProp("open",r,n),b.useControlledProp("activeTriggerId",y,g),b.useContextCallback("onOpenChange",f),b.useContextCallback("onOpenChangeComplete",d);const _=b.useState("open"),x=!t&&_,R=b.useState("activeTriggerId"),C=b.useState("payload");b.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&b.setOpen(!1,qt(H5))},[_,t,b]),b.useSyncedValue("disabled",t),K2(b);const{forceUnmount:A,transitionStatus:O}=Z2(x,b),D=b.useState("isInstantPhase"),N=b.useState("instantType"),j=b.useState("lastOpenChangeReason"),B=I.useRef(null);mt(()=>{O==="ending"&&j===fb||O!=="ending"&&D?(N!=="delay"&&(B.current=N),b.set("instantType","delay")):B.current!==null&&(b.set("instantType",B.current),B.current=null)},[O,D,j,N,b]),mt(()=>{x&&R==null&&b.set("payload",void 0)},[b,R,x]);const k=I.useCallback(()=>{b.setOpen(!1,D9(b,C2))},[b]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const Z=b.useState("floatingRootContext"),se=Lj(Z,{enabled:!t}),le=V2(Z,{enabled:!t,referencePress:!0}),K=b8(Z,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Q,getFloatingProps:ye,getTriggerProps:fe}=J2([se,le,K]),q=I.useMemo(()=>Q(),[Q]),W=I.useMemo(()=>fe(),[fe]),F=I.useMemo(()=>ye(),[ye]);return b.useSyncedValues({activeTriggerProps:q,inactiveTriggerProps:W,popupProps:F}),$.jsx(aO.Provider,{value:b,children:typeof v=="function"?v({payload:C}):v})}function D9(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const cO=I.createContext(void 0);function k9(){return I.useContext(cO)}const P9=600,N9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,v=Rf(!0),b=c?.store??v;if(!b)throw new Error(wo(82));const _=ab(y),x=b.useState("isTriggerActive",_),R=b.useState("isOpenedByTrigger",_),C=b.useState("floatingRootContext"),A=I.useRef(null),O=d??P9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:j}=kj(_,A,b,{payload:l,closeDelay:D}),B=k9(),{delayRef:k,isInstantPhase:Z,hasProvider:se}=i8(C,{open:R});b.useSyncedValue("isInstantPhase",Z);const le=b.useState("disabled"),K=f??le,Q=b.useState("trackCursorAxis"),ye=b.useState("disableHoverablePopup"),fe=Vj(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!ye&&Q!=="both"?Zj():null,restMs(){const ve=B?.delay,Te=typeof k.current=="object"?k.current.open:void 0;let P=O;return se&&(Te!==0?P=d??ve??O:P=0),P},delay(){const ve=typeof k.current=="object"?k.current.close:void 0;let Te=D;return h==null&&se&&(Te=ve),{close:Te}},triggerElementRef:A,isActiveTrigger:x}),q=I.useMemo(()=>({open:R}),[R]),W=b.useState("triggerProps",j);return cr("button",t,{state:q,ref:[n,N,A],props:[fe,W,{id:_},g],stateAttributesMapping:Y5})}),lO=I.createContext(void 0);function z9(){const e=I.useContext(lO);if(e===void 0)throw new Error(wo(70));return e}const L9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=N2({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:$.jsxs(I.Fragment,{children:[h,d&&ki.createPortal(r,d)]})}),B9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Rf().useState("mounted")||r?$.jsx(lO.Provider,{value:r,children:$.jsx(L9,{ref:n,...i})}):null}),uO=I.createContext(void 0);function fO(){const e=I.useContext(uO);if(e===void 0)throw new Error(wo(71));return e}const $9=I.createContext(void 0);function U9(){return I.useContext($9)?.direction??"ltr"}const j9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=bo(e,t)||{};if(h==null)return{};const v=h2(y),b={x:n,y:r},_=ub(i),x=lb(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-b[_]-c.floating[x],j=b[_]-c.reference[_],B=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.(B))&&(k=f.floating[D]||c.floating[x]);const Z=N/2-j/2,se=k/2-R[x]/2-1,le=Math.min(v[A],se),K=Math.min(v[O],se),Q=le,ye=k-R[x]-K,fe=k/2-R[x]/2+Z,q=Sv(Q,fe,ye),W=!d.arrow&&Ni(i)!=null&&fe!==q&&c.reference[x]/2-(fe({...j9(e),options:[e,t]}),F9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await oj().fn(e)).data?.referenceHidden||c}}}},zh={sideX:"left",sideY:"top"},V9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=mn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:zh};const g=await c.getOffsetParent?.(i);let v={width:0,height:0};if(l==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=Ba(i);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=ys(f);let _=t,x=n;b==="left"&&(_=v.width-(t+r.width)),b==="top"&&(x=v.height-(n+r.height));const R=b==="left"?"right":zh.sideX,C=b==="top"?"bottom":zh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function dO(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function mC(e,t,n){const{rects:r,placement:i}=e;return{side:dO(t,ys(i),n),align:Ni(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function q9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,j]=I.useState(null);!_&&N!==null&&j(null);const B=x.side||"flip",k=x.align||"flip",Z=x.fallbackAxisSide||"end",se=typeof t=="function"?t:void 0,le=Ze(se),K=se?le:t,Q=Dr(t),fe=U9()==="rtl",q=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],W=c==="center"?q:`${q}-${c}`;let F=d;const ve=1,Te=r==="bottom"?ve:0,P=r==="top"?ve:0,ne=r==="right"?ve:0,ie=r==="left"?ve:0;typeof F=="number"?F={top:F+Te,right:F+ie,bottom:F+P,left:F+ne}:F&&(F={top:(F.top||0)+Te,right:(F.right||0)+ie,bottom:(F.bottom||0)+P,left:(F.left||0)+ne});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:F},Ce=I.useRef(null),Se=Dr(i),be=Dr(l),ht=[ej(Zt=>{const qn=mC(Zt,r,fe),Us=typeof Se.current=="function"?Se.current(qn):Se.current,Dn=typeof be.current=="function"?be.current(qn):be.current;return{mainAxis:Us,crossAxis:Dn,alignmentAxis:Dn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ft=k==="none"&&B!=="shift",oe=!Ft&&(h||R||B==="shift"),Fe=B==="none"?null:sj({...de,padding:{top:F.top+ve,right:F.right+ve,bottom:F.bottom+ve,left:F.left+ve},mainAxis:!R&&B==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),Ie=Ft?null:tj(Zt=>{const qn=Ba(Zt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:qn.clientWidth,height:qn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:oe,limiter:h||R?void 0:nj(Us=>{if(!Ce.current)return{};const{width:Dn,height:dr}=Ce.current.getBoundingClientRect(),hr=ar(ys(Us.placement)),js=hr==="y"?Dn:dr,Ho=hr==="y"?F.left+F.right:F.top+F.bottom;return{offset:js/2+Ho/2}})}},[de,h,R,F,k]);B==="shift"||k==="shift"||c==="center"?ht.push(Ie,Fe):ht.push(Fe,Ie),ht.push(rj({...de,apply({elements:{floating:Zt},rects:{reference:qn},availableWidth:Us,availableHeight:Dn}){Object.entries({"--available-width":`${Us}px`,"--available-height":`${Dn}px`,"--anchor-width":`${qn.width}px`,"--anchor-height":`${qn.height}px`}).forEach(([dr,hr])=>{Zt.style.setProperty(dr,hr)})}}),H9(()=>({element:Ce.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Zt){const{elements:qn,middlewareData:Us,placement:Dn,rects:dr,y:hr}=Zt,js=ys(Dn),Ho=ar(js),Fo=Ce.current,Rm=Us.arrow?.x||0,Vf=Us.arrow?.y||0,Nl=Fo?.clientWidth||0,Xi=Fo?.clientHeight||0,zl=Rm+Nl/2,Ll=Vf+Xi/2,qf=Math.abs(Us.shift?.y||0),Gf=dr.reference.height/2,Hr=typeof i=="function"?i(mC(Zt,r,fe)):i,Bl=qf>Hr,Kf={top:`${zl}px calc(100% + ${Hr}px)`,bottom:`${zl}px ${-Hr}px`,left:`calc(100% + ${Hr}px) ${Ll}px`,right:`${-Hr}px ${Ll}px`}[js],Zf=`${zl}px ${dr.reference.y+Gf-hr}px`;return qn.floating.style.setProperty("--transform-origin",oe&&Ho==="y"&&Bl?Zf:Kf),{}}},F9,A),mt(()=>{!_&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,b]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:_e,elements:Ne,x:qe,y:Qe,middlewareData:ut,update:Be,placement:Le,context:rn,isPositioned:it,floatingStyles:_s}=zj({rootContext:b,placement:W,middleware:ht,strategy:n,whileElementsMounted:v?void 0:(...Zt)=>iC(...Zt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:$t}=ut.adaptiveOrigin||zh,Ut=it?n:"fixed",on=I.useMemo(()=>A?{position:Ut,[gt]:qe,[$t]:Qe}:{position:Ut,..._s},[A,Ut,gt,qe,$t,Qe,_s]),ws=I.useRef(null);mt(()=>{if(!_)return;const Zt=Q.current,qn=typeof Zt=="function"?Zt():Zt,Dn=(gC(qn)?qn.current:qn)||null||null;Dn!==ws.current&&(_e.setPositionReference(Dn),ws.current=Dn)},[_,_e,K,Q]),I.useEffect(()=>{if(!_)return;const Zt=Q.current;typeof Zt!="function"&&gC(Zt)&&Zt.current!==ws.current&&(_e.setPositionReference(Zt.current),ws.current=Zt.current)},[_,_e,K,Q]),I.useEffect(()=>{if(v&&_&&Ne.domReference&&Ne.floating)return iC(Ne.domReference,Ne.floating,Be,Pt)},[v,_,Ne,Be,Pt]);const $s=ys(Le),Ff=dO(r,$s,fe),jo=Ni(Le)||"center",Fn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&j($s)},[O,_,it,$s]);const fr=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Vn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:on,arrowStyles:fr,arrowRef:Ce,arrowUncentered:Vn,side:Ff,align:jo,physicalSide:$s,anchorHidden:Fn,refs:_e,context:rn,isPositioned:it,update:Be}),[on,fr,Ce,Vn,Ff,jo,$s,Fn,_e,rn,it,Be])}function gC(e){return e!=null&&"current"in e}function hO(e){return e==="starting"?u$:Ds}const G9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=d$,...C}=t,A=Rf(),O=z9(),D=A.useState("open"),N=A.useState("mounted"),j=A.useState("trackCursorAxis"),B=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),Z=A.useState("instantType"),se=A.useState("transitionStatus"),le=A.useState("hasViewport"),K=q9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:_,arrowPadding:b,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?V9:void 0}),Q=I.useMemo(()=>{const W={};return(!D||j==="both"||B)&&(W.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...W}}},[D,j,B,N,K.positionerStyles]),ye=I.useMemo(()=>({open:D,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":Z}),[D,K.side,K.align,K.anchorHidden,j,Z]),fe=I.useMemo(()=>({...ye,arrowRef:K.arrowRef,arrowStyles:K.arrowStyles,arrowUncentered:K.arrowUncentered}),[ye,K.arrowRef,K.arrowStyles,K.arrowUncentered]),q=cr("div",t,{state:ye,props:[Q,hO(se),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:Ef});return $.jsx(uO.Provider,{value:fe,children:q})}),K9={...Ef,...hb},Z9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Rf(),{side:f,align:d}=fO(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("floatingRootContext");vb({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");jj(b,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return cr("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[v,hO(g),c],stateAttributesMapping:K9})}),Q9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Rf().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=fO(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:v,instant:f}),[d,y,g,v,f]);return cr("div",t,{state:_,ref:[n,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Ef})}),Y9=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return $.jsx(cO.Provider,{value:c,children:$.jsx(o8,{delay:l,timeoutMs:i,children:t.children})})};function X9(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=$.jsx(Y9,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function W9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(X9,{children:$.jsx(M9,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function J9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=$.jsx(N9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function eH(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,v=d===void 0?0:d;let b;t[8]!==r?(b=tn("data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=b):b=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=$.jsx(Q9,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==b?(x=$.jsxs(Z9,{className:b,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=b,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==v||t[17]!==h||t[18]!==y||t[19]!==x?(R=$.jsx(B9,{children:$.jsx(G9,{align:g,alignOffset:v,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=v,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const tH=768,pO=`(max-width: ${tH-1}px)`;function nH(e){const t=window.matchMedia(pO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function sH(){return window.matchMedia(pO).matches}function rH(){return I.useSyncExternalStore(nH,sH)}const oH="sidebar_state",iH=3600*24*7,aH="12rem",cH="16rem",lH="3rem",uH="b",mO=I.createContext(null);function Up(){const e=I.useContext(mO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function fH(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=rH(),[g,v]=I.useState(!1),[b,_]=I.useState(h),x=i??b;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${oH}=${fe}; path=/; max-age=${iH}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?v(hH):C(dH),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===uH&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const j=x?"expanded":"collapsed";let B;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==j||t[22]!==O?(B={state:j,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:v,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=j,t[22]=O,t[23]=B):B=t[23];const k=B;let Z;t[24]!==r?(Z=tn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=Z):Z=t[25];let se;t[26]!==f?(se={"--sidebar-width":aH,"--sidebar-width-icon":lH,...f},t[26]=f,t[27]=se):se=t[27];const le=se;let K;t[28]!==n||t[29]!==c||t[30]!==Z||t[31]!==le?(K=$.jsx("div",{className:Z,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=Z,t[31]=le,t[32]=K):K=t[32];let Q;return t[33]!==k||t[34]!==K?(Q=$.jsx(mO.Provider,{value:k,children:K}),t[33]=k,t[34]=K,t[35]=Q):Q=t[35],Q}function dH(e){return!e}function hH(e){return!e}function pH(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:v,openMobile:b,setOpenMobile:_}=Up();if(y==="none"){let Z;t[7]!==r?(Z=tn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=Z):Z=t[8];let se;return t[9]!==n||t[10]!==i||t[11]!==Z?(se=$.jsx("div",{className:Z,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=Z,t[12]=se):se=t[12],se}if(g){let Z;t[13]===Symbol.for("react.memo_cache_sentinel")?(Z={"--sidebar-width":cH},t[13]=Z):Z=t[13];let se;t[14]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsxs(C9,{className:"sr-only",children:[$.jsx(T9,{children:"Sidebar"}),$.jsx(A9,{children:"Displays the mobile sidebar."})]}),t[14]=se):se=t[14];let le;t[15]!==n?(le=$.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let K;t[17]!==d||t[18]!==le?(K=$.jsxs(R9,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:Z,children:[se,le]}),t[17]=d,t[18]=le,t[19]=K):K=t[19];let Q;return t[20]!==b||t[21]!==i||t[22]!==_||t[23]!==K?(Q=$.jsx(w9,{onOpenChange:_,open:b,...i,children:K}),t[20]=b,t[21]=i,t[22]=_,t[23]=K,t[24]=Q):Q=t[24],Q}const x=v==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=tn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=$.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",D=h==="floating"||h==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=tn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let j;t[33]!==n?(j=$.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:n}),t[33]=n,t[34]=j):j=t[34];let B;t[35]!==i||t[36]!==N||t[37]!==j?(B=$.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:j}),t[35]=i,t[36]=N,t[37]=j,t[38]=B):B=t[38];let k;return t[39]!==d||t[40]!==v||t[41]!==B||t[42]!==x||t[43]!==A||t[44]!==h?(k=$.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":v,"data-variant":h,children:[A,B]}),t[39]=d,t[40]=v,t[41]=B,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function mH(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=Up();let l;t[4]!==n?(l=tn(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(L$,{}),h=$.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=$.jsxs(el,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function gH(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=Up();let c;t[3]!==n?(c=tn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offExamples]:translate-x-0 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=$.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function yH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function vH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function m0(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function g0(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=BI,r="div",i=Mp({className:tn("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function Sh(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function ga(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=tn("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=$.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const bH=jI("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ya(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:v,state:b}=Up(),_="button",x=Mp({className:tn(bH({variant:y,size:g}),f)},d),R=l?J9:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=BI(A);if(!l)return O;if(typeof l=="string"){let B;t[7]!==l?(B={children:l},t[7]=l,t[8]=B):B=t[8],l=B}const D=b!=="collapsed"||v;let N;t[9]!==D||t[10]!==l?(N=$.jsx(eH,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let j;return t[12]!==O||t[13]!==N?(j=$.jsxs(W9,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=j):j=t[14],j}function SH(){const e=Ct.c(8),{theme:t,setTheme:n}=XB();let r;e[0]!==n||e[1]!==t?(r=()=>{n(t==="light"?"dark":t==="dark"?"light":"dark")},e[0]=n,e[1]=t,e[2]=r):r=e[2];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=$.jsx(U$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=$.jsx(N$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=$.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=$.jsxs(el,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function gO(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=tn("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=$.jsx(mH,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("header",{className:t,children:[n,$.jsx("div",{className:"flex w-full justify-end",children:$.jsx(SH,{})})]}),e[2]=r):r=e[2],r}function _H(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=$.jsx("p",{className:"text-muted-foreground",children:"Page not found"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=$.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Kc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class yO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const vO={};function Da(e){return vO}function bO(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Cv(e,t){return typeof t=="bigint"?t.toString():t}function Sb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _b(e){return e==null}function wb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function wH(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const yC=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==yC)return r===void 0&&(r=yC,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zi(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function vC(e){return JSON.stringify(e)}function EH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const SO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const xH=Sb(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lf(e){if(lp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(lp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function _O(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e}const RH=new Set(["string","number","symbol"]);function jp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function CH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const TH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function AH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function IH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function OH(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=zi(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Ua(this,"shape",c),c}});return Li(e,i)}function MH(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ua(this,"shape",r),r}});return Li(e,n)}function DH(e,t){const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ua(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function kH(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=zi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Ua(this,"shape",d),d},checks:[]});return Li(t,l)}function PH(e,t,n){const r=zi(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return Ua(this,"shape",c),c}});return Li(t,r)}function jc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _h(e){return typeof e=="string"?e:e?.message}function ka(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=_h(e.inst?._zod.def?.error?.(e))??_h(t?.error?.(e))??_h(n.customError?.(e))??_h(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Eb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const EO=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Cv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},xO=ge("$ZodError",EO),Hp=ge("$ZodError",EO,{Parent:Error});function NH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function zH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new Kc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw SO(f,i?.callee),f}return l.value},$0e=Fp(Hp),Vp=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw SO(f,i?.callee),f}return l.value},U0e=Vp(Hp),qp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Kc;return c.issues.length?{success:!1,error:new(e??xO)(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},LH=qp(Hp),Gp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},BH=Gp(Hp),$H=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fp(e)(t,n,i)},UH=e=>(t,n,r)=>Fp(e)(t,n,r),jH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(t,n,i)},HH=e=>async(t,n,r)=>Vp(e)(t,n,r),FH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qp(e)(t,n,i)},VH=e=>(t,n,r)=>qp(e)(t,n,r),qH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gp(e)(t,n,i)},GH=e=>async(t,n,r)=>Gp(e)(t,n,r),KH=/^[cC][^\s-]{8,}$/,ZH=/^[0-9a-z]+$/,QH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,YH=/^[0-9a-vA-V]{20}$/,XH=/^[A-Za-z0-9]{27}$/,WH=/^[a-zA-Z0-9_-]{21}$/,JH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bC=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,t7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,n7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function s7(){return new RegExp(n7,"u")}const r7=/^(?:(?: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])$/,o7=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,i7=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,a7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,c7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,RO=/^[A-Za-z0-9_-]*$/,l7=/^\+[1-9]\d{6,14}$/,CO="(?:(?:\\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])))",u7=new RegExp(`^${CO}$`);function TO(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function f7(e){return new RegExp(`^${TO(e)}$`)}function d7(e){const t=TO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${CO}T(?:${r})$`)}const h7=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},p7=/^-?\d+$/,m7=/^-?\d+(?:\.\d+)?$/,g7=/^[^A-Z]*$/,y7=/^[^a-z]*$/,vs=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),AO={number:"number",bigint:"bigint",object:"date"},IO=ge("$ZodCheckLessThan",(e,t)=>{vs.init(e,t);const n=AO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{vs.init(e,t);const n=AO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),v7=ge("$ZodCheckMultipleOf",(e,t)=>{vs.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):wH(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),b7=ge("$ZodCheckNumberFormat",(e,t)=>{vs.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=TH[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=p7)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),S7=ge("$ZodCheckMaxLength",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=Eb(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),_7=ge("$ZodCheckMinLength",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Eb(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),w7=ge("$ZodCheckLengthEquals",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!_b(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=Eb(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Kp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;vs.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),E7=ge("$ZodCheckRegex",(e,t)=>{Kp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),x7=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=g7),Kp.init(e,t)}),R7=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=y7),Kp.init(e,t)}),C7=ge("$ZodCheckIncludes",(e,t)=>{vs.init(e,t);const n=jp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),T7=ge("$ZodCheckStartsWith",(e,t)=>{vs.init(e,t);const n=new RegExp(`^${jp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),A7=ge("$ZodCheckEndsWith",(e,t)=>{vs.init(e,t);const n=new RegExp(`.*${jp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),I7=ge("$ZodCheckOverwrite",(e,t)=>{vs.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class O7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` `).filter(l=>l),i=Math.min(...r.map(l=>l.length-l.trimStart().length)),c=r.map(l=>l.slice(i)).map(l=>" ".repeat(this.indent*2)+l);for(const l of c)this.content.push(l)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(c=>` ${c}`)];return new t(...n,i.join(` -`))}}const O7={major:4,minor:3,patch:6},vn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=O7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=jc(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=g._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Kc;if(y||b instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=jc(l,v)))});else{if(l.issues.length===v)continue;h||(h=jc(l,v))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if(jc(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new Kc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Kc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=zH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return LH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),xb=ge("$ZodString",(e,t)=>{vn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??d7(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ht=ge("$ZodStringFormat",(e,t)=>{Kp.init(e,t),xb.init(e,t)}),M7=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=JH),Ht.init(e,t)}),D7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=bC(r))}else t.pattern??(t.pattern=bC());Ht.init(e,t)}),k7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e7),Ht.init(e,t)}),P7=ge("$ZodURL",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),N7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=n7()),Ht.init(e,t)}),z7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=XH),Ht.init(e,t)}),L7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=GH),Ht.init(e,t)}),B7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=KH),Ht.init(e,t)}),$7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ZH),Ht.init(e,t)}),U7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=QH),Ht.init(e,t)}),j7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=YH),Ht.init(e,t)}),H7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=f7(t)),Ht.init(e,t)}),F7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=l7),Ht.init(e,t)}),V7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=u7(t)),Ht.init(e,t)}),q7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=WH),Ht.init(e,t)}),G7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=s7),Ht.init(e,t),e._zod.bag.format="ipv4"}),K7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=r7),Ht.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Z7=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=o7),Ht.init(e,t)}),Q7=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=i7),Ht.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function MO(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Y7=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=a7),Ht.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{MO(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function X7(e){if(!RO.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return MO(n)}const W7=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=RO),Ht.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{X7(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),J7=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=c7),Ht.init(e,t)});function eF(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const tF=ge("$ZodJWT",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{eF(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),DO=ge("$ZodNumber",(e,t)=>{vn.init(e,t),e._zod.pattern=e._zod.bag.pattern??p7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),nF=ge("$ZodNumberFormat",(e,t)=>{v7.init(e,t),DO.init(e,t)}),sF=ge("$ZodUnknown",(e,t)=>{vn.init(e,t),e._zod.parse=n=>n}),rF=ge("$ZodNever",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function SC(e,t,n){e.issues.length&&t.issues.push(...wO(n,e.issues)),t.value[n]=e.value}const oF=ge("$ZodArray",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;lSC(h,n,l))):SC(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function up(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...wO(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function kO(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=RH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function PO(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const v=d.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(b=>up(b,n,g,t,y))):up(v,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const iF=ge("$ZodObject",(e,t)=>{if(vn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Sb(()=>kO(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=lp,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const v of l.keys){const b=g[v],_=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},d);x instanceof Promise?y.push(x.then(R=>up(R,f,v,h,_))):up(x,f,v,h,_)}return c?PO(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),aF=ge("$ZodObjectJIT",(e,t)=>{iF.init(e,t);const n=e._zod.parse,r=Sb(()=>kO(t)),i=v=>{const b=new I7(["shape","payload","ctx"]),_=r.value,x=O=>{const D=vC(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;b.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=vC(O),B=v[O]?._zod?.optout==="optional";b.write(`const ${D} = ${x(O)};`),B?b.write(` +`))}}const M7={major:4,minor:3,patch:6},vn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=M7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=jc(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=g._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Kc;if(y||b instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=jc(l,v)))});else{if(l.issues.length===v)continue;h||(h=jc(l,v))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if(jc(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new Kc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Kc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=LH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return BH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),xb=ge("$ZodString",(e,t)=>{vn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??h7(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ht=ge("$ZodStringFormat",(e,t)=>{Kp.init(e,t),xb.init(e,t)}),D7=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=e7),Ht.init(e,t)}),k7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=bC(r))}else t.pattern??(t.pattern=bC());Ht.init(e,t)}),P7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=t7),Ht.init(e,t)}),N7=ge("$ZodURL",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),z7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=s7()),Ht.init(e,t)}),L7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=WH),Ht.init(e,t)}),B7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=KH),Ht.init(e,t)}),$7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ZH),Ht.init(e,t)}),U7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=QH),Ht.init(e,t)}),j7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=YH),Ht.init(e,t)}),H7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=XH),Ht.init(e,t)}),F7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=d7(t)),Ht.init(e,t)}),V7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=u7),Ht.init(e,t)}),q7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=f7(t)),Ht.init(e,t)}),G7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=JH),Ht.init(e,t)}),K7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=r7),Ht.init(e,t),e._zod.bag.format="ipv4"}),Z7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o7),Ht.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Q7=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=i7),Ht.init(e,t)}),Y7=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=a7),Ht.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function MO(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const X7=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=c7),Ht.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{MO(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function W7(e){if(!RO.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return MO(n)}const J7=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=RO),Ht.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{W7(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),eF=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=l7),Ht.init(e,t)});function tF(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const nF=ge("$ZodJWT",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{tF(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),DO=ge("$ZodNumber",(e,t)=>{vn.init(e,t),e._zod.pattern=e._zod.bag.pattern??m7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),sF=ge("$ZodNumberFormat",(e,t)=>{b7.init(e,t),DO.init(e,t)}),rF=ge("$ZodUnknown",(e,t)=>{vn.init(e,t),e._zod.parse=n=>n}),oF=ge("$ZodNever",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function SC(e,t,n){e.issues.length&&t.issues.push(...wO(n,e.issues)),t.value[n]=e.value}const iF=ge("$ZodArray",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;lSC(h,n,l))):SC(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function up(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...wO(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function kO(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=CH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function PO(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const v=d.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(b=>up(b,n,g,t,y))):up(v,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const aF=ge("$ZodObject",(e,t)=>{if(vn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Sb(()=>kO(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=lp,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const v of l.keys){const b=g[v],_=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},d);x instanceof Promise?y.push(x.then(R=>up(R,f,v,h,_))):up(x,f,v,h,_)}return c?PO(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),cF=ge("$ZodObjectJIT",(e,t)=>{aF.init(e,t);const n=e._zod.parse,r=Sb(()=>kO(t)),i=v=>{const b=new O7(["shape","payload","ctx"]),_=r.value,x=O=>{const D=vC(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;b.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=vC(O),B=v[O]?._zod?.optout==="optional";b.write(`const ${D} = ${x(O)};`),B?b.write(` if (${D}.issues.length) { if (${N} in input) { payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ @@ -54,21 +54,21 @@ Error generating stack: `+u.message+` newResult[${N}] = ${D}.value; } - `)}b.write("payload.value = newResult;"),b.write("return payload;");const A=b.compile();return(O,D)=>A(v,O,D)};let c;const l=lp,f=!vO.jitless,h=f&&EH.value,y=t.catchall;let g;e._zod.parse=(v,b)=>{g??(g=r.value);const _=v.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=i(t.shape)),v=c(v,b),y?PO([],_,v,b,g,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),v)}});function _C(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!jc(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>Da(l,r,Ma())))}),t)}const cF=ge("$ZodUnion",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>wb(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>_C(d,i,e,c)):_C(f,i,e,c)}}),lF=ge("$ZodIntersection",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>wC(n,d,h)):wC(n,c,l)}});function Tv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=Tv(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),jc(e))return e;const l=Tv(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const uF=ge("$ZodEnum",(e,t)=>{vn.init(e,t);const n=bO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>xH.has(typeof i)).map(i=>typeof i=="string"?jp(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),fF=ge("$ZodTransform",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yO(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Kc;return n.value=i,n}});function EC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const NO=ge("$ZodOptional",(e,t)=>{vn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>EC(c,n.value)):EC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),dF=ge("$ZodExactOptional",(e,t)=>{NO.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),hF=ge("$ZodNullable",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wb(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),pF=ge("$ZodDefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>xC(c,t)):xC(i,t)}});function xC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const mF=ge("$ZodPrefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),gF=ge("$ZodNonOptional",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>RC(c,e)):RC(i,e)}});function RC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yF=ge("$ZodCatch",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>Da(l,r,Ma()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>Da(c,r,Ma()))},input:n.value}),n.issues=[]),n)}}),vF=ge("$ZodPipe",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>wh(l,t.in,r)):wh(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>wh(c,t.out,r)):wh(i,t.out,r)}});function wh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const bF=ge("$ZodReadonly",(e,t)=>{vn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(CC):CC(i)}});function CC(e){return e.value=Object.freeze(e.value),e}const SF=ge("$ZodCustom",(e,t)=>{ys.init(e,t),vn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>TC(c,n,r,e));TC(i,n,r,e)}});function TC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(uf(i))}}var AC;class _F{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function wF(){return new _F}(AC=globalThis).__zod_globalRegistry??(AC.__zod_globalRegistry=wF());const ju=globalThis.__zod_globalRegistry;function EF(e,t){return new e({type:"string",...$e(t)})}function xF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function IC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function RF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function CF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function TF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function AF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function IF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function OF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function MF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function DF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function kF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function PF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function NF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function zF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function LF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function BF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function $F(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function UF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function jF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function HF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function FF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function VF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function qF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function GF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function KF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function ZF(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function QF(e,t){return new e({type:"number",checks:[],...$e(t)})}function YF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function XF(e){return new e({type:"unknown"})}function WF(e,t){return new e({type:"never",...$e(t)})}function OC(e,t){return new IO({check:"less_than",...$e(t),value:e,inclusive:!1})}function y0(e,t){return new IO({check:"less_than",...$e(t),value:e,inclusive:!0})}function MC(e,t){return new OO({check:"greater_than",...$e(t),value:e,inclusive:!1})}function v0(e,t){return new OO({check:"greater_than",...$e(t),value:e,inclusive:!0})}function DC(e,t){return new y7({check:"multiple_of",...$e(t),value:e})}function zO(e,t){return new b7({check:"max_length",...$e(t),maximum:e})}function fp(e,t){return new S7({check:"min_length",...$e(t),minimum:e})}function LO(e,t){return new _7({check:"length_equals",...$e(t),length:e})}function JF(e,t){return new w7({check:"string_format",format:"regex",...$e(t),pattern:e})}function eV(e){return new E7({check:"string_format",format:"lowercase",...$e(e)})}function tV(e){return new x7({check:"string_format",format:"uppercase",...$e(e)})}function nV(e,t){return new R7({check:"string_format",format:"includes",...$e(t),includes:e})}function sV(e,t){return new C7({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function rV(e,t){return new T7({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function fl(e){return new A7({check:"overwrite",tx:e})}function oV(e){return fl(t=>t.normalize(e))}function iV(){return fl(e=>e.trim())}function aV(){return fl(e=>e.toLowerCase())}function cV(){return fl(e=>e.toUpperCase())}function lV(){return fl(e=>wH(e))}function uV(e,t,n){return new e({type:"array",element:t,...$e(n)})}function fV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function dV(e){const t=hV(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(uf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(uf(i))}},e(n.value,n)));return t}function hV(e,t){const n=new ys({check:"custom",...$e(t)});return n._zod.check=e,n}function BO(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ju,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $n(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const v=l.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,v,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),$n(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&ts(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function $O(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(g)return{ref:v(g)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ + `)}b.write("payload.value = newResult;"),b.write("return payload;");const A=b.compile();return(O,D)=>A(v,O,D)};let c;const l=lp,f=!vO.jitless,h=f&&xH.value,y=t.catchall;let g;e._zod.parse=(v,b)=>{g??(g=r.value);const _=v.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=i(t.shape)),v=c(v,b),y?PO([],_,v,b,g,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),v)}});function _C(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!jc(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>ka(l,r,Da())))}),t)}const lF=ge("$ZodUnion",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>wb(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>_C(d,i,e,c)):_C(f,i,e,c)}}),uF=ge("$ZodIntersection",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>wC(n,d,h)):wC(n,c,l)}});function Tv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=Tv(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),jc(e))return e;const l=Tv(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const fF=ge("$ZodEnum",(e,t)=>{vn.init(e,t);const n=bO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>RH.has(typeof i)).map(i=>typeof i=="string"?jp(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),dF=ge("$ZodTransform",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yO(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Kc;return n.value=i,n}});function EC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const NO=ge("$ZodOptional",(e,t)=>{vn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>EC(c,n.value)):EC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),hF=ge("$ZodExactOptional",(e,t)=>{NO.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),pF=ge("$ZodNullable",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${wb(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),mF=ge("$ZodDefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>xC(c,t)):xC(i,t)}});function xC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const gF=ge("$ZodPrefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),yF=ge("$ZodNonOptional",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>RC(c,e)):RC(i,e)}});function RC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const vF=ge("$ZodCatch",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>ka(l,r,Da()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>ka(c,r,Da()))},input:n.value}),n.issues=[]),n)}}),bF=ge("$ZodPipe",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>wh(l,t.in,r)):wh(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>wh(c,t.out,r)):wh(i,t.out,r)}});function wh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const SF=ge("$ZodReadonly",(e,t)=>{vn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(CC):CC(i)}});function CC(e){return e.value=Object.freeze(e.value),e}const _F=ge("$ZodCustom",(e,t)=>{vs.init(e,t),vn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>TC(c,n,r,e));TC(i,n,r,e)}});function TC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(uf(i))}}var AC;class wF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function EF(){return new wF}(AC=globalThis).__zod_globalRegistry??(AC.__zod_globalRegistry=EF());const ju=globalThis.__zod_globalRegistry;function xF(e,t){return new e({type:"string",...$e(t)})}function RF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function IC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function CF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function TF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function AF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function IF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function OF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function MF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function DF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function kF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function PF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function NF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function zF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function LF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function BF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function $F(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function UF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function jF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function HF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function FF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function VF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function qF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function GF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function KF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function ZF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function QF(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function YF(e,t){return new e({type:"number",checks:[],...$e(t)})}function XF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function WF(e){return new e({type:"unknown"})}function JF(e,t){return new e({type:"never",...$e(t)})}function OC(e,t){return new IO({check:"less_than",...$e(t),value:e,inclusive:!1})}function y0(e,t){return new IO({check:"less_than",...$e(t),value:e,inclusive:!0})}function MC(e,t){return new OO({check:"greater_than",...$e(t),value:e,inclusive:!1})}function v0(e,t){return new OO({check:"greater_than",...$e(t),value:e,inclusive:!0})}function DC(e,t){return new v7({check:"multiple_of",...$e(t),value:e})}function zO(e,t){return new S7({check:"max_length",...$e(t),maximum:e})}function fp(e,t){return new _7({check:"min_length",...$e(t),minimum:e})}function LO(e,t){return new w7({check:"length_equals",...$e(t),length:e})}function eV(e,t){return new E7({check:"string_format",format:"regex",...$e(t),pattern:e})}function tV(e){return new x7({check:"string_format",format:"lowercase",...$e(e)})}function nV(e){return new R7({check:"string_format",format:"uppercase",...$e(e)})}function sV(e,t){return new C7({check:"string_format",format:"includes",...$e(t),includes:e})}function rV(e,t){return new T7({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function oV(e,t){return new A7({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function fl(e){return new I7({check:"overwrite",tx:e})}function iV(e){return fl(t=>t.normalize(e))}function aV(){return fl(e=>e.trim())}function cV(){return fl(e=>e.toLowerCase())}function lV(){return fl(e=>e.toUpperCase())}function uV(){return fl(e=>EH(e))}function fV(e,t,n){return new e({type:"array",element:t,...$e(n)})}function dV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function hV(e){const t=pV(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(uf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(uf(i))}},e(n.value,n)));return t}function pV(e,t){const n=new vs({check:"custom",...$e(t)});return n._zod.check=e,n}function BO(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ju,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $n(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const v=l.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,v,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),$n(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&ts(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function $O(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(g)return{ref:v(g)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function UO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const v=e.seen.get(y),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(b.$ref&&v.def)for(const x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:dp(t,"input",e.processors),output:dp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ts(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ts(r.element,n);if(r.type==="set")return ts(r.valueType,n);if(r.type==="lazy")return ts(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ts(r.innerType,n);if(r.type==="intersection")return ts(r.left,n)||ts(r.right,n);if(r.type==="record"||r.type==="map")return ts(r.keyType,n)||ts(r.valueType,n);if(r.type==="pipe")return ts(r.in,n)||ts(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ts(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ts(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ts(i,n))return!0;return!!(r.rest&&ts(r.rest,n))}return!1}const pV=(e,t={})=>n=>{const r=BO({...n,processors:t});return $n(e,r),$O(r,e),UO(r,e)},dp=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=BO({...i??{},target:c,io:t,processors:n});return $n(e,l),$O(l,e),UO(l,e)},mV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gV=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=mV[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},yV=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},vV=(e,t,n,r)=>{n.not={}},bV=(e,t,n,r)=>{},SV=(e,t,n,r)=>{const i=e._zod.def,c=bO(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},_V=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},EV=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=$n(c.element,t,{...r,path:[...r.path,"items"]})},xV=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=$n(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=$n(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},RV=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>$n(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},CV=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=$n(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},TV=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},AV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},IV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},OV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},MV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},DV=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;$n(c,t,r);const l=t.seen.get(e);l.ref=c},kV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},jO=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},PV=ge("ZodISODateTime",(e,t)=>{H7.init(e,t),Kt.init(e,t)});function NV(e){return qF(PV,e)}const zV=ge("ZodISODate",(e,t)=>{F7.init(e,t),Kt.init(e,t)});function LV(e){return GF(zV,e)}const BV=ge("ZodISOTime",(e,t)=>{V7.init(e,t),Kt.init(e,t)});function $V(e){return KF(BV,e)}const UV=ge("ZodISODuration",(e,t)=>{q7.init(e,t),Kt.init(e,t)});function jV(e){return ZF(UV,e)}const HV=(e,t)=>{xO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>NH(e,n)},flatten:{value:n=>PH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Cv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Cv,2)}},isEmpty:{get(){return e.issues.length===0}}})},lr=ge("ZodError",HV,{Parent:Error}),FV=Fp(lr),VV=Vp(lr),qV=qp(lr),GV=Gp(lr),KV=BH(lr),ZV=$H(lr),QV=UH(lr),YV=jH(lr),XV=HH(lr),WV=FH(lr),JV=VH(lr),eq=qH(lr),bn=ge("ZodType",(e,t)=>(vn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dp(e,"input"),output:dp(e,"output")}}),e.toJSONSchema=pV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(zi(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Li(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>FV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>qV(e,n,r),e.parseAsync=async(n,r)=>VV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>GV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>KV(e,n,r),e.decode=(n,r)=>ZV(e,n,r),e.encodeAsync=async(n,r)=>QV(e,n,r),e.decodeAsync=async(n,r)=>YV(e,n,r),e.safeEncode=(n,r)=>XV(e,n,r),e.safeDecode=(n,r)=>WV(e,n,r),e.safeEncodeAsync=async(n,r)=>JV(e,n,r),e.safeDecodeAsync=async(n,r)=>eq(e,n,r),e.refine=(n,r)=>e.check(Kq(n,r)),e.superRefine=n=>e.check(Zq(n)),e.overwrite=n=>e.check(fl(n)),e.optional=()=>NC(e),e.exactOptional=()=>Pq(e),e.nullable=()=>zC(e),e.nullish=()=>NC(zC(e)),e.nonoptional=n=>Uq(e,n),e.array=()=>xq(e),e.or=n=>Tq([e,n]),e.and=n=>Iq(e,n),e.transform=n=>LC(e,Dq(n)),e.default=n=>Lq(e,n),e.prefault=n=>$q(e,n),e.catch=n=>Hq(e,n),e.pipe=n=>LC(e,n),e.readonly=()=>qq(e),e.describe=n=>{const r=e.clone();return ju.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ju.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ju.get(e);const r=e.clone();return ju.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),HO=ge("_ZodString",(e,t)=>{xb.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>gV(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(JF(...r)),e.includes=(...r)=>e.check(nV(...r)),e.startsWith=(...r)=>e.check(sV(...r)),e.endsWith=(...r)=>e.check(rV(...r)),e.min=(...r)=>e.check(fp(...r)),e.max=(...r)=>e.check(zO(...r)),e.length=(...r)=>e.check(LO(...r)),e.nonempty=(...r)=>e.check(fp(1,...r)),e.lowercase=r=>e.check(eV(r)),e.uppercase=r=>e.check(tV(r)),e.trim=()=>e.check(iV()),e.normalize=(...r)=>e.check(oV(...r)),e.toLowerCase=()=>e.check(aV()),e.toUpperCase=()=>e.check(cV()),e.slugify=()=>e.check(lV())}),tq=ge("ZodString",(e,t)=>{xb.init(e,t),HO.init(e,t),e.email=n=>e.check(xF(nq,n)),e.url=n=>e.check(IF(sq,n)),e.jwt=n=>e.check(VF(vq,n)),e.emoji=n=>e.check(OF(rq,n)),e.guid=n=>e.check(IC(kC,n)),e.uuid=n=>e.check(RF(Eh,n)),e.uuidv4=n=>e.check(CF(Eh,n)),e.uuidv6=n=>e.check(TF(Eh,n)),e.uuidv7=n=>e.check(AF(Eh,n)),e.nanoid=n=>e.check(MF(oq,n)),e.guid=n=>e.check(IC(kC,n)),e.cuid=n=>e.check(DF(iq,n)),e.cuid2=n=>e.check(kF(aq,n)),e.ulid=n=>e.check(PF(cq,n)),e.base64=n=>e.check(jF(mq,n)),e.base64url=n=>e.check(HF(gq,n)),e.xid=n=>e.check(NF(lq,n)),e.ksuid=n=>e.check(zF(uq,n)),e.ipv4=n=>e.check(LF(fq,n)),e.ipv6=n=>e.check(BF(dq,n)),e.cidrv4=n=>e.check($F(hq,n)),e.cidrv6=n=>e.check(UF(pq,n)),e.e164=n=>e.check(FF(yq,n)),e.datetime=n=>e.check(NV(n)),e.date=n=>e.check(LV(n)),e.time=n=>e.check($V(n)),e.duration=n=>e.check(jV(n))});function go(e){return EF(tq,e)}const Kt=ge("ZodStringFormat",(e,t)=>{Ht.init(e,t),HO.init(e,t)}),nq=ge("ZodEmail",(e,t)=>{k7.init(e,t),Kt.init(e,t)}),kC=ge("ZodGUID",(e,t)=>{M7.init(e,t),Kt.init(e,t)}),Eh=ge("ZodUUID",(e,t)=>{D7.init(e,t),Kt.init(e,t)}),sq=ge("ZodURL",(e,t)=>{P7.init(e,t),Kt.init(e,t)}),rq=ge("ZodEmoji",(e,t)=>{N7.init(e,t),Kt.init(e,t)}),oq=ge("ZodNanoID",(e,t)=>{z7.init(e,t),Kt.init(e,t)}),iq=ge("ZodCUID",(e,t)=>{L7.init(e,t),Kt.init(e,t)}),aq=ge("ZodCUID2",(e,t)=>{B7.init(e,t),Kt.init(e,t)}),cq=ge("ZodULID",(e,t)=>{$7.init(e,t),Kt.init(e,t)}),lq=ge("ZodXID",(e,t)=>{U7.init(e,t),Kt.init(e,t)}),uq=ge("ZodKSUID",(e,t)=>{j7.init(e,t),Kt.init(e,t)}),fq=ge("ZodIPv4",(e,t)=>{G7.init(e,t),Kt.init(e,t)}),dq=ge("ZodIPv6",(e,t)=>{K7.init(e,t),Kt.init(e,t)}),hq=ge("ZodCIDRv4",(e,t)=>{Z7.init(e,t),Kt.init(e,t)}),pq=ge("ZodCIDRv6",(e,t)=>{Q7.init(e,t),Kt.init(e,t)}),mq=ge("ZodBase64",(e,t)=>{Y7.init(e,t),Kt.init(e,t)}),gq=ge("ZodBase64URL",(e,t)=>{W7.init(e,t),Kt.init(e,t)}),yq=ge("ZodE164",(e,t)=>{J7.init(e,t),Kt.init(e,t)}),vq=ge("ZodJWT",(e,t)=>{tF.init(e,t),Kt.init(e,t)}),FO=ge("ZodNumber",(e,t)=>{DO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>yV(e,r,i),e.gt=(r,i)=>e.check(MC(r,i)),e.gte=(r,i)=>e.check(v0(r,i)),e.min=(r,i)=>e.check(v0(r,i)),e.lt=(r,i)=>e.check(OC(r,i)),e.lte=(r,i)=>e.check(y0(r,i)),e.max=(r,i)=>e.check(y0(r,i)),e.int=r=>e.check(Av(r)),e.safe=r=>e.check(Av(r)),e.positive=r=>e.check(MC(0,r)),e.nonnegative=r=>e.check(v0(0,r)),e.negative=r=>e.check(OC(0,r)),e.nonpositive=r=>e.check(y0(0,r)),e.multipleOf=(r,i)=>e.check(DC(r,i)),e.step=(r,i)=>e.check(DC(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function VO(e){return QF(FO,e)}const bq=ge("ZodNumberFormat",(e,t)=>{nF.init(e,t),FO.init(e,t)});function Av(e){return YF(bq,e)}const Sq=ge("ZodUnknown",(e,t)=>{sF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bV()});function PC(){return XF(Sq)}const _q=ge("ZodNever",(e,t)=>{rF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vV(e,n,r)});function wq(e){return WF(_q,e)}const Eq=ge("ZodArray",(e,t)=>{oF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EV(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(fp(n,r)),e.nonempty=n=>e.check(fp(1,n)),e.max=(n,r)=>e.check(zO(n,r)),e.length=(n,r)=>e.check(LO(n,r)),e.unwrap=()=>e.element});function xq(e,t){return uV(Eq,e,t)}const Rq=ge("ZodObject",(e,t)=>{aF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xV(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>Oq(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:PC()}),e.loose=()=>e.clone({...e._zod.def,catchall:PC()}),e.strict=()=>e.clone({...e._zod.def,catchall:wq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>IH(e,n),e.safeExtend=n=>OH(e,n),e.merge=n=>MH(e,n),e.pick=n=>TH(e,n),e.omit=n=>AH(e,n),e.partial=(...n)=>DH(qO,e,n[0]),e.required=(...n)=>kH(GO,e,n[0])});function dl(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Rq(n)}const Cq=ge("ZodUnion",(e,t)=>{cF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RV(e,n,r,i),e.options=t.options});function Tq(e,t){return new Cq({type:"union",options:e,...$e(t)})}const Aq=ge("ZodIntersection",(e,t)=>{lF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CV(e,n,r,i)});function Iq(e,t){return new Aq({type:"intersection",left:e,right:t})}const Iv=ge("ZodEnum",(e,t)=>{uF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>SV(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Iv({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new Iv({...t,checks:[],...$e(i),entries:c})}});function Oq(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Iv({type:"enum",entries:n,...$e(t)})}const Mq=ge("ZodTransform",(e,t)=>{fF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wV(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yO(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(uf(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(uf(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function Dq(e){return new Mq({type:"transform",transform:e})}const qO=ge("ZodOptional",(e,t)=>{NO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function NC(e){return new qO({type:"optional",innerType:e})}const kq=ge("ZodExactOptional",(e,t)=>{dF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Pq(e){return new kq({type:"optional",innerType:e})}const Nq=ge("ZodNullable",(e,t)=>{hF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zC(e){return new Nq({type:"nullable",innerType:e})}const zq=ge("ZodDefault",(e,t)=>{pF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Lq(e,t){return new zq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_O(t)}})}const Bq=ge("ZodPrefault",(e,t)=>{mF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function $q(e,t){return new Bq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_O(t)}})}const GO=ge("ZodNonOptional",(e,t)=>{gF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Uq(e,t){return new GO({type:"nonoptional",innerType:e,...$e(t)})}const jq=ge("ZodCatch",(e,t)=>{yF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hq(e,t){return new jq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Fq=ge("ZodPipe",(e,t)=>{vF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DV(e,n,r,i),e.in=t.in,e.out=t.out});function LC(e,t){return new Fq({type:"pipe",in:e,out:t})}const Vq=ge("ZodReadonly",(e,t)=>{bF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function qq(e){return new Vq({type:"readonly",innerType:e})}const Gq=ge("ZodCustom",(e,t)=>{SF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_V(e,n)});function Kq(e,t={}){return fV(Gq,e,t)}function Zq(e){return dV(e)}const Rb="hive:v1:aws-credentials",Qq=dl({accessKeyId:go().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:go().min(1,"Secret Access Key is required")});let uo;function Zp(){if(uo!==void 0)return uo;try{const e=localStorage.getItem(Rb);if(!e)return uo=null,null;const t=JSON.parse(e),n=Qq.safeParse(t);return uo=n.success?n.data:null,uo}catch{return uo=null,null}}function B0e(e){try{localStorage.setItem(Rb,JSON.stringify(e)),uo=e}catch{uo=e}}function Yq(){try{localStorage.removeItem(Rb)}catch{}uo=null}const KO=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),ZO=e=>({httpHandler:e.httpHandler()});var ff;(function(e){e.HTTP="http",e.HTTPS="https"})(ff||(ff={}));var hp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(hp||(hp={}));const Ov="__smithy_context";class Mn{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Mn({...t,headers:{...t.headers}});return n.query&&(n.query=Xq(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Mn.clone(this)}}function Xq(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class ka{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const Wq=e=>t=>async n=>{if(!Mn.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},Jq={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},QO=e=>({applyToStack:t=>{t.add(Wq(e),Jq)}}),eG=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:v,...b}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(b),metadata:v}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},tG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},YO=e=>({applyToStack:t=>{t.add(eG(),tG)}}),nG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},sG=()=>e=>async t=>e(t),XO=e=>({applyToStack:t=>{t.add(sG(),nG)}}),Eo=e=>e[Ov]||(e[Ov]={}),Ns=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},rG=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function oG(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const iG=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=rG(c,l),d=oG(e.httpAuthSchemes),h=Eo(r),y=[];for(const g of f){const v=d.get(g.schemeId);if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const b=v.identityProvider(await t.identityProviderConfigProvider(e));if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await b(g.identityProperties),signer:v.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` -`));return n(i)},aG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},WO=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(iG(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),aG)}}),cG={name:"serializerMiddleware"},lG=e=>t=>{throw t},uG=(e,t)=>{},fG=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||lG)(l));return(d.successHandler||uG)(h.response,l),h},JO={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},eM=e=>({applyToStack:t=>{t.addRelativeTo(fG(),JO)}}),Zc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},tM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BC=Object.entries(tM).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),dG=tM.split(""),Qc=6,Zu=8,hG=63,Pa=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Qc;const f=i/4*3;c>>=l%Zu;const d=Math.floor(l/Zu);for(let h=0;h>y)}}return new Uint8Array(n)},So=e=>new TextEncoder().encode(e),df=e=>typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Ua=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Mi(e){let t;typeof e=="string"?t=So(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ca extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ca.mutate(Pa(t)):Ca.mutate(So(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ca.prototype),t}transformToString(t="utf-8"){return t==="base64"?Mi(this):Ua(this)}}const $C=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),pG=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:v}=await h.read();if(v){if(y.enqueue(`0\r +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function UO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const v=e.seen.get(y),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(b.$ref&&v.def)for(const x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:dp(t,"input",e.processors),output:dp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ts(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ts(r.element,n);if(r.type==="set")return ts(r.valueType,n);if(r.type==="lazy")return ts(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ts(r.innerType,n);if(r.type==="intersection")return ts(r.left,n)||ts(r.right,n);if(r.type==="record"||r.type==="map")return ts(r.keyType,n)||ts(r.valueType,n);if(r.type==="pipe")return ts(r.in,n)||ts(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ts(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ts(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ts(i,n))return!0;return!!(r.rest&&ts(r.rest,n))}return!1}const mV=(e,t={})=>n=>{const r=BO({...n,processors:t});return $n(e,r),$O(r,e),UO(r,e)},dp=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=BO({...i??{},target:c,io:t,processors:n});return $n(e,l),$O(l,e),UO(l,e)},gV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yV=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=gV[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},vV=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},bV=(e,t,n,r)=>{n.not={}},SV=(e,t,n,r)=>{},_V=(e,t,n,r)=>{const i=e._zod.def,c=bO(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},wV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},EV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},xV=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=$n(c.element,t,{...r,path:[...r.path,"items"]})},RV=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=$n(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=$n(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},CV=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>$n(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},TV=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=$n(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},AV=(e,t,n,r)=>{const i=e._zod.def,c=$n(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},IV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},OV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},MV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},DV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},kV=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;$n(c,t,r);const l=t.seen.get(e);l.ref=c},PV=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},jO=(e,t,n,r)=>{const i=e._zod.def;$n(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},NV=ge("ZodISODateTime",(e,t)=>{F7.init(e,t),Kt.init(e,t)});function zV(e){return GF(NV,e)}const LV=ge("ZodISODate",(e,t)=>{V7.init(e,t),Kt.init(e,t)});function BV(e){return KF(LV,e)}const $V=ge("ZodISOTime",(e,t)=>{q7.init(e,t),Kt.init(e,t)});function UV(e){return ZF($V,e)}const jV=ge("ZodISODuration",(e,t)=>{G7.init(e,t),Kt.init(e,t)});function HV(e){return QF(jV,e)}const FV=(e,t)=>{xO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>zH(e,n)},flatten:{value:n=>NH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Cv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Cv,2)}},isEmpty:{get(){return e.issues.length===0}}})},lr=ge("ZodError",FV,{Parent:Error}),VV=Fp(lr),qV=Vp(lr),GV=qp(lr),KV=Gp(lr),ZV=$H(lr),QV=UH(lr),YV=jH(lr),XV=HH(lr),WV=FH(lr),JV=VH(lr),eq=qH(lr),tq=GH(lr),bn=ge("ZodType",(e,t)=>(vn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dp(e,"input"),output:dp(e,"output")}}),e.toJSONSchema=mV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(zi(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Li(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>VV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>GV(e,n,r),e.parseAsync=async(n,r)=>qV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>KV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>ZV(e,n,r),e.decode=(n,r)=>QV(e,n,r),e.encodeAsync=async(n,r)=>YV(e,n,r),e.decodeAsync=async(n,r)=>XV(e,n,r),e.safeEncode=(n,r)=>WV(e,n,r),e.safeDecode=(n,r)=>JV(e,n,r),e.safeEncodeAsync=async(n,r)=>eq(e,n,r),e.safeDecodeAsync=async(n,r)=>tq(e,n,r),e.refine=(n,r)=>e.check(Zq(n,r)),e.superRefine=n=>e.check(Qq(n)),e.overwrite=n=>e.check(fl(n)),e.optional=()=>NC(e),e.exactOptional=()=>Nq(e),e.nullable=()=>zC(e),e.nullish=()=>NC(zC(e)),e.nonoptional=n=>jq(e,n),e.array=()=>Rq(e),e.or=n=>Aq([e,n]),e.and=n=>Oq(e,n),e.transform=n=>LC(e,kq(n)),e.default=n=>Bq(e,n),e.prefault=n=>Uq(e,n),e.catch=n=>Fq(e,n),e.pipe=n=>LC(e,n),e.readonly=()=>Gq(e),e.describe=n=>{const r=e.clone();return ju.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ju.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ju.get(e);const r=e.clone();return ju.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),HO=ge("_ZodString",(e,t)=>{xb.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>yV(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(eV(...r)),e.includes=(...r)=>e.check(sV(...r)),e.startsWith=(...r)=>e.check(rV(...r)),e.endsWith=(...r)=>e.check(oV(...r)),e.min=(...r)=>e.check(fp(...r)),e.max=(...r)=>e.check(zO(...r)),e.length=(...r)=>e.check(LO(...r)),e.nonempty=(...r)=>e.check(fp(1,...r)),e.lowercase=r=>e.check(tV(r)),e.uppercase=r=>e.check(nV(r)),e.trim=()=>e.check(aV()),e.normalize=(...r)=>e.check(iV(...r)),e.toLowerCase=()=>e.check(cV()),e.toUpperCase=()=>e.check(lV()),e.slugify=()=>e.check(uV())}),nq=ge("ZodString",(e,t)=>{xb.init(e,t),HO.init(e,t),e.email=n=>e.check(RF(sq,n)),e.url=n=>e.check(OF(rq,n)),e.jwt=n=>e.check(qF(bq,n)),e.emoji=n=>e.check(MF(oq,n)),e.guid=n=>e.check(IC(kC,n)),e.uuid=n=>e.check(CF(Eh,n)),e.uuidv4=n=>e.check(TF(Eh,n)),e.uuidv6=n=>e.check(AF(Eh,n)),e.uuidv7=n=>e.check(IF(Eh,n)),e.nanoid=n=>e.check(DF(iq,n)),e.guid=n=>e.check(IC(kC,n)),e.cuid=n=>e.check(kF(aq,n)),e.cuid2=n=>e.check(PF(cq,n)),e.ulid=n=>e.check(NF(lq,n)),e.base64=n=>e.check(HF(gq,n)),e.base64url=n=>e.check(FF(yq,n)),e.xid=n=>e.check(zF(uq,n)),e.ksuid=n=>e.check(LF(fq,n)),e.ipv4=n=>e.check(BF(dq,n)),e.ipv6=n=>e.check($F(hq,n)),e.cidrv4=n=>e.check(UF(pq,n)),e.cidrv6=n=>e.check(jF(mq,n)),e.e164=n=>e.check(VF(vq,n)),e.datetime=n=>e.check(zV(n)),e.date=n=>e.check(BV(n)),e.time=n=>e.check(UV(n)),e.duration=n=>e.check(HV(n))});function go(e){return xF(nq,e)}const Kt=ge("ZodStringFormat",(e,t)=>{Ht.init(e,t),HO.init(e,t)}),sq=ge("ZodEmail",(e,t)=>{P7.init(e,t),Kt.init(e,t)}),kC=ge("ZodGUID",(e,t)=>{D7.init(e,t),Kt.init(e,t)}),Eh=ge("ZodUUID",(e,t)=>{k7.init(e,t),Kt.init(e,t)}),rq=ge("ZodURL",(e,t)=>{N7.init(e,t),Kt.init(e,t)}),oq=ge("ZodEmoji",(e,t)=>{z7.init(e,t),Kt.init(e,t)}),iq=ge("ZodNanoID",(e,t)=>{L7.init(e,t),Kt.init(e,t)}),aq=ge("ZodCUID",(e,t)=>{B7.init(e,t),Kt.init(e,t)}),cq=ge("ZodCUID2",(e,t)=>{$7.init(e,t),Kt.init(e,t)}),lq=ge("ZodULID",(e,t)=>{U7.init(e,t),Kt.init(e,t)}),uq=ge("ZodXID",(e,t)=>{j7.init(e,t),Kt.init(e,t)}),fq=ge("ZodKSUID",(e,t)=>{H7.init(e,t),Kt.init(e,t)}),dq=ge("ZodIPv4",(e,t)=>{K7.init(e,t),Kt.init(e,t)}),hq=ge("ZodIPv6",(e,t)=>{Z7.init(e,t),Kt.init(e,t)}),pq=ge("ZodCIDRv4",(e,t)=>{Q7.init(e,t),Kt.init(e,t)}),mq=ge("ZodCIDRv6",(e,t)=>{Y7.init(e,t),Kt.init(e,t)}),gq=ge("ZodBase64",(e,t)=>{X7.init(e,t),Kt.init(e,t)}),yq=ge("ZodBase64URL",(e,t)=>{J7.init(e,t),Kt.init(e,t)}),vq=ge("ZodE164",(e,t)=>{eF.init(e,t),Kt.init(e,t)}),bq=ge("ZodJWT",(e,t)=>{nF.init(e,t),Kt.init(e,t)}),FO=ge("ZodNumber",(e,t)=>{DO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>vV(e,r,i),e.gt=(r,i)=>e.check(MC(r,i)),e.gte=(r,i)=>e.check(v0(r,i)),e.min=(r,i)=>e.check(v0(r,i)),e.lt=(r,i)=>e.check(OC(r,i)),e.lte=(r,i)=>e.check(y0(r,i)),e.max=(r,i)=>e.check(y0(r,i)),e.int=r=>e.check(Av(r)),e.safe=r=>e.check(Av(r)),e.positive=r=>e.check(MC(0,r)),e.nonnegative=r=>e.check(v0(0,r)),e.negative=r=>e.check(OC(0,r)),e.nonpositive=r=>e.check(y0(0,r)),e.multipleOf=(r,i)=>e.check(DC(r,i)),e.step=(r,i)=>e.check(DC(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function VO(e){return YF(FO,e)}const Sq=ge("ZodNumberFormat",(e,t)=>{sF.init(e,t),FO.init(e,t)});function Av(e){return XF(Sq,e)}const _q=ge("ZodUnknown",(e,t)=>{rF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>SV()});function PC(){return WF(_q)}const wq=ge("ZodNever",(e,t)=>{oF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bV(e,n,r)});function Eq(e){return JF(wq,e)}const xq=ge("ZodArray",(e,t)=>{iF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xV(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(fp(n,r)),e.nonempty=n=>e.check(fp(1,n)),e.max=(n,r)=>e.check(zO(n,r)),e.length=(n,r)=>e.check(LO(n,r)),e.unwrap=()=>e.element});function Rq(e,t){return fV(xq,e,t)}const Cq=ge("ZodObject",(e,t)=>{cF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RV(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>Mq(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:PC()}),e.loose=()=>e.clone({...e._zod.def,catchall:PC()}),e.strict=()=>e.clone({...e._zod.def,catchall:Eq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>OH(e,n),e.safeExtend=n=>MH(e,n),e.merge=n=>DH(e,n),e.pick=n=>AH(e,n),e.omit=n=>IH(e,n),e.partial=(...n)=>kH(qO,e,n[0]),e.required=(...n)=>PH(GO,e,n[0])});function dl(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Cq(n)}const Tq=ge("ZodUnion",(e,t)=>{lF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CV(e,n,r,i),e.options=t.options});function Aq(e,t){return new Tq({type:"union",options:e,...$e(t)})}const Iq=ge("ZodIntersection",(e,t)=>{uF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TV(e,n,r,i)});function Oq(e,t){return new Iq({type:"intersection",left:e,right:t})}const Iv=ge("ZodEnum",(e,t)=>{fF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>_V(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Iv({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new Iv({...t,checks:[],...$e(i),entries:c})}});function Mq(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Iv({type:"enum",entries:n,...$e(t)})}const Dq=ge("ZodTransform",(e,t)=>{dF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EV(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yO(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(uf(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(uf(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function kq(e){return new Dq({type:"transform",transform:e})}const qO=ge("ZodOptional",(e,t)=>{NO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function NC(e){return new qO({type:"optional",innerType:e})}const Pq=ge("ZodExactOptional",(e,t)=>{hF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jO(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Nq(e){return new Pq({type:"optional",innerType:e})}const zq=ge("ZodNullable",(e,t)=>{pF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zC(e){return new zq({type:"nullable",innerType:e})}const Lq=ge("ZodDefault",(e,t)=>{mF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Bq(e,t){return new Lq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_O(t)}})}const $q=ge("ZodPrefault",(e,t)=>{gF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Uq(e,t){return new $q({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_O(t)}})}const GO=ge("ZodNonOptional",(e,t)=>{yF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function jq(e,t){return new GO({type:"nonoptional",innerType:e,...$e(t)})}const Hq=ge("ZodCatch",(e,t)=>{vF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fq(e,t){return new Hq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Vq=ge("ZodPipe",(e,t)=>{bF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kV(e,n,r,i),e.in=t.in,e.out=t.out});function LC(e,t){return new Vq({type:"pipe",in:e,out:t})}const qq=ge("ZodReadonly",(e,t)=>{SF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Gq(e){return new qq({type:"readonly",innerType:e})}const Kq=ge("ZodCustom",(e,t)=>{_F.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wV(e,n)});function Zq(e,t={}){return dV(Kq,e,t)}function Qq(e){return hV(e)}const Rb="hive:v1:aws-credentials",Yq=dl({accessKeyId:go().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:go().min(1,"Secret Access Key is required")});let uo;function Zp(){if(uo!==void 0)return uo;try{const e=localStorage.getItem(Rb);if(!e)return uo=null,null;const t=JSON.parse(e),n=Yq.safeParse(t);return uo=n.success?n.data:null,uo}catch{return uo=null,null}}function j0e(e){try{localStorage.setItem(Rb,JSON.stringify(e)),uo=e}catch{uo=e}}function Xq(){try{localStorage.removeItem(Rb)}catch{}uo=null}const KO=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),ZO=e=>({httpHandler:e.httpHandler()});var ff;(function(e){e.HTTP="http",e.HTTPS="https"})(ff||(ff={}));var hp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(hp||(hp={}));const Ov="__smithy_context";class Mn{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Mn({...t,headers:{...t.headers}});return n.query&&(n.query=Wq(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Mn.clone(this)}}function Wq(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Pa{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const Jq=e=>t=>async n=>{if(!Mn.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},eG={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},QO=e=>({applyToStack:t=>{t.add(Jq(e),eG)}}),tG=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:v,...b}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(b),metadata:v}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},nG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},YO=e=>({applyToStack:t=>{t.add(tG(),nG)}}),sG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},rG=()=>e=>async t=>e(t),XO=e=>({applyToStack:t=>{t.add(rG(),sG)}}),Eo=e=>e[Ov]||(e[Ov]={}),Ns=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},oG=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function iG(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const aG=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=oG(c,l),d=iG(e.httpAuthSchemes),h=Eo(r),y=[];for(const g of f){const v=d.get(g.schemeId);if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const b=v.identityProvider(await t.identityProviderConfigProvider(e));if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await b(g.identityProperties),signer:v.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` +`));return n(i)},cG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},WO=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(aG(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),cG)}}),lG={name:"serializerMiddleware"},uG=e=>t=>{throw t},fG=(e,t)=>{},dG=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||uG)(l));return(d.successHandler||fG)(h.response,l),h},JO={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},eM=e=>({applyToStack:t=>{t.addRelativeTo(dG(),JO)}}),Zc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},tM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BC=Object.entries(tM).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),hG=tM.split(""),Qc=6,Zu=8,pG=63,Na=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Qc;const f=i/4*3;c>>=l%Zu;const d=Math.floor(l/Zu);for(let h=0;h>y)}}return new Uint8Array(n)},So=e=>new TextEncoder().encode(e),df=e=>typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ja=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Mi(e){let t;typeof e=="string"?t=So(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ta extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ta.mutate(Na(t)):Ta.mutate(So(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ta.prototype),t}transformToString(t="utf-8"){return t==="base64"?Mi(this):ja(this)}}const $C=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),mG=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:v}=await h.read();if(v){if(y.enqueue(`0\r `),f){const b=n(await d);y.enqueue(`${c}:${b}\r `),y.enqueue(`\r `)}y.close()}else y.enqueue(`${(r(g)||0).toString(16)}\r ${g}\r -`)}})};async function mG(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const Ta=e=>encodeURIComponent(e).replace(/[!'()*]/g,gG),gG=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yG(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Ta(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const b0={supported:void 0};class Qp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Qp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),b0.supported===void 0&&(b0.supported=typeof Request<"u"&&"keepalive"in UC("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=yG(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,v=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,b=g==="GET"||g==="HEAD"?void 0:t.body,_={body:b,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),b&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),b0.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=UC(v,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const j of O.entries())D[j[0]]=j[1];return A.body!=null?{response:new ka({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(j=>({response:new ka({headers:D,reason:A.statusText,statusCode:A.status,body:j})}))}),vG(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const Cb=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):bG(e):SG(e);async function bG(e){const t=await _G(e),n=Pa(t);return new Uint8Array(n)}async function SG(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function _G(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const nM={},Mv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),nM[e]=t,Mv[t]=e}function sM(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!HC(e)&&!$C(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(jC);return t=!0,await Cb(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. -If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return Mi(c);if(i==="hex")return ps(c);if(i===void 0||i==="utf8"||i==="utf-8")return Ua(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(jC);if(t=!0,HC(e))return r(e);if($C(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},HC=e=>typeof Blob=="function"&&e instanceof Blob;async function wG(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const xi=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ca.mutate(e);if(!e)return Ca.mutate(new Uint8Array);const n=t.streamCollector(e);return Ca.mutate(await n)};function pp(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Lh=e=>typeof e=="function"?e():e,oM=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),EG=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=Eo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(oM(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const v="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` - `+v}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(v):n.logger?.warn?.(v)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(ka.isInstance(i)){const{headers:b={}}=i,_=Object.entries(b);g.$metadata={httpStatusCode:i.statusCode,requestId:S0(/^x-[\w-]+-request-?id$/,_),extendedRequestId:S0(/^x-[\w-]+-id-2$/,_),cfId:S0(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},S0=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],xG=e=>(t,n)=>async r=>{const{operationSchema:i}=Eo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(oM(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},RG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},CG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function iM(e){return{applyToStack:t=>{t.add(xG(e),CG),t.add(EG(e),RG),e.protocol.setSerdeContext(e)}}}function Hc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const FC={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;_0(i);)r.push(i[1]),i=i[0],c=Lh(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,Hc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=Lh(c),TG(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=Lh(t);if(n instanceof wt)return n;if(_0(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),Hc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Hc(this.memberTraits)}getOwnTraits(){return Hc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return zu([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return zu([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return zu(_0(i)?i:[i,0],t)}if(this.isDocumentSchema())return zu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[FC.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,TG=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const AG=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&zG.warn(NG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},IG=Math.ceil(2**127*(2-2**-23)),VC=e=>{const t=AG(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>IG)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},OG=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},qC=e=>aM(e,16),GC=e=>aM(e,8),aM=(e,t)=>{const n=OG(e);if(n!==void 0&&MG(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},MG=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},DG=e=>VC(typeof e=="string"?Tb(e):e),kG=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Tb=e=>{const t=e.match(kG);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},Dv=e=>qC(typeof e=="string"?Tb(e):e),PG=e=>GC(typeof e=="string"?Tb(e):e),NG=e=>String(new TypeError(e).stack||e).split(` +`)}})};async function gG(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const Aa=e=>encodeURIComponent(e).replace(/[!'()*]/g,yG),yG=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function vG(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Aa(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const b0={supported:void 0};class Qp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Qp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),b0.supported===void 0&&(b0.supported=typeof Request<"u"&&"keepalive"in UC("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=vG(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,v=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,b=g==="GET"||g==="HEAD"?void 0:t.body,_={body:b,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),b&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),b0.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=UC(v,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const j of O.entries())D[j[0]]=j[1];return A.body!=null?{response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(j=>({response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:j})}))}),bG(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const Cb=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):SG(e):_G(e);async function SG(e){const t=await wG(e),n=Na(t);return new Uint8Array(n)}async function _G(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function wG(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const nM={},Mv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),nM[e]=t,Mv[t]=e}function sM(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!HC(e)&&!$C(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(jC);return t=!0,await Cb(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. +If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return Mi(c);if(i==="hex")return ms(c);if(i===void 0||i==="utf8"||i==="utf-8")return ja(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(jC);if(t=!0,HC(e))return r(e);if($C(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},HC=e=>typeof Blob=="function"&&e instanceof Blob;async function EG(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const xi=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ta.mutate(e);if(!e)return Ta.mutate(new Uint8Array);const n=t.streamCollector(e);return Ta.mutate(await n)};function pp(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Lh=e=>typeof e=="function"?e():e,oM=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),xG=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=Eo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(oM(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const v="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` + `+v}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(v):n.logger?.warn?.(v)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(Pa.isInstance(i)){const{headers:b={}}=i,_=Object.entries(b);g.$metadata={httpStatusCode:i.statusCode,requestId:S0(/^x-[\w-]+-request-?id$/,_),extendedRequestId:S0(/^x-[\w-]+-id-2$/,_),cfId:S0(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},S0=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],RG=e=>(t,n)=>async r=>{const{operationSchema:i}=Eo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(oM(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},CG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},TG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function iM(e){return{applyToStack:t=>{t.add(RG(e),TG),t.add(xG(e),CG),e.protocol.setSerdeContext(e)}}}function Hc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const FC={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;_0(i);)r.push(i[1]),i=i[0],c=Lh(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,Hc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=Lh(c),AG(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=Lh(t);if(n instanceof wt)return n;if(_0(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),Hc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Hc(this.memberTraits)}getOwnTraits(){return Hc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return zu([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return zu([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return zu(_0(i)?i:[i,0],t)}if(this.isDocumentSchema())return zu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[FC.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,AG=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const IG=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&LG.warn(zG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},OG=Math.ceil(2**127*(2-2**-23)),VC=e=>{const t=IG(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>OG)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},MG=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},qC=e=>aM(e,16),GC=e=>aM(e,8),aM=(e,t)=>{const n=MG(e);if(n!==void 0&&DG(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},DG=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},kG=e=>VC(typeof e=="string"?Tb(e):e),PG=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Tb=e=>{const t=e.match(PG);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},Dv=e=>qC(typeof e=="string"?Tb(e):e),NG=e=>GC(typeof e=="string"?Tb(e):e),zG=e=>String(new TypeError(e).stack||e).split(` `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(` -`),zG={warn:console.warn},LG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ab=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mp(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${LG[r]}, ${d} ${Ab[n]} ${t} ${h}:${y}:${g} GMT`}const BG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),$G=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),UG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),$0e=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=BG.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return w0(Dv(gp(c)),E0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=$G.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return FG(w0(jG(c),E0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=UG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return w0(Dv(gp(h)),E0(r),Yc(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},w0=(e,t,n,r)=>{const i=t-1;return qG(e,i,n),new Date(Date.UTC(e,i,n,Yc(r.hours,"hour",0,23),Yc(r.minutes,"minute",0,59),Yc(r.seconds,"seconds",0,60),KG(r.fractionalMilliseconds)))},jG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+Dv(gp(e));return ne.getTime()-new Date().getTime()>HG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,E0=e=>{const t=Ab.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},VG=[31,28,31,30,31,30,31,31,30,31,30,31],qG=(e,t,n)=>{let r=VG[t];if(t===1&&GG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Ab[t]} in ${e}: ${n}`)},GG=e=>e%4===0&&(e%100!==0||e%400===0),Yc=(e,t,n,r)=>{const i=PG(gp(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},KG=e=>e==null?0:DG("0."+e)*1e3,gp=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),Yp=()=>{if(KC)return KC();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Gn[e[0]]+Gn[e[1]]+Gn[e[2]]+Gn[e[3]]+"-"+Gn[e[4]]+Gn[e[5]]+"-"+Gn[e[6]]+Gn[e[7]]+"-"+Gn[e[8]]+Gn[e[9]]+"-"+Gn[e[10]]+Gn[e[11]]+Gn[e[12]]+Gn[e[13]]+Gn[e[14]]+Gn[e[15]]},Ri=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Ri.from=e=>e&&typeof e=="object"&&(e instanceof Ri||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Ri(String(e)):Ri(JSON.stringify(e));Ri.fromObject=Ri.from;function ZG(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const Ib="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Ob="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Mb="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",cM="(\\d?\\d)",lM="(\\d{4})",QG=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),YG=new RegExp(`^${Ib}, ${cM} ${Ob} ${lM} ${Mb} GMT$`),XG=new RegExp(`^${Ib}, ${cM}-${Ob}-(\\d\\d) ${Mb} GMT$`),WG=new RegExp(`^${Ib} ${Ob} ( [1-9]|\\d\\d) ${Mb} ${lM}$`),JG=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],eK=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},tK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=QG.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;fo(r,1,12),fo(i,1,31),fo(c,0,23),fo(l,0,59),fo(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,v,b]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(v)*60*60*1e3+Number(b)*60*1e3))}return y},nK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=YG.exec(e))?[,t,n,r,i,c,l,f]=d:(d=XG.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=WG.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),JG.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);fo(t,1,31),fo(i,0,23),fo(c,0,59),fo(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function fo(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function sK(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},ZC=/^-?\d*(\.\d+)?$/;class Cf{string;type;constructor(t,n){if(this.string=t,this.type=n,!ZC.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return Cf.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&ZC.test(n.string)}}const rK="modulepreload",oK=function(e){return"/"+e},QC={},sn=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=oK(h),h in QC)return;QC[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":rK,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,_)=>{v.addEventListener("load",b),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class Xp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class fM extends Xp{options;constructor(t){super(),this.options=t}getRequestType(){return Mn}getResponseType(){return ka}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=Hc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await sn(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class iK extends fM{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,v;const b=new Mn({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(b,d),this.setHostPrefix(b,t,i);const _=Hc(t.traits);if(_.http){b.method=_.http[0];const[x,R]=_.http[1].split("?");b.path=="/"?b.path=x:b.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(b.path.includes(`{${_}+}`)||b.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(v=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):v=C:(c.write(x,C),v=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();b.path.includes(`{${_}+}`)?b.path=b.path.replace(`{${_}+}`,A.split("/").map(pp).join("/")):b.path.includes(`{${_}}`)&&(b.path=b.path.replace(`{${_}}`,pp(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),v=c.flush()),b.headers=f,b.query=l,b.body=v,b}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await xi(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await xi(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,v]of h.structIterator()){const b=v.getMemberTraits();if(b.httpPayload){if(f=!1,v.isStreaming())v.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=rM(r.body);else if(r.body){const x=await xi(r.body,n);x.byteLength>0&&(l[g]=await d.read(v,x))}}else if(b.httpHeader){const _=String(b.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(v.isListSchema()){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=sK(x,",",2):C=uM(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(v,x)}else if(b.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(b.httpPrefixHeaders)){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(b.httpPrefixHeaders.length)]=await d.read(R,x)}}else b.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class aK extends fM{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new Mn({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const v={...n};if(n){const b=d.getEventStreamMember();if(b){if(v[b]){const _={};for(const[x,R]of d.structIterator())x!==b&&v[x]&&(i.write(R,v[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:v[b],requestSchema:d,initialRequest:_})}}else i.write(h,v),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await xi(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function Wp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class dM extends Xp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return uM(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??Pa)(n);if(r.isTimestampSchema())switch(Wp(r,this.settings)){case 5:return tK(n);case 6:return nK(n);case 7:return eK(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new Cf(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??Ua)((this.serdeContext?.base64Decoder??Pa)(t))}}class cK extends Xp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new dM(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??Ua;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??So;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class lK extends Xp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(Wp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=mp(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:ZG(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=Yp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class uK{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new lK(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function fK(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class hM{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const dK=e=>function(n){return pM(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,mK=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},gK=void 0;function yK(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function mM(e){const t=Zc(e.userAgentAppId??gK),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!yK(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class gM{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const vK=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),yM=e=>vK.test(e)||e.startsWith("[")&&e.endsWith("]"),bK=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Jp=(e,t=!1)=>{if(!t)return bK.test(e);const n=e.split(".");for(const r of n)if(!Jp(r))return!1;return!0},hf={},pf="endpoints";function Di(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Di(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Di).join(", ")})`:JSON.stringify(e,null,2)}class Ls extends Error{constructor(t){super(t),this.name="EndpointError"}}const SK=(e,t)=>e===t,_K=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new Ls(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new Ls(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},vM=(e,t)=>_K(t).reduce((n,r)=>{if(typeof n!="object")throw new Ls(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),wK=e=>e!=null,EK=e=>!e,x0={[ff.HTTP]:80,[ff.HTTPS]:443},xK=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:v,port:b,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${v}${b?`:${b}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(ff).includes(d))return null;const h=yM(i),y=n.includes(`${r}:${x0[d]}`)||typeof e=="string"&&e.includes(`${r}:${x0[d]}`),g=`${r}${y?`:${x0[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},RK=(e,t)=>e===t,CK=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),AK={booleanEquals:SK,getAttr:vM,isSet:wK,isValidHostLabel:Jp,not:EK,parseURL:xK,stringEquals:RK,substring:CK,uriEncode:TK},bM=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],em=(e,t,n)=>{if(typeof e=="string")return bM(e,n);if(e.fn)return _M.callFunction(e,n);if(e.ref)return IK(e,n);throw new Ls(`'${t}': ${String(e)} is not a string, function or reference.`)},SM=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:_M.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in hf&&i[1]!=null?hf[i[0]][i[1]](...r):AK[e](...r)},_M={evaluateExpression:em,callFunction:SM},OK=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ls(`'${e}' is already defined in Reference Record.`);const r=SM(t,n);return n.logger?.debug?.(`${pf} evaluateCondition: ${Di(t)} = ${Di(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Db=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=OK(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${pf} assign: ${c.name} := ${Di(c.value)}`))}return{result:!0,referenceRecord:n}},MK=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=em(c,"Header value entry",t);if(typeof l!="string")throw new Ls(`Header '${r}' value '${l}' is not a string`);return l})}),{}),wM=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:xM.getEndpointProperty(i,t)}),{}),EM=(e,t)=>{if(Array.isArray(e))return e.map(n=>EM(n,t));switch(typeof e){case"string":return bM(e,t);case"object":if(e===null)throw new Ls(`Unexpected endpoint property: ${e}`);return xM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ls(`Unexpected endpoint property type: ${typeof e}`)}},xM={getEndpointProperty:EM,getEndpointProperties:wM},DK=(e,t)=>{const n=em(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new Ls(`Endpoint URL must be a string, got ${typeof n}`)},kK=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${pf} Resolving endpoint from template: ${Di(r)}`),{...h!=null&&{headers:MK(h,l)},...d!=null&&{properties:wM(d,l)},url:DK(f,l)}},PK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(i)throw new Ls(em(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},RM=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=kK(n,t);if(r)return r}else if(n.type==="error")PK(n,t);else if(n.type==="tree"){const r=CM.evaluateTreeRule(n,t);if(r)return r}else throw new Ls(`Unknown endpoint rule: ${n}`);throw new Ls("Rules evaluation failed")},NK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(i)return CM.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},CM={evaluateRules:RM,evaluateTreeRule:NK},TM=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${pf} Initial EndpointParams: ${Di(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new Ls(`Missing required parameter: '${h}'`);const d=RM(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pf} Resolved endpoint: ${Di(d)}`),d},AM=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!AM(n))return!1;return!0}return!(!Jp(e)||e.length<3||e.length>63||e!==e.toLowerCase()||yM(e))},YC=":",zK="/",LK=e=>{const t=e.split(YC);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(YC)==="")return null;const d=f.map(h=>h.split(zK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},BK=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],$K={partitions:BK};let UK=$K;const jK=e=>{const{partitions:t}=UK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},kb={isVirtualHostableS3Bucket:AM,parseArn:LK,partition:jK};hf.aws=kb;function HK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const mf=e=>{if(typeof e=="string")return mf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=HK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function FK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function vr(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const XC=e=>ka.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Pb=e=>new Date(Date.now()+e),VK=(e,t)=>Math.abs(Pb(t).getTime()-e)>=3e5,WC=(e,t)=>{const n=Date.parse(e);return VK(n,t)?n-Date.now():t},Qu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},IM=async e=>{const t=Qu("context",e.context),n=Qu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await Qu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class Nb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await IM(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,v]=h.authSchemes;g?.name==="sigv4a"&&v?.name==="sigv4"&&(f=v?.signingRegion??f,d=v?.signingName??d)}return await l.sign(t,{signingDate:Pb(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??XC(n.$response);if(r){const i=Qu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=WC(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=XC(t);if(r){const i=Qu("config",n.config);i.systemClockOffset=WC(r,i.systemClockOffset)}}}class qK extends Nb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await IM(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:Pb(i.systemClockOffset),signingRegion:y,signingService:d})}}const GK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},KK=e=>(e.sigv4aSigningRegionSet=Zc(e.sigv4aSigningRegionSet),e),ZK="X-Amz-Algorithm",QK="X-Amz-Credential",OM="X-Amz-Date",YK="X-Amz-SignedHeaders",XK="X-Amz-Expires",MM="X-Amz-Signature",DM="X-Amz-Security-Token",kM="authorization",PM=OM.toLowerCase(),WK="date",JK=[kM,PM,WK],eZ=MM.toLowerCase(),kv="x-amz-content-sha256",tZ=DM.toLowerCase(),nZ={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},sZ=/^proxy-/,rZ=/^sec-/,R0="AWS4-HMAC-SHA256",oZ="AWS4-HMAC-SHA256-PAYLOAD",iZ="UNSIGNED-PAYLOAD",aZ=50,NM="aws4_request",cZ=3600*24*7,xh={},C0=[],T0=(e,t,n)=>`${e}/${t}/${n}/${NM}`,lZ=async(e,t,n,r,i)=>{const c=await JC(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${ps(c)}:${t.sessionToken}`;if(l in xh)return xh[l];for(C0.push(l);C0.length>aZ;)delete xh[C0.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,NM])f=await JC(e,f,d);return xh[l]=f},JC=(e,t,n)=>{const r=new e(t);return r.update(df(n)),r.digest()},eT=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in nZ||t?.has(c)||sZ.test(c)||rZ.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},uZ=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",A0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===kv)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||uZ(t)){const r=new n;return r.update(df(t)),ps(await r.digest())}return iZ};class fZ{format(t){const n=[];for(const c of Object.keys(t)){const l=So(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=So(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(hZ.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!dZ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(sM(t.value.replace(/\-/g,"")),1),g}}}var tT;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(tT||(tT={}));const dZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let hZ=class zM{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&nT(n),new zM(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&nT(t),parseInt(ps(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function nT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const pZ=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},mZ=(e,t={})=>{const{headers:n,query:r={}}=Mn.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},sT=e=>{e=Mn.clone(e);for(const t of Object.keys(e.headers))JK.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},gZ=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===eZ)continue;const i=Ta(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${Ta(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${Ta(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},yZ=e=>vZ(e).toISOString().replace(/\.\d{3}Z$/,"Z"),vZ=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class bZ{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ns(r),this.credentialProvider=Ns(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} +`),LG={warn:console.warn},BG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ab=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mp(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${BG[r]}, ${d} ${Ab[n]} ${t} ${h}:${y}:${g} GMT`}const $G=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),UG=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),jG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),H0e=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=$G.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return w0(Dv(gp(c)),E0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=UG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return VG(w0(HG(c),E0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=jG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return w0(Dv(gp(h)),E0(r),Yc(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},w0=(e,t,n,r)=>{const i=t-1;return GG(e,i,n),new Date(Date.UTC(e,i,n,Yc(r.hours,"hour",0,23),Yc(r.minutes,"minute",0,59),Yc(r.seconds,"seconds",0,60),ZG(r.fractionalMilliseconds)))},HG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+Dv(gp(e));return ne.getTime()-new Date().getTime()>FG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,E0=e=>{const t=Ab.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},qG=[31,28,31,30,31,30,31,31,30,31,30,31],GG=(e,t,n)=>{let r=qG[t];if(t===1&&KG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Ab[t]} in ${e}: ${n}`)},KG=e=>e%4===0&&(e%100!==0||e%400===0),Yc=(e,t,n,r)=>{const i=NG(gp(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},ZG=e=>e==null?0:kG("0."+e)*1e3,gp=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),Yp=()=>{if(KC)return KC();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Kn[e[0]]+Kn[e[1]]+Kn[e[2]]+Kn[e[3]]+"-"+Kn[e[4]]+Kn[e[5]]+"-"+Kn[e[6]]+Kn[e[7]]+"-"+Kn[e[8]]+Kn[e[9]]+"-"+Kn[e[10]]+Kn[e[11]]+Kn[e[12]]+Kn[e[13]]+Kn[e[14]]+Kn[e[15]]},Ri=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Ri.from=e=>e&&typeof e=="object"&&(e instanceof Ri||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Ri(String(e)):Ri(JSON.stringify(e));Ri.fromObject=Ri.from;function QG(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const Ib="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Ob="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Mb="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",cM="(\\d?\\d)",lM="(\\d{4})",YG=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),XG=new RegExp(`^${Ib}, ${cM} ${Ob} ${lM} ${Mb} GMT$`),WG=new RegExp(`^${Ib}, ${cM}-${Ob}-(\\d\\d) ${Mb} GMT$`),JG=new RegExp(`^${Ib} ${Ob} ( [1-9]|\\d\\d) ${Mb} ${lM}$`),eK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tK=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},nK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=YG.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;fo(r,1,12),fo(i,1,31),fo(c,0,23),fo(l,0,59),fo(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,v,b]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(v)*60*60*1e3+Number(b)*60*1e3))}return y},sK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=XG.exec(e))?[,t,n,r,i,c,l,f]=d:(d=WG.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=JG.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),eK.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);fo(t,1,31),fo(i,0,23),fo(c,0,59),fo(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function fo(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function rK(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},ZC=/^-?\d*(\.\d+)?$/;class Cf{string;type;constructor(t,n){if(this.string=t,this.type=n,!ZC.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return Cf.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&ZC.test(n.string)}}const oK="modulepreload",iK=function(e){return"/"+e},QC={},sn=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=iK(h),h in QC)return;QC[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":oK,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,_)=>{v.addEventListener("load",b),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class Xp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class fM extends Xp{options;constructor(t){super(),this.options=t}getRequestType(){return Mn}getResponseType(){return Pa}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=Hc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await sn(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class aK extends fM{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,v;const b=new Mn({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(b,d),this.setHostPrefix(b,t,i);const _=Hc(t.traits);if(_.http){b.method=_.http[0];const[x,R]=_.http[1].split("?");b.path=="/"?b.path=x:b.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(b.path.includes(`{${_}+}`)||b.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(v=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):v=C:(c.write(x,C),v=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();b.path.includes(`{${_}+}`)?b.path=b.path.replace(`{${_}+}`,A.split("/").map(pp).join("/")):b.path.includes(`{${_}}`)&&(b.path=b.path.replace(`{${_}}`,pp(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),v=c.flush()),b.headers=f,b.query=l,b.body=v,b}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await xi(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await xi(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,v]of h.structIterator()){const b=v.getMemberTraits();if(b.httpPayload){if(f=!1,v.isStreaming())v.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=rM(r.body);else if(r.body){const x=await xi(r.body,n);x.byteLength>0&&(l[g]=await d.read(v,x))}}else if(b.httpHeader){const _=String(b.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(v.isListSchema()){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=rK(x,",",2):C=uM(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(v,x)}else if(b.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(b.httpPrefixHeaders)){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(b.httpPrefixHeaders.length)]=await d.read(R,x)}}else b.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class cK extends fM{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new Mn({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const v={...n};if(n){const b=d.getEventStreamMember();if(b){if(v[b]){const _={};for(const[x,R]of d.structIterator())x!==b&&v[x]&&(i.write(R,v[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:v[b],requestSchema:d,initialRequest:_})}}else i.write(h,v),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await xi(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function Wp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class dM extends Xp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return uM(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??Na)(n);if(r.isTimestampSchema())switch(Wp(r,this.settings)){case 5:return nK(n);case 6:return sK(n);case 7:return tK(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new Cf(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??ja)((this.serdeContext?.base64Decoder??Na)(t))}}class lK extends Xp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new dM(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??ja;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??So;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class uK extends Xp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(Wp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=mp(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:QG(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=Yp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class fK{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new uK(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function dK(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class hM{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const hK=e=>function(n){return pM(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,gK=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},yK=void 0;function vK(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function mM(e){const t=Zc(e.userAgentAppId??yK),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!vK(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class gM{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const bK=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),yM=e=>bK.test(e)||e.startsWith("[")&&e.endsWith("]"),SK=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Jp=(e,t=!1)=>{if(!t)return SK.test(e);const n=e.split(".");for(const r of n)if(!Jp(r))return!1;return!0},hf={},pf="endpoints";function Di(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Di(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Di).join(", ")})`:JSON.stringify(e,null,2)}class Ls extends Error{constructor(t){super(t),this.name="EndpointError"}}const _K=(e,t)=>e===t,wK=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new Ls(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new Ls(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},vM=(e,t)=>wK(t).reduce((n,r)=>{if(typeof n!="object")throw new Ls(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),EK=e=>e!=null,xK=e=>!e,x0={[ff.HTTP]:80,[ff.HTTPS]:443},RK=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:v,port:b,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${v}${b?`:${b}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(ff).includes(d))return null;const h=yM(i),y=n.includes(`${r}:${x0[d]}`)||typeof e=="string"&&e.includes(`${r}:${x0[d]}`),g=`${r}${y?`:${x0[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},CK=(e,t)=>e===t,TK=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),IK={booleanEquals:_K,getAttr:vM,isSet:EK,isValidHostLabel:Jp,not:xK,parseURL:RK,stringEquals:CK,substring:TK,uriEncode:AK},bM=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],em=(e,t,n)=>{if(typeof e=="string")return bM(e,n);if(e.fn)return _M.callFunction(e,n);if(e.ref)return OK(e,n);throw new Ls(`'${t}': ${String(e)} is not a string, function or reference.`)},SM=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:_M.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in hf&&i[1]!=null?hf[i[0]][i[1]](...r):IK[e](...r)},_M={evaluateExpression:em,callFunction:SM},MK=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ls(`'${e}' is already defined in Reference Record.`);const r=SM(t,n);return n.logger?.debug?.(`${pf} evaluateCondition: ${Di(t)} = ${Di(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Db=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=MK(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${pf} assign: ${c.name} := ${Di(c.value)}`))}return{result:!0,referenceRecord:n}},DK=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=em(c,"Header value entry",t);if(typeof l!="string")throw new Ls(`Header '${r}' value '${l}' is not a string`);return l})}),{}),wM=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:xM.getEndpointProperty(i,t)}),{}),EM=(e,t)=>{if(Array.isArray(e))return e.map(n=>EM(n,t));switch(typeof e){case"string":return bM(e,t);case"object":if(e===null)throw new Ls(`Unexpected endpoint property: ${e}`);return xM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ls(`Unexpected endpoint property type: ${typeof e}`)}},xM={getEndpointProperty:EM,getEndpointProperties:wM},kK=(e,t)=>{const n=em(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new Ls(`Endpoint URL must be a string, got ${typeof n}`)},PK=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${pf} Resolving endpoint from template: ${Di(r)}`),{...h!=null&&{headers:DK(h,l)},...d!=null&&{properties:wM(d,l)},url:kK(f,l)}},NK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(i)throw new Ls(em(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},RM=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=PK(n,t);if(r)return r}else if(n.type==="error")NK(n,t);else if(n.type==="tree"){const r=CM.evaluateTreeRule(n,t);if(r)return r}else throw new Ls(`Unknown endpoint rule: ${n}`);throw new Ls("Rules evaluation failed")},zK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=Db(n,t);if(i)return CM.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},CM={evaluateRules:RM,evaluateTreeRule:zK},TM=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${pf} Initial EndpointParams: ${Di(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new Ls(`Missing required parameter: '${h}'`);const d=RM(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pf} Resolved endpoint: ${Di(d)}`),d},AM=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!AM(n))return!1;return!0}return!(!Jp(e)||e.length<3||e.length>63||e!==e.toLowerCase()||yM(e))},YC=":",LK="/",BK=e=>{const t=e.split(YC);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(YC)==="")return null;const d=f.map(h=>h.split(LK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},$K=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],UK={partitions:$K};let jK=UK;const HK=e=>{const{partitions:t}=jK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},kb={isVirtualHostableS3Bucket:AM,parseArn:BK,partition:HK};hf.aws=kb;function FK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const mf=e=>{if(typeof e=="string")return mf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=FK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function VK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function vr(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const XC=e=>Pa.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Pb=e=>new Date(Date.now()+e),qK=(e,t)=>Math.abs(Pb(t).getTime()-e)>=3e5,WC=(e,t)=>{const n=Date.parse(e);return qK(n,t)?n-Date.now():t},Qu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},IM=async e=>{const t=Qu("context",e.context),n=Qu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await Qu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class Nb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await IM(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,v]=h.authSchemes;g?.name==="sigv4a"&&v?.name==="sigv4"&&(f=v?.signingRegion??f,d=v?.signingName??d)}return await l.sign(t,{signingDate:Pb(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??XC(n.$response);if(r){const i=Qu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=WC(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=XC(t);if(r){const i=Qu("config",n.config);i.systemClockOffset=WC(r,i.systemClockOffset)}}}class GK extends Nb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await IM(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:Pb(i.systemClockOffset),signingRegion:y,signingService:d})}}const KK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},ZK=e=>(e.sigv4aSigningRegionSet=Zc(e.sigv4aSigningRegionSet),e),QK="X-Amz-Algorithm",YK="X-Amz-Credential",OM="X-Amz-Date",XK="X-Amz-SignedHeaders",WK="X-Amz-Expires",MM="X-Amz-Signature",DM="X-Amz-Security-Token",kM="authorization",PM=OM.toLowerCase(),JK="date",eZ=[kM,PM,JK],tZ=MM.toLowerCase(),kv="x-amz-content-sha256",nZ=DM.toLowerCase(),sZ={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},rZ=/^proxy-/,oZ=/^sec-/,R0="AWS4-HMAC-SHA256",iZ="AWS4-HMAC-SHA256-PAYLOAD",aZ="UNSIGNED-PAYLOAD",cZ=50,NM="aws4_request",lZ=3600*24*7,xh={},C0=[],T0=(e,t,n)=>`${e}/${t}/${n}/${NM}`,uZ=async(e,t,n,r,i)=>{const c=await JC(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${ms(c)}:${t.sessionToken}`;if(l in xh)return xh[l];for(C0.push(l);C0.length>cZ;)delete xh[C0.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,NM])f=await JC(e,f,d);return xh[l]=f},JC=(e,t,n)=>{const r=new e(t);return r.update(df(n)),r.digest()},eT=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in sZ||t?.has(c)||rZ.test(c)||oZ.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},fZ=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",A0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===kv)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||fZ(t)){const r=new n;return r.update(df(t)),ms(await r.digest())}return aZ};class dZ{format(t){const n=[];for(const c of Object.keys(t)){const l=So(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=So(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(pZ.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!hZ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(sM(t.value.replace(/\-/g,"")),1),g}}}var tT;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(tT||(tT={}));const hZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let pZ=class zM{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&nT(n),new zM(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&nT(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function nT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const mZ=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},gZ=(e,t={})=>{const{headers:n,query:r={}}=Mn.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},sT=e=>{e=Mn.clone(e);for(const t of Object.keys(e.headers))eZ.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},yZ=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===tZ)continue;const i=Aa(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${Aa(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${Aa(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},vZ=e=>bZ(e).toISOString().replace(/\.\d{3}Z$/,"Z"),bZ=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class SZ{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ns(r),this.credentialProvider=Ns(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} ${this.getCanonicalPath(t)} -${gZ(t)} +${yZ(t)} ${i.map(c=>`${c}:${n[c]}`).join(` `)} @@ -76,6 +76,6 @@ ${i.join(";")} ${r}`}async createStringToSign(t,n,r,i){const c=new this.sha256;c.update(df(r));const l=await c.digest();return`${i} ${t} ${n} -${ps(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Ta(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=yZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Pv extends bZ{headerFormatter=new fZ;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:c,unhoistableHeaders:l,signableHeaders:f,hoistableHeaders:d,signingRegion:h,signingService:y}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const v=h??await this.regionProvider(),{longDate:b,shortDate:_}=this.formatDate(r);if(i>cZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=T0(_,v,y??this.service),R=mZ(sT(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[DM]=g.sessionToken),R.query[ZK]=R0,R.query[QK]=`${g.accessKeyId}/${x}`,R.query[OM]=b,R.query[XK]=i.toString(10);const C=eT(R,c,f);return R.query[YK]=this.getCanonicalHeaderList(C),R.query[MM]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await A0(t,this.sha256))),R}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:c,signingService:l}){const f=c??await this.regionProvider(),{shortDate:d,longDate:h}=this.formatDate(r),y=T0(d,f,l??this.service),g=await A0({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=ps(await v.digest()),_=[oZ,h,y,i,b,g].join(` -`);return this.signString(_,{signingDate:r,signingRegion:f,signingService:l})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:t.priorSignature}).then(l=>({message:t.message,signature:l}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:i}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const l=r??await this.regionProvider(),{shortDate:f}=this.formatDate(n),d=new this.sha256(await this.getSigningKey(c,l,f,i));return d.update(df(t)),ps(await d.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:c,signingService:l}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const d=c??await this.regionProvider(),h=sT(t),{longDate:y,shortDate:g}=this.formatDate(n),v=T0(g,d,l??this.service);h.headers[PM]=y,f.sessionToken&&(h.headers[tZ]=f.sessionToken);const b=await A0(h,this.sha256);!pZ(kv,h.headers)&&this.applyChecksum&&(h.headers[kv]=b);const _=eT(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[kM]=`${R0} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,R0),l=new this.sha256(await r);return l.update(df(c)),ps(await l.digest())}getSigningKey(t,n,r,i){return lZ(this.sha256,t,r,n,i||this.service)}}const LM=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(h){h&&h!==t&&h!==r&&(n=!0),t=h;const y=SZ(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=_Z(e,y);if(n&&!g.attributed){const v=typeof t=="object"&&t!==null;r=async b=>{const x=await g(b);return v&&(!x.$source||Object.keys(x.$source).length===0)?FK(x,"CREDENTIALS_CODE","e"):x},r.memoized=g.memoized,r.configBound=g.configBound,r.attributed=!0}else r=g},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:c=e.systemClockOffset||0,sha256:l}=e;let f;return e.signer?f=Zc(e.signer):e.regionInfoProvider?f=()=>Zc(e.region)().then(async h=>[await e.regionInfoProvider(h,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},h]).then(([h,y])=>{const{signingRegion:g,signingService:v}=h;e.signingRegion=e.signingRegion||g||y,e.signingName=e.signingName||v||e.serviceId;const b={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},_=e.signerConstructor||Pv;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Zc(e.region)(),properties:{}},h);const y=h.signingRegion,g=h.signingName;e.signingRegion=e.signingRegion||y,e.signingName=e.signingName||g||e.serviceId;const v={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},b=e.signerConstructor||Pv;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function SZ(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=mK(t,pK,pM):n?r=Zc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function _Z(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const rT=typeof TextEncoder=="function"?new TextEncoder:null,BM=e=>{if(typeof e=="string"){if(rT)return rT.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},ya=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},mi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,yp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>oT[b.step]-oT[v.step]||iT[b.priority||"normal"]-iT[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=ya(_.name,_.aliases);if(x.includes(g)){v=!0;for(const R of x)r.delete(R);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},l=g=>{let v=!1;const b=_=>{if(_.middleware===g){v=!0;for(const x of ya(_.name,_.aliases))r.delete(x);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},f=g=>(e.forEach(v=>{g.add(v.middleware,{...v})}),t.forEach(v=>{g.addRelativeTo(v.middleware,{...v})}),g.identifyOnResolve?.(y.identifyOnResolve()),g),d=g=>{const v=[];return g.before.forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v.push(g),g.after.reverse().forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v},h=(g=!1)=>{const v=[],b=[],_={};return e.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ya(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ya(C.name,C.aliases))_[A]=C;b.push(C)}),b.forEach(R=>{if(R.toMiddleware){const C=_[R.toMiddleware];if(C===void 0){if(g)return;throw new Error(`${R.toMiddleware} is not found when adding ${mi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&C.after.push(R),R.relation==="before"&&C.before.push(R)}}),i(v).map(d).reduce((R,C)=>(R.push(...C),R),[])},y={add:(g,v={})=>{const{name:b,override:_,aliases:x}=v,R={step:"initialize",priority:"normal",middleware:g,...v},C=ya(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${mi(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${mi(b,x)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(O,1)}}for(const A of C)r.add(A)}e.push(R)},addRelativeTo:(g,v)=>{const{name:b,override:_,aliases:x}=v,R={middleware:g,...v},C=ya(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${mi(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${mi(b,x)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(O,1)}}for(const A of C)r.add(A)}t.push(R)},clone:()=>f(yp()),use:g=>{g.applyToStack(y)},remove:g=>typeof g=="string"?c(g):l(g),removeByTag:g=>{let v=!1;const b=_=>{const{tags:x,name:R,aliases:C}=_;if(x&&x.includes(g)){const A=ya(R,C);for(const O of A)r.delete(O);return v=!0,!1}return!0};return e=e.filter(b),t=t.filter(b),v},concat:g=>{const v=f(yp());return v.use(g),v.identifyOnResolve(n||v.identifyOnResolve()||(g.identifyOnResolve?.()??!1)),v},applyToStack:f,identify:()=>h(!0).map(g=>{const v=g.step??g.relation+" "+g.toMiddleware;return mi(g.name,g.aliases)+" - "+v}),identifyOnResolve(g){return typeof g=="boolean"&&(n=g),n},resolve:(g,v)=>{for(const b of h().map(_=>_.middleware).reverse())g=b(g,v);return n&&console.log(y.identify()),g}};return y},oT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},iT={high:3,normal:2,low:1};class $M{config;middlewareStack=yp();initConfig;handlers;constructor(t){this.config=t;const{protocol:n,protocolSettings:r}=t;r&&typeof n=="function"&&(t.protocol=new n(r))}send(t,n,r){const i=typeof n!="function"?n:void 0,c=typeof n=="function"?n:r,l=i===void 0&&this.config.cacheMiddleware===!0;let f;if(l){this.handlers||(this.handlers=new WeakMap);const d=this.handlers;d.has(t.constructor)?f=d.get(t.constructor):(f=t.resolveMiddleware(this.middlewareStack,this.config,i),d.set(t.constructor,f))}else delete this.handlers,f=t.resolveMiddleware(this.middlewareStack,this.config,i);if(c)f(t).then(d=>c(null,d.output),d=>c(d)).catch(()=>{});else return f(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const I0="***SensitiveInformation***";function Nv(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return I0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return I0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return I0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=Nv(l,r[c]));return i}return t}class Br{middlewareStack=yp();schema;static classBuilder(){return new wZ}resolveMiddlewareWithContext(t,n,r,{middlewareFn:i,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,smithyContext:h,additionalContext:y,CommandCtor:g}){for(const R of i.bind(this)(g,t,n,r))this.middlewareStack.use(R);const v=t.concat(this.middlewareStack),{logger:b}=n,_={logger:b,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,[Ov]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return v.resolve(R=>x.handle(R.request,r||{}),_)}}class wZ{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends Br{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,c){const l=t._operationSchema,f=l?.[4]??l?.input,d=l?.[5]??l?.output;return this.resolveMiddlewareWithContext(r,i,c,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(l?Nv.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?Nv.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class wa extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return wa.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===wa?wa.isInstance(t):wa.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const aT=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,i])=>{(e[r]==null||e[r]==="")&&(e[r]=i)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},UM=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},EZ=e=>{const t=[];for(const n in hp){const r=hp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},xZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},RZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),CZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},jM=e=>Object.assign(EZ(e),RZ(e)),HM=e=>Object.assign(xZ(e),CZ(e)),FM=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=FM(e[n]));return e};class zb{trace(){}debug(){}info(){}warn(){}error(){}}class VM{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,n){const r=n.getMemberSchemas(),i=Object.values(r).find(c=>!!c.getMergedTraits().httpPayload);if(i){const c=i.getMergedTraits().mediaType;return c||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!n.isUnitSchema()&&Object.values(r).find(l=>{const{httpQuery:f,httpQueryParams:d,httpHeader:h,httpLabel:y,httpPrefixHeaders:g}=l.getMergedTraits();return!f&&!d&&!h&&!y&&g===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,n,r,i,c,l){let f=n,d=t;t.includes("#")&&([f,d]=t.split("#"));const h={$metadata:c,$fault:r.statusCode<500?"client":"server"},y=Mt.for(f);try{return{errorSchema:l?.(y,d)??y.getSchema(t),errorMetadata:h}}catch{i.message=i.message??i.Message??"UnknownError";const v=Mt.for("smithy.ts.sdk.synthetic."+f),b=v.getBaseException();if(b){const _=v.getErrorCtor(b)??Error;throw this.decorateServiceException(Object.assign(new _({name:d}),h),i)}throw this.decorateServiceException(Object.assign(new Error(d),h),i)}}decorateServiceException(t,n={}){if(this.queryCompat){const r=t.Message??n.Message,i=aT(t,n);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const c=i.$metadata.requestId;return c&&(i.RequestId=c),i}return aT(t,n)}setQueryCompatError(t,n){const r=n.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[i,c]=r.split(";"),l=Object.entries(t),f={Code:i,Type:c};Object.assign(t,f);for(const[d,h]of l)f[d==="message"?"Message":d]=h;delete f.__type,t.Error=f}}queryCompatOutput(t,n){t.Error&&(n.Error=t.Error),t.Type&&(n.Type=t.Type),t.Code&&(n.Code=t.Code)}findQueryCompatibleError(t,n){try{return t.getSchema(n)}catch{return t.find(i=>wt.of(i).getMergedTraits().awsQueryError?.[0]===n)}}}class tm{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*qM(e,t){if(e.isUnitSchema())return;const n=e.getSchema();for(let r=0;rr!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,n=this.from[t];this.to.$unknown=[t,n]}}}function AZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function IZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class zv{value;constructor(t){this.value=t}toString(){return IZ(""+this.value)}}class ss{name;children;attributes={};static of(t,n,r){const i=new ss(t);return n!==void 0&&i.addChildNode(new zv(n)),r!==void 0&&i.withName(r),i}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const i=ss.of(n,t[n]).withName(r);this.c(i)}}l(t,n,r,i){t[n]!=null&&i().map(l=>{l.withName(r),this.c(l)})}lc(t,n,r,i){if(t[n]!=null){const c=i(),l=new ss(r);c.map(f=>{l.c(f)}),this.c(l)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const i of Object.keys(r)){const c=r[i];c!=null&&(n+=` ${i}="${AZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let O0;function OZ(e){O0||(O0=new DOMParser);const t=O0.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const c={},l=Array.from(i.attributes);for(const d of l)c[`${d.name}`]=d.value;const f=Array.from(i.childNodes);for(const d of f){const h=n(d);if(h!=null){const y=d.nodeName;if(f.length===1&&l.length===0&&y==="#text")return h;c[y]?Array.isArray(c[y])?c[y].push(h):c[y]=[c[y],h]:c[y]=h}else if(f.length===1&&l.length===0)return i.textContent}return c}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}class GM extends tm{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new dM(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,n,r){const i=wt.of(t),c=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(c).find(h=>!!h.getMemberTraits().eventPayload)){const h={},y=Object.keys(c)[0];return c[y].isBlobSchema()?h[y]=n:h[y]=this.read(c[y],n),h}const f=(this.serdeContext?.utf8Encoder??Ua)(n),d=this.parseXml(f);return this.readSchema(t,r?d[r]:d)}readSchema(t,n){const r=wt.of(t);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(n))return this.readSchema(r,[n]);if(n==null)return n;if(typeof n=="object"){const c=!!i.sparse,l=!!i.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),h=[],y=d.getMergedTraits().xmlName??"member",g=l?n:(n[0]??n)[y],v=Array.isArray(g)?g:[g];for(const b of v)(b!=null||c)&&h.push(this.readSchema(d,b));return h}const f={};if(r.isMapSchema()){const d=r.getKeySchema(),h=r.getValueSchema();let y;l?y=Array.isArray(n)?n:[n]:y=Array.isArray(n.entry)?n.entry:[n.entry];const g=d.getMergedTraits().xmlName??"key",v=h.getMergedTraits().xmlName??"value";for(const b of y){const _=b[g],x=b[v];(x!=null||c)&&(f[_]=this.readSchema(h,x))}return f}if(r.isStructSchema()){const d=r.isUnionSchema();let h;d&&(h=new TZ(n,f));for(const[y,g]of r.structIterator()){const v=g.getMergedTraits(),b=v.httpPayload?v.xmlName??g.getName():g.getMemberTraits().xmlName??y;d&&h.mark(b),n[b]!=null&&(f[y]=this.readSchema(g,n[b]))}return d&&h.writeUnknown(),f}if(r.isDocumentSchema())return n;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,n)}parseXml(t){if(t.length){let n;try{n=OZ(t)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:t}),l}const r="#text",i=Object.keys(n)[0],c=n[i];return c[r]&&(c[i]=c[r],delete c[r]),FM(c)}return{}}}class MZ extends tm{settings;buffer;constructor(t){super(),this.settings=t}write(t,n,r=""){this.buffer===void 0&&(this.buffer="");const i=wt.of(t);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof n=="string"||n instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Mi)(n)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())n!=null?(this.writeKey(r),this.writeValue(String(n))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(Yp()));else if(i.isBigIntegerSchema())n!=null&&(this.writeKey(r),this.writeValue(String(n)));else if(i.isBigDecimalSchema())n!=null&&(this.writeKey(r),this.writeValue(n instanceof Cf?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Wp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(mp(n));break;case 7:this.writeValue(String(n.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(n)?this.write(79,n,r):n instanceof Date?this.write(4,n,r):n instanceof Uint8Array?this.write(21,n,r):n&&typeof n=="object"?this.write(143,n,r):(this.writeKey(r),this.writeValue(String(n)));else if(i.isListSchema()){if(Array.isArray(n))if(n.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const c=i.getValueSchema(),l=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let f=1;for(const d of n){if(d==null)continue;const h=this.getKey("member",c.getMergedTraits().xmlName),y=l?`${r}${f}`:`${r}${h}.${f}`;this.write(c,d,y),++f}}}else if(i.isMapSchema()){if(n&&typeof n=="object"){const c=i.getKeySchema(),l=i.getValueSchema(),f=i.getMergedTraits().xmlFlattened;let d=1;for(const[h,y]of Object.entries(n)){if(y==null)continue;const g=this.getKey("key",c.getMergedTraits().xmlName),v=f?`${r}${d}.${g}`:`${r}entry.${d}.${g}`,b=this.getKey("value",l.getMergedTraits().xmlName),_=f?`${r}${d}.${b}`:`${r}entry.${d}.${b}`;this.write(c,h,v),this.write(l,y,_),++d}}}else if(i.isStructSchema()){if(n&&typeof n=="object"){let c=!1;for(const[l,f]of qM(i,n)){if(n[l]==null&&!f.isIdempotencyToken())continue;const d=this.getKey(l,f.getMergedTraits().xmlName),h=`${r}${d}`;this.write(f,n[l],h),c=!0}if(!c&&i.isUnionSchema()){const{$unknown:l}=n;if(Array.isArray(l)){const[f,d]=l,h=`${r}${f}`;this.write(15,d,h)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,n){const r=n??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${pp(t)}=`}writeValue(t){this.buffer+=pp(t)}}class DZ extends aK{options;serializer;deserializer;mixin=new VM;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new MZ(n),this.deserializer=new GM(n)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(Lh(t.input)==="unit"||!i.body)&&(i.body="");const c=t.name.split("#")[1]??t.name;return i.body=`Action=${c}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const g=await xi(r.body,n);g.byteLength>0&&Object.assign(l,await i.read(15,g)),await this.handleError(t,n,r,l,this.deserializeMetadata(r))}for(const g in r.headers){const v=r.headers[g];delete r.headers[g],r.headers[g.toLowerCase()]=v}const f=t.name.split("#")[1]??t.name,d=c.isStructSchema()&&this.useNestedResult()?f+"Result":void 0,h=await xi(r.body,n);return h.byteLength>0&&Object.assign(l,await i.read(c,h,d)),{$metadata:this.deserializeMetadata(r),...l}}useNestedResult(){return!0}async handleError(t,n,r,i,c){const l=this.loadQueryErrorCode(r,i)??"Unknown",f=this.loadQueryError(i),d=this.loadQueryErrorMessage(i);f.message=d,f.Error={Type:f.Type,Code:f.Code,Message:d};const{errorSchema:h,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,f,c,this.mixin.findQueryCompatibleError),g=wt.of(h),v=Mt.for(h[1]).getErrorCtor(h)??Error,b=new v(d),_={Type:f.Error.Type,Code:f.Error.Code,Error:f.Error};for(const[x,R]of g.structIterator()){const C=R.getMergedTraits().xmlName??x,A=f[C]??i[C];_[x]=this.deserializer.readSchema(R,A)}throw this.mixin.decorateServiceException(Object.assign(b,y,{$fault:g.getMergedTraits().error,message:d},_),i)}loadQueryErrorCode(t,n){const r=(n.Errors?.[0]?.Error??n.Errors?.Error??n.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const n=this.loadQueryError(t);return n?.message??n?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class kZ extends DZ{options;constructor(t){super(t),this.options=t;const n={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,n)}useNestedResult(){return!1}}const PZ=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class NZ extends tm{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);if(r.isStringSchema()&&typeof n=="string")this.stringBuffer=n;else if(r.isBlobSchema())this.byteBuffer="byteLength"in n?n:(this.serdeContext?.base64Decoder??Pa)(n);else{this.buffer=this.writeStruct(r,n,void 0);const i=r.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(r.getName())}}flush(){if(this.byteBuffer!==void 0){const n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){const n=this.stringBuffer;return delete this.stringBuffer,n}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,n,r){const i=t.getMergedTraits(),c=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!c||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const l=ss.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of qM(t,n)){const v=n[y];if(v!=null||g.isIdempotencyToken()){if(g.getMergedTraits().xmlAttribute){l.addAttribute(g.getMergedTraits().xmlName??y,this.writeSimple(g,v));continue}if(g.isListSchema())this.writeList(g,v,l,d);else if(g.isMapSchema())this.writeMap(g,v,l,d);else if(g.isStructSchema())l.addChildNode(this.writeStruct(g,v,d));else{const b=ss.of(g.getMergedTraits().xmlName??g.getMemberName());this.writeSimpleInto(g,v,b,d),l.addChildNode(b)}}}const{$unknown:h}=n;if(h&&t.isUnionSchema()&&Array.isArray(h)&&Object.keys(n).length===1){const[y,g]=h,v=ss.of(y);if(typeof g!="string")if(n instanceof ss||n instanceof zv)l.addChildNode(n);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,g,v,d),l.addChildNode(v)}return d&&l.addAttribute(f,d),l}writeList(t,n,r,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const c=t.getMergedTraits(),l=t.getValueSchema(),f=l.getMergedTraits(),d=!!f.sparse,h=!!c.xmlFlattened,[y,g]=this.getXmlnsAttribute(t,i),v=(b,_)=>{if(l.isListSchema())this.writeList(l,Array.isArray(_)?_:[_],b,g);else if(l.isMapSchema())this.writeMap(l,_,b,g);else if(l.isStructSchema()){const x=this.writeStruct(l,_,g);b.addChildNode(x.withName(h?c.xmlName??t.getMemberName():f.xmlName??"member"))}else{const x=ss.of(h?c.xmlName??t.getMemberName():f.xmlName??"member");this.writeSimpleInto(l,_,x,g),b.addChildNode(x)}};if(h)for(const b of n)(d||b!=null)&&v(r,b);else{const b=ss.of(c.xmlName??t.getMemberName());g&&b.addAttribute(y,g);for(const _ of n)(d||_!=null)&&v(b,_);r.addChildNode(b)}}writeMap(t,n,r,i,c=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const l=t.getMergedTraits(),f=t.getKeySchema(),h=f.getMergedTraits().xmlName??"key",y=t.getValueSchema(),g=y.getMergedTraits(),v=g.xmlName??"value",b=!!g.sparse,_=!!l.xmlFlattened,[x,R]=this.getXmlnsAttribute(t,i),C=(A,O,D)=>{const N=ss.of(h,O),[j,B]=this.getXmlnsAttribute(f,R);B&&N.addAttribute(j,B),A.addChildNode(N);let k=ss.of(v);y.isListSchema()?this.writeList(y,D,k,R):y.isMapSchema()?this.writeMap(y,D,k,R,!0):y.isStructSchema()?k=this.writeStruct(y,D,R):this.writeSimpleInto(y,D,k,R),A.addChildNode(k)};if(_){for(const[A,O]of Object.entries(n))if(b||O!=null){const D=ss.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=ss.of(l.xmlName??t.getMemberName()),R&&A.addAttribute(x,R),r.addChildNode(A));for(const[O,D]of Object.entries(n))if(b||D!=null){const N=ss.of("entry");C(N,O,D),(c?r:A).addChildNode(N)}}}writeSimple(t,n){if(n===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const r=wt.of(t);let i=null;if(n&&typeof n=="object")if(r.isBlobSchema())i=(this.serdeContext?.base64Encoder??Mi)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Wp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=mp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=mp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof Cf?n.string:String(n);throw r.isMapSchema()||r.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${r.getName(!0)}`)}if((r.isBooleanSchema()||r.isNumericSchema()||r.isBigIntegerSchema()||r.isBigDecimalSchema())&&(i=String(n)),r.isStringSchema()&&(n===void 0&&r.isIdempotencyToken()?i=Yp():i=String(n)),i===null)throw new Error(`Unhandled schema-value pair ${r.getName(!0)}=${n}`);return i}writeSimpleInto(t,n,r,i){const c=this.writeSimple(t,n),l=wt.of(t),f=new zv(c),[d,h]=this.getXmlnsAttribute(l,i);h&&r.addAttribute(d,h),r.addChildNode(f)}getXmlnsAttribute(t,n){const r=t.getMergedTraits(),[i,c]=r.xmlNamespace??[];return c&&c!==n?[i?`xmlns:${i}`:"xmlns",c]:[void 0,void 0]}}class zZ extends tm{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new NZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new GM(this.settings);return t.setSerdeContext(this.serdeContext),t}}class LZ extends iK{codec;serializer;deserializer;mixin=new VM;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new zZ(n),this.serializer=new uK(this.codec.createSerializer(),n),this.deserializer=new cK(this.codec.createDeserializer(),n)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r),c=wt.of(t.input);if(!i.headers["content-type"]){const l=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);l&&(i.headers["content-type"]=l)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("'+i.body),i}async deserializeResponse(t,n,r){return super.deserializeResponse(t,n,r)}async handleError(t,n,r,i,c){const l=PZ(r,i)??"Unknown",{errorSchema:f,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,i,c),h=wt.of(f),y=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",g=Mt.for(f[1]).getErrorCtor(f)??Error,v=new g(y);await this.deserializeHttpMessage(f,n,r,i);const b={};for(const[_,x]of h.structIterator()){const R=x.getMergedTraits().xmlName??_,C=i.Error?.[R]??i[R];b[_]=this.codec.createDeserializer().readSchema(x,C)}throw this.mixin.decorateServiceException(Object.assign(v,d,{$fault:h.getMergedTraits().error,message:y},b),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,n]of t.structIterator())if(n.getMergedTraits().httpPayload)return!(n.isStructSchema()||n.isMapSchema()||n.isListSchema());return!1}}const BZ=/\d{12}\.ddb/;async function $Z(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&vr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?vr(e,"RETRY_MODE_ADAPTIVE","F"):vr(e,"RETRY_MODE_STANDARD","E"):vr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(BZ)&&vr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":vr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":vr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":vr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&vr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))vr(e,l,f)}}const cT="user-agent",M0="x-amz-user-agent",lT=" ",D0="/",UZ=/[^!$%&'*+\-.^_`|~\w]/g,jZ=/[^!$%&'*+\-.^_`|~\w#]/g,uT="-",HZ=1024;function FZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=HZ){t.length?t+=","+r:t+=r;continue}break}return t}const VZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!Mn.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(Rh)||[],f=(await e.defaultUserAgentProvider()).map(Rh);await $Z(n,e,r);const d=n;f.push(`m/${FZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(Rh)||[],y=await e.userAgentAppId();y&&f.push(Rh(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(lT),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(lT);return e.runtime!=="browser"?(v&&(c[M0]=c[M0]?`${c[cT]} ${v}`:v),c[cT]=g):c[M0]=g,t({...r,request:i})},Rh=e=>{const t=e[0].split(D0).map(l=>l.replace(UZ,uT)).join(D0),n=e[1]?.replace(jZ,uT),r=t.indexOf(D0),i=t.substring(0,r);let c=t.substring(r+1);return i==="api"&&(c=c.toLowerCase()),[i,c,n].filter(l=>l&&l.length>0).reduce((l,f,d)=>{switch(d){case 0:return f;case 1:return`${l}/${f}`;default:return`${l}#${f}`}},"")},qZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},KM=e=>({applyToStack:t=>{t.add(VZ(e),qZ)}}),ZM=!1,QM=!1,fT=new Set,GZ=(e,t=Jp)=>{if(!fT.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else fT.add(e)},YM=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),KZ=e=>YM(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,XM=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const r=typeof t=="function"?await t():t,i=KZ(r);return GZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return YM(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},dT="content-length";function ZZ(e){return t=>async n=>{const r=n.request;if(Mn.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(dT)===-1)try{const l=e(i);r.headers={...r.headers,[dT]:String(l)}}catch{}}return t({...n,request:r})}}const QZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},WM=e=>({applyToStack:t=>{t.add(ZZ(e.bodyLengthChecker),QZ)}}),YZ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),tQ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!eQ(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},XZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,WZ=/(\d+\.){3}\d+/,JZ=/\.\./,eQ=e=>XZ.test(e)&&!WZ.test(e)&&!JZ.test(e),tQ=e=>{const[t,n,r,,,i]=e.split(":"),c=t==="arn"&&e.split(":").length>=6,l=!!(c&&n&&r&&i);if(c&&!l)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return l},nQ=(e,t,n,r=!1)=>{const i=async()=>{let c;return r?c=n.clientContextParams?.[e]??n[e]??n[t]:c=n[e]??n[t],typeof c=="function"?c():c};return e==="credentialScope"||t==="CredentialScope"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.credentialScope??c?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.accountId??c?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const c=await i();if(c&&typeof c=="object"){if("url"in c)return c.url.href;if("hostname"in c){const{protocol:l,hostname:f,port:d,path:h}=c;return`${l}//${f}${d?":"+d:""}${h}`}}return c}:i},JM=async e=>{},eD=e=>typeof e=="object"?"url"in e?mf(e.url):e:mf(e),sQ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await JM(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(eD(l)),n.isCustomEndpoint=!0)}const i=await tD(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},tD=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[c,l]of Object.entries(i))switch(l.type){case"staticContextParams":r[c]=l.value;break;case"contextParams":r[c]=e[l.name];break;case"clientContextParams":case"builtInParams":r[c]=await nQ(l.name,c,n,l.type!=="builtInParams")();break;case"operationContextParams":r[c]=l.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(l))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await YZ(r),r},rQ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&fK(r,"ENDPOINT_OVERRIDE","N");const c=await sQ(i.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=c,r.authSchemes=c.properties?.authSchemes;const l=r.authSchemes?.[0];if(l){r.signing_region=l.signingRegion,r.signing_service=l.signingName;const d=Eo(r)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return n({...i})},oQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:cG.name},xo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(rQ({config:e,instructions:t}),oQ)}}),nD=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>eD(await Ns(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ns(r??!1),useFipsEndpoint:Ns(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=JM(e.serviceId)),d),f};var rl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(rl||(rl={}));const gf=3,sD=rl.STANDARD,iQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],aQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],cQ=[500,502,503,504],lQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],uQ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],fQ=e=>e?.$retryable!==void 0,dQ=e=>e.$metadata?.clockSkewCorrected,hQ=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},rD=e=>e.$metadata?.httpStatusCode===429||iQ.includes(e.name)||e.$retryable?.throttling==!0,Lb=(e,t=0)=>fQ(e)||dQ(e)||aQ.includes(e.name)||lQ.includes(e?.code||"")||uQ.includes(e?.code||"")||cQ.includes(e.$metadata?.httpStatusCode||0)||hQ(e)||e.cause!==void 0&&t<=10&&Lb(e.cause,t+1),pQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Lb(e)}return!1};class Bb{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Bb.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),rD(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}const Lv=100,oD=20*1e3,mQ=500,hT=500,gQ=5,yQ=10,vQ=1,bQ="amz-sdk-invocation-id",SQ="amz-sdk-request",_Q=()=>{let e=Lv;return{computeNextBackoffDelay:r=>Math.floor(Math.min(oD,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},pT=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(oD,e),getRetryCost:()=>n});class iD{maxAttempts;mode=rl.STANDARD;capacity=hT;retryBackoffStrategy=_Q();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return pT({retryDelay:Lv,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const i=n.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?mQ:Lv);const c=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),l=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,c):c,f=this.getCapacityCost(i);return this.capacity-=f,pT({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(hT,this.capacity+(t.getRetryCost()??vQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${gf}`),gf}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?yQ:gQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class wQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=rl.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Bb,this.standardRetryStrategy=new iD(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const EQ=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),aD=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ns(r??gf);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ns(n)()===rl.ADAPTIVE?new wQ(i):new iD(i))})},xQ=e=>e?.body instanceof ReadableStream,RQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(CQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=Mn.isInstance(y);for(g&&(y.headers[bQ]=Yp());;)try{g&&(y.headers[SQ]=`attempt=${d+1}; max=${c}`);const{response:v,output:b}=await t(r);return i.recordSuccess(l),b.$metadata.attempts=d+1,b.$metadata.totalRetryDelay=h,{response:v,output:b}}catch(v){const b=TQ(v);if(f=EQ(v),g&&xQ(y))throw(n.logger instanceof zb?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),f;try{l=await i.refreshRetryTokenForRetry(l,b)}catch{throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=h,f}d=l.getRetryCount();const _=l.getRetryDelay();h+=_,await new Promise(x=>setTimeout(x,_))}}else return i=i,i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r)},CQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",TQ=e=>{const t={error:e,errorType:AQ(e)},n=OQ(e.$response);return n&&(t.retryAfterHint=n),t},AQ=e=>rD(e)?"THROTTLING":Lb(e)?"TRANSIENT":pQ(e)?"SERVER_ERROR":"CLIENT_ERROR",IQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},cD=e=>({applyToStack:t=>{t.add(RQ(e),IQ)}}),OQ=e=>{if(!ka.isInstance(e))return;const t=Object.keys(e.headers).find(c=>c.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},MQ=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function DQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const kQ=e=>{const t=[];switch(e.operation){default:t.push(DQ(e))}return t},PQ=e=>{const t=LM(e);return Object.assign(t,{authSchemePreference:Ns(e.authSchemePreference??[])})},NQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),hl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},zQ="3.975.0",LQ={version:zQ},lD=e=>new TextEncoder().encode(e);var BQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:lD;function Na(e){return e instanceof Uint8Array?e:typeof e=="string"?BQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function vp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function $Q(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function UQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n0&&c[c.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nr=64,qQ=32,GQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),KQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ZQ=Math.pow(2,53)-1,Bh=(function(){function e(){this.state=Int32Array.from(KQ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>ZQ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===nr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%nr>=nr-8){for(var i=this.bufferLength;i>>24&255,c[i*4+1]=this.state[i]>>>16&255,c[i*4+2]=this.state[i]>>>8&255,c[i*4+3]=this.state[i]>>>0&255;return c},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],c=r[1],l=r[2],f=r[3],d=r[4],h=r[5],y=r[6],g=r[7],v=0;v>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[v-15];var x=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[v]=(_+this.temp[v-7]|0)+(x+this.temp[v-16]|0)}var R=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&y)|0)+(g+(GQ[v]+this.temp[v]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&c^i&l^c&l)|0;g=y,y=h,h=d,d=f+R|0,f=l,l=c,c=i,i=R+C|0}r[0]+=i,r[1]+=c,r[2]+=l,r[3]+=f,r[4]+=d,r[5]+=h,r[6]+=y,r[7]+=g},e})(),QQ=(function(){function e(t){this.secret=t,this.hash=new Bh,this.reset()}return e.prototype.update=function(t){if(!(vp(t)||this.error))try{this.hash.update(Na(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return fD(this,void 0,void 0,function(){return dD(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bh,this.secret){this.outer=new Bh;var t=YQ(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Bh;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var XQ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function hD(e){if(WQ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return JQ(t)}return!1}function WQ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function JQ(e){return e&&XQ.every(function(t){return typeof e[t]=="function"})}var pD=(function(){function e(t){hD(Ai())?this.hash=new FQ(t):this.hash=new QQ(t)}return e.prototype.update=function(t,n){this.hash.update(Na(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const mD=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??gT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??gT.browser(i)??"unknown",y=d?.version??"unknown",g=[["aws-sdk-js",t],["ua","2.1"],[`os/${c}`,l],["lang/js"],["md/browser",`${h}_${y}`]];e&&g.push([`api/${e}`,t]);const v=await n?.userAgentAppId?.();return v&&g.push([`app/${v}`]),g},gT={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},gD=e=>()=>Promise.reject(e),eY=["in-region","cross-region","mobile","standard","legacy"],yD=({defaultsMode:e}={})=>GK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(tY()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${eY.join(", ")}, got ${t}`)}}),tY=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},vD="required",rr="fn",or="argv",pl="ref",yT=!0,vT="isSet",yf="booleanEquals",Nc="error",zc="endpoint",co="tree",$b="PartitionResult",Ub="getAttr",bT={[vD]:!1,type:"string"},ST={[vD]:!0,default:!1,type:"boolean"},_T={[pl]:"Endpoint"},bD={[rr]:yf,[or]:[{[pl]:"UseFIPS"},!0]},SD={[rr]:yf,[or]:[{[pl]:"UseDualStack"},!0]},Ws={},wT={[rr]:Ub,[or]:[{[pl]:$b},"supportsFIPS"]},_D={[pl]:$b},ET={[rr]:yf,[or]:[!0,{[rr]:Ub,[or]:[_D,"supportsDualStack"]}]},xT=[bD],RT=[SD],CT=[{[pl]:"Region"}],nY={parameters:{Region:bT,UseDualStack:ST,UseFIPS:ST,Endpoint:bT},rules:[{conditions:[{[rr]:vT,[or]:[_T]}],rules:[{conditions:xT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Nc},{conditions:RT,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Nc},{endpoint:{url:_T,properties:Ws,headers:Ws},type:zc}],type:co},{conditions:[{[rr]:vT,[or]:CT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:CT,assign:$b}],rules:[{conditions:[bD,SD],rules:[{conditions:[{[rr]:yf,[or]:[yT,wT]},ET],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Nc}],type:co},{conditions:xT,rules:[{conditions:[{[rr]:yf,[or]:[wT,yT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Ub,[or]:[_D,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:zc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS is enabled but this partition does not support FIPS",type:Nc}],type:co},{conditions:RT,rules:[{conditions:[ET],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"DualStack is enabled but this partition does not support DualStack",type:Nc}],type:co},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co}],type:co},{error:"Invalid Configuration: Missing Region",type:Nc}]},sY=nY,rY=new gM({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oY=(e,t={})=>rY.get(e,()=>TM(sY,{endpointParams:e,logger:t.logger}));hf.aws=kb;const iY=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??Pa,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oY,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??kQ,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Nb}],logger:e?.logger??new zb,protocol:e?.protocol??kZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ec2",xmlNamespace:"http://ec2.amazonaws.com/doc/2016-11-15",version:"2016-11-15",serviceTarget:"AmazonEC2"},serviceId:e?.serviceId??"EC2",urlParser:e?.urlParser??mf,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??Ua}),aY=e=>{const t=yD(e),n=()=>t().then(UM),r=iY(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??BM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??mD({serviceId:r.serviceId,clientVersion:LQ.version}),maxAttempts:e?.maxAttempts??gf,region:e?.region??gD("Region is missing"),requestHandler:Qp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||sD),sha256:e?.sha256??pD,streamCollector:e?.streamCollector??Cb,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(ZM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(QM))}},wD=e=>({setRegion(t){e.region=t},region(){return e.region}}),ED=e=>({region:e.region()}),cY=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},lY=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),uY=(e,t)=>{const n=Object.assign(wD(e),jM(e),KO(e),cY(e));return t.forEach(r=>r.configure(n)),Object.assign(e,ED(n),HM(n),ZO(n),lY(n))};class fY extends $M{config;constructor(...[t]){const n=aY(t||{});super(n),this.initConfig=n;const r=NQ(n),i=mM(r),c=aD(i),l=XM(c),f=l,d=nD(f),h=PQ(d),y=uY(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(iM(this.config)),this.middlewareStack.use(KM(this.config)),this.middlewareStack.use(cD(this.config)),this.middlewareStack.use(WM(this.config)),this.middlewareStack.use(QO(this.config)),this.middlewareStack.use(YO(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(WO(this.config,{httpAuthSchemeParametersProvider:MQ,identityProviderConfigProvider:async g=>new hM({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(eM(this.config))}destroy(){super.destroy()}}class jb extends wa{constructor(t){super(t),Object.setPrototypeOf(this,jb.prototype)}}const dY="AssociateCarrierIpAddress",xD="AdditionalInfo",hY="AttachmentId",pY="AmiLaunchIndex",mY="AttachmentLimitType",gY="AssociatePublicIpAddress",yY="AutoRecoverySupported",vY="AllRegions",RD="AssociatedResource",CD="AutoRecovery",TD="AmdSevSnp",bY="ArchitectureTypeList",Hb="AttachTime",nm="AvailabilityZone",sm="AvailabilityZoneId",AD="Accelerators",SY="Affinity",ID="Arn",OD="Architecture",MD="Association",_Y="Attachment",wY="Attachments",EY="BaselineBandwidthInGbps",DD="BaselineBandwidthInMbps",Fb="BlockDeviceMapping",xY="BlockDeviceMappingList",RY="BlockDeviceMappingRequestList",Vb="BlockDeviceMappings",CY="BlockDurationMinutes",kD="BaselineIops",PD="BootMode",TY="BootModeTypeList",AY="BareMetal",IY="BurstablePerformanceSupported",ND="BaselineThroughputInMBps",zD="BandwidthWeighting",OY="BandwidthWeightingTypeList",MY="BandwidthWeightings",DY="CapacityBlockId",kY="CoreCountList",LD="CoreCount",PY="CpuCredits",NY="CreationDate",zY="CurrentGeneration",LY="CarrierIp",BY="CurrentInstanceBootMode",$Y="CoreInfo",UY="CreateKeyPair",jY="CreateKeyPairRequest",qb="CpuOptions",HY="CustomerOwnedIp",FY="CpuOptionsRequest",Gb="CapacityReservationId",BD="CapacityReservationPreference",$D="CapacityReservationResourceGroupArn",VY="CapacityReservationSpecificationResponse",Kb="CapacityReservationSpecification",Zb="CapacityReservationTarget",qY="CapacityReservationTargetResponse",GY="CreditSpecificationRequest",KY="CreditSpecification",ZY="CurrentState",Qb="ClientToken",QY="ConnectionTrackingConfiguration",YY="ConnectionTrackingSpecification",XY="ConnectionTrackingSpecificationRequest",WY="ConnectionTrackingSpecificationResponse",UD="CreateTime",JY="CreateVolumeRequest",eX="CreateVolume",jD="Code",HD="Configured",Bi="Count",tX="DisableApiStop",nX="DisableApiTermination",sX="DefaultCores",rX="DefaultEnaQueueCountPerInterface",oX="DedicatedHostsSupported",FD="DeviceIndex",iX="DiskInfoList",aX="DescribeImagesRequest",cX="DescribeImagesResult",lX="DescribeInstancesRequest",uX="DescribeInstancesResult",fX="DescribeInstanceTypesRequest",dX="DescribeInstanceTypesResult",hX="DescribeInstanceTypes",pX="DescribeImages",mX="DescribeInstances",gX="DiskInfo",yX="DeleteKeyPair",vX="DeleteKeyPairRequest",bX="DeleteKeyPairResult",SX="DescribeKeyPairsRequest",_X="DescribeKeyPairsResult",wX="DescribeKeyPairs",VD="DeviceName",EX="DefaultNetworkCardIndex",Tf="DeleteOnTermination",xX="DeregistrationProtection",Jn="DryRun",RX="DescribeRegionsRequest",CX="DescribeRegionsResult",TX="DescribeRegions",AX="DefaultThreadsPerCore",IX="DeprecationTime",OX="DefaultVCpus",MX="DescribeVolumesRequest",DX="DescribeVolumesResult",kX="DescribeVolumes",Yb="Description",PX="Device",NX="Disks",zX="EbsBlockDevice",LX="ExecutableByStringList",qD="ExecutableBy",rm="EbsCardIndex",BX="EbsCardInfoList",$X="EbsCardInfo",UX="EbsCards",jX="ElasticGpuAssociation",HX="ElasticGpuAssociationId",FX="ElasticGpuAssociationList",VX="ElasticGpuAssociationState",qX="ElasticGpuAssociationTime",GX="ElasticGpuAssociations",KX="ElasticGpuId",GD="ElasticGpuSpecification",ZX="ElasticGpuSpecifications",KD="ElasticInferenceAccelerator",QX="ElasticInferenceAcceleratorAssociation",YX="ElasticInferenceAcceleratorAssociationId",XX="ElasticInferenceAcceleratorAssociationList",WX="ElasticInferenceAcceleratorAssociationState",JX="ElasticInferenceAcceleratorAssociationTime",eW="ElasticInferenceAcceleratorArn",tW="ElasticInferenceAcceleratorAssociations",ZD="ElasticInferenceAccelerators",nW="EbsInstanceBlockDevice",sW="EncryptionInTransitSupported",QD="EbsInfo",YD="EfaInfo",XD="EbsOptimized",WD="EbsOptimizedInfo",rW="EnclaveOptionsRequest",oW="EbsOptimizedSupport",Xb="EnclaveOptions",iW="EnablePrimaryIpv6",JD="EnaQueueCount",ek="EnableResourceNameDnsAAAARecord",tk="EnableResourceNameDnsARecord",nk="EnaSrdEnabled",sk="EnaSrdSpecification",aW="EnaSrdSpecificationRequest",cW="EnaSrdSupported",rk="EnaSrdUdpEnabled",ok="EnaSrdUdpSpecification",lW="EnaSrdUdpSpecificationRequest",uW="EfaSupported",ik="EncryptionSupport",Wb="EnaSupport",fW="EndTime",dW="ExecutableUsers",ak="Ebs",Jb="Enabled",eS="Encrypted",hW="Endpoint",ck="Force",pW="FpgaDeviceInfo",mW="FpgaDeviceInfoList",gW="FpgaDeviceMemoryInfo",yW="FlexibleEnaQueuesSupport",lk="FpgaInfo",vW="FilterList",bW="FastRestored",uk="FreeTierEligible",ml="Filters",$i="Filter",SW="Fpgas",tS="Groups",_W="GpuDeviceInfo",wW="GpuDeviceInfoList",EW="GpuDeviceMemoryInfo",xW="GroupIdentifierList",fk="GpuInfo",dk="GroupId",RW="GroupIdentifier",hk="GroupName",CW="GpuPartitionSize",TW="Gpus",pk="HttpEndpoint",AW="HostId",nS="HibernationOptions",IW="HibernationOptionsRequest",mk="HttpProtocolIpv6",gk="HttpPutResponseHopLimit",OW="HostResourceGroupArn",MW="HibernationSupported",yk="HttpTokens",vk="HostnameType",DW="Hibernate",sS="Hypervisor",kW="Id",rS="Ipv6Addresses",bk="Ipv6AddressCount",PW="InstanceAttachmentEnaSrdSpecification",NW="InstanceAttachmentEnaSrdUdpSpecification",Sk="InferenceAcceleratorInfo",zW="Ipv4AddressesPerInterface",LW="Ipv6AddressesPerInterface",BW="ImageAllowed",oS="Ipv6Address",$W="InstanceBlockDeviceMapping",UW="InstanceBlockDeviceMappingList",jW="IncludeDeprecated",HW="InferenceDeviceInfo",FW="InferenceDeviceInfoList",VW="InferenceDeviceMemoryInfo",qW="IncludeDisabled",Ro="InstanceId",GW="InstanceIpv6Address",KW="InstanceIpv6AddressList",ZW="InstanceInterruptionBehavior",iS="IamInstanceProfile",QW="InstanceIpv4PrefixList",YW="InstanceIpv6PrefixList",XW="IamInstanceProfileSpecification",WW="InstanceIpv4Prefix",JW="InstanceIpv6Prefix",eJ="InstanceInitiatedShutdownBehavior",tJ="ImageIdStringList",nJ="InstanceIdStringList",Af="ImageId",sJ="ImageIds",If="InstanceIds",rJ="ImportKeyPair",oJ="ImportKeyPairRequest",iJ="ImportKeyPairResult",aJ="ImageLocation",cJ="ImageList",lJ="InstanceLifecycle",uJ="InstanceList",fJ="InstanceMaintenanceOptions",dJ="InstanceMaintenanceOptionsRequest",hJ="InstanceMarketOptionsRequest",pJ="InstanceMetadataOptionsRequest",mJ="InstanceMetadataOptionsResponse",gJ="InstanceMarketOptions",_k="InstanceMetadataTags",yJ="InstanceNetworkInterface",vJ="InstanceNetworkInterfaceAssociation",bJ="InstanceNetworkInterfaceAttachment",SJ="InstanceNetworkInterfaceList",_J="InstanceNetworkInterfaceSpecification",wJ="InstanceNetworkInterfaceSpecificationList",EJ="InstanceNetworkPerformanceOptions",xJ="InstanceNetworkPerformanceOptionsRequest",RJ="ImageOwnerAlias",CJ="IpOwnerId",TJ="InstanceOwningService",AJ="Ipv6PrefixCount",IJ="Ipv4PrefixCount",OJ="InstancePrivateIpAddress",MJ="InstancePrivateIpAddressList",DJ="IsPrimaryIpv6",kJ="IncludePublicKey",PJ="Ipv4PrefixList",NJ="Ipv6PrefixList",zJ="Ipv4PrefixSpecificationRequest",LJ="Ipv6PrefixSpecificationRequest",wk="Ipv6Prefixes",aS="Ipv6Prefix",Ek="Ipv4Prefixes",cS="Ipv4Prefix",BJ="InstanceStateChange",$J="InstanceStateChangeList",xk="InstanceStorageInfo",UJ="InstanceStorageSupported",jJ="ImdsSupport",HJ="InstanceState",FJ="Ipv6Supported",om="InstanceType",VJ="InstanceTypeInfoList",qJ="InstanceTypeInfo",GJ="ImageType",Rk="InstanceTypes",Ck="InterfaceType",KJ="Images",ZJ="Image",QJ="Instance",YJ="Instances",im="Iops",XJ="Key",WJ="KeyFormat",lS="KeyFingerprint",uS="KernelId",fS="KmsKeyId",JJ="KeyMaterial",$r="KeyName",eee="KeyNameStringList",tee="KeyNames",nee="KeyPairs",ja="KeyPairId",see="KeyPairIdStringList",ree="KeyPairIds",oee="KeyPairInfo",iee="KeyPairList",aee="KeyPair",Tk="KeyType",Ak="LicenseConfigurationArn",cee="LicenseConfigurationRequest",lee="LicenseConfiguration",uee="LogicalGpuCount",fee="LicenseList",dee="LastLaunchedTime",hee="LicenseSpecifications",pee="LicenseSpecificationListRequest",mee="LicenseSpecification",gee="LaunchTemplate",yee="LaunchTemplateId",vee="LaunchTemplateName",bee="LaunchTemplateSpecification",See="LaunchTime",_ee="Licenses",dS="MultiAttachEnabled",Ik="MediaAcceleratorInfo",wee="MacAddress",Ok="MaximumBandwidthInMbps",Eee="MaxCount",xee="MinCount",Ree="MediaDeviceInfo",Cee="MediaDeviceInfoList",Tee="MediaDeviceMemoryInfo",Aee="MaximumEbsAttachments",Iee="MaximumEbsCards",Oee="MaximumEfaInterfaces",Mee="MaximumEnaQueueCount",Dee="MaximumEnaQueueCountPerInterface",Mk="MaximumIops",Ha="MemoryInfo",kee="MaximumNetworkCards",Dk="MaximumNetworkInterfaces",kk="MetadataOptions",Pk="MaintenanceOptions",Pee="MaxPrice",am="MaxResults",Nee="ModificationState",zee="MarketType",Nk="MaximumThroughputInMBps",Lee="ModifyVolumeRequest",Bee="ModifyVolumeResult",$ee="ModifyVolume",Of="Manufacturer",Uee="Managed",jee="Message",hS="Monitoring",Co="Name",Hee="NetworkCards",pS="NetworkCardIndex",Fee="NetworkCardInfoList",Vee="NetworkCardInfo",qee="NoDevice",Gee="NeuronDeviceCoreInfo",Kee="NeuronDeviceInfo",Zee="NeuronDeviceInfoList",Qee="NeuronDeviceMemoryInfo",Yee="NeuronDevices",Xee="NitroEnclavesSupport",zk="NetworkInterfaceId",Lk="NetworkInterfaces",Bk="NetworkInfo",$k="NeuronInfo",Uk="NetworkPerformanceOptions",jk="NetworkPerformance",Hk="NvmeSupport",Fk="NitroTpmInfo",Wee="NitroTpmSupport",Jee="NitroTpmSupportedVersionsList",Ui="NextToken",cm="OutpostArn",mS="OwnerId",ete="OptInStatus",tte="OriginalIops",nte="OriginalMultiAttachEnabled",ste="OperatorRequest",rte="OperatorResponse",ote="OwnerStringList",ite="OriginalSize",ate="OriginalThroughput",cte="OriginalVolumeType",gl="Operator",lte="Owners",Vk="Owner",qk="Principal",ute="PeakBandwidthInGbps",fte="ProductCodeId",dte="ProductCodeList",hte="ProductCodeType",pte="ProductCode",Gk="ProductCodes",gS="PrivateDnsName",Kk="PrivateDnsNameOptions",mte="PrivateDnsNameOptionsRequest",gte="PrivateDnsNameOptionsResponse",Zk="PublicDnsName",Qk="PlatformDetails",Yk="PlacementGroupInfo",yte="PlacementGroupStrategyList",vte="PublicIp",bte="PrivateIpAddressSpecification",Ste="PrivateIpAddressSpecificationList",yl="PrivateIpAddress",Xk="PrivateIpAddresses",_te="PublicIpAddress",wte="PrimaryIpv6",Wk="ProcessorInfo",Ete="PublicKey",xte="PublicKeyMaterial",Rte="PartitionNumber",Cte="PhcSupport",Tte="PreviousState",Jk="Platform",yS="Placement",e3="Primary",Ate="Progress",Ite="Public",Ote="Return",t3="RootDeviceName",n3="RootDeviceType",Mte="RootDeviceTypeList",Dte="RunInstancesMonitoringEnabled",kte="RebootInstancesRequest",Pte="RunInstancesRequest",Nte="RunInstancesUserData",vS="RamdiskId",zte="ReservationId",Lte="RebootInstances",Bte="RequesterId",$te="RunInstances",Ute="RegionList",jte="ReservationList",Hte="RebootMigrationSupport",Fte="RebootMigration",bS="RegionName",Vte="RegionNameStringList",qte="RegionNames",Gte="ResourceType",Kte="Regions",Zte="Region",Qte="Reservations",Yte="Reservation",Xte="SupportedAdditionalProcessorFeatureList",Wte="SupportedArchitectures",Jte="SupportedBootModes",ene="SustainedClockSpeedInGhz",s3="SourceDestCheck",tne="SpreadDomain",nne="SupportedFeatures",r3="SecurityGroups",SS="SecurityGroupId",sne="SecurityGroupIdStringList",rne="SecurityGroupIds",one="SecurityGroupStringList",o3="SecurityGroup",ine="SizeInGB",ane="SourceImageId",cne="SourceInstanceId",vl="SizeInMiB",lne="SpotInstanceRequestId",une="SourceImageRegion",fne="StartInstancesRequest",dne="StartInstancesResult",hne="StopInstancesRequest",pne="StopInstancesResult",mne="SpotInstanceType",_S="SnapshotId",gne="StartingInstances",yne="StartInstances",vne="StoppingInstances",bne="StopInstances",lm="SubnetId",Sne="SpotMarketOptions",_ne="StatusMessage",i3="SriovNetSupport",wne="SpotOptions",a3="SkipOsShutdown",Ene="SecondaryPrivateIpAddressCount",xne="SupportedRootDeviceTypes",wS="StateReason",Rne="SupportedStrategies",Cne="StartTime",Tne="StateTransitionReason",Ane="SseType",Ine="SupportedUsageClasses",One="SensitiveUserData",Mne="SourceVolumeId",Dne="SupportedVirtualizationTypes",kne="SupportedVersions",ES="Size",bl="State",xS="Status",Fa="Tags",c3="TcpEstablishedTimeout",Pne="TotalFpgaMemoryInMiB",Nne="TotalGpuMemoryInMiB",zne="TerminateInstances",Lne="TotalInferenceMemoryInMiB",Bne="TerminateInstancesRequest",$ne="TerminateInstancesResult",Une="TargetIops",jne="TerminatingInstances",Hne="TagList",Fne="TargetMultiAttachEnabled",Vne="TotalMediaMemoryInMiB",qne="TotalNeuronDeviceMemoryInMiB",l3="ThreadsPerCore",Gne="ThreadsPerCoreList",um="TagSpecifications",Kne="TotalSizeInGB",Zne="TagSpecificationList",Mf="TagSpecification",Qne="TargetSize",u3="TpmSupport",Yne="TargetThroughput",Xne="TargetVolumeType",f3="Tag",Wne="Tenancy",fm="Throughput",RS="Type",Jne="UsageClassTypeList",ese="UserData",d3="UsageOperation",tse="UsageOperationUpdateTime",h3="UdpStreamTimeout",p3="UdpTimeout",m3="Value",nse="VolumeAttachmentList",sse="VolumeAttachment",g3="VCpuInfo",rse="ValidCores",y3="VpcId",CS="VolumeInitializationRate",ose="VolumeIdStringList",Va="VolumeId",ise="VolumeIds",ase="VolumeList",v3="VolumeModification",cse="VirtualName",lse="VolumeOwnerId",use="ValueStringList",fse="VolumeSize",dm="VolumeType",dse="VirtualizationTypeList",hse="ValidThreadsPerCore",b3="VirtualizationType",pse="ValidUntil",mse="Values",S3="Version",gse="Volumes",yse="Volume",vse="WorkloadsList",bse="Workloads",_3="additionalInfo",Sse="attachmentId",_se="amiLaunchIndex",wse="attachmentLimitType",Ese="associatePublicIpAddress",xse="autoRecoverySupported",w3="associatedResource",Rse="autoRecovery",Cse="amdSevSnp",Tse="attachmentSet",TS="attachTime",AS="availabilityZone",E3="availabilityZoneId",x3="accelerators",Ase="affinity",R3="arn",C3="architecture",T3="association",Ise="attachment",Ose="baselineBandwidthInGbps",A3="baselineBandwidthInMbps",I3="blockDeviceMapping",O3="baselineIops",M3="bootMode",Mse="bareMetal",Dse="burstablePerformanceSupported",D3="baselineThroughputInMBps",kse="bandwidthWeighting",Pse="bandwidthWeightings",Nse="capacityBlockId",zse="coreCount",Lse="creationDate",Bse="currentGeneration",$se="carrierIp",Use="currentInstanceBootMode",jse="coreInfo",Hse="cpuOptions",Fse="customerOwnedIp",k3="capacityReservationId",Vse="capacityReservationPreference",qse="capacityReservationResourceGroupArn",Gse="capacityReservationSpecification",Kse="capacityReservationTarget",Zse="currentState",P3="clientToken",Qse="connectionTrackingConfiguration",N3="createTime",z3="code",Yse="configured",qa="count",Xse="disableApiTermination",Wse="defaultCores",Jse="defaultEnaQueueCountPerInterface",ere="dedicatedHostsSupported",L3="deviceIndex",B3="deviceName",tre="defaultNetworkCardIndex",nre="dnsName",Df="deleteOnTermination",sre="deregistrationProtection",vs="dryRun",rre="defaultThreadsPerCore",ore="deprecationTime",ire="defaultVCpus",IS="description",are="device",cre="disks",OS="ebsCardIndex",lre="ebsCardSet",ure="elasticGpuAssociationId",fre="elasticGpuAssociationState",dre="elasticGpuAssociationSet",hre="elasticGpuAssociationTime",pre="elasticGpuId",mre="elasticInferenceAcceleratorArn",gre="elasticInferenceAcceleratorAssociationId",yre="elasticInferenceAcceleratorAssociationState",vre="elasticInferenceAcceleratorAssociationSet",bre="elasticInferenceAcceleratorAssociationTime",Sre="encryptionInTransitSupported",_re="ebsInfo",wre="efaInfo",$3="ebsOptimized",Ere="ebsOptimizedInfo",xre="ebsOptimizedSupport",Rre="enclaveOptions",Cre="enaQueueCount",E="ec2QueryName",Tre="enableResourceNameDnsAAAARecord",Are="enableResourceNameDnsARecord",Ire="enaSrdEnabled",Ore="enaSrdSpecification",Mre="enaSrdSupported",Dre="enaSrdUdpEnabled",kre="enaSrdUdpSpecification",Pre="efaSupported",U3="encryptionSupport",MS="enaSupport",Nre="endTime",j3="ebs",H3="enabled",DS="encrypted",zre="flexibleEnaQueuesSupport",Lre="fpgaInfo",Bre="fastRestored",F3="freeTierEligible",$re="force",Ure="fpgas",jre="gpuInfo",V3="groupId",q3="groupName",Hre="gpuPartitionSize",kS="groupSet",Fre="gpus",PS="hypervisor",Vre="httpEndpoint",qre="hostId",Gre="hibernationOptions",Kre="httpProtocolIpv6",Zre="httpPutResponseHopLimit",Qre="hostResourceGroupArn",Yre="hibernationSupported",Xre="httpTokens",Wre="hostnameType",Jre="id",eoe="ipv6AddressCount",toe="inferenceAcceleratorInfo",noe="ipv4AddressesPerInterface",soe="ipv6AddressesPerInterface",G3="ipv6AddressesSet",roe="imageAllowed",ooe="ipAddress",K3="ipv6Address",NS="instanceId",Z3="iamInstanceProfile",ioe="instanceInitiatedShutdownBehavior",Q3="imageId",aoe="imageLocation",coe="instanceLifecycle",loe="instanceMetadataTags",uoe="imageOwnerAlias",foe="imageOwnerId",doe="ipOwnerId",hoe="instanceOwningService",poe="isPrimaryIpv6",moe="ipv4PrefixSet",goe="ipv6PrefixSet",yoe="ipv4Prefix",voe="ipv6Prefix",boe="isPublic",Soe="instanceStorageInfo",_oe="instanceStorageSupported",woe="imagesSet",Eoe="imageState",xoe="imdsSupport",hm="instancesSet",Roe="instanceState",Coe="ipv6Supported",Y3="instanceType",Toe="instanceTypeSet",Aoe="idempotencyToken",Ioe="imageType",Ooe="interfaceType",X3="iops",je="item",Moe="key",zS="keyFingerprint",W3="kernelId",J3="kmsKeyId",Doe="keyMaterial",kf="keyName",pm="keyPairId",koe="keySet",Poe="keyType",Noe="licenseConfigurationArn",zoe="logicalGpuCount",Loe="lastLaunchedTime",Boe="licenseSet",$oe="launchTime",Uoe="multiAttachEnabled",joe="mediaAcceleratorInfo",Hoe="macAddress",eP="maximumBandwidthInMbps",Foe="maximumEbsAttachments",Voe="maximumEbsCards",qoe="maximumEfaInterfaces",Goe="maximumEnaQueueCount",Koe="maximumEnaQueueCountPerInterface",tP="maximumIops",Sl="memoryInfo",Zoe="maximumNetworkCards",nP="maximumNetworkInterfaces",Qoe="metadataOptions",Yoe="maintenanceOptions",sP="maxResults",Xoe="modificationState",rP="maximumThroughputInMBps",Pf="manufacturer",Woe="managed",Joe="message",eie="monitoring",ji="name",tie="networkCards",oP="networkCardIndex",nie="noDevice",sie="neuronDevices",rie="nitroEnclavesSupport",iP="networkInterfaceId",oie="networkInterfaceSet",iie="networkInterface",aie="networkInfo",cie="neuronInfo",lie="networkPerformanceOptions",aP="networkPerformance",cP="nvmeSupport",uie="nitroTpmInfo",fie="nitroTpmSupport",_l="nextToken",LS="outpostArn",lP="ownerId",die="optInStatus",hie="originalIops",pie="originalMultiAttachEnabled",mie="originalSize",gie="originalThroughput",yie="originalVolumeType",mm="operator",vie="principal",bie="peakBandwidthInGbps",uP="productCodes",Sie="productCode",_ie="privateDnsNameOptions",BS="privateDnsName",wie="publicDnsName",fP="platformDetails",Eie="placementGroupInfo",xie="publicIp",dP="privateIpAddressesSet",wl="privateIpAddress",Rie="processorInfo",Cie="publicKey",Tie="publicKeyMaterial",Aie="partitionNumber",Iie="phcSupport",Oie="previousState",hP="platform",Mie="placement",pP="primary",Die="progress",kie="return",mP="rootDeviceName",gP="rootDeviceType",Pie="regionEndpoint",Nie="reservationId",yP="ramdiskId",zie="regionInfo",Lie="requesterId",Bie="rebootMigrationSupport",$ie="rebootMigration",Uie="regionName",jie="reservationSet",Hie="resourceType",Fie="reason",Vie="supportedArchitectures",qie="supportedBootModes",Gie="sustainedClockSpeedInGhz",vP="sourceDestCheck",Kie="spreadDomain",Zie="supportedFeatures",Qie="sizeInGB",Yie="sourceInstanceId",Xie="sourceImageId",El="sizeInMiB",Wie="sourceImageRegion",Jie="spotInstanceRequestId",bP="snapshotId",$S="subnetId",eae="statusMessage",SP="sriovNetSupport",tae="secondaryPrivateIpAddressCount",nae="supportedRootDeviceTypes",_P="stateReason",sae="supportedStrategies",rae="startTime",oae="sseType",iae="supportedUsageClasses",aae="sourceVolumeId",cae="supportedVirtualizationTypes",lae="supportedVersions",uae="size",wP="smithy.ts.sdk.synthetic.com.amazonaws.ec2",EP="state",Nf="status",fae="tenancy",dae="tcpEstablishedTimeout",hae="totalFpgaMemoryInMiB",pae="totalGpuMemoryInMiB",mae="totalInferenceMemoryInMiB",gae="targetIops",yae="targetMultiAttachEnabled",vae="totalMediaMemoryInMiB",bae="totalNeuronDeviceMemoryInMiB",Sae="threadsPerCore",xl="tagSet",_ae="totalSizeInGB",wae="targetSize",xP="tpmSupport",Eae="targetThroughput",xae="targetVolumeType",RP="throughput",CP="type",TP="usageOperation",Rae="usageOperationUpdateTime",Cae="udpStreamTimeout",Tae="udpTimeout",Aae="value",Iae="vCpuInfo",Oae="validCores",AP="vpcId",Mae="volumeInitializationRate",gm="volumeId",Dae="volumeModification",kae="virtualName",Pae="volumeOwnerId",Nae="volumeSet",zae="volumeSize",IP="volumeType",Lae="validThreadsPerCore",OP="virtualizationType",Bae="version",$ae="workloadSet",S="xmlName",F="com.amazonaws.ec2";var Uae=[0,F,Nte,8,0],jae=[0,F,One,8,0],MP=[3,F,Fb,0,[ak,qee,VD,cse],[[()=>pce,{[E]:"Ebs",[S]:j3}],[0,{[E]:"NoDevice",[S]:nie}],[0,{[E]:"DeviceName",[S]:B3}],[0,{[E]:"VirtualName",[S]:kae}]]],Hae=[3,F,Kb,0,[BD,Zb],[0,()=>Vae]],Fae=[3,F,VY,0,[BD,Zb],[[0,{[E]:"CapacityReservationPreference",[S]:Vse}],[()=>qae,{[E]:"CapacityReservationTarget",[S]:Kse}]]],Vae=[3,F,Zb,0,[Gb,$D],[0,0]],qae=[3,F,qY,0,[Gb,$D],[[0,{[E]:"CapacityReservationId",[S]:k3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:qse}]]],Gae=[3,F,XY,0,[c3,h3,p3],[1,1,1]],Kae=[3,F,WY,0,[c3,h3,p3],[[1,{[E]:"TcpEstablishedTimeout",[S]:dae}],[1,{[E]:"UdpStreamTimeout",[S]:Cae}],[1,{[E]:"UdpTimeout",[S]:Tae}]]],Zae=[3,F,qb,0,[LD,l3,TD],[[1,{[E]:"CoreCount",[S]:zse}],[1,{[E]:"ThreadsPerCore",[S]:Sae}],[0,{[E]:"AmdSevSnp",[S]:Cse}]]],Qae=[3,F,FY,0,[LD,l3,TD],[1,1,0]],Yae=[3,F,jY,0,[$r,Tk,um,WJ,Jn],[0,0,[()=>vm,{[S]:Mf}],0,[2,{[E]:"DryRun",[S]:vs}]],1],Xae=[3,F,JY,0,[nm,sm,eS,im,fS,cm,ES,_S,dm,um,dS,fm,Qb,CS,gl,Jn],[0,0,[2,{[E]:"Encrypted",[S]:DS}],1,0,0,1,0,0,[()=>vm,{[S]:Mf}],2,1,[0,4],1,()=>kP,[2,{[E]:"DryRun",[S]:vs}]]],Wae=[3,F,GY,0,[PY],[0],1],Jae=[3,F,vX,0,[$r,ja,Jn],[0,0,[2,{[E]:"DryRun",[S]:vs}]]],ece=[3,F,bX,0,[Ote,ja],[[2,{[E]:"Return",[S]:kie}],[0,{[E]:"KeyPairId",[S]:pm}]]],tce=[3,F,aX,0,[dW,sJ,lte,jW,qW,am,Ui,Jn,ml],[[()=>gue,{[S]:qD}],[()=>bue,{[S]:Af}],[()=>jue,{[S]:Vk}],2,2,1,0,[2,{[E]:"DryRun",[S]:vs}],[()=>Rl,{[S]:$i}]]],nce=[3,F,cX,0,[Ui,KJ],[[0,{[E]:"NextToken",[S]:_l}],[()=>Sue,{[E]:"ImagesSet",[S]:woe}]]],sce=[3,F,lX,0,[If,Jn,ml,Ui,am],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:vs}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:sP}]]],rce=[3,F,uX,0,[Ui,Qte],[[0,{[E]:"NextToken",[S]:_l}],[()=>Gue,{[E]:"ReservationSet",[S]:jie}]]],oce=[3,F,fX,0,[Jn,Rk,ml,am,Ui],[2,[64,{[S]:om}],[()=>Rl,{[S]:$i}],1,0]],ice=[3,F,dX,0,[Rk,Ui],[[()=>Iue,{[E]:"InstanceTypeSet",[S]:Toe}],[0,{[E]:"NextToken",[S]:_l}]]],ace=[3,F,SX,0,[tee,ree,kJ,Jn,ml],[[()=>Due,{[S]:$r}],[()=>kue,{[S]:ja}],2,[2,{[E]:"DryRun",[S]:vs}],[()=>Rl,{[S]:$i}]]],cce=[3,F,_X,0,[nee],[[()=>Pue,{[E]:"KeySet",[S]:koe}]]],lce=[3,F,RX,0,[qte,vY,Jn,ml],[[()=>que,{[S]:bS}],2,[2,{[E]:"DryRun",[S]:vs}],[()=>Rl,{[S]:$i}]]],uce=[3,F,CX,0,[Kte],[[()=>Vue,{[E]:"RegionInfo",[S]:zie}]]],fce=[3,F,MX,0,[ise,Jn,ml,Ui,am],[[()=>tfe,{[S]:Va}],[2,{[E]:"DryRun",[S]:vs}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:sP}]]],dce=[3,F,DX,0,[Ui,gse],[[0,{[E]:"NextToken",[S]:_l}],[()=>nfe,{[E]:"VolumeSet",[S]:Nae}]]],hce=[3,F,gX,0,[ine,Bi,RS],[[1,{[E]:"SizeInGB",[S]:Qie}],[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Type",[S]:CP}]]],pce=[3,F,zX,0,[Tf,im,_S,fse,dm,fS,fm,cm,nm,eS,CS,sm,rm],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"Iops",[S]:X3}],[0,{[E]:"SnapshotId",[S]:bP}],[1,{[E]:"VolumeSize",[S]:zae}],[0,{[E]:"VolumeType",[S]:IP}],[0,{[E]:"KmsKeyId",[S]:J3}],[1,{[E]:"Throughput",[S]:RP}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"AvailabilityZone",[S]:AS}],[2,{[E]:"Encrypted",[S]:DS}],1,0,1]],mce=[3,F,$X,0,[rm,DD,ND,kD,Ok,Nk,Mk],[[1,{[E]:"EbsCardIndex",[S]:OS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:A3}],[1,{[E]:"BaselineThroughputInMBps",[S]:D3}],[1,{[E]:"BaselineIops",[S]:O3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:eP}],[1,{[E]:"MaximumThroughputInMBps",[S]:rP}],[1,{[E]:"MaximumIops",[S]:tP}]]],gce=[3,F,QD,0,[oW,ik,WD,Hk,Aee,mY,Iee,UX],[[0,{[E]:"EbsOptimizedSupport",[S]:xre}],[0,{[E]:"EncryptionSupport",[S]:U3}],[()=>vce,{[E]:"EbsOptimizedInfo",[S]:Ere}],[0,{[E]:"NvmeSupport",[S]:cP}],[1,{[E]:"MaximumEbsAttachments",[S]:Foe}],[0,{[E]:"AttachmentLimitType",[S]:wse}],[1,{[E]:"MaximumEbsCards",[S]:Voe}],[()=>fue,{[E]:"EbsCardSet",[S]:lre}]]],yce=[3,F,nW,0,[Hb,Tf,xS,Va,RD,lse,gl,rm],[[4,{[E]:"AttachTime",[S]:TS}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"AssociatedResource",[S]:w3}],[0,{[E]:"VolumeOwnerId",[S]:Pae}],[()=>ym,{[E]:"Operator",[S]:mm}],[1,{[E]:"EbsCardIndex",[S]:OS}]]],vce=[3,F,WD,0,[DD,ND,kD,Ok,Nk,Mk],[[1,{[E]:"BaselineBandwidthInMbps",[S]:A3}],[1,{[E]:"BaselineThroughputInMBps",[S]:D3}],[1,{[E]:"BaselineIops",[S]:O3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:eP}],[1,{[E]:"MaximumThroughputInMBps",[S]:rP}],[1,{[E]:"MaximumIops",[S]:tP}]]],bce=[3,F,YD,0,[Oee],[[1,{[E]:"MaximumEfaInterfaces",[S]:qoe}]]],Sce=[3,F,jX,0,[KX,HX,VX,qX],[[0,{[E]:"ElasticGpuId",[S]:pre}],[0,{[E]:"ElasticGpuAssociationId",[S]:ure}],[0,{[E]:"ElasticGpuAssociationState",[S]:fre}],[0,{[E]:"ElasticGpuAssociationTime",[S]:hre}]]],_ce=[3,F,GD,0,[RS],[0],1],wce=[3,F,KD,0,[RS,Bi],[0,1],1],Ece=[3,F,QX,0,[eW,YX,WX,JX],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:mre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:gre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:yre}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:bre}]]],xce=[3,F,aW,0,[nk,ok],[2,()=>Rce]],Rce=[3,F,lW,0,[rk],[2]],Cce=[3,F,Xb,0,[Jb],[[2,{[E]:"Enabled",[S]:H3}]]],Tce=[3,F,rW,0,[Jb],[2]],Ace=[3,F,$i,0,[Co,mse],[0,[()=>Wue,{[S]:m3}]]],Ice=[3,F,pW,0,[Co,Of,Bi,Ha],[[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[()=>Oce,{[E]:"MemoryInfo",[S]:Sl}]]],Oce=[3,F,gW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Mce=[3,F,lk,0,[SW,Pne],[[()=>yue,{[E]:"Fpgas",[S]:Ure}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:hae}]]],Dce=[3,F,_W,0,[Co,Of,Bi,uee,CW,bse,Ha],[[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[1,{[E]:"LogicalGpuCount",[S]:zoe}],[1,{[E]:"GpuPartitionSize",[S]:Hre}],[()=>sfe,{[E]:"WorkloadSet",[S]:$ae}],[()=>kce,{[E]:"MemoryInfo",[S]:Sl}]]],kce=[3,F,EW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Pce=[3,F,fk,0,[TW,Nne],[[()=>vue,{[E]:"Gpus",[S]:Fre}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:pae}]]],Nce=[3,F,RW,0,[dk,hk],[[0,{[E]:"GroupId",[S]:V3}],[0,{[E]:"GroupName",[S]:q3}]]],zce=[3,F,nS,0,[HD],[[2,{[E]:"Configured",[S]:Yse}]]],Lce=[3,F,IW,0,[HD],[2]],Bce=[3,F,iS,0,[ID,kW],[[0,{[E]:"Arn",[S]:R3}],[0,{[E]:"Id",[S]:Jre}]]],$ce=[3,F,XW,0,[ID,Co],[[0,{[E]:"Arn",[S]:R3}],[0,{[E]:"Name",[S]:ji}]]],Uce=[3,F,ZJ,0,[Qk,d3,Vb,Yb,Wb,sS,RJ,Co,t3,n3,i3,wS,Fa,b3,PD,u3,IX,jJ,cne,xX,dee,BW,ane,une,uk,Af,aJ,bl,mS,NY,Ite,Gk,OD,GJ,uS,vS,Jk],[[0,{[E]:"PlatformDetails",[S]:fP}],[0,{[E]:"UsageOperation",[S]:TP}],[()=>iue,{[E]:"BlockDeviceMapping",[S]:I3}],[0,{[E]:"Description",[S]:IS}],[2,{[E]:"EnaSupport",[S]:MS}],[0,{[E]:"Hypervisor",[S]:PS}],[0,{[E]:"ImageOwnerAlias",[S]:uoe}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"RootDeviceName",[S]:mP}],[0,{[E]:"RootDeviceType",[S]:gP}],[0,{[E]:"SriovNetSupport",[S]:SP}],[()=>zP,{[E]:"StateReason",[S]:_P}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:OP}],[0,{[E]:"BootMode",[S]:M3}],[0,{[E]:"TpmSupport",[S]:xP}],[0,{[E]:"DeprecationTime",[S]:ore}],[0,{[E]:"ImdsSupport",[S]:xoe}],[0,{[E]:"SourceInstanceId",[S]:Yie}],[0,{[E]:"DeregistrationProtection",[S]:sre}],[0,{[E]:"LastLaunchedTime",[S]:Loe}],[2,{[E]:"ImageAllowed",[S]:roe}],[0,{[E]:"SourceImageId",[S]:Xie}],[0,{[E]:"SourceImageRegion",[S]:Wie}],[2,{[E]:"FreeTierEligible",[S]:F3}],[0,{[E]:"ImageId",[S]:Q3}],[0,{[E]:"ImageLocation",[S]:aoe}],[0,{[E]:"ImageState",[S]:Eoe}],[0,{[E]:"ImageOwnerId",[S]:foe}],[0,{[E]:"CreationDate",[S]:Lse}],[2,{[E]:"IsPublic",[S]:boe}],[()=>BP,{[E]:"ProductCodes",[S]:uP}],[0,{[E]:"Architecture",[S]:C3}],[0,{[E]:"ImageType",[S]:Ioe}],[0,{[E]:"KernelId",[S]:W3}],[0,{[E]:"RamdiskId",[S]:yP}],[0,{[E]:"Platform",[S]:hP}]]],jce=[3,F,oJ,0,[$r,xte,um,Jn],[[0,{[E]:"KeyName",[S]:kf}],[21,{[E]:"PublicKeyMaterial",[S]:Tie}],[()=>vm,{[S]:Mf}],[2,{[E]:"DryRun",[S]:vs}]],2],Hce=[3,F,iJ,0,[lS,$r,ja,Fa],[[0,{[E]:"KeyFingerprint",[S]:zS}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyPairId",[S]:pm}],[()=>Ga,{[E]:"TagSet",[S]:xl}]]],Fce=[3,F,Sk,0,[AD,Lne],[[()=>_ue,{[E]:"Accelerators",[S]:x3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:mae}]]],Vce=[3,F,HW,0,[Bi,Co,Of,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>qce,{[E]:"MemoryInfo",[S]:Sl}]]],qce=[3,F,VW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Gce=[3,F,QJ,0,[OD,Vb,Qb,XD,Wb,sS,iS,lJ,GX,tW,Lk,cm,t3,n3,r3,s3,lne,i3,wS,Fa,b3,qb,DY,Gb,Kb,nS,_ee,kk,Xb,PD,Qk,d3,tse,Kk,oS,u3,Pk,BY,Uk,gl,Ro,Af,bl,gS,Zk,Tne,$r,pY,Gk,om,See,yS,uS,vS,Jk,hS,lm,y3,yl,_te],[[0,{[E]:"Architecture",[S]:C3}],[()=>wue,{[E]:"BlockDeviceMapping",[S]:I3}],[0,{[E]:"ClientToken",[S]:P3}],[2,{[E]:"EbsOptimized",[S]:$3}],[2,{[E]:"EnaSupport",[S]:MS}],[0,{[E]:"Hypervisor",[S]:PS}],[()=>Bce,{[E]:"IamInstanceProfile",[S]:Z3}],[0,{[E]:"InstanceLifecycle",[S]:coe}],[()=>due,{[E]:"ElasticGpuAssociationSet",[S]:dre}],[()=>pue,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:vre}],[()=>Cue,{[E]:"NetworkInterfaceSet",[S]:oie}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"RootDeviceName",[S]:mP}],[0,{[E]:"RootDeviceType",[S]:gP}],[()=>US,{[E]:"GroupSet",[S]:kS}],[2,{[E]:"SourceDestCheck",[S]:vP}],[0,{[E]:"SpotInstanceRequestId",[S]:Jie}],[0,{[E]:"SriovNetSupport",[S]:SP}],[()=>zP,{[E]:"StateReason",[S]:_P}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:OP}],[()=>Zae,{[E]:"CpuOptions",[S]:Hse}],[0,{[E]:"CapacityBlockId",[S]:Nse}],[0,{[E]:"CapacityReservationId",[S]:k3}],[()=>Fae,{[E]:"CapacityReservationSpecification",[S]:Gse}],[()=>zce,{[E]:"HibernationOptions",[S]:Gre}],[()=>Nue,{[E]:"LicenseSet",[S]:Boe}],[()=>sle,{[E]:"MetadataOptions",[S]:Qoe}],[()=>Cce,{[E]:"EnclaveOptions",[S]:Rre}],[0,{[E]:"BootMode",[S]:M3}],[0,{[E]:"PlatformDetails",[S]:fP}],[0,{[E]:"UsageOperation",[S]:TP}],[4,{[E]:"UsageOperationUpdateTime",[S]:Rae}],[()=>zle,{[E]:"PrivateDnsNameOptions",[S]:_ie}],[0,{[E]:"Ipv6Address",[S]:K3}],[0,{[E]:"TpmSupport",[S]:xP}],[()=>Jce,{[E]:"MaintenanceOptions",[S]:Yoe}],[0,{[E]:"CurrentInstanceBootMode",[S]:Use}],[()=>ale,{[E]:"NetworkPerformanceOptions",[S]:lie}],[()=>ym,{[E]:"Operator",[S]:mm}],[0,{[E]:"InstanceId",[S]:NS}],[0,{[E]:"ImageId",[S]:Q3}],[()=>Bv,{[E]:"InstanceState",[S]:Roe}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"DnsName",[S]:nre}],[0,{[E]:"Reason",[S]:Fie}],[0,{[E]:"KeyName",[S]:kf}],[1,{[E]:"AmiLaunchIndex",[S]:_se}],[()=>BP,{[E]:"ProductCodes",[S]:uP}],[0,{[E]:"InstanceType",[S]:Y3}],[4,{[E]:"LaunchTime",[S]:$oe}],[()=>PP,{[E]:"Placement",[S]:Mie}],[0,{[E]:"KernelId",[S]:W3}],[0,{[E]:"RamdiskId",[S]:yP}],[0,{[E]:"Platform",[S]:hP}],[()=>Cle,{[E]:"Monitoring",[S]:eie}],[0,{[E]:"SubnetId",[S]:$S}],[0,{[E]:"VpcId",[S]:AP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"IpAddress",[S]:ooe}]]],Kce=[3,F,PW,0,[nk,ok],[[2,{[E]:"EnaSrdEnabled",[S]:Ire}],[()=>Zce,{[E]:"EnaSrdUdpSpecification",[S]:kre}]]],Zce=[3,F,NW,0,[rk],[[2,{[E]:"EnaSrdUdpEnabled",[S]:Dre}]]],Qce=[3,F,$W,0,[VD,ak],[[0,{[E]:"DeviceName",[S]:B3}],[()=>yce,{[E]:"Ebs",[S]:j3}]]],Yce=[3,F,WW,0,[cS],[[0,{[E]:"Ipv4Prefix",[S]:yoe}]]],Xce=[3,F,GW,0,[oS,DJ],[[0,{[E]:"Ipv6Address",[S]:K3}],[2,{[E]:"IsPrimaryIpv6",[S]:poe}]]],Wce=[3,F,JW,0,[aS],[[0,{[E]:"Ipv6Prefix",[S]:voe}]]],Jce=[3,F,fJ,0,[CD,Fte],[[0,{[E]:"AutoRecovery",[S]:Rse}],[0,{[E]:"RebootMigration",[S]:$ie}]]],ele=[3,F,dJ,0,[CD],[0]],tle=[3,F,hJ,0,[zee,wne],[0,()=>Vle]],nle=[3,F,pJ,0,[yk,gk,pk,mk,_k],[0,1,0,0,0]],sle=[3,F,mJ,0,[bl,yk,gk,pk,mk,_k],[[0,{[E]:"State",[S]:EP}],[0,{[E]:"HttpTokens",[S]:Xre}],[1,{[E]:"HttpPutResponseHopLimit",[S]:Zre}],[0,{[E]:"HttpEndpoint",[S]:Vre}],[0,{[E]:"HttpProtocolIpv6",[S]:Kre}],[0,{[E]:"InstanceMetadataTags",[S]:loe}]]],rle=[3,F,yJ,0,[MD,_Y,Yb,tS,rS,wee,zk,mS,gS,yl,Xk,s3,xS,lm,y3,Ck,Ek,wk,QY,gl],[[()=>DP,{[E]:"Association",[S]:T3}],[()=>ole,{[E]:"Attachment",[S]:Ise}],[0,{[E]:"Description",[S]:IS}],[()=>US,{[E]:"GroupSet",[S]:kS}],[()=>jS,{[E]:"Ipv6AddressesSet",[S]:G3}],[0,{[E]:"MacAddress",[S]:Hoe}],[0,{[E]:"NetworkInterfaceId",[S]:iP}],[0,{[E]:"OwnerId",[S]:lP}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Aue,{[E]:"PrivateIpAddressesSet",[S]:dP}],[2,{[E]:"SourceDestCheck",[S]:vP}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"SubnetId",[S]:$S}],[0,{[E]:"VpcId",[S]:AP}],[0,{[E]:"InterfaceType",[S]:Ooe}],[()=>Eue,{[E]:"Ipv4PrefixSet",[S]:moe}],[()=>xue,{[E]:"Ipv6PrefixSet",[S]:goe}],[()=>Kae,{[E]:"ConnectionTrackingConfiguration",[S]:Qse}],[()=>ym,{[E]:"Operator",[S]:mm}]]],DP=[3,F,vJ,0,[LY,HY,CJ,Zk,vte],[[0,{[E]:"CarrierIp",[S]:$se}],[0,{[E]:"CustomerOwnedIp",[S]:Fse}],[0,{[E]:"IpOwnerId",[S]:doe}],[0,{[E]:"PublicDnsName",[S]:wie}],[0,{[E]:"PublicIp",[S]:xie}]]],ole=[3,F,bJ,0,[Hb,hY,Tf,FD,xS,pS,sk,JD],[[4,{[E]:"AttachTime",[S]:TS}],[0,{[E]:"AttachmentId",[S]:Sse}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"DeviceIndex",[S]:L3}],[0,{[E]:"Status",[S]:Nf}],[1,{[E]:"NetworkCardIndex",[S]:oP}],[()=>Kce,{[E]:"EnaSrdSpecification",[S]:Ore}],[1,{[E]:"EnaQueueCount",[S]:Cre}]]],ile=[3,F,_J,0,[gY,Tf,Yb,FD,tS,bk,rS,zk,yl,Xk,Ene,lm,dY,Ck,pS,Ek,IJ,wk,AJ,wte,sk,YY,JD],[[2,{[E]:"AssociatePublicIpAddress",[S]:Ese}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Description",[S]:IS}],[1,{[E]:"DeviceIndex",[S]:L3}],[()=>$P,{[S]:SS}],[1,{[E]:"Ipv6AddressCount",[S]:eoe}],[()=>jS,{[E]:"Ipv6Addresses",[S]:G3}],[0,{[E]:"NetworkInterfaceId",[S]:iP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Fue,{[E]:"PrivateIpAddresses",[S]:dP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:tae}],[0,{[E]:"SubnetId",[S]:$S}],2,0,1,[()=>Oue,{[S]:cS}],1,[()=>Mue,{[S]:aS}],1,2,()=>xce,()=>Gae,1]],ale=[3,F,EJ,0,[zD],[[0,{[E]:"BandwidthWeighting",[S]:kse}]]],cle=[3,F,xJ,0,[zD],[0]],lle=[3,F,OJ,0,[MD,e3,gS,yl],[[()=>DP,{[E]:"Association",[S]:T3}],[2,{[E]:"Primary",[S]:pP}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Bv=[3,F,HJ,0,[jD,Co],[[1,{[E]:"Code",[S]:z3}],[0,{[E]:"Name",[S]:ji}]]],ule=[3,F,BJ,0,[Ro,ZY,Tte],[[0,{[E]:"InstanceId",[S]:NS}],[()=>Bv,{[E]:"CurrentState",[S]:Zse}],[()=>Bv,{[E]:"PreviousState",[S]:Oie}]]],fle=[3,F,xk,0,[Kne,NX,Hk,ik],[[1,{[E]:"TotalSizeInGB",[S]:_ae}],[()=>uue,{[E]:"Disks",[S]:cre}],[0,{[E]:"NvmeSupport",[S]:cP}],[0,{[E]:"EncryptionSupport",[S]:U3}]]],dle=[3,F,qJ,0,[om,zY,uk,Ine,xne,Dne,AY,sS,Wk,g3,Ha,UJ,xk,QD,Bk,fk,lk,Yk,Sk,MW,IY,oX,yY,Jte,Xee,Wee,Fk,Ik,$k,Cte,Hte],[[0,{[E]:"InstanceType",[S]:Y3}],[2,{[E]:"CurrentGeneration",[S]:Bse}],[2,{[E]:"FreeTierEligible",[S]:F3}],[()=>Xue,{[E]:"SupportedUsageClasses",[S]:iae}],[()=>Kue,{[E]:"SupportedRootDeviceTypes",[S]:nae}],[()=>Jue,{[E]:"SupportedVirtualizationTypes",[S]:cae}],[2,{[E]:"BareMetal",[S]:Mse}],[0,{[E]:"Hypervisor",[S]:PS}],[()=>Ble,{[E]:"ProcessorInfo",[S]:Rie}],[()=>Jle,{[E]:"VCpuInfo",[S]:Iae}],[()=>Ele,{[E]:"MemoryInfo",[S]:Sl}],[2,{[E]:"InstanceStorageSupported",[S]:_oe}],[()=>fle,{[E]:"InstanceStorageInfo",[S]:Soe}],[()=>gce,{[E]:"EbsInfo",[S]:_re}],[()=>Ale,{[E]:"NetworkInfo",[S]:aie}],[()=>Pce,{[E]:"GpuInfo",[S]:jre}],[()=>Mce,{[E]:"FpgaInfo",[S]:Lre}],[()=>Ple,{[E]:"PlacementGroupInfo",[S]:Eie}],[()=>Fce,{[E]:"InferenceAcceleratorInfo",[S]:toe}],[2,{[E]:"HibernationSupported",[S]:Yre}],[2,{[E]:"BurstablePerformanceSupported",[S]:Dse}],[2,{[E]:"DedicatedHostsSupported",[S]:ere}],[2,{[E]:"AutoRecoverySupported",[S]:xse}],[()=>cue,{[E]:"SupportedBootModes",[S]:qie}],[0,{[E]:"NitroEnclavesSupport",[S]:rie}],[0,{[E]:"NitroTpmSupport",[S]:fie}],[()=>kle,{[E]:"NitroTpmInfo",[S]:uie}],[()=>Sle,{[E]:"MediaAcceleratorInfo",[S]:joe}],[()=>Dle,{[E]:"NeuronInfo",[S]:cie}],[0,{[E]:"PhcSupport",[S]:Iie}],[0,{[E]:"RebootMigrationSupport",[S]:Bie}]]],hle=[3,F,zJ,0,[cS],[0]],ple=[3,F,LJ,0,[aS],[0]],mle=[3,F,aee,0,[ja,Fa,$r,lS,JJ],[[0,{[E]:"KeyPairId",[S]:pm}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:zS}],[()=>jae,{[E]:"KeyMaterial",[S]:Doe}]]],gle=[3,F,oee,0,[ja,Tk,Fa,Ete,UD,$r,lS],[[0,{[E]:"KeyPairId",[S]:pm}],[0,{[E]:"KeyType",[S]:Poe}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"PublicKey",[S]:Cie}],[4,{[E]:"CreateTime",[S]:N3}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:zS}]]],yle=[3,F,bee,0,[yee,vee,S3],[0,0,0]],vle=[3,F,lee,0,[Ak],[[0,{[E]:"LicenseConfigurationArn",[S]:Noe}]]],ble=[3,F,cee,0,[Ak],[0]],Sle=[3,F,Ik,0,[AD,Vne],[[()=>Lue,{[E]:"Accelerators",[S]:x3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:vae}]]],_le=[3,F,Ree,0,[Bi,Co,Of,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>wle,{[E]:"MemoryInfo",[S]:Sl}]]],wle=[3,F,Tee,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Ele=[3,F,Ha,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],xle=[3,F,Lee,0,[Va,Jn,ES,dm,im,fm,dS],[0,2,1,0,1,1,2],1],Rle=[3,F,Bee,0,[v3],[[()=>tue,{[E]:"VolumeModification",[S]:Dae}]]],Cle=[3,F,hS,0,[bl],[[0,{[E]:"State",[S]:EP}]]],Tle=[3,F,Vee,0,[pS,jk,Dk,EY,ute,rX,Mee,Dee],[[1,{[E]:"NetworkCardIndex",[S]:oP}],[0,{[E]:"NetworkPerformance",[S]:aP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:nP}],[1,{[E]:"BaselineBandwidthInGbps",[S]:Ose}],[1,{[E]:"PeakBandwidthInGbps",[S]:bie}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:Jse}],[1,{[E]:"MaximumEnaQueueCount",[S]:Goe}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:Koe}]]],Ale=[3,F,Bk,0,[jk,Dk,kee,EX,Hee,zW,LW,FJ,Wb,uW,YD,sW,cW,MY,yW],[[0,{[E]:"NetworkPerformance",[S]:aP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:nP}],[1,{[E]:"MaximumNetworkCards",[S]:Zoe}],[1,{[E]:"DefaultNetworkCardIndex",[S]:tre}],[()=>Bue,{[E]:"NetworkCards",[S]:tie}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:noe}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:soe}],[2,{[E]:"Ipv6Supported",[S]:Coe}],[0,{[E]:"EnaSupport",[S]:MS}],[2,{[E]:"EfaSupported",[S]:Pre}],[()=>bce,{[E]:"EfaInfo",[S]:wre}],[2,{[E]:"EncryptionInTransitSupported",[S]:Sre}],[2,{[E]:"EnaSrdSupported",[S]:Mre}],[()=>oue,{[E]:"BandwidthWeightings",[S]:Pse}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:zre}]]],Ile=[3,F,Gee,0,[Bi,S3],[[1,{[E]:"Count",[S]:qa}],[1,{[E]:"Version",[S]:Bae}]]],Ole=[3,F,Kee,0,[Bi,Co,$Y,Ha],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:ji}],[()=>Ile,{[E]:"CoreInfo",[S]:jse}],[()=>Mle,{[E]:"MemoryInfo",[S]:Sl}]]],Mle=[3,F,Qee,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Dle=[3,F,$k,0,[Yee,qne],[[()=>$ue,{[E]:"NeuronDevices",[S]:sie}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:bae}]]],kle=[3,F,Fk,0,[kne],[[()=>Uue,{[E]:"SupportedVersions",[S]:lae}]]],kP=[3,F,ste,0,[qk],[0]],ym=[3,F,rte,0,[Uee,qk],[[2,{[E]:"Managed",[S]:Woe}],[0,{[E]:"Principal",[S]:vie}]]],PP=[3,F,yS,0,[sm,SY,hk,Rte,AW,Wne,tne,OW,dk,nm],[[0,{[E]:"AvailabilityZoneId",[S]:E3}],[0,{[E]:"Affinity",[S]:Ase}],[0,{[E]:"GroupName",[S]:q3}],[1,{[E]:"PartitionNumber",[S]:Aie}],[0,{[E]:"HostId",[S]:qre}],[0,{[E]:"Tenancy",[S]:fae}],[0,{[E]:"SpreadDomain",[S]:Kie}],[0,{[E]:"HostResourceGroupArn",[S]:Qre}],[0,{[E]:"GroupId",[S]:V3}],[0,{[E]:"AvailabilityZone",[S]:AS}]]],Ple=[3,F,Yk,0,[Rne],[[()=>Hue,{[E]:"SupportedStrategies",[S]:sae}]]],Nle=[3,F,mte,0,[vk,tk,ek],[0,2,2]],zle=[3,F,gte,0,[vk,tk,ek],[[0,{[E]:"HostnameType",[S]:Wre}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:Are}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Tre}]]],Lle=[3,F,bte,0,[e3,yl],[[2,{[E]:"Primary",[S]:pP}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Ble=[3,F,Wk,0,[Wte,ene,nne,Of],[[()=>rue,{[E]:"SupportedArchitectures",[S]:Vie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:Gie}],[()=>Que,{[E]:"SupportedFeatures",[S]:Zie}],[0,{[E]:"Manufacturer",[S]:Pf}]]],$le=[3,F,pte,0,[fte,hte],[[0,{[E]:"ProductCode",[S]:Sie}],[0,{[E]:"Type",[S]:CP}]]],Ule=[3,F,kte,0,[If,Jn],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:vs}]],1],jle=[3,F,Zte,0,[ete,bS,hW],[[0,{[E]:"OptInStatus",[S]:die}],[0,{[E]:"RegionName",[S]:Uie}],[0,{[E]:"RegionEndpoint",[S]:Pie}]]],NP=[3,F,Yte,0,[zte,mS,Bte,tS,YJ],[[0,{[E]:"ReservationId",[S]:Nie}],[0,{[E]:"OwnerId",[S]:lP}],[0,{[E]:"RequesterId",[S]:Lie}],[()=>US,{[E]:"GroupSet",[S]:kS}],[()=>Rue,{[E]:"InstancesSet",[S]:hm}]]],Hle=[3,F,Dte,0,[Jb],[[2,{[E]:"Enabled",[S]:H3}]],1],Fle=[3,F,Pte,0,[Eee,xee,Vb,Af,om,bk,rS,uS,$r,hS,yS,vS,rne,r3,lm,ese,GD,ZD,um,gee,gJ,KY,qb,Kb,nS,hee,kk,Xb,Kk,Pk,tX,iW,Uk,gl,Jn,nX,eJ,yl,Qb,xD,Lk,iS,XD],[1,1,[()=>aue,{[S]:Fb}],0,0,1,[()=>jS,{[S]:oS}],0,0,[()=>Hle,0],[()=>PP,0],0,[()=>$P,{[S]:SS}],[()=>Zue,{[S]:o3}],0,[()=>Uae,0],[()=>hue,0],[()=>mue,{[S]:KD}],[()=>vm,{[S]:Mf}],()=>yle,()=>tle,()=>Wae,()=>Qae,()=>Hae,()=>Lce,[()=>zue,{[S]:mee}],()=>nle,()=>Tce,()=>Nle,()=>ele,2,2,()=>cle,()=>kP,[2,{[E]:"DryRun",[S]:vs}],[2,{[E]:"DisableApiTermination",[S]:Xse}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:ioe}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"ClientToken",[Aoe]:1,[S]:P3}],[0,{[E]:"AdditionalInfo",[S]:_3}],[()=>Tue,{[E]:"NetworkInterface",[S]:iie}],[()=>$ce,{[E]:"IamInstanceProfile",[S]:Z3}],[2,{[E]:"EbsOptimized",[S]:$3}]],2],Vle=[3,F,Sne,0,[Pee,mne,CY,pse,ZW],[0,0,1,4,0]],qle=[3,F,fne,0,[If,xD,Jn],[[()=>zf,{[S]:Ro}],[0,{[E]:"AdditionalInfo",[S]:_3}],[2,{[E]:"DryRun",[S]:vs}]],1],Gle=[3,F,dne,0,[gne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],zP=[3,F,wS,0,[jD,jee],[[0,{[E]:"Code",[S]:z3}],[0,{[E]:"Message",[S]:Joe}]]],Kle=[3,F,hne,0,[If,DW,a3,Jn,ck],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:vs}],[2,{[E]:"Force",[S]:$re}]],1],Zle=[3,F,pne,0,[vne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],Qle=[3,F,f3,0,[XJ,m3],[[0,{[E]:"Key",[S]:Moe}],[0,{[E]:"Value",[S]:Aae}]]],Yle=[3,F,Mf,0,[Gte,Fa],[[0,{[E]:"ResourceType",[S]:Hie}],[()=>Ga,{[S]:f3}]]],Xle=[3,F,Bne,0,[If,ck,a3,Jn],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:vs}]],1],Wle=[3,F,$ne,0,[jne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],Jle=[3,F,g3,0,[OX,sX,AX,rse,hse],[[1,{[E]:"DefaultVCpus",[S]:ire}],[1,{[E]:"DefaultCores",[S]:Wse}],[1,{[E]:"DefaultThreadsPerCore",[S]:rre}],[()=>lue,{[E]:"ValidCores",[S]:Oae}],[()=>Yue,{[E]:"ValidThreadsPerCore",[S]:Lae}]]],LP=[3,F,yse,0,[sm,cm,Mne,im,Fa,dm,bW,dS,fm,Ane,gl,CS,Va,ES,_S,nm,bl,UD,wY,eS,fS],[[0,{[E]:"AvailabilityZoneId",[S]:E3}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"SourceVolumeId",[S]:aae}],[1,{[E]:"Iops",[S]:X3}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VolumeType",[S]:IP}],[2,{[E]:"FastRestored",[S]:Bre}],[2,{[E]:"MultiAttachEnabled",[S]:Uoe}],[1,{[E]:"Throughput",[S]:RP}],[0,{[E]:"SseType",[S]:oae}],[()=>ym,{[E]:"Operator",[S]:mm}],[1,{[E]:"VolumeInitializationRate",[S]:Mae}],[0,{[E]:"VolumeId",[S]:gm}],[1,{[E]:"Size",[S]:uae}],[0,{[E]:"SnapshotId",[S]:bP}],[0,{[E]:"AvailabilityZone",[S]:AS}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"CreateTime",[S]:N3}],[()=>efe,{[E]:"AttachmentSet",[S]:Tse}],[2,{[E]:"Encrypted",[S]:DS}],[0,{[E]:"KmsKeyId",[S]:J3}]]],eue=[3,F,sse,0,[Tf,RD,TJ,rm,Va,Ro,PX,bl,Hb],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"AssociatedResource",[S]:w3}],[0,{[E]:"InstanceOwningService",[S]:hoe}],[1,{[E]:"EbsCardIndex",[S]:OS}],[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"InstanceId",[S]:NS}],[0,{[E]:"Device",[S]:are}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"AttachTime",[S]:TS}]]],tue=[3,F,v3,0,[Va,Nee,_ne,Qne,Une,Xne,Yne,Fne,ite,tte,cte,ate,nte,Ate,Cne,fW],[[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"ModificationState",[S]:Xoe}],[0,{[E]:"StatusMessage",[S]:eae}],[1,{[E]:"TargetSize",[S]:wae}],[1,{[E]:"TargetIops",[S]:gae}],[0,{[E]:"TargetVolumeType",[S]:xae}],[1,{[E]:"TargetThroughput",[S]:Eae}],[2,{[E]:"TargetMultiAttachEnabled",[S]:yae}],[1,{[E]:"OriginalSize",[S]:mie}],[1,{[E]:"OriginalIops",[S]:hie}],[0,{[E]:"OriginalVolumeType",[S]:yie}],[1,{[E]:"OriginalThroughput",[S]:gie}],[2,{[E]:"OriginalMultiAttachEnabled",[S]:pie}],[1,{[E]:"Progress",[S]:Die}],[4,{[E]:"StartTime",[S]:rae}],[4,{[E]:"EndTime",[S]:Nre}]]],nue="unit",sue=[-3,wP,"EC2ServiceException",0,[],[]];Mt.for(wP).registerError(sue,jb);var rue=[1,F,bY,0,[0,{[S]:je}]],oue=[1,F,OY,0,[0,{[S]:je}]],iue=[1,F,xY,0,[()=>MP,{[S]:je}]],aue=[1,F,RY,0,[()=>MP,{[S]:Fb}]],cue=[1,F,TY,0,[0,{[S]:je}]],lue=[1,F,kY,0,[1,{[S]:je}]],uue=[1,F,iX,0,[()=>hce,{[S]:je}]],fue=[1,F,BX,0,[()=>mce,{[S]:je}]],due=[1,F,FX,0,[()=>Sce,{[S]:je}]],hue=[1,F,ZX,0,[()=>_ce,{[S]:je}]],pue=[1,F,XX,0,[()=>Ece,{[S]:je}]],mue=[1,F,ZD,0,[()=>wce,{[S]:je}]],gue=[1,F,LX,0,[0,{[S]:qD}]],Rl=[1,F,vW,0,[()=>Ace,{[S]:$i}]],yue=[1,F,mW,0,[()=>Ice,{[S]:je}]],vue=[1,F,wW,0,[()=>Dce,{[S]:je}]],US=[1,F,xW,0,[()=>Nce,{[S]:je}]],bue=[1,F,tJ,0,[0,{[S]:Af}]],Sue=[1,F,cJ,0,[()=>Uce,{[S]:je}]],_ue=[1,F,FW,0,[()=>Vce,0]],wue=[1,F,UW,0,[()=>Qce,{[S]:je}]],zf=[1,F,nJ,0,[0,{[S]:Ro}]],Eue=[1,F,QW,0,[()=>Yce,{[S]:je}]],jS=[1,F,KW,0,[()=>Xce,{[S]:je}]],xue=[1,F,YW,0,[()=>Wce,{[S]:je}]],Rue=[1,F,uJ,0,[()=>Gce,{[S]:je}]],Cue=[1,F,SJ,0,[()=>rle,{[S]:je}]],Tue=[1,F,wJ,0,[()=>ile,{[S]:je}]],Aue=[1,F,MJ,0,[()=>lle,{[S]:je}]],HS=[1,F,$J,0,[()=>ule,{[S]:je}]],Iue=[1,F,VJ,0,[()=>dle,{[S]:je}]],Oue=[1,F,PJ,0,[()=>hle,{[S]:je}]],Mue=[1,F,NJ,0,[()=>ple,{[S]:je}]],Due=[1,F,eee,0,[0,{[S]:$r}]],kue=[1,F,see,0,[0,{[S]:ja}]],Pue=[1,F,iee,0,[()=>gle,{[S]:je}]],Nue=[1,F,fee,0,[()=>vle,{[S]:je}]],zue=[1,F,pee,0,[()=>ble,{[S]:je}]],Lue=[1,F,Cee,0,[()=>_le,{[S]:je}]],Bue=[1,F,Fee,0,[()=>Tle,{[S]:je}]],$ue=[1,F,Zee,0,[()=>Ole,{[S]:je}]],Uue=[1,F,Jee,0,[0,{[S]:je}]],jue=[1,F,ote,0,[0,{[S]:Vk}]],Hue=[1,F,yte,0,[0,{[S]:je}]],Fue=[1,F,Ste,0,[()=>Lle,{[S]:je}]],BP=[1,F,dte,0,[()=>$le,{[S]:je}]],Vue=[1,F,Ute,0,[()=>jle,{[S]:je}]],que=[1,F,Vte,0,[0,{[S]:bS}]],Gue=[1,F,jte,0,[()=>NP,{[S]:je}]],Kue=[1,F,Mte,0,[0,{[S]:je}]],$P=[1,F,sne,0,[0,{[S]:SS}]],Zue=[1,F,one,0,[0,{[S]:o3}]],Que=[1,F,Xte,0,[0,{[S]:je}]],Ga=[1,F,Hne,0,[()=>Qle,{[S]:je}]],vm=[1,F,Zne,0,[()=>Yle,{[S]:je}]],Yue=[1,F,Gne,0,[1,{[S]:je}]],Xue=[1,F,Jne,0,[0,{[S]:je}]],Wue=[1,F,use,0,[0,{[S]:je}]],Jue=[1,F,dse,0,[0,{[S]:je}]],efe=[1,F,nse,0,[()=>eue,{[S]:je}]],tfe=[1,F,ose,0,[0,{[S]:Va}]],nfe=[1,F,ase,0,[()=>LP,{[S]:je}]],sfe=[1,F,vse,0,[0,{[S]:je}]],U0e=[9,F,UY,0,()=>Yae,()=>mle],j0e=[9,F,eX,0,()=>Xae,()=>LP],H0e=[9,F,yX,0,()=>Jae,()=>ece],rfe=[9,F,pX,0,()=>tce,()=>nce],ofe=[9,F,mX,0,()=>sce,()=>rce],ife=[9,F,hX,0,()=>oce,()=>ice],afe=[9,F,wX,0,()=>ace,()=>cce],cfe=[9,F,TX,0,()=>lce,()=>uce],lfe=[9,F,kX,0,()=>fce,()=>dce],F0e=[9,F,rJ,0,()=>jce,()=>Hce],V0e=[9,F,$ee,0,()=>xle,()=>Rle],q0e=[9,F,Lte,0,()=>Ule,()=>nue],G0e=[9,F,$te,0,()=>Fle,()=>NP],K0e=[9,F,yne,0,()=>qle,()=>Gle],Z0e=[9,F,bne,0,()=>Kle,()=>Zle],Q0e=[9,F,zne,0,()=>Xle,()=>Wle];class UP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(rfe).build(){}class jP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(ofe).build(){}class ufe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(ife).build(){}class HP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(afe).build(){}class ffe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(cfe).build(){}class FP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(lfe).build(){}function dfe(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&Mn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let i=!0;if(typeof e.expectContinueHeader=="number")try{i=(Number(r.headers?.["content-length"])??e.bodyLengthChecker?.(r.body)??1/0)>=e.expectContinueHeader}catch{}else i=!!e.expectContinueHeader;i&&(r.headers.Expect="100-continue")}return t({...n,request:r})}}const hfe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},pfe=e=>({applyToStack:t=>{t.add(dfe(e),hfe)}}),VP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},mfe=VP.WHEN_SUPPORTED,Y0e={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},gfe=VP.WHEN_SUPPORTED;var $v;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})($v||($v={}));var TT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(TT||(TT={}));const X0e=$v.CRC32;var W0e=(function(){function e(){this.crc32=new bp}return e.prototype.update=function(t){vp(t)||this.crc32.update(Na(t))},e.prototype.digest=function(){return fD(this,void 0,void 0,function(){return dD(this,function(t){return[2,$Q(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new bp},e})(),bp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=VQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^vfe[(this.checksum^l)&255]}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),yfe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],vfe=UQ(yfe);const bfe=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ns(t??mfe),responseChecksumValidation:Ns(n??gfe),requestStreamBufferSize:Number(r??0)})},Sfe=e=>(t,n)=>async r=>{const i=await e.region(),c=e.region;let l=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),l=()=>Object.defineProperty(e,"region",{writable:!0,value:c}));try{const f=await t(r);if(n.__s3RegionRedirect){l();const d=await e.region();if(i!==d)throw new Error("Region was not restored following S3 region redirect.")}return f}catch(f){throw l(),f}},_fe={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function wfe(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){const c=i?.$metadata?.httpStatusCode,l=n.commandName==="HeadBucketCommand",f=i?.$response?.headers?.["x-amz-bucket-region"];if(f&&(c===301||c===400&&(i?.name==="IllegalLocationConstraintException"||l))){try{const d=f;n.logger?.debug(`Redirecting from ${await e.region()} to ${d}`),n.__s3RegionRedirect=d}catch(d){throw new Error("Region redirect failed: "+d)}return t(r)}}throw i}}}const Efe={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},xfe=e=>({applyToStack:t=>{t.add(wfe(e),Efe),t.addRelativeTo(Sfe(e),_fe)}});class FS{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+FS.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()(l.expiration?.getTime()??0){i.set(r,new k0(Promise.resolve(h)))})),l)):i.set(r,new k0(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: -`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const Rfe="Directory",Cfe="S3Express",Tfe="sigv4-s3express",Afe="X-Amz-S3session-Token",Ife=Afe.toLowerCase(),Ofe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===Tfe;if((i.properties?.backend===Cfe||i.properties?.bucketType===Rfe)&&(vr(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Ife]=d.sessionToken)}}}return t(r)},Mfe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Dfe=e=>({applyToStack:t=>{t.add(Ofe(e),Mfe)}}),kfe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Pfe=e=>t=>{throw t},Nfe=(e,t)=>{},zfe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await kfe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Pfe)(l));return(d.successHandler||Nfe)(y.response,l),y},Lfe=e=>({applyToStack:t=>{t.addRelativeTo(zfe(e),JO)}}),Bfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new VS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},$fe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Ufe=3e3,jfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!ka.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await wG(f)),c.body=y;const g=await Hfe(h,{streamCollector:async b=>mG(b,Ufe)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&$fe[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},Hfe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Ffe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},qS=e=>({applyToStack:t=>{t.addRelativeTo(jfe(e),Ffe)}}),Vfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function qfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const Gfe={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Kfe({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Vfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const Zfe={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Qfe=e=>({applyToStack:t=>{t.add(Kfe(e),Zfe),t.addRelativeTo(qfe(e),Gfe)}}),Yfe=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),Uv="X-Amz-S3session-Token",AT=Uv.toLowerCase();class Xfe extends Pv{async signWithCredentials(t,n,r){const i=IT(n);t.headers[AT]=n.sessionToken;const c=this;return OT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=IT(n);return delete t.headers[AT],t.headers[Uv]=n.sessionToken,t.query=t.query??{},t.query[Uv]=n.sessionToken,OT(this,i),this.presign(t,r)}}function IT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function OT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class qP{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new Xfe(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const GS="required",M="type",ce="rules",L="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",po="backend",On="authSchemes",hn="disableDoubleEncoding",pn="signingName",Bn="signingRegion",Re="headers",KS="signingRegionSet",Wfe=6,Jfe=!1,Tr=!0,ks="isSet",nn="booleanEquals",Ae="error",Sp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",MT="bucketSuffix",ZS="parseURL",me="endpoint",ue="tree",_p="aws.isVirtualHostableS3Bucket",wp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Pr="not",DT="accessPointSuffix",$h="{url#scheme}://{url#authority}{url#path}",GP="hardwareType",KP="regionPrefix",kT="bucketAliasSuffix",jv="outpostId",Ka="isValidHostLabel",QS="sigv4a",vf="s3-outposts",ol="s3",ZP="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",QP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",PT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",YP="aws.parseArn",XP="bucketArn",WP="arnType",Ep="",YS="s3-object-lambda",JP="accesspoint",XS="accessPointName",NT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",zT="mrapPartition",LT="outpostType",BT="arnPrefix",eN="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",$T="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",UT="https://s3.{partitionResult#dnsSuffix}",Lc={[GS]:!1,[M]:"string"},Bc={[GS]:!0,default:!1,[M]:"boolean"},Lu={[GS]:!1,[M]:"boolean"},tr={[ee]:nn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:nn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:nn,[te]:[{[ke]:"UseDualStack"},!0]},en={[ee]:ks,[te]:[{[ke]:"Endpoint"}]},tN={[ee]:Sp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},jT={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Yu={[ee]:ks,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},HT={[L]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},FT={[L]:[en,{[ee]:ZS,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:nn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[L]:[{[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ns={[ee]:ZS,[te]:[{[ke]:"Endpoint"}],[We]:"url"},P0={[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},nN={[ke]:"url"},sN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Os={[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},Ve={},rN={[ee]:_p,[te]:[dt,!1]},VT={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},qT={[ee]:ks,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},GT={[ee]:nn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Pr,[te]:[en]},rt={[ee]:nn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:nn,[te]:[{[ke]:"UseFIPS"},!1]},Ch={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},KT={[ee]:Pr,[te]:[Yu]},ZT={[ke]:GP},QT={[L]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Th={[On]:[{[hn]:!0,[Gt]:QS,[pn]:vf,[KS]:["*"]},{[hn]:!0,[Gt]:"sigv4",[pn]:vf,[Bn]:"{Region}"}]},N0={[ee]:nn,[te]:[{[ke]:"ForcePathStyle"},!1]},ede={[ke]:"ForcePathStyle"},fn={[ee]:nn,[te]:[{[ke]:"Accelerate"},!1]},wn={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"us-east-1"}]},lt={[ee]:Pr,[te]:[wn]},An={[ee]:nn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},YT={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{Region}"}]},[Re]:{}},gn={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{Region}"}]},In={[ee]:nn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},XT={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},WT={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},JT={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},z0={[ee]:nn,[te]:[{[ee]:Vt,[te]:[nN,"isIp"]},!1]},L0={[Ee]:ZP,[xe]:gn,[Re]:{}},Hv={[Ee]:wp,[xe]:gn,[Re]:{}},eA={[me]:Hv,[M]:me},B0={[Ee]:QP,[xe]:gn,[Re]:{}},tA={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},Ah={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},ms={[ke]:XP},oN={[ke]:WP},$0={[ee]:Vt,[te]:[ms,"service"]},WS={[ke]:XS},nA={[L]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},sA={[L]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},rA={[L]:[{[ee]:ks,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:nn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},U0={[L]:[{[ee]:ks,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:nn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},iN={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},aN={[ee]:Vt,[te]:[ms,"accountId"]},j0={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:YS,[Bn]:"{bucketArn#region}"}]},oA={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},H0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},F0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},V0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},iA={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},aA={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},Bu={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{bucketArn#region}"}]},cA={[On]:[{[hn]:!0,[Gt]:QS,[pn]:vf,[KS]:["*"]},{[hn]:!0,[Gt]:"sigv4",[pn]:vf,[Bn]:"{bucketArn#region}"}]},lA={[ee]:YP,[te]:[dt]},uA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},fA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},dA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},q0={[Ee]:eN,[xe]:gn,[Re]:{}},hA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},pA={[ke]:"UseObjectLambdaEndpoint"},G0={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:YS,[Bn]:"{Region}"}]},mA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},gA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},yA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},K0={[Ee]:$h,[xe]:gn,[Re]:{}},vA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},Z0=[{[ke]:"Region"}],tde=[{[ke]:"Endpoint"}],nde=[dt],Q0=[tr],$c=[en,ns],bA=[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:nn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],sde=[sN],Y0=[rN],Js=[tN],X0=[Nt,Ot],Xu=[Nt,rt],Wu=[et,Ot],Ju=[et,rt],SA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me}],_A=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],wA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],EA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],xA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],RA=[dt,0,7,!0],CA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],TA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],AA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],IA=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],OA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],rde=[Yu],MA=[{[ee]:Ka,[te]:[{[ke]:jv},!1]}],DA=[{[ee]:pt,[te]:[{[ke]:KP},"beta"]}],ode=["*"],kA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!1]}],gi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],W0=[{[ee]:pt,[te]:[oN,JP]}],PA=[{[ee]:Vt,[te]:[ms,"resourceId[1]"],[We]:XS},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[WS,Ep]}]}],ide=[ms,"resourceId[1]"],NA=[Ot],J0=[{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[ms,"region"]},Ep]}]}],zA=[{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[2]"]}]}]}],ade=[ms,"resourceId[2]"],ev=[{[ee]:Sp,[te]:[{[ee]:Vt,[te]:[ms,"region"]}],[We]:"bucketPartition"}],LA=[{[ee]:pt,[te]:[iN,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],tv=[{[ee]:Ka,[te]:[{[ee]:Vt,[te]:[ms,"region"]},!0]}],nv=[{[ee]:Ka,[te]:[aN,!1]}],BA=[{[ee]:Ka,[te]:[WS,!1]}],Ih=[Nt],$A=[{[ee]:Ka,[te]:[{[ke]:"Region"},!0]}],cde={parameters:{Bucket:Lc,Region:Lc,UseFIPS:Bc,UseDualStack:Bc,Endpoint:Lc,ForcePathStyle:Bc,Accelerate:Bc,UseGlobalEndpoint:Bc,UseObjectLambdaEndpoint:Lu,Key:Lc,Prefix:Lc,CopySource:Lc,DisableAccessPoints:Lu,DisableMultiRegionAccessPoints:Bc,UseArnRegion:Lu,UseS3ExpressControlEndpoint:Lu,DisableS3ExpressSessionAuth:Lu},[ce]:[{[L]:[{[ee]:ks,[te]:Z0}],[ce]:[{[L]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[L]:[Ot,en],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[L]:[en,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[L]:[en,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[L]:[Nt,tN,jT],error:"Partition does not support FIPS",[M]:Ae},{[L]:[Yu,{[ee]:kt,[te]:[dt,0,Wfe,Tr],[We]:MT},{[ee]:pt,[te]:[{[ke]:MT},"--x-s3"]}],[ce]:[HT,FT,{[L]:[qT,GT],[ce]:[{[L]:Js,[ce]:[{[L]:[sN,Ke],[ce]:[{[L]:X0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:Y0,[ce]:[{[L]:Js,[ce]:[{[L]:bA,[ce]:[{[L]:SA,[ce]:Ar,[M]:ue},{[L]:_A,[ce]:Ar,[M]:ue},{[L]:wA,[ce]:Ar,[M]:ue},{[L]:EA,[ce]:Ar,[M]:ue},{[L]:xA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[L]:SA,[ce]:Ir,[M]:ue},{[L]:_A,[ce]:Ir,[M]:ue},{[L]:wA,[ce]:Ir,[M]:ue},{[L]:EA,[ce]:Ir,[M]:ue},{[L]:xA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},VT],[M]:ue},{[L]:[Yu,{[ee]:kt,[te]:RA,[We]:DT},{[ee]:pt,[te]:[{[ke]:DT},"--xa-s3"]}],[ce]:[HT,FT,{[L]:Y0,[ce]:[{[L]:Js,[ce]:[{[L]:bA,[ce]:[{[L]:CA,[ce]:Ar,[M]:ue},{[L]:TA,[ce]:Ar,[M]:ue},{[L]:AA,[ce]:Ar,[M]:ue},{[L]:IA,[ce]:Ar,[M]:ue},{[L]:OA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[L]:CA,[ce]:Ir,[M]:ue},{[L]:TA,[ce]:Ir,[M]:ue},{[L]:AA,[ce]:Ir,[M]:ue},{[L]:IA,[ce]:Ir,[M]:ue},{[L]:OA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},VT],[M]:ue},{[L]:[KT,qT,GT],[ce]:[{[L]:Js,[ce]:[{[L]:$c,endpoint:{[Ee]:$h,[xe]:Os,[Re]:Ve},[M]:me},{[L]:X0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[L]:[Yu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:GP},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:KP},{[ee]:kt,[te]:RA,[We]:kT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:jv},{[ee]:Sp,[te]:Z0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:kT},"--op-s3"]}],[ce]:[{[L]:MA,[ce]:[{[L]:Y0,[ce]:[{[L]:[{[ee]:pt,[te]:[ZT,"e"]}],[ce]:[{[L]:DA,[ce]:[QT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{[L]:[{[ee]:pt,[te]:[ZT,"o"]}],[ce]:[{[L]:DA,[ce]:[QT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[L]:rde,[ce]:[{[L]:[en,{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:ZS,[te]:tde}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[L]:[N0,rN],[ce]:[{[L]:Js,[ce]:[{[L]:kA,[ce]:[{[L]:[tr,jT],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[L]:[Ot,Nt,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Nt,fn,Ke,lt,An],[ce]:[{endpoint:YT,[M]:me}],[M]:ue},{[L]:[Ot,Nt,fn,Ke,lt,In],endpoint:YT,[M]:me},{[L]:[rt,Nt,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Nt,fn,Ke,lt,An],[ce]:[{endpoint:XT,[M]:me}],[M]:ue},{[L]:[rt,Nt,fn,Ke,lt,In],endpoint:XT,[M]:me},{[L]:[Ot,et,tr,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:WT,[M]:me}],[M]:ue},{[L]:[Ot,et,tr,Ke,lt,In],endpoint:WT,[M]:me},{[L]:[Ot,et,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,fn,Ke,lt,An],[ce]:[{endpoint:JT,[M]:me}],[M]:ue},{[L]:[Ot,et,fn,Ke,lt,In],endpoint:JT,[M]:me},{[L]:[rt,et,fn,en,ns,P0,wn],endpoint:{[Ee]:ZP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,en,ns,z0,wn],endpoint:{[Ee]:wp,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,en,ns,P0,lt,An],[ce]:[{[L]:gi,endpoint:L0,[M]:me},{endpoint:L0,[M]:me}],[M]:ue},{[L]:[rt,et,fn,en,ns,z0,lt,An],[ce]:[{[L]:gi,endpoint:Hv,[M]:me},eA],[M]:ue},{[L]:[rt,et,fn,en,ns,P0,lt,In],endpoint:L0,[M]:me},{[L]:[rt,et,fn,en,ns,z0,lt,In],endpoint:Hv,[M]:me},{[L]:[rt,et,tr,Ke,wn],endpoint:{[Ee]:QP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,tr,Ke,lt,An],[ce]:[{[L]:gi,endpoint:B0,[M]:me},{endpoint:B0,[M]:me}],[M]:ue},{[L]:[rt,et,tr,Ke,lt,In],endpoint:B0,[M]:me},{[L]:[rt,et,fn,Ke,wn],endpoint:{[Ee]:PT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,Ke,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:PT,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:tA,[M]:me}],[M]:ue},{[L]:[rt,et,fn,Ke,lt,In],endpoint:tA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[en,ns,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[nN,"scheme"]},"http"]},{[ee]:_p,[te]:[dt,Tr]},N0,et,rt,fn],[ce]:[{[L]:Js,[ce]:[{[L]:kA,[ce]:[eA],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[N0,{[ee]:YP,[te]:nde,[We]:XP}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[0]"],[We]:WP},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[oN,Ep]}]}],[ce]:[{[L]:[{[ee]:pt,[te]:[$0,YS]}],[ce]:[{[L]:W0,[ce]:[{[L]:PA,[ce]:[nA,sA,{[L]:J0,[ce]:[rA,{[L]:zA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:LA,[ce]:[{[L]:tv,[ce]:[{[L]:[{[ee]:pt,[te]:[aN,Ep]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[L]:nv,[ce]:[{[L]:BA,[ce]:[{[L]:$c,endpoint:{[Ee]:NT,[xe]:j0,[Re]:Ve},[M]:me},{[L]:Ih,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:j0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:j0,[Re]:Ve},[M]:me}],[M]:ue},oA],[M]:ue},H0],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},iA],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},aA],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[L]:W0,[ce]:[{[L]:PA,[ce]:[{[L]:J0,[ce]:[{[L]:W0,[ce]:[{[L]:J0,[ce]:[rA,{[L]:zA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:[{[ee]:pt,[te]:[iN,"{partitionResult#name}"]}],[ce]:[{[L]:tv,[ce]:[{[L]:[{[ee]:pt,[te]:[$0,ol]}],[ce]:[{[L]:nv,[ce]:[{[L]:BA,[ce]:[{[L]:Q0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[L]:X0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:[et,rt,en,ns],endpoint:{[Ee]:NT,[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me}],[M]:ue},oA],[M]:ue},H0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},iA],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ka,[te]:[WS,Tr]}],[ce]:[{[L]:NA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[L]:Ih,error:"S3 MRAP does not support FIPS",[M]:Ae},{[L]:Q0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:nn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[L]:[{[ee]:Sp,[te]:Z0,[We]:zT}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:zT},Gt]},{[ee]:Vt,[te]:[ms,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[hn]:Tr,name:QS,[pn]:ol,[KS]:ode}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},aA],[M]:ue},{[L]:[{[ee]:pt,[te]:[$0,vf]}],[ce]:[{[L]:NA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[L]:Ih,error:"S3 Outposts does not support FIPS",[M]:Ae},{[L]:Q0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[ms,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[L]:[{[ee]:Vt,[te]:ide,[We]:jv}],[ce]:[{[L]:MA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:LA,[ce]:[{[L]:tv,[ce]:[{[L]:nv,[ce]:[{[L]:[{[ee]:Vt,[te]:ade,[We]:LT}],[ce]:[{[L]:[{[ee]:Vt,[te]:[ms,"resourceId[3]"],[We]:XS}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ke]:LT},JP]}],[ce]:[{[L]:$c,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:cA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:cA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},H0],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[L]:[{[ee]:kt,[te]:[dt,0,4,Jfe],[We]:BT},{[ee]:pt,[te]:[{[ke]:BT},"arn:"]},{[ee]:Pr,[te]:[{[ee]:ks,[te]:[lA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[L]:[{[ee]:nn,[te]:[ede,Tr]},lA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[L]:sde,[ce]:[{[L]:Js,[ce]:[{[L]:[fn],[ce]:[{[L]:[Ot,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:uA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,In],endpoint:uA,[M]:me},{[L]:[rt,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:fA,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,In],endpoint:fA,[M]:me},{[L]:[Ot,Ke,et,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:dA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,In],endpoint:dA,[M]:me},{[L]:[rt,en,ns,et,wn],endpoint:{[Ee]:eN,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,en,ns,et,lt,An],[ce]:[{[L]:gi,endpoint:q0,[M]:me},{endpoint:q0,[M]:me}],[M]:ue},{[L]:[rt,en,ns,et,lt,In],endpoint:q0,[M]:me},{[L]:[rt,Ke,et,wn],endpoint:{[Ee]:$T,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,et,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:$T,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:hA,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,In],endpoint:hA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:ks,[te]:[pA]},{[ee]:nn,[te]:[pA,Tr]}],[ce]:[{[L]:Js,[ce]:[{[L]:$A,[ce]:[nA,sA,{[L]:$c,endpoint:{[Ee]:$h,[xe]:G0,[Re]:Ve},[M]:me},{[L]:Ih,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:G0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:G0,[Re]:Ve},[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[KT],[ce]:[{[L]:Js,[ce]:[{[L]:$A,[ce]:[{[L]:[Nt,Ot,Ke,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:mA,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,In],endpoint:mA,[M]:me},{[L]:[Nt,rt,Ke,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:gA,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,In],endpoint:gA,[M]:me},{[L]:[et,Ot,Ke,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:yA,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,In],endpoint:yA,[M]:me},{[L]:[et,rt,en,ns,wn],endpoint:{[Ee]:$h,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,en,ns,lt,An],[ce]:[{[L]:gi,endpoint:K0,[M]:me},{endpoint:K0,[M]:me}],[M]:ue},{[L]:[et,rt,en,ns,lt,In],endpoint:K0,[M]:me},{[L]:[et,rt,Ke,wn],endpoint:{[Ee]:UT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Ke,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:UT,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:vA,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,In],endpoint:vA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},lde=cde,ude=new gM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),cN=(e,t={})=>ude.get(e,()=>TM(lde,{endpointParams:e,logger:t.logger}));hf.aws=kb;const fde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=Eo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await tD(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},dde=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),hde=fde(dde);function lN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function uN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const pde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,v=h.toLowerCase();h!==v&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${v}'`);let b;if(v==="sigv4a"){b="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(qP.sigv4aDependency()==="none"&&R)continue}else if(v.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);const _=n[b];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${b}'`);const x=_(i);x.schemeId=b,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},mde=e=>{const t=[];switch(e.operation){default:t.push(lN(e)),t.push(uN(e))}return t},gde=pde(cN,mde,{"aws.auth#sigv4":lN,"aws.auth#sigv4a":uN}),yde=e=>{const t=LM(e),n=KK(t);return Object.assign(n,{authSchemePreference:Ns(e.authSchemePreference??[])})},vde=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),JS={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Un extends wa{constructor(t){super(t),Object.setPrototypeOf(this,Un.prototype)}}class e_ extends Un{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,e_.prototype)}}class t_ extends Un{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,t_.prototype)}}class n_ extends Un{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends Un{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends Un{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends Un{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class i_ extends Un{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,i_.prototype)}}class a_ extends Un{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,a_.prototype)}}class c_ extends Un{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,c_.prototype)}}class l_ extends Un{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,l_.prototype)}}class u_ extends Un{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,u_.prototype)}}class f_ extends Un{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,f_.prototype)}}class d_ extends Un{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,d_.prototype)}}class h_ extends Un{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,h_.prototype)}}const fN="ACL",bde="AbortDate",UA="AccessKeyId",Sde="AbortMultipartUpload",_de="AbortMultipartUploadOutput",wde="AbortMultipartUploadRequest",Ede="AcceptRanges",xde="AbortRuleId",Rde="AccessTier",is="Bucket",Cde="BucketArn",Tde="BucketAlreadyExists",Ade="BucketAlreadyOwnedByYou",Ide="BypassGovernanceRetention",To="BucketKeyEnabled",dN="BucketRegion",p_="Body",hN="Buckets",Cl="ChecksumAlgorithm",m_="CacheControl",Hi="ChecksumCRC32",Fi="ChecksumCRC32C",Vi="ChecksumCRC64NVME",g_="Cache-Control",Ode="CreationDate",y_="Content-Disposition",v_="ContentDisposition",b_="Content-Encoding",S_="ContentEncoding",__="ContentLanguage",w_="Content-Language",E_="Content-Length",x_="ContentLength",R_="Content-MD5",C_="ContentMD5",Mde="CompletedMultipartUpload",Dde="CompleteMultipartUploadOutput",kde="CreateMultipartUploadOutput",Pde="CompleteMultipartUploadResult",Nde="CompleteMultipartUploadRequest",zde="CreateMultipartUploadRequest",pN="CompleteMultipartUpload",Lde="CreateMultipartUpload",Bde="ChecksumMode",$de="CommonPrefix",Ude="CommonPrefixList",jde="CompletedPartList",Hde="CompletedPart",Fde="CommonPrefixes",Vde="ContentRange",qde="Content-Range",qi="ChecksumSHA1",Gi="ChecksumSHA256",Gde="CreateSessionOutput",Kde="CreateSessionResult",Zde="CreateSessionRequest",Qde="CreateSession",Za="ChecksumType",T_="Content-Type",A_="ContentType",bm="ContinuationToken",Yde="Contents",jA="Credentials",mN="DeleteMarker",Xde="DisplayName",Wde="DeleteObjectOutput",Jde="DeleteObjectRequest",ehe="DeleteObject",gN="Delimiter",bf="Expiration",Ao="ExpectedBucketOwner",HA="ExpiresString",the="EncryptionTypeMismatch",_o="ETag",yN="EncodingType",il="Expires",nhe="FetchOwner",vN="GrantFullControl",she="GetObject",rhe="GetObjectOutput",ohe="GetObjectRequest",bN="GrantRead",SN="GrantReadACP",_N="GrantWriteACP",ihe="ID",Sm="IfMatch",ahe="IfMatchInitiatedTime",che="IfMatchLastModifiedTime",lhe="IfMatchSize",uhe="If-Modified-Since",fhe="IfModifiedSince",dhe="InitiateMultipartUploadResult",_m="If-Match",I_="IfNoneMatch",O_="If-None-Match",hhe="InvalidObjectState",phe="IdempotencyParameterMismatch",mhe="InvalidRequest",ghe="IsRestoreInProgress",yhe="IsTruncated",vhe="IfUnmodifiedSince",bhe="If-Unmodified-Since",She="InvalidWriteOffset",ur="Key",_he="KeyCount",whe="Location",Ehe="ListAllMyBucketsResult",xhe="ListBuckets",Rhe="ListBucketsOutput",Che="ListBucketsRequest",The="ListBucketResult",wN="LastModified",Ahe="Last-Modified",Ihe="ListObjectsV2",Ohe="ListObjectsV2Output",Mhe="ListObjectsV2Request",M_="Metadata",Dhe="MaxBuckets",khe="MFA",EN="MaxKeys",Phe="MissingMeta",Nhe="MpuObjectSize",zhe="MultipartUpload",xN="Name",Lhe="NextContinuationToken",Bhe="NotFound",$he="NoSuchBucket",Uhe="NoSuchKey",jhe="NoSuchUpload",D_="Owner",Hhe="ObjectAlreadyInActiveTierError",k_="ObjectLockLegalHoldStatus",P_="ObjectLockMode",N_="ObjectLockRetainUntilDate",Fhe="ObjectList",Vhe="ObjectNotInActiveTierError",qhe="OptionalObjectAttributes",Ghe="Object",Lf="Prefix",Khe="PartsCount",z_="PartNumber",Zhe="PutObject",Qhe="PutObjectOutput",Yhe="PutObjectRequest",Xhe="PutObjectTagging",Whe="PutObjectTaggingOutput",Jhe="PutObjectTaggingRequest",epe="Parts",tpe="Part",Ki="RequestCharged",npe="ResponseCacheControl",spe="ResponseContentDisposition",rpe="ResponseContentEncoding",ope="ResponseContentLanguage",ipe="ResponseContentType",ape="ResponseExpires",cpe="RestoreExpiryDate",Io="RequestPayer",lpe="ReplicationStatus",RN="RestoreStatus",FA="Range",upe="Restore",CN="StartAfter",VA="SecretAccessKey",fpe="StreamingBlob",Bf="StorageClass",dpe="SessionCredentialValue",hpe="SessionCredentials",ppe="SessionMode",Oo="ServerSideEncryption",Mo="SSECustomerAlgorithm",Tl="SSECustomerKey",Do="SSECustomerKeyMD5",Qa="SSEKMSEncryptionContext",Ur="SSEKMSKeyId",qA="SessionToken",TN="Size",mpe="TagCount",gpe="TooManyParts",AN="TagSet",IN="Tag",Sf="Tagging",wm="UploadId",ype="UploadPart",vpe="UploadPartOutput",bpe="UploadPartRequest",Spe="Value",Zi="VersionId",_pe="WriteOffsetBytes",L_="WebsiteRedirectLocation",wpe="accept-ranges",Epe="bucket-region",bs="client",ON="continuation-token",xpe="delimiter",Ss="error",Rpe="encoding-type",Cpe="fetch-owner",wr="http",Em="httpChecksum",Bs="httpError",U="httpHeader",MN="httpPayload",B_="httpPrefixHeaders",Bt="httpQuery",Tpe="max-buckets",Ape="max-keys",DN="prefix",kN="partNumber",Ipe="response-cache-control",Ope="response-content-disposition",Mpe="response-content-encoding",Dpe="response-content-language",kpe="response-content-type",Ppe="response-expires",Npe="streaming",zpe="start-after",PN="smithy.ts.sdk.synthetic.com.amazonaws.s3",$_="uploadId",U_="versionId",xp="xmlFlattened",Xn="xmlName",NN="x-amz-acl",Lpe="x-amz-abort-date",Bpe="x-amz-abort-rule-id",$pe="x-amz-bypass-governance-retention",zN="x-amz-checksum-algorithm",Al="x-amz-checksum-crc32",Il="x-amz-checksum-crc32c",Ol="x-amz-checksum-crc64nvme",Upe="x-amz-checksum-mode",Ml="x-amz-checksum-sha1",Dl="x-amz-checksum-sha256",jpe="x-amz-create-session-mode",$f="x-amz-checksum-type",LN="x-amz-delete-marker",j_="x-amz-expiration",ko="x-amz-expected-bucket-owner",BN="x-amz-grant-full-control",$N="x-amz-grant-read",UN="x-amz-grant-read-acp",jN="x-amz-grant-write-acp",Hpe="x-amz-if-match-initiated-time",Fpe="x-amz-if-match-last-modified-time",Vpe="x-amz-if-match-size",H_="x-amz-meta-",qpe="x-amz-mfa",Gpe="x-amz-missing-meta",Kpe="x-amz-mp-object-size",Zpe="x-amz-mp-parts-count",F_="x-amz-object-lock-legal-hold",V_="x-amz-object-lock-mode",q_="x-amz-object-lock-retain-until-date",Qpe="x-amz-optional-object-attributes",Ype="x-amz-object-size",Xpe="x-amz-restore",Qi="x-amz-request-charged",Po="x-amz-request-payer",Wpe="x-amz-replication-status",G_="x-amz-storage-class",K_="x-amz-sdk-checksum-algorithm",No="x-amz-server-side-encryption",zo="x-amz-server-side-encryption-aws-kms-key-id",Lo="x-amz-server-side-encryption-bucket-key-enabled",kl="x-amz-server-side-encryption-context",Bo="x-amz-server-side-encryption-customer-algorithm",Uf="x-amz-server-side-encryption-customer-key",$o="x-amz-server-side-encryption-customer-key-MD5",HN="x-amz-tagging",Jpe="x-amz-tagging-count",jf="x-amz-version-id",eme="x-amz-write-offset-bytes",Z_="x-amz-website-redirect-location",we="com.amazonaws.s3";var GA=[0,we,dpe,8,0],Hf=[0,we,Tl,8,0],Pl=[0,we,Qa,8,0],Uo=[0,we,Ur,8,0],Q_=[0,we,fpe,{[Npe]:1},42],tme=[3,we,_de,0,[Ki],[[0,{[U]:Qi}]]],nme=[3,we,wde,0,[is,ur,wm,Io,Ao,ahe],[[0,1],[0,1],[0,{[Bt]:$_}],[0,{[U]:Po}],[0,{[U]:ko}],[6,{[U]:Hpe}]],3],sme=[3,we,is,0,[xN,Ode,dN,Cde],[0,4,0,0]],rme=[-3,we,Tde,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(we).registerError(rme,n_);var ome=[-3,we,Ade,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(we).registerError(ome,s_);var ime=[3,we,$de,0,[Lf],[0]],ame=[3,we,Mde,0,[epe],[[()=>Qme,{[xp]:1,[Xn]:tpe}]]],cme=[3,we,Hde,0,[_o,Hi,Fi,Vi,qi,Gi,z_],[0,0,0,0,0,0,1]],lme=[3,we,Dde,{[Xn]:Pde},[whe,is,ur,bf,_o,Hi,Fi,Vi,qi,Gi,Za,Oo,Zi,Ur,To,Ki],[0,0,0,[0,{[U]:j_}],0,0,0,0,0,0,0,[0,{[U]:No}],[0,{[U]:jf}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:Qi}]]],ume=[3,we,Nde,0,[is,ur,wm,zhe,Hi,Fi,Vi,qi,Gi,Za,Nhe,Io,Ao,Sm,I_,Mo,Tl,Do],[[0,1],[0,1],[0,{[Bt]:$_}],[()=>ame,{[MN]:1,[Xn]:pN}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[1,{[U]:Kpe}],[0,{[U]:Po}],[0,{[U]:ko}],[0,{[U]:_m}],[0,{[U]:O_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}]],3],fme=[3,we,kde,{[Xn]:dhe},[bde,xde,is,ur,wm,Oo,Mo,Do,Ur,Qa,To,Ki,Cl,Za],[[4,{[U]:Lpe}],[0,{[U]:Bpe}],[0,{[Xn]:is}],0,0,[0,{[U]:No}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Qi}],[0,{[U]:zN}],[0,{[U]:$f}]]],dme=[3,we,zde,0,[is,ur,fN,m_,v_,S_,__,A_,il,vN,bN,SN,_N,M_,Oo,Bf,L_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,P_,N_,k_,Ao,Cl,Za],[[0,1],[0,1],[0,{[U]:NN}],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[0,{[U]:T_}],[4,{[U]:il}],[0,{[U]:BN}],[0,{[U]:$N}],[0,{[U]:UN}],[0,{[U]:jN}],[128,{[B_]:H_}],[0,{[U]:No}],[0,{[U]:G_}],[0,{[U]:Z_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Po}],[0,{[U]:HN}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}],[0,{[U]:ko}],[0,{[U]:zN}],[0,{[U]:$f}]],2],hme=[3,we,Gde,{[Xn]:Kde},[jA,Oo,Ur,Qa,To],[[()=>Ume,{[Xn]:jA}],[0,{[U]:No}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}]],1],pme=[3,we,Zde,0,[is,ppe,Oo,Ur,Qa,To],[[0,1],[0,{[U]:jpe}],[0,{[U]:No}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}]],1],mme=[3,we,Wde,0,[mN,Zi,Ki],[[2,{[U]:LN}],[0,{[U]:jf}],[0,{[U]:Qi}]]],gme=[3,we,Jde,0,[is,ur,khe,Zi,Io,Ide,Ao,Sm,che,lhe],[[0,1],[0,1],[0,{[U]:qpe}],[0,{[Bt]:U_}],[0,{[U]:Po}],[2,{[U]:$pe}],[0,{[U]:ko}],[0,{[U]:_m}],[6,{[U]:Fpe}],[1,{[U]:Vpe}]],2],yme=[-3,we,the,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(yme,c_);var vme=[3,we,rhe,0,[p_,mN,Ede,bf,upe,wN,x_,_o,Hi,Fi,Vi,qi,Gi,Za,Phe,Zi,m_,v_,S_,__,Vde,A_,il,HA,L_,Oo,M_,Mo,Do,Ur,To,Bf,Ki,lpe,Khe,mpe,P_,N_,k_],[[()=>Q_,16],[2,{[U]:LN}],[0,{[U]:wpe}],[0,{[U]:j_}],[0,{[U]:Xpe}],[4,{[U]:Ahe}],[1,{[U]:E_}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[1,{[U]:Gpe}],[0,{[U]:jf}],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[0,{[U]:qde}],[0,{[U]:T_}],[4,{[U]:il}],[0,{[U]:HA}],[0,{[U]:Z_}],[0,{[U]:No}],[128,{[B_]:H_}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:G_}],[0,{[U]:Qi}],[0,{[U]:Wpe}],[1,{[U]:Zpe}],[1,{[U]:Jpe}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}]]],bme=[3,we,ohe,0,[is,ur,Sm,fhe,I_,vhe,FA,npe,spe,rpe,ope,ipe,ape,Zi,Mo,Tl,Do,Io,z_,Ao,Bde],[[0,1],[0,1],[0,{[U]:_m}],[4,{[U]:uhe}],[0,{[U]:O_}],[4,{[U]:bhe}],[0,{[U]:FA}],[0,{[Bt]:Ipe}],[0,{[Bt]:Ope}],[0,{[Bt]:Mpe}],[0,{[Bt]:Dpe}],[0,{[Bt]:kpe}],[6,{[Bt]:Ppe}],[0,{[Bt]:U_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[0,{[U]:Po}],[1,{[Bt]:kN}],[0,{[U]:ko}],[0,{[U]:Upe}]],2],Sme=[-3,we,phe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Sme,d_);var _me=[-3,we,hhe,{[Ss]:bs,[Bs]:403},[Bf,Rde],[0,0]];Mt.for(we).registerError(_me,o_);var wme=[-3,we,mhe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(wme,l_);var Eme=[-3,we,She,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Eme,u_);var xme=[3,we,Rhe,{[Xn]:Ehe},[hN,D_,bm,Lf],[[()=>Kme,0],()=>FN,0,0]],Rme=[3,we,Che,0,[Dhe,bm,Lf,dN],[[1,{[Bt]:Tpe}],[0,{[Bt]:ON}],[0,{[Bt]:DN}],[0,{[Bt]:Epe}]]],Cme=[3,we,Ohe,{[Xn]:The},[yhe,Yde,xN,Lf,gN,EN,Fde,yN,_he,bm,Lhe,CN,Ki],[2,[()=>Yme,{[xp]:1}],0,0,0,1,[()=>Zme,{[xp]:1}],0,1,0,0,0,[0,{[U]:Qi}]]],Tme=[3,we,Mhe,0,[is,gN,yN,EN,Lf,bm,nhe,CN,Io,Ao,qhe],[[0,1],[0,{[Bt]:xpe}],[0,{[Bt]:Rpe}],[1,{[Bt]:Ape}],[0,{[Bt]:DN}],[0,{[Bt]:ON}],[2,{[Bt]:Cpe}],[0,{[Bt]:zpe}],[0,{[U]:Po}],[0,{[U]:ko}],[64,{[U]:Qpe}]],1],Ame=[-3,we,$he,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(Ame,r_);var Ime=[-3,we,Uhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(Ime,i_);var Ome=[-3,we,jhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(Ome,e_);var Mme=[-3,we,Bhe,{[Ss]:bs},[],[]];Mt.for(we).registerError(Mme,a_);var Dme=[3,we,Ghe,0,[ur,wN,_o,Cl,Za,TN,Bf,D_,RN],[0,4,0,[64,{[xp]:1}],0,1,0,()=>FN,()=>$me]],kme=[-3,we,Hhe,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(we).registerError(kme,h_);var Pme=[-3,we,Vhe,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(we).registerError(Pme,t_);var FN=[3,we,D_,0,[Xde,ihe],[0,0]],Nme=[3,we,Qhe,0,[bf,_o,Hi,Fi,Vi,qi,Gi,Za,Oo,Zi,Mo,Do,Ur,Qa,To,TN,Ki],[[0,{[U]:j_}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[0,{[U]:No}],[0,{[U]:jf}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[1,{[U]:Ype}],[0,{[U]:Qi}]]],zme=[3,we,Yhe,0,[is,ur,fN,p_,m_,v_,S_,__,x_,C_,A_,Cl,Hi,Fi,Vi,qi,Gi,il,Sm,I_,vN,bN,SN,_N,_pe,M_,Oo,Bf,L_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,P_,N_,k_,Ao],[[0,1],[0,1],[0,{[U]:NN}],[()=>Q_,16],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[1,{[U]:E_}],[0,{[U]:R_}],[0,{[U]:T_}],[0,{[U]:K_}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[4,{[U]:il}],[0,{[U]:_m}],[0,{[U]:O_}],[0,{[U]:BN}],[0,{[U]:$N}],[0,{[U]:UN}],[0,{[U]:jN}],[1,{[U]:eme}],[128,{[B_]:H_}],[0,{[U]:No}],[0,{[U]:G_}],[0,{[U]:Z_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Po}],[0,{[U]:HN}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}],[0,{[U]:ko}]],2],Lme=[3,we,Whe,0,[Zi],[[0,{[U]:jf}]]],Bme=[3,we,Jhe,0,[is,ur,Sf,Zi,C_,Cl,Ao,Io],[[0,1],[0,1],[()=>Hme,{[MN]:1,[Xn]:Sf}],[0,{[Bt]:U_}],[0,{[U]:R_}],[0,{[U]:K_}],[0,{[U]:ko}],[0,{[U]:Po}]],3],$me=[3,we,RN,0,[ghe,cpe],[2,4]],Ume=[3,we,hpe,0,[UA,VA,qA,bf],[[0,{[Xn]:UA}],[()=>GA,{[Xn]:VA}],[()=>GA,{[Xn]:qA}],[4,{[Xn]:bf}]],4],jme=[3,we,IN,0,[ur,Spe],[0,0],2],Hme=[3,we,Sf,0,[AN],[[()=>Xme,0]],1],Fme=[-3,we,gpe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Fme,f_);var Vme=[3,we,vpe,0,[Oo,_o,Hi,Fi,Vi,qi,Gi,Mo,Do,Ur,To,Ki],[[0,{[U]:No}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:Qi}]]],qme=[3,we,bpe,0,[is,ur,z_,wm,p_,x_,C_,Cl,Hi,Fi,Vi,qi,Gi,Mo,Tl,Do,Io,Ao],[[0,1],[0,1],[1,{[Bt]:kN}],[0,{[Bt]:$_}],[()=>Q_,16],[1,{[U]:E_}],[0,{[U]:R_}],[0,{[U]:K_}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[0,{[U]:Po}],[0,{[U]:ko}]],4],Gme=[-3,PN,"S3ServiceException",0,[],[]];Mt.for(PN).registerError(Gme,Un);var Kme=[1,we,hN,0,[()=>sme,{[Xn]:is}]],Zme=[1,we,Ude,0,()=>ime],Qme=[1,we,jde,0,()=>cme],Yme=[1,we,Fhe,0,[()=>Dme,0]],Xme=[1,we,AN,0,[()=>jme,{[Xn]:IN}]],J0e=[9,we,Sde,{[wr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>nme,()=>tme],eve=[9,we,pN,{[wr]:["POST","/{Key+}",200]},()=>ume,()=>lme],tve=[9,we,Lde,{[wr]:["POST","/{Key+}?uploads",200]},()=>dme,()=>fme],Wme=[9,we,Qde,{[wr]:["GET","/?session",200]},()=>pme,()=>hme],nve=[9,we,ehe,{[wr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>gme,()=>mme],sve=[9,we,she,{[Em]:"-",[wr]:["GET","/{Key+}?x-id=GetObject",200]},()=>bme,()=>vme],Jme=[9,we,xhe,{[wr]:["GET","/?x-id=ListBuckets",200]},()=>Rme,()=>xme],ege=[9,we,Ihe,{[wr]:["GET","/?list-type=2",200]},()=>Tme,()=>Cme],rve=[9,we,Zhe,{[Em]:"-",[wr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>zme,()=>Nme],ove=[9,we,Xhe,{[Em]:"-",[wr]:["PUT","/{Key+}?tagging",200]},()=>Bme,()=>Lme],ive=[9,we,ype,{[Em]:"-",[wr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>qme,()=>Vme];class tge extends Br.classBuilder().ep({...JS,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Wme).build(){}const nge="3.975.0",sge={version:nge};function KA(e){return typeof e=="string"?e.length===0:e.byteLength===0}var VN={name:"SHA-1"},ZA={name:"HMAC",hash:VN},rge=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),oge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",QA(t),ZA,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!KA(t)){var n=QA(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(ZA,n,t.toHash).then(function(r){return new Uint8Array(r)})}):KA(this.toHash)?Promise.resolve(rge):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(VN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function QA(e){return typeof e=="string"?lD(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var ige=(function(){function e(t){if(hD(Ai()))this.hash=new oge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(Na(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class ef{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&YA(n),new ef(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&YA(t),parseInt(ps(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function YA(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class age{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(ef.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!gge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(sM(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Age=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class Ige{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Cge({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=Oge(t)?Tge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Age(r):r}}const Oge=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Mge=e=>new Ige(e);async function Dge(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},yi=64,Pge=16,Nge=[1732584193,4023233417,2562383102,271733878];class zge{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(Lge(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=Bge(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===yi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%yi>=yi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(yi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(Pge));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Kn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Kn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Kn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Kn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Kn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Kn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Kn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Kn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Kn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Kn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Kn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Kn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Kn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Kn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Kn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Kn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Zn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Zn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Zn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Zn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Zn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Zn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Zn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Zn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Zn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Zn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Zn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Zn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Zn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Zn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Zn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Zn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Qn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Qn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Qn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Qn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Qn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Qn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Qn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Qn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Qn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Qn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Qn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Qn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Qn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Qn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Qn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Qn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Yn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Yn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Yn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Yn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Yn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Yn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Yn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Yn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Yn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Yn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Yn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Yn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Yn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Yn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Yn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Yn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(Nge),this.buffer=new DataView(new ArrayBuffer(yi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function xm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Kn(e,t,n,r,i,c,l){return xm(t&n|~t&r,e,t,i,c,l)}function Zn(e,t,n,r,i,c,l){return xm(t&r|n&~r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return xm(t^n^r,e,t,i,c,l)}function Yn(e,t,n,r,i,c,l){return xm(n^(t|~r),e,t,i,c,l)}function Lge(e){return typeof e=="string"?e.length===0:e.byteLength===0}function Bge(e){return typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const $ge=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Pa,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??cN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??pG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??gde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Nb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new qK}],logger:e?.logger??new zb,protocol:e?.protocol??LZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??rM,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??qP,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??mf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??Ua}),Uge=e=>{const t=yD(e),n=()=>t().then(UM),r=$ge(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??BM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??mD({serviceId:r.serviceId,clientVersion:sge.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Mge,maxAttempts:e?.maxAttempts??gf,md5:e?.md5??zge,region:e?.region??gD("Region is missing"),requestHandler:Qp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||sD),sha1:e?.sha1??ige,sha256:e?.sha256??pD,streamCollector:e?.streamCollector??Cb,streamHasher:e?.streamHasher??kge,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(ZM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(QM))}},jge=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},Hge=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Fge=(e,t)=>{const n=Object.assign(wD(e),jM(e),KO(e),jge(e));return t.forEach(r=>r.configure(n)),Object.assign(e,ED(n),HM(n),ZO(n),Hge(n))};class Vge extends $M{config;constructor(...[t]){const n=Uge(t||{});super(n),this.initConfig=n;const r=vde(n),i=mM(r),c=bfe(i),l=aD(c),f=XM(l),d=f,h=nD(d),y=Yfe(h),g=yde(y),v=Bfe(g,{session:[()=>this,tge]}),b=Fge(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(iM(this.config)),this.middlewareStack.use(KM(this.config)),this.middlewareStack.use(cD(this.config)),this.middlewareStack.use(WM(this.config)),this.middlewareStack.use(QO(this.config)),this.middlewareStack.use(YO(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(WO(this.config,{httpAuthSchemeParametersProvider:hde,identityProviderConfigProvider:async _=>new hM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(eM(this.config)),this.middlewareStack.use(Qfe(this.config)),this.middlewareStack.use(pfe(this.config)),this.middlewareStack.use(xfe(this.config)),this.middlewareStack.use(Dfe(this.config)),this.middlewareStack.use(Lfe(this.config))}destroy(){super.destroy()}}class qge extends Br.classBuilder().ep(JS).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(Jme).build(){}class Gge extends Br.classBuilder().ep({...JS,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(ege).build(){}let Uh=null,Hu=null;function jr(){if(!Uh){const e=Zp();if(!e)throw new Error("AWS credentials not configured");Uh=new fY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return Uh}function GN(){if(!Hu){const e=Zp();if(!e)throw new Error("AWS credentials not configured");Hu=new Vge({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Hu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Hu}function Kge(){Uh=null,Hu=null}function KN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:Zge},e[0]=t):t=e[0];const n=PB(t),r=Op(),i=aI();let c;e[1]!==r||e[2]!==i?(c=function(){Yq(),Kge(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=$.jsx(g0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(C$,{className:"size-4"}),y=$.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=$.jsxs(m0,{children:[f,$.jsx(Sh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/",children:$.jsxs(ga,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=$.jsx(g0,{children:"EC2"}),e[9]=v):v=e[9];let b;e[10]!==n?(b=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=b):b=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(NR,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-instances",children:$.jsxs(ga,{isActive:b,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=b,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=$.jsx(A$,{className:"size-4"}),O=$.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-images",children:$.jsxs(ga,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=$.jsx(O$,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=B):(j=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-key-pairs",children:$.jsxs(ga,{isActive:N,tooltip:"Key Pairs",children:[j,B]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsx(x$,{className:"size-4"}),le=$.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=$.jsx(ma,{children:$.jsx(Or,{to:"/ec2/describe-volumes",children:$.jsxs(ga,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=$.jsxs(m0,{children:[v,$.jsxs(Sh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=$.jsx(g0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=$.jsx(NR,{className:"size-4"}),W=$.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let H;e[44]!==fe?(H=$.jsxs(m0,{children:[ye,$.jsx(Sh,{children:$.jsx(ma,{children:$.jsx(Or,{to:"/s3/ls",children:$.jsxs(ga,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=H):H=e[45];let ve;e[46]!==Q||e[47]!==H||e[48]!==g?(ve=$.jsxs(yH,{children:[g,Q,H]}),e[46]=Q,e[47]=H,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=$.jsx(D$,{className:"size-4"}),P=$.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=$.jsx(gH,{children:$.jsx(Sh,{children:$.jsx(ma,{children:$.jsxs(ga,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=$.jsx(mH,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=$.jsxs(hH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function Zge(e){return e.pathname}function Qge(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Wn(),c=aI();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(KN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(gO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=$.jsx("div",{className:"flex justify-center",children:$.jsx(w$,{className:"size-12 text-destructive"})}),g=$.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const v=n.message||"An unexpected error occurred";let b;t[8]!==v?(b=$.jsx("p",{className:"text-muted-foreground",children:v}),t[8]=v,t[9]=b):b=t[9];let _;t[10]!==f?(_=$.jsx(el,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=$.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==b?(C=$.jsxs($.Fragment,{children:[d,$.jsxs("main",{className:"flex flex-1 flex-col",children:[h,$.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:$.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,b,R]})})]})]}),t[15]=R,t[16]=b,t[17]=C):C=t[17],C}const Y_=SB()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx($B,{}),$.jsx(KN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(gO,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(MI,{})})]})]}),errorComponent:Qge,notFoundComponent:SH}),Yge=()=>sn(()=>import("./login.js"),__vite__mapDeps([0,1])),Xge=Xt("/login")({beforeLoad:()=>{if(Zp())throw Yv({to:"/"})},component:yn(Yge,"component")}),Wge=()=>sn(()=>import("./route.js"),[]),Jge=Xt("/_auth")({beforeLoad:()=>{if(!Zp())throw Yv({to:"/login"})},component:yn(Wge,"component")}),eye={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new jP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},tye=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new jP({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),nye={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new ufe({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},ZN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new UP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},QN=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new UP({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),YN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new HP({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},sye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new HP({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),rye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new ffe({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},oye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new FP({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},XN=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new FP({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),iye=()=>sn(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),aye=Xt("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(rye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:yn(iye,"component")}),cye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new qge({});return await GN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},WN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new Gge({Bucket:e,Prefix:t,Delimiter:"/"});return await GN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),lye=()=>sn(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),uye=Xt("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(cye)},component:yn(lye,"component")}),fye=()=>sn(()=>import("./create-volume.js"),__vite__mapDeps([7,1,8,9,4,10,11])),dye=Xt("/_auth/ec2/(volumes)/create-volume")({head:()=>({meta:[{title:"Create Volume | EC2 | Mulga"}]}),component:yn(fye,"component")}),cve=dl({imageId:go("Please select an Image"),instanceType:go("Please select an instance type"),keyName:go("Please select a key pair"),count:Av("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),lve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),uve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:go().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),fve=dl({size:VO().int("Size must be a whole number").min(1,"Size must be at least 1 GiB").max(16384,"Size must be at most 16384 GiB"),availabilityZone:go().min(1,"Availability zone is required")}),dve=dl({size:VO().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),hye=()=>sn(()=>import("./import-key-pair.js"),__vite__mapDeps([12,1,8,9,4,13,10,11])),pye=Xt("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:yn(hye,"component")}),mye=()=>sn(()=>import("./create-key-pair.js"),__vite__mapDeps([14,1,8,9,4,10,11,15,13,16,17])),gye=Xt("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:yn(mye,"component")}),yye=()=>sn(()=>import("./run-instances.js"),__vite__mapDeps([18,1,3,8,9,4,16,10,11])),vye=Xt("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ZN),e.queryClient.ensureQueryData(YN),e.queryClient.ensureQueryData(nye)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:yn(yye,"component")}),bye=()=>sn(()=>import("./route2.js"),[]),Sye=Xt("/_auth/s3/ls/$bucket")({component:yn(bye,"component")}),_ye=()=>sn(()=>import("./index5.js"),__vite__mapDeps([19,3,8,4,20,15,17,21,11])),wye=Xt("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(WN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:yn(_ye,"component")}),Eye=()=>sn(()=>import("./index6.js"),__vite__mapDeps([22,3,6,4,23])),xye=Xt("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(oye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:yn(Eye,"component")}),Rye=()=>sn(()=>import("./index7.js"),__vite__mapDeps([24,3,6,4])),Cye=Xt("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(YN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:yn(Rye,"component")}),Tye=()=>sn(()=>import("./index8.js"),__vite__mapDeps([25,3,6,4,26])),Aye=Xt("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(eye)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:yn(Tye,"component")}),Iye=()=>sn(()=>import("./index9.js"),__vite__mapDeps([27,3,6,4,23])),Oye=Xt("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ZN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:yn(Iye,"component")}),Mye=()=>sn(()=>import("./_.js"),__vite__mapDeps([28,3,8,20,15,17,21,11])),Dye=Xt("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=QU(t._splat||"");await e.queryClient.ensureQueryData(WN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${YU(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:yn(Mye,"component")}),kye=()=>sn(()=>import("./_id.js"),__vite__mapDeps([29,1,3,8,9,4,10,11])),Pye=Xt("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(XN(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:yn(kye,"component")}),Nye=()=>sn(()=>import("./_id2.js"),__vite__mapDeps([30,3,8,31,4,23])),zye=Xt("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(XN(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:yn(Nye,"component")}),Lye=()=>sn(()=>import("./_id3.js"),__vite__mapDeps([32,3,8,31,4,15,10,11,21])),Bye=Xt("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(sye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:yn(Lye,"component")}),$ye=()=>sn(()=>import("./_id4.js"),__vite__mapDeps([33,3,8,31,4,26,34,10,11,21])),Uye=Xt("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(tye(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(QN(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:yn($ye,"component")}),jye=()=>sn(()=>import("./_id5.js"),__vite__mapDeps([35,3,8,4,23,34,31])),Hye=Xt("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(QN(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:yn(jye,"component")}),Fye=Xge.update({id:"/login",path:"/login",getParentRoute:()=>Y_}),jn=Jge.update({id:"/_auth",getParentRoute:()=>Y_}),Vye=aye.update({id:"/",path:"/",getParentRoute:()=>jn}),qye=uye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>jn}),Gye=dye.update({id:"/ec2/(volumes)/create-volume",path:"/ec2/create-volume",getParentRoute:()=>jn}),Kye=pye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>jn}),Zye=gye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>jn}),Qye=vye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>jn}),X_=Sye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>jn}),Yye=wye.update({id:"/",path:"/",getParentRoute:()=>X_}),Xye=xye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>jn}),Wye=Cye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>jn}),Jye=Aye.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>jn}),e0e=Oye.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>jn}),t0e=Dye.update({id:"/$",path:"/$",getParentRoute:()=>X_}),n0e=Pye.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>jn}),s0e=zye.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>jn}),r0e=Bye.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>jn}),o0e=Uye.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>jn}),i0e=Hye.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>jn}),a0e={AuthS3LsBucketSplatRoute:t0e,AuthS3LsBucketIndexRoute:Yye},c0e=X_._addFileChildren(a0e),l0e={AuthIndexRoute:Vye,AuthS3LsBucketRouteRoute:c0e,AuthEc2instancesRunInstancesRoute:Qye,AuthEc2keyCreateKeyPairRoute:Zye,AuthEc2keyImportKeyPairRoute:Kye,AuthEc2volumesCreateVolumeRoute:Gye,AuthS3LsIndexRoute:qye,AuthEc2imagesDescribeImagesIdRoute:i0e,AuthEc2instancesDescribeInstancesIdRoute:o0e,AuthEc2keyDescribeKeyPairsIdRoute:r0e,AuthEc2volumesDescribeVolumesIdRoute:s0e,AuthEc2volumesModifyVolumeIdRoute:n0e,AuthEc2imagesDescribeImagesIndexRoute:e0e,AuthEc2instancesDescribeInstancesIndexRoute:Jye,AuthEc2keyDescribeKeyPairsIndexRoute:Wye,AuthEc2volumesDescribeVolumesIndexRoute:Xye},u0e=jn._addFileChildren(l0e),f0e={AuthRouteRoute:u0e,LoginRoute:Fye},d0e=Y_._addFileChildren(f0e)._addFileTypes(),JN=new UL,h0e=OB({routeTree:d0e,context:{queryClient:JN},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),sv=document.getElementById("app");sv&&!sv.innerHTML&&qB.createRoot(sv).render($.jsx(I.StrictMode,{children:$.jsx(QB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx(HL,{client:JN,children:$.jsx(uH,{children:$.jsx(kB,{router:h0e})})})})}));export{Rj as $,A0e as A,el as B,Dr as C,Lp as D,Ds as E,xf as F,mt as G,FR as H,Ze as I,c0 as J,Si as K,En as L,bt as M,M0e as N,MI as O,xn as P,os as Q,R2 as R,u5 as S,f5 as T,S0e as U,wo as V,ot as W,Ij as X,p9 as Y,zr as Z,Ku as _,tn as a,vr as a$,x2 as a0,vb as a1,Pj as a2,V2 as a3,J2 as a4,Mp as a5,Yh as a6,N0e as a7,O2 as a8,fb as a9,wye as aA,x0e as aB,WN as aC,oye as aD,Or as aE,XU as aF,eye as aG,Dye as aH,QU as aI,R0e as aJ,YU as aK,$C as aL,Mi as aM,$v as aN,X0e as aO,VP as aP,uZ as aQ,vp as aR,Na as aS,fD as aT,dD as aU,$Q as aV,VQ as aW,UQ as aX,W0e as aY,df as aZ,Mn as a_,VI as aa,cr as ab,La as ac,D0e as ad,P0e as ae,Q5 as af,f8 as ag,_0e as ah,d9 as ai,V9 as aj,r9 as ak,s9 as al,Ef as am,mn as an,t5 as ao,ki as ap,g8 as aq,k0e as ar,hb as as,hO as at,e9 as au,O0e as av,ZN as aw,YN as ax,nye as ay,cve as az,Qq as b,jr as b$,Y0e as b0,zb as b1,ka as b2,$0e as b3,Br as b4,JS as b5,xo as b6,qS as b7,J0e as b8,eve as b9,w0e as bA,Bye as bB,sye as bC,Ba as bD,y9 as bE,m9 as bF,T2 as bG,J5 as bH,S9 as bI,W5 as bJ,n9 as bK,o9 as bL,X5 as bM,Uye as bN,tye as bO,QN as bP,hl as bQ,U0e as bR,j0e as bS,H0e as bT,F0e as bU,V0e as bV,q0e as bW,G0e as bX,K0e as bY,Z0e as bZ,Q0e as b_,tve as ba,nve as bb,sve as bc,rve as bd,ove as be,ive as bf,m0e as bg,p0e as bh,eD as bi,sQ as bj,pp as bk,aI as bl,GN as bm,E0e as bn,Pye as bo,dve as bp,XN as bq,LI as br,ab as bs,_t as bt,Xc as bu,z0e as bv,L0e as bw,xO as bx,jI as by,zye as bz,Ct as c,Rp as c0,g0e as c1,tf as c2,LL as c3,rs as c4,br as c5,y0e as c6,Hye as c7,BI as c8,AL as c9,SL as ca,ov as cb,Cp as cc,vL as cd,bL as ce,rv as cf,nI as cg,PL as ch,EL as ci,Ua as cj,So as ck,cye as d,rye as e,fve as f,_r as g,lve as h,uve as i,$ as j,c5 as k,I0e as l,C0e as m,T0e as n,hh as o,M2 as p,Oi as q,I as r,B0e as s,of as t,Op as u,d5 as v,qt as w,op as x,d2 as y,bv as z}; +${ms(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Aa(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=vZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Pv extends SZ{headerFormatter=new dZ;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:c,unhoistableHeaders:l,signableHeaders:f,hoistableHeaders:d,signingRegion:h,signingService:y}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const v=h??await this.regionProvider(),{longDate:b,shortDate:_}=this.formatDate(r);if(i>lZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=T0(_,v,y??this.service),R=gZ(sT(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[DM]=g.sessionToken),R.query[QK]=R0,R.query[YK]=`${g.accessKeyId}/${x}`,R.query[OM]=b,R.query[WK]=i.toString(10);const C=eT(R,c,f);return R.query[XK]=this.getCanonicalHeaderList(C),R.query[MM]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await A0(t,this.sha256))),R}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:c,signingService:l}){const f=c??await this.regionProvider(),{shortDate:d,longDate:h}=this.formatDate(r),y=T0(d,f,l??this.service),g=await A0({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=ms(await v.digest()),_=[iZ,h,y,i,b,g].join(` +`);return this.signString(_,{signingDate:r,signingRegion:f,signingService:l})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:t.priorSignature}).then(l=>({message:t.message,signature:l}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:i}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const l=r??await this.regionProvider(),{shortDate:f}=this.formatDate(n),d=new this.sha256(await this.getSigningKey(c,l,f,i));return d.update(df(t)),ms(await d.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:c,signingService:l}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const d=c??await this.regionProvider(),h=sT(t),{longDate:y,shortDate:g}=this.formatDate(n),v=T0(g,d,l??this.service);h.headers[PM]=y,f.sessionToken&&(h.headers[nZ]=f.sessionToken);const b=await A0(h,this.sha256);!mZ(kv,h.headers)&&this.applyChecksum&&(h.headers[kv]=b);const _=eT(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[kM]=`${R0} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,R0),l=new this.sha256(await r);return l.update(df(c)),ms(await l.digest())}getSigningKey(t,n,r,i){return uZ(this.sha256,t,r,n,i||this.service)}}const LM=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(h){h&&h!==t&&h!==r&&(n=!0),t=h;const y=_Z(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=wZ(e,y);if(n&&!g.attributed){const v=typeof t=="object"&&t!==null;r=async b=>{const x=await g(b);return v&&(!x.$source||Object.keys(x.$source).length===0)?VK(x,"CREDENTIALS_CODE","e"):x},r.memoized=g.memoized,r.configBound=g.configBound,r.attributed=!0}else r=g},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:c=e.systemClockOffset||0,sha256:l}=e;let f;return e.signer?f=Zc(e.signer):e.regionInfoProvider?f=()=>Zc(e.region)().then(async h=>[await e.regionInfoProvider(h,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},h]).then(([h,y])=>{const{signingRegion:g,signingService:v}=h;e.signingRegion=e.signingRegion||g||y,e.signingName=e.signingName||v||e.serviceId;const b={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},_=e.signerConstructor||Pv;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Zc(e.region)(),properties:{}},h);const y=h.signingRegion,g=h.signingName;e.signingRegion=e.signingRegion||y,e.signingName=e.signingName||g||e.serviceId;const v={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},b=e.signerConstructor||Pv;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function _Z(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=gK(t,mK,pM):n?r=Zc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function wZ(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const rT=typeof TextEncoder=="function"?new TextEncoder:null,BM=e=>{if(typeof e=="string"){if(rT)return rT.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},va=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},mi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,yp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>oT[b.step]-oT[v.step]||iT[b.priority||"normal"]-iT[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=va(_.name,_.aliases);if(x.includes(g)){v=!0;for(const R of x)r.delete(R);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},l=g=>{let v=!1;const b=_=>{if(_.middleware===g){v=!0;for(const x of va(_.name,_.aliases))r.delete(x);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},f=g=>(e.forEach(v=>{g.add(v.middleware,{...v})}),t.forEach(v=>{g.addRelativeTo(v.middleware,{...v})}),g.identifyOnResolve?.(y.identifyOnResolve()),g),d=g=>{const v=[];return g.before.forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v.push(g),g.after.reverse().forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v},h=(g=!1)=>{const v=[],b=[],_={};return e.forEach(R=>{const C={...R,before:[],after:[]};for(const A of va(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of va(C.name,C.aliases))_[A]=C;b.push(C)}),b.forEach(R=>{if(R.toMiddleware){const C=_[R.toMiddleware];if(C===void 0){if(g)return;throw new Error(`${R.toMiddleware} is not found when adding ${mi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&C.after.push(R),R.relation==="before"&&C.before.push(R)}}),i(v).map(d).reduce((R,C)=>(R.push(...C),R),[])},y={add:(g,v={})=>{const{name:b,override:_,aliases:x}=v,R={step:"initialize",priority:"normal",middleware:g,...v},C=va(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${mi(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${mi(b,x)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(O,1)}}for(const A of C)r.add(A)}e.push(R)},addRelativeTo:(g,v)=>{const{name:b,override:_,aliases:x}=v,R={middleware:g,...v},C=va(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${mi(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${mi(b,x)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(O,1)}}for(const A of C)r.add(A)}t.push(R)},clone:()=>f(yp()),use:g=>{g.applyToStack(y)},remove:g=>typeof g=="string"?c(g):l(g),removeByTag:g=>{let v=!1;const b=_=>{const{tags:x,name:R,aliases:C}=_;if(x&&x.includes(g)){const A=va(R,C);for(const O of A)r.delete(O);return v=!0,!1}return!0};return e=e.filter(b),t=t.filter(b),v},concat:g=>{const v=f(yp());return v.use(g),v.identifyOnResolve(n||v.identifyOnResolve()||(g.identifyOnResolve?.()??!1)),v},applyToStack:f,identify:()=>h(!0).map(g=>{const v=g.step??g.relation+" "+g.toMiddleware;return mi(g.name,g.aliases)+" - "+v}),identifyOnResolve(g){return typeof g=="boolean"&&(n=g),n},resolve:(g,v)=>{for(const b of h().map(_=>_.middleware).reverse())g=b(g,v);return n&&console.log(y.identify()),g}};return y},oT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},iT={high:3,normal:2,low:1};class $M{config;middlewareStack=yp();initConfig;handlers;constructor(t){this.config=t;const{protocol:n,protocolSettings:r}=t;r&&typeof n=="function"&&(t.protocol=new n(r))}send(t,n,r){const i=typeof n!="function"?n:void 0,c=typeof n=="function"?n:r,l=i===void 0&&this.config.cacheMiddleware===!0;let f;if(l){this.handlers||(this.handlers=new WeakMap);const d=this.handlers;d.has(t.constructor)?f=d.get(t.constructor):(f=t.resolveMiddleware(this.middlewareStack,this.config,i),d.set(t.constructor,f))}else delete this.handlers,f=t.resolveMiddleware(this.middlewareStack,this.config,i);if(c)f(t).then(d=>c(null,d.output),d=>c(d)).catch(()=>{});else return f(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const I0="***SensitiveInformation***";function Nv(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return I0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return I0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return I0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=Nv(l,r[c]));return i}return t}class Br{middlewareStack=yp();schema;static classBuilder(){return new EZ}resolveMiddlewareWithContext(t,n,r,{middlewareFn:i,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,smithyContext:h,additionalContext:y,CommandCtor:g}){for(const R of i.bind(this)(g,t,n,r))this.middlewareStack.use(R);const v=t.concat(this.middlewareStack),{logger:b}=n,_={logger:b,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,[Ov]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return v.resolve(R=>x.handle(R.request,r||{}),_)}}class EZ{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends Br{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,c){const l=t._operationSchema,f=l?.[4]??l?.input,d=l?.[5]??l?.output;return this.resolveMiddlewareWithContext(r,i,c,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(l?Nv.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?Nv.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Ea extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return Ea.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===Ea?Ea.isInstance(t):Ea.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const aT=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,i])=>{(e[r]==null||e[r]==="")&&(e[r]=i)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},UM=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},xZ=e=>{const t=[];for(const n in hp){const r=hp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},RZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},CZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),TZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},jM=e=>Object.assign(xZ(e),CZ(e)),HM=e=>Object.assign(RZ(e),TZ(e)),FM=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=FM(e[n]));return e};class zb{trace(){}debug(){}info(){}warn(){}error(){}}class VM{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,n){const r=n.getMemberSchemas(),i=Object.values(r).find(c=>!!c.getMergedTraits().httpPayload);if(i){const c=i.getMergedTraits().mediaType;return c||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!n.isUnitSchema()&&Object.values(r).find(l=>{const{httpQuery:f,httpQueryParams:d,httpHeader:h,httpLabel:y,httpPrefixHeaders:g}=l.getMergedTraits();return!f&&!d&&!h&&!y&&g===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,n,r,i,c,l){let f=n,d=t;t.includes("#")&&([f,d]=t.split("#"));const h={$metadata:c,$fault:r.statusCode<500?"client":"server"},y=Mt.for(f);try{return{errorSchema:l?.(y,d)??y.getSchema(t),errorMetadata:h}}catch{i.message=i.message??i.Message??"UnknownError";const v=Mt.for("smithy.ts.sdk.synthetic."+f),b=v.getBaseException();if(b){const _=v.getErrorCtor(b)??Error;throw this.decorateServiceException(Object.assign(new _({name:d}),h),i)}throw this.decorateServiceException(Object.assign(new Error(d),h),i)}}decorateServiceException(t,n={}){if(this.queryCompat){const r=t.Message??n.Message,i=aT(t,n);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const c=i.$metadata.requestId;return c&&(i.RequestId=c),i}return aT(t,n)}setQueryCompatError(t,n){const r=n.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[i,c]=r.split(";"),l=Object.entries(t),f={Code:i,Type:c};Object.assign(t,f);for(const[d,h]of l)f[d==="message"?"Message":d]=h;delete f.__type,t.Error=f}}queryCompatOutput(t,n){t.Error&&(n.Error=t.Error),t.Type&&(n.Type=t.Type),t.Code&&(n.Code=t.Code)}findQueryCompatibleError(t,n){try{return t.getSchema(n)}catch{return t.find(i=>wt.of(i).getMergedTraits().awsQueryError?.[0]===n)}}}class tm{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*qM(e,t){if(e.isUnitSchema())return;const n=e.getSchema();for(let r=0;rr!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,n=this.from[t];this.to.$unknown=[t,n]}}}function IZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function OZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class zv{value;constructor(t){this.value=t}toString(){return OZ(""+this.value)}}class ss{name;children;attributes={};static of(t,n,r){const i=new ss(t);return n!==void 0&&i.addChildNode(new zv(n)),r!==void 0&&i.withName(r),i}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const i=ss.of(n,t[n]).withName(r);this.c(i)}}l(t,n,r,i){t[n]!=null&&i().map(l=>{l.withName(r),this.c(l)})}lc(t,n,r,i){if(t[n]!=null){const c=i(),l=new ss(r);c.map(f=>{l.c(f)}),this.c(l)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const i of Object.keys(r)){const c=r[i];c!=null&&(n+=` ${i}="${IZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let O0;function MZ(e){O0||(O0=new DOMParser);const t=O0.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const c={},l=Array.from(i.attributes);for(const d of l)c[`${d.name}`]=d.value;const f=Array.from(i.childNodes);for(const d of f){const h=n(d);if(h!=null){const y=d.nodeName;if(f.length===1&&l.length===0&&y==="#text")return h;c[y]?Array.isArray(c[y])?c[y].push(h):c[y]=[c[y],h]:c[y]=h}else if(f.length===1&&l.length===0)return i.textContent}return c}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}class GM extends tm{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new dM(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,n,r){const i=wt.of(t),c=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(c).find(h=>!!h.getMemberTraits().eventPayload)){const h={},y=Object.keys(c)[0];return c[y].isBlobSchema()?h[y]=n:h[y]=this.read(c[y],n),h}const f=(this.serdeContext?.utf8Encoder??ja)(n),d=this.parseXml(f);return this.readSchema(t,r?d[r]:d)}readSchema(t,n){const r=wt.of(t);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(n))return this.readSchema(r,[n]);if(n==null)return n;if(typeof n=="object"){const c=!!i.sparse,l=!!i.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),h=[],y=d.getMergedTraits().xmlName??"member",g=l?n:(n[0]??n)[y],v=Array.isArray(g)?g:[g];for(const b of v)(b!=null||c)&&h.push(this.readSchema(d,b));return h}const f={};if(r.isMapSchema()){const d=r.getKeySchema(),h=r.getValueSchema();let y;l?y=Array.isArray(n)?n:[n]:y=Array.isArray(n.entry)?n.entry:[n.entry];const g=d.getMergedTraits().xmlName??"key",v=h.getMergedTraits().xmlName??"value";for(const b of y){const _=b[g],x=b[v];(x!=null||c)&&(f[_]=this.readSchema(h,x))}return f}if(r.isStructSchema()){const d=r.isUnionSchema();let h;d&&(h=new AZ(n,f));for(const[y,g]of r.structIterator()){const v=g.getMergedTraits(),b=v.httpPayload?v.xmlName??g.getName():g.getMemberTraits().xmlName??y;d&&h.mark(b),n[b]!=null&&(f[y]=this.readSchema(g,n[b]))}return d&&h.writeUnknown(),f}if(r.isDocumentSchema())return n;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,n)}parseXml(t){if(t.length){let n;try{n=MZ(t)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:t}),l}const r="#text",i=Object.keys(n)[0],c=n[i];return c[r]&&(c[i]=c[r],delete c[r]),FM(c)}return{}}}class DZ extends tm{settings;buffer;constructor(t){super(),this.settings=t}write(t,n,r=""){this.buffer===void 0&&(this.buffer="");const i=wt.of(t);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof n=="string"||n instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Mi)(n)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())n!=null?(this.writeKey(r),this.writeValue(String(n))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(Yp()));else if(i.isBigIntegerSchema())n!=null&&(this.writeKey(r),this.writeValue(String(n)));else if(i.isBigDecimalSchema())n!=null&&(this.writeKey(r),this.writeValue(n instanceof Cf?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Wp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(mp(n));break;case 7:this.writeValue(String(n.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(n)?this.write(79,n,r):n instanceof Date?this.write(4,n,r):n instanceof Uint8Array?this.write(21,n,r):n&&typeof n=="object"?this.write(143,n,r):(this.writeKey(r),this.writeValue(String(n)));else if(i.isListSchema()){if(Array.isArray(n))if(n.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const c=i.getValueSchema(),l=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let f=1;for(const d of n){if(d==null)continue;const h=this.getKey("member",c.getMergedTraits().xmlName),y=l?`${r}${f}`:`${r}${h}.${f}`;this.write(c,d,y),++f}}}else if(i.isMapSchema()){if(n&&typeof n=="object"){const c=i.getKeySchema(),l=i.getValueSchema(),f=i.getMergedTraits().xmlFlattened;let d=1;for(const[h,y]of Object.entries(n)){if(y==null)continue;const g=this.getKey("key",c.getMergedTraits().xmlName),v=f?`${r}${d}.${g}`:`${r}entry.${d}.${g}`,b=this.getKey("value",l.getMergedTraits().xmlName),_=f?`${r}${d}.${b}`:`${r}entry.${d}.${b}`;this.write(c,h,v),this.write(l,y,_),++d}}}else if(i.isStructSchema()){if(n&&typeof n=="object"){let c=!1;for(const[l,f]of qM(i,n)){if(n[l]==null&&!f.isIdempotencyToken())continue;const d=this.getKey(l,f.getMergedTraits().xmlName),h=`${r}${d}`;this.write(f,n[l],h),c=!0}if(!c&&i.isUnionSchema()){const{$unknown:l}=n;if(Array.isArray(l)){const[f,d]=l,h=`${r}${f}`;this.write(15,d,h)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,n){const r=n??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${pp(t)}=`}writeValue(t){this.buffer+=pp(t)}}class kZ extends cK{options;serializer;deserializer;mixin=new VM;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new DZ(n),this.deserializer=new GM(n)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(Lh(t.input)==="unit"||!i.body)&&(i.body="");const c=t.name.split("#")[1]??t.name;return i.body=`Action=${c}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const g=await xi(r.body,n);g.byteLength>0&&Object.assign(l,await i.read(15,g)),await this.handleError(t,n,r,l,this.deserializeMetadata(r))}for(const g in r.headers){const v=r.headers[g];delete r.headers[g],r.headers[g.toLowerCase()]=v}const f=t.name.split("#")[1]??t.name,d=c.isStructSchema()&&this.useNestedResult()?f+"Result":void 0,h=await xi(r.body,n);return h.byteLength>0&&Object.assign(l,await i.read(c,h,d)),{$metadata:this.deserializeMetadata(r),...l}}useNestedResult(){return!0}async handleError(t,n,r,i,c){const l=this.loadQueryErrorCode(r,i)??"Unknown",f=this.loadQueryError(i),d=this.loadQueryErrorMessage(i);f.message=d,f.Error={Type:f.Type,Code:f.Code,Message:d};const{errorSchema:h,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,f,c,this.mixin.findQueryCompatibleError),g=wt.of(h),v=Mt.for(h[1]).getErrorCtor(h)??Error,b=new v(d),_={Type:f.Error.Type,Code:f.Error.Code,Error:f.Error};for(const[x,R]of g.structIterator()){const C=R.getMergedTraits().xmlName??x,A=f[C]??i[C];_[x]=this.deserializer.readSchema(R,A)}throw this.mixin.decorateServiceException(Object.assign(b,y,{$fault:g.getMergedTraits().error,message:d},_),i)}loadQueryErrorCode(t,n){const r=(n.Errors?.[0]?.Error??n.Errors?.Error??n.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const n=this.loadQueryError(t);return n?.message??n?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class PZ extends kZ{options;constructor(t){super(t),this.options=t;const n={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,n)}useNestedResult(){return!1}}const NZ=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class zZ extends tm{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);if(r.isStringSchema()&&typeof n=="string")this.stringBuffer=n;else if(r.isBlobSchema())this.byteBuffer="byteLength"in n?n:(this.serdeContext?.base64Decoder??Na)(n);else{this.buffer=this.writeStruct(r,n,void 0);const i=r.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(r.getName())}}flush(){if(this.byteBuffer!==void 0){const n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){const n=this.stringBuffer;return delete this.stringBuffer,n}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,n,r){const i=t.getMergedTraits(),c=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!c||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const l=ss.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of qM(t,n)){const v=n[y];if(v!=null||g.isIdempotencyToken()){if(g.getMergedTraits().xmlAttribute){l.addAttribute(g.getMergedTraits().xmlName??y,this.writeSimple(g,v));continue}if(g.isListSchema())this.writeList(g,v,l,d);else if(g.isMapSchema())this.writeMap(g,v,l,d);else if(g.isStructSchema())l.addChildNode(this.writeStruct(g,v,d));else{const b=ss.of(g.getMergedTraits().xmlName??g.getMemberName());this.writeSimpleInto(g,v,b,d),l.addChildNode(b)}}}const{$unknown:h}=n;if(h&&t.isUnionSchema()&&Array.isArray(h)&&Object.keys(n).length===1){const[y,g]=h,v=ss.of(y);if(typeof g!="string")if(n instanceof ss||n instanceof zv)l.addChildNode(n);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,g,v,d),l.addChildNode(v)}return d&&l.addAttribute(f,d),l}writeList(t,n,r,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const c=t.getMergedTraits(),l=t.getValueSchema(),f=l.getMergedTraits(),d=!!f.sparse,h=!!c.xmlFlattened,[y,g]=this.getXmlnsAttribute(t,i),v=(b,_)=>{if(l.isListSchema())this.writeList(l,Array.isArray(_)?_:[_],b,g);else if(l.isMapSchema())this.writeMap(l,_,b,g);else if(l.isStructSchema()){const x=this.writeStruct(l,_,g);b.addChildNode(x.withName(h?c.xmlName??t.getMemberName():f.xmlName??"member"))}else{const x=ss.of(h?c.xmlName??t.getMemberName():f.xmlName??"member");this.writeSimpleInto(l,_,x,g),b.addChildNode(x)}};if(h)for(const b of n)(d||b!=null)&&v(r,b);else{const b=ss.of(c.xmlName??t.getMemberName());g&&b.addAttribute(y,g);for(const _ of n)(d||_!=null)&&v(b,_);r.addChildNode(b)}}writeMap(t,n,r,i,c=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const l=t.getMergedTraits(),f=t.getKeySchema(),h=f.getMergedTraits().xmlName??"key",y=t.getValueSchema(),g=y.getMergedTraits(),v=g.xmlName??"value",b=!!g.sparse,_=!!l.xmlFlattened,[x,R]=this.getXmlnsAttribute(t,i),C=(A,O,D)=>{const N=ss.of(h,O),[j,B]=this.getXmlnsAttribute(f,R);B&&N.addAttribute(j,B),A.addChildNode(N);let k=ss.of(v);y.isListSchema()?this.writeList(y,D,k,R):y.isMapSchema()?this.writeMap(y,D,k,R,!0):y.isStructSchema()?k=this.writeStruct(y,D,R):this.writeSimpleInto(y,D,k,R),A.addChildNode(k)};if(_){for(const[A,O]of Object.entries(n))if(b||O!=null){const D=ss.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=ss.of(l.xmlName??t.getMemberName()),R&&A.addAttribute(x,R),r.addChildNode(A));for(const[O,D]of Object.entries(n))if(b||D!=null){const N=ss.of("entry");C(N,O,D),(c?r:A).addChildNode(N)}}}writeSimple(t,n){if(n===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const r=wt.of(t);let i=null;if(n&&typeof n=="object")if(r.isBlobSchema())i=(this.serdeContext?.base64Encoder??Mi)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Wp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=mp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=mp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof Cf?n.string:String(n);throw r.isMapSchema()||r.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${r.getName(!0)}`)}if((r.isBooleanSchema()||r.isNumericSchema()||r.isBigIntegerSchema()||r.isBigDecimalSchema())&&(i=String(n)),r.isStringSchema()&&(n===void 0&&r.isIdempotencyToken()?i=Yp():i=String(n)),i===null)throw new Error(`Unhandled schema-value pair ${r.getName(!0)}=${n}`);return i}writeSimpleInto(t,n,r,i){const c=this.writeSimple(t,n),l=wt.of(t),f=new zv(c),[d,h]=this.getXmlnsAttribute(l,i);h&&r.addAttribute(d,h),r.addChildNode(f)}getXmlnsAttribute(t,n){const r=t.getMergedTraits(),[i,c]=r.xmlNamespace??[];return c&&c!==n?[i?`xmlns:${i}`:"xmlns",c]:[void 0,void 0]}}class LZ extends tm{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new zZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new GM(this.settings);return t.setSerdeContext(this.serdeContext),t}}class BZ extends aK{codec;serializer;deserializer;mixin=new VM;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new LZ(n),this.serializer=new fK(this.codec.createSerializer(),n),this.deserializer=new lK(this.codec.createDeserializer(),n)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r),c=wt.of(t.input);if(!i.headers["content-type"]){const l=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);l&&(i.headers["content-type"]=l)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("'+i.body),i}async deserializeResponse(t,n,r){return super.deserializeResponse(t,n,r)}async handleError(t,n,r,i,c){const l=NZ(r,i)??"Unknown",{errorSchema:f,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,i,c),h=wt.of(f),y=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",g=Mt.for(f[1]).getErrorCtor(f)??Error,v=new g(y);await this.deserializeHttpMessage(f,n,r,i);const b={};for(const[_,x]of h.structIterator()){const R=x.getMergedTraits().xmlName??_,C=i.Error?.[R]??i[R];b[_]=this.codec.createDeserializer().readSchema(x,C)}throw this.mixin.decorateServiceException(Object.assign(v,d,{$fault:h.getMergedTraits().error,message:y},b),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,n]of t.structIterator())if(n.getMergedTraits().httpPayload)return!(n.isStructSchema()||n.isMapSchema()||n.isListSchema());return!1}}const $Z=/\d{12}\.ddb/;async function UZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&vr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?vr(e,"RETRY_MODE_ADAPTIVE","F"):vr(e,"RETRY_MODE_STANDARD","E"):vr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match($Z)&&vr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":vr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":vr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":vr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&vr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))vr(e,l,f)}}const cT="user-agent",M0="x-amz-user-agent",lT=" ",D0="/",jZ=/[^!$%&'*+\-.^_`|~\w]/g,HZ=/[^!$%&'*+\-.^_`|~\w#]/g,uT="-",FZ=1024;function VZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=FZ){t.length?t+=","+r:t+=r;continue}break}return t}const qZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!Mn.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(Rh)||[],f=(await e.defaultUserAgentProvider()).map(Rh);await UZ(n,e,r);const d=n;f.push(`m/${VZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(Rh)||[],y=await e.userAgentAppId();y&&f.push(Rh(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(lT),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(lT);return e.runtime!=="browser"?(v&&(c[M0]=c[M0]?`${c[cT]} ${v}`:v),c[cT]=g):c[M0]=g,t({...r,request:i})},Rh=e=>{const t=e[0].split(D0).map(l=>l.replace(jZ,uT)).join(D0),n=e[1]?.replace(HZ,uT),r=t.indexOf(D0),i=t.substring(0,r);let c=t.substring(r+1);return i==="api"&&(c=c.toLowerCase()),[i,c,n].filter(l=>l&&l.length>0).reduce((l,f,d)=>{switch(d){case 0:return f;case 1:return`${l}/${f}`;default:return`${l}#${f}`}},"")},GZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},KM=e=>({applyToStack:t=>{t.add(qZ(e),GZ)}}),ZM=!1,QM=!1,fT=new Set,KZ=(e,t=Jp)=>{if(!fT.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else fT.add(e)},YM=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),ZZ=e=>YM(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,XM=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const r=typeof t=="function"?await t():t,i=ZZ(r);return KZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return YM(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},dT="content-length";function QZ(e){return t=>async n=>{const r=n.request;if(Mn.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(dT)===-1)try{const l=e(i);r.headers={...r.headers,[dT]:String(l)}}catch{}}return t({...n,request:r})}}const YZ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},WM=e=>({applyToStack:t=>{t.add(QZ(e.bodyLengthChecker),YZ)}}),XZ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),nQ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!tQ(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},WZ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,JZ=/(\d+\.){3}\d+/,eQ=/\.\./,tQ=e=>WZ.test(e)&&!JZ.test(e)&&!eQ.test(e),nQ=e=>{const[t,n,r,,,i]=e.split(":"),c=t==="arn"&&e.split(":").length>=6,l=!!(c&&n&&r&&i);if(c&&!l)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return l},sQ=(e,t,n,r=!1)=>{const i=async()=>{let c;return r?c=n.clientContextParams?.[e]??n[e]??n[t]:c=n[e]??n[t],typeof c=="function"?c():c};return e==="credentialScope"||t==="CredentialScope"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.credentialScope??c?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.accountId??c?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const c=await i();if(c&&typeof c=="object"){if("url"in c)return c.url.href;if("hostname"in c){const{protocol:l,hostname:f,port:d,path:h}=c;return`${l}//${f}${d?":"+d:""}${h}`}}return c}:i},JM=async e=>{},eD=e=>typeof e=="object"?"url"in e?mf(e.url):e:mf(e),rQ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await JM(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(eD(l)),n.isCustomEndpoint=!0)}const i=await tD(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},tD=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[c,l]of Object.entries(i))switch(l.type){case"staticContextParams":r[c]=l.value;break;case"contextParams":r[c]=e[l.name];break;case"clientContextParams":case"builtInParams":r[c]=await sQ(l.name,c,n,l.type!=="builtInParams")();break;case"operationContextParams":r[c]=l.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(l))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await XZ(r),r},oQ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&dK(r,"ENDPOINT_OVERRIDE","N");const c=await rQ(i.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=c,r.authSchemes=c.properties?.authSchemes;const l=r.authSchemes?.[0];if(l){r.signing_region=l.signingRegion,r.signing_service=l.signingName;const d=Eo(r)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return n({...i})},iQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lG.name},xo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(oQ({config:e,instructions:t}),iQ)}}),nD=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>eD(await Ns(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ns(r??!1),useFipsEndpoint:Ns(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=JM(e.serviceId)),d),f};var rl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(rl||(rl={}));const gf=3,sD=rl.STANDARD,aQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],cQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],lQ=[500,502,503,504],uQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],fQ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],dQ=e=>e?.$retryable!==void 0,hQ=e=>e.$metadata?.clockSkewCorrected,pQ=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},rD=e=>e.$metadata?.httpStatusCode===429||aQ.includes(e.name)||e.$retryable?.throttling==!0,Lb=(e,t=0)=>dQ(e)||hQ(e)||cQ.includes(e.name)||uQ.includes(e?.code||"")||fQ.includes(e?.code||"")||lQ.includes(e.$metadata?.httpStatusCode||0)||pQ(e)||e.cause!==void 0&&t<=10&&Lb(e.cause,t+1),mQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Lb(e)}return!1};class Bb{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Bb.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),rD(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}const Lv=100,oD=20*1e3,gQ=500,hT=500,yQ=5,vQ=10,bQ=1,SQ="amz-sdk-invocation-id",_Q="amz-sdk-request",wQ=()=>{let e=Lv;return{computeNextBackoffDelay:r=>Math.floor(Math.min(oD,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},pT=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(oD,e),getRetryCost:()=>n});class iD{maxAttempts;mode=rl.STANDARD;capacity=hT;retryBackoffStrategy=wQ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return pT({retryDelay:Lv,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const i=n.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?gQ:Lv);const c=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),l=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,c):c,f=this.getCapacityCost(i);return this.capacity-=f,pT({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(hT,this.capacity+(t.getRetryCost()??bQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${gf}`),gf}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?vQ:yQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class EQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=rl.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Bb,this.standardRetryStrategy=new iD(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const xQ=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),aD=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ns(r??gf);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ns(n)()===rl.ADAPTIVE?new EQ(i):new iD(i))})},RQ=e=>e?.body instanceof ReadableStream,CQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(TQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=Mn.isInstance(y);for(g&&(y.headers[SQ]=Yp());;)try{g&&(y.headers[_Q]=`attempt=${d+1}; max=${c}`);const{response:v,output:b}=await t(r);return i.recordSuccess(l),b.$metadata.attempts=d+1,b.$metadata.totalRetryDelay=h,{response:v,output:b}}catch(v){const b=AQ(v);if(f=xQ(v),g&&RQ(y))throw(n.logger instanceof zb?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),f;try{l=await i.refreshRetryTokenForRetry(l,b)}catch{throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=h,f}d=l.getRetryCount();const _=l.getRetryDelay();h+=_,await new Promise(x=>setTimeout(x,_))}}else return i=i,i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r)},TQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",AQ=e=>{const t={error:e,errorType:IQ(e)},n=MQ(e.$response);return n&&(t.retryAfterHint=n),t},IQ=e=>rD(e)?"THROTTLING":Lb(e)?"TRANSIENT":mQ(e)?"SERVER_ERROR":"CLIENT_ERROR",OQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},cD=e=>({applyToStack:t=>{t.add(CQ(e),OQ)}}),MQ=e=>{if(!Pa.isInstance(e))return;const t=Object.keys(e.headers).find(c=>c.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},DQ=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function kQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const PQ=e=>{const t=[];switch(e.operation){default:t.push(kQ(e))}return t},NQ=e=>{const t=LM(e);return Object.assign(t,{authSchemePreference:Ns(e.authSchemePreference??[])})},zQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),hl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},LQ="3.975.0",BQ={version:LQ},lD=e=>new TextEncoder().encode(e);var $Q=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:lD;function za(e){return e instanceof Uint8Array?e:typeof e=="string"?$Q(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function vp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function UQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function jQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n0&&c[c.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nr=64,GQ=32,KQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ZQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],QQ=Math.pow(2,53)-1,Bh=(function(){function e(){this.state=Int32Array.from(ZQ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>QQ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===nr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%nr>=nr-8){for(var i=this.bufferLength;i>>24&255,c[i*4+1]=this.state[i]>>>16&255,c[i*4+2]=this.state[i]>>>8&255,c[i*4+3]=this.state[i]>>>0&255;return c},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],c=r[1],l=r[2],f=r[3],d=r[4],h=r[5],y=r[6],g=r[7],v=0;v>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[v-15];var x=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[v]=(_+this.temp[v-7]|0)+(x+this.temp[v-16]|0)}var R=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&y)|0)+(g+(KQ[v]+this.temp[v]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&c^i&l^c&l)|0;g=y,y=h,h=d,d=f+R|0,f=l,l=c,c=i,i=R+C|0}r[0]+=i,r[1]+=c,r[2]+=l,r[3]+=f,r[4]+=d,r[5]+=h,r[6]+=y,r[7]+=g},e})(),YQ=(function(){function e(t){this.secret=t,this.hash=new Bh,this.reset()}return e.prototype.update=function(t){if(!(vp(t)||this.error))try{this.hash.update(za(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return fD(this,void 0,void 0,function(){return dD(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bh,this.secret){this.outer=new Bh;var t=XQ(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Bh;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var WQ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function hD(e){if(JQ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return eY(t)}return!1}function JQ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function eY(e){return e&&WQ.every(function(t){return typeof e[t]=="function"})}var pD=(function(){function e(t){hD(Ai())?this.hash=new VQ(t):this.hash=new YQ(t)}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const mD=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??gT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??gT.browser(i)??"unknown",y=d?.version??"unknown",g=[["aws-sdk-js",t],["ua","2.1"],[`os/${c}`,l],["lang/js"],["md/browser",`${h}_${y}`]];e&&g.push([`api/${e}`,t]);const v=await n?.userAgentAppId?.();return v&&g.push([`app/${v}`]),g},gT={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},gD=e=>()=>Promise.reject(e),tY=["in-region","cross-region","mobile","standard","legacy"],yD=({defaultsMode:e}={})=>KK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(nY()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${tY.join(", ")}, got ${t}`)}}),nY=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},vD="required",rr="fn",or="argv",pl="ref",yT=!0,vT="isSet",yf="booleanEquals",Nc="error",zc="endpoint",co="tree",$b="PartitionResult",Ub="getAttr",bT={[vD]:!1,type:"string"},ST={[vD]:!0,default:!1,type:"boolean"},_T={[pl]:"Endpoint"},bD={[rr]:yf,[or]:[{[pl]:"UseFIPS"},!0]},SD={[rr]:yf,[or]:[{[pl]:"UseDualStack"},!0]},Ws={},wT={[rr]:Ub,[or]:[{[pl]:$b},"supportsFIPS"]},_D={[pl]:$b},ET={[rr]:yf,[or]:[!0,{[rr]:Ub,[or]:[_D,"supportsDualStack"]}]},xT=[bD],RT=[SD],CT=[{[pl]:"Region"}],sY={parameters:{Region:bT,UseDualStack:ST,UseFIPS:ST,Endpoint:bT},rules:[{conditions:[{[rr]:vT,[or]:[_T]}],rules:[{conditions:xT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Nc},{conditions:RT,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Nc},{endpoint:{url:_T,properties:Ws,headers:Ws},type:zc}],type:co},{conditions:[{[rr]:vT,[or]:CT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:CT,assign:$b}],rules:[{conditions:[bD,SD],rules:[{conditions:[{[rr]:yf,[or]:[yT,wT]},ET],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Nc}],type:co},{conditions:xT,rules:[{conditions:[{[rr]:yf,[or]:[wT,yT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Ub,[or]:[_D,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:zc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS is enabled but this partition does not support FIPS",type:Nc}],type:co},{conditions:RT,rules:[{conditions:[ET],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"DualStack is enabled but this partition does not support DualStack",type:Nc}],type:co},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co}],type:co},{error:"Invalid Configuration: Missing Region",type:Nc}]},rY=sY,oY=new gM({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),iY=(e,t={})=>oY.get(e,()=>TM(rY,{endpointParams:e,logger:t.logger}));hf.aws=kb;const aY=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??iY,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??PQ,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Nb}],logger:e?.logger??new zb,protocol:e?.protocol??PZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ec2",xmlNamespace:"http://ec2.amazonaws.com/doc/2016-11-15",version:"2016-11-15",serviceTarget:"AmazonEC2"},serviceId:e?.serviceId??"EC2",urlParser:e?.urlParser??mf,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??ja}),cY=e=>{const t=yD(e),n=()=>t().then(UM),r=aY(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??BM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??mD({serviceId:r.serviceId,clientVersion:BQ.version}),maxAttempts:e?.maxAttempts??gf,region:e?.region??gD("Region is missing"),requestHandler:Qp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||sD),sha256:e?.sha256??pD,streamCollector:e?.streamCollector??Cb,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(ZM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(QM))}},wD=e=>({setRegion(t){e.region=t},region(){return e.region}}),ED=e=>({region:e.region()}),lY=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},uY=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),fY=(e,t)=>{const n=Object.assign(wD(e),jM(e),KO(e),lY(e));return t.forEach(r=>r.configure(n)),Object.assign(e,ED(n),HM(n),ZO(n),uY(n))};class dY extends $M{config;constructor(...[t]){const n=cY(t||{});super(n),this.initConfig=n;const r=zQ(n),i=mM(r),c=aD(i),l=XM(c),f=l,d=nD(f),h=NQ(d),y=fY(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(iM(this.config)),this.middlewareStack.use(KM(this.config)),this.middlewareStack.use(cD(this.config)),this.middlewareStack.use(WM(this.config)),this.middlewareStack.use(QO(this.config)),this.middlewareStack.use(YO(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(WO(this.config,{httpAuthSchemeParametersProvider:DQ,identityProviderConfigProvider:async g=>new hM({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(eM(this.config))}destroy(){super.destroy()}}class jb extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,jb.prototype)}}const hY="AssociateCarrierIpAddress",xD="AdditionalInfo",pY="AttachmentId",mY="AmiLaunchIndex",gY="AttachmentLimitType",yY="AssociatePublicIpAddress",vY="AutoRecoverySupported",bY="AllRegions",RD="AssociatedResource",CD="AutoRecovery",TD="AmdSevSnp",SY="ArchitectureTypeList",Hb="AttachTime",nm="AvailabilityZone",sm="AvailabilityZoneId",AD="Accelerators",_Y="Affinity",ID="Arn",OD="Architecture",MD="Association",wY="Attachment",EY="Attachments",xY="BaselineBandwidthInGbps",DD="BaselineBandwidthInMbps",Fb="BlockDeviceMapping",RY="BlockDeviceMappingList",CY="BlockDeviceMappingRequestList",Vb="BlockDeviceMappings",TY="BlockDurationMinutes",kD="BaselineIops",PD="BootMode",AY="BootModeTypeList",IY="BareMetal",OY="BurstablePerformanceSupported",ND="BaselineThroughputInMBps",zD="BandwidthWeighting",MY="BandwidthWeightingTypeList",DY="BandwidthWeightings",kY="CapacityBlockId",PY="CoreCountList",LD="CoreCount",NY="CpuCredits",zY="CreationDate",LY="CurrentGeneration",BY="CarrierIp",$Y="CurrentInstanceBootMode",UY="CoreInfo",jY="CreateKeyPair",HY="CreateKeyPairRequest",qb="CpuOptions",FY="CustomerOwnedIp",VY="CpuOptionsRequest",Gb="CapacityReservationId",BD="CapacityReservationPreference",$D="CapacityReservationResourceGroupArn",qY="CapacityReservationSpecificationResponse",Kb="CapacityReservationSpecification",Zb="CapacityReservationTarget",GY="CapacityReservationTargetResponse",KY="CreditSpecificationRequest",ZY="CreditSpecification",QY="CurrentState",Qb="ClientToken",YY="ConnectionTrackingConfiguration",XY="ConnectionTrackingSpecification",WY="ConnectionTrackingSpecificationRequest",JY="ConnectionTrackingSpecificationResponse",UD="CreateTime",eX="CreateVolumeRequest",tX="CreateVolume",jD="Code",HD="Configured",Bi="Count",nX="DisableApiStop",sX="DisableApiTermination",rX="DefaultCores",oX="DefaultEnaQueueCountPerInterface",iX="DedicatedHostsSupported",FD="DeviceIndex",aX="DiskInfoList",cX="DescribeImagesRequest",lX="DescribeImagesResult",uX="DescribeInstancesRequest",fX="DescribeInstancesResult",dX="DescribeInstanceTypesRequest",hX="DescribeInstanceTypesResult",pX="DescribeInstanceTypes",mX="DescribeImages",gX="DescribeInstances",yX="DiskInfo",vX="DeleteKeyPair",bX="DeleteKeyPairRequest",SX="DeleteKeyPairResult",_X="DescribeKeyPairsRequest",wX="DescribeKeyPairsResult",EX="DescribeKeyPairs",VD="DeviceName",xX="DefaultNetworkCardIndex",Tf="DeleteOnTermination",RX="DeregistrationProtection",Un="DryRun",CX="DescribeRegionsRequest",TX="DescribeRegionsResult",AX="DescribeRegions",IX="DefaultThreadsPerCore",OX="DeprecationTime",MX="DefaultVCpus",DX="DeleteVolumeRequest",kX="DescribeVolumesRequest",PX="DescribeVolumesResult",NX="DeleteVolume",zX="DescribeVolumes",Yb="Description",LX="Device",BX="Disks",$X="EbsBlockDevice",UX="ExecutableByStringList",qD="ExecutableBy",rm="EbsCardIndex",jX="EbsCardInfoList",HX="EbsCardInfo",FX="EbsCards",VX="ElasticGpuAssociation",qX="ElasticGpuAssociationId",GX="ElasticGpuAssociationList",KX="ElasticGpuAssociationState",ZX="ElasticGpuAssociationTime",QX="ElasticGpuAssociations",YX="ElasticGpuId",GD="ElasticGpuSpecification",XX="ElasticGpuSpecifications",KD="ElasticInferenceAccelerator",WX="ElasticInferenceAcceleratorAssociation",JX="ElasticInferenceAcceleratorAssociationId",eW="ElasticInferenceAcceleratorAssociationList",tW="ElasticInferenceAcceleratorAssociationState",nW="ElasticInferenceAcceleratorAssociationTime",sW="ElasticInferenceAcceleratorArn",rW="ElasticInferenceAcceleratorAssociations",ZD="ElasticInferenceAccelerators",oW="EbsInstanceBlockDevice",iW="EncryptionInTransitSupported",QD="EbsInfo",YD="EfaInfo",XD="EbsOptimized",WD="EbsOptimizedInfo",aW="EnclaveOptionsRequest",cW="EbsOptimizedSupport",Xb="EnclaveOptions",lW="EnablePrimaryIpv6",JD="EnaQueueCount",ek="EnableResourceNameDnsAAAARecord",tk="EnableResourceNameDnsARecord",nk="EnaSrdEnabled",sk="EnaSrdSpecification",uW="EnaSrdSpecificationRequest",fW="EnaSrdSupported",rk="EnaSrdUdpEnabled",ok="EnaSrdUdpSpecification",dW="EnaSrdUdpSpecificationRequest",hW="EfaSupported",ik="EncryptionSupport",Wb="EnaSupport",pW="EndTime",mW="ExecutableUsers",ak="Ebs",Jb="Enabled",eS="Encrypted",gW="Endpoint",ck="Force",yW="FpgaDeviceInfo",vW="FpgaDeviceInfoList",bW="FpgaDeviceMemoryInfo",SW="FlexibleEnaQueuesSupport",lk="FpgaInfo",_W="FilterList",wW="FastRestored",uk="FreeTierEligible",ml="Filters",$i="Filter",EW="Fpgas",tS="Groups",xW="GpuDeviceInfo",RW="GpuDeviceInfoList",CW="GpuDeviceMemoryInfo",TW="GroupIdentifierList",fk="GpuInfo",dk="GroupId",AW="GroupIdentifier",hk="GroupName",IW="GpuPartitionSize",OW="Gpus",pk="HttpEndpoint",MW="HostId",nS="HibernationOptions",DW="HibernationOptionsRequest",mk="HttpProtocolIpv6",gk="HttpPutResponseHopLimit",kW="HostResourceGroupArn",PW="HibernationSupported",yk="HttpTokens",vk="HostnameType",NW="Hibernate",sS="Hypervisor",zW="Id",rS="Ipv6Addresses",bk="Ipv6AddressCount",LW="InstanceAttachmentEnaSrdSpecification",BW="InstanceAttachmentEnaSrdUdpSpecification",Sk="InferenceAcceleratorInfo",$W="Ipv4AddressesPerInterface",UW="Ipv6AddressesPerInterface",jW="ImageAllowed",oS="Ipv6Address",HW="InstanceBlockDeviceMapping",FW="InstanceBlockDeviceMappingList",VW="IncludeDeprecated",qW="InferenceDeviceInfo",GW="InferenceDeviceInfoList",KW="InferenceDeviceMemoryInfo",ZW="IncludeDisabled",Ro="InstanceId",QW="InstanceIpv6Address",YW="InstanceIpv6AddressList",XW="InstanceInterruptionBehavior",iS="IamInstanceProfile",WW="InstanceIpv4PrefixList",JW="InstanceIpv6PrefixList",eJ="IamInstanceProfileSpecification",tJ="InstanceIpv4Prefix",nJ="InstanceIpv6Prefix",sJ="InstanceInitiatedShutdownBehavior",rJ="ImageIdStringList",oJ="InstanceIdStringList",Af="ImageId",iJ="ImageIds",If="InstanceIds",aJ="ImportKeyPair",cJ="ImportKeyPairRequest",lJ="ImportKeyPairResult",uJ="ImageLocation",fJ="ImageList",dJ="InstanceLifecycle",hJ="InstanceList",pJ="InstanceMaintenanceOptions",mJ="InstanceMaintenanceOptionsRequest",gJ="InstanceMarketOptionsRequest",yJ="InstanceMetadataOptionsRequest",vJ="InstanceMetadataOptionsResponse",bJ="InstanceMarketOptions",_k="InstanceMetadataTags",SJ="InstanceNetworkInterface",_J="InstanceNetworkInterfaceAssociation",wJ="InstanceNetworkInterfaceAttachment",EJ="InstanceNetworkInterfaceList",xJ="InstanceNetworkInterfaceSpecification",RJ="InstanceNetworkInterfaceSpecificationList",CJ="InstanceNetworkPerformanceOptions",TJ="InstanceNetworkPerformanceOptionsRequest",AJ="ImageOwnerAlias",IJ="IpOwnerId",OJ="InstanceOwningService",MJ="Ipv6PrefixCount",DJ="Ipv4PrefixCount",kJ="InstancePrivateIpAddress",PJ="InstancePrivateIpAddressList",NJ="IsPrimaryIpv6",zJ="IncludePublicKey",LJ="Ipv4PrefixList",BJ="Ipv6PrefixList",$J="Ipv4PrefixSpecificationRequest",UJ="Ipv6PrefixSpecificationRequest",wk="Ipv6Prefixes",aS="Ipv6Prefix",Ek="Ipv4Prefixes",cS="Ipv4Prefix",jJ="InstanceStateChange",HJ="InstanceStateChangeList",xk="InstanceStorageInfo",FJ="InstanceStorageSupported",VJ="ImdsSupport",qJ="InstanceState",GJ="Ipv6Supported",om="InstanceType",KJ="InstanceTypeInfoList",ZJ="InstanceTypeInfo",QJ="ImageType",Rk="InstanceTypes",Ck="InterfaceType",YJ="Images",XJ="Image",WJ="Instance",JJ="Instances",im="Iops",eee="Key",tee="KeyFormat",lS="KeyFingerprint",uS="KernelId",fS="KmsKeyId",nee="KeyMaterial",$r="KeyName",see="KeyNameStringList",ree="KeyNames",oee="KeyPairs",Ha="KeyPairId",iee="KeyPairIdStringList",aee="KeyPairIds",cee="KeyPairInfo",lee="KeyPairList",uee="KeyPair",Tk="KeyType",Ak="LicenseConfigurationArn",fee="LicenseConfigurationRequest",dee="LicenseConfiguration",hee="LogicalGpuCount",pee="LicenseList",mee="LastLaunchedTime",gee="LicenseSpecifications",yee="LicenseSpecificationListRequest",vee="LicenseSpecification",bee="LaunchTemplate",See="LaunchTemplateId",_ee="LaunchTemplateName",wee="LaunchTemplateSpecification",Eee="LaunchTime",xee="Licenses",dS="MultiAttachEnabled",Ik="MediaAcceleratorInfo",Ree="MacAddress",Ok="MaximumBandwidthInMbps",Cee="MaxCount",Tee="MinCount",Aee="MediaDeviceInfo",Iee="MediaDeviceInfoList",Oee="MediaDeviceMemoryInfo",Mee="MaximumEbsAttachments",Dee="MaximumEbsCards",kee="MaximumEfaInterfaces",Pee="MaximumEnaQueueCount",Nee="MaximumEnaQueueCountPerInterface",Mk="MaximumIops",Fa="MemoryInfo",zee="MaximumNetworkCards",Dk="MaximumNetworkInterfaces",kk="MetadataOptions",Pk="MaintenanceOptions",Lee="MaxPrice",am="MaxResults",Bee="ModificationState",$ee="MarketType",Nk="MaximumThroughputInMBps",Uee="ModifyVolumeRequest",jee="ModifyVolumeResult",Hee="ModifyVolume",Of="Manufacturer",Fee="Managed",Vee="Message",hS="Monitoring",Co="Name",qee="NetworkCards",pS="NetworkCardIndex",Gee="NetworkCardInfoList",Kee="NetworkCardInfo",Zee="NoDevice",Qee="NeuronDeviceCoreInfo",Yee="NeuronDeviceInfo",Xee="NeuronDeviceInfoList",Wee="NeuronDeviceMemoryInfo",Jee="NeuronDevices",ete="NitroEnclavesSupport",zk="NetworkInterfaceId",Lk="NetworkInterfaces",Bk="NetworkInfo",$k="NeuronInfo",Uk="NetworkPerformanceOptions",jk="NetworkPerformance",Hk="NvmeSupport",Fk="NitroTpmInfo",tte="NitroTpmSupport",nte="NitroTpmSupportedVersionsList",Ui="NextToken",cm="OutpostArn",mS="OwnerId",ste="OptInStatus",rte="OriginalIops",ote="OriginalMultiAttachEnabled",ite="OperatorRequest",ate="OperatorResponse",cte="OwnerStringList",lte="OriginalSize",ute="OriginalThroughput",fte="OriginalVolumeType",gl="Operator",dte="Owners",Vk="Owner",qk="Principal",hte="PeakBandwidthInGbps",pte="ProductCodeId",mte="ProductCodeList",gte="ProductCodeType",yte="ProductCode",Gk="ProductCodes",gS="PrivateDnsName",Kk="PrivateDnsNameOptions",vte="PrivateDnsNameOptionsRequest",bte="PrivateDnsNameOptionsResponse",Zk="PublicDnsName",Qk="PlatformDetails",Yk="PlacementGroupInfo",Ste="PlacementGroupStrategyList",_te="PublicIp",wte="PrivateIpAddressSpecification",Ete="PrivateIpAddressSpecificationList",yl="PrivateIpAddress",Xk="PrivateIpAddresses",xte="PublicIpAddress",Rte="PrimaryIpv6",Wk="ProcessorInfo",Cte="PublicKey",Tte="PublicKeyMaterial",Ate="PartitionNumber",Ite="PhcSupport",Ote="PreviousState",Jk="Platform",yS="Placement",e3="Primary",Mte="Progress",Dte="Public",kte="Return",t3="RootDeviceName",n3="RootDeviceType",Pte="RootDeviceTypeList",Nte="RunInstancesMonitoringEnabled",zte="RebootInstancesRequest",Lte="RunInstancesRequest",Bte="RunInstancesUserData",vS="RamdiskId",$te="ReservationId",Ute="RebootInstances",jte="RequesterId",Hte="RunInstances",Fte="RegionList",Vte="ReservationList",qte="RebootMigrationSupport",Gte="RebootMigration",bS="RegionName",Kte="RegionNameStringList",Zte="RegionNames",Qte="ResourceType",Yte="Regions",Xte="Region",Wte="Reservations",Jte="Reservation",ene="SupportedAdditionalProcessorFeatureList",tne="SupportedArchitectures",nne="SupportedBootModes",sne="SustainedClockSpeedInGhz",s3="SourceDestCheck",rne="SpreadDomain",one="SupportedFeatures",r3="SecurityGroups",SS="SecurityGroupId",ine="SecurityGroupIdStringList",ane="SecurityGroupIds",cne="SecurityGroupStringList",o3="SecurityGroup",lne="SizeInGB",une="SourceImageId",fne="SourceInstanceId",vl="SizeInMiB",dne="SpotInstanceRequestId",hne="SourceImageRegion",pne="StartInstancesRequest",mne="StartInstancesResult",gne="StopInstancesRequest",yne="StopInstancesResult",vne="SpotInstanceType",_S="SnapshotId",bne="StartingInstances",Sne="StartInstances",_ne="StoppingInstances",wne="StopInstances",lm="SubnetId",Ene="SpotMarketOptions",xne="StatusMessage",i3="SriovNetSupport",Rne="SpotOptions",a3="SkipOsShutdown",Cne="SecondaryPrivateIpAddressCount",Tne="SupportedRootDeviceTypes",wS="StateReason",Ane="SupportedStrategies",Ine="StartTime",One="StateTransitionReason",Mne="SseType",Dne="SupportedUsageClasses",kne="SensitiveUserData",Pne="SourceVolumeId",Nne="SupportedVirtualizationTypes",zne="SupportedVersions",ES="Size",bl="State",xS="Status",Va="Tags",c3="TcpEstablishedTimeout",Lne="TotalFpgaMemoryInMiB",Bne="TotalGpuMemoryInMiB",$ne="TerminateInstances",Une="TotalInferenceMemoryInMiB",jne="TerminateInstancesRequest",Hne="TerminateInstancesResult",Fne="TargetIops",Vne="TerminatingInstances",qne="TagList",Gne="TargetMultiAttachEnabled",Kne="TotalMediaMemoryInMiB",Zne="TotalNeuronDeviceMemoryInMiB",l3="ThreadsPerCore",Qne="ThreadsPerCoreList",um="TagSpecifications",Yne="TotalSizeInGB",Xne="TagSpecificationList",Mf="TagSpecification",Wne="TargetSize",u3="TpmSupport",Jne="TargetThroughput",ese="TargetVolumeType",f3="Tag",tse="Tenancy",fm="Throughput",RS="Type",nse="UsageClassTypeList",sse="UserData",d3="UsageOperation",rse="UsageOperationUpdateTime",h3="UdpStreamTimeout",p3="UdpTimeout",m3="Value",ose="VolumeAttachmentList",ise="VolumeAttachment",g3="VCpuInfo",ase="ValidCores",y3="VpcId",CS="VolumeInitializationRate",cse="VolumeIdStringList",ji="VolumeId",lse="VolumeIds",use="VolumeList",v3="VolumeModification",fse="VirtualName",dse="VolumeOwnerId",hse="ValueStringList",pse="VolumeSize",dm="VolumeType",mse="VirtualizationTypeList",gse="ValidThreadsPerCore",b3="VirtualizationType",yse="ValidUntil",vse="Values",S3="Version",bse="Volumes",Sse="Volume",_se="WorkloadsList",wse="Workloads",_3="additionalInfo",Ese="attachmentId",xse="amiLaunchIndex",Rse="attachmentLimitType",Cse="associatePublicIpAddress",Tse="autoRecoverySupported",w3="associatedResource",Ase="autoRecovery",Ise="amdSevSnp",Ose="attachmentSet",TS="attachTime",AS="availabilityZone",E3="availabilityZoneId",x3="accelerators",Mse="affinity",R3="arn",C3="architecture",T3="association",Dse="attachment",kse="baselineBandwidthInGbps",A3="baselineBandwidthInMbps",I3="blockDeviceMapping",O3="baselineIops",M3="bootMode",Pse="bareMetal",Nse="burstablePerformanceSupported",D3="baselineThroughputInMBps",zse="bandwidthWeighting",Lse="bandwidthWeightings",Bse="capacityBlockId",$se="coreCount",Use="creationDate",jse="currentGeneration",Hse="carrierIp",Fse="currentInstanceBootMode",Vse="coreInfo",qse="cpuOptions",Gse="customerOwnedIp",k3="capacityReservationId",Kse="capacityReservationPreference",Zse="capacityReservationResourceGroupArn",Qse="capacityReservationSpecification",Yse="capacityReservationTarget",Xse="currentState",P3="clientToken",Wse="connectionTrackingConfiguration",N3="createTime",z3="code",Jse="configured",qa="count",ere="disableApiTermination",tre="defaultCores",nre="defaultEnaQueueCountPerInterface",sre="dedicatedHostsSupported",L3="deviceIndex",B3="deviceName",rre="defaultNetworkCardIndex",ore="dnsName",Df="deleteOnTermination",ire="deregistrationProtection",as="dryRun",are="defaultThreadsPerCore",cre="deprecationTime",lre="defaultVCpus",IS="description",ure="device",fre="disks",OS="ebsCardIndex",dre="ebsCardSet",hre="elasticGpuAssociationId",pre="elasticGpuAssociationState",mre="elasticGpuAssociationSet",gre="elasticGpuAssociationTime",yre="elasticGpuId",vre="elasticInferenceAcceleratorArn",bre="elasticInferenceAcceleratorAssociationId",Sre="elasticInferenceAcceleratorAssociationState",_re="elasticInferenceAcceleratorAssociationSet",wre="elasticInferenceAcceleratorAssociationTime",Ere="encryptionInTransitSupported",xre="ebsInfo",Rre="efaInfo",$3="ebsOptimized",Cre="ebsOptimizedInfo",Tre="ebsOptimizedSupport",Are="enclaveOptions",Ire="enaQueueCount",E="ec2QueryName",Ore="enableResourceNameDnsAAAARecord",Mre="enableResourceNameDnsARecord",Dre="enaSrdEnabled",kre="enaSrdSpecification",Pre="enaSrdSupported",Nre="enaSrdUdpEnabled",zre="enaSrdUdpSpecification",Lre="efaSupported",U3="encryptionSupport",MS="enaSupport",Bre="endTime",j3="ebs",H3="enabled",DS="encrypted",$re="flexibleEnaQueuesSupport",Ure="fpgaInfo",jre="fastRestored",F3="freeTierEligible",Hre="force",Fre="fpgas",Vre="gpuInfo",V3="groupId",q3="groupName",qre="gpuPartitionSize",kS="groupSet",Gre="gpus",PS="hypervisor",Kre="httpEndpoint",Zre="hostId",Qre="hibernationOptions",Yre="httpProtocolIpv6",Xre="httpPutResponseHopLimit",Wre="hostResourceGroupArn",Jre="hibernationSupported",eoe="httpTokens",toe="hostnameType",noe="id",soe="ipv6AddressCount",roe="inferenceAcceleratorInfo",ooe="ipv4AddressesPerInterface",ioe="ipv6AddressesPerInterface",G3="ipv6AddressesSet",aoe="imageAllowed",coe="ipAddress",K3="ipv6Address",NS="instanceId",Z3="iamInstanceProfile",loe="instanceInitiatedShutdownBehavior",Q3="imageId",uoe="imageLocation",foe="instanceLifecycle",doe="instanceMetadataTags",hoe="imageOwnerAlias",poe="imageOwnerId",moe="ipOwnerId",goe="instanceOwningService",yoe="isPrimaryIpv6",voe="ipv4PrefixSet",boe="ipv6PrefixSet",Soe="ipv4Prefix",_oe="ipv6Prefix",woe="isPublic",Eoe="instanceStorageInfo",xoe="instanceStorageSupported",Roe="imagesSet",Coe="imageState",Toe="imdsSupport",hm="instancesSet",Aoe="instanceState",Ioe="ipv6Supported",Y3="instanceType",Ooe="instanceTypeSet",Moe="idempotencyToken",Doe="imageType",koe="interfaceType",X3="iops",je="item",Poe="key",zS="keyFingerprint",W3="kernelId",J3="kmsKeyId",Noe="keyMaterial",kf="keyName",pm="keyPairId",zoe="keySet",Loe="keyType",Boe="licenseConfigurationArn",$oe="logicalGpuCount",Uoe="lastLaunchedTime",joe="licenseSet",Hoe="launchTime",Foe="multiAttachEnabled",Voe="mediaAcceleratorInfo",qoe="macAddress",eP="maximumBandwidthInMbps",Goe="maximumEbsAttachments",Koe="maximumEbsCards",Zoe="maximumEfaInterfaces",Qoe="maximumEnaQueueCount",Yoe="maximumEnaQueueCountPerInterface",tP="maximumIops",Sl="memoryInfo",Xoe="maximumNetworkCards",nP="maximumNetworkInterfaces",Woe="metadataOptions",Joe="maintenanceOptions",sP="maxResults",eie="modificationState",rP="maximumThroughputInMBps",Pf="manufacturer",tie="managed",nie="message",sie="monitoring",Hi="name",rie="networkCards",oP="networkCardIndex",oie="noDevice",iie="neuronDevices",aie="nitroEnclavesSupport",iP="networkInterfaceId",cie="networkInterfaceSet",lie="networkInterface",uie="networkInfo",fie="neuronInfo",die="networkPerformanceOptions",aP="networkPerformance",cP="nvmeSupport",hie="nitroTpmInfo",pie="nitroTpmSupport",_l="nextToken",LS="outpostArn",lP="ownerId",mie="optInStatus",gie="originalIops",yie="originalMultiAttachEnabled",vie="originalSize",bie="originalThroughput",Sie="originalVolumeType",mm="operator",_ie="principal",wie="peakBandwidthInGbps",uP="productCodes",Eie="productCode",xie="privateDnsNameOptions",BS="privateDnsName",Rie="publicDnsName",fP="platformDetails",Cie="placementGroupInfo",Tie="publicIp",dP="privateIpAddressesSet",wl="privateIpAddress",Aie="processorInfo",Iie="publicKey",Oie="publicKeyMaterial",Mie="partitionNumber",Die="phcSupport",kie="previousState",hP="platform",Pie="placement",pP="primary",Nie="progress",zie="return",mP="rootDeviceName",gP="rootDeviceType",Lie="regionEndpoint",Bie="reservationId",yP="ramdiskId",$ie="regionInfo",Uie="requesterId",jie="rebootMigrationSupport",Hie="rebootMigration",Fie="regionName",Vie="reservationSet",qie="resourceType",Gie="reason",Kie="supportedArchitectures",Zie="supportedBootModes",Qie="sustainedClockSpeedInGhz",vP="sourceDestCheck",Yie="spreadDomain",Xie="supportedFeatures",Wie="sizeInGB",Jie="sourceInstanceId",eae="sourceImageId",El="sizeInMiB",tae="sourceImageRegion",nae="spotInstanceRequestId",bP="snapshotId",$S="subnetId",sae="statusMessage",SP="sriovNetSupport",rae="secondaryPrivateIpAddressCount",oae="supportedRootDeviceTypes",_P="stateReason",iae="supportedStrategies",aae="startTime",cae="sseType",lae="supportedUsageClasses",uae="sourceVolumeId",fae="supportedVirtualizationTypes",dae="supportedVersions",hae="size",wP="smithy.ts.sdk.synthetic.com.amazonaws.ec2",EP="state",Nf="status",pae="tenancy",mae="tcpEstablishedTimeout",gae="totalFpgaMemoryInMiB",yae="totalGpuMemoryInMiB",vae="totalInferenceMemoryInMiB",bae="targetIops",Sae="targetMultiAttachEnabled",_ae="totalMediaMemoryInMiB",wae="totalNeuronDeviceMemoryInMiB",Eae="threadsPerCore",xl="tagSet",xae="totalSizeInGB",Rae="targetSize",xP="tpmSupport",Cae="targetThroughput",Tae="targetVolumeType",RP="throughput",CP="type",TP="usageOperation",Aae="usageOperationUpdateTime",Iae="udpStreamTimeout",Oae="udpTimeout",Mae="value",Dae="vCpuInfo",kae="validCores",AP="vpcId",Pae="volumeInitializationRate",gm="volumeId",Nae="volumeModification",zae="virtualName",Lae="volumeOwnerId",Bae="volumeSet",$ae="volumeSize",IP="volumeType",Uae="validThreadsPerCore",OP="virtualizationType",jae="version",Hae="workloadSet",S="xmlName",H="com.amazonaws.ec2";var Fae=[0,H,Bte,8,0],Vae=[0,H,kne,8,0],MP=[3,H,Fb,0,[ak,Zee,VD,fse],[[()=>vce,{[E]:"Ebs",[S]:j3}],[0,{[E]:"NoDevice",[S]:oie}],[0,{[E]:"DeviceName",[S]:B3}],[0,{[E]:"VirtualName",[S]:zae}]]],qae=[3,H,Kb,0,[BD,Zb],[0,()=>Kae]],Gae=[3,H,qY,0,[BD,Zb],[[0,{[E]:"CapacityReservationPreference",[S]:Kse}],[()=>Zae,{[E]:"CapacityReservationTarget",[S]:Yse}]]],Kae=[3,H,Zb,0,[Gb,$D],[0,0]],Zae=[3,H,GY,0,[Gb,$D],[[0,{[E]:"CapacityReservationId",[S]:k3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:Zse}]]],Qae=[3,H,WY,0,[c3,h3,p3],[1,1,1]],Yae=[3,H,JY,0,[c3,h3,p3],[[1,{[E]:"TcpEstablishedTimeout",[S]:mae}],[1,{[E]:"UdpStreamTimeout",[S]:Iae}],[1,{[E]:"UdpTimeout",[S]:Oae}]]],Xae=[3,H,qb,0,[LD,l3,TD],[[1,{[E]:"CoreCount",[S]:$se}],[1,{[E]:"ThreadsPerCore",[S]:Eae}],[0,{[E]:"AmdSevSnp",[S]:Ise}]]],Wae=[3,H,VY,0,[LD,l3,TD],[1,1,0]],Jae=[3,H,HY,0,[$r,Tk,um,tee,Un],[0,0,[()=>vm,{[S]:Mf}],0,[2,{[E]:"DryRun",[S]:as}]],1],ece=[3,H,eX,0,[nm,sm,eS,im,fS,cm,ES,_S,dm,um,dS,fm,Qb,CS,gl,Un],[0,0,[2,{[E]:"Encrypted",[S]:DS}],1,0,0,1,0,0,[()=>vm,{[S]:Mf}],2,1,[0,4],1,()=>kP,[2,{[E]:"DryRun",[S]:as}]]],tce=[3,H,KY,0,[NY],[0],1],nce=[3,H,bX,0,[$r,Ha,Un],[0,0,[2,{[E]:"DryRun",[S]:as}]]],sce=[3,H,SX,0,[kte,Ha],[[2,{[E]:"Return",[S]:zie}],[0,{[E]:"KeyPairId",[S]:pm}]]],rce=[3,H,DX,0,[ji,Un],[0,[2,{[E]:"DryRun",[S]:as}]],1],oce=[3,H,cX,0,[mW,iJ,dte,VW,ZW,am,Ui,Un,ml],[[()=>bue,{[S]:qD}],[()=>wue,{[S]:Af}],[()=>Vue,{[S]:Vk}],2,2,1,0,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],ice=[3,H,lX,0,[Ui,YJ],[[0,{[E]:"NextToken",[S]:_l}],[()=>Eue,{[E]:"ImagesSet",[S]:Roe}]]],ace=[3,H,uX,0,[If,Un,ml,Ui,am],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:sP}]]],cce=[3,H,fX,0,[Ui,Wte],[[0,{[E]:"NextToken",[S]:_l}],[()=>Que,{[E]:"ReservationSet",[S]:Vie}]]],lce=[3,H,dX,0,[Un,Rk,ml,am,Ui],[2,[64,{[S]:om}],[()=>Rl,{[S]:$i}],1,0]],uce=[3,H,hX,0,[Rk,Ui],[[()=>Due,{[E]:"InstanceTypeSet",[S]:Ooe}],[0,{[E]:"NextToken",[S]:_l}]]],fce=[3,H,_X,0,[ree,aee,zJ,Un,ml],[[()=>Nue,{[S]:$r}],[()=>zue,{[S]:Ha}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],dce=[3,H,wX,0,[oee],[[()=>Lue,{[E]:"KeySet",[S]:zoe}]]],hce=[3,H,CX,0,[Zte,bY,Un,ml],[[()=>Zue,{[S]:bS}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],pce=[3,H,TX,0,[Yte],[[()=>Kue,{[E]:"RegionInfo",[S]:$ie}]]],mce=[3,H,kX,0,[lse,Un,ml,Ui,am],[[()=>rfe,{[S]:ji}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:sP}]]],gce=[3,H,PX,0,[Ui,bse],[[0,{[E]:"NextToken",[S]:_l}],[()=>ofe,{[E]:"VolumeSet",[S]:Bae}]]],yce=[3,H,yX,0,[lne,Bi,RS],[[1,{[E]:"SizeInGB",[S]:Wie}],[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Type",[S]:CP}]]],vce=[3,H,$X,0,[Tf,im,_S,pse,dm,fS,fm,cm,nm,eS,CS,sm,rm],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"Iops",[S]:X3}],[0,{[E]:"SnapshotId",[S]:bP}],[1,{[E]:"VolumeSize",[S]:$ae}],[0,{[E]:"VolumeType",[S]:IP}],[0,{[E]:"KmsKeyId",[S]:J3}],[1,{[E]:"Throughput",[S]:RP}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"AvailabilityZone",[S]:AS}],[2,{[E]:"Encrypted",[S]:DS}],1,0,1]],bce=[3,H,HX,0,[rm,DD,ND,kD,Ok,Nk,Mk],[[1,{[E]:"EbsCardIndex",[S]:OS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:A3}],[1,{[E]:"BaselineThroughputInMBps",[S]:D3}],[1,{[E]:"BaselineIops",[S]:O3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:eP}],[1,{[E]:"MaximumThroughputInMBps",[S]:rP}],[1,{[E]:"MaximumIops",[S]:tP}]]],Sce=[3,H,QD,0,[cW,ik,WD,Hk,Mee,gY,Dee,FX],[[0,{[E]:"EbsOptimizedSupport",[S]:Tre}],[0,{[E]:"EncryptionSupport",[S]:U3}],[()=>wce,{[E]:"EbsOptimizedInfo",[S]:Cre}],[0,{[E]:"NvmeSupport",[S]:cP}],[1,{[E]:"MaximumEbsAttachments",[S]:Goe}],[0,{[E]:"AttachmentLimitType",[S]:Rse}],[1,{[E]:"MaximumEbsCards",[S]:Koe}],[()=>pue,{[E]:"EbsCardSet",[S]:dre}]]],_ce=[3,H,oW,0,[Hb,Tf,xS,ji,RD,dse,gl,rm],[[4,{[E]:"AttachTime",[S]:TS}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"AssociatedResource",[S]:w3}],[0,{[E]:"VolumeOwnerId",[S]:Lae}],[()=>ym,{[E]:"Operator",[S]:mm}],[1,{[E]:"EbsCardIndex",[S]:OS}]]],wce=[3,H,WD,0,[DD,ND,kD,Ok,Nk,Mk],[[1,{[E]:"BaselineBandwidthInMbps",[S]:A3}],[1,{[E]:"BaselineThroughputInMBps",[S]:D3}],[1,{[E]:"BaselineIops",[S]:O3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:eP}],[1,{[E]:"MaximumThroughputInMBps",[S]:rP}],[1,{[E]:"MaximumIops",[S]:tP}]]],Ece=[3,H,YD,0,[kee],[[1,{[E]:"MaximumEfaInterfaces",[S]:Zoe}]]],xce=[3,H,VX,0,[YX,qX,KX,ZX],[[0,{[E]:"ElasticGpuId",[S]:yre}],[0,{[E]:"ElasticGpuAssociationId",[S]:hre}],[0,{[E]:"ElasticGpuAssociationState",[S]:pre}],[0,{[E]:"ElasticGpuAssociationTime",[S]:gre}]]],Rce=[3,H,GD,0,[RS],[0],1],Cce=[3,H,KD,0,[RS,Bi],[0,1],1],Tce=[3,H,WX,0,[sW,JX,tW,nW],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:vre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:bre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:Sre}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:wre}]]],Ace=[3,H,uW,0,[nk,ok],[2,()=>Ice]],Ice=[3,H,dW,0,[rk],[2]],Oce=[3,H,Xb,0,[Jb],[[2,{[E]:"Enabled",[S]:H3}]]],Mce=[3,H,aW,0,[Jb],[2]],Dce=[3,H,$i,0,[Co,vse],[0,[()=>tfe,{[S]:m3}]]],kce=[3,H,yW,0,[Co,Of,Bi,Fa],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[()=>Pce,{[E]:"MemoryInfo",[S]:Sl}]]],Pce=[3,H,bW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Nce=[3,H,lk,0,[EW,Lne],[[()=>Sue,{[E]:"Fpgas",[S]:Fre}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:gae}]]],zce=[3,H,xW,0,[Co,Of,Bi,hee,IW,wse,Fa],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[1,{[E]:"LogicalGpuCount",[S]:$oe}],[1,{[E]:"GpuPartitionSize",[S]:qre}],[()=>ife,{[E]:"WorkloadSet",[S]:Hae}],[()=>Lce,{[E]:"MemoryInfo",[S]:Sl}]]],Lce=[3,H,CW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Bce=[3,H,fk,0,[OW,Bne],[[()=>_ue,{[E]:"Gpus",[S]:Gre}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:yae}]]],$ce=[3,H,AW,0,[dk,hk],[[0,{[E]:"GroupId",[S]:V3}],[0,{[E]:"GroupName",[S]:q3}]]],Uce=[3,H,nS,0,[HD],[[2,{[E]:"Configured",[S]:Jse}]]],jce=[3,H,DW,0,[HD],[2]],Hce=[3,H,iS,0,[ID,zW],[[0,{[E]:"Arn",[S]:R3}],[0,{[E]:"Id",[S]:noe}]]],Fce=[3,H,eJ,0,[ID,Co],[[0,{[E]:"Arn",[S]:R3}],[0,{[E]:"Name",[S]:Hi}]]],Vce=[3,H,XJ,0,[Qk,d3,Vb,Yb,Wb,sS,AJ,Co,t3,n3,i3,wS,Va,b3,PD,u3,OX,VJ,fne,RX,mee,jW,une,hne,uk,Af,uJ,bl,mS,zY,Dte,Gk,OD,QJ,uS,vS,Jk],[[0,{[E]:"PlatformDetails",[S]:fP}],[0,{[E]:"UsageOperation",[S]:TP}],[()=>lue,{[E]:"BlockDeviceMapping",[S]:I3}],[0,{[E]:"Description",[S]:IS}],[2,{[E]:"EnaSupport",[S]:MS}],[0,{[E]:"Hypervisor",[S]:PS}],[0,{[E]:"ImageOwnerAlias",[S]:hoe}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"RootDeviceName",[S]:mP}],[0,{[E]:"RootDeviceType",[S]:gP}],[0,{[E]:"SriovNetSupport",[S]:SP}],[()=>zP,{[E]:"StateReason",[S]:_P}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:OP}],[0,{[E]:"BootMode",[S]:M3}],[0,{[E]:"TpmSupport",[S]:xP}],[0,{[E]:"DeprecationTime",[S]:cre}],[0,{[E]:"ImdsSupport",[S]:Toe}],[0,{[E]:"SourceInstanceId",[S]:Jie}],[0,{[E]:"DeregistrationProtection",[S]:ire}],[0,{[E]:"LastLaunchedTime",[S]:Uoe}],[2,{[E]:"ImageAllowed",[S]:aoe}],[0,{[E]:"SourceImageId",[S]:eae}],[0,{[E]:"SourceImageRegion",[S]:tae}],[2,{[E]:"FreeTierEligible",[S]:F3}],[0,{[E]:"ImageId",[S]:Q3}],[0,{[E]:"ImageLocation",[S]:uoe}],[0,{[E]:"ImageState",[S]:Coe}],[0,{[E]:"ImageOwnerId",[S]:poe}],[0,{[E]:"CreationDate",[S]:Use}],[2,{[E]:"IsPublic",[S]:woe}],[()=>$P,{[E]:"ProductCodes",[S]:uP}],[0,{[E]:"Architecture",[S]:C3}],[0,{[E]:"ImageType",[S]:Doe}],[0,{[E]:"KernelId",[S]:W3}],[0,{[E]:"RamdiskId",[S]:yP}],[0,{[E]:"Platform",[S]:hP}]]],qce=[3,H,cJ,0,[$r,Tte,um,Un],[[0,{[E]:"KeyName",[S]:kf}],[21,{[E]:"PublicKeyMaterial",[S]:Oie}],[()=>vm,{[S]:Mf}],[2,{[E]:"DryRun",[S]:as}]],2],Gce=[3,H,lJ,0,[lS,$r,Ha,Va],[[0,{[E]:"KeyFingerprint",[S]:zS}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyPairId",[S]:pm}],[()=>Ga,{[E]:"TagSet",[S]:xl}]]],Kce=[3,H,Sk,0,[AD,Une],[[()=>xue,{[E]:"Accelerators",[S]:x3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:vae}]]],Zce=[3,H,qW,0,[Bi,Co,Of,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>Qce,{[E]:"MemoryInfo",[S]:Sl}]]],Qce=[3,H,KW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Yce=[3,H,WJ,0,[OD,Vb,Qb,XD,Wb,sS,iS,dJ,QX,rW,Lk,cm,t3,n3,r3,s3,dne,i3,wS,Va,b3,qb,kY,Gb,Kb,nS,xee,kk,Xb,PD,Qk,d3,rse,Kk,oS,u3,Pk,$Y,Uk,gl,Ro,Af,bl,gS,Zk,One,$r,mY,Gk,om,Eee,yS,uS,vS,Jk,hS,lm,y3,yl,xte],[[0,{[E]:"Architecture",[S]:C3}],[()=>Rue,{[E]:"BlockDeviceMapping",[S]:I3}],[0,{[E]:"ClientToken",[S]:P3}],[2,{[E]:"EbsOptimized",[S]:$3}],[2,{[E]:"EnaSupport",[S]:MS}],[0,{[E]:"Hypervisor",[S]:PS}],[()=>Hce,{[E]:"IamInstanceProfile",[S]:Z3}],[0,{[E]:"InstanceLifecycle",[S]:foe}],[()=>mue,{[E]:"ElasticGpuAssociationSet",[S]:mre}],[()=>yue,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:_re}],[()=>Iue,{[E]:"NetworkInterfaceSet",[S]:cie}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"RootDeviceName",[S]:mP}],[0,{[E]:"RootDeviceType",[S]:gP}],[()=>US,{[E]:"GroupSet",[S]:kS}],[2,{[E]:"SourceDestCheck",[S]:vP}],[0,{[E]:"SpotInstanceRequestId",[S]:nae}],[0,{[E]:"SriovNetSupport",[S]:SP}],[()=>zP,{[E]:"StateReason",[S]:_P}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:OP}],[()=>Xae,{[E]:"CpuOptions",[S]:qse}],[0,{[E]:"CapacityBlockId",[S]:Bse}],[0,{[E]:"CapacityReservationId",[S]:k3}],[()=>Gae,{[E]:"CapacityReservationSpecification",[S]:Qse}],[()=>Uce,{[E]:"HibernationOptions",[S]:Qre}],[()=>Bue,{[E]:"LicenseSet",[S]:joe}],[()=>ale,{[E]:"MetadataOptions",[S]:Woe}],[()=>Oce,{[E]:"EnclaveOptions",[S]:Are}],[0,{[E]:"BootMode",[S]:M3}],[0,{[E]:"PlatformDetails",[S]:fP}],[0,{[E]:"UsageOperation",[S]:TP}],[4,{[E]:"UsageOperationUpdateTime",[S]:Aae}],[()=>Ule,{[E]:"PrivateDnsNameOptions",[S]:xie}],[0,{[E]:"Ipv6Address",[S]:K3}],[0,{[E]:"TpmSupport",[S]:xP}],[()=>sle,{[E]:"MaintenanceOptions",[S]:Joe}],[0,{[E]:"CurrentInstanceBootMode",[S]:Fse}],[()=>fle,{[E]:"NetworkPerformanceOptions",[S]:die}],[()=>ym,{[E]:"Operator",[S]:mm}],[0,{[E]:"InstanceId",[S]:NS}],[0,{[E]:"ImageId",[S]:Q3}],[()=>Bv,{[E]:"InstanceState",[S]:Aoe}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"DnsName",[S]:ore}],[0,{[E]:"Reason",[S]:Gie}],[0,{[E]:"KeyName",[S]:kf}],[1,{[E]:"AmiLaunchIndex",[S]:xse}],[()=>$P,{[E]:"ProductCodes",[S]:uP}],[0,{[E]:"InstanceType",[S]:Y3}],[4,{[E]:"LaunchTime",[S]:Hoe}],[()=>PP,{[E]:"Placement",[S]:Pie}],[0,{[E]:"KernelId",[S]:W3}],[0,{[E]:"RamdiskId",[S]:yP}],[0,{[E]:"Platform",[S]:hP}],[()=>Ole,{[E]:"Monitoring",[S]:sie}],[0,{[E]:"SubnetId",[S]:$S}],[0,{[E]:"VpcId",[S]:AP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"IpAddress",[S]:coe}]]],Xce=[3,H,LW,0,[nk,ok],[[2,{[E]:"EnaSrdEnabled",[S]:Dre}],[()=>Wce,{[E]:"EnaSrdUdpSpecification",[S]:zre}]]],Wce=[3,H,BW,0,[rk],[[2,{[E]:"EnaSrdUdpEnabled",[S]:Nre}]]],Jce=[3,H,HW,0,[VD,ak],[[0,{[E]:"DeviceName",[S]:B3}],[()=>_ce,{[E]:"Ebs",[S]:j3}]]],ele=[3,H,tJ,0,[cS],[[0,{[E]:"Ipv4Prefix",[S]:Soe}]]],tle=[3,H,QW,0,[oS,NJ],[[0,{[E]:"Ipv6Address",[S]:K3}],[2,{[E]:"IsPrimaryIpv6",[S]:yoe}]]],nle=[3,H,nJ,0,[aS],[[0,{[E]:"Ipv6Prefix",[S]:_oe}]]],sle=[3,H,pJ,0,[CD,Gte],[[0,{[E]:"AutoRecovery",[S]:Ase}],[0,{[E]:"RebootMigration",[S]:Hie}]]],rle=[3,H,mJ,0,[CD],[0]],ole=[3,H,gJ,0,[$ee,Rne],[0,()=>Zle]],ile=[3,H,yJ,0,[yk,gk,pk,mk,_k],[0,1,0,0,0]],ale=[3,H,vJ,0,[bl,yk,gk,pk,mk,_k],[[0,{[E]:"State",[S]:EP}],[0,{[E]:"HttpTokens",[S]:eoe}],[1,{[E]:"HttpPutResponseHopLimit",[S]:Xre}],[0,{[E]:"HttpEndpoint",[S]:Kre}],[0,{[E]:"HttpProtocolIpv6",[S]:Yre}],[0,{[E]:"InstanceMetadataTags",[S]:doe}]]],cle=[3,H,SJ,0,[MD,wY,Yb,tS,rS,Ree,zk,mS,gS,yl,Xk,s3,xS,lm,y3,Ck,Ek,wk,YY,gl],[[()=>DP,{[E]:"Association",[S]:T3}],[()=>lle,{[E]:"Attachment",[S]:Dse}],[0,{[E]:"Description",[S]:IS}],[()=>US,{[E]:"GroupSet",[S]:kS}],[()=>jS,{[E]:"Ipv6AddressesSet",[S]:G3}],[0,{[E]:"MacAddress",[S]:qoe}],[0,{[E]:"NetworkInterfaceId",[S]:iP}],[0,{[E]:"OwnerId",[S]:lP}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Mue,{[E]:"PrivateIpAddressesSet",[S]:dP}],[2,{[E]:"SourceDestCheck",[S]:vP}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"SubnetId",[S]:$S}],[0,{[E]:"VpcId",[S]:AP}],[0,{[E]:"InterfaceType",[S]:koe}],[()=>Cue,{[E]:"Ipv4PrefixSet",[S]:voe}],[()=>Tue,{[E]:"Ipv6PrefixSet",[S]:boe}],[()=>Yae,{[E]:"ConnectionTrackingConfiguration",[S]:Wse}],[()=>ym,{[E]:"Operator",[S]:mm}]]],DP=[3,H,_J,0,[BY,FY,IJ,Zk,_te],[[0,{[E]:"CarrierIp",[S]:Hse}],[0,{[E]:"CustomerOwnedIp",[S]:Gse}],[0,{[E]:"IpOwnerId",[S]:moe}],[0,{[E]:"PublicDnsName",[S]:Rie}],[0,{[E]:"PublicIp",[S]:Tie}]]],lle=[3,H,wJ,0,[Hb,pY,Tf,FD,xS,pS,sk,JD],[[4,{[E]:"AttachTime",[S]:TS}],[0,{[E]:"AttachmentId",[S]:Ese}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"DeviceIndex",[S]:L3}],[0,{[E]:"Status",[S]:Nf}],[1,{[E]:"NetworkCardIndex",[S]:oP}],[()=>Xce,{[E]:"EnaSrdSpecification",[S]:kre}],[1,{[E]:"EnaQueueCount",[S]:Ire}]]],ule=[3,H,xJ,0,[yY,Tf,Yb,FD,tS,bk,rS,zk,yl,Xk,Cne,lm,hY,Ck,pS,Ek,DJ,wk,MJ,Rte,sk,XY,JD],[[2,{[E]:"AssociatePublicIpAddress",[S]:Cse}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Description",[S]:IS}],[1,{[E]:"DeviceIndex",[S]:L3}],[()=>UP,{[S]:SS}],[1,{[E]:"Ipv6AddressCount",[S]:soe}],[()=>jS,{[E]:"Ipv6Addresses",[S]:G3}],[0,{[E]:"NetworkInterfaceId",[S]:iP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Gue,{[E]:"PrivateIpAddresses",[S]:dP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:rae}],[0,{[E]:"SubnetId",[S]:$S}],2,0,1,[()=>kue,{[S]:cS}],1,[()=>Pue,{[S]:aS}],1,2,()=>Ace,()=>Qae,1]],fle=[3,H,CJ,0,[zD],[[0,{[E]:"BandwidthWeighting",[S]:zse}]]],dle=[3,H,TJ,0,[zD],[0]],hle=[3,H,kJ,0,[MD,e3,gS,yl],[[()=>DP,{[E]:"Association",[S]:T3}],[2,{[E]:"Primary",[S]:pP}],[0,{[E]:"PrivateDnsName",[S]:BS}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Bv=[3,H,qJ,0,[jD,Co],[[1,{[E]:"Code",[S]:z3}],[0,{[E]:"Name",[S]:Hi}]]],ple=[3,H,jJ,0,[Ro,QY,Ote],[[0,{[E]:"InstanceId",[S]:NS}],[()=>Bv,{[E]:"CurrentState",[S]:Xse}],[()=>Bv,{[E]:"PreviousState",[S]:kie}]]],mle=[3,H,xk,0,[Yne,BX,Hk,ik],[[1,{[E]:"TotalSizeInGB",[S]:xae}],[()=>hue,{[E]:"Disks",[S]:fre}],[0,{[E]:"NvmeSupport",[S]:cP}],[0,{[E]:"EncryptionSupport",[S]:U3}]]],gle=[3,H,ZJ,0,[om,LY,uk,Dne,Tne,Nne,IY,sS,Wk,g3,Fa,FJ,xk,QD,Bk,fk,lk,Yk,Sk,PW,OY,iX,vY,nne,ete,tte,Fk,Ik,$k,Ite,qte],[[0,{[E]:"InstanceType",[S]:Y3}],[2,{[E]:"CurrentGeneration",[S]:jse}],[2,{[E]:"FreeTierEligible",[S]:F3}],[()=>efe,{[E]:"SupportedUsageClasses",[S]:lae}],[()=>Yue,{[E]:"SupportedRootDeviceTypes",[S]:oae}],[()=>nfe,{[E]:"SupportedVirtualizationTypes",[S]:fae}],[2,{[E]:"BareMetal",[S]:Pse}],[0,{[E]:"Hypervisor",[S]:PS}],[()=>Hle,{[E]:"ProcessorInfo",[S]:Aie}],[()=>sue,{[E]:"VCpuInfo",[S]:Dae}],[()=>Tle,{[E]:"MemoryInfo",[S]:Sl}],[2,{[E]:"InstanceStorageSupported",[S]:xoe}],[()=>mle,{[E]:"InstanceStorageInfo",[S]:Eoe}],[()=>Sce,{[E]:"EbsInfo",[S]:xre}],[()=>Dle,{[E]:"NetworkInfo",[S]:uie}],[()=>Bce,{[E]:"GpuInfo",[S]:Vre}],[()=>Nce,{[E]:"FpgaInfo",[S]:Ure}],[()=>Ble,{[E]:"PlacementGroupInfo",[S]:Cie}],[()=>Kce,{[E]:"InferenceAcceleratorInfo",[S]:roe}],[2,{[E]:"HibernationSupported",[S]:Jre}],[2,{[E]:"BurstablePerformanceSupported",[S]:Nse}],[2,{[E]:"DedicatedHostsSupported",[S]:sre}],[2,{[E]:"AutoRecoverySupported",[S]:Tse}],[()=>fue,{[E]:"SupportedBootModes",[S]:Zie}],[0,{[E]:"NitroEnclavesSupport",[S]:aie}],[0,{[E]:"NitroTpmSupport",[S]:pie}],[()=>Lle,{[E]:"NitroTpmInfo",[S]:hie}],[()=>xle,{[E]:"MediaAcceleratorInfo",[S]:Voe}],[()=>zle,{[E]:"NeuronInfo",[S]:fie}],[0,{[E]:"PhcSupport",[S]:Die}],[0,{[E]:"RebootMigrationSupport",[S]:jie}]]],yle=[3,H,$J,0,[cS],[0]],vle=[3,H,UJ,0,[aS],[0]],ble=[3,H,uee,0,[Ha,Va,$r,lS,nee],[[0,{[E]:"KeyPairId",[S]:pm}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:zS}],[()=>Vae,{[E]:"KeyMaterial",[S]:Noe}]]],Sle=[3,H,cee,0,[Ha,Tk,Va,Cte,UD,$r,lS],[[0,{[E]:"KeyPairId",[S]:pm}],[0,{[E]:"KeyType",[S]:Loe}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"PublicKey",[S]:Iie}],[4,{[E]:"CreateTime",[S]:N3}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:zS}]]],_le=[3,H,wee,0,[See,_ee,S3],[0,0,0]],wle=[3,H,dee,0,[Ak],[[0,{[E]:"LicenseConfigurationArn",[S]:Boe}]]],Ele=[3,H,fee,0,[Ak],[0]],xle=[3,H,Ik,0,[AD,Kne],[[()=>Uue,{[E]:"Accelerators",[S]:x3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:_ae}]]],Rle=[3,H,Aee,0,[Bi,Co,Of,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>Cle,{[E]:"MemoryInfo",[S]:Sl}]]],Cle=[3,H,Oee,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Tle=[3,H,Fa,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Ale=[3,H,Uee,0,[ji,Un,ES,dm,im,fm,dS],[0,2,1,0,1,1,2],1],Ile=[3,H,jee,0,[v3],[[()=>oue,{[E]:"VolumeModification",[S]:Nae}]]],Ole=[3,H,hS,0,[bl],[[0,{[E]:"State",[S]:EP}]]],Mle=[3,H,Kee,0,[pS,jk,Dk,xY,hte,oX,Pee,Nee],[[1,{[E]:"NetworkCardIndex",[S]:oP}],[0,{[E]:"NetworkPerformance",[S]:aP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:nP}],[1,{[E]:"BaselineBandwidthInGbps",[S]:kse}],[1,{[E]:"PeakBandwidthInGbps",[S]:wie}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:nre}],[1,{[E]:"MaximumEnaQueueCount",[S]:Qoe}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:Yoe}]]],Dle=[3,H,Bk,0,[jk,Dk,zee,xX,qee,$W,UW,GJ,Wb,hW,YD,iW,fW,DY,SW],[[0,{[E]:"NetworkPerformance",[S]:aP}],[1,{[E]:"MaximumNetworkInterfaces",[S]:nP}],[1,{[E]:"MaximumNetworkCards",[S]:Xoe}],[1,{[E]:"DefaultNetworkCardIndex",[S]:rre}],[()=>jue,{[E]:"NetworkCards",[S]:rie}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:ooe}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:ioe}],[2,{[E]:"Ipv6Supported",[S]:Ioe}],[0,{[E]:"EnaSupport",[S]:MS}],[2,{[E]:"EfaSupported",[S]:Lre}],[()=>Ece,{[E]:"EfaInfo",[S]:Rre}],[2,{[E]:"EncryptionInTransitSupported",[S]:Ere}],[2,{[E]:"EnaSrdSupported",[S]:Pre}],[()=>cue,{[E]:"BandwidthWeightings",[S]:Lse}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:$re}]]],kle=[3,H,Qee,0,[Bi,S3],[[1,{[E]:"Count",[S]:qa}],[1,{[E]:"Version",[S]:jae}]]],Ple=[3,H,Yee,0,[Bi,Co,UY,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[()=>kle,{[E]:"CoreInfo",[S]:Vse}],[()=>Nle,{[E]:"MemoryInfo",[S]:Sl}]]],Nle=[3,H,Wee,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],zle=[3,H,$k,0,[Jee,Zne],[[()=>Hue,{[E]:"NeuronDevices",[S]:iie}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:wae}]]],Lle=[3,H,Fk,0,[zne],[[()=>Fue,{[E]:"SupportedVersions",[S]:dae}]]],kP=[3,H,ite,0,[qk],[0]],ym=[3,H,ate,0,[Fee,qk],[[2,{[E]:"Managed",[S]:tie}],[0,{[E]:"Principal",[S]:_ie}]]],PP=[3,H,yS,0,[sm,_Y,hk,Ate,MW,tse,rne,kW,dk,nm],[[0,{[E]:"AvailabilityZoneId",[S]:E3}],[0,{[E]:"Affinity",[S]:Mse}],[0,{[E]:"GroupName",[S]:q3}],[1,{[E]:"PartitionNumber",[S]:Mie}],[0,{[E]:"HostId",[S]:Zre}],[0,{[E]:"Tenancy",[S]:pae}],[0,{[E]:"SpreadDomain",[S]:Yie}],[0,{[E]:"HostResourceGroupArn",[S]:Wre}],[0,{[E]:"GroupId",[S]:V3}],[0,{[E]:"AvailabilityZone",[S]:AS}]]],Ble=[3,H,Yk,0,[Ane],[[()=>que,{[E]:"SupportedStrategies",[S]:iae}]]],$le=[3,H,vte,0,[vk,tk,ek],[0,2,2]],Ule=[3,H,bte,0,[vk,tk,ek],[[0,{[E]:"HostnameType",[S]:toe}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:Mre}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Ore}]]],jle=[3,H,wte,0,[e3,yl],[[2,{[E]:"Primary",[S]:pP}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Hle=[3,H,Wk,0,[tne,sne,one,Of],[[()=>aue,{[E]:"SupportedArchitectures",[S]:Kie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:Qie}],[()=>Wue,{[E]:"SupportedFeatures",[S]:Xie}],[0,{[E]:"Manufacturer",[S]:Pf}]]],Fle=[3,H,yte,0,[pte,gte],[[0,{[E]:"ProductCode",[S]:Eie}],[0,{[E]:"Type",[S]:CP}]]],Vle=[3,H,zte,0,[If,Un],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}]],1],qle=[3,H,Xte,0,[ste,bS,gW],[[0,{[E]:"OptInStatus",[S]:mie}],[0,{[E]:"RegionName",[S]:Fie}],[0,{[E]:"RegionEndpoint",[S]:Lie}]]],NP=[3,H,Jte,0,[$te,mS,jte,tS,JJ],[[0,{[E]:"ReservationId",[S]:Bie}],[0,{[E]:"OwnerId",[S]:lP}],[0,{[E]:"RequesterId",[S]:Uie}],[()=>US,{[E]:"GroupSet",[S]:kS}],[()=>Aue,{[E]:"InstancesSet",[S]:hm}]]],Gle=[3,H,Nte,0,[Jb],[[2,{[E]:"Enabled",[S]:H3}]],1],Kle=[3,H,Lte,0,[Cee,Tee,Vb,Af,om,bk,rS,uS,$r,hS,yS,vS,ane,r3,lm,sse,GD,ZD,um,bee,bJ,ZY,qb,Kb,nS,gee,kk,Xb,Kk,Pk,nX,lW,Uk,gl,Un,sX,sJ,yl,Qb,xD,Lk,iS,XD],[1,1,[()=>uue,{[S]:Fb}],0,0,1,[()=>jS,{[S]:oS}],0,0,[()=>Gle,0],[()=>PP,0],0,[()=>UP,{[S]:SS}],[()=>Xue,{[S]:o3}],0,[()=>Fae,0],[()=>gue,0],[()=>vue,{[S]:KD}],[()=>vm,{[S]:Mf}],()=>_le,()=>ole,()=>tce,()=>Wae,()=>qae,()=>jce,[()=>$ue,{[S]:vee}],()=>ile,()=>Mce,()=>$le,()=>rle,2,2,()=>dle,()=>kP,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"DisableApiTermination",[S]:ere}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:loe}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"ClientToken",[Moe]:1,[S]:P3}],[0,{[E]:"AdditionalInfo",[S]:_3}],[()=>Oue,{[E]:"NetworkInterface",[S]:lie}],[()=>Fce,{[E]:"IamInstanceProfile",[S]:Z3}],[2,{[E]:"EbsOptimized",[S]:$3}]],2],Zle=[3,H,Ene,0,[Lee,vne,TY,yse,XW],[0,0,1,4,0]],Qle=[3,H,pne,0,[If,xD,Un],[[()=>zf,{[S]:Ro}],[0,{[E]:"AdditionalInfo",[S]:_3}],[2,{[E]:"DryRun",[S]:as}]],1],Yle=[3,H,mne,0,[bne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],zP=[3,H,wS,0,[jD,Vee],[[0,{[E]:"Code",[S]:z3}],[0,{[E]:"Message",[S]:nie}]]],Xle=[3,H,gne,0,[If,NW,a3,Un,ck],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"Force",[S]:Hre}]],1],Wle=[3,H,yne,0,[_ne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],Jle=[3,H,f3,0,[eee,m3],[[0,{[E]:"Key",[S]:Poe}],[0,{[E]:"Value",[S]:Mae}]]],eue=[3,H,Mf,0,[Qte,Va],[[0,{[E]:"ResourceType",[S]:qie}],[()=>Ga,{[S]:f3}]]],tue=[3,H,jne,0,[If,ck,a3,Un],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}]],1],nue=[3,H,Hne,0,[Vne],[[()=>HS,{[E]:"InstancesSet",[S]:hm}]]],sue=[3,H,g3,0,[MX,rX,IX,ase,gse],[[1,{[E]:"DefaultVCpus",[S]:lre}],[1,{[E]:"DefaultCores",[S]:tre}],[1,{[E]:"DefaultThreadsPerCore",[S]:are}],[()=>due,{[E]:"ValidCores",[S]:kae}],[()=>Jue,{[E]:"ValidThreadsPerCore",[S]:Uae}]]],LP=[3,H,Sse,0,[sm,cm,Pne,im,Va,dm,wW,dS,fm,Mne,gl,CS,ji,ES,_S,nm,bl,UD,EY,eS,fS],[[0,{[E]:"AvailabilityZoneId",[S]:E3}],[0,{[E]:"OutpostArn",[S]:LS}],[0,{[E]:"SourceVolumeId",[S]:uae}],[1,{[E]:"Iops",[S]:X3}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VolumeType",[S]:IP}],[2,{[E]:"FastRestored",[S]:jre}],[2,{[E]:"MultiAttachEnabled",[S]:Foe}],[1,{[E]:"Throughput",[S]:RP}],[0,{[E]:"SseType",[S]:cae}],[()=>ym,{[E]:"Operator",[S]:mm}],[1,{[E]:"VolumeInitializationRate",[S]:Pae}],[0,{[E]:"VolumeId",[S]:gm}],[1,{[E]:"Size",[S]:hae}],[0,{[E]:"SnapshotId",[S]:bP}],[0,{[E]:"AvailabilityZone",[S]:AS}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"CreateTime",[S]:N3}],[()=>sfe,{[E]:"AttachmentSet",[S]:Ose}],[2,{[E]:"Encrypted",[S]:DS}],[0,{[E]:"KmsKeyId",[S]:J3}]]],rue=[3,H,ise,0,[Tf,RD,OJ,rm,ji,Ro,LX,bl,Hb],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"AssociatedResource",[S]:w3}],[0,{[E]:"InstanceOwningService",[S]:goe}],[1,{[E]:"EbsCardIndex",[S]:OS}],[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"InstanceId",[S]:NS}],[0,{[E]:"Device",[S]:ure}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"AttachTime",[S]:TS}]]],oue=[3,H,v3,0,[ji,Bee,xne,Wne,Fne,ese,Jne,Gne,lte,rte,fte,ute,ote,Mte,Ine,pW],[[0,{[E]:"VolumeId",[S]:gm}],[0,{[E]:"ModificationState",[S]:eie}],[0,{[E]:"StatusMessage",[S]:sae}],[1,{[E]:"TargetSize",[S]:Rae}],[1,{[E]:"TargetIops",[S]:bae}],[0,{[E]:"TargetVolumeType",[S]:Tae}],[1,{[E]:"TargetThroughput",[S]:Cae}],[2,{[E]:"TargetMultiAttachEnabled",[S]:Sae}],[1,{[E]:"OriginalSize",[S]:vie}],[1,{[E]:"OriginalIops",[S]:gie}],[0,{[E]:"OriginalVolumeType",[S]:Sie}],[1,{[E]:"OriginalThroughput",[S]:bie}],[2,{[E]:"OriginalMultiAttachEnabled",[S]:yie}],[1,{[E]:"Progress",[S]:Nie}],[4,{[E]:"StartTime",[S]:aae}],[4,{[E]:"EndTime",[S]:Bre}]]],BP="unit",iue=[-3,wP,"EC2ServiceException",0,[],[]];Mt.for(wP).registerError(iue,jb);var aue=[1,H,SY,0,[0,{[S]:je}]],cue=[1,H,MY,0,[0,{[S]:je}]],lue=[1,H,RY,0,[()=>MP,{[S]:je}]],uue=[1,H,CY,0,[()=>MP,{[S]:Fb}]],fue=[1,H,AY,0,[0,{[S]:je}]],due=[1,H,PY,0,[1,{[S]:je}]],hue=[1,H,aX,0,[()=>yce,{[S]:je}]],pue=[1,H,jX,0,[()=>bce,{[S]:je}]],mue=[1,H,GX,0,[()=>xce,{[S]:je}]],gue=[1,H,XX,0,[()=>Rce,{[S]:je}]],yue=[1,H,eW,0,[()=>Tce,{[S]:je}]],vue=[1,H,ZD,0,[()=>Cce,{[S]:je}]],bue=[1,H,UX,0,[0,{[S]:qD}]],Rl=[1,H,_W,0,[()=>Dce,{[S]:$i}]],Sue=[1,H,vW,0,[()=>kce,{[S]:je}]],_ue=[1,H,RW,0,[()=>zce,{[S]:je}]],US=[1,H,TW,0,[()=>$ce,{[S]:je}]],wue=[1,H,rJ,0,[0,{[S]:Af}]],Eue=[1,H,fJ,0,[()=>Vce,{[S]:je}]],xue=[1,H,GW,0,[()=>Zce,0]],Rue=[1,H,FW,0,[()=>Jce,{[S]:je}]],zf=[1,H,oJ,0,[0,{[S]:Ro}]],Cue=[1,H,WW,0,[()=>ele,{[S]:je}]],jS=[1,H,YW,0,[()=>tle,{[S]:je}]],Tue=[1,H,JW,0,[()=>nle,{[S]:je}]],Aue=[1,H,hJ,0,[()=>Yce,{[S]:je}]],Iue=[1,H,EJ,0,[()=>cle,{[S]:je}]],Oue=[1,H,RJ,0,[()=>ule,{[S]:je}]],Mue=[1,H,PJ,0,[()=>hle,{[S]:je}]],HS=[1,H,HJ,0,[()=>ple,{[S]:je}]],Due=[1,H,KJ,0,[()=>gle,{[S]:je}]],kue=[1,H,LJ,0,[()=>yle,{[S]:je}]],Pue=[1,H,BJ,0,[()=>vle,{[S]:je}]],Nue=[1,H,see,0,[0,{[S]:$r}]],zue=[1,H,iee,0,[0,{[S]:Ha}]],Lue=[1,H,lee,0,[()=>Sle,{[S]:je}]],Bue=[1,H,pee,0,[()=>wle,{[S]:je}]],$ue=[1,H,yee,0,[()=>Ele,{[S]:je}]],Uue=[1,H,Iee,0,[()=>Rle,{[S]:je}]],jue=[1,H,Gee,0,[()=>Mle,{[S]:je}]],Hue=[1,H,Xee,0,[()=>Ple,{[S]:je}]],Fue=[1,H,nte,0,[0,{[S]:je}]],Vue=[1,H,cte,0,[0,{[S]:Vk}]],que=[1,H,Ste,0,[0,{[S]:je}]],Gue=[1,H,Ete,0,[()=>jle,{[S]:je}]],$P=[1,H,mte,0,[()=>Fle,{[S]:je}]],Kue=[1,H,Fte,0,[()=>qle,{[S]:je}]],Zue=[1,H,Kte,0,[0,{[S]:bS}]],Que=[1,H,Vte,0,[()=>NP,{[S]:je}]],Yue=[1,H,Pte,0,[0,{[S]:je}]],UP=[1,H,ine,0,[0,{[S]:SS}]],Xue=[1,H,cne,0,[0,{[S]:o3}]],Wue=[1,H,ene,0,[0,{[S]:je}]],Ga=[1,H,qne,0,[()=>Jle,{[S]:je}]],vm=[1,H,Xne,0,[()=>eue,{[S]:je}]],Jue=[1,H,Qne,0,[1,{[S]:je}]],efe=[1,H,nse,0,[0,{[S]:je}]],tfe=[1,H,hse,0,[0,{[S]:je}]],nfe=[1,H,mse,0,[0,{[S]:je}]],sfe=[1,H,ose,0,[()=>rue,{[S]:je}]],rfe=[1,H,cse,0,[0,{[S]:ji}]],ofe=[1,H,use,0,[()=>LP,{[S]:je}]],ife=[1,H,_se,0,[0,{[S]:je}]],F0e=[9,H,jY,0,()=>Jae,()=>ble],V0e=[9,H,tX,0,()=>ece,()=>LP],q0e=[9,H,vX,0,()=>nce,()=>sce],G0e=[9,H,NX,0,()=>rce,()=>BP],afe=[9,H,mX,0,()=>oce,()=>ice],cfe=[9,H,gX,0,()=>ace,()=>cce],lfe=[9,H,pX,0,()=>lce,()=>uce],ufe=[9,H,EX,0,()=>fce,()=>dce],ffe=[9,H,AX,0,()=>hce,()=>pce],dfe=[9,H,zX,0,()=>mce,()=>gce],K0e=[9,H,aJ,0,()=>qce,()=>Gce],Z0e=[9,H,Hee,0,()=>Ale,()=>Ile],Q0e=[9,H,Ute,0,()=>Vle,()=>BP],Y0e=[9,H,Hte,0,()=>Kle,()=>NP],X0e=[9,H,Sne,0,()=>Qle,()=>Yle],W0e=[9,H,wne,0,()=>Xle,()=>Wle],J0e=[9,H,$ne,0,()=>tue,()=>nue];class jP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(afe).build(){}class HP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(cfe).build(){}class hfe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(lfe).build(){}class FP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(ufe).build(){}class pfe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(ffe).build(){}class VP extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(dfe).build(){}function mfe(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&Mn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let i=!0;if(typeof e.expectContinueHeader=="number")try{i=(Number(r.headers?.["content-length"])??e.bodyLengthChecker?.(r.body)??1/0)>=e.expectContinueHeader}catch{}else i=!!e.expectContinueHeader;i&&(r.headers.Expect="100-continue")}return t({...n,request:r})}}const gfe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},yfe=e=>({applyToStack:t=>{t.add(mfe(e),gfe)}}),qP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},vfe=qP.WHEN_SUPPORTED,eve={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},bfe=qP.WHEN_SUPPORTED;var $v;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})($v||($v={}));var TT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(TT||(TT={}));const tve=$v.CRC32;var nve=(function(){function e(){this.crc32=new bp}return e.prototype.update=function(t){vp(t)||this.crc32.update(za(t))},e.prototype.digest=function(){return fD(this,void 0,void 0,function(){return dD(this,function(t){return[2,UQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new bp},e})(),bp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=qQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^_fe[(this.checksum^l)&255]}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),Sfe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],_fe=jQ(Sfe);const wfe=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ns(t??vfe),responseChecksumValidation:Ns(n??bfe),requestStreamBufferSize:Number(r??0)})},Efe=e=>(t,n)=>async r=>{const i=await e.region(),c=e.region;let l=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),l=()=>Object.defineProperty(e,"region",{writable:!0,value:c}));try{const f=await t(r);if(n.__s3RegionRedirect){l();const d=await e.region();if(i!==d)throw new Error("Region was not restored following S3 region redirect.")}return f}catch(f){throw l(),f}},xfe={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Rfe(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){const c=i?.$metadata?.httpStatusCode,l=n.commandName==="HeadBucketCommand",f=i?.$response?.headers?.["x-amz-bucket-region"];if(f&&(c===301||c===400&&(i?.name==="IllegalLocationConstraintException"||l))){try{const d=f;n.logger?.debug(`Redirecting from ${await e.region()} to ${d}`),n.__s3RegionRedirect=d}catch(d){throw new Error("Region redirect failed: "+d)}return t(r)}}throw i}}}const Cfe={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Tfe=e=>({applyToStack:t=>{t.add(Rfe(e),Cfe),t.addRelativeTo(Efe(e),xfe)}});class FS{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+FS.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()(l.expiration?.getTime()??0){i.set(r,new k0(Promise.resolve(h)))})),l)):i.set(r,new k0(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: +`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const Afe="Directory",Ife="S3Express",Ofe="sigv4-s3express",Mfe="X-Amz-S3session-Token",Dfe=Mfe.toLowerCase(),kfe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===Ofe;if((i.properties?.backend===Ife||i.properties?.bucketType===Afe)&&(vr(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Dfe]=d.sessionToken)}}}return t(r)},Pfe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Nfe=e=>({applyToStack:t=>{t.add(kfe(e),Pfe)}}),zfe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Lfe=e=>t=>{throw t},Bfe=(e,t)=>{},$fe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await zfe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Lfe)(l));return(d.successHandler||Bfe)(y.response,l),y},Ufe=e=>({applyToStack:t=>{t.addRelativeTo($fe(e),JO)}}),jfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new VS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},Hfe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Ffe=3e3,Vfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!Pa.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await EG(f)),c.body=y;const g=await qfe(h,{streamCollector:async b=>gG(b,Ffe)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&Hfe[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},qfe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Gfe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},qS=e=>({applyToStack:t=>{t.addRelativeTo(Vfe(e),Gfe)}}),Kfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Zfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const Qfe={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Yfe({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Kfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const Xfe={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Wfe=e=>({applyToStack:t=>{t.add(Yfe(e),Xfe),t.addRelativeTo(Zfe(e),Qfe)}}),Jfe=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),Uv="X-Amz-S3session-Token",AT=Uv.toLowerCase();class ede extends Pv{async signWithCredentials(t,n,r){const i=IT(n);t.headers[AT]=n.sessionToken;const c=this;return OT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=IT(n);return delete t.headers[AT],t.headers[Uv]=n.sessionToken,t.query=t.query??{},t.query[Uv]=n.sessionToken,OT(this,i),this.presign(t,r)}}function IT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function OT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class GP{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new ede(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const GS="required",M="type",ce="rules",L="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",po="backend",On="authSchemes",hn="disableDoubleEncoding",pn="signingName",Bn="signingRegion",Re="headers",KS="signingRegionSet",tde=6,nde=!1,Tr=!0,ks="isSet",nn="booleanEquals",Ae="error",Sp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",MT="bucketSuffix",ZS="parseURL",me="endpoint",ue="tree",_p="aws.isVirtualHostableS3Bucket",wp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Pr="not",DT="accessPointSuffix",$h="{url#scheme}://{url#authority}{url#path}",KP="hardwareType",ZP="regionPrefix",kT="bucketAliasSuffix",jv="outpostId",Ka="isValidHostLabel",QS="sigv4a",vf="s3-outposts",ol="s3",QP="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",YP="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",PT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",XP="aws.parseArn",WP="bucketArn",JP="arnType",Ep="",YS="s3-object-lambda",eN="accesspoint",XS="accessPointName",NT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",zT="mrapPartition",LT="outpostType",BT="arnPrefix",tN="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",$T="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",UT="https://s3.{partitionResult#dnsSuffix}",Lc={[GS]:!1,[M]:"string"},Bc={[GS]:!0,default:!1,[M]:"boolean"},Lu={[GS]:!1,[M]:"boolean"},tr={[ee]:nn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:nn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:nn,[te]:[{[ke]:"UseDualStack"},!0]},en={[ee]:ks,[te]:[{[ke]:"Endpoint"}]},nN={[ee]:Sp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},jT={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Yu={[ee]:ks,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},HT={[L]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},FT={[L]:[en,{[ee]:ZS,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[L]:[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:nn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[L]:[{[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[L]:[{[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[L]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[L]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ns={[ee]:ZS,[te]:[{[ke]:"Endpoint"}],[We]:"url"},P0={[ee]:nn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},sN={[ke]:"url"},rN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Os={[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:"s3express",[Bn]:"{Region}"}]},Ve={},oN={[ee]:_p,[te]:[dt,!1]},VT={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},qT={[ee]:ks,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},GT={[ee]:nn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Pr,[te]:[en]},rt={[ee]:nn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:nn,[te]:[{[ke]:"UseFIPS"},!1]},Ch={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},KT={[ee]:Pr,[te]:[Yu]},ZT={[ke]:KP},QT={[L]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Th={[On]:[{[hn]:!0,[Gt]:QS,[pn]:vf,[KS]:["*"]},{[hn]:!0,[Gt]:"sigv4",[pn]:vf,[Bn]:"{Region}"}]},N0={[ee]:nn,[te]:[{[ke]:"ForcePathStyle"},!1]},sde={[ke]:"ForcePathStyle"},fn={[ee]:nn,[te]:[{[ke]:"Accelerate"},!1]},wn={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"us-east-1"}]},lt={[ee]:Pr,[te]:[wn]},An={[ee]:nn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},YT={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{Region}"}]},[Re]:{}},gn={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{Region}"}]},In={[ee]:nn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},XT={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},WT={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},JT={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},z0={[ee]:nn,[te]:[{[ee]:Vt,[te]:[sN,"isIp"]},!1]},L0={[Ee]:QP,[xe]:gn,[Re]:{}},Hv={[Ee]:wp,[xe]:gn,[Re]:{}},eA={[me]:Hv,[M]:me},B0={[Ee]:YP,[xe]:gn,[Re]:{}},tA={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},Ah={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},gs={[ke]:WP},iN={[ke]:JP},$0={[ee]:Vt,[te]:[gs,"service"]},WS={[ke]:XS},nA={[L]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},sA={[L]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},rA={[L]:[{[ee]:ks,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:nn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},U0={[L]:[{[ee]:ks,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:nn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},aN={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},cN={[ee]:Vt,[te]:[gs,"accountId"]},j0={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:YS,[Bn]:"{bucketArn#region}"}]},oA={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},H0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},F0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},V0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},iA={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},aA={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},Bu={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:ol,[Bn]:"{bucketArn#region}"}]},cA={[On]:[{[hn]:!0,[Gt]:QS,[pn]:vf,[KS]:["*"]},{[hn]:!0,[Gt]:"sigv4",[pn]:vf,[Bn]:"{bucketArn#region}"}]},lA={[ee]:XP,[te]:[dt]},uA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},fA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},dA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},q0={[Ee]:tN,[xe]:gn,[Re]:{}},hA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:gn,[Re]:{}},pA={[ke]:"UseObjectLambdaEndpoint"},G0={[On]:[{[hn]:!0,[Gt]:"sigv4",[pn]:YS,[Bn]:"{Region}"}]},mA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},gA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},yA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},K0={[Ee]:$h,[xe]:gn,[Re]:{}},vA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:gn,[Re]:{}},Z0=[{[ke]:"Region"}],rde=[{[ke]:"Endpoint"}],ode=[dt],Q0=[tr],$c=[en,ns],bA=[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:nn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],ide=[rN],Y0=[oN],Js=[nN],X0=[Nt,Ot],Xu=[Nt,rt],Wu=[et,Ot],Ju=[et,rt],SA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[L]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me}],_A=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],wA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],EA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],xA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[L]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me},{[L]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[hn]:!0,[Gt]:"sigv4-s3express",[pn]:"s3express",[Bn]:"{Region}"}]},[Re]:{}},[M]:me}],RA=[dt,0,7,!0],CA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],TA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],AA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],IA=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],OA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],ade=[Yu],MA=[{[ee]:Ka,[te]:[{[ke]:jv},!1]}],DA=[{[ee]:pt,[te]:[{[ke]:ZP},"beta"]}],cde=["*"],kA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!1]}],gi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],W0=[{[ee]:pt,[te]:[iN,eN]}],PA=[{[ee]:Vt,[te]:[gs,"resourceId[1]"],[We]:XS},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[WS,Ep]}]}],lde=[gs,"resourceId[1]"],NA=[Ot],J0=[{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},Ep]}]}],zA=[{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[2]"]}]}]}],ude=[gs,"resourceId[2]"],ev=[{[ee]:Sp,[te]:[{[ee]:Vt,[te]:[gs,"region"]}],[We]:"bucketPartition"}],LA=[{[ee]:pt,[te]:[aN,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],tv=[{[ee]:Ka,[te]:[{[ee]:Vt,[te]:[gs,"region"]},!0]}],nv=[{[ee]:Ka,[te]:[cN,!1]}],BA=[{[ee]:Ka,[te]:[WS,!1]}],Ih=[Nt],$A=[{[ee]:Ka,[te]:[{[ke]:"Region"},!0]}],fde={parameters:{Bucket:Lc,Region:Lc,UseFIPS:Bc,UseDualStack:Bc,Endpoint:Lc,ForcePathStyle:Bc,Accelerate:Bc,UseGlobalEndpoint:Bc,UseObjectLambdaEndpoint:Lu,Key:Lc,Prefix:Lc,CopySource:Lc,DisableAccessPoints:Lu,DisableMultiRegionAccessPoints:Bc,UseArnRegion:Lu,UseS3ExpressControlEndpoint:Lu,DisableS3ExpressSessionAuth:Lu},[ce]:[{[L]:[{[ee]:ks,[te]:Z0}],[ce]:[{[L]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[L]:[Ot,en],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[L]:[en,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[L]:[en,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[L]:[Nt,nN,jT],error:"Partition does not support FIPS",[M]:Ae},{[L]:[Yu,{[ee]:kt,[te]:[dt,0,tde,Tr],[We]:MT},{[ee]:pt,[te]:[{[ke]:MT},"--x-s3"]}],[ce]:[HT,FT,{[L]:[qT,GT],[ce]:[{[L]:Js,[ce]:[{[L]:[rN,Ke],[ce]:[{[L]:X0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:Y0,[ce]:[{[L]:Js,[ce]:[{[L]:bA,[ce]:[{[L]:SA,[ce]:Ar,[M]:ue},{[L]:_A,[ce]:Ar,[M]:ue},{[L]:wA,[ce]:Ar,[M]:ue},{[L]:EA,[ce]:Ar,[M]:ue},{[L]:xA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[L]:SA,[ce]:Ir,[M]:ue},{[L]:_A,[ce]:Ir,[M]:ue},{[L]:wA,[ce]:Ir,[M]:ue},{[L]:EA,[ce]:Ir,[M]:ue},{[L]:xA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},VT],[M]:ue},{[L]:[Yu,{[ee]:kt,[te]:RA,[We]:DT},{[ee]:pt,[te]:[{[ke]:DT},"--xa-s3"]}],[ce]:[HT,FT,{[L]:Y0,[ce]:[{[L]:Js,[ce]:[{[L]:bA,[ce]:[{[L]:CA,[ce]:Ar,[M]:ue},{[L]:TA,[ce]:Ar,[M]:ue},{[L]:AA,[ce]:Ar,[M]:ue},{[L]:IA,[ce]:Ar,[M]:ue},{[L]:OA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[L]:CA,[ce]:Ir,[M]:ue},{[L]:TA,[ce]:Ir,[M]:ue},{[L]:AA,[ce]:Ir,[M]:ue},{[L]:IA,[ce]:Ir,[M]:ue},{[L]:OA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},VT],[M]:ue},{[L]:[KT,qT,GT],[ce]:[{[L]:Js,[ce]:[{[L]:$c,endpoint:{[Ee]:$h,[xe]:Os,[Re]:Ve},[M]:me},{[L]:X0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[L]:[Yu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:KP},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:ZP},{[ee]:kt,[te]:RA,[We]:kT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:jv},{[ee]:Sp,[te]:Z0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:kT},"--op-s3"]}],[ce]:[{[L]:MA,[ce]:[{[L]:Y0,[ce]:[{[L]:[{[ee]:pt,[te]:[ZT,"e"]}],[ce]:[{[L]:DA,[ce]:[QT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{[L]:[{[ee]:pt,[te]:[ZT,"o"]}],[ce]:[{[L]:DA,[ce]:[QT,{[L]:$c,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[L]:ade,[ce]:[{[L]:[en,{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:ZS,[te]:rde}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[L]:[N0,oN],[ce]:[{[L]:Js,[ce]:[{[L]:kA,[ce]:[{[L]:[tr,jT],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[L]:[Ot,Nt,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Nt,fn,Ke,lt,An],[ce]:[{endpoint:YT,[M]:me}],[M]:ue},{[L]:[Ot,Nt,fn,Ke,lt,In],endpoint:YT,[M]:me},{[L]:[rt,Nt,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Nt,fn,Ke,lt,An],[ce]:[{endpoint:XT,[M]:me}],[M]:ue},{[L]:[rt,Nt,fn,Ke,lt,In],endpoint:XT,[M]:me},{[L]:[Ot,et,tr,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:WT,[M]:me}],[M]:ue},{[L]:[Ot,et,tr,Ke,lt,In],endpoint:WT,[M]:me},{[L]:[Ot,et,fn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,et,fn,Ke,lt,An],[ce]:[{endpoint:JT,[M]:me}],[M]:ue},{[L]:[Ot,et,fn,Ke,lt,In],endpoint:JT,[M]:me},{[L]:[rt,et,fn,en,ns,P0,wn],endpoint:{[Ee]:QP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,en,ns,z0,wn],endpoint:{[Ee]:wp,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,en,ns,P0,lt,An],[ce]:[{[L]:gi,endpoint:L0,[M]:me},{endpoint:L0,[M]:me}],[M]:ue},{[L]:[rt,et,fn,en,ns,z0,lt,An],[ce]:[{[L]:gi,endpoint:Hv,[M]:me},eA],[M]:ue},{[L]:[rt,et,fn,en,ns,P0,lt,In],endpoint:L0,[M]:me},{[L]:[rt,et,fn,en,ns,z0,lt,In],endpoint:Hv,[M]:me},{[L]:[rt,et,tr,Ke,wn],endpoint:{[Ee]:YP,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,tr,Ke,lt,An],[ce]:[{[L]:gi,endpoint:B0,[M]:me},{endpoint:B0,[M]:me}],[M]:ue},{[L]:[rt,et,tr,Ke,lt,In],endpoint:B0,[M]:me},{[L]:[rt,et,fn,Ke,wn],endpoint:{[Ee]:PT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,et,fn,Ke,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:PT,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:tA,[M]:me}],[M]:ue},{[L]:[rt,et,fn,Ke,lt,In],endpoint:tA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[en,ns,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[sN,"scheme"]},"http"]},{[ee]:_p,[te]:[dt,Tr]},N0,et,rt,fn],[ce]:[{[L]:Js,[ce]:[{[L]:kA,[ce]:[eA],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[N0,{[ee]:XP,[te]:ode,[We]:WP}],[ce]:[{[L]:[{[ee]:Vt,[te]:[gs,"resourceId[0]"],[We]:JP},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[iN,Ep]}]}],[ce]:[{[L]:[{[ee]:pt,[te]:[$0,YS]}],[ce]:[{[L]:W0,[ce]:[{[L]:PA,[ce]:[nA,sA,{[L]:J0,[ce]:[rA,{[L]:zA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:LA,[ce]:[{[L]:tv,[ce]:[{[L]:[{[ee]:pt,[te]:[cN,Ep]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[L]:nv,[ce]:[{[L]:BA,[ce]:[{[L]:$c,endpoint:{[Ee]:NT,[xe]:j0,[Re]:Ve},[M]:me},{[L]:Ih,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:j0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:j0,[Re]:Ve},[M]:me}],[M]:ue},oA],[M]:ue},H0],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},iA],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},aA],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[L]:W0,[ce]:[{[L]:PA,[ce]:[{[L]:J0,[ce]:[{[L]:W0,[ce]:[{[L]:J0,[ce]:[rA,{[L]:zA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:[{[ee]:pt,[te]:[aN,"{partitionResult#name}"]}],[ce]:[{[L]:tv,[ce]:[{[L]:[{[ee]:pt,[te]:[$0,ol]}],[ce]:[{[L]:nv,[ce]:[{[L]:BA,[ce]:[{[L]:Q0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[L]:X0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Wu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[L]:[et,rt,en,ns],endpoint:{[Ee]:NT,[xe]:Bu,[Re]:Ve},[M]:me},{[L]:Ju,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me}],[M]:ue},oA],[M]:ue},H0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},iA],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:Ka,[te]:[WS,Tr]}],[ce]:[{[L]:NA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[L]:Ih,error:"S3 MRAP does not support FIPS",[M]:Ae},{[L]:Q0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:nn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[L]:[{[ee]:Sp,[te]:Z0,[We]:zT}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:zT},Gt]},{[ee]:Vt,[te]:[gs,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[hn]:Tr,name:QS,[pn]:ol,[KS]:cde}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},aA],[M]:ue},{[L]:[{[ee]:pt,[te]:[$0,vf]}],[ce]:[{[L]:NA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[L]:Ih,error:"S3 Outposts does not support FIPS",[M]:Ae},{[L]:Q0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[L]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[L]:[{[ee]:Vt,[te]:lde,[We]:jv}],[ce]:[{[L]:MA,[ce]:[U0,{[L]:ev,[ce]:[{[L]:Js,[ce]:[{[L]:LA,[ce]:[{[L]:tv,[ce]:[{[L]:nv,[ce]:[{[L]:[{[ee]:Vt,[te]:ude,[We]:LT}],[ce]:[{[L]:[{[ee]:Vt,[te]:[gs,"resourceId[3]"],[We]:XS}],[ce]:[{[L]:[{[ee]:pt,[te]:[{[ke]:LT},eN]}],[ce]:[{[L]:$c,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:cA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:cA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},H0],[M]:ue},F0],[M]:ue},V0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[L]:[{[ee]:kt,[te]:[dt,0,4,nde],[We]:BT},{[ee]:pt,[te]:[{[ke]:BT},"arn:"]},{[ee]:Pr,[te]:[{[ee]:ks,[te]:[lA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[L]:[{[ee]:nn,[te]:[sde,Tr]},lA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[L]:ide,[ce]:[{[L]:Js,[ce]:[{[L]:[fn],[ce]:[{[L]:[Ot,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:uA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,Nt,lt,In],endpoint:uA,[M]:me},{[L]:[rt,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:fA,[M]:me}],[M]:ue},{[L]:[rt,Ke,Nt,lt,In],endpoint:fA,[M]:me},{[L]:[Ot,Ke,et,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:dA,[M]:me}],[M]:ue},{[L]:[Ot,Ke,et,lt,In],endpoint:dA,[M]:me},{[L]:[rt,en,ns,et,wn],endpoint:{[Ee]:tN,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,en,ns,et,lt,An],[ce]:[{[L]:gi,endpoint:q0,[M]:me},{endpoint:q0,[M]:me}],[M]:ue},{[L]:[rt,en,ns,et,lt,In],endpoint:q0,[M]:me},{[L]:[rt,Ke,et,wn],endpoint:{[Ee]:$T,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[rt,Ke,et,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:$T,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:hA,[M]:me}],[M]:ue},{[L]:[rt,Ke,et,lt,In],endpoint:hA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[L]:[{[ee]:ks,[te]:[pA]},{[ee]:nn,[te]:[pA,Tr]}],[ce]:[{[L]:Js,[ce]:[{[L]:$A,[ce]:[nA,sA,{[L]:$c,endpoint:{[Ee]:$h,[xe]:G0,[Re]:Ve},[M]:me},{[L]:Ih,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:G0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:G0,[Re]:Ve},[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[L]:[KT],[ce]:[{[L]:Js,[ce]:[{[L]:$A,[ce]:[{[L]:[Nt,Ot,Ke,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:mA,[M]:me}],[M]:ue},{[L]:[Nt,Ot,Ke,lt,In],endpoint:mA,[M]:me},{[L]:[Nt,rt,Ke,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:gA,[M]:me}],[M]:ue},{[L]:[Nt,rt,Ke,lt,In],endpoint:gA,[M]:me},{[L]:[et,Ot,Ke,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:yA,[M]:me}],[M]:ue},{[L]:[et,Ot,Ke,lt,In],endpoint:yA,[M]:me},{[L]:[et,rt,en,ns,wn],endpoint:{[Ee]:$h,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,en,ns,lt,An],[ce]:[{[L]:gi,endpoint:K0,[M]:me},{endpoint:K0,[M]:me}],[M]:ue},{[L]:[et,rt,en,ns,lt,In],endpoint:K0,[M]:me},{[L]:[et,rt,Ke,wn],endpoint:{[Ee]:UT,[xe]:Tn,[Re]:Ve},[M]:me},{[L]:[et,rt,Ke,lt,An],[ce]:[{[L]:gi,endpoint:{[Ee]:UT,[xe]:gn,[Re]:Ve},[M]:me},{endpoint:vA,[M]:me}],[M]:ue},{[L]:[et,rt,Ke,lt,In],endpoint:vA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},dde=fde,hde=new gM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),lN=(e,t={})=>hde.get(e,()=>TM(dde,{endpointParams:e,logger:t.logger}));hf.aws=kb;const pde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=Eo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await tD(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},mde=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),gde=pde(mde);function uN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function fN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const yde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,v=h.toLowerCase();h!==v&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${v}'`);let b;if(v==="sigv4a"){b="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(GP.sigv4aDependency()==="none"&&R)continue}else if(v.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);const _=n[b];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${b}'`);const x=_(i);x.schemeId=b,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},vde=e=>{const t=[];switch(e.operation){default:t.push(uN(e)),t.push(fN(e))}return t},bde=yde(lN,vde,{"aws.auth#sigv4":uN,"aws.auth#sigv4a":fN}),Sde=e=>{const t=LM(e),n=ZK(t);return Object.assign(n,{authSchemePreference:Ns(e.authSchemePreference??[])})},_de=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),JS={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class jn extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,jn.prototype)}}class e_ extends jn{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,e_.prototype)}}class t_ extends jn{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,t_.prototype)}}class n_ extends jn{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends jn{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends jn{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends jn{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class i_ extends jn{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,i_.prototype)}}class a_ extends jn{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,a_.prototype)}}class c_ extends jn{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,c_.prototype)}}class l_ extends jn{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,l_.prototype)}}class u_ extends jn{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,u_.prototype)}}class f_ extends jn{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,f_.prototype)}}class d_ extends jn{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,d_.prototype)}}class h_ extends jn{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,h_.prototype)}}const dN="ACL",wde="AbortDate",UA="AccessKeyId",Ede="AbortMultipartUpload",xde="AbortMultipartUploadOutput",Rde="AbortMultipartUploadRequest",Cde="AcceptRanges",Tde="AbortRuleId",Ade="AccessTier",is="Bucket",Ide="BucketArn",Ode="BucketAlreadyExists",Mde="BucketAlreadyOwnedByYou",Dde="BypassGovernanceRetention",To="BucketKeyEnabled",hN="BucketRegion",p_="Body",pN="Buckets",Cl="ChecksumAlgorithm",m_="CacheControl",Fi="ChecksumCRC32",Vi="ChecksumCRC32C",qi="ChecksumCRC64NVME",g_="Cache-Control",kde="CreationDate",y_="Content-Disposition",v_="ContentDisposition",b_="Content-Encoding",S_="ContentEncoding",__="ContentLanguage",w_="Content-Language",E_="Content-Length",x_="ContentLength",R_="Content-MD5",C_="ContentMD5",Pde="CompletedMultipartUpload",Nde="CompleteMultipartUploadOutput",zde="CreateMultipartUploadOutput",Lde="CompleteMultipartUploadResult",Bde="CompleteMultipartUploadRequest",$de="CreateMultipartUploadRequest",mN="CompleteMultipartUpload",Ude="CreateMultipartUpload",jde="ChecksumMode",Hde="CommonPrefix",Fde="CommonPrefixList",Vde="CompletedPartList",qde="CompletedPart",Gde="CommonPrefixes",Kde="ContentRange",Zde="Content-Range",Gi="ChecksumSHA1",Ki="ChecksumSHA256",Qde="CreateSessionOutput",Yde="CreateSessionResult",Xde="CreateSessionRequest",Wde="CreateSession",Za="ChecksumType",T_="Content-Type",A_="ContentType",bm="ContinuationToken",Jde="Contents",jA="Credentials",gN="DeleteMarker",ehe="DisplayName",the="DeleteObjectOutput",nhe="DeleteObjectRequest",she="DeleteObject",yN="Delimiter",bf="Expiration",Ao="ExpectedBucketOwner",HA="ExpiresString",rhe="EncryptionTypeMismatch",_o="ETag",vN="EncodingType",il="Expires",ohe="FetchOwner",bN="GrantFullControl",ihe="GetObject",ahe="GetObjectOutput",che="GetObjectRequest",SN="GrantRead",_N="GrantReadACP",wN="GrantWriteACP",lhe="ID",Sm="IfMatch",uhe="IfMatchInitiatedTime",fhe="IfMatchLastModifiedTime",dhe="IfMatchSize",hhe="If-Modified-Since",phe="IfModifiedSince",mhe="InitiateMultipartUploadResult",_m="If-Match",I_="IfNoneMatch",O_="If-None-Match",ghe="InvalidObjectState",yhe="IdempotencyParameterMismatch",vhe="InvalidRequest",bhe="IsRestoreInProgress",She="IsTruncated",_he="IfUnmodifiedSince",whe="If-Unmodified-Since",Ehe="InvalidWriteOffset",ur="Key",xhe="KeyCount",Rhe="Location",Che="ListAllMyBucketsResult",The="ListBuckets",Ahe="ListBucketsOutput",Ihe="ListBucketsRequest",Ohe="ListBucketResult",EN="LastModified",Mhe="Last-Modified",Dhe="ListObjectsV2",khe="ListObjectsV2Output",Phe="ListObjectsV2Request",M_="Metadata",Nhe="MaxBuckets",zhe="MFA",xN="MaxKeys",Lhe="MissingMeta",Bhe="MpuObjectSize",$he="MultipartUpload",RN="Name",Uhe="NextContinuationToken",jhe="NotFound",Hhe="NoSuchBucket",Fhe="NoSuchKey",Vhe="NoSuchUpload",D_="Owner",qhe="ObjectAlreadyInActiveTierError",k_="ObjectLockLegalHoldStatus",P_="ObjectLockMode",N_="ObjectLockRetainUntilDate",Ghe="ObjectList",Khe="ObjectNotInActiveTierError",Zhe="OptionalObjectAttributes",Qhe="Object",Lf="Prefix",Yhe="PartsCount",z_="PartNumber",Xhe="PutObject",Whe="PutObjectOutput",Jhe="PutObjectRequest",epe="PutObjectTagging",tpe="PutObjectTaggingOutput",npe="PutObjectTaggingRequest",spe="Parts",rpe="Part",Zi="RequestCharged",ope="ResponseCacheControl",ipe="ResponseContentDisposition",ape="ResponseContentEncoding",cpe="ResponseContentLanguage",lpe="ResponseContentType",upe="ResponseExpires",fpe="RestoreExpiryDate",Io="RequestPayer",dpe="ReplicationStatus",CN="RestoreStatus",FA="Range",hpe="Restore",TN="StartAfter",VA="SecretAccessKey",ppe="StreamingBlob",Bf="StorageClass",mpe="SessionCredentialValue",gpe="SessionCredentials",ype="SessionMode",Oo="ServerSideEncryption",Mo="SSECustomerAlgorithm",Tl="SSECustomerKey",Do="SSECustomerKeyMD5",Qa="SSEKMSEncryptionContext",Ur="SSEKMSKeyId",qA="SessionToken",AN="Size",vpe="TagCount",bpe="TooManyParts",IN="TagSet",ON="Tag",Sf="Tagging",wm="UploadId",Spe="UploadPart",_pe="UploadPartOutput",wpe="UploadPartRequest",Epe="Value",Qi="VersionId",xpe="WriteOffsetBytes",L_="WebsiteRedirectLocation",Rpe="accept-ranges",Cpe="bucket-region",bs="client",MN="continuation-token",Tpe="delimiter",Ss="error",Ape="encoding-type",Ipe="fetch-owner",wr="http",Em="httpChecksum",Bs="httpError",U="httpHeader",DN="httpPayload",B_="httpPrefixHeaders",Bt="httpQuery",Ope="max-buckets",Mpe="max-keys",kN="prefix",PN="partNumber",Dpe="response-cache-control",kpe="response-content-disposition",Ppe="response-content-encoding",Npe="response-content-language",zpe="response-content-type",Lpe="response-expires",Bpe="streaming",$pe="start-after",NN="smithy.ts.sdk.synthetic.com.amazonaws.s3",$_="uploadId",U_="versionId",xp="xmlFlattened",Wn="xmlName",zN="x-amz-acl",Upe="x-amz-abort-date",jpe="x-amz-abort-rule-id",Hpe="x-amz-bypass-governance-retention",LN="x-amz-checksum-algorithm",Al="x-amz-checksum-crc32",Il="x-amz-checksum-crc32c",Ol="x-amz-checksum-crc64nvme",Fpe="x-amz-checksum-mode",Ml="x-amz-checksum-sha1",Dl="x-amz-checksum-sha256",Vpe="x-amz-create-session-mode",$f="x-amz-checksum-type",BN="x-amz-delete-marker",j_="x-amz-expiration",ko="x-amz-expected-bucket-owner",$N="x-amz-grant-full-control",UN="x-amz-grant-read",jN="x-amz-grant-read-acp",HN="x-amz-grant-write-acp",qpe="x-amz-if-match-initiated-time",Gpe="x-amz-if-match-last-modified-time",Kpe="x-amz-if-match-size",H_="x-amz-meta-",Zpe="x-amz-mfa",Qpe="x-amz-missing-meta",Ype="x-amz-mp-object-size",Xpe="x-amz-mp-parts-count",F_="x-amz-object-lock-legal-hold",V_="x-amz-object-lock-mode",q_="x-amz-object-lock-retain-until-date",Wpe="x-amz-optional-object-attributes",Jpe="x-amz-object-size",eme="x-amz-restore",Yi="x-amz-request-charged",Po="x-amz-request-payer",tme="x-amz-replication-status",G_="x-amz-storage-class",K_="x-amz-sdk-checksum-algorithm",No="x-amz-server-side-encryption",zo="x-amz-server-side-encryption-aws-kms-key-id",Lo="x-amz-server-side-encryption-bucket-key-enabled",kl="x-amz-server-side-encryption-context",Bo="x-amz-server-side-encryption-customer-algorithm",Uf="x-amz-server-side-encryption-customer-key",$o="x-amz-server-side-encryption-customer-key-MD5",FN="x-amz-tagging",nme="x-amz-tagging-count",jf="x-amz-version-id",sme="x-amz-write-offset-bytes",Z_="x-amz-website-redirect-location",we="com.amazonaws.s3";var GA=[0,we,mpe,8,0],Hf=[0,we,Tl,8,0],Pl=[0,we,Qa,8,0],Uo=[0,we,Ur,8,0],Q_=[0,we,ppe,{[Bpe]:1},42],rme=[3,we,xde,0,[Zi],[[0,{[U]:Yi}]]],ome=[3,we,Rde,0,[is,ur,wm,Io,Ao,uhe],[[0,1],[0,1],[0,{[Bt]:$_}],[0,{[U]:Po}],[0,{[U]:ko}],[6,{[U]:qpe}]],3],ime=[3,we,is,0,[RN,kde,hN,Ide],[0,4,0,0]],ame=[-3,we,Ode,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(we).registerError(ame,n_);var cme=[-3,we,Mde,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(we).registerError(cme,s_);var lme=[3,we,Hde,0,[Lf],[0]],ume=[3,we,Pde,0,[spe],[[()=>Wme,{[xp]:1,[Wn]:rpe}]]],fme=[3,we,qde,0,[_o,Fi,Vi,qi,Gi,Ki,z_],[0,0,0,0,0,0,1]],dme=[3,we,Nde,{[Wn]:Lde},[Rhe,is,ur,bf,_o,Fi,Vi,qi,Gi,Ki,Za,Oo,Qi,Ur,To,Zi],[0,0,0,[0,{[U]:j_}],0,0,0,0,0,0,0,[0,{[U]:No}],[0,{[U]:jf}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:Yi}]]],hme=[3,we,Bde,0,[is,ur,wm,$he,Fi,Vi,qi,Gi,Ki,Za,Bhe,Io,Ao,Sm,I_,Mo,Tl,Do],[[0,1],[0,1],[0,{[Bt]:$_}],[()=>ume,{[DN]:1,[Wn]:mN}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[1,{[U]:Ype}],[0,{[U]:Po}],[0,{[U]:ko}],[0,{[U]:_m}],[0,{[U]:O_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}]],3],pme=[3,we,zde,{[Wn]:mhe},[wde,Tde,is,ur,wm,Oo,Mo,Do,Ur,Qa,To,Zi,Cl,Za],[[4,{[U]:Upe}],[0,{[U]:jpe}],[0,{[Wn]:is}],0,0,[0,{[U]:No}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Yi}],[0,{[U]:LN}],[0,{[U]:$f}]]],mme=[3,we,$de,0,[is,ur,dN,m_,v_,S_,__,A_,il,bN,SN,_N,wN,M_,Oo,Bf,L_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,P_,N_,k_,Ao,Cl,Za],[[0,1],[0,1],[0,{[U]:zN}],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[0,{[U]:T_}],[4,{[U]:il}],[0,{[U]:$N}],[0,{[U]:UN}],[0,{[U]:jN}],[0,{[U]:HN}],[128,{[B_]:H_}],[0,{[U]:No}],[0,{[U]:G_}],[0,{[U]:Z_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Po}],[0,{[U]:FN}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}],[0,{[U]:ko}],[0,{[U]:LN}],[0,{[U]:$f}]],2],gme=[3,we,Qde,{[Wn]:Yde},[jA,Oo,Ur,Qa,To],[[()=>Fme,{[Wn]:jA}],[0,{[U]:No}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}]],1],yme=[3,we,Xde,0,[is,ype,Oo,Ur,Qa,To],[[0,1],[0,{[U]:Vpe}],[0,{[U]:No}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}]],1],vme=[3,we,the,0,[gN,Qi,Zi],[[2,{[U]:BN}],[0,{[U]:jf}],[0,{[U]:Yi}]]],bme=[3,we,nhe,0,[is,ur,zhe,Qi,Io,Dde,Ao,Sm,fhe,dhe],[[0,1],[0,1],[0,{[U]:Zpe}],[0,{[Bt]:U_}],[0,{[U]:Po}],[2,{[U]:Hpe}],[0,{[U]:ko}],[0,{[U]:_m}],[6,{[U]:Gpe}],[1,{[U]:Kpe}]],2],Sme=[-3,we,rhe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Sme,c_);var _me=[3,we,ahe,0,[p_,gN,Cde,bf,hpe,EN,x_,_o,Fi,Vi,qi,Gi,Ki,Za,Lhe,Qi,m_,v_,S_,__,Kde,A_,il,HA,L_,Oo,M_,Mo,Do,Ur,To,Bf,Zi,dpe,Yhe,vpe,P_,N_,k_],[[()=>Q_,16],[2,{[U]:BN}],[0,{[U]:Rpe}],[0,{[U]:j_}],[0,{[U]:eme}],[4,{[U]:Mhe}],[1,{[U]:E_}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[1,{[U]:Qpe}],[0,{[U]:jf}],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[0,{[U]:Zde}],[0,{[U]:T_}],[4,{[U]:il}],[0,{[U]:HA}],[0,{[U]:Z_}],[0,{[U]:No}],[128,{[B_]:H_}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:G_}],[0,{[U]:Yi}],[0,{[U]:tme}],[1,{[U]:Xpe}],[1,{[U]:nme}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}]]],wme=[3,we,che,0,[is,ur,Sm,phe,I_,_he,FA,ope,ipe,ape,cpe,lpe,upe,Qi,Mo,Tl,Do,Io,z_,Ao,jde],[[0,1],[0,1],[0,{[U]:_m}],[4,{[U]:hhe}],[0,{[U]:O_}],[4,{[U]:whe}],[0,{[U]:FA}],[0,{[Bt]:Dpe}],[0,{[Bt]:kpe}],[0,{[Bt]:Ppe}],[0,{[Bt]:Npe}],[0,{[Bt]:zpe}],[6,{[Bt]:Lpe}],[0,{[Bt]:U_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[0,{[U]:Po}],[1,{[Bt]:PN}],[0,{[U]:ko}],[0,{[U]:Fpe}]],2],Eme=[-3,we,yhe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Eme,d_);var xme=[-3,we,ghe,{[Ss]:bs,[Bs]:403},[Bf,Ade],[0,0]];Mt.for(we).registerError(xme,o_);var Rme=[-3,we,vhe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Rme,l_);var Cme=[-3,we,Ehe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Cme,u_);var Tme=[3,we,Ahe,{[Wn]:Che},[pN,D_,bm,Lf],[[()=>Yme,0],()=>VN,0,0]],Ame=[3,we,Ihe,0,[Nhe,bm,Lf,hN],[[1,{[Bt]:Ope}],[0,{[Bt]:MN}],[0,{[Bt]:kN}],[0,{[Bt]:Cpe}]]],Ime=[3,we,khe,{[Wn]:Ohe},[She,Jde,RN,Lf,yN,xN,Gde,vN,xhe,bm,Uhe,TN,Zi],[2,[()=>Jme,{[xp]:1}],0,0,0,1,[()=>Xme,{[xp]:1}],0,1,0,0,0,[0,{[U]:Yi}]]],Ome=[3,we,Phe,0,[is,yN,vN,xN,Lf,bm,ohe,TN,Io,Ao,Zhe],[[0,1],[0,{[Bt]:Tpe}],[0,{[Bt]:Ape}],[1,{[Bt]:Mpe}],[0,{[Bt]:kN}],[0,{[Bt]:MN}],[2,{[Bt]:Ipe}],[0,{[Bt]:$pe}],[0,{[U]:Po}],[0,{[U]:ko}],[64,{[U]:Wpe}]],1],Mme=[-3,we,Hhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(Mme,r_);var Dme=[-3,we,Fhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(Dme,i_);var kme=[-3,we,Vhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(we).registerError(kme,e_);var Pme=[-3,we,jhe,{[Ss]:bs},[],[]];Mt.for(we).registerError(Pme,a_);var Nme=[3,we,Qhe,0,[ur,EN,_o,Cl,Za,AN,Bf,D_,CN],[0,4,0,[64,{[xp]:1}],0,1,0,()=>VN,()=>Hme]],zme=[-3,we,qhe,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(we).registerError(zme,h_);var Lme=[-3,we,Khe,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(we).registerError(Lme,t_);var VN=[3,we,D_,0,[ehe,lhe],[0,0]],Bme=[3,we,Whe,0,[bf,_o,Fi,Vi,qi,Gi,Ki,Za,Oo,Qi,Mo,Do,Ur,Qa,To,AN,Zi],[[0,{[U]:j_}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:$f}],[0,{[U]:No}],[0,{[U]:jf}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[1,{[U]:Jpe}],[0,{[U]:Yi}]]],$me=[3,we,Jhe,0,[is,ur,dN,p_,m_,v_,S_,__,x_,C_,A_,Cl,Fi,Vi,qi,Gi,Ki,il,Sm,I_,bN,SN,_N,wN,xpe,M_,Oo,Bf,L_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,P_,N_,k_,Ao],[[0,1],[0,1],[0,{[U]:zN}],[()=>Q_,16],[0,{[U]:g_}],[0,{[U]:y_}],[0,{[U]:b_}],[0,{[U]:w_}],[1,{[U]:E_}],[0,{[U]:R_}],[0,{[U]:T_}],[0,{[U]:K_}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[4,{[U]:il}],[0,{[U]:_m}],[0,{[U]:O_}],[0,{[U]:$N}],[0,{[U]:UN}],[0,{[U]:jN}],[0,{[U]:HN}],[1,{[U]:sme}],[128,{[B_]:H_}],[0,{[U]:No}],[0,{[U]:G_}],[0,{[U]:Z_}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[()=>Pl,{[U]:kl}],[2,{[U]:Lo}],[0,{[U]:Po}],[0,{[U]:FN}],[0,{[U]:V_}],[5,{[U]:q_}],[0,{[U]:F_}],[0,{[U]:ko}]],2],Ume=[3,we,tpe,0,[Qi],[[0,{[U]:jf}]]],jme=[3,we,npe,0,[is,ur,Sf,Qi,C_,Cl,Ao,Io],[[0,1],[0,1],[()=>qme,{[DN]:1,[Wn]:Sf}],[0,{[Bt]:U_}],[0,{[U]:R_}],[0,{[U]:K_}],[0,{[U]:ko}],[0,{[U]:Po}]],3],Hme=[3,we,CN,0,[bhe,fpe],[2,4]],Fme=[3,we,gpe,0,[UA,VA,qA,bf],[[0,{[Wn]:UA}],[()=>GA,{[Wn]:VA}],[()=>GA,{[Wn]:qA}],[4,{[Wn]:bf}]],4],Vme=[3,we,ON,0,[ur,Epe],[0,0],2],qme=[3,we,Sf,0,[IN],[[()=>ege,0]],1],Gme=[-3,we,bpe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(we).registerError(Gme,f_);var Kme=[3,we,_pe,0,[Oo,_o,Fi,Vi,qi,Gi,Ki,Mo,Do,Ur,To,Zi],[[0,{[U]:No}],[0,{[U]:_o}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:Bo}],[0,{[U]:$o}],[()=>Uo,{[U]:zo}],[2,{[U]:Lo}],[0,{[U]:Yi}]]],Zme=[3,we,wpe,0,[is,ur,z_,wm,p_,x_,C_,Cl,Fi,Vi,qi,Gi,Ki,Mo,Tl,Do,Io,Ao],[[0,1],[0,1],[1,{[Bt]:PN}],[0,{[Bt]:$_}],[()=>Q_,16],[1,{[U]:E_}],[0,{[U]:R_}],[0,{[U]:K_}],[0,{[U]:Al}],[0,{[U]:Il}],[0,{[U]:Ol}],[0,{[U]:Ml}],[0,{[U]:Dl}],[0,{[U]:Bo}],[()=>Hf,{[U]:Uf}],[0,{[U]:$o}],[0,{[U]:Po}],[0,{[U]:ko}]],4],Qme=[-3,NN,"S3ServiceException",0,[],[]];Mt.for(NN).registerError(Qme,jn);var Yme=[1,we,pN,0,[()=>ime,{[Wn]:is}]],Xme=[1,we,Fde,0,()=>lme],Wme=[1,we,Vde,0,()=>fme],Jme=[1,we,Ghe,0,[()=>Nme,0]],ege=[1,we,IN,0,[()=>Vme,{[Wn]:ON}]],sve=[9,we,Ede,{[wr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>ome,()=>rme],rve=[9,we,mN,{[wr]:["POST","/{Key+}",200]},()=>hme,()=>dme],ove=[9,we,Ude,{[wr]:["POST","/{Key+}?uploads",200]},()=>mme,()=>pme],tge=[9,we,Wde,{[wr]:["GET","/?session",200]},()=>yme,()=>gme],ive=[9,we,she,{[wr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>bme,()=>vme],ave=[9,we,ihe,{[Em]:"-",[wr]:["GET","/{Key+}?x-id=GetObject",200]},()=>wme,()=>_me],nge=[9,we,The,{[wr]:["GET","/?x-id=ListBuckets",200]},()=>Ame,()=>Tme],sge=[9,we,Dhe,{[wr]:["GET","/?list-type=2",200]},()=>Ome,()=>Ime],cve=[9,we,Xhe,{[Em]:"-",[wr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>$me,()=>Bme],lve=[9,we,epe,{[Em]:"-",[wr]:["PUT","/{Key+}?tagging",200]},()=>jme,()=>Ume],uve=[9,we,Spe,{[Em]:"-",[wr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>Zme,()=>Kme];class rge extends Br.classBuilder().ep({...JS,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(tge).build(){}const oge="3.975.0",ige={version:oge};function KA(e){return typeof e=="string"?e.length===0:e.byteLength===0}var qN={name:"SHA-1"},ZA={name:"HMAC",hash:qN},age=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),cge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",QA(t),ZA,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!KA(t)){var n=QA(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(ZA,n,t.toHash).then(function(r){return new Uint8Array(r)})}):KA(this.toHash)?Promise.resolve(age):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(qN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function QA(e){return typeof e=="string"?lD(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var lge=(function(){function e(t){if(hD(Ai()))this.hash=new cge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class ef{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&YA(n),new ef(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&YA(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function YA(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class uge{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(ef.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!bge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(sM(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Mge=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class Dge{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Ige({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=kge(t)?Oge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Mge(r):r}}const kge=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,Pge=e=>new Dge(e);async function Nge(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},yi=64,Lge=16,Bge=[1732584193,4023233417,2562383102,271733878];class $ge{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(Uge(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=jge(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===yi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%yi>=yi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(yi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(Lge));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Zn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Zn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Zn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Zn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Zn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Zn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Zn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Zn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Zn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Zn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Zn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Zn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Zn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Zn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Zn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Zn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Qn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Qn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Qn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Qn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Qn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Qn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Qn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Qn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Qn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Qn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Qn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Qn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Qn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Qn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Qn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Qn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Yn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Yn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Yn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Yn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Yn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Yn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Yn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Yn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Yn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Yn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Yn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Yn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Yn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Yn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Yn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Yn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Xn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Xn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Xn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Xn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Xn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Xn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Xn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Xn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Xn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Xn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Xn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Xn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Xn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Xn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Xn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Xn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(Bge),this.buffer=new DataView(new ArrayBuffer(yi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function xm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Zn(e,t,n,r,i,c,l){return xm(t&n|~t&r,e,t,i,c,l)}function Qn(e,t,n,r,i,c,l){return xm(t&r|n&~r,e,t,i,c,l)}function Yn(e,t,n,r,i,c,l){return xm(t^n^r,e,t,i,c,l)}function Xn(e,t,n,r,i,c,l){return xm(n^(t|~r),e,t,i,c,l)}function Uge(e){return typeof e=="string"?e.length===0:e.byteLength===0}function jge(e){return typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const Hge=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??lN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??mG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??bde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Nb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new GK}],logger:e?.logger??new zb,protocol:e?.protocol??BZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??rM,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??GP,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??mf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??ja}),Fge=e=>{const t=yD(e),n=()=>t().then(UM),r=Hge(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??BM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??mD({serviceId:r.serviceId,clientVersion:ige.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Pge,maxAttempts:e?.maxAttempts??gf,md5:e?.md5??$ge,region:e?.region??gD("Region is missing"),requestHandler:Qp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||sD),sha1:e?.sha1??lge,sha256:e?.sha256??pD,streamCollector:e?.streamCollector??Cb,streamHasher:e?.streamHasher??zge,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(ZM)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(QM))}},Vge=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},qge=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Gge=(e,t)=>{const n=Object.assign(wD(e),jM(e),KO(e),Vge(e));return t.forEach(r=>r.configure(n)),Object.assign(e,ED(n),HM(n),ZO(n),qge(n))};class Kge extends $M{config;constructor(...[t]){const n=Fge(t||{});super(n),this.initConfig=n;const r=_de(n),i=mM(r),c=wfe(i),l=aD(c),f=XM(l),d=f,h=nD(d),y=Jfe(h),g=Sde(y),v=jfe(g,{session:[()=>this,rge]}),b=Gge(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(iM(this.config)),this.middlewareStack.use(KM(this.config)),this.middlewareStack.use(cD(this.config)),this.middlewareStack.use(WM(this.config)),this.middlewareStack.use(QO(this.config)),this.middlewareStack.use(YO(this.config)),this.middlewareStack.use(XO(this.config)),this.middlewareStack.use(WO(this.config,{httpAuthSchemeParametersProvider:gde,identityProviderConfigProvider:async _=>new hM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(eM(this.config)),this.middlewareStack.use(Wfe(this.config)),this.middlewareStack.use(yfe(this.config)),this.middlewareStack.use(Tfe(this.config)),this.middlewareStack.use(Nfe(this.config)),this.middlewareStack.use(Ufe(this.config))}destroy(){super.destroy()}}class Zge extends Br.classBuilder().ep(JS).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(nge).build(){}class Qge extends Br.classBuilder().ep({...JS,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),qS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(sge).build(){}let Uh=null,Hu=null;function jr(){if(!Uh){const e=Zp();if(!e)throw new Error("AWS credentials not configured");Uh=new dY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return Uh}function KN(){if(!Hu){const e=Zp();if(!e)throw new Error("AWS credentials not configured");Hu=new Kge({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Hu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Hu}function Yge(){Uh=null,Hu=null}function ZN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:Xge},e[0]=t):t=e[0];const n=NB(t),r=Op(),i=aI();let c;e[1]!==r||e[2]!==i?(c=function(){Xq(),Yge(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=$.jsx(g0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(T$,{className:"size-4"}),y=$.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=$.jsxs(m0,{children:[f,$.jsx(Sh,{children:$.jsx(ga,{children:$.jsx(Or,{to:"/",children:$.jsxs(ya,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=$.jsx(g0,{children:"EC2"}),e[9]=v):v=e[9];let b;e[10]!==n?(b=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=b):b=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(NR,{className:"size-4"}),_=$.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=$.jsx(ga,{children:$.jsx(Or,{to:"/ec2/describe-instances",children:$.jsxs(ya,{isActive:b,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=b,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=$.jsx(I$,{className:"size-4"}),O=$.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=$.jsx(ga,{children:$.jsx(Or,{to:"/ec2/describe-images",children:$.jsxs(ya,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,B;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=$.jsx(M$,{className:"size-4"}),B=$.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=B):(j=e[24],B=e[25]);let k;e[26]!==N?(k=$.jsx(ga,{children:$.jsx(Or,{to:"/ec2/describe-key-pairs",children:$.jsxs(ya,{isActive:N,tooltip:"Key Pairs",children:[j,B]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=$.jsx(R$,{className:"size-4"}),le=$.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=$.jsx(ga,{children:$.jsx(Or,{to:"/ec2/describe-volumes",children:$.jsxs(ya,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=$.jsxs(m0,{children:[v,$.jsxs(Sh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=$.jsx(g0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=$.jsx(NR,{className:"size-4"}),W=$.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let F;e[44]!==fe?(F=$.jsxs(m0,{children:[ye,$.jsx(Sh,{children:$.jsx(ga,{children:$.jsx(Or,{to:"/s3/ls",children:$.jsxs(ya,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=F):F=e[45];let ve;e[46]!==Q||e[47]!==F||e[48]!==g?(ve=$.jsxs(vH,{children:[g,Q,F]}),e[46]=Q,e[47]=F,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=$.jsx(k$,{className:"size-4"}),P=$.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=$.jsx(yH,{children:$.jsx(Sh,{children:$.jsx(ga,{children:$.jsxs(ya,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=$.jsx(gH,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=$.jsxs(pH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function Xge(e){return e.pathname}function Wge(e){const t=Ct.c(18),{error:n,reset:r}=e,i=Jn(),c=aI();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=$.jsx(ZN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=$.jsx(gO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=$.jsx("div",{className:"flex justify-center",children:$.jsx(E$,{className:"size-12 text-destructive"})}),g=$.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const v=n.message||"An unexpected error occurred";let b;t[8]!==v?(b=$.jsx("p",{className:"text-muted-foreground",children:v}),t[8]=v,t[9]=b):b=t[9];let _;t[10]!==f?(_=$.jsx(el,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=$.jsx(Or,{to:"/",children:$.jsx(el,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=$.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==b?(C=$.jsxs($.Fragment,{children:[d,$.jsxs("main",{className:"flex flex-1 flex-col",children:[h,$.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:$.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,b,R]})})]})]}),t[15]=R,t[16]=b,t[17]=C):C=t[17],C}const Y_=_B()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>$.jsxs($.Fragment,{children:[$.jsx(UB,{}),$.jsx(ZN,{}),$.jsxs("main",{className:"flex flex-1 flex-col",children:[$.jsx(gO,{}),$.jsx("div",{className:"flex flex-1 flex-col p-8",children:$.jsx(MI,{})})]})]}),errorComponent:Wge,notFoundComponent:_H}),Jge=()=>sn(()=>import("./login.js"),__vite__mapDeps([0,1])),eye=Xt("/login")({beforeLoad:()=>{if(Zp())throw Yv({to:"/"})},component:yn(Jge,"component")}),tye=()=>sn(()=>import("./route.js"),[]),nye=Xt("/_auth")({beforeLoad:()=>{if(!Zp())throw Yv({to:"/login"})},component:yn(tye,"component")}),sye={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new HP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},rye=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new HP({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),oye={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new hfe({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},QN={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new jP({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},YN=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new jP({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),XN={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new FP({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},iye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new FP({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),aye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new pfe({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},cye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new VP({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},WN=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new VP({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),lye=()=>sn(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),uye=Xt("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(aye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:yn(lye,"component")}),fye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new Zge({});return await KN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},JN=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new Qge({Bucket:e,Prefix:t,Delimiter:"/"});return await KN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),dye=()=>sn(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),hye=Xt("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(fye)},component:yn(dye,"component")}),pye=()=>sn(()=>import("./create-volume.js"),__vite__mapDeps([7,1,8,9,4,10,11])),mye=Xt("/_auth/ec2/(volumes)/create-volume")({head:()=>({meta:[{title:"Create Volume | EC2 | Mulga"}]}),component:yn(pye,"component")}),dve=dl({imageId:go("Please select an Image"),instanceType:go("Please select an instance type"),keyName:go("Please select a key pair"),count:Av("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),hve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),pve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:go().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),mve=dl({size:VO().int("Size must be a whole number").min(1,"Size must be at least 1 GiB").max(16384,"Size must be at most 16384 GiB"),availabilityZone:go().min(1,"Availability zone is required")}),gve=dl({size:VO().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),gye=()=>sn(()=>import("./import-key-pair.js"),__vite__mapDeps([12,1,8,9,4,13,10,11])),yye=Xt("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:yn(gye,"component")}),vye=()=>sn(()=>import("./create-key-pair.js"),__vite__mapDeps([14,1,8,9,4,10,11,15,13,16,17])),bye=Xt("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:yn(vye,"component")}),Sye=()=>sn(()=>import("./run-instances.js"),__vite__mapDeps([18,1,3,8,9,4,16,10,11])),_ye=Xt("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(QN),e.queryClient.ensureQueryData(XN),e.queryClient.ensureQueryData(oye)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:yn(Sye,"component")}),wye=()=>sn(()=>import("./route2.js"),[]),Eye=Xt("/_auth/s3/ls/$bucket")({component:yn(wye,"component")}),xye=()=>sn(()=>import("./index5.js"),__vite__mapDeps([19,3,8,4,20,15,17,21,11])),Rye=Xt("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(JN(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:yn(xye,"component")}),Cye=()=>sn(()=>import("./index6.js"),__vite__mapDeps([22,3,6,4,23])),Tye=Xt("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(cye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:yn(Cye,"component")}),Aye=()=>sn(()=>import("./index7.js"),__vite__mapDeps([24,3,6,4])),Iye=Xt("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(XN)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:yn(Aye,"component")}),Oye=()=>sn(()=>import("./index8.js"),__vite__mapDeps([25,3,6,4,26])),Mye=Xt("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sye)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:yn(Oye,"component")}),Dye=()=>sn(()=>import("./index9.js"),__vite__mapDeps([27,3,6,4,23])),kye=Xt("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(QN)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:yn(Dye,"component")}),Pye=()=>sn(()=>import("./_.js"),__vite__mapDeps([28,3,8,20,15,17,21,11])),Nye=Xt("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=YU(t._splat||"");await e.queryClient.ensureQueryData(JN(t.bucket,n))},head:({params:e})=>({meta:[{title:`${XU(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:yn(Pye,"component")}),zye=()=>sn(()=>import("./_id.js"),__vite__mapDeps([29,1,3,8,9,4,10,11])),Lye=Xt("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(WN(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:yn(zye,"component")}),Bye=()=>sn(()=>import("./_id2.js"),__vite__mapDeps([30,3,8,31,4,15,23,10,11,21])),$ye=Xt("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(WN(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:yn(Bye,"component")}),Uye=()=>sn(()=>import("./_id3.js"),__vite__mapDeps([32,3,8,31,4,15,10,11,21])),jye=Xt("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(iye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:yn(Uye,"component")}),Hye=()=>sn(()=>import("./_id4.js"),__vite__mapDeps([33,3,8,31,4,26,34,10,11,21])),Fye=Xt("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(rye(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(YN(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:yn(Hye,"component")}),Vye=()=>sn(()=>import("./_id5.js"),__vite__mapDeps([35,3,8,4,23,34,31])),qye=Xt("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(YN(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:yn(Vye,"component")}),Gye=eye.update({id:"/login",path:"/login",getParentRoute:()=>Y_}),Hn=nye.update({id:"/_auth",getParentRoute:()=>Y_}),Kye=uye.update({id:"/",path:"/",getParentRoute:()=>Hn}),Zye=hye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>Hn}),Qye=mye.update({id:"/ec2/(volumes)/create-volume",path:"/ec2/create-volume",getParentRoute:()=>Hn}),Yye=yye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>Hn}),Xye=bye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>Hn}),Wye=_ye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>Hn}),X_=Eye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>Hn}),Jye=Rye.update({id:"/",path:"/",getParentRoute:()=>X_}),e0e=Tye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>Hn}),t0e=Iye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>Hn}),n0e=Mye.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>Hn}),s0e=kye.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>Hn}),r0e=Nye.update({id:"/$",path:"/$",getParentRoute:()=>X_}),o0e=Lye.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>Hn}),i0e=$ye.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>Hn}),a0e=jye.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>Hn}),c0e=Fye.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>Hn}),l0e=qye.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>Hn}),u0e={AuthS3LsBucketSplatRoute:r0e,AuthS3LsBucketIndexRoute:Jye},f0e=X_._addFileChildren(u0e),d0e={AuthIndexRoute:Kye,AuthS3LsBucketRouteRoute:f0e,AuthEc2instancesRunInstancesRoute:Wye,AuthEc2keyCreateKeyPairRoute:Xye,AuthEc2keyImportKeyPairRoute:Yye,AuthEc2volumesCreateVolumeRoute:Qye,AuthS3LsIndexRoute:Zye,AuthEc2imagesDescribeImagesIdRoute:l0e,AuthEc2instancesDescribeInstancesIdRoute:c0e,AuthEc2keyDescribeKeyPairsIdRoute:a0e,AuthEc2volumesDescribeVolumesIdRoute:i0e,AuthEc2volumesModifyVolumeIdRoute:o0e,AuthEc2imagesDescribeImagesIndexRoute:s0e,AuthEc2instancesDescribeInstancesIndexRoute:n0e,AuthEc2keyDescribeKeyPairsIndexRoute:t0e,AuthEc2volumesDescribeVolumesIndexRoute:e0e},h0e=Hn._addFileChildren(d0e),p0e={AuthRouteRoute:h0e,LoginRoute:Gye},m0e=Y_._addFileChildren(p0e)._addFileTypes(),ez=new jL,g0e=MB({routeTree:m0e,context:{queryClient:ez},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),sv=document.getElementById("app");sv&&!sv.innerHTML&&GB.createRoot(sv).render($.jsx(I.StrictMode,{children:$.jsx(YB,{defaultTheme:"system",storageKey:"hive-ui-theme",children:$.jsx(FL,{client:ez,children:$.jsx(fH,{children:$.jsx(PB,{router:g0e})})})})}));export{Cj as $,M0e as A,el as B,Dr as C,Lp as D,Ds as E,xf as F,mt as G,FR as H,Ze as I,c0 as J,Si as K,En as L,bt as M,P0e as N,MI as O,xn as P,os as Q,R2 as R,f5 as S,d5 as T,E0e as U,wo as V,ot as W,Oj as X,m9 as Y,zr as Z,Ku as _,tn as a,eve as a$,x2 as a0,vb as a1,Nj as a2,V2 as a3,J2 as a4,Mp as a5,Yh as a6,B0e as a7,O2 as a8,fb as a9,Rye as aA,T0e as aB,JN as aC,cye as aD,Or as aE,sye as aF,Nye as aG,YU as aH,A0e as aI,XU as aJ,$C as aK,Mi as aL,$v as aM,tve as aN,qP as aO,fZ as aP,vp as aQ,za as aR,fD as aS,dD as aT,UQ as aU,qQ as aV,jQ as aW,nve as aX,df as aY,Mn as aZ,vr as a_,VI as aa,cr as ab,Ba as ac,N0e as ad,L0e as ae,Y5 as af,d8 as ag,x0e as ah,h9 as ai,q9 as aj,o9 as ak,r9 as al,Ef as am,mn as an,n5 as ao,ki as ap,y8 as aq,z0e as ar,hb as as,hO as at,t9 as au,k0e as av,QN as aw,XN as ax,oye as ay,dve as az,Yq as b,J0e as b$,zb as b0,Pa as b1,H0e as b2,Br as b3,JS as b4,xo as b5,qS as b6,sve as b7,rve as b8,ove as b9,WU as bA,jye as bB,iye as bC,$a as bD,v9 as bE,g9 as bF,T2 as bG,e8 as bH,_9 as bI,J5 as bJ,s9 as bK,i9 as bL,W5 as bM,Fye as bN,rye as bO,YN as bP,hl as bQ,F0e as bR,V0e as bS,q0e as bT,G0e as bU,K0e as bV,Z0e as bW,Q0e as bX,Y0e as bY,X0e as bZ,W0e as b_,ive as ba,ave as bb,cve as bc,lve as bd,uve as be,v0e as bf,y0e as bg,eD as bh,rQ as bi,pp as bj,aI as bk,KN as bl,C0e as bm,Lye as bn,gve as bo,WN as bp,LI as bq,ab as br,_t as bs,Xc as bt,$0e as bu,U0e as bv,xO as bw,jI as bx,$ye as by,R0e as bz,Ct as c,jr as c0,Rp as c1,b0e as c2,tf as c3,BL as c4,rs as c5,br as c6,S0e as c7,qye as c8,BI as c9,IL as ca,_L as cb,ov as cc,Cp as cd,bL as ce,SL as cf,rv as cg,nI as ch,NL as ci,xL as cj,ja as ck,So as cl,fye as d,aye as e,mve as f,_r as g,hve as h,pve as i,$ as j,l5 as k,D0e as l,I0e as m,O0e as n,hh as o,M2 as p,Oi as q,I as r,j0e as s,of as t,Op as u,h5 as v,qt as w,op as x,d2 as y,bv as z}; diff --git a/hive/services/hiveui/frontend/dist/assets/index2.js b/hive/services/hiveui/frontend/dist/assets/index2.js index 260ba22ea..e2f2cc7bb 100644 --- a/hive/services/hiveui/frontend/dist/assets/index2.js +++ b/hive/services/hiveui/frontend/dist/assets/index2.js @@ -1 +1 @@ -import{cj as z,ck as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; +import{ck as z,cl as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; diff --git a/hive/services/hiveui/frontend/dist/assets/index6.js b/hive/services/hiveui/frontend/dist/assets/index6.js index 78bf9e40f..9bbafff76 100644 --- a/hive/services/hiveui/frontend/dist/assets/index6.js +++ b/hive/services/hiveui/frontend/dist/assets/index6.js @@ -1 +1 @@ -import{c as n,aD as l,j as t,aE as m,aF as u}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as p}from"./page-heading.js";import{B as f}from"./badge.js";function S(){const e=n.c(5),{data:r}=c(l);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const a=s;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(p,{actions:t.jsx(m,{className:u({variant:"outline"}),to:"/ec2/create-volume",children:"Create Volume"}),title:"EC2 Volumes"}),e[2]=o):o=e[2];let i;return e[3]!==a?(i=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(V)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=a,e[4]=i):i=e[4],i}function V(e){return e.VolumeId?t.jsx(d,{badge:e.State?t.jsx(f,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{S as component}; +import{c as l,aD as n,j as t,aE as m,B as u}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as p}from"./page-heading.js";import{B as f}from"./badge.js";function b(){const e=l.c(5),{data:r}=c(n);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(p,{actions:t.jsx(m,{to:"/ec2/create-volume",children:t.jsx(u,{children:"Create Volume"})}),title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(x)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function x(e){return e.VolumeId?t.jsx(d,{badge:e.State?t.jsx(f,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{b as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index8.js b/hive/services/hiveui/frontend/dist/assets/index8.js index b57e1fa2e..8ee097131 100644 --- a/hive/services/hiveui/frontend/dist/assets/index8.js +++ b/hive/services/hiveui/frontend/dist/assets/index8.js @@ -1 +1 @@ -import{c as o,aG as c,j as t,aE as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; +import{c as o,aF as c,j as t,aE as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/upload-button.js b/hive/services/hiveui/frontend/dist/assets/upload-button.js index 8fe53592f..cd4fb9729 100644 --- a/hive/services/hiveui/frontend/dist/assets/upload-button.js +++ b/hive/services/hiveui/frontend/dist/assets/upload-button.js @@ -1,6 +1,6 @@ -import{g as bt,aL as pr,aM as yr,aN as Q,aO as lt,aP as Ne,aQ as mr,aR as gr,aS as br,aT as wr,aU as Er,aV as xr,aW as vr,aX as _r,aY as Cr,aZ as Sr,a_ as wt,a$ as ce,b0 as qe,b1 as Ar,b2 as Rr,b3 as Br,b4 as pe,b5 as ye,b6 as me,b7 as ge,b8 as Fr,b9 as Dr,ba as Tr,bb as Mr,bc as Lr,bd as kr,be as Nr,bf as Pr,c as Ie,j as z,aE as Ir,bg as Ur,bh as Ee,bi as Or,bj as qr,bk as St,bl as er,bm as Et,r as tr,bn as jr,B as Hr}from"./index.js";import{a as Wr,b as Kr,c as $r,e as zr,d as Vr,h as Gr,f as Yr,g as Xr}from"./alert-dialog.js";import{D as Qr}from"./download.js";import{T as Zr}from"./trash-2.js";import{u as rr}from"./useMutation.js";const Jr=[["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:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],en=bt("file",Jr);const tn=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],rn=bt("folder",tn);const nn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],an=bt("upload",nn),on=typeof ReadableStream=="function"?ReadableStream:function(){};class sn extends on{}const un=({expectedChecksum:a,checksum:r,source:o,checksumSourceLocation:c,base64Encoder:p})=>{if(!pr(o))throw new Error(`@smithy/util-stream: unsupported source type ${o?.constructor?.name??o} in ChecksumStream.`);const l=p??yr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,w){r.update(d),w.enqueue(d)},async flush(d){const w=await r.digest(),D=l(w);if(a!==D){const R=new Error(`Checksum mismatch: expected "${a}" but received "${D}" in response header "${c}".`);d.error(R)}else d.terminate()}});o.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,sn.prototype),i};class ln{allocByteArray;byteLength=0;byteArrays=[];constructor(r){this.allocByteArray=r}push(r){this.byteArrays.push(r),this.byteLength+=r.byteLength}flush(){if(this.byteArrays.length===1){const c=this.byteArrays[0];return this.reset(),c}const r=this.allocByteArray(this.byteLength);let o=0;for(let c=0;cnew Uint8Array(w))];let i=-1;const d=async w=>{const{value:D,done:R}=await c.read(),B=D;if(R){if(i!==-1){const A=je(h,i);Ae(A)>0&&w.enqueue(A)}w.close()}else{const A=dn(B,!1);if(i!==A&&(i>=0&&w.enqueue(je(h,i)),i=A),i===-1){w.enqueue(B);return}const _=Ae(B);l+=_;const T=Ae(h[i]);if(_>=r&&T===0)w.enqueue(B);else{const F=hn(h,i,B);!p&&l>r*2&&(p=!0,o?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${r}, automatically buffering.`)),F>=r?w.enqueue(je(h,i)):await d(w)}}};return new ReadableStream({pull:d})}const cn=fn;function hn(a,r,o){switch(r){case 0:return a[0]+=o,Ae(a[0]);case 1:case 2:return a[r].push(o),Ae(a[r])}}function je(a,r){switch(r){case 0:const o=a[0];return a[0]="",o;case 1:case 2:return a[r].flush()}throw new Error(`@smithy/util-stream - invalid index ${r} given to flush()`)}function Ae(a){return a?.byteLength??a?.length??0}function dn(a,r=!0){return r&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const ft=[Q.CRC32,Q.CRC32C,Q.CRC64NVME,Q.SHA1,Q.SHA256],pn=[Q.SHA256,Q.SHA1,Q.CRC32,Q.CRC32C,Q.CRC64NVME],yn=(a,{requestChecksumRequired:r,requestAlgorithmMember:o,requestChecksumCalculation:c})=>{if(!o)return c===Ne.WHEN_SUPPORTED||r?lt:void 0;if(!a[o])return;const p=a[o];if(!ft.includes(p))throw new Error(`The checksum algorithm "${p}" is not supported by the client. Select one of ${ft}.`);return p},xt=a=>a===Q.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,mn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(o===c.toLowerCase())return!0;return!1},gn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(c.toLowerCase().startsWith(o))return!0;return!1},nr=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!mr(a);var bn=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(r){gr(r)||this.crc32c.update(br(r))},a.prototype.digest=function(){return wr(this,void 0,void 0,function(){return Er(this,function(r){return[2,xr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(r){var o,c;try{for(var p=vr(r),l=p.next();!l.done;l=p.next()){var h=l.value;this.checksum=this.checksum>>>8^En[(this.checksum^h)&255]}}catch(i){o={error:i}}finally{try{l&&!l.done&&(c=p.return)&&c.call(p)}finally{if(o)throw o.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),wn=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],En=_r(wn);const xn=()=>{const r=new Array(8);for(let o=0;o<8;o++){const c=new Array(512);for(let p=0;p<256;p++){let l=BigInt(p);for(let h=0;h<8*(o+1);h++)l&1n?l=l>>1n^0x9a6c9329ac4bc9b5n:l=l>>1n;c[p*2]=Number(l>>32n&0xffffffffn),c[p*2+1]=Number(l&0xffffffffn)}r[o]=new Uint32Array(c)}return r};let He,Se,ct,ht,dt,pt,yt,mt,gt;const vn=()=>{He||(He=xn(),[Se,ct,ht,dt,pt,yt,mt,gt]=He)};class _n{c1=0;c2=0;constructor(){vn(),this.reset()}update(r){const o=r.length;let c=0,p=this.c1,l=this.c2;for(;c+8<=o;){const h=((l^r[c++])&255)<<1,i=((l>>>8^r[c++])&255)<<1,d=((l>>>16^r[c++])&255)<<1,w=((l>>>24^r[c++])&255)<<1,D=((p^r[c++])&255)<<1,R=((p>>>8^r[c++])&255)<<1,B=((p>>>16^r[c++])&255)<<1,A=((p>>>24^r[c++])&255)<<1;p=gt[h]^mt[i]^yt[d]^pt[w]^dt[D]^ht[R]^ct[B]^Se[A],l=gt[h+1]^mt[i+1]^yt[d+1]^pt[w+1]^dt[D+1]^ht[R+1]^ct[B+1]^Se[A+1]}for(;c>>8|(p&255)<<24)>>>0,p=p>>>8^Se[h],l^=Se[h+1],c++}this.c1=p,this.c2=l}async digest(){const r=this.c1^4294967295,o=this.c2^4294967295;return new Uint8Array([r>>>24,r>>>16&255,r>>>8&255,r&255,o>>>24,o>>>16&255,o>>>8&255,o&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Cn=()=>Cr,ir=(a,r)=>{switch(a){case Q.MD5:return r.md5;case Q.CRC32:return Cn();case Q.CRC32C:return bn;case Q.CRC64NVME:return _n;case Q.SHA1:return r.sha1;case Q.SHA256:return r.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},ar=(a,r)=>{const o=new a;return o.update(Sr(r||"")),o.digest()},Sn={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},An=(a,r)=>(o,c)=>async p=>{if(!wt.isInstance(p.request)||gn("x-amz-checksum-",p.request.headers))return o(p);const{request:l,input:h}=p,{body:i,headers:d}=l,{base64Encoder:w,streamHasher:D}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=r,A=await a.requestChecksumCalculation(),_=B?.name,T=B?.httpHeader;_&&!h[_]&&(A===Ne.WHEN_SUPPORTED||R)&&(h[_]=lt,T&&(d[T]=lt));const F=yn(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:A});let y=i,v=d;if(F){switch(F){case Q.CRC32:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Q.CRC32C:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Q.CRC64NVME:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Q.SHA1:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Q.SHA256:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const S=xt(F),m=ir(F,a);if(nr(i)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:C}=a;y=g(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?cn(i,a.requestStreamBufferSize,c.logger):i,{base64Encoder:w,bodyLengthChecker:C,checksumLocationName:S,checksumAlgorithmFn:m,streamHasher:D}),v={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":S},delete v["content-length"]}else if(!mn(S,d)){const g=await ar(m,i);v={...d,[S]:w(g)}}}try{return await o({...p,request:{...l,headers:v,body:y}})}catch(S){if(S instanceof Error&&S.name==="InvalidChunkSizeError")try{S.message.endsWith(".")||(S.message+="."),S.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw S}},Rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},Bn=(a,r)=>(o,c)=>async p=>{const l=p.input,{requestValidationModeMember:h}=r,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Ne.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Ne.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case qe.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case qe.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!l[h]&&d===qe.WHEN_SUPPORTED&&(l[h]="ENABLED"),o(p)},or=(a=[])=>{const r=[];for(const o of pn)!a.includes(o)||!ft.includes(o)||r.push(o);return r},Fn=a=>{const r=a.lastIndexOf("-");if(r!==-1){const o=a.slice(r+1);if(!o.startsWith("0")){const c=parseInt(o,10);if(!isNaN(c)&&c>=1&&c<=1e4)return!0}}return!1},Dn=async(a,{checksumAlgorithmFn:r,base64Encoder:o})=>o(await ar(r,a)),Tn=async(a,{config:r,responseAlgorithms:o,logger:c})=>{const p=or(o),{body:l,headers:h}=a;for(const i of p){const d=xt(i),w=h[d];if(w){let D;try{D=ir(i,r)}catch(A){if(i===Q.CRC64NVME){c?.warn(`Skipping ${Q.CRC64NVME} checksum validation: ${A.message}`);continue}throw A}const{base64Encoder:R}=r;if(nr(l)){a.body=un({expectedChecksum:w,checksumSourceLocation:d,checksum:new D,source:l,base64Encoder:R});return}const B=await Dn(l,{checksumAlgorithmFn:D,base64Encoder:R});if(B===w)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${w}" in response header "${d}".`)}}},Mn={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Ln=(a,r)=>(o,c)=>async p=>{if(!wt.isInstance(p.request))return o(p);const l=p.input,h=await o(p),i=h.response,{requestValidationModeMember:d,responseAlgorithms:w}=r;if(d&&l[d]==="ENABLED"){const{clientName:D,commandName:R}=c;if(D==="S3Client"&&R==="GetObjectCommand"&&or(w).every(A=>{const _=xt(A),T=i.headers[_];return!T||Fn(T)}))return h;await Tn(i,{config:a,responseAlgorithms:w,logger:c.logger})}return h},Ue=(a,r)=>({applyToStack:o=>{o.add(An(a,r),Sn),o.addRelativeTo(Bn(a,r),Rn),o.addRelativeTo(Ln(a,r),Mn)}}),kn="content-length",Nn="x-amz-decoded-content-length";function Pn(){return(a,r)=>async o=>{const{request:c}=o;if(wt.isInstance(c)&&!(kn in c.headers)&&!(Nn in c.headers)){const p="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof r?.logger?.warn=="function"&&!(r.logger instanceof Ar)?r.logger.warn(p):console.warn(p)}return a({...o})}}const In={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Un=a=>({applyToStack:r=>{r.add(Pn(),In)}}),On=a=>(r,o)=>async c=>{const p=await r(c),{response:l}=p;if(Rr.isInstance(l)&&l.headers.expires){l.headers.expiresstring=l.headers.expires;try{Br(l.headers.expires)}catch(h){o.logger?.warn(`AWS SDK Warning for ${o.clientName}::${o.commandName} response parsing (${l.headers.expires}): ${h}`),delete l.headers.expires}}return p},qn={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},jn=a=>({applyToStack:r=>{r.addRelativeTo(On(),qn)}});class Hn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Fr).build(){}function Wn(a){return r=>async o=>{const c={...o.input},p=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const l of p){const h=c[l.target];if(h){let i;typeof h=="string"?$n(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),c[l.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),c[l.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),c[l.hash]=a.base64Encoder(await d.digest())}}return r({...o,input:c})}}const Kn={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Be=a=>({applyToStack:r=>{r.add(Wn(a),Kn)}});function $n(a,r){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return r.base64Decoder(a).length===32}catch{return!1}}class zn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Dr).build(){}class Vn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Tr).build(){}class Gn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Mr).build(){}class Yn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Be(c),jn()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Lr).build(){}class Rt extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Un(),ge(c),Be(c)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(kr).build(){}class Xn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),ge(c)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Nr).build(){}class Qn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),ge(c),Be(c)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Pr).build(){}const Zn={CRC32:"CRC32"};function Ri(a){const r=Ie.c(9),{folderName:o,fullPrefix:c,bucketName:p}=a;let l;r[0]!==p||r[1]!==c?(l={bucket:p,_splat:c},r[0]=p,r[1]=c,r[2]=l):l=r[2];let h;r[3]===Symbol.for("react.memo_cache_sentinel")?(h=z.jsx(rn,{className:"size-5 text-muted-foreground"}),r[3]=h):h=r[3];let i;r[4]!==o?(i=z.jsx("span",{className:"font-medium",children:o}),r[4]=o,r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==i?(d=z.jsxs(Ir,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:l,to:"/s3/ls/$bucket/$",children:[h,i]}),r[6]=l,r[7]=i,r[8]=d):d=r[8],d}class Jn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class ei{signal=new Jn;abort(){this.signal.abort()}}var De={exports:{}},Bt;function Oe(){if(Bt)return De.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,r=a&&typeof a.apply=="function"?a.apply:function(g,C,I){return Function.prototype.apply.call(g,C,I)},o;a&&typeof a.ownKeys=="function"?o=a.ownKeys:Object.getOwnPropertySymbols?o=function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:o=function(g){return Object.getOwnPropertyNames(g)};function c(m){console&&console.warn&&console.warn(m)}var p=Number.isNaN||function(g){return g!==g};function l(){l.init.call(this)}De.exports=l,De.exports.once=y,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function i(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"||m<0||p(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");h=m}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||p(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this};function d(m){return m._maxListeners===void 0?l.defaultMaxListeners:m._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(g){for(var C=[],I=1;I0&&(q=C[0]),q instanceof Error)throw q;var G=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw G.context=q,G}var ee=U[g];if(ee===void 0)return!1;if(typeof ee=="function")r(ee,this,C);else for(var re=ee.length,ne=_(ee,re),I=0;I0&&q.length>P&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(g)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=g,G.count=q.length,c(G)}return m}l.prototype.addListener=function(g,C){return w(this,g,C,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(g,C){return w(this,g,C,!0)};function D(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(m,g,C){var I={fired:!1,wrapFn:void 0,target:m,type:g,listener:C},P=D.bind(I);return P.listener=C,I.wrapFn=P,P}l.prototype.once=function(g,C){return i(C),this.on(g,R(this,g,C)),this},l.prototype.prependOnceListener=function(g,C){return i(C),this.prependListener(g,R(this,g,C)),this},l.prototype.removeListener=function(g,C){var I,P,U,q,G;if(i(C),P=this._events,P===void 0)return this;if(I=P[g],I===void 0)return this;if(I===C||I.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete P[g],P.removeListener&&this.emit("removeListener",g,I.listener||C));else if(typeof I!="function"){for(U=-1,q=I.length-1;q>=0;q--)if(I[q]===C||I[q].listener===C){G=I[q].listener,U=q;break}if(U<0)return this;U===0?I.shift():T(I,U),I.length===1&&(P[g]=I[0]),P.removeListener!==void 0&&this.emit("removeListener",g,G||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(g){var C,I,P;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[g]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[g]),this;if(arguments.length===0){var U=Object.keys(I),q;for(P=0;P=0;P--)this.removeListener(g,C[P]);return this};function B(m,g,C){var I=m._events;if(I===void 0)return[];var P=I[g];return P===void 0?[]:typeof P=="function"?C?[P.listener||P]:[P]:C?F(P):_(P,P.length)}l.prototype.listeners=function(g){return B(this,g,!0)},l.prototype.rawListeners=function(g){return B(this,g,!1)},l.listenerCount=function(m,g){return typeof m.listenerCount=="function"?m.listenerCount(g):A.call(m,g)},l.prototype.listenerCount=A;function A(m){var g=this._events;if(g!==void 0){var C=g[m];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function _(m,g){for(var C=new Array(g),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var T=A.indexOf("=");T===-1&&(T=_);var F=T===_?0:4-T%4;return[T,F]}function i(A){var _=h(A),T=_[0],F=_[1];return(T+F)*3/4-F}function d(A,_,T){return(_+T)*3/4-T}function w(A){var _,T=h(A),F=T[0],y=T[1],v=new o(d(A,F,y)),S=0,m=y>0?F-4:F,g;for(g=0;g>16&255,v[S++]=_>>8&255,v[S++]=_&255;return y===2&&(_=r[A.charCodeAt(g)]<<2|r[A.charCodeAt(g+1)]>>4,v[S++]=_&255),y===1&&(_=r[A.charCodeAt(g)]<<10|r[A.charCodeAt(g+1)]<<4|r[A.charCodeAt(g+2)]>>2,v[S++]=_>>8&255,v[S++]=_&255),v}function D(A){return a[A>>18&63]+a[A>>12&63]+a[A>>6&63]+a[A&63]}function R(A,_,T){for(var F,y=[],v=_;vm?m:S+v));return F===1?(_=A[T-1],y.push(a[_>>2]+a[_<<4&63]+"==")):F===2&&(_=(A[T-2]<<8)+A[T-1],y.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),y.join("")}return Ce}var Te={};var Dt;function ri(){return Dt||(Dt=1,Te.read=function(a,r,o,c,p){var l,h,i=p*8-c-1,d=(1<>1,D=-7,R=o?p-1:0,B=o?-1:1,A=a[r+R];for(R+=B,l=A&(1<<-D)-1,A>>=-D,D+=i;D>0;l=l*256+a[r+R],R+=B,D-=8);for(h=l&(1<<-D)-1,l>>=-D,D+=c;D>0;h=h*256+a[r+R],R+=B,D-=8);if(l===0)l=1-w;else{if(l===d)return h?NaN:(A?-1:1)*(1/0);h=h+Math.pow(2,c),l=l-w}return(A?-1:1)*h*Math.pow(2,l-c)},Te.write=function(a,r,o,c,p,l){var h,i,d,w=l*8-p-1,D=(1<>1,B=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=c?0:l-1,_=c?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(i=isNaN(r)?1:0,h=D):(h=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?r+=B/d:r+=B*Math.pow(2,1-R),r*d>=2&&(h++,d/=2),h+R>=D?(i=0,h=D):h+R>=1?(i=(r*d-1)*Math.pow(2,p),h=h+R):(i=r*Math.pow(2,R-1)*Math.pow(2,p),h=0));p>=8;a[o+A]=i&255,A+=_,i/=256,p-=8);for(h=h<0;a[o+A]=h&255,A+=_,h/=256,w-=8);a[o+A-_]|=T*128}),Te}var Tt;function Fe(){return Tt||(Tt=1,(function(a){var r=ti(),o=ri(),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=y,a.INSPECT_MAX_BYTES=50;var p=2147483647;a.kMaxLength=p,i.TYPED_ARRAY_SUPPORT=l(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),n.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(n){if(n>p)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,i.prototype),e}function i(n,e,t){if(typeof n=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(n)}return d(n,e,t)}i.poolSize=8192;function d(n,e,t){if(typeof n=="string")return B(n,e);if(ArrayBuffer.isView(n))return A(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(M(n,ArrayBuffer)||n&&M(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(n,SharedArrayBuffer)||n&&M(n.buffer,SharedArrayBuffer)))return _(n,e,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var u=n.valueOf&&n.valueOf();if(u!=null&&u!==n)return i.from(u,e,t);var b=T(n);if(b)return b;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return i.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}i.from=function(n,e,t){return d(n,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function w(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function D(n,e,t){return w(n),n<=0?h(n):e!==void 0?typeof t=="string"?h(n).fill(e,t):h(n).fill(e):h(n)}i.alloc=function(n,e,t){return D(n,e,t)};function R(n){return w(n),h(n<0?0:F(n)|0)}i.allocUnsafe=function(n){return R(n)},i.allocUnsafeSlow=function(n){return R(n)};function B(n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=v(n,e)|0,u=h(t),b=u.write(n,e);return b!==t&&(u=u.slice(0,b)),u}function A(n){for(var e=n.length<0?0:F(n.length)|0,t=h(e),u=0;u=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return n|0}function y(n){return+n!=n&&(n=0),i.alloc(+n)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var u=e.length,b=t.length,L=0,k=Math.min(u,b);L2&&arguments[2]===!0;if(!u&&t===0)return 0;for(var b=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return N(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return s(n).length;default:if(b)return u?-1:N(n).length;e=(""+e).toLowerCase(),b=!0}}i.byteLength=v;function S(n,e,t){var u=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(n||(n="utf8");;)switch(n){case"hex":return ue(this,e,t);case"utf8":case"utf-8":return ne(this,e,t);case"ascii":return ae(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return re(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,e,t);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),u=!0}}i.prototype._isBuffer=!0;function m(n,e,t){var u=n[e];n[e]=n[t],n[t]=u}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},c&&(i.prototype[c]=i.prototype.inspect),i.prototype.compare=function(e,t,u,b,L){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),u===void 0&&(u=e?e.length:0),b===void 0&&(b=0),L===void 0&&(L=this.length),t<0||u>e.length||b<0||L>this.length)throw new RangeError("out of range index");if(b>=L&&t>=u)return 0;if(b>=L)return-1;if(t>=u)return 1;if(t>>>=0,u>>>=0,b>>>=0,L>>>=0,this===e)return 0;for(var k=L-b,W=u-t,K=Math.min(k,W),V=this.slice(b,L),J=e.slice(t,u),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=b?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(b)return-1;t=n.length-1}else if(t<0)if(b)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,u)),i.isBuffer(e))return e.length===0?-1:C(n,e,t,u,b);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?b?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):C(n,[e],t,u,b);throw new TypeError("val must be string, number or Buffer")}function C(n,e,t,u,b){var L=1,k=n.length,W=e.length;if(u!==void 0&&(u=String(u).toLowerCase(),u==="ucs2"||u==="ucs-2"||u==="utf16le"||u==="utf-16le")){if(n.length<2||e.length<2)return-1;L=2,k/=2,W/=2,t/=2}function K(_t,Ct){return L===1?_t[Ct]:_t.readUInt16BE(Ct*L)}var V;if(b){var J=-1;for(V=t;Vk&&(t=k-W),V=t;V>=0;V--){for(var $=!0,se=0;seb&&(u=b)):u=b;var L=e.length;u>L/2&&(u=L/2);for(var k=0;k>>0,isFinite(u)?(u=u>>>0,b===void 0&&(b="utf8")):(b=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-t;if((u===void 0||u>L)&&(u=L),e.length>0&&(u<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");b||(b="utf8");for(var k=!1;;)switch(b){case"hex":return I(this,e,t,u);case"utf8":case"utf-8":return P(this,e,t,u);case"ascii":return U(this,e,t,u);case"latin1":case"binary":return q(this,e,t,u);case"base64":return G(this,e,t,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,e,t,u);default:if(k)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(n,e,t){return e===0&&t===n.length?r.fromByteArray(n):r.fromByteArray(n.slice(e,t))}function ne(n,e,t){t=Math.min(n.length,t);for(var u=[],b=e;b239?4:L>223?3:L>191?2:1;if(b+W<=t){var K,V,J,$;switch(W){case 1:L<128&&(k=L);break;case 2:K=n[b+1],(K&192)===128&&($=(L&31)<<6|K&63,$>127&&(k=$));break;case 3:K=n[b+1],V=n[b+2],(K&192)===128&&(V&192)===128&&($=(L&15)<<12|(K&63)<<6|V&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=n[b+1],V=n[b+2],J=n[b+3],(K&192)===128&&(V&192)===128&&(J&192)===128&&($=(L&15)<<18|(K&63)<<12|(V&63)<<6|J&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,u.push(k>>>10&1023|55296),k=56320|k&1023),u.push(k),b+=W}return oe(u)}var ie=4096;function oe(n){var e=n.length;if(e<=ie)return String.fromCharCode.apply(String,n);for(var t="",u=0;uu)&&(t=u);for(var b="",L=e;Lu&&(e=u),t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var b=this[e],L=1,k=0;++k>>0,t=t>>>0,u||Y(e,t,this.length);for(var b=this[e+--t],L=1;t>0&&(L*=256);)b+=this[e+--t]*L;return b},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var b=this[e],L=1,k=0;++k=L&&(b-=Math.pow(2,8*t)),b},i.prototype.readIntBE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var b=t,L=1,k=this[e+--b];b>0&&(L*=256);)k+=this[e+--b]*L;return L*=128,k>=L&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e]|this[e+1]<<8;return u&32768?u|4294901760:u},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e+1]|this[e]<<8;return u&32768?u|4294901760:u},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!1,52,8)};function Z(n,e,t,u,b,L){if(!i.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>b||en.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,u,b){if(e=+e,t=t>>>0,u=u>>>0,!b){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,u=u>>>0,!b){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=u-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+u},i.prototype.writeUInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,u,b){if(e=+e,t=t>>>0,!b){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+u},i.prototype.writeIntBE=function(e,t,u,b){if(e=+e,t=t>>>0,!b){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=u-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+u},i.prototype.writeInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function te(n,e,t,u,b,L){if(t+u>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function be(n,e,t,u,b){return e=+e,t=t>>>0,b||te(n,e,t,4),o.write(n,e,t,u,23,4),t+4}i.prototype.writeFloatLE=function(e,t,u){return be(this,e,t,!0,u)},i.prototype.writeFloatBE=function(e,t,u){return be(this,e,t,!1,u)};function we(n,e,t,u,b){return e=+e,t=t>>>0,b||te(n,e,t,8),o.write(n,e,t,u,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,u){return we(this,e,t,!0,u)},i.prototype.writeDoubleBE=function(e,t,u){return we(this,e,t,!1,u)},i.prototype.copy=function(e,t,u,b){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(u||(u=0),!b&&b!==0&&(b=this.length),t>=e.length&&(t=e.length),t||(t=0),b>0&&b=this.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("sourceEnd out of bounds");b>this.length&&(b=this.length),e.length-t=0;--k)e[k+t]=this[k+u];else Uint8Array.prototype.set.call(e,this.subarray(u,b),t);return L},i.prototype.fill=function(e,t,u,b){if(typeof e=="string"){if(typeof t=="string"?(b=t,t=0,u=this.length):typeof u=="string"&&(b=u,u=this.length),b!==void 0&&typeof b!="string")throw new TypeError("encoding must be a string");if(typeof b=="string"&&!i.isEncoding(b))throw new TypeError("Unknown encoding: "+b);if(e.length===1){var L=e.charCodeAt(0);(b==="utf8"&&L<128||b==="latin1")&&(e=L)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,u=u===void 0?this.length:u>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!b){if(t>56319){(e-=3)>-1&&L.push(239,191,189);continue}else if(k+1===u){(e-=3)>-1&&L.push(239,191,189);continue}b=t;continue}if(t<56320){(e-=3)>-1&&L.push(239,191,189),b=t;continue}t=(b-55296<<10|t-56320)+65536}else b&&(e-=3)>-1&&L.push(239,191,189);if(b=null,t<128){if((e-=1)<0)break;L.push(t)}else if(t<2048){if((e-=2)<0)break;L.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;L.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;L.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return L}function j(n){for(var e=[],t=0;t>8,b=t%256,L.push(b),L.push(u);return L}function s(n){return r.toByteArray(E(n))}function f(n,e,t,u){for(var b=0;b=e.length||b>=n.length);++b)e[b+t]=n[b];return b}function M(n,e){return n instanceof e||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===e.name}function O(n){return n!==n}var X=(function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var u=t*16,b=0;b<16;++b)e[u+b]=n[t]+n[b];return e})()})(Ke)),Ke}var de=Fe();const ni={lstatSync:()=>{},isFileReadStream(a){return!1}},Pe={...ni,runtime:"browser"},Me=a=>{if(a==null)return 0;if(typeof a=="string")return de.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size}catch{return}};var le;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(le||(le={}));const ii=(a,r)=>{if(r!=null)return le.CONTENT_LENGTH;if(a==null)return le.EMPTY_INPUT;if(typeof a=="string")return le.STRING_LENGTH;if(typeof a.byteLength=="number")return le.TYPED_ARRAY;if(typeof a.length=="number")return le.LENGTH;if(typeof a.size=="number")return le.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return le.START_END_DIFF;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size,le.LSTAT}catch{return}};var Le={exports:{}},Mt;function ve(){return Mt||(Mt=1,typeof Object.create=="function"?Le.exports=function(r,o){o&&(r.super_=o,r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(r,o){if(o){r.super_=o;var c=function(){};c.prototype=o.prototype,r.prototype=new c,r.prototype.constructor=r}}),Le.exports}var $e,Lt;function sr(){return Lt||(Lt=1,$e=Oe().EventEmitter),$e}const ai={},oi=Object.freeze(Object.defineProperty({__proto__:null,default:ai},Symbol.toStringTag,{value:"Module"})),ur=Ur(oi);var ze,kt;function si(){if(kt)return ze;kt=1;function a(_,T){var F=Object.keys(_);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(_);T&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(_,v).enumerable})),F.push.apply(F,y)}return F}function r(_){for(var T=1;T0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(F){var y={data:F,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var F=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=F+y.data;return v}},{key:"concat",value:function(F){if(this.length===0)return w.alloc(0);for(var y=w.allocUnsafe(F>>>0),v=this.head,S=0;v;)A(v.data,y,S),S+=v.data.length,v=v.next;return y}},{key:"consume",value:function(F,y){var v;return Fm.length?m.length:F;if(g===m.length?S+=m:S+=m.slice(0,F),F-=g,F===0){g===m.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=m.slice(g));break}++v}return this.length-=v,S}},{key:"_getBuffer",value:function(F){var y=w.allocUnsafe(F),v=this.head,S=1;for(v.data.copy(y),F-=v.data.length;v=v.next;){var m=v.data,g=F>m.length?m.length:F;if(m.copy(y,y.length-F,0,g),F-=g,F===0){g===m.length?(++S,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=m.slice(g));break}++S}return this.length-=S,y}},{key:B,value:function(F,y){return R(this,r(r({},y),{},{depth:0,customInspect:!1}))}}]),_})(),ze}var Ve,Nt;function lr(){if(Nt)return Ve;Nt=1;function a(h,i){var d=this,w=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return w||D?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(p,this,h)):process.nextTick(p,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(o,d):(d._writableState.errorEmitted=!0,process.nextTick(r,d,R)):process.nextTick(r,d,R):i?(process.nextTick(o,d),i(R)):process.nextTick(o,d)}),this)}function r(h,i){p(h,i),o(h)}function o(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function c(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(h,i){h.emit("error",i)}function l(h,i){var d=h._readableState,w=h._writableState;d&&d.autoDestroy||w&&w.autoDestroy?h.destroy(i):h.emit("error",i)}return Ve={destroy:a,undestroy:c,errorOrDestroy:l},Ve}var Ge={},Pt;function _e(){if(Pt)return Ge;Pt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var r={};function o(i,d,w){w||(w=Error);function D(B,A,_){return typeof d=="string"?d:d(B,A,_)}var R=(function(B){a(A,B);function A(_,T,F){return B.call(this,D(_,T,F))||this}return A})(w);R.prototype.name=w.name,R.prototype.code=i,r[i]=R}function c(i,d){if(Array.isArray(i)){var w=i.length;return i=i.map(function(D){return String(D)}),w>2?"one of ".concat(d," ").concat(i.slice(0,w-1).join(", "),", or ")+i[w-1]:w===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function p(i,d,w){return i.substr(0,d.length)===d}function l(i,d,w){return(w===void 0||w>i.length)&&(w=i.length),i.substring(w-d.length,w)===d}function h(i,d,w){return typeof w!="number"&&(w=0),w+d.length>i.length?!1:i.indexOf(d,w)!==-1}return o("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(i,d,w){var D;typeof d=="string"&&p(d,"not ")?(D="must not be",d=d.replace(/^not /,"")):D="must be";var R;if(l(i," argument"))R="The ".concat(i," ").concat(D," ").concat(c(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(D," ").concat(c(d,"type"))}return R+=". Received type ".concat(typeof w),R},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.codes=r,Ge}var Ye,It;function fr(){if(It)return Ye;It=1;var a=_e().codes.ERR_INVALID_OPT_VALUE;function r(c,p,l){return c.highWaterMark!=null?c.highWaterMark:p?c[l]:null}function o(c,p,l,h){var i=r(p,h,l);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?l:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return c.objectMode?16:16*1024}return Ye={getHighWaterMark:o},Ye}var Xe,Ut;function ui(){if(Ut)return Xe;Ut=1,Xe=a;function a(o,c){if(r("noDeprecation"))return o;var p=!1;function l(){if(!p){if(r("throwDeprecation"))throw new Error(c);r("traceDeprecation")?console.trace(c):console.warn(c),p=!0}return o.apply(this,arguments)}return l}function r(o){try{if(!Ee.localStorage)return!1}catch{return!1}var c=Ee.localStorage[o];return c==null?!1:String(c).toLowerCase()==="true"}return Xe}var Qe,Ot;function cr(){if(Ot)return Qe;Ot=1,Qe=P;function a(x){var E=this;this.next=null,this.entry=null,this.finish=function(){we(E,x)}}var r;P.WritableState=C;var o={deprecate:ui()},c=sr(),p=Fe().Buffer,l=(typeof Ee<"u"?Ee:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(x){return p.from(x)}function i(x){return p.isBuffer(x)||x instanceof l}var d=lr(),w=fr(),D=w.getHighWaterMark,R=_e().codes,B=R.ERR_INVALID_ARG_TYPE,A=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,T=R.ERR_STREAM_CANNOT_PIPE,F=R.ERR_STREAM_DESTROYED,y=R.ERR_STREAM_NULL_VALUES,v=R.ERR_STREAM_WRITE_AFTER_END,S=R.ERR_UNKNOWN_ENCODING,m=d.errorOrDestroy;ve()(P,c);function g(){}function C(x,E,N){r=r||xe(),x=x||{},typeof N!="boolean"&&(N=E instanceof r),this.objectMode=!!x.objectMode,N&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=D(this,x,"writableHighWaterMark",N),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=x.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){oe(E,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}C.prototype.getBuffer=function(){for(var E=this.bufferedRequest,N=[];E;)N.push(E),E=E.next;return N},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(E){return I.call(this,E)?!0:this!==P?!1:E&&E._writableState instanceof C}})):I=function(E){return E instanceof this};function P(x){r=r||xe();var E=this instanceof r;if(!E&&!I.call(P,this))return new P(x);this._writableState=new C(x,this,E),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),c.call(this)}P.prototype.pipe=function(){m(this,new T)};function U(x,E){var N=new v;m(x,N),process.nextTick(E,N)}function q(x,E,N,j){var H;return N===null?H=new y:typeof N!="string"&&!E.objectMode&&(H=new B("chunk",["string","Buffer"],N)),H?(m(x,H),process.nextTick(j,H),!1):!0}P.prototype.write=function(x,E,N){var j=this._writableState,H=!1,s=!j.objectMode&&i(x);return s&&!p.isBuffer(x)&&(x=h(x)),typeof E=="function"&&(N=E,E=null),s?E="buffer":E||(E=j.defaultEncoding),typeof N!="function"&&(N=g),j.ending?U(this,N):(s||q(this,j,x,N))&&(j.pendingcb++,H=ee(this,j,s,x,E,N)),H},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&ue(this,x))},P.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=E.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E+"").toLowerCase())>-1))throw new S(E);return this._writableState.defaultEncoding=E,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(x,E,N){return!x.objectMode&&x.decodeStrings!==!1&&typeof E=="string"&&(E=p.from(E,N)),E}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(x,E,N,j,H,s){if(!N){var f=G(E,j,H);j!==f&&(N=!0,H="buffer",j=f)}var M=E.objectMode?1:j.length;E.length+=M;var O=E.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function h(y,v,S){var m=v.length-1;if(m=0?(g>0&&(y.lastNeed=g-1),g):--m=0?(g>0&&(y.lastNeed=g-2),g):--m=0?(g>0&&(g===2?g=0:y.lastNeed=g-3),g):0))}function i(y,v,S){if((v[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return y.lastNeed=2,"�"}}function d(y){var v=this.lastTotal-this.lastNeed,S=i(this,y);if(S!==void 0)return S;if(this.lastNeed<=y.length)return y.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,v,0,y.length),this.lastNeed-=y.length}function w(y,v){var S=h(this,y,v);if(!this.lastNeed)return y.toString("utf8",v);this.lastTotal=S;var m=y.length-(S-this.lastNeed);return y.copy(this.lastChar,0,m),y.toString("utf8",v,m)}function D(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+"�":v}function R(y,v){if((y.length-v)%2===0){var S=y.toString("utf16le",v);if(S){var m=S.charCodeAt(S.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",v,y.length-1)}function B(y){var v=y&&y.length?this.write(y):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function A(y,v){var S=(y.length-v)%3;return S===0?y.toString("base64",v):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",v,y.length-S))}function _(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function T(y){return y.toString(this.encoding)}function F(y){return y&&y.length?this.write(y):""}return Je}var et,Kt;function vt(){if(Kt)return et;Kt=1;var a=_e().codes.ERR_STREAM_PREMATURE_CLOSE;function r(l){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),w=0;w0)if(typeof f!="string"&&!n.objectMode&&Object.getPrototypeOf(f)!==c.prototype&&(f=l(f)),O)n.endEmitted?g(s,new y):G(s,n,f,!0);else if(n.ended)g(s,new T);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!M?(f=n.decoder.write(f),n.objectMode||f.length!==0?G(s,n,f,!1):ue(s,n)):G(s,n,f,!1)}else O||(n.reading=!1,ue(s,n))}return!n.ended&&(n.length=re?s=re:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}function ie(s,f){return s<=0||f.length===0&&f.ended?0:f.objectMode?1:s!==s?f.flowing&&f.length?f.buffer.head.data.length:f.length:(s>f.highWaterMark&&(f.highWaterMark=ne(s)),s<=f.length?s:f.ended?f.length:(f.needReadable=!0,0))}U.prototype.read=function(s){d("read",s),s=parseInt(s,10);var f=this._readableState,M=s;if(s!==0&&(f.emittedReadable=!1),s===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return d("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?N(this):ae(this),null;if(s=ie(s,f),s===0&&f.ended)return f.length===0&&N(this),null;var O=f.needReadable;d("need readable",O),(f.length===0||f.length-s0?X=E(s,f):X=null,X===null?(f.needReadable=f.length<=f.highWaterMark,s=0):(f.length-=s,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),M!==s&&f.ended&&N(this)),X!==null&&this.emit("data",X),X};function oe(s,f){if(d("onEofChunk"),!f.ended){if(f.decoder){var M=f.decoder.end();M&&M.length&&(f.buffer.push(M),f.length+=f.objectMode?1:M.length)}f.ended=!0,f.sync?ae(s):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,he(s)))}}function ae(s){var f=s._readableState;d("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(d("emitReadable",f.flowing),f.emittedReadable=!0,process.nextTick(he,s))}function he(s){var f=s._readableState;d("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(s.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,x(s)}function ue(s,f){f.readingMore||(f.readingMore=!0,process.nextTick(fe,s,f))}function fe(s,f){for(;!f.reading&&!f.ended&&(f.length1&&H(O.pipes,s)!==-1)&&!b&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),M.pause())}function W($){d("onerror",$),J(),s.removeListener("error",W),r(s,"error")===0&&g(s,$)}I(s,"error",W);function K(){s.removeListener("finish",V),J()}s.once("close",K);function V(){d("onfinish"),s.removeListener("close",K),J()}s.once("finish",V);function J(){d("unpipe"),M.unpipe(s)}return s.emit("pipe",M),O.flowing||(d("pipe resume"),M.resume()),s};function Y(s){return function(){var M=s._readableState;d("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&r(s,"data")&&(M.flowing=!0,x(s))}}U.prototype.unpipe=function(s){var f=this._readableState,M={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return s&&s!==f.pipes?this:(s||(s=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,s&&s.emit("unpipe",this,M),this);if(!s){var O=f.pipes,X=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var n=0;n0,O.flowing!==!1&&this.resume()):s==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ae(this):O.reading||process.nextTick(te,this)),M},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(s,f){var M=o.prototype.removeListener.call(this,s,f);return s==="readable"&&process.nextTick(Z,this),M},U.prototype.removeAllListeners=function(s){var f=o.prototype.removeAllListeners.apply(this,arguments);return(s==="readable"||s===void 0)&&process.nextTick(Z,this),f};function Z(s){var f=s._readableState;f.readableListening=s.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:s.listenerCount("data")>0&&s.resume()}function te(s){d("readable nexttick read 0"),s.read(0)}U.prototype.resume=function(){var s=this._readableState;return s.flowing||(d("resume"),s.flowing=!s.readableListening,be(this,s)),s.paused=!1,this};function be(s,f){f.resumeScheduled||(f.resumeScheduled=!0,process.nextTick(we,s,f))}function we(s,f){d("resume",f.reading),f.reading||s.read(0),f.resumeScheduled=!1,s.emit("resume"),x(s),f.flowing&&!f.reading&&s.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function x(s){var f=s._readableState;for(d("flow",f.flowing);f.flowing&&s.read()!==null;);}U.prototype.wrap=function(s){var f=this,M=this._readableState,O=!1;s.on("end",function(){if(d("wrapped end"),M.decoder&&!M.ended){var e=M.decoder.end();e&&e.length&&f.push(e)}f.push(null)}),s.on("data",function(e){if(d("wrapped data"),M.decoder&&(e=M.decoder.write(e)),!(M.objectMode&&e==null)&&!(!M.objectMode&&(!e||!e.length))){var t=f.push(e);t||(O=!0,s.pause())}});for(var X in s)this[X]===void 0&&typeof s[X]=="function"&&(this[X]=(function(t){return function(){return s[t].apply(s,arguments)}})(X));for(var n=0;n=f.length?(f.decoder?M=f.buffer.join(""):f.buffer.length===1?M=f.buffer.first():M=f.buffer.concat(f.length),f.buffer.clear()):M=f.buffer.consume(s,f.decoder),M}function N(s){var f=s._readableState;d("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,process.nextTick(j,f,s))}function j(s,f){if(d("endReadableNT",s.endEmitted,s.length),!s.endEmitted&&s.length===0&&(s.endEmitted=!0,f.readable=!1,f.emit("end"),s.autoDestroy)){var M=f._writableState;(!M||M.autoDestroy&&M.finished)&&f.destroy()}}typeof Symbol=="function"&&(U.from=function(s,f){return m===void 0&&(m=ci()),m(U,s,f)});function H(s,f){for(var M=0,O=s.length;M0;return i(v,m,g,function(C){F||(F=C),C&&y.forEach(d),!m&&(y.forEach(d),T(F))})});return A.reduce(w)}return ot=R,ot}var st,Qt;function pi(){if(Qt)return st;Qt=1,st=o;var a=Oe().EventEmitter,r=ve();r(o,a),o.Readable=hr(),o.Writable=cr(),o.Duplex=xe(),o.Transform=dr(),o.PassThrough=hi(),o.finished=vt(),o.pipeline=di(),o.Stream=o;function o(){a.call(this)}return o.prototype.pipe=function(c,p){var l=this;function h(A){c.writable&&c.write(A)===!1&&l.pause&&l.pause()}l.on("data",h);function i(){l.readable&&l.resume&&l.resume()}c.on("drain",i),!c._isStdio&&(!p||p.end!==!1)&&(l.on("end",w),l.on("close",D));var d=!1;function w(){d||(d=!0,c.end())}function D(){d||(d=!0,typeof c.destroy=="function"&&c.destroy())}function R(A){if(B(),a.listenerCount(this,"error")===0)throw A}l.on("error",R),c.on("error",R);function B(){l.removeListener("data",h),c.removeListener("drain",i),l.removeListener("end",w),l.removeListener("close",D),l.removeListener("error",R),c.removeListener("error",R),l.removeListener("end",B),l.removeListener("close",B),c.removeListener("close",B)}return l.on("end",B),l.on("close",B),c.on("close",B),c.emit("pipe",l),c},st}var yi=pi();async function*ut(a,r,o){let c=1;const p={chunks:[],length:0};for await(const l of o(a))for(p.chunks.push(l),p.length+=l.byteLength;p.length>r;){const h=p.chunks.length>1?de.Buffer.concat(p.chunks):p.chunks[0];yield{partNumber:c,data:h.subarray(0,r)},p.chunks=[h.subarray(r)],p.length=p.chunks[0].byteLength,c+=1}yield{partNumber:c,data:p.chunks.length!==1?de.Buffer.concat(p.chunks):p.chunks[0],lastPart:!0}}async function*Zt(a,r){let o=1,c=0,p=r;for(;p{if(a instanceof Uint8Array)return Zt(a,r);if(a instanceof yi.Readable)return ut(a,r,mi);if(a instanceof String||typeof a=="string")return Zt(de.Buffer.from(a),r);if(typeof a.stream=="function")return ut(a.stream(),r,Jt);if(a instanceof ReadableStream)return ut(a,r,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Re extends We.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(r){if(super(),this.queueSize=r.queueSize||this.queueSize,this.leavePartsOnError=r.leavePartsOnError||this.leavePartsOnError,this.tags=r.tags||this.tags,this.client=r.client,this.params=r.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Me(this.params.Body),this.totalBytesSource=ii(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=r.abortController??new ei,this.partSize=r.partSize||Math.max(Re.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(r,o){return this.uploadEvent=r,super.on(r,o)}async __uploadUsingPut(r){this.isMultiPart=!1;const o={...this.params,Body:r.data},c=this.client.config,p=c.requestHandler,l=p instanceof We.EventEmitter?p:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:r.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};l!==null&&l.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(o)),c?.endpoint?.()]),d=i[0];let w=i[1];if(w||(w=Or(await qr(o,Rt,{...c}))),!w)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');l!==null&&l.off("xhr.upload.progress",h);const D=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=w.hostname.startsWith(`${R}.`),T=this.client.config.forcePathStyle,F=w.port?`:${w.port}`:"";return T?`${w.protocol}//${w.hostname}${F}/${R}/${D}`:_?`${w.protocol}//${w.hostname}${F}/${D}`:`${w.protocol}//${R}.${w.hostname}${F}/${D}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const A=Me(r.data);this.__notifyProgress({loaded:A,total:A,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const r=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const o={...this.params,Body:void 0};r==="WHEN_SUPPORTED"&&(o.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Zn.CRC32),this.createMultiPartPromise=this.client.send(new Vn(o)).then(c=>(this.abortMultipartUploadCommand=new Hn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:c.UploadId}),c))}return this.createMultiPartPromise}async __doConcurrentUpload(r){for await(const o of r){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(o.partNumber===1&&o.lastPart)return await this.__uploadUsingPut(o);if(!this.uploadId){const{UploadId:w}=await this.__createMultipartUpload();if(this.uploadId=w,this.abortController.signal.aborted)return}const c=Me(o.data)||0,p=this.client.config.requestHandler,l=p instanceof We.EventEmitter?p:null;let h=0;const i=(w,D)=>{(Number(D.query.partNumber)||-1)===o.partNumber&&(w.total&&c&&(this.bytesUploadedSoFar+=w.loaded-h,h=w.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};l!==null&&l.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(o);const d=await this.client.send(new Qn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:o.data,PartNumber:o.partNumber}));if(l!==null&&l.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${o.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:o.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),l===null&&(this.bytesUploadedSoFar+=c),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const r=gi(this.params.Body,this.partSize),o=[];for(let p=0;p{o.push(h)});this.concurrentUploaders.push(l)}if(await Promise.all(this.concurrentUploaders),o.length>=1)throw await this.markUploadAsAborted(),o[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let c;if(this.isMultiPart){const{expectedPartsCount:p,uploadedParts:l,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&p!==void 0&&l.length!==p)throw new Error(`Expected ${p} part(s) but uploaded ${l.length} part(s). +import{g as wt,aK as pr,aL as yr,aM as Q,aN as lt,aO as Ne,aP as mr,aQ as gr,aR as wr,aS as br,aT as Er,aU as xr,aV as vr,aW as _r,aX as Cr,aY as Sr,aZ as bt,a_ as ce,a$ as qe,b0 as Ar,b1 as Rr,b2 as Br,b3 as pe,b4 as ye,b5 as me,b6 as ge,b7 as Fr,b8 as Dr,b9 as Tr,ba as Mr,bb as Lr,bc as kr,bd as Nr,be as Pr,c as Ie,j as z,aE as Ir,bf as Ur,bg as Ee,bh as Or,bi as qr,bj as St,bk as er,bl as Et,r as tr,bm as jr,B as Hr}from"./index.js";import{a as Wr,b as Kr,c as $r,e as zr,d as Vr,h as Gr,f as Yr,g as Xr}from"./alert-dialog.js";import{D as Qr}from"./download.js";import{T as Zr}from"./trash-2.js";import{u as rr}from"./useMutation.js";const Jr=[["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:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],en=wt("file",Jr);const tn=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],rn=wt("folder",tn);const nn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],an=wt("upload",nn),on=typeof ReadableStream=="function"?ReadableStream:function(){};class sn extends on{}const un=({expectedChecksum:a,checksum:r,source:o,checksumSourceLocation:c,base64Encoder:p})=>{if(!pr(o))throw new Error(`@smithy/util-stream: unsupported source type ${o?.constructor?.name??o} in ChecksumStream.`);const l=p??yr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,b){r.update(d),b.enqueue(d)},async flush(d){const b=await r.digest(),D=l(b);if(a!==D){const R=new Error(`Checksum mismatch: expected "${a}" but received "${D}" in response header "${c}".`);d.error(R)}else d.terminate()}});o.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,sn.prototype),i};class ln{allocByteArray;byteLength=0;byteArrays=[];constructor(r){this.allocByteArray=r}push(r){this.byteArrays.push(r),this.byteLength+=r.byteLength}flush(){if(this.byteArrays.length===1){const c=this.byteArrays[0];return this.reset(),c}const r=this.allocByteArray(this.byteLength);let o=0;for(let c=0;cnew Uint8Array(b))];let i=-1;const d=async b=>{const{value:D,done:R}=await c.read(),B=D;if(R){if(i!==-1){const A=je(h,i);Ae(A)>0&&b.enqueue(A)}b.close()}else{const A=dn(B,!1);if(i!==A&&(i>=0&&b.enqueue(je(h,i)),i=A),i===-1){b.enqueue(B);return}const _=Ae(B);l+=_;const T=Ae(h[i]);if(_>=r&&T===0)b.enqueue(B);else{const F=hn(h,i,B);!p&&l>r*2&&(p=!0,o?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${r}, automatically buffering.`)),F>=r?b.enqueue(je(h,i)):await d(b)}}};return new ReadableStream({pull:d})}const cn=fn;function hn(a,r,o){switch(r){case 0:return a[0]+=o,Ae(a[0]);case 1:case 2:return a[r].push(o),Ae(a[r])}}function je(a,r){switch(r){case 0:const o=a[0];return a[0]="",o;case 1:case 2:return a[r].flush()}throw new Error(`@smithy/util-stream - invalid index ${r} given to flush()`)}function Ae(a){return a?.byteLength??a?.length??0}function dn(a,r=!0){return r&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const ft=[Q.CRC32,Q.CRC32C,Q.CRC64NVME,Q.SHA1,Q.SHA256],pn=[Q.SHA256,Q.SHA1,Q.CRC32,Q.CRC32C,Q.CRC64NVME],yn=(a,{requestChecksumRequired:r,requestAlgorithmMember:o,requestChecksumCalculation:c})=>{if(!o)return c===Ne.WHEN_SUPPORTED||r?lt:void 0;if(!a[o])return;const p=a[o];if(!ft.includes(p))throw new Error(`The checksum algorithm "${p}" is not supported by the client. Select one of ${ft}.`);return p},xt=a=>a===Q.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,mn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(o===c.toLowerCase())return!0;return!1},gn=(a,r)=>{const o=a.toLowerCase();for(const c of Object.keys(r))if(c.toLowerCase().startsWith(o))return!0;return!1},nr=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!mr(a);var wn=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(r){gr(r)||this.crc32c.update(wr(r))},a.prototype.digest=function(){return br(this,void 0,void 0,function(){return Er(this,function(r){return[2,xr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(r){var o,c;try{for(var p=vr(r),l=p.next();!l.done;l=p.next()){var h=l.value;this.checksum=this.checksum>>>8^En[(this.checksum^h)&255]}}catch(i){o={error:i}}finally{try{l&&!l.done&&(c=p.return)&&c.call(p)}finally{if(o)throw o.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),bn=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],En=_r(bn);const xn=()=>{const r=new Array(8);for(let o=0;o<8;o++){const c=new Array(512);for(let p=0;p<256;p++){let l=BigInt(p);for(let h=0;h<8*(o+1);h++)l&1n?l=l>>1n^0x9a6c9329ac4bc9b5n:l=l>>1n;c[p*2]=Number(l>>32n&0xffffffffn),c[p*2+1]=Number(l&0xffffffffn)}r[o]=new Uint32Array(c)}return r};let He,Se,ct,ht,dt,pt,yt,mt,gt;const vn=()=>{He||(He=xn(),[Se,ct,ht,dt,pt,yt,mt,gt]=He)};class _n{c1=0;c2=0;constructor(){vn(),this.reset()}update(r){const o=r.length;let c=0,p=this.c1,l=this.c2;for(;c+8<=o;){const h=((l^r[c++])&255)<<1,i=((l>>>8^r[c++])&255)<<1,d=((l>>>16^r[c++])&255)<<1,b=((l>>>24^r[c++])&255)<<1,D=((p^r[c++])&255)<<1,R=((p>>>8^r[c++])&255)<<1,B=((p>>>16^r[c++])&255)<<1,A=((p>>>24^r[c++])&255)<<1;p=gt[h]^mt[i]^yt[d]^pt[b]^dt[D]^ht[R]^ct[B]^Se[A],l=gt[h+1]^mt[i+1]^yt[d+1]^pt[b+1]^dt[D+1]^ht[R+1]^ct[B+1]^Se[A+1]}for(;c>>8|(p&255)<<24)>>>0,p=p>>>8^Se[h],l^=Se[h+1],c++}this.c1=p,this.c2=l}async digest(){const r=this.c1^4294967295,o=this.c2^4294967295;return new Uint8Array([r>>>24,r>>>16&255,r>>>8&255,r&255,o>>>24,o>>>16&255,o>>>8&255,o&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Cn=()=>Cr,ir=(a,r)=>{switch(a){case Q.MD5:return r.md5;case Q.CRC32:return Cn();case Q.CRC32C:return wn;case Q.CRC64NVME:return _n;case Q.SHA1:return r.sha1;case Q.SHA256:return r.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},ar=(a,r)=>{const o=new a;return o.update(Sr(r||"")),o.digest()},Sn={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},An=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request)||gn("x-amz-checksum-",p.request.headers))return o(p);const{request:l,input:h}=p,{body:i,headers:d}=l,{base64Encoder:b,streamHasher:D}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=r,A=await a.requestChecksumCalculation(),_=B?.name,T=B?.httpHeader;_&&!h[_]&&(A===Ne.WHEN_SUPPORTED||R)&&(h[_]=lt,T&&(d[T]=lt));const F=yn(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:A});let y=i,v=d;if(F){switch(F){case Q.CRC32:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Q.CRC32C:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Q.CRC64NVME:ce(c,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Q.SHA1:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Q.SHA256:ce(c,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const S=xt(F),m=ir(F,a);if(nr(i)){const{getAwsChunkedEncodingStream:g,bodyLengthChecker:C}=a;y=g(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?cn(i,a.requestStreamBufferSize,c.logger):i,{base64Encoder:b,bodyLengthChecker:C,checksumLocationName:S,checksumAlgorithmFn:m,streamHasher:D}),v={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":S},delete v["content-length"]}else if(!mn(S,d)){const g=await ar(m,i);v={...d,[S]:b(g)}}}try{return await o({...p,request:{...l,headers:v,body:y}})}catch(S){if(S instanceof Error&&S.name==="InvalidChunkSizeError")try{S.message.endsWith(".")||(S.message+="."),S.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw S}},Rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},Bn=(a,r)=>(o,c)=>async p=>{const l=p.input,{requestValidationModeMember:h}=r,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Ne.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Ne.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case qe.WHEN_REQUIRED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case qe.WHEN_SUPPORTED:ce(c,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!l[h]&&d===qe.WHEN_SUPPORTED&&(l[h]="ENABLED"),o(p)},or=(a=[])=>{const r=[];for(const o of pn)!a.includes(o)||!ft.includes(o)||r.push(o);return r},Fn=a=>{const r=a.lastIndexOf("-");if(r!==-1){const o=a.slice(r+1);if(!o.startsWith("0")){const c=parseInt(o,10);if(!isNaN(c)&&c>=1&&c<=1e4)return!0}}return!1},Dn=async(a,{checksumAlgorithmFn:r,base64Encoder:o})=>o(await ar(r,a)),Tn=async(a,{config:r,responseAlgorithms:o,logger:c})=>{const p=or(o),{body:l,headers:h}=a;for(const i of p){const d=xt(i),b=h[d];if(b){let D;try{D=ir(i,r)}catch(A){if(i===Q.CRC64NVME){c?.warn(`Skipping ${Q.CRC64NVME} checksum validation: ${A.message}`);continue}throw A}const{base64Encoder:R}=r;if(nr(l)){a.body=un({expectedChecksum:b,checksumSourceLocation:d,checksum:new D,source:l,base64Encoder:R});return}const B=await Dn(l,{checksumAlgorithmFn:D,base64Encoder:R});if(B===b)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${b}" in response header "${d}".`)}}},Mn={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Ln=(a,r)=>(o,c)=>async p=>{if(!bt.isInstance(p.request))return o(p);const l=p.input,h=await o(p),i=h.response,{requestValidationModeMember:d,responseAlgorithms:b}=r;if(d&&l[d]==="ENABLED"){const{clientName:D,commandName:R}=c;if(D==="S3Client"&&R==="GetObjectCommand"&&or(b).every(A=>{const _=xt(A),T=i.headers[_];return!T||Fn(T)}))return h;await Tn(i,{config:a,responseAlgorithms:b,logger:c.logger})}return h},Ue=(a,r)=>({applyToStack:o=>{o.add(An(a,r),Sn),o.addRelativeTo(Bn(a,r),Rn),o.addRelativeTo(Ln(a,r),Mn)}}),kn="content-length",Nn="x-amz-decoded-content-length";function Pn(){return(a,r)=>async o=>{const{request:c}=o;if(bt.isInstance(c)&&!(kn in c.headers)&&!(Nn in c.headers)){const p="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof r?.logger?.warn=="function"&&!(r.logger instanceof Ar)?r.logger.warn(p):console.warn(p)}return a({...o})}}const In={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Un=a=>({applyToStack:r=>{r.add(Pn(),In)}}),On=a=>(r,o)=>async c=>{const p=await r(c),{response:l}=p;if(Rr.isInstance(l)&&l.headers.expires){l.headers.expiresstring=l.headers.expires;try{Br(l.headers.expires)}catch(h){o.logger?.warn(`AWS SDK Warning for ${o.clientName}::${o.commandName} response parsing (${l.headers.expires}): ${h}`),delete l.headers.expires}}return p},qn={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},jn=a=>({applyToStack:r=>{r.addRelativeTo(On(),qn)}});class Hn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Fr).build(){}function Wn(a){return r=>async o=>{const c={...o.input},p=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const l of p){const h=c[l.target];if(h){let i;typeof h=="string"?$n(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),c[l.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),c[l.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),c[l.hash]=a.base64Encoder(await d.digest())}}return r({...o,input:c})}}const Kn={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Be=a=>({applyToStack:r=>{r.add(Wn(a),Kn)}});function $n(a,r){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return r.base64Decoder(a).length===32}catch{return!1}}class zn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Dr).build(){}class Vn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c),Be(c)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Tr).build(){}class Gn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),ge(c)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Mr).build(){}class Yn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Be(c),jn()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Lr).build(){}class Rt extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Un(),ge(c),Be(c)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(kr).build(){}class Xn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),ge(c)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Nr).build(){}class Qn extends pe.classBuilder().ep({...ye,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,o,c,p){return[me(c,r.getEndpointParameterInstructions()),Ue(c,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),ge(c),Be(c)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Pr).build(){}const Zn={CRC32:"CRC32"};function Ri(a){const r=Ie.c(9),{folderName:o,fullPrefix:c,bucketName:p}=a;let l;r[0]!==p||r[1]!==c?(l={bucket:p,_splat:c},r[0]=p,r[1]=c,r[2]=l):l=r[2];let h;r[3]===Symbol.for("react.memo_cache_sentinel")?(h=z.jsx(rn,{className:"size-5 text-muted-foreground"}),r[3]=h):h=r[3];let i;r[4]!==o?(i=z.jsx("span",{className:"font-medium",children:o}),r[4]=o,r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==i?(d=z.jsxs(Ir,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:l,to:"/s3/ls/$bucket/$",children:[h,i]}),r[6]=l,r[7]=i,r[8]=d):d=r[8],d}class Jn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class ei{signal=new Jn;abort(){this.signal.abort()}}var De={exports:{}},Bt;function Oe(){if(Bt)return De.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,r=a&&typeof a.apply=="function"?a.apply:function(g,C,I){return Function.prototype.apply.call(g,C,I)},o;a&&typeof a.ownKeys=="function"?o=a.ownKeys:Object.getOwnPropertySymbols?o=function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:o=function(g){return Object.getOwnPropertyNames(g)};function c(m){console&&console.warn&&console.warn(m)}var p=Number.isNaN||function(g){return g!==g};function l(){l.init.call(this)}De.exports=l,De.exports.once=y,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function i(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(m){if(typeof m!="number"||m<0||p(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");h=m}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||p(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this};function d(m){return m._maxListeners===void 0?l.defaultMaxListeners:m._maxListeners}l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(g){for(var C=[],I=1;I0&&(q=C[0]),q instanceof Error)throw q;var G=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw G.context=q,G}var ee=U[g];if(ee===void 0)return!1;if(typeof ee=="function")r(ee,this,C);else for(var re=ee.length,ne=_(ee,re),I=0;I0&&q.length>P&&!q.warned){q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(g)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=g,G.count=q.length,c(G)}return m}l.prototype.addListener=function(g,C){return b(this,g,C,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(g,C){return b(this,g,C,!0)};function D(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(m,g,C){var I={fired:!1,wrapFn:void 0,target:m,type:g,listener:C},P=D.bind(I);return P.listener=C,I.wrapFn=P,P}l.prototype.once=function(g,C){return i(C),this.on(g,R(this,g,C)),this},l.prototype.prependOnceListener=function(g,C){return i(C),this.prependListener(g,R(this,g,C)),this},l.prototype.removeListener=function(g,C){var I,P,U,q,G;if(i(C),P=this._events,P===void 0)return this;if(I=P[g],I===void 0)return this;if(I===C||I.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete P[g],P.removeListener&&this.emit("removeListener",g,I.listener||C));else if(typeof I!="function"){for(U=-1,q=I.length-1;q>=0;q--)if(I[q]===C||I[q].listener===C){G=I[q].listener,U=q;break}if(U<0)return this;U===0?I.shift():T(I,U),I.length===1&&(P[g]=I[0]),P.removeListener!==void 0&&this.emit("removeListener",g,G||C)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(g){var C,I,P;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[g]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[g]),this;if(arguments.length===0){var U=Object.keys(I),q;for(P=0;P=0;P--)this.removeListener(g,C[P]);return this};function B(m,g,C){var I=m._events;if(I===void 0)return[];var P=I[g];return P===void 0?[]:typeof P=="function"?C?[P.listener||P]:[P]:C?F(P):_(P,P.length)}l.prototype.listeners=function(g){return B(this,g,!0)},l.prototype.rawListeners=function(g){return B(this,g,!1)},l.listenerCount=function(m,g){return typeof m.listenerCount=="function"?m.listenerCount(g):A.call(m,g)},l.prototype.listenerCount=A;function A(m){var g=this._events;if(g!==void 0){var C=g[m];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function _(m,g){for(var C=new Array(g),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var T=A.indexOf("=");T===-1&&(T=_);var F=T===_?0:4-T%4;return[T,F]}function i(A){var _=h(A),T=_[0],F=_[1];return(T+F)*3/4-F}function d(A,_,T){return(_+T)*3/4-T}function b(A){var _,T=h(A),F=T[0],y=T[1],v=new o(d(A,F,y)),S=0,m=y>0?F-4:F,g;for(g=0;g>16&255,v[S++]=_>>8&255,v[S++]=_&255;return y===2&&(_=r[A.charCodeAt(g)]<<2|r[A.charCodeAt(g+1)]>>4,v[S++]=_&255),y===1&&(_=r[A.charCodeAt(g)]<<10|r[A.charCodeAt(g+1)]<<4|r[A.charCodeAt(g+2)]>>2,v[S++]=_>>8&255,v[S++]=_&255),v}function D(A){return a[A>>18&63]+a[A>>12&63]+a[A>>6&63]+a[A&63]}function R(A,_,T){for(var F,y=[],v=_;vm?m:S+v));return F===1?(_=A[T-1],y.push(a[_>>2]+a[_<<4&63]+"==")):F===2&&(_=(A[T-2]<<8)+A[T-1],y.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),y.join("")}return Ce}var Te={};var Dt;function ri(){return Dt||(Dt=1,Te.read=function(a,r,o,c,p){var l,h,i=p*8-c-1,d=(1<>1,D=-7,R=o?p-1:0,B=o?-1:1,A=a[r+R];for(R+=B,l=A&(1<<-D)-1,A>>=-D,D+=i;D>0;l=l*256+a[r+R],R+=B,D-=8);for(h=l&(1<<-D)-1,l>>=-D,D+=c;D>0;h=h*256+a[r+R],R+=B,D-=8);if(l===0)l=1-b;else{if(l===d)return h?NaN:(A?-1:1)*(1/0);h=h+Math.pow(2,c),l=l-b}return(A?-1:1)*h*Math.pow(2,l-c)},Te.write=function(a,r,o,c,p,l){var h,i,d,b=l*8-p-1,D=(1<>1,B=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=c?0:l-1,_=c?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(i=isNaN(r)?1:0,h=D):(h=Math.floor(Math.log(r)/Math.LN2),r*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?r+=B/d:r+=B*Math.pow(2,1-R),r*d>=2&&(h++,d/=2),h+R>=D?(i=0,h=D):h+R>=1?(i=(r*d-1)*Math.pow(2,p),h=h+R):(i=r*Math.pow(2,R-1)*Math.pow(2,p),h=0));p>=8;a[o+A]=i&255,A+=_,i/=256,p-=8);for(h=h<0;a[o+A]=h&255,A+=_,h/=256,b-=8);a[o+A-_]|=T*128}),Te}var Tt;function Fe(){return Tt||(Tt=1,(function(a){var r=ti(),o=ri(),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=y,a.INSPECT_MAX_BYTES=50;var p=2147483647;a.kMaxLength=p,i.TYPED_ARRAY_SUPPORT=l(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),n.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(n){if(n>p)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,i.prototype),e}function i(n,e,t){if(typeof n=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(n)}return d(n,e,t)}i.poolSize=8192;function d(n,e,t){if(typeof n=="string")return B(n,e);if(ArrayBuffer.isView(n))return A(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(M(n,ArrayBuffer)||n&&M(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(n,SharedArrayBuffer)||n&&M(n.buffer,SharedArrayBuffer)))return _(n,e,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var u=n.valueOf&&n.valueOf();if(u!=null&&u!==n)return i.from(u,e,t);var w=T(n);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return i.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}i.from=function(n,e,t){return d(n,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function b(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function D(n,e,t){return b(n),n<=0?h(n):e!==void 0?typeof t=="string"?h(n).fill(e,t):h(n).fill(e):h(n)}i.alloc=function(n,e,t){return D(n,e,t)};function R(n){return b(n),h(n<0?0:F(n)|0)}i.allocUnsafe=function(n){return R(n)},i.allocUnsafeSlow=function(n){return R(n)};function B(n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=v(n,e)|0,u=h(t),w=u.write(n,e);return w!==t&&(u=u.slice(0,w)),u}function A(n){for(var e=n.length<0?0:F(n.length)|0,t=h(e),u=0;u=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return n|0}function y(n){return+n!=n&&(n=0),i.alloc(+n)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var u=e.length,w=t.length,L=0,k=Math.min(u,w);L2&&arguments[2]===!0;if(!u&&t===0)return 0;for(var w=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return N(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return s(n).length;default:if(w)return u?-1:N(n).length;e=(""+e).toLowerCase(),w=!0}}i.byteLength=v;function S(n,e,t){var u=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(n||(n="utf8");;)switch(n){case"hex":return ue(this,e,t);case"utf8":case"utf-8":return ne(this,e,t);case"ascii":return ae(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return re(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,e,t);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),u=!0}}i.prototype._isBuffer=!0;function m(n,e,t){var u=n[e];n[e]=n[t],n[t]=u}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},c&&(i.prototype[c]=i.prototype.inspect),i.prototype.compare=function(e,t,u,w,L){if(M(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),u===void 0&&(u=e?e.length:0),w===void 0&&(w=0),L===void 0&&(L=this.length),t<0||u>e.length||w<0||L>this.length)throw new RangeError("out of range index");if(w>=L&&t>=u)return 0;if(w>=L)return-1;if(t>=u)return 1;if(t>>>=0,u>>>=0,w>>>=0,L>>>=0,this===e)return 0;for(var k=L-w,W=u-t,K=Math.min(k,W),V=this.slice(w,L),J=e.slice(t,u),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=w?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(w)return-1;t=n.length-1}else if(t<0)if(w)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,u)),i.isBuffer(e))return e.length===0?-1:C(n,e,t,u,w);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):C(n,[e],t,u,w);throw new TypeError("val must be string, number or Buffer")}function C(n,e,t,u,w){var L=1,k=n.length,W=e.length;if(u!==void 0&&(u=String(u).toLowerCase(),u==="ucs2"||u==="ucs-2"||u==="utf16le"||u==="utf-16le")){if(n.length<2||e.length<2)return-1;L=2,k/=2,W/=2,t/=2}function K(_t,Ct){return L===1?_t[Ct]:_t.readUInt16BE(Ct*L)}var V;if(w){var J=-1;for(V=t;Vk&&(t=k-W),V=t;V>=0;V--){for(var $=!0,se=0;sew&&(u=w)):u=w;var L=e.length;u>L/2&&(u=L/2);for(var k=0;k>>0,isFinite(u)?(u=u>>>0,w===void 0&&(w="utf8")):(w=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-t;if((u===void 0||u>L)&&(u=L),e.length>0&&(u<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var k=!1;;)switch(w){case"hex":return I(this,e,t,u);case"utf8":case"utf-8":return P(this,e,t,u);case"ascii":return U(this,e,t,u);case"latin1":case"binary":return q(this,e,t,u);case"base64":return G(this,e,t,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,e,t,u);default:if(k)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(n,e,t){return e===0&&t===n.length?r.fromByteArray(n):r.fromByteArray(n.slice(e,t))}function ne(n,e,t){t=Math.min(n.length,t);for(var u=[],w=e;w239?4:L>223?3:L>191?2:1;if(w+W<=t){var K,V,J,$;switch(W){case 1:L<128&&(k=L);break;case 2:K=n[w+1],(K&192)===128&&($=(L&31)<<6|K&63,$>127&&(k=$));break;case 3:K=n[w+1],V=n[w+2],(K&192)===128&&(V&192)===128&&($=(L&15)<<12|(K&63)<<6|V&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=n[w+1],V=n[w+2],J=n[w+3],(K&192)===128&&(V&192)===128&&(J&192)===128&&($=(L&15)<<18|(K&63)<<12|(V&63)<<6|J&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,u.push(k>>>10&1023|55296),k=56320|k&1023),u.push(k),w+=W}return oe(u)}var ie=4096;function oe(n){var e=n.length;if(e<=ie)return String.fromCharCode.apply(String,n);for(var t="",u=0;uu)&&(t=u);for(var w="",L=e;Lu&&(e=u),t<0?(t+=u,t<0&&(t=0)):t>u&&(t=u),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e+--t],L=1;t>0&&(L*=256);)w+=this[e+--t]*L;return w},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=this[e],L=1,k=0;++k=L&&(w-=Math.pow(2,8*t)),w},i.prototype.readIntBE=function(e,t,u){e=e>>>0,t=t>>>0,u||Y(e,t,this.length);for(var w=t,L=1,k=this[e+--w];w>0&&(L*=256);)k+=this[e+--w]*L;return L*=128,k>=L&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e]|this[e+1]<<8;return u&32768?u|4294901760:u},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var u=this[e+1]|this[e]<<8;return u&32768?u|4294901760:u},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),o.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),o.read(this,e,!1,52,8)};function Z(n,e,t,u,w,L){if(!i.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>w||en.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,u=u>>>0,!w){var L=Math.pow(2,8*u)-1;Z(this,e,t,u,L,0)}var k=u-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+u},i.prototype.writeUInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+u},i.prototype.writeIntBE=function(e,t,u,w){if(e=+e,t=t>>>0,!w){var L=Math.pow(2,8*u-1);Z(this,e,t,u,L-1,-L)}var k=u-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+u},i.prototype.writeInt8=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,u){return e=+e,t=t>>>0,u||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function te(n,e,t,u,w,L){if(t+u>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function we(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,4),o.write(n,e,t,u,23,4),t+4}i.prototype.writeFloatLE=function(e,t,u){return we(this,e,t,!0,u)},i.prototype.writeFloatBE=function(e,t,u){return we(this,e,t,!1,u)};function be(n,e,t,u,w){return e=+e,t=t>>>0,w||te(n,e,t,8),o.write(n,e,t,u,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,u){return be(this,e,t,!0,u)},i.prototype.writeDoubleBE=function(e,t,u){return be(this,e,t,!1,u)},i.prototype.copy=function(e,t,u,w){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(u||(u=0),!w&&w!==0&&(w=this.length),t>=e.length&&(t=e.length),t||(t=0),w>0&&w=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),e.length-t=0;--k)e[k+t]=this[k+u];else Uint8Array.prototype.set.call(e,this.subarray(u,w),t);return L},i.prototype.fill=function(e,t,u,w){if(typeof e=="string"){if(typeof t=="string"?(w=t,t=0,u=this.length):typeof u=="string"&&(w=u,u=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!i.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(e.length===1){var L=e.charCodeAt(0);(w==="utf8"&&L<128||w==="latin1")&&(e=L)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,u=u===void 0?this.length:u>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!w){if(t>56319){(e-=3)>-1&&L.push(239,191,189);continue}else if(k+1===u){(e-=3)>-1&&L.push(239,191,189);continue}w=t;continue}if(t<56320){(e-=3)>-1&&L.push(239,191,189),w=t;continue}t=(w-55296<<10|t-56320)+65536}else w&&(e-=3)>-1&&L.push(239,191,189);if(w=null,t<128){if((e-=1)<0)break;L.push(t)}else if(t<2048){if((e-=2)<0)break;L.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;L.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;L.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return L}function j(n){for(var e=[],t=0;t>8,w=t%256,L.push(w),L.push(u);return L}function s(n){return r.toByteArray(E(n))}function f(n,e,t,u){for(var w=0;w=e.length||w>=n.length);++w)e[w+t]=n[w];return w}function M(n,e){return n instanceof e||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===e.name}function O(n){return n!==n}var X=(function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var u=t*16,w=0;w<16;++w)e[u+w]=n[t]+n[w];return e})()})(Ke)),Ke}var de=Fe();const ni={lstatSync:()=>{},isFileReadStream(a){return!1}},Pe={...ni,runtime:"browser"},Me=a=>{if(a==null)return 0;if(typeof a=="string")return de.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size}catch{return}};var le;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(le||(le={}));const ii=(a,r)=>{if(r!=null)return le.CONTENT_LENGTH;if(a==null)return le.EMPTY_INPUT;if(typeof a=="string")return le.STRING_LENGTH;if(typeof a.byteLength=="number")return le.TYPED_ARRAY;if(typeof a.length=="number")return le.LENGTH;if(typeof a.size=="number")return le.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return le.START_END_DIFF;if(Pe.isFileReadStream(a))try{return Pe.lstatSync(a.path).size,le.LSTAT}catch{return}};var Le={exports:{}},Mt;function ve(){return Mt||(Mt=1,typeof Object.create=="function"?Le.exports=function(r,o){o&&(r.super_=o,r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Le.exports=function(r,o){if(o){r.super_=o;var c=function(){};c.prototype=o.prototype,r.prototype=new c,r.prototype.constructor=r}}),Le.exports}var $e,Lt;function sr(){return Lt||(Lt=1,$e=Oe().EventEmitter),$e}const ai={},oi=Object.freeze(Object.defineProperty({__proto__:null,default:ai},Symbol.toStringTag,{value:"Module"})),ur=Ur(oi);var ze,kt;function si(){if(kt)return ze;kt=1;function a(_,T){var F=Object.keys(_);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(_);T&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(_,v).enumerable})),F.push.apply(F,y)}return F}function r(_){for(var T=1;T0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(F){var y={data:F,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var F=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=F+y.data;return v}},{key:"concat",value:function(F){if(this.length===0)return b.alloc(0);for(var y=b.allocUnsafe(F>>>0),v=this.head,S=0;v;)A(v.data,y,S),S+=v.data.length,v=v.next;return y}},{key:"consume",value:function(F,y){var v;return Fm.length?m.length:F;if(g===m.length?S+=m:S+=m.slice(0,F),F-=g,F===0){g===m.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=m.slice(g));break}++v}return this.length-=v,S}},{key:"_getBuffer",value:function(F){var y=b.allocUnsafe(F),v=this.head,S=1;for(v.data.copy(y),F-=v.data.length;v=v.next;){var m=v.data,g=F>m.length?m.length:F;if(m.copy(y,y.length-F,0,g),F-=g,F===0){g===m.length?(++S,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=m.slice(g));break}++S}return this.length-=S,y}},{key:B,value:function(F,y){return R(this,r(r({},y),{},{depth:0,customInspect:!1}))}}]),_})(),ze}var Ve,Nt;function lr(){if(Nt)return Ve;Nt=1;function a(h,i){var d=this,b=this._readableState&&this._readableState.destroyed,D=this._writableState&&this._writableState.destroyed;return b||D?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(p,this,h)):process.nextTick(p,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(o,d):(d._writableState.errorEmitted=!0,process.nextTick(r,d,R)):process.nextTick(r,d,R):i?(process.nextTick(o,d),i(R)):process.nextTick(o,d)}),this)}function r(h,i){p(h,i),o(h)}function o(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function c(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(h,i){h.emit("error",i)}function l(h,i){var d=h._readableState,b=h._writableState;d&&d.autoDestroy||b&&b.autoDestroy?h.destroy(i):h.emit("error",i)}return Ve={destroy:a,undestroy:c,errorOrDestroy:l},Ve}var Ge={},Pt;function _e(){if(Pt)return Ge;Pt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var r={};function o(i,d,b){b||(b=Error);function D(B,A,_){return typeof d=="string"?d:d(B,A,_)}var R=(function(B){a(A,B);function A(_,T,F){return B.call(this,D(_,T,F))||this}return A})(b);R.prototype.name=b.name,R.prototype.code=i,r[i]=R}function c(i,d){if(Array.isArray(i)){var b=i.length;return i=i.map(function(D){return String(D)}),b>2?"one of ".concat(d," ").concat(i.slice(0,b-1).join(", "),", or ")+i[b-1]:b===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function p(i,d,b){return i.substr(0,d.length)===d}function l(i,d,b){return(b===void 0||b>i.length)&&(b=i.length),i.substring(b-d.length,b)===d}function h(i,d,b){return typeof b!="number"&&(b=0),b+d.length>i.length?!1:i.indexOf(d,b)!==-1}return o("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(i,d,b){var D;typeof d=="string"&&p(d,"not ")?(D="must not be",d=d.replace(/^not /,"")):D="must be";var R;if(l(i," argument"))R="The ".concat(i," ").concat(D," ").concat(c(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(D," ").concat(c(d,"type"))}return R+=". Received type ".concat(typeof b),R},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.codes=r,Ge}var Ye,It;function fr(){if(It)return Ye;It=1;var a=_e().codes.ERR_INVALID_OPT_VALUE;function r(c,p,l){return c.highWaterMark!=null?c.highWaterMark:p?c[l]:null}function o(c,p,l,h){var i=r(p,h,l);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?l:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return c.objectMode?16:16*1024}return Ye={getHighWaterMark:o},Ye}var Xe,Ut;function ui(){if(Ut)return Xe;Ut=1,Xe=a;function a(o,c){if(r("noDeprecation"))return o;var p=!1;function l(){if(!p){if(r("throwDeprecation"))throw new Error(c);r("traceDeprecation")?console.trace(c):console.warn(c),p=!0}return o.apply(this,arguments)}return l}function r(o){try{if(!Ee.localStorage)return!1}catch{return!1}var c=Ee.localStorage[o];return c==null?!1:String(c).toLowerCase()==="true"}return Xe}var Qe,Ot;function cr(){if(Ot)return Qe;Ot=1,Qe=P;function a(x){var E=this;this.next=null,this.entry=null,this.finish=function(){be(E,x)}}var r;P.WritableState=C;var o={deprecate:ui()},c=sr(),p=Fe().Buffer,l=(typeof Ee<"u"?Ee:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(x){return p.from(x)}function i(x){return p.isBuffer(x)||x instanceof l}var d=lr(),b=fr(),D=b.getHighWaterMark,R=_e().codes,B=R.ERR_INVALID_ARG_TYPE,A=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,T=R.ERR_STREAM_CANNOT_PIPE,F=R.ERR_STREAM_DESTROYED,y=R.ERR_STREAM_NULL_VALUES,v=R.ERR_STREAM_WRITE_AFTER_END,S=R.ERR_UNKNOWN_ENCODING,m=d.errorOrDestroy;ve()(P,c);function g(){}function C(x,E,N){r=r||xe(),x=x||{},typeof N!="boolean"&&(N=E instanceof r),this.objectMode=!!x.objectMode,N&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=D(this,x,"writableHighWaterMark",N),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=x.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){oe(E,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}C.prototype.getBuffer=function(){for(var E=this.bufferedRequest,N=[];E;)N.push(E),E=E.next;return N},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(E){return I.call(this,E)?!0:this!==P?!1:E&&E._writableState instanceof C}})):I=function(E){return E instanceof this};function P(x){r=r||xe();var E=this instanceof r;if(!E&&!I.call(P,this))return new P(x);this._writableState=new C(x,this,E),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),c.call(this)}P.prototype.pipe=function(){m(this,new T)};function U(x,E){var N=new v;m(x,N),process.nextTick(E,N)}function q(x,E,N,j){var H;return N===null?H=new y:typeof N!="string"&&!E.objectMode&&(H=new B("chunk",["string","Buffer"],N)),H?(m(x,H),process.nextTick(j,H),!1):!0}P.prototype.write=function(x,E,N){var j=this._writableState,H=!1,s=!j.objectMode&&i(x);return s&&!p.isBuffer(x)&&(x=h(x)),typeof E=="function"&&(N=E,E=null),s?E="buffer":E||(E=j.defaultEncoding),typeof N!="function"&&(N=g),j.ending?U(this,N):(s||q(this,j,x,N))&&(j.pendingcb++,H=ee(this,j,s,x,E,N)),H},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&ue(this,x))},P.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=E.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((E+"").toLowerCase())>-1))throw new S(E);return this._writableState.defaultEncoding=E,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(x,E,N){return!x.objectMode&&x.decodeStrings!==!1&&typeof E=="string"&&(E=p.from(E,N)),E}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(x,E,N,j,H,s){if(!N){var f=G(E,j,H);j!==f&&(N=!0,H="buffer",j=f)}var M=E.objectMode?1:j.length;E.length+=M;var O=E.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function h(y,v,S){var m=v.length-1;if(m=0?(g>0&&(y.lastNeed=g-1),g):--m=0?(g>0&&(y.lastNeed=g-2),g):--m=0?(g>0&&(g===2?g=0:y.lastNeed=g-3),g):0))}function i(y,v,S){if((v[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return y.lastNeed=2,"�"}}function d(y){var v=this.lastTotal-this.lastNeed,S=i(this,y);if(S!==void 0)return S;if(this.lastNeed<=y.length)return y.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,v,0,y.length),this.lastNeed-=y.length}function b(y,v){var S=h(this,y,v);if(!this.lastNeed)return y.toString("utf8",v);this.lastTotal=S;var m=y.length-(S-this.lastNeed);return y.copy(this.lastChar,0,m),y.toString("utf8",v,m)}function D(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+"�":v}function R(y,v){if((y.length-v)%2===0){var S=y.toString("utf16le",v);if(S){var m=S.charCodeAt(S.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",v,y.length-1)}function B(y){var v=y&&y.length?this.write(y):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function A(y,v){var S=(y.length-v)%3;return S===0?y.toString("base64",v):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",v,y.length-S))}function _(y){var v=y&&y.length?this.write(y):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function T(y){return y.toString(this.encoding)}function F(y){return y&&y.length?this.write(y):""}return Je}var et,Kt;function vt(){if(Kt)return et;Kt=1;var a=_e().codes.ERR_STREAM_PREMATURE_CLOSE;function r(l){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),b=0;b0)if(typeof f!="string"&&!n.objectMode&&Object.getPrototypeOf(f)!==c.prototype&&(f=l(f)),O)n.endEmitted?g(s,new y):G(s,n,f,!0);else if(n.ended)g(s,new T);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!M?(f=n.decoder.write(f),n.objectMode||f.length!==0?G(s,n,f,!1):ue(s,n)):G(s,n,f,!1)}else O||(n.reading=!1,ue(s,n))}return!n.ended&&(n.length=re?s=re:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}function ie(s,f){return s<=0||f.length===0&&f.ended?0:f.objectMode?1:s!==s?f.flowing&&f.length?f.buffer.head.data.length:f.length:(s>f.highWaterMark&&(f.highWaterMark=ne(s)),s<=f.length?s:f.ended?f.length:(f.needReadable=!0,0))}U.prototype.read=function(s){d("read",s),s=parseInt(s,10);var f=this._readableState,M=s;if(s!==0&&(f.emittedReadable=!1),s===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended))return d("read: emitReadable",f.length,f.ended),f.length===0&&f.ended?N(this):ae(this),null;if(s=ie(s,f),s===0&&f.ended)return f.length===0&&N(this),null;var O=f.needReadable;d("need readable",O),(f.length===0||f.length-s0?X=E(s,f):X=null,X===null?(f.needReadable=f.length<=f.highWaterMark,s=0):(f.length-=s,f.awaitDrain=0),f.length===0&&(f.ended||(f.needReadable=!0),M!==s&&f.ended&&N(this)),X!==null&&this.emit("data",X),X};function oe(s,f){if(d("onEofChunk"),!f.ended){if(f.decoder){var M=f.decoder.end();M&&M.length&&(f.buffer.push(M),f.length+=f.objectMode?1:M.length)}f.ended=!0,f.sync?ae(s):(f.needReadable=!1,f.emittedReadable||(f.emittedReadable=!0,he(s)))}}function ae(s){var f=s._readableState;d("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,f.emittedReadable||(d("emitReadable",f.flowing),f.emittedReadable=!0,process.nextTick(he,s))}function he(s){var f=s._readableState;d("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended)&&(s.emit("readable"),f.emittedReadable=!1),f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,x(s)}function ue(s,f){f.readingMore||(f.readingMore=!0,process.nextTick(fe,s,f))}function fe(s,f){for(;!f.reading&&!f.ended&&(f.length1&&H(O.pipes,s)!==-1)&&!w&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),M.pause())}function W($){d("onerror",$),J(),s.removeListener("error",W),r(s,"error")===0&&g(s,$)}I(s,"error",W);function K(){s.removeListener("finish",V),J()}s.once("close",K);function V(){d("onfinish"),s.removeListener("close",K),J()}s.once("finish",V);function J(){d("unpipe"),M.unpipe(s)}return s.emit("pipe",M),O.flowing||(d("pipe resume"),M.resume()),s};function Y(s){return function(){var M=s._readableState;d("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&r(s,"data")&&(M.flowing=!0,x(s))}}U.prototype.unpipe=function(s){var f=this._readableState,M={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1)return s&&s!==f.pipes?this:(s||(s=f.pipes),f.pipes=null,f.pipesCount=0,f.flowing=!1,s&&s.emit("unpipe",this,M),this);if(!s){var O=f.pipes,X=f.pipesCount;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var n=0;n0,O.flowing!==!1&&this.resume()):s==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ae(this):O.reading||process.nextTick(te,this)),M},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(s,f){var M=o.prototype.removeListener.call(this,s,f);return s==="readable"&&process.nextTick(Z,this),M},U.prototype.removeAllListeners=function(s){var f=o.prototype.removeAllListeners.apply(this,arguments);return(s==="readable"||s===void 0)&&process.nextTick(Z,this),f};function Z(s){var f=s._readableState;f.readableListening=s.listenerCount("readable")>0,f.resumeScheduled&&!f.paused?f.flowing=!0:s.listenerCount("data")>0&&s.resume()}function te(s){d("readable nexttick read 0"),s.read(0)}U.prototype.resume=function(){var s=this._readableState;return s.flowing||(d("resume"),s.flowing=!s.readableListening,we(this,s)),s.paused=!1,this};function we(s,f){f.resumeScheduled||(f.resumeScheduled=!0,process.nextTick(be,s,f))}function be(s,f){d("resume",f.reading),f.reading||s.read(0),f.resumeScheduled=!1,s.emit("resume"),x(s),f.flowing&&!f.reading&&s.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function x(s){var f=s._readableState;for(d("flow",f.flowing);f.flowing&&s.read()!==null;);}U.prototype.wrap=function(s){var f=this,M=this._readableState,O=!1;s.on("end",function(){if(d("wrapped end"),M.decoder&&!M.ended){var e=M.decoder.end();e&&e.length&&f.push(e)}f.push(null)}),s.on("data",function(e){if(d("wrapped data"),M.decoder&&(e=M.decoder.write(e)),!(M.objectMode&&e==null)&&!(!M.objectMode&&(!e||!e.length))){var t=f.push(e);t||(O=!0,s.pause())}});for(var X in s)this[X]===void 0&&typeof s[X]=="function"&&(this[X]=(function(t){return function(){return s[t].apply(s,arguments)}})(X));for(var n=0;n=f.length?(f.decoder?M=f.buffer.join(""):f.buffer.length===1?M=f.buffer.first():M=f.buffer.concat(f.length),f.buffer.clear()):M=f.buffer.consume(s,f.decoder),M}function N(s){var f=s._readableState;d("endReadable",f.endEmitted),f.endEmitted||(f.ended=!0,process.nextTick(j,f,s))}function j(s,f){if(d("endReadableNT",s.endEmitted,s.length),!s.endEmitted&&s.length===0&&(s.endEmitted=!0,f.readable=!1,f.emit("end"),s.autoDestroy)){var M=f._writableState;(!M||M.autoDestroy&&M.finished)&&f.destroy()}}typeof Symbol=="function"&&(U.from=function(s,f){return m===void 0&&(m=ci()),m(U,s,f)});function H(s,f){for(var M=0,O=s.length;M0;return i(v,m,g,function(C){F||(F=C),C&&y.forEach(d),!m&&(y.forEach(d),T(F))})});return A.reduce(b)}return ot=R,ot}var st,Qt;function pi(){if(Qt)return st;Qt=1,st=o;var a=Oe().EventEmitter,r=ve();r(o,a),o.Readable=hr(),o.Writable=cr(),o.Duplex=xe(),o.Transform=dr(),o.PassThrough=hi(),o.finished=vt(),o.pipeline=di(),o.Stream=o;function o(){a.call(this)}return o.prototype.pipe=function(c,p){var l=this;function h(A){c.writable&&c.write(A)===!1&&l.pause&&l.pause()}l.on("data",h);function i(){l.readable&&l.resume&&l.resume()}c.on("drain",i),!c._isStdio&&(!p||p.end!==!1)&&(l.on("end",b),l.on("close",D));var d=!1;function b(){d||(d=!0,c.end())}function D(){d||(d=!0,typeof c.destroy=="function"&&c.destroy())}function R(A){if(B(),a.listenerCount(this,"error")===0)throw A}l.on("error",R),c.on("error",R);function B(){l.removeListener("data",h),c.removeListener("drain",i),l.removeListener("end",b),l.removeListener("close",D),l.removeListener("error",R),c.removeListener("error",R),l.removeListener("end",B),l.removeListener("close",B),c.removeListener("close",B)}return l.on("end",B),l.on("close",B),c.on("close",B),c.emit("pipe",l),c},st}var yi=pi();async function*ut(a,r,o){let c=1;const p={chunks:[],length:0};for await(const l of o(a))for(p.chunks.push(l),p.length+=l.byteLength;p.length>r;){const h=p.chunks.length>1?de.Buffer.concat(p.chunks):p.chunks[0];yield{partNumber:c,data:h.subarray(0,r)},p.chunks=[h.subarray(r)],p.length=p.chunks[0].byteLength,c+=1}yield{partNumber:c,data:p.chunks.length!==1?de.Buffer.concat(p.chunks):p.chunks[0],lastPart:!0}}async function*Zt(a,r){let o=1,c=0,p=r;for(;p{if(a instanceof Uint8Array)return Zt(a,r);if(a instanceof yi.Readable)return ut(a,r,mi);if(a instanceof String||typeof a=="string")return Zt(de.Buffer.from(a),r);if(typeof a.stream=="function")return ut(a.stream(),r,Jt);if(a instanceof ReadableStream)return ut(a,r,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Re extends We.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(r){if(super(),this.queueSize=r.queueSize||this.queueSize,this.leavePartsOnError=r.leavePartsOnError||this.leavePartsOnError,this.tags=r.tags||this.tags,this.client=r.client,this.params=r.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Me(this.params.Body),this.totalBytesSource=ii(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=r.abortController??new ei,this.partSize=r.partSize||Math.max(Re.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(r,o){return this.uploadEvent=r,super.on(r,o)}async __uploadUsingPut(r){this.isMultiPart=!1;const o={...this.params,Body:r.data},c=this.client.config,p=c.requestHandler,l=p instanceof We.EventEmitter?p:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:r.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};l!==null&&l.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(o)),c?.endpoint?.()]),d=i[0];let b=i[1];if(b||(b=Or(await qr(o,Rt,{...c}))),!b)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');l!==null&&l.off("xhr.upload.progress",h);const D=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=b.hostname.startsWith(`${R}.`),T=this.client.config.forcePathStyle,F=b.port?`:${b.port}`:"";return T?`${b.protocol}//${b.hostname}${F}/${R}/${D}`:_?`${b.protocol}//${b.hostname}${F}/${D}`:`${b.protocol}//${R}.${b.hostname}${F}/${D}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const A=Me(r.data);this.__notifyProgress({loaded:A,total:A,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const r=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const o={...this.params,Body:void 0};r==="WHEN_SUPPORTED"&&(o.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Zn.CRC32),this.createMultiPartPromise=this.client.send(new Vn(o)).then(c=>(this.abortMultipartUploadCommand=new Hn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:c.UploadId}),c))}return this.createMultiPartPromise}async __doConcurrentUpload(r){for await(const o of r){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(o.partNumber===1&&o.lastPart)return await this.__uploadUsingPut(o);if(!this.uploadId){const{UploadId:b}=await this.__createMultipartUpload();if(this.uploadId=b,this.abortController.signal.aborted)return}const c=Me(o.data)||0,p=this.client.config.requestHandler,l=p instanceof We.EventEmitter?p:null;let h=0;const i=(b,D)=>{(Number(D.query.partNumber)||-1)===o.partNumber&&(b.total&&c&&(this.bytesUploadedSoFar+=b.loaded-h,h=b.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};l!==null&&l.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(o);const d=await this.client.send(new Qn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:o.data,PartNumber:o.partNumber}));if(l!==null&&l.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${o.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:o.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),l===null&&(this.bytesUploadedSoFar+=c),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:o.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const r=gi(this.params.Body,this.partSize),o=[];for(let p=0;p{o.push(h)});this.concurrentUploaders.push(l)}if(await Promise.all(this.concurrentUploaders),o.length>=1)throw await this.markUploadAsAborted(),o[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let c;if(this.isMultiPart){const{expectedPartsCount:p,uploadedParts:l,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&p!==void 0&&l.length!==p)throw new Error(`Expected ${p} part(s) but uploaded ${l.length} part(s). The expected part count is based on the byte-count of the input.params.Body, which was read from ${i} and is ${h}. If this is not correct, provide an override value by setting a number to input.params.ContentLength in bytes. -`);this.uploadedParts.sort((w,D)=>w.PartNumber-D.PartNumber);const d={...this.params,Body:void 0,UploadId:this.uploadId,MultipartUpload:{Parts:this.uploadedParts}};c=await this.client.send(new zn(d)),typeof c?.Location=="string"&&c.Location.includes("%2F")&&(c.Location=c.Location.replace(/%2F/g,"/"))}else c=this.singleUploadResult;return this.abortMultipartUploadCommand=null,this.tags.length&&await this.client.send(new Xn({...this.params,Tagging:{TagSet:this.tags}})),c}async markUploadAsAborted(){this.uploadId&&!this.leavePartsOnError&&this.abortMultipartUploadCommand!==null&&(await this.client.send(this.abortMultipartUploadCommand),this.abortMultipartUploadCommand=null)}__notifyProgress(r){this.uploadEvent&&this.emit(this.uploadEvent,r)}async __abortTimeout(r){return new Promise((o,c)=>{r.onabort=()=>{const p=new Error("Upload aborted.");p.name="AbortError",c(p)}})}__validateUploadPart(r){const o=Me(r.data);if(o===void 0)throw new Error(`A dataPart was generated without a measurable data chunk size for part number ${r.partNumber}`);if(!(r.partNumber===1&&r.lastPart)&&!r.lastPart&&o!==this.partSize)throw new Error(`The byte size for part number ${r.partNumber}, size ${o} does not match expected size ${this.partSize}`)}__validateInput(){if(!this.client)throw new Error("InputError: Upload requires a AWS client to do uploads with.");if(this.partSize{r.invalidateQueries({queryKey:["s3","buckets",p.bucket,"objects"]})}},a[0]=r,a[1]=o):o=a[1],rr(o)}async function wi(a){const{bucket:r,key:o,file:c}=a;return await new Re({client:Et(),params:{Bucket:r,Key:o,Body:c,ContentType:c.type}}).done()}function Ei(){const a=Ie.c(2),r=er();let o;return a[0]!==r?(o={mutationFn:xi,onSuccess:(c,p)=>{r.invalidateQueries({queryKey:["s3","buckets",p.bucket,"objects"]})}},a[0]=r,a[1]=o):o=a[1],rr(o)}async function xi(a){const{bucket:r,key:o}=a,c=new Gn({Bucket:r,Key:o});return await Et().send(c)}function Bi(a){const r=Ie.c(46),{object:o,bucketName:c,displayName:p,fullKey:l}=a,[h,i]=tr.useState(!1),d=Ei();let w;r[0]!==c||r[1]!==p||r[2]!==l?(w=async function(){try{const ue=new Yn({Bucket:c,Key:l}),fe=await Et().send(ue);if(fe.Body){const Y=await fe.Body.transformToByteArray(),Z=URL.createObjectURL(new Blob([Y])),te=document.createElement("a");te.href=Z,te.download=p,document.body.appendChild(te),te.click(),document.body.removeChild(te),URL.revokeObjectURL(Z)}}catch{throw new Error("Failed to download object")}},r[0]=c,r[1]=p,r[2]=l,r[3]=w):w=r[3];const D=w;let R;r[4]!==c||r[5]!==d||r[6]!==l?(R=async function(){await d.mutateAsync({bucket:c,key:l}),i(!1)},r[4]=c,r[5]=d,r[6]=l,r[7]=R):R=r[7];const B=R,A=o.Key;let _;r[8]===Symbol.for("react.memo_cache_sentinel")?(_=z.jsx(en,{className:"size-5 text-muted-foreground"}),r[8]=_):_=r[8];let T;r[9]!==p?(T=z.jsx("h3",{className:"font-medium",children:p}),r[9]=p,r[10]=T):T=r[10];let F;r[11]!==o.LastModified?(F=o.LastModified&&z.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",o.LastModified.toLocaleString()]}),r[11]=o.LastModified,r[12]=F):F=r[12];let y;r[13]!==T||r[14]!==F?(y=z.jsxs("div",{className:"flex items-center gap-3",children:[_,z.jsxs("div",{children:[T,F]})]}),r[13]=T,r[14]=F,r[15]=y):y=r[15];const v=o.Size||0;let S;r[16]!==v?(S=jr(v),r[16]=v,r[17]=S):S=r[17];let m;r[18]!==S?(m=z.jsx("div",{className:"text-muted-foreground text-sm",children:S}),r[18]=S,r[19]=m):m=r[19];let g;r[20]===Symbol.for("react.memo_cache_sentinel")?(g=z.jsx(Qr,{className:"size-4"}),r[20]=g):g=r[20];let C;r[21]!==D?(C=z.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:D,type:"button",children:g}),r[21]=D,r[22]=C):C=r[22];let I;r[23]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!0),r[23]=I):I=r[23];let P;r[24]===Symbol.for("react.memo_cache_sentinel")?(P=z.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:I,type:"button",children:z.jsx(Zr,{className:"size-4"})}),r[24]=P):P=r[24];let U;r[25]!==m||r[26]!==C?(U=z.jsxs("div",{className:"flex items-center gap-3",children:[m,C,P]}),r[25]=m,r[26]=C,r[27]=U):U=r[27];let q;r[28]===Symbol.for("react.memo_cache_sentinel")?(q=z.jsx(Wr,{children:"Delete Object"}),r[28]=q):q=r[28];let G;r[29]!==p?(G=z.jsxs(Kr,{children:[q,z.jsxs($r,{children:["Are you sure you want to delete ",z.jsx("strong",{children:p}),"? This action cannot be undone."]})]}),r[29]=p,r[30]=G):G=r[30];let ee;r[31]===Symbol.for("react.memo_cache_sentinel")?(ee=z.jsx(zr,{children:"Cancel"}),r[31]=ee):ee=r[31];const re=d.isPending?"Deleting…":"Delete";let ne;r[32]!==B||r[33]!==re?(ne=z.jsxs(Vr,{children:[ee,z.jsx(Gr,{className:"bg-destructive hover:bg-destructive/90",onClick:B,children:re})]}),r[32]=B,r[33]=re,r[34]=ne):ne=r[34];let ie;r[35]!==G||r[36]!==ne?(ie=z.jsxs(Yr,{children:[G,ne]}),r[35]=G,r[36]=ne,r[37]=ie):ie=r[37];let oe;r[38]!==h||r[39]!==ie?(oe=z.jsx(Xr,{onOpenChange:i,open:h,children:ie}),r[38]=h,r[39]=ie,r[40]=oe):oe=r[40];let ae;return r[41]!==o.Key||r[42]!==U||r[43]!==oe||r[44]!==y?(ae=z.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[y,U,oe]},A),r[41]=o.Key,r[42]=U,r[43]=oe,r[44]=y,r[45]=ae):ae=r[45],ae}function Fi({bucket:a,prefix:r=""}){const o=tr.useRef(null),c=bi();async function p(l){const h=l.target.files;if(!(!h||h.length===0))try{await Promise.all(Array.from(h).map(i=>{const d=`${r}${i.name}`;return c.mutateAsync({bucket:a,key:d,file:i})}))}finally{o.current&&(o.current.value="")}}return z.jsxs(z.Fragment,{children:[z.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:p,ref:o,type:"file"}),z.jsxs(Hr,{disabled:c.isPending,onClick:()=>o.current?.click(),size:"sm",children:[z.jsx(an,{className:"mr-2 size-4"}),c.isPending?"Uploading…":"Upload Files"]})]})}export{Ri as F,Bi as O,Fi as U}; +`);this.uploadedParts.sort((b,D)=>b.PartNumber-D.PartNumber);const d={...this.params,Body:void 0,UploadId:this.uploadId,MultipartUpload:{Parts:this.uploadedParts}};c=await this.client.send(new zn(d)),typeof c?.Location=="string"&&c.Location.includes("%2F")&&(c.Location=c.Location.replace(/%2F/g,"/"))}else c=this.singleUploadResult;return this.abortMultipartUploadCommand=null,this.tags.length&&await this.client.send(new Xn({...this.params,Tagging:{TagSet:this.tags}})),c}async markUploadAsAborted(){this.uploadId&&!this.leavePartsOnError&&this.abortMultipartUploadCommand!==null&&(await this.client.send(this.abortMultipartUploadCommand),this.abortMultipartUploadCommand=null)}__notifyProgress(r){this.uploadEvent&&this.emit(this.uploadEvent,r)}async __abortTimeout(r){return new Promise((o,c)=>{r.onabort=()=>{const p=new Error("Upload aborted.");p.name="AbortError",c(p)}})}__validateUploadPart(r){const o=Me(r.data);if(o===void 0)throw new Error(`A dataPart was generated without a measurable data chunk size for part number ${r.partNumber}`);if(!(r.partNumber===1&&r.lastPart)&&!r.lastPart&&o!==this.partSize)throw new Error(`The byte size for part number ${r.partNumber}, size ${o} does not match expected size ${this.partSize}`)}__validateInput(){if(!this.client)throw new Error("InputError: Upload requires a AWS client to do uploads with.");if(this.partSize{r.invalidateQueries({queryKey:["s3","buckets",p.bucket,"objects"]})}},a[0]=r,a[1]=o):o=a[1],rr(o)}async function bi(a){const{bucket:r,key:o,file:c}=a;return await new Re({client:Et(),params:{Bucket:r,Key:o,Body:c,ContentType:c.type}}).done()}function Ei(){const a=Ie.c(2),r=er();let o;return a[0]!==r?(o={mutationFn:xi,onSuccess:(c,p)=>{r.invalidateQueries({queryKey:["s3","buckets",p.bucket,"objects"]})}},a[0]=r,a[1]=o):o=a[1],rr(o)}async function xi(a){const{bucket:r,key:o}=a,c=new Gn({Bucket:r,Key:o});return await Et().send(c)}function Bi(a){const r=Ie.c(46),{object:o,bucketName:c,displayName:p,fullKey:l}=a,[h,i]=tr.useState(!1),d=Ei();let b;r[0]!==c||r[1]!==p||r[2]!==l?(b=async function(){try{const ue=new Yn({Bucket:c,Key:l}),fe=await Et().send(ue);if(fe.Body){const Y=await fe.Body.transformToByteArray(),Z=URL.createObjectURL(new Blob([Y])),te=document.createElement("a");te.href=Z,te.download=p,document.body.appendChild(te),te.click(),document.body.removeChild(te),URL.revokeObjectURL(Z)}}catch{throw new Error("Failed to download object")}},r[0]=c,r[1]=p,r[2]=l,r[3]=b):b=r[3];const D=b;let R;r[4]!==c||r[5]!==d||r[6]!==l?(R=async function(){await d.mutateAsync({bucket:c,key:l}),i(!1)},r[4]=c,r[5]=d,r[6]=l,r[7]=R):R=r[7];const B=R,A=o.Key;let _;r[8]===Symbol.for("react.memo_cache_sentinel")?(_=z.jsx(en,{className:"size-5 text-muted-foreground"}),r[8]=_):_=r[8];let T;r[9]!==p?(T=z.jsx("h3",{className:"font-medium",children:p}),r[9]=p,r[10]=T):T=r[10];let F;r[11]!==o.LastModified?(F=o.LastModified&&z.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",o.LastModified.toLocaleString()]}),r[11]=o.LastModified,r[12]=F):F=r[12];let y;r[13]!==T||r[14]!==F?(y=z.jsxs("div",{className:"flex items-center gap-3",children:[_,z.jsxs("div",{children:[T,F]})]}),r[13]=T,r[14]=F,r[15]=y):y=r[15];const v=o.Size||0;let S;r[16]!==v?(S=jr(v),r[16]=v,r[17]=S):S=r[17];let m;r[18]!==S?(m=z.jsx("div",{className:"text-muted-foreground text-sm",children:S}),r[18]=S,r[19]=m):m=r[19];let g;r[20]===Symbol.for("react.memo_cache_sentinel")?(g=z.jsx(Qr,{className:"size-4"}),r[20]=g):g=r[20];let C;r[21]!==D?(C=z.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:D,type:"button",children:g}),r[21]=D,r[22]=C):C=r[22];let I;r[23]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!0),r[23]=I):I=r[23];let P;r[24]===Symbol.for("react.memo_cache_sentinel")?(P=z.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:I,type:"button",children:z.jsx(Zr,{className:"size-4"})}),r[24]=P):P=r[24];let U;r[25]!==m||r[26]!==C?(U=z.jsxs("div",{className:"flex items-center gap-3",children:[m,C,P]}),r[25]=m,r[26]=C,r[27]=U):U=r[27];let q;r[28]===Symbol.for("react.memo_cache_sentinel")?(q=z.jsx(Wr,{children:"Delete Object"}),r[28]=q):q=r[28];let G;r[29]!==p?(G=z.jsxs(Kr,{children:[q,z.jsxs($r,{children:["Are you sure you want to delete ",z.jsx("strong",{children:p}),"? This action cannot be undone."]})]}),r[29]=p,r[30]=G):G=r[30];let ee;r[31]===Symbol.for("react.memo_cache_sentinel")?(ee=z.jsx(zr,{children:"Cancel"}),r[31]=ee):ee=r[31];const re=d.isPending?"Deleting…":"Delete";let ne;r[32]!==B||r[33]!==re?(ne=z.jsxs(Vr,{children:[ee,z.jsx(Gr,{className:"bg-destructive hover:bg-destructive/90",onClick:B,children:re})]}),r[32]=B,r[33]=re,r[34]=ne):ne=r[34];let ie;r[35]!==G||r[36]!==ne?(ie=z.jsxs(Yr,{children:[G,ne]}),r[35]=G,r[36]=ne,r[37]=ie):ie=r[37];let oe;r[38]!==h||r[39]!==ie?(oe=z.jsx(Xr,{onOpenChange:i,open:h,children:ie}),r[38]=h,r[39]=ie,r[40]=oe):oe=r[40];let ae;return r[41]!==o.Key||r[42]!==U||r[43]!==oe||r[44]!==y?(ae=z.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[y,U,oe]},A),r[41]=o.Key,r[42]=U,r[43]=oe,r[44]=y,r[45]=ae):ae=r[45],ae}function Fi({bucket:a,prefix:r=""}){const o=tr.useRef(null),c=wi();async function p(l){const h=l.target.files;if(!(!h||h.length===0))try{await Promise.all(Array.from(h).map(i=>{const d=`${r}${i.name}`;return c.mutateAsync({bucket:a,key:d,file:i})}))}finally{o.current&&(o.current.value="")}}return z.jsxs(z.Fragment,{children:[z.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:p,ref:o,type:"file"}),z.jsxs(Hr,{disabled:c.isPending,onClick:()=>o.current?.click(),size:"sm",children:[z.jsx(an,{className:"mr-2 size-4"}),c.isPending?"Uploading…":"Upload Files"]})]})}export{Ri as F,Bi as O,Fi as U}; diff --git a/hive/services/hiveui/frontend/dist/assets/useMutation.js b/hive/services/hiveui/frontend/dist/assets/useMutation.js index d035477fe..2754eb2f5 100644 --- a/hive/services/hiveui/frontend/dist/assets/useMutation.js +++ b/hive/services/hiveui/frontend/dist/assets/useMutation.js @@ -1 +1 @@ -import{c0 as l,c1 as d,c2 as a,c3 as p,c4 as h,bl as b,r as o,c5 as m,c6 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??p();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=b(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u}; +import{c1 as l,c2 as d,c3 as a,c4 as p,c5 as h,bk as b,r as o,c6 as m,c7 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??p();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=b(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js index 6c82f351a..a64319666 100644 --- a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js +++ b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js @@ -1 +1 @@ -import{c0 as G,c9 as N,ca as l,c1 as Q,cb as g,c5 as M,cc as _,cd as B,ce as J,cf as C,cg as X,ch as Y,ci as A,c4 as z,r as d,c6 as V,bl as Z}from"./index.js";var $=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),j(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(_||this.#e.isStale||!B(t))return;const s=J(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(_||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||X.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&j(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...Y(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=A(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=A(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function j(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Z(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):M;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!_&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},$)}export{bt as u}; +import{c1 as G,ca as N,cb as l,c2 as Q,cc as g,c6 as M,cd as _,ce as B,cf as J,cg as C,ch as X,ci as Y,cj as j,c5 as z,r as d,c7 as V,bk as Z}from"./index.js";var $=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(_||this.#e.isStale||!B(t))return;const s=J(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(_||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||X.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&A(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...Y(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=j(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=j(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Z(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):M;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!_&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},$)}export{bt as u}; diff --git a/hive/services/hiveui/frontend/src/mutations/ec2.ts b/hive/services/hiveui/frontend/src/mutations/ec2.ts index 9f0e15c95..3eaf563fa 100644 --- a/hive/services/hiveui/frontend/src/mutations/ec2.ts +++ b/hive/services/hiveui/frontend/src/mutations/ec2.ts @@ -3,6 +3,7 @@ import { CreateKeyPairCommand, CreateVolumeCommand, DeleteKeyPairCommand, + DeleteVolumeCommand, ImportKeyPairCommand, ModifyVolumeCommand, RebootInstancesCommand, @@ -213,3 +214,18 @@ export function useModifyVolume() { }, }) } + +export function useDeleteVolume() { + const queryClient = useQueryClient() + return useMutation({ + mutationFn: async (volumeId: string) => { + const command = new DeleteVolumeCommand({ + VolumeId: volumeId, + }) + return await getEc2Client().send(command) + }, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ["ec2", "volumes"] }) + }, + }) +} diff --git a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(volumes)/describe-volumes/$id.tsx b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(volumes)/describe-volumes/$id.tsx index 314af60ab..a2693e8fd 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(volumes)/describe-volumes/$id.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(volumes)/describe-volumes/$id.tsx @@ -1,13 +1,26 @@ import { useSuspenseQuery } from "@tanstack/react-query" -import { createFileRoute, Link } from "@tanstack/react-router" +import { createFileRoute, Link, useNavigate } from "@tanstack/react-router" +import { Trash2 } from "lucide-react" +import { useState } from "react" import { BackLink } from "@/components/back-link" import { DetailCard } from "@/components/detail-card" import { DetailRow } from "@/components/detail-row" import { PageHeading } from "@/components/page-heading" +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog" import { Badge } from "@/components/ui/badge" import { Button, buttonVariants } from "@/components/ui/button" import { formatDateTime } from "@/lib/utils" +import { useDeleteVolume } from "@/mutations/ec2" import { ec2VolumeQueryOptions } from "@/queries/ec2" export const Route = createFileRoute( @@ -28,8 +41,20 @@ export const Route = createFileRoute( function VolumeDetail() { const { id } = Route.useParams() + const navigate = useNavigate() const { data } = useSuspenseQuery(ec2VolumeQueryOptions(id)) const volume = data.Volumes?.[0] + const deleteMutation = useDeleteVolume() + const [showDeleteDialog, setShowDeleteDialog] = useState(false) + + const canDelete = + volume?.State === "available" && + (!volume.Attachments || volume.Attachments.length === 0) + + const handleDelete = async () => { + await deleteMutation.mutateAsync(id) + navigate({ to: "/ec2/describe-volumes" }) + } if (!volume?.VolumeId) { return ( @@ -50,6 +75,15 @@ function VolumeDetail() { + {volume.State === "available" ? ( )} + + + + + Delete Volume + + Are you sure you want to delete the volume "{volume.VolumeId}"? + This action cannot be undone. + + + + Cancel + + {deleteMutation.isPending ? "Deleting…" : "Delete"} + + + + ) } diff --git a/hive/services/viperblockd/viperblockd.go b/hive/services/viperblockd/viperblockd.go index 3d5c2e7bd..c16375df0 100644 --- a/hive/services/viperblockd/viperblockd.go +++ b/hive/services/viperblockd/viperblockd.go @@ -110,21 +110,63 @@ func launchService(cfg *Config) (err error) { // Subscribe to the viperblock.mount subject slog.Info("Connected. Waiting for EBS events") - // TODO: Support volume delete and predastore delete bucket nc.QueueSubscribe("ebs.delete", "hive-workers", func(msg *nats.Msg) { - slog.Info("Received message", "data", string(msg.Data)) + slog.Info("Received ebs.delete message", "data", string(msg.Data)) - // Parse the message var ebsRequest config.EBSDeleteRequest err := json.Unmarshal(msg.Data, &ebsRequest) if err != nil { - slog.Error("Failed to unmarshal message", "err", err) + slog.Error("Failed to unmarshal ebs.delete message", "err", err) + errResp, _ := json.Marshal(config.EBSDeleteResponse{Error: fmt.Sprintf("bad request: %v", err)}) + msg.Respond(errResp) return } - // TODO: Improve - nc.Publish("ebs.delete.response", fmt.Appendf(nil, `{"volume":"%s","deleted":true}`, ebsRequest.Volume)) + response := config.EBSDeleteResponse{Volume: ebsRequest.Volume, Success: true} + // Find and clean up the mounted volume if it exists + cfg.mu.Lock() + var matched MountedVolume + matchIdx := -1 + for i, volume := range cfg.MountedVolumes { + if volume.Name == ebsRequest.Volume { + matched = volume + matchIdx = i + cfg.MountedVolumes = append(cfg.MountedVolumes[:i], cfg.MountedVolumes[i+1:]...) + break + } + } + cfg.mu.Unlock() + + if matchIdx >= 0 { + // Stop WAL syncer and kill nbdkit process + if matched.VB != nil { + matched.VB.StopWALSyncer() + } + utils.KillProcess(matched.PID) + + // Remove the socket file if using socket transport + if matched.Socket != "" { + slog.Info("Removing socket file", "socket", matched.Socket) + if err := os.Remove(matched.Socket); err != nil && !os.IsNotExist(err) { + slog.Error("Failed to delete nbd socket", "err", err, "socket", matched.Socket) + } + } + + slog.Info("ebs.delete: cleaned up mounted volume", "volume", ebsRequest.Volume, "pid", matched.PID) + } else { + // Volume not mounted is expected for "available" volumes + slog.Info("ebs.delete: volume not mounted (expected for available volumes)", "volume", ebsRequest.Volume) + } + + respData, err := json.Marshal(response) + if err != nil { + slog.Error("Failed to marshal ebs.delete response", "err", err) + msg.Respond([]byte(`{"Error":"internal marshal failure"}`)) + return + } + + msg.Respond(respData) }) nc.QueueSubscribe("ebs.unmount", "hive-workers", func(msg *nats.Msg) { diff --git a/tests/e2e/run-e2e.sh b/tests/e2e/run-e2e.sh index 876a501a9..568bb75ca 100755 --- a/tests/e2e/run-e2e.sh +++ b/tests/e2e/run-e2e.sh @@ -232,10 +232,36 @@ if [ "$STANDALONE_VOLUME_SIZE" -ne "$STANDALONE_NEW_SIZE" ]; then exit 1 fi -# Delete the standalone volume (not implemented yet) -# echo "Deleting standalone volume..." -# $AWS_EC2 delete-volume --volume-id "$STANDALONE_VOLUME_ID" -echo "Standalone volume test passed" +# Delete the standalone volume +echo "Deleting standalone volume $STANDALONE_VOLUME_ID..." +$AWS_EC2 delete-volume --volume-id "$STANDALONE_VOLUME_ID" + +# Verify deletion (volume should no longer appear in describe) +echo "Verifying volume deletion..." +COUNT=0 +while [ $COUNT -lt 30 ]; do + set +e + VOLUME_CHECK=$($AWS_EC2 describe-volumes --volume-ids "$STANDALONE_VOLUME_ID" \ + --query 'Volumes[0].VolumeId' --output text 2>&1) + DESCRIBE_EXIT=$? + set -e + + # Volume gone = describe fails, returns "None", or returns empty + if [ $DESCRIBE_EXIT -ne 0 ] || [ "$VOLUME_CHECK" == "None" ] || [ -z "$VOLUME_CHECK" ]; then + echo "Volume deleted successfully" + break + fi + + sleep 2 + COUNT=$((COUNT + 1)) +done + +if [ $COUNT -ge 30 ]; then + echo "Volume deletion verification timed out" + exit 1 +fi + +echo "Standalone volume test passed (create -> resize -> delete)" # Phase 5: Instance Lifecycle echo "Phase 5: Instance Lifecycle" diff --git a/tests/e2e/run-multinode-e2e.sh b/tests/e2e/run-multinode-e2e.sh index 0619d1e9b..a75d16c56 100755 --- a/tests/e2e/run-multinode-e2e.sh +++ b/tests/e2e/run-multinode-e2e.sh @@ -260,7 +260,36 @@ if [ "$VOLUME_SIZE" -ne "$NEW_SIZE" ]; then exit 1 fi -echo " Standalone volume test passed" +# Delete the standalone volume +echo " Deleting standalone volume $STANDALONE_VOLUME_ID..." +$AWS_EC2 delete-volume --volume-id "$STANDALONE_VOLUME_ID" + +# Verify deletion +echo " Verifying volume deletion..." +COUNT=0 +while [ $COUNT -lt 30 ]; do + set +e + VOLUME_CHECK=$($AWS_EC2 describe-volumes --volume-ids "$STANDALONE_VOLUME_ID" \ + --query 'Volumes[0].VolumeId' --output text 2>&1) + DESCRIBE_EXIT=$? + set -e + + # Volume gone = describe fails, returns "None", or returns empty + if [ $DESCRIBE_EXIT -ne 0 ] || [ "$VOLUME_CHECK" == "None" ] || [ -z "$VOLUME_CHECK" ]; then + echo " Volume deleted successfully" + break + fi + + sleep 2 + COUNT=$((COUNT + 1)) +done + +if [ $COUNT -ge 30 ]; then + echo " ERROR: Volume deletion verification timed out" + exit 1 +fi + +echo " Standalone volume test passed (create -> resize -> delete)" # Phase 6: Multi-Node Instance Tests echo ""