windows-development-sandbox 1.9.0 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -17
- package/config.example.json +7 -2
- package/dist/app/features/accounts/accounts.def.d.ts +122 -0
- package/dist/app/features/accounts/accounts.def.js +243 -0
- package/dist/app/features/accounts/accounts.run.d.ts +51 -0
- package/dist/app/features/accounts/accounts.run.js +125 -0
- package/dist/app/features/accounts/index.d.ts +2 -0
- package/dist/app/features/accounts/index.js +3 -0
- package/dist/app/features/agents/agent-entry.d.ts +17 -0
- package/dist/app/features/agents/agent-entry.js +50 -0
- package/dist/app/features/agents/agents.def.d.ts +65 -0
- package/dist/app/features/agents/agents.def.js +142 -0
- package/dist/app/features/agents/agents.run.d.ts +31 -0
- package/dist/app/features/agents/agents.run.js +189 -0
- package/dist/app/features/agents/index.d.ts +3 -0
- package/dist/app/features/agents/index.js +4 -0
- package/dist/app/features/apps/apps-rows.d.ts +31 -0
- package/dist/app/features/apps/apps-rows.js +73 -0
- package/dist/app/features/apps/apps.def.d.ts +181 -0
- package/dist/app/features/apps/apps.def.js +264 -0
- package/dist/app/features/apps/apps.run.d.ts +58 -0
- package/dist/app/features/apps/apps.run.js +76 -0
- package/dist/app/features/apps/index.d.ts +3 -0
- package/dist/app/features/apps/index.js +4 -0
- package/dist/app/features/data/data.def.d.ts +154 -0
- package/dist/app/features/data/data.def.js +201 -0
- package/dist/app/features/data/data.run.d.ts +46 -0
- package/dist/app/features/data/data.run.js +141 -0
- package/dist/app/features/data/index.d.ts +2 -0
- package/dist/app/features/data/index.js +3 -0
- package/dist/app/features/defs.d.ts +952 -4
- package/dist/app/features/defs.js +147 -10
- package/dist/app/features/engine/engine.def.d.ts +228 -0
- package/dist/app/features/engine/engine.def.js +194 -0
- package/dist/app/features/engine/engine.run.d.ts +72 -0
- package/dist/app/features/engine/engine.run.js +77 -0
- package/dist/app/features/engine/index.d.ts +2 -0
- package/dist/app/features/engine/index.js +4 -0
- package/dist/app/features/files/files.def.d.ts +51 -0
- package/dist/app/features/files/files.def.js +38 -0
- package/dist/app/features/files/files.run.d.ts +20 -0
- package/dist/app/features/files/files.run.js +59 -0
- package/dist/app/features/files/index.d.ts +2 -0
- package/dist/app/features/files/index.js +3 -0
- package/dist/app/features/github/github.def.d.ts +80 -0
- package/dist/app/features/github/github.def.js +142 -0
- package/dist/app/features/github/github.run.d.ts +36 -0
- package/dist/app/features/github/github.run.js +59 -0
- package/dist/app/features/github/index.d.ts +2 -0
- package/dist/app/features/github/index.js +3 -0
- package/dist/app/features/health/health.def.d.ts +275 -0
- package/dist/app/features/health/health.def.js +281 -0
- package/dist/app/features/health/health.run.d.ts +125 -0
- package/dist/app/features/health/health.run.js +204 -0
- package/dist/app/features/health/index.d.ts +2 -0
- package/dist/app/features/health/index.js +3 -0
- package/dist/app/features/logs/index.d.ts +2 -0
- package/dist/app/features/logs/index.js +3 -0
- package/dist/app/features/logs/logs.def.d.ts +78 -0
- package/dist/app/features/logs/logs.def.js +115 -0
- package/dist/app/features/logs/logs.run.d.ts +20 -0
- package/dist/app/features/logs/logs.run.js +42 -0
- package/dist/app/features/projects/index.d.ts +2 -0
- package/dist/app/features/projects/index.js +3 -0
- package/dist/app/features/projects/projects.def.d.ts +101 -0
- package/dist/app/features/projects/projects.def.js +208 -0
- package/dist/app/features/projects/projects.run.d.ts +56 -0
- package/dist/app/features/projects/projects.run.js +155 -0
- package/dist/app/features/sandbox/sandbox.def.js +11 -5
- package/dist/app/features/sessions/sessions.def.js +3 -0
- package/dist/app/features/settings/categories.def.js +3 -2
- package/dist/{cli/menu/settings/share.d.ts → app/features/settings/settings-share.d.ts} +1 -1
- package/dist/{cli/menu/settings/share.js → app/features/settings/settings-share.js} +3 -2
- package/dist/app/features/settings/settings.def.d.ts +22 -5
- package/dist/app/features/settings/settings.def.js +81 -6
- package/dist/app/features/settings/settings.run.d.ts +17 -0
- package/dist/app/features/settings/settings.run.js +89 -4
- package/dist/app/features/storage/index.d.ts +2 -0
- package/dist/app/features/storage/index.js +3 -0
- package/dist/app/features/storage/storage.def.d.ts +133 -0
- package/dist/app/features/storage/storage.def.js +225 -0
- package/dist/app/features/storage/storage.run.d.ts +62 -0
- package/dist/app/features/storage/storage.run.js +370 -0
- package/dist/app/features/updates/index.d.ts +3 -0
- package/dist/app/features/updates/index.js +4 -0
- package/dist/app/features/updates/update-lines.d.ts +13 -0
- package/dist/app/features/updates/update-lines.js +61 -0
- package/dist/app/features/updates/updates.def.d.ts +89 -0
- package/dist/app/features/updates/updates.def.js +225 -0
- package/dist/app/features/updates/updates.run.d.ts +48 -0
- package/dist/app/features/updates/updates.run.js +154 -0
- package/dist/app/features/vpn/index.d.ts +2 -0
- package/dist/app/features/vpn/index.js +3 -0
- package/dist/app/features/vpn/vpn.def.d.ts +112 -0
- package/dist/app/features/vpn/vpn.def.js +174 -0
- package/dist/app/features/vpn/vpn.run.d.ts +37 -0
- package/dist/app/features/vpn/vpn.run.js +54 -0
- package/dist/app/features/web/index.d.ts +2 -0
- package/dist/app/features/web/index.js +3 -0
- package/dist/app/features/web/web.def.d.ts +33 -0
- package/dist/app/features/web/web.def.js +90 -0
- package/dist/app/features/web/web.run.d.ts +24 -0
- package/dist/app/features/web/web.run.js +93 -0
- package/dist/app/kernel/define.d.ts +10 -1
- package/dist/app/kernel/io.d.ts +34 -0
- package/dist/app/kernel/io.js +9 -0
- package/dist/app/kernel/rpc.d.ts +17 -0
- package/dist/app/kernel/text.d.ts +2 -0
- package/dist/app/kernel/text.js +7 -0
- package/dist/app/kernel/view.d.ts +24 -1
- package/dist/app/kernel/view.js +1 -1
- package/dist/app/registry.js +74 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/commands/context.d.ts +7 -0
- package/dist/cli/commands/context.js +29 -2
- package/dist/cli/commands/engine.js +5 -58
- package/dist/cli/commands/github.d.ts +2 -0
- package/dist/cli/commands/github.js +11 -0
- package/dist/cli/commands/index.d.ts +3 -5
- package/dist/cli/commands/index.js +3 -5
- package/dist/cli/commands/launch/launch.js +23 -4
- package/dist/cli/commands/launch/running.js +4 -1
- package/dist/cli/commands/maintenance/config.js +1 -6
- package/dist/cli/commands/maintenance/index.d.ts +0 -1
- package/dist/cli/commands/maintenance/index.js +1 -2
- package/dist/cli/commands/maintenance/logs.js +27 -32
- package/dist/cli/commands/maintenance/migrate.d.ts +0 -8
- package/dist/cli/commands/maintenance/migrate.js +2 -44
- package/dist/cli/commands/maintenance/update.d.ts +0 -19
- package/dist/cli/commands/maintenance/update.js +1 -99
- package/dist/cli/commands/projects/index.d.ts +0 -1
- package/dist/cli/commands/projects/index.js +0 -1
- package/dist/cli/commands/registry.d.ts +1 -1
- package/dist/cli/commands/registry.js +29 -11
- package/dist/cli/commands/repair/checks/data.js +1 -1
- package/dist/cli/commands/repair/checks/hcs.js +28 -1
- package/dist/cli/commands/repair/checks/sandbox.js +1 -1
- package/dist/cli/commands/repair/health-run.d.ts +30 -0
- package/dist/cli/commands/repair/health-run.js +32 -0
- package/dist/cli/commands/repair/printer.d.ts +2 -2
- package/dist/cli/commands/repair/printer.js +2 -11
- package/dist/cli/commands/repair/run.d.ts +1 -21
- package/dist/cli/commands/repair/run.js +13 -70
- package/dist/cli/commands/storage/index.d.ts +0 -1
- package/dist/cli/commands/storage/index.js +0 -1
- package/dist/cli/commands/storage/offer.js +6 -2
- package/dist/cli/commands/vpn.d.ts +1 -3
- package/dist/cli/commands/vpn.js +8 -88
- package/dist/cli/commands/web.d.ts +7 -1
- package/dist/cli/commands/web.js +45 -71
- package/dist/cli/index.js +3 -2
- package/dist/cli/manifest.d.ts +16 -153
- package/dist/cli/manifest.js +20 -50
- package/dist/cli/menu/command-form.js +1 -2
- package/dist/cli/menu/io-menu.d.ts +2 -2
- package/dist/cli/menu/io-menu.js +6 -4
- package/dist/cli/menu/menu.js +1 -1
- package/dist/cli/menu/pages/accounts-page.d.ts +5 -17
- package/dist/cli/menu/pages/accounts-page.js +28 -170
- package/dist/cli/menu/pages/agents-page.d.ts +17 -18
- package/dist/cli/menu/pages/agents-page.js +67 -124
- package/dist/cli/menu/pages/apps-page.d.ts +15 -8
- package/dist/cli/menu/pages/apps-page.js +121 -29
- package/dist/cli/menu/pages/list-page.js +10 -1
- package/dist/cli/menu/pages/maintenance-page.d.ts +51 -52
- package/dist/cli/menu/pages/maintenance-page.js +246 -427
- package/dist/cli/menu/pages/sandbox-page.d.ts +3 -5
- package/dist/cli/menu/pages/sandbox-page.js +34 -112
- package/dist/cli/menu/pages/settings-page.d.ts +21 -3
- package/dist/cli/menu/pages/settings-page.js +89 -17
- package/dist/cli/menu/render-view.js +2 -1
- package/dist/cli/menu/settings/index.d.ts +0 -1
- package/dist/cli/menu/settings/index.js +3 -3
- package/dist/cli/menu/views.js +28 -0
- package/dist/cli/operations/handler.js +7 -3
- package/dist/cli/operations/input.d.ts +1 -1
- package/dist/cli/operations/input.js +29 -5
- package/dist/cli/operations/io-cli.js +9 -1
- package/dist/cli/operations/spec.js +8 -2
- package/dist/cli/output/render-view.js +2 -0
- package/dist/cli/{commands/data/collect.js → services/data-collect.js} +2 -2
- package/dist/cli/{commands/data/remove.js → services/data-remove.js} +2 -2
- package/dist/cli/services/data-service.d.ts +1 -1
- package/dist/cli/services/data-service.js +2 -2
- package/dist/cli/services/databases-service.d.ts +5 -0
- package/dist/cli/services/databases-service.js +15 -0
- package/dist/cli/services/health-service.d.ts +8 -4
- package/dist/cli/services/health-service.js +10 -8
- package/dist/cli/services/index.d.ts +4 -1
- package/dist/cli/services/index.js +4 -1
- package/dist/cli/services/logs-service.d.ts +7 -0
- package/dist/cli/services/logs-service.js +13 -0
- package/dist/cli/services/storage-service.d.ts +19 -0
- package/dist/cli/services/storage-service.js +71 -0
- package/dist/cli/services/vpn-service.d.ts +6 -4
- package/dist/cli/services/vpn-service.js +5 -11
- package/dist/cli/services/web-service.d.ts +4 -3
- package/dist/cli/services/web-service.js +12 -32
- package/dist/core/config/defaults.js +3 -2
- package/dist/core/schema/config.d.ts +6 -0
- package/dist/core/schema/config.js +2 -0
- package/dist/core/schema/github.d.ts +4 -0
- package/dist/core/schema/github.js +7 -0
- package/dist/core/schema/index.d.ts +1 -0
- package/dist/core/schema/index.js +1 -0
- package/dist/core/schema/profile.d.ts +1 -0
- package/dist/core/schema/profile.js +3 -0
- package/dist/core/schema/sandbox.js +3 -3
- package/dist/core/schema/toolchains.js +2 -2
- package/dist/core/schema/vpn.js +1 -1
- package/dist/core/schema/web.d.ts +1 -0
- package/dist/core/schema/web.js +4 -1
- package/dist/core/types.d.ts +6 -3
- package/dist/guest/boot/boot.js +11 -1
- package/dist/guest/daemon/daemon.js +1 -1
- package/dist/guest/daemon/sessions.d.ts +3 -2
- package/dist/guest/daemon/sessions.js +38 -7
- package/dist/guest/governor/core.d.ts +44 -0
- package/dist/guest/governor/core.js +124 -0
- package/dist/guest/governor/decide.d.ts +53 -15
- package/dist/guest/governor/decide.js +155 -72
- package/dist/guest/governor/governor.d.ts +2 -35
- package/dist/guest/governor/governor.js +35 -99
- package/dist/guest/governor/index.d.ts +1 -0
- package/dist/guest/governor/index.js +1 -0
- package/dist/guest/network/firewall.d.ts +3 -0
- package/dist/guest/network/firewall.js +65 -23
- package/dist/guest/runtime/process.js +53 -5
- package/dist/guest/sessions/viewer.js +5 -1
- package/dist/guest/setup/claude-mem.js +12 -4
- package/dist/guest/setup/github-token.d.ts +7 -0
- package/dist/guest/setup/github-token.js +65 -0
- package/dist/guest/toolchains/languages/node.js +40 -4
- package/dist/guest/toolchains/native/rust-extras.js +2 -2
- package/dist/guest/toolchains/tools/cli.d.ts +8 -0
- package/dist/guest/toolchains/tools/cli.js +16 -2
- package/dist/guest/vpn/openvpn.d.ts +5 -0
- package/dist/guest/vpn/openvpn.js +14 -1
- package/dist/guest/vpn/vpn.js +55 -16
- package/dist/guest/vpn/wireguard.js +2 -0
- package/dist/host/channel/attach.d.ts +1 -0
- package/dist/host/channel/attach.js +1 -0
- package/dist/host/channel/channel.d.ts +1 -1
- package/dist/host/channel/channel.js +2 -2
- package/dist/host/engines/hcs/check.d.ts +1 -0
- package/dist/host/engines/hcs/check.js +1 -1
- package/dist/host/engines/hcs/engine.d.ts +1 -1
- package/dist/host/engines/hcs/engine.js +6 -4
- package/dist/host/engines/hcs/helper.d.ts +11 -0
- package/dist/host/engines/hcs/helper.js +31 -2
- package/dist/host/engines/hcs/leftovers.d.ts +42 -0
- package/dist/host/engines/hcs/leftovers.js +101 -0
- package/dist/host/engines/index.d.ts +1 -0
- package/dist/host/engines/index.js +1 -0
- package/dist/host/github/deliver.d.ts +13 -0
- package/dist/host/github/deliver.js +51 -0
- package/dist/host/github/index.d.ts +2 -0
- package/dist/host/github/index.js +3 -0
- package/dist/host/github/token.d.ts +21 -0
- package/dist/host/github/token.js +74 -0
- package/dist/host/launch/generate.js +11 -5
- package/dist/host/launch/index.d.ts +1 -1
- package/dist/host/launch/index.js +1 -1
- package/dist/host/launch/session-file.js +1 -2
- package/dist/host/launch/wsb-file.d.ts +11 -7
- package/dist/host/launch/wsb-file.js +30 -12
- package/dist/host/life/host-memory.d.ts +1 -0
- package/dist/host/life/host-memory.js +4 -1
- package/dist/host/life/watchdog.d.ts +11 -0
- package/dist/host/life/watchdog.js +36 -4
- package/dist/host/sandbox/tasklist.d.ts +6 -0
- package/dist/host/sandbox/tasklist.js +37 -0
- package/dist/host/secrets/launch-secrets.d.ts +2 -1
- package/dist/host/secrets/launch-secrets.js +4 -2
- package/dist/host/vpn/status.js +13 -3
- package/dist/host/web/backend.d.ts +1 -3
- package/dist/host/web/index.d.ts +2 -1
- package/dist/host/web/index.js +2 -1
- package/dist/host/web/live.d.ts +23 -0
- package/dist/host/web/live.js +107 -0
- package/dist/host/web/rpc.d.ts +6 -1
- package/dist/host/web/rpc.js +23 -31
- package/dist/host/web/runner.d.ts +4 -0
- package/dist/host/web/runner.js +12 -1
- package/dist/host/web/server.d.ts +30 -2
- package/dist/host/web/server.js +87 -29
- package/dist/host/web/state.d.ts +1 -0
- package/dist/host/web/state.js +2 -0
- package/dist/runtime/agent.js +44 -16
- package/dist/runtime/daemon.js +1154 -857
- package/dist/runtime/db.js +44 -16
- package/dist/runtime/main.js +532 -115
- package/dist/runtime/netproxy.js +34 -9
- package/dist/runtime/view.js +499 -149
- package/dist/selftest/app.test.js +620 -12
- package/dist/selftest/channel.test.js +18 -1
- package/dist/selftest/cli.test.js +1 -1
- package/dist/selftest/config.test.js +1 -1
- package/dist/selftest/contained.test.js +1 -1
- package/dist/selftest/data.test.js +1 -2
- package/dist/selftest/engine.test.js +3 -1
- package/dist/selftest/github.test.d.ts +2 -0
- package/dist/selftest/github.test.js +243 -0
- package/dist/selftest/guest-boot.test.js +47 -1
- package/dist/selftest/hcs.test.js +105 -8
- package/dist/selftest/health.test.js +71 -0
- package/dist/selftest/heavy-load.test.js +152 -66
- package/dist/selftest/index.js +4 -0
- package/dist/selftest/layout.test.js +8 -0
- package/dist/selftest/live-terminal.test.js +74 -0
- package/dist/selftest/menu-screens.js +171 -56
- package/dist/selftest/menu.test.js +54 -37
- package/dist/selftest/migrate.test.js +14 -12
- package/dist/selftest/network.test.js +20 -1
- package/dist/selftest/powershell-variables.test.d.ts +2 -0
- package/dist/selftest/powershell-variables.test.js +61 -0
- package/dist/selftest/support/engine-golden.js +1 -0
- package/dist/selftest/support/fixtures.d.ts +5 -0
- package/dist/selftest/support/web-preview.d.ts +1 -0
- package/dist/selftest/support/web-preview.js +856 -0
- package/dist/selftest/update-service.test.js +15 -8
- package/dist/selftest/vpn.test.js +86 -2
- package/dist/selftest/web.test.js +58 -11
- package/dist/shared/channel/run-dir.d.ts +2 -0
- package/dist/shared/channel/run-dir.js +3 -0
- package/dist/shared/channel/schema.d.ts +7 -0
- package/dist/shared/channel/schema.js +9 -1
- package/dist/shared/channel/secrets.d.ts +1 -0
- package/dist/shared/channel/secrets.js +3 -0
- package/dist/shared/github/index.d.ts +1 -0
- package/dist/shared/github/index.js +2 -0
- package/dist/shared/github/token.d.ts +29 -0
- package/dist/shared/github/token.js +89 -0
- package/dist/shared/io/copy-tree.d.ts +7 -0
- package/dist/shared/io/copy-tree.js +45 -0
- package/dist/shared/io/index.d.ts +2 -0
- package/dist/shared/io/index.js +2 -0
- package/dist/shared/io/robocopy-result.d.ts +6 -0
- package/dist/shared/io/robocopy-result.js +23 -0
- package/dist/shared/memory/policy.d.ts +38 -12
- package/dist/shared/memory/policy.js +58 -19
- package/dist/shared/network/firewall-rules.d.ts +8 -0
- package/dist/shared/network/firewall-rules.js +28 -0
- package/dist/shared/pty/ctrl-c.d.ts +18 -0
- package/dist/shared/pty/ctrl-c.js +36 -0
- package/dist/shared/pty/index.d.ts +1 -0
- package/dist/shared/pty/index.js +1 -0
- package/dist/shared/pty/terminal.d.ts +2 -0
- package/dist/shared/pty/terminal.js +21 -2
- package/dist/shared/vpn/kill-switch.d.ts +13 -2
- package/dist/shared/vpn/kill-switch.js +88 -8
- package/dist/shared/web/protocol.d.ts +0 -4
- package/dist/sync/watcher.js +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/{main-T5DMCHYV.css → main-6JF3ASB5.css} +1 -1
- package/dist/web/main-Z645W45E.js +219 -0
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/MemoryStatus.cs +128 -107
- package/native/scripts/memory-status.ps1 +10 -2
- package/package.json +10 -3
- package/sandbox/csharp/MemGov.cs +668 -398
- package/sandbox/csharp/PtyHost.cs +104 -15
- package/sandbox/csharp/SandboxTools/CpuCap.cs +50 -1
- package/sandbox/csharp/SandboxTools/Program.cs +1 -1
- package/sandbox/scripts/new-shortcuts.ps1 +3 -1
- package/sandbox/scripts/repair-wmi-services.ps1 +26 -0
- package/schemas/config.schema.json +25 -7
- package/schemas/sandbox-config.schema.json +7 -3
- package/dist/cli/commands/accounts.d.ts +0 -2
- package/dist/cli/commands/accounts.js +0 -96
- package/dist/cli/commands/data/clean.d.ts +0 -3
- package/dist/cli/commands/data/clean.js +0 -60
- package/dist/cli/commands/data/index.d.ts +0 -4
- package/dist/cli/commands/data/index.js +0 -62
- package/dist/cli/commands/maintenance/clean.d.ts +0 -2
- package/dist/cli/commands/maintenance/clean.js +0 -24
- package/dist/cli/commands/maintenance/config-share.d.ts +0 -12
- package/dist/cli/commands/maintenance/config-share.js +0 -80
- package/dist/cli/commands/projects/projects.d.ts +0 -2
- package/dist/cli/commands/projects/projects.js +0 -162
- package/dist/cli/commands/storage/contained.d.ts +0 -3
- package/dist/cli/commands/storage/contained.js +0 -179
- package/dist/cli/commands/storage/storage.d.ts +0 -8
- package/dist/cli/commands/storage/storage.js +0 -179
- package/dist/cli/menu/add-agent.d.ts +0 -47
- package/dist/cli/menu/add-agent.js +0 -168
- package/dist/cli/menu/apps.d.ts +0 -69
- package/dist/cli/menu/apps.js +0 -214
- package/dist/cli/menu/data-folder.d.ts +0 -18
- package/dist/cli/menu/data-folder.js +0 -99
- package/dist/cli/menu/share-settings.d.ts +0 -21
- package/dist/cli/menu/share-settings.js +0 -112
- package/dist/cli/menu/vpn-login.d.ts +0 -16
- package/dist/cli/menu/vpn-login.js +0 -74
- package/dist/web/main-NRRS5O6Z.js +0 -157
- /package/dist/cli/{commands/data/collect.d.ts → services/data-collect.d.ts} +0 -0
- /package/dist/cli/{commands/data/remove.d.ts → services/data-remove.d.ts} +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
var Tte=Object.create;var Kb=Object.defineProperty;var $te=Object.getOwnPropertyDescriptor;var Ate=Object.getOwnPropertyNames;var Ote=Object.getPrototypeOf,zte=Object.prototype.hasOwnProperty;var ON=e=>{throw TypeError(e)};var Nte=(e,t,r)=>t in e?Kb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fa=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},hs=(e,t)=>{for(var r in t)Kb(e,r,{get:t[r],enumerable:!0})},Fte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ate(t))!zte.call(e,o)&&o!==r&&Kb(e,o,{get:()=>t[o],enumerable:!(n=$te(t,o))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?Tte(Ote(e)):{},Fte(t||!e||!e.__esModule?Kb(r,"default",{value:e,enumerable:!0}):r,e));var Et=(e,t,r)=>Nte(e,typeof t!="symbol"?t+"":t,r),BC=(e,t,r)=>t.has(e)||ON("Cannot "+r);var L=(e,t,r)=>(BC(e,t,"read from private field"),r?r.call(e):t.get(e)),Ce=(e,t,r)=>t.has(e)?ON("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(BC(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=(e,t,r)=>(BC(e,t,"access private method"),r);var Sh=(e,t,r,n)=>({set _(o){fe(e,t,o,r)},get _(){return L(e,t,n)}});var GN=fa(it=>{"use strict";var kh=Symbol.for("react.element"),Lte=Symbol.for("react.portal"),Mte=Symbol.for("react.fragment"),Bte=Symbol.for("react.strict_mode"),jte=Symbol.for("react.profiler"),Ute=Symbol.for("react.provider"),Vte=Symbol.for("react.context"),Hte=Symbol.for("react.forward_ref"),Wte=Symbol.for("react.suspense"),Zte=Symbol.for("react.memo"),Gte=Symbol.for("react.lazy"),NN=Symbol.iterator;function qte(e){return e===null||typeof e!="object"?null:(e=NN&&e[NN]||e["@@iterator"],typeof e=="function"?e:null)}var MN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BN=Object.assign,jN={};function af(e,t,r){this.props=e,this.context=t,this.refs=jN,this.updater=r||MN}af.prototype.isReactComponent={};af.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};af.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function UN(){}UN.prototype=af.prototype;function UC(e,t,r){this.props=e,this.context=t,this.refs=jN,this.updater=r||MN}var VC=UC.prototype=new UN;VC.constructor=UC;BN(VC,af.prototype);VC.isPureReactComponent=!0;var FN=Array.isArray,VN=Object.prototype.hasOwnProperty,HC={current:null},HN={key:!0,ref:!0,__self:!0,__source:!0};function WN(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)VN.call(t,n)&&!HN.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:kh,type:e,key:i,ref:a,props:o,_owner:HC.current}}function Kte(e,t){return{$$typeof:kh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function WC(e){return typeof e=="object"&&e!==null&&e.$$typeof===kh}function Xte(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var LN=/\/+/g;function jC(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Xte(""+e.key):t.toString(36)}function Yb(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case kh:case Lte:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+jC(a,0):n,FN(o)?(r="",e!=null&&(r=e.replace(LN,"$&/")+"/"),Yb(o,t,r,"",function(c){return c})):o!=null&&(WC(o)&&(o=Kte(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(LN,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",FN(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+jC(i,s);a+=Yb(i,t,r,l,o)}else if(l=qte(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+jC(i,s++),a+=Yb(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Qb(e,t,r){if(e==null)return e;var n=[],o=0;return Yb(e,n,"","",function(i){return t.call(r,i,o++)}),n}function Qte(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fo={current:null},Jb={transition:null},Yte={ReactCurrentDispatcher:Fo,ReactCurrentBatchConfig:Jb,ReactCurrentOwner:HC};function ZN(){throw Error("act(...) is not supported in production builds of React.")}it.Children={map:Qb,forEach:function(e,t,r){Qb(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Qb(e,function(){t++}),t},toArray:function(e){return Qb(e,function(t){return t})||[]},only:function(e){if(!WC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};it.Component=af;it.Fragment=Mte;it.Profiler=jte;it.PureComponent=UC;it.StrictMode=Bte;it.Suspense=Wte;it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yte;it.act=ZN;it.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=BN({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=HC.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)VN.call(t,l)&&!HN.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:kh,type:e.type,key:o,ref:i,props:n,_owner:a}};it.createContext=function(e){return e={$$typeof:Vte,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ute,_context:e},e.Consumer=e};it.createElement=WN;it.createFactory=function(e){var t=WN.bind(null,e);return t.type=e,t};it.createRef=function(){return{current:null}};it.forwardRef=function(e){return{$$typeof:Hte,render:e}};it.isValidElement=WC;it.lazy=function(e){return{$$typeof:Gte,_payload:{_status:-1,_result:e},_init:Qte}};it.memo=function(e,t){return{$$typeof:Zte,type:e,compare:t===void 0?null:t}};it.startTransition=function(e){var t=Jb.transition;Jb.transition={};try{e()}finally{Jb.transition=t}};it.unstable_act=ZN;it.useCallback=function(e,t){return Fo.current.useCallback(e,t)};it.useContext=function(e){return Fo.current.useContext(e)};it.useDebugValue=function(){};it.useDeferredValue=function(e){return Fo.current.useDeferredValue(e)};it.useEffect=function(e,t){return Fo.current.useEffect(e,t)};it.useId=function(){return Fo.current.useId()};it.useImperativeHandle=function(e,t,r){return Fo.current.useImperativeHandle(e,t,r)};it.useInsertionEffect=function(e,t){return Fo.current.useInsertionEffect(e,t)};it.useLayoutEffect=function(e,t){return Fo.current.useLayoutEffect(e,t)};it.useMemo=function(e,t){return Fo.current.useMemo(e,t)};it.useReducer=function(e,t,r){return Fo.current.useReducer(e,t,r)};it.useRef=function(e){return Fo.current.useRef(e)};it.useState=function(e){return Fo.current.useState(e)};it.useSyncExternalStore=function(e,t,r){return Fo.current.useSyncExternalStore(e,t,r)};it.useTransition=function(){return Fo.current.useTransition()};it.version="18.3.1"});var R=fa((e1e,qN)=>{"use strict";qN.exports=GN()});var vF=fa(ay=>{"use strict";var _re=R(),Ire=Symbol.for("react.element"),wre=Symbol.for("react.fragment"),Sre=Object.prototype.hasOwnProperty,kre=_re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cre={key:!0,ref:!0,__self:!0,__source:!0};function gF(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Sre.call(t,n)&&!Cre.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Ire,type:e,key:i,ref:a,props:o,_owner:kre.current}}ay.Fragment=wre;ay.jsx=gF;ay.jsxs=gF});var O=fa((vke,xF)=>{"use strict";xF.exports=vF()});var fM=fa(Ot=>{"use strict";function L2(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Dy(o,t))e[n]=t,e[r]=o,r=n;else break e}}function Bi(e){return e.length===0?null:e[0]}function Ey(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var a=2*(n+1)-1,s=e[a],l=a+1,c=e[l];if(0>Dy(s,r))l<o&&0>Dy(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(l<o&&0>Dy(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function Dy(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(oM=performance,Ot.unstable_now=function(){return oM.now()}):(z2=Date,nM=z2.now(),Ot.unstable_now=function(){return z2.now()-nM});var oM,z2,nM,xa=[],Pl=[],goe=1,ti=null,wo=3,Ty=!1,hd=!1,Zh=!1,sM=typeof setTimeout=="function"?setTimeout:null,lM=typeof clearTimeout=="function"?clearTimeout:null,iM=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M2(e){for(var t=Bi(Pl);t!==null;){if(t.callback===null)Ey(Pl);else if(t.startTime<=e)Ey(Pl),t.sortIndex=t.expirationTime,L2(xa,t);else break;t=Bi(Pl)}}function B2(e){if(Zh=!1,M2(e),!hd)if(Bi(xa)!==null)hd=!0,U2(j2);else{var t=Bi(Pl);t!==null&&V2(B2,t.startTime-e)}}function j2(e,t){hd=!1,Zh&&(Zh=!1,lM(Gh),Gh=-1),Ty=!0;var r=wo;try{for(M2(t),ti=Bi(xa);ti!==null&&(!(ti.expirationTime>t)||e&&!uM());){var n=ti.callback;if(typeof n=="function"){ti.callback=null,wo=ti.priorityLevel;var o=n(ti.expirationTime<=t);t=Ot.unstable_now(),typeof o=="function"?ti.callback=o:ti===Bi(xa)&&Ey(xa),M2(t)}else Ey(xa);ti=Bi(xa)}if(ti!==null)var i=!0;else{var a=Bi(Pl);a!==null&&V2(B2,a.startTime-t),i=!1}return i}finally{ti=null,wo=r,Ty=!1}}var $y=!1,Ry=null,Gh=-1,cM=5,dM=-1;function uM(){return!(Ot.unstable_now()-dM<cM)}function N2(){if(Ry!==null){var e=Ot.unstable_now();dM=e;var t=!0;try{t=Ry(!0,e)}finally{t?Wh():($y=!1,Ry=null)}}else $y=!1}var Wh;typeof iM=="function"?Wh=function(){iM(N2)}:typeof MessageChannel<"u"?(F2=new MessageChannel,aM=F2.port2,F2.port1.onmessage=N2,Wh=function(){aM.postMessage(null)}):Wh=function(){sM(N2,0)};var F2,aM;function U2(e){Ry=e,$y||($y=!0,Wh())}function V2(e,t){Gh=sM(function(){e(Ot.unstable_now())},t)}Ot.unstable_IdlePriority=5;Ot.unstable_ImmediatePriority=1;Ot.unstable_LowPriority=4;Ot.unstable_NormalPriority=3;Ot.unstable_Profiling=null;Ot.unstable_UserBlockingPriority=2;Ot.unstable_cancelCallback=function(e){e.callback=null};Ot.unstable_continueExecution=function(){hd||Ty||(hd=!0,U2(j2))};Ot.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):cM=0<e?Math.floor(1e3/e):5};Ot.unstable_getCurrentPriorityLevel=function(){return wo};Ot.unstable_getFirstCallbackNode=function(){return Bi(xa)};Ot.unstable_next=function(e){switch(wo){case 1:case 2:case 3:var t=3;break;default:t=wo}var r=wo;wo=t;try{return e()}finally{wo=r}};Ot.unstable_pauseExecution=function(){};Ot.unstable_requestPaint=function(){};Ot.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=wo;wo=e;try{return t()}finally{wo=r}};Ot.unstable_scheduleCallback=function(e,t,r){var n=Ot.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:goe++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,L2(Pl,e),Bi(xa)===null&&e===Bi(Pl)&&(Zh?(lM(Gh),Gh=-1):Zh=!0,V2(B2,r-n))):(e.sortIndex=o,L2(xa,e),hd||Ty||(hd=!0,U2(j2))),e};Ot.unstable_shouldYield=uM;Ot.unstable_wrapCallback=function(e){var t=wo;return function(){var r=wo;wo=t;try{return e.apply(this,arguments)}finally{wo=r}}}});var pM=fa((GDe,mM)=>{"use strict";mM.exports=fM()});var x8=fa(Un=>{"use strict";var voe=R(),Bn=pM();function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _B=new Set,hg={};function Dd(e,t){Vf(e,t),Vf(e+"Capture",t)}function Vf(e,t){for(hg[e]=t,e=0;e<t.length;e++)_B.add(t[e])}var Cs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fP=Object.prototype.hasOwnProperty,xoe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,hM={},gM={};function boe(e){return fP.call(gM,e)?!0:fP.call(hM,e)?!1:xoe.test(e)?gM[e]=!0:(hM[e]=!0,!1)}function yoe(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _oe(e,t,r,n){if(t===null||typeof t>"u"||yoe(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jo(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var lo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lo[e]=new jo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lo[t]=new jo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lo[e]=new jo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lo[e]=new jo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lo[e]=new jo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lo[e]=new jo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lo[e]=new jo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lo[e]=new jo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lo[e]=new jo(e,5,!1,e.toLowerCase(),null,!1,!1)});var n4=/[\-:]([a-z])/g;function i4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(n4,i4);lo[t]=new jo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(n4,i4);lo[t]=new jo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(n4,i4);lo[t]=new jo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lo[e]=new jo(e,1,!1,e.toLowerCase(),null,!1,!1)});lo.xlinkHref=new jo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lo[e]=new jo(e,1,!1,e.toLowerCase(),null,!0,!0)});function a4(e,t,r,n){var o=lo.hasOwnProperty(t)?lo[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_oe(t,r,o,n)&&(r=null),n||o===null?boe(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Es=voe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ay=Symbol.for("react.element"),kf=Symbol.for("react.portal"),Cf=Symbol.for("react.fragment"),s4=Symbol.for("react.strict_mode"),mP=Symbol.for("react.profiler"),IB=Symbol.for("react.provider"),wB=Symbol.for("react.context"),l4=Symbol.for("react.forward_ref"),pP=Symbol.for("react.suspense"),hP=Symbol.for("react.suspense_list"),c4=Symbol.for("react.memo"),Rl=Symbol.for("react.lazy"),SB=Symbol.for("react.offscreen"),vM=Symbol.iterator;function qh(e){return e===null||typeof e!="object"?null:(e=vM&&e[vM]||e["@@iterator"],typeof e=="function"?e:null)}var lr=Object.assign,H2;function rg(e){if(H2===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);H2=t&&t[1]||""}return`
|
|
2
|
+
`+H2+e}var W2=!1;function Z2(e,t){if(!e||W2)return"";W2=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
3
|
+
`),i=n.stack.split(`
|
|
4
|
+
`),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var l=`
|
|
5
|
+
`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{W2=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?rg(e):""}function Ioe(e){switch(e.tag){case 5:return rg(e.type);case 16:return rg("Lazy");case 13:return rg("Suspense");case 19:return rg("SuspenseList");case 0:case 2:case 15:return e=Z2(e.type,!1),e;case 11:return e=Z2(e.type.render,!1),e;case 1:return e=Z2(e.type,!0),e;default:return""}}function gP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Cf:return"Fragment";case kf:return"Portal";case mP:return"Profiler";case s4:return"StrictMode";case pP:return"Suspense";case hP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wB:return(e.displayName||"Context")+".Consumer";case IB:return(e._context.displayName||"Context")+".Provider";case l4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c4:return t=e.displayName||null,t!==null?t:gP(e.type)||"Memo";case Rl:t=e._payload,e=e._init;try{return gP(e(t))}catch{}}return null}function woe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gP(t);case 8:return t===s4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Soe(e){var t=kB(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oy(e){e._valueTracker||(e._valueTracker=Soe(e))}function CB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=kB(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function l_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vP(e,t){var r=t.checked;return lr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function xM(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function PB(e,t){t=t.checked,t!=null&&a4(e,"checked",t,!1)}function xP(e,t){PB(e,t);var r=Vl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bP(e,t.type,r):t.hasOwnProperty("defaultValue")&&bP(e,t.type,Vl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bM(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function bP(e,t,r){(t!=="number"||l_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var og=Array.isArray;function Ff(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Vl(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function yP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return lr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yM(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(og(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Vl(r)}}function DB(e,t){var r=Vl(t.value),n=Vl(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function _M(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function RB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _P(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?RB(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var zy,EB=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(zy=zy||document.createElement("div"),zy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=zy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gg(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ag={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},koe=["Webkit","ms","Moz","O"];Object.keys(ag).forEach(function(e){koe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ag[t]=ag[e]})});function TB(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ag.hasOwnProperty(e)&&ag[e]?(""+t).trim():t+"px"}function $B(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=TB(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var Coe=lr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function IP(e,t){if(t){if(Coe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function wP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var SP=null;function d4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kP=null,Lf=null,Mf=null;function IM(e){if(e=Og(e)){if(typeof kP!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=N_(t),kP(e.stateNode,e.type,t))}}function AB(e){Lf?Mf?Mf.push(e):Mf=[e]:Lf=e}function OB(){if(Lf){var e=Lf,t=Mf;if(Mf=Lf=null,IM(e),t)for(e=0;e<t.length;e++)IM(t[e])}}function zB(e,t){return e(t)}function NB(){}var G2=!1;function FB(e,t,r){if(G2)return e(t,r);G2=!0;try{return zB(e,t,r)}finally{G2=!1,(Lf!==null||Mf!==null)&&(NB(),OB())}}function vg(e,t){var r=e.stateNode;if(r===null)return null;var n=N_(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ie(231,t,typeof r));return r}var CP=!1;if(Cs)try{wf={},Object.defineProperty(wf,"passive",{get:function(){CP=!0}}),window.addEventListener("test",wf,wf),window.removeEventListener("test",wf,wf)}catch{CP=!1}var wf;function Poe(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var sg=!1,c_=null,d_=!1,PP=null,Doe={onError:function(e){sg=!0,c_=e}};function Roe(e,t,r,n,o,i,a,s,l){sg=!1,c_=null,Poe.apply(Doe,arguments)}function Eoe(e,t,r,n,o,i,a,s,l){if(Roe.apply(this,arguments),sg){if(sg){var c=c_;sg=!1,c_=null}else throw Error(ie(198));d_||(d_=!0,PP=c)}}function Rd(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function LB(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function wM(e){if(Rd(e)!==e)throw Error(ie(188))}function Toe(e){var t=e.alternate;if(!t){if(t=Rd(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return wM(o),e;if(i===n)return wM(o),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function MB(e){return e=Toe(e),e!==null?BB(e):null}function BB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=BB(e);if(t!==null)return t;e=e.sibling}return null}var jB=Bn.unstable_scheduleCallback,SM=Bn.unstable_cancelCallback,$oe=Bn.unstable_shouldYield,Aoe=Bn.unstable_requestPaint,_r=Bn.unstable_now,Ooe=Bn.unstable_getCurrentPriorityLevel,u4=Bn.unstable_ImmediatePriority,UB=Bn.unstable_UserBlockingPriority,u_=Bn.unstable_NormalPriority,zoe=Bn.unstable_LowPriority,VB=Bn.unstable_IdlePriority,$_=null,Ia=null;function Noe(e){if(Ia&&typeof Ia.onCommitFiberRoot=="function")try{Ia.onCommitFiberRoot($_,e,void 0,(e.current.flags&128)===128)}catch{}}var Wi=Math.clz32?Math.clz32:Moe,Foe=Math.log,Loe=Math.LN2;function Moe(e){return e>>>=0,e===0?32:31-(Foe(e)/Loe|0)|0}var Ny=64,Fy=4194304;function ng(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function f_(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=ng(s):(i&=a,i!==0&&(n=ng(i)))}else a=r&~o,a!==0?n=ng(a):i!==0&&(n=ng(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Wi(t),o=1<<r,n|=e[r],t&=~o;return n}function Boe(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function joe(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Wi(i),s=1<<a,l=o[a];l===-1?((s&r)===0||(s&n)!==0)&&(o[a]=Boe(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function DP(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function HB(){var e=Ny;return Ny<<=1,(Ny&4194240)===0&&(Ny=64),e}function q2(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function $g(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wi(t),e[t]=r}function Uoe(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Wi(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function f4(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Wi(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var St=0;function WB(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ZB,m4,GB,qB,KB,RP=!1,Ly=[],zl=null,Nl=null,Fl=null,xg=new Map,bg=new Map,Tl=[],Voe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function kM(e,t){switch(e){case"focusin":case"focusout":zl=null;break;case"dragenter":case"dragleave":Nl=null;break;case"mouseover":case"mouseout":Fl=null;break;case"pointerover":case"pointerout":xg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bg.delete(t.pointerId)}}function Kh(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Og(t),t!==null&&m4(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Hoe(e,t,r,n,o){switch(t){case"focusin":return zl=Kh(zl,e,t,r,n,o),!0;case"dragenter":return Nl=Kh(Nl,e,t,r,n,o),!0;case"mouseover":return Fl=Kh(Fl,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return xg.set(i,Kh(xg.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,bg.set(i,Kh(bg.get(i)||null,e,t,r,n,o)),!0}return!1}function XB(e){var t=xd(e.target);if(t!==null){var r=Rd(t);if(r!==null){if(t=r.tag,t===13){if(t=LB(r),t!==null){e.blockedOn=t,KB(e.priority,function(){GB(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yy(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=EP(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);SP=n,r.target.dispatchEvent(n),SP=null}else return t=Og(r),t!==null&&m4(t),e.blockedOn=r,!1;t.shift()}return!0}function CM(e,t,r){Yy(e)&&r.delete(t)}function Woe(){RP=!1,zl!==null&&Yy(zl)&&(zl=null),Nl!==null&&Yy(Nl)&&(Nl=null),Fl!==null&&Yy(Fl)&&(Fl=null),xg.forEach(CM),bg.forEach(CM)}function Xh(e,t){e.blockedOn===t&&(e.blockedOn=null,RP||(RP=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,Woe)))}function yg(e){function t(o){return Xh(o,e)}if(0<Ly.length){Xh(Ly[0],e);for(var r=1;r<Ly.length;r++){var n=Ly[r];n.blockedOn===e&&(n.blockedOn=null)}}for(zl!==null&&Xh(zl,e),Nl!==null&&Xh(Nl,e),Fl!==null&&Xh(Fl,e),xg.forEach(t),bg.forEach(t),r=0;r<Tl.length;r++)n=Tl[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Tl.length&&(r=Tl[0],r.blockedOn===null);)XB(r),r.blockedOn===null&&Tl.shift()}var Bf=Es.ReactCurrentBatchConfig,m_=!0;function Zoe(e,t,r,n){var o=St,i=Bf.transition;Bf.transition=null;try{St=1,p4(e,t,r,n)}finally{St=o,Bf.transition=i}}function Goe(e,t,r,n){var o=St,i=Bf.transition;Bf.transition=null;try{St=4,p4(e,t,r,n)}finally{St=o,Bf.transition=i}}function p4(e,t,r,n){if(m_){var o=EP(e,t,r,n);if(o===null)tP(e,t,n,p_,r),kM(e,n);else if(Hoe(o,e,t,r,n))n.stopPropagation();else if(kM(e,n),t&4&&-1<Voe.indexOf(e)){for(;o!==null;){var i=Og(o);if(i!==null&&ZB(i),i=EP(e,t,r,n),i===null&&tP(e,t,n,p_,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else tP(e,t,n,null,r)}}var p_=null;function EP(e,t,r,n){if(p_=null,e=d4(n),e=xd(e),e!==null)if(t=Rd(e),t===null)e=null;else if(r=t.tag,r===13){if(e=LB(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return p_=e,null}function QB(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ooe()){case u4:return 1;case UB:return 4;case u_:case zoe:return 16;case VB:return 536870912;default:return 16}default:return 16}}var Al=null,h4=null,Jy=null;function YB(){if(Jy)return Jy;var e,t=h4,r=t.length,n,o="value"in Al?Al.value:Al.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return Jy=o.slice(e,1<n?1-n:void 0)}function e_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function My(){return!0}function PM(){return!1}function jn(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?My:PM,this.isPropagationStopped=PM,this}return lr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=My)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=My)},persist:function(){},isPersistent:My}),t}var Xf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},g4=jn(Xf),Ag=lr({},Xf,{view:0,detail:0}),qoe=jn(Ag),K2,X2,Qh,A_=lr({},Ag,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:v4,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Qh&&(Qh&&e.type==="mousemove"?(K2=e.screenX-Qh.screenX,X2=e.screenY-Qh.screenY):X2=K2=0,Qh=e),K2)},movementY:function(e){return"movementY"in e?e.movementY:X2}}),DM=jn(A_),Koe=lr({},A_,{dataTransfer:0}),Xoe=jn(Koe),Qoe=lr({},Ag,{relatedTarget:0}),Q2=jn(Qoe),Yoe=lr({},Xf,{animationName:0,elapsedTime:0,pseudoElement:0}),Joe=jn(Yoe),ene=lr({},Xf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tne=jn(ene),rne=lr({},Xf,{data:0}),RM=jn(rne),one={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nne={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ine={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ane(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ine[e])?!!t[e]:!1}function v4(){return ane}var sne=lr({},Ag,{key:function(e){if(e.key){var t=one[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=e_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nne[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:v4,charCode:function(e){return e.type==="keypress"?e_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?e_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lne=jn(sne),cne=lr({},A_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),EM=jn(cne),dne=lr({},Ag,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:v4}),une=jn(dne),fne=lr({},Xf,{propertyName:0,elapsedTime:0,pseudoElement:0}),mne=jn(fne),pne=lr({},A_,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hne=jn(pne),gne=[9,13,27,32],x4=Cs&&"CompositionEvent"in window,lg=null;Cs&&"documentMode"in document&&(lg=document.documentMode);var vne=Cs&&"TextEvent"in window&&!lg,JB=Cs&&(!x4||lg&&8<lg&&11>=lg),TM=" ",$M=!1;function e7(e,t){switch(e){case"keyup":return gne.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function t7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pf=!1;function xne(e,t){switch(e){case"compositionend":return t7(t);case"keypress":return t.which!==32?null:($M=!0,TM);case"textInput":return e=t.data,e===TM&&$M?null:e;default:return null}}function bne(e,t){if(Pf)return e==="compositionend"||!x4&&e7(e,t)?(e=YB(),Jy=h4=Al=null,Pf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return JB&&t.locale!=="ko"?null:t.data;default:return null}}var yne={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function AM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yne[e.type]:t==="textarea"}function r7(e,t,r,n){AB(n),t=h_(t,"onChange"),0<t.length&&(r=new g4("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var cg=null,_g=null;function _ne(e){m7(e,0)}function O_(e){var t=Ef(e);if(CB(t))return e}function Ine(e,t){if(e==="change")return t}var o7=!1;Cs&&(Cs?(jy="oninput"in document,jy||(Y2=document.createElement("div"),Y2.setAttribute("oninput","return;"),jy=typeof Y2.oninput=="function"),By=jy):By=!1,o7=By&&(!document.documentMode||9<document.documentMode));var By,jy,Y2;function OM(){cg&&(cg.detachEvent("onpropertychange",n7),_g=cg=null)}function n7(e){if(e.propertyName==="value"&&O_(_g)){var t=[];r7(t,_g,e,d4(e)),FB(_ne,t)}}function wne(e,t,r){e==="focusin"?(OM(),cg=t,_g=r,cg.attachEvent("onpropertychange",n7)):e==="focusout"&&OM()}function Sne(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return O_(_g)}function kne(e,t){if(e==="click")return O_(t)}function Cne(e,t){if(e==="input"||e==="change")return O_(t)}function Pne(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gi=typeof Object.is=="function"?Object.is:Pne;function Ig(e,t){if(Gi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!fP.call(t,o)||!Gi(e[o],t[o]))return!1}return!0}function zM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function NM(e,t){var r=zM(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=zM(r)}}function i7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?i7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function a7(){for(var e=window,t=l_();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=l_(e.document)}return t}function b4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Dne(e){var t=a7(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&i7(r.ownerDocument.documentElement,r)){if(n!==null&&b4(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=NM(r,i);var a=NM(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Rne=Cs&&"documentMode"in document&&11>=document.documentMode,Df=null,TP=null,dg=null,$P=!1;function FM(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;$P||Df==null||Df!==l_(n)||(n=Df,"selectionStart"in n&&b4(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),dg&&Ig(dg,n)||(dg=n,n=h_(TP,"onSelect"),0<n.length&&(t=new g4("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Df)))}function Uy(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Rf={animationend:Uy("Animation","AnimationEnd"),animationiteration:Uy("Animation","AnimationIteration"),animationstart:Uy("Animation","AnimationStart"),transitionend:Uy("Transition","TransitionEnd")},J2={},s7={};Cs&&(s7=document.createElement("div").style,"AnimationEvent"in window||(delete Rf.animationend.animation,delete Rf.animationiteration.animation,delete Rf.animationstart.animation),"TransitionEvent"in window||delete Rf.transitionend.transition);function z_(e){if(J2[e])return J2[e];if(!Rf[e])return e;var t=Rf[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in s7)return J2[e]=t[r];return e}var l7=z_("animationend"),c7=z_("animationiteration"),d7=z_("animationstart"),u7=z_("transitionend"),f7=new Map,LM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wl(e,t){f7.set(e,t),Dd(t,[e])}for(Vy=0;Vy<LM.length;Vy++)Hy=LM[Vy],MM=Hy.toLowerCase(),BM=Hy[0].toUpperCase()+Hy.slice(1),Wl(MM,"on"+BM);var Hy,MM,BM,Vy;Wl(l7,"onAnimationEnd");Wl(c7,"onAnimationIteration");Wl(d7,"onAnimationStart");Wl("dblclick","onDoubleClick");Wl("focusin","onFocus");Wl("focusout","onBlur");Wl(u7,"onTransitionEnd");Vf("onMouseEnter",["mouseout","mouseover"]);Vf("onMouseLeave",["mouseout","mouseover"]);Vf("onPointerEnter",["pointerout","pointerover"]);Vf("onPointerLeave",["pointerout","pointerover"]);Dd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ig="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ene=new Set("cancel close invalid load scroll toggle".split(" ").concat(ig));function jM(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Eoe(n,t,void 0,e),e.currentTarget=null}function m7(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;jM(o,s,c),i=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;jM(o,s,c),i=l}}}if(d_)throw e=PP,d_=!1,PP=null,e}function Ht(e,t){var r=t[FP];r===void 0&&(r=t[FP]=new Set);var n=e+"__bubble";r.has(n)||(p7(t,e,2,!1),r.add(n))}function eP(e,t,r){var n=0;t&&(n|=4),p7(r,e,n,t)}var Wy="_reactListening"+Math.random().toString(36).slice(2);function wg(e){if(!e[Wy]){e[Wy]=!0,_B.forEach(function(r){r!=="selectionchange"&&(Ene.has(r)||eP(r,!1,e),eP(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wy]||(t[Wy]=!0,eP("selectionchange",!1,t))}}function p7(e,t,r,n){switch(QB(t)){case 1:var o=Zoe;break;case 4:o=Goe;break;default:o=p4}r=o.bind(null,t,r,e),o=void 0,!CP||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function tP(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=xd(s),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}s=s.parentNode}}n=n.return}FB(function(){var c=i,d=d4(r),u=[];e:{var f=f7.get(e);if(f!==void 0){var m=g4,p=e;switch(e){case"keypress":if(e_(r)===0)break e;case"keydown":case"keyup":m=lne;break;case"focusin":p="focus",m=Q2;break;case"focusout":p="blur",m=Q2;break;case"beforeblur":case"afterblur":m=Q2;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=DM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Xoe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=une;break;case l7:case c7:case d7:m=Joe;break;case u7:m=mne;break;case"scroll":m=qoe;break;case"wheel":m=hne;break;case"copy":case"cut":case"paste":m=tne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=EM}var h=(t&4)!==0,y=!h&&e==="scroll",x=h?f!==null?f+"Capture":null:f;h=[];for(var v=c,_;v!==null;){_=v;var I=_.stateNode;if(_.tag===5&&I!==null&&(_=I,x!==null&&(I=vg(v,x),I!=null&&h.push(Sg(v,I,_)))),y)break;v=v.return}0<h.length&&(f=new m(f,p,null,r,d),u.push({event:f,listeners:h}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&r!==SP&&(p=r.relatedTarget||r.fromElement)&&(xd(p)||p[Ps]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=r.relatedTarget||r.toElement,m=c,p=p?xd(p):null,p!==null&&(y=Rd(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=c),m!==p)){if(h=DM,I="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(h=EM,I="onPointerLeave",x="onPointerEnter",v="pointer"),y=m==null?f:Ef(m),_=p==null?f:Ef(p),f=new h(I,v+"leave",m,r,d),f.target=y,f.relatedTarget=_,I=null,xd(d)===c&&(h=new h(x,v+"enter",p,r,d),h.target=_,h.relatedTarget=y,I=h),y=I,m&&p)t:{for(h=m,x=p,v=0,_=h;_;_=Sf(_))v++;for(_=0,I=x;I;I=Sf(I))_++;for(;0<v-_;)h=Sf(h),v--;for(;0<_-v;)x=Sf(x),_--;for(;v--;){if(h===x||x!==null&&h===x.alternate)break t;h=Sf(h),x=Sf(x)}h=null}else h=null;m!==null&&UM(u,f,m,h,!1),p!==null&&y!==null&&UM(u,y,p,h,!0)}}e:{if(f=c?Ef(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var S=Ine;else if(AM(f))if(o7)S=Cne;else{S=Sne;var w=wne}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=kne);if(S&&(S=S(e,c))){r7(u,S,r,d);break e}w&&w(e,f,c),e==="focusout"&&(w=f._wrapperState)&&w.controlled&&f.type==="number"&&bP(f,"number",f.value)}switch(w=c?Ef(c):window,e){case"focusin":(AM(w)||w.contentEditable==="true")&&(Df=w,TP=c,dg=null);break;case"focusout":dg=TP=Df=null;break;case"mousedown":$P=!0;break;case"contextmenu":case"mouseup":case"dragend":$P=!1,FM(u,r,d);break;case"selectionchange":if(Rne)break;case"keydown":case"keyup":FM(u,r,d)}var P;if(x4)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Pf?e7(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(JB&&r.locale!=="ko"&&(Pf||E!=="onCompositionStart"?E==="onCompositionEnd"&&Pf&&(P=YB()):(Al=d,h4="value"in Al?Al.value:Al.textContent,Pf=!0)),w=h_(c,E),0<w.length&&(E=new RM(E,e,null,r,d),u.push({event:E,listeners:w}),P?E.data=P:(P=t7(r),P!==null&&(E.data=P)))),(P=vne?xne(e,r):bne(e,r))&&(c=h_(c,"onBeforeInput"),0<c.length&&(d=new RM("onBeforeInput","beforeinput",null,r,d),u.push({event:d,listeners:c}),d.data=P))}m7(u,t)})}function Sg(e,t,r){return{instance:e,listener:t,currentTarget:r}}function h_(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=vg(e,r),i!=null&&n.unshift(Sg(e,i,o)),i=vg(e,t),i!=null&&n.push(Sg(e,i,o))),e=e.return}return n}function Sf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function UM(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,o?(l=vg(r,i),l!=null&&a.unshift(Sg(r,l,s))):o||(l=vg(r,i),l!=null&&a.push(Sg(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Tne=/\r\n?/g,$ne=/\u0000|\uFFFD/g;function VM(e){return(typeof e=="string"?e:""+e).replace(Tne,`
|
|
6
|
+
`).replace($ne,"")}function Zy(e,t,r){if(t=VM(t),VM(e)!==t&&r)throw Error(ie(425))}function g_(){}var AP=null,OP=null;function zP(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var NP=typeof setTimeout=="function"?setTimeout:void 0,Ane=typeof clearTimeout=="function"?clearTimeout:void 0,HM=typeof Promise=="function"?Promise:void 0,One=typeof queueMicrotask=="function"?queueMicrotask:typeof HM<"u"?function(e){return HM.resolve(null).then(e).catch(zne)}:NP;function zne(e){setTimeout(function(){throw e})}function rP(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),yg(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);yg(t)}function Ll(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function WM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Qf=Math.random().toString(36).slice(2),_a="__reactFiber$"+Qf,kg="__reactProps$"+Qf,Ps="__reactContainer$"+Qf,FP="__reactEvents$"+Qf,Nne="__reactListeners$"+Qf,Fne="__reactHandles$"+Qf;function xd(e){var t=e[_a];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ps]||r[_a]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=WM(e);e!==null;){if(r=e[_a])return r;e=WM(e)}return t}e=r,r=e.parentNode}return null}function Og(e){return e=e[_a]||e[Ps],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ef(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function N_(e){return e[kg]||null}var LP=[],Tf=-1;function Zl(e){return{current:e}}function Wt(e){0>Tf||(e.current=LP[Tf],LP[Tf]=null,Tf--)}function zt(e,t){Tf++,LP[Tf]=e.current,e.current=t}var Hl={},Po=Zl(Hl),gn=Zl(!1),wd=Hl;function Hf(e,t){var r=e.type.contextTypes;if(!r)return Hl;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function vn(e){return e=e.childContextTypes,e!=null}function v_(){Wt(gn),Wt(Po)}function ZM(e,t,r){if(Po.current!==Hl)throw Error(ie(168));zt(Po,t),zt(gn,r)}function h7(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ie(108,woe(e)||"Unknown",o));return lr({},r,n)}function x_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hl,wd=Po.current,zt(Po,e),zt(gn,gn.current),!0}function GM(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=h7(e,t,wd),n.__reactInternalMemoizedMergedChildContext=e,Wt(gn),Wt(Po),zt(Po,e)):Wt(gn),zt(gn,r)}var Is=null,F_=!1,oP=!1;function g7(e){Is===null?Is=[e]:Is.push(e)}function Lne(e){F_=!0,g7(e)}function Gl(){if(!oP&&Is!==null){oP=!0;var e=0,t=St;try{var r=Is;for(St=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Is=null,F_=!1}catch(o){throw Is!==null&&(Is=Is.slice(e+1)),jB(u4,Gl),o}finally{St=t,oP=!1}}return null}var $f=[],Af=0,b_=null,y_=0,ri=[],oi=0,Sd=null,ws=1,Ss="";function gd(e,t){$f[Af++]=y_,$f[Af++]=b_,b_=e,y_=t}function v7(e,t,r){ri[oi++]=ws,ri[oi++]=Ss,ri[oi++]=Sd,Sd=e;var n=ws;e=Ss;var o=32-Wi(n)-1;n&=~(1<<o),r+=1;var i=32-Wi(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,ws=1<<32-Wi(t)+o|r<<o|n,Ss=i+e}else ws=1<<i|r<<o|n,Ss=e}function y4(e){e.return!==null&&(gd(e,1),v7(e,1,0))}function _4(e){for(;e===b_;)b_=$f[--Af],$f[Af]=null,y_=$f[--Af],$f[Af]=null;for(;e===Sd;)Sd=ri[--oi],ri[oi]=null,Ss=ri[--oi],ri[oi]=null,ws=ri[--oi],ri[oi]=null}var Mn=null,Ln=null,Qt=!1,Hi=null;function x7(e,t){var r=ni(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function qM(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mn=e,Ln=Ll(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Ln=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Sd!==null?{id:ws,overflow:Ss}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ni(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Mn=e,Ln=null,!0):!1;default:return!1}}function MP(e){return(e.mode&1)!==0&&(e.flags&128)===0}function BP(e){if(Qt){var t=Ln;if(t){var r=t;if(!qM(e,t)){if(MP(e))throw Error(ie(418));t=Ll(r.nextSibling);var n=Mn;t&&qM(e,t)?x7(n,r):(e.flags=e.flags&-4097|2,Qt=!1,Mn=e)}}else{if(MP(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Qt=!1,Mn=e}}}function KM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function Gy(e){if(e!==Mn)return!1;if(!Qt)return KM(e),Qt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zP(e.type,e.memoizedProps)),t&&(t=Ln)){if(MP(e))throw b7(),Error(ie(418));for(;t;)x7(e,t),t=Ll(t.nextSibling)}if(KM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ln=Ll(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ln=null}}else Ln=Mn?Ll(e.stateNode.nextSibling):null;return!0}function b7(){for(var e=Ln;e;)e=Ll(e.nextSibling)}function Wf(){Ln=Mn=null,Qt=!1}function I4(e){Hi===null?Hi=[e]:Hi.push(e)}var Mne=Es.ReactCurrentBatchConfig;function Yh(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function qy(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function XM(e){var t=e._init;return t(e._payload)}function y7(e){function t(x,v){if(e){var _=x.deletions;_===null?(x.deletions=[v],x.flags|=16):_.push(v)}}function r(x,v){if(!e)return null;for(;v!==null;)t(x,v),v=v.sibling;return null}function n(x,v){for(x=new Map;v!==null;)v.key!==null?x.set(v.key,v):x.set(v.index,v),v=v.sibling;return x}function o(x,v){return x=Ul(x,v),x.index=0,x.sibling=null,x}function i(x,v,_){return x.index=_,e?(_=x.alternate,_!==null?(_=_.index,_<v?(x.flags|=2,v):_):(x.flags|=2,v)):(x.flags|=1048576,v)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,v,_,I){return v===null||v.tag!==6?(v=dP(_,x.mode,I),v.return=x,v):(v=o(v,_),v.return=x,v)}function l(x,v,_,I){var S=_.type;return S===Cf?d(x,v,_.props.children,I,_.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rl&&XM(S)===v.type)?(I=o(v,_.props),I.ref=Yh(x,v,_),I.return=x,I):(I=s_(_.type,_.key,_.props,null,x.mode,I),I.ref=Yh(x,v,_),I.return=x,I)}function c(x,v,_,I){return v===null||v.tag!==4||v.stateNode.containerInfo!==_.containerInfo||v.stateNode.implementation!==_.implementation?(v=uP(_,x.mode,I),v.return=x,v):(v=o(v,_.children||[]),v.return=x,v)}function d(x,v,_,I,S){return v===null||v.tag!==7?(v=Id(_,x.mode,I,S),v.return=x,v):(v=o(v,_),v.return=x,v)}function u(x,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return v=dP(""+v,x.mode,_),v.return=x,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ay:return _=s_(v.type,v.key,v.props,null,x.mode,_),_.ref=Yh(x,null,v),_.return=x,_;case kf:return v=uP(v,x.mode,_),v.return=x,v;case Rl:var I=v._init;return u(x,I(v._payload),_)}if(og(v)||qh(v))return v=Id(v,x.mode,_,null),v.return=x,v;qy(x,v)}return null}function f(x,v,_,I){var S=v!==null?v.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:s(x,v,""+_,I);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ay:return _.key===S?l(x,v,_,I):null;case kf:return _.key===S?c(x,v,_,I):null;case Rl:return S=_._init,f(x,v,S(_._payload),I)}if(og(_)||qh(_))return S!==null?null:d(x,v,_,I,null);qy(x,_)}return null}function m(x,v,_,I,S){if(typeof I=="string"&&I!==""||typeof I=="number")return x=x.get(_)||null,s(v,x,""+I,S);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Ay:return x=x.get(I.key===null?_:I.key)||null,l(v,x,I,S);case kf:return x=x.get(I.key===null?_:I.key)||null,c(v,x,I,S);case Rl:var w=I._init;return m(x,v,_,w(I._payload),S)}if(og(I)||qh(I))return x=x.get(_)||null,d(v,x,I,S,null);qy(v,I)}return null}function p(x,v,_,I){for(var S=null,w=null,P=v,E=v=0,B=null;P!==null&&E<_.length;E++){P.index>E?(B=P,P=null):B=P.sibling;var H=f(x,P,_[E],I);if(H===null){P===null&&(P=B);break}e&&P&&H.alternate===null&&t(x,P),v=i(H,v,E),w===null?S=H:w.sibling=H,w=H,P=B}if(E===_.length)return r(x,P),Qt&&gd(x,E),S;if(P===null){for(;E<_.length;E++)P=u(x,_[E],I),P!==null&&(v=i(P,v,E),w===null?S=P:w.sibling=P,w=P);return Qt&&gd(x,E),S}for(P=n(x,P);E<_.length;E++)B=m(P,x,E,_[E],I),B!==null&&(e&&B.alternate!==null&&P.delete(B.key===null?E:B.key),v=i(B,v,E),w===null?S=B:w.sibling=B,w=B);return e&&P.forEach(function(Z){return t(x,Z)}),Qt&&gd(x,E),S}function h(x,v,_,I){var S=qh(_);if(typeof S!="function")throw Error(ie(150));if(_=S.call(_),_==null)throw Error(ie(151));for(var w=S=null,P=v,E=v=0,B=null,H=_.next();P!==null&&!H.done;E++,H=_.next()){P.index>E?(B=P,P=null):B=P.sibling;var Z=f(x,P,H.value,I);if(Z===null){P===null&&(P=B);break}e&&P&&Z.alternate===null&&t(x,P),v=i(Z,v,E),w===null?S=Z:w.sibling=Z,w=Z,P=B}if(H.done)return r(x,P),Qt&&gd(x,E),S;if(P===null){for(;!H.done;E++,H=_.next())H=u(x,H.value,I),H!==null&&(v=i(H,v,E),w===null?S=H:w.sibling=H,w=H);return Qt&&gd(x,E),S}for(P=n(x,P);!H.done;E++,H=_.next())H=m(P,x,E,H.value,I),H!==null&&(e&&H.alternate!==null&&P.delete(H.key===null?E:H.key),v=i(H,v,E),w===null?S=H:w.sibling=H,w=H);return e&&P.forEach(function(q){return t(x,q)}),Qt&&gd(x,E),S}function y(x,v,_,I){if(typeof _=="object"&&_!==null&&_.type===Cf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ay:e:{for(var S=_.key,w=v;w!==null;){if(w.key===S){if(S=_.type,S===Cf){if(w.tag===7){r(x,w.sibling),v=o(w,_.props.children),v.return=x,x=v;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Rl&&XM(S)===w.type){r(x,w.sibling),v=o(w,_.props),v.ref=Yh(x,w,_),v.return=x,x=v;break e}r(x,w);break}else t(x,w);w=w.sibling}_.type===Cf?(v=Id(_.props.children,x.mode,I,_.key),v.return=x,x=v):(I=s_(_.type,_.key,_.props,null,x.mode,I),I.ref=Yh(x,v,_),I.return=x,x=I)}return a(x);case kf:e:{for(w=_.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===_.containerInfo&&v.stateNode.implementation===_.implementation){r(x,v.sibling),v=o(v,_.children||[]),v.return=x,x=v;break e}else{r(x,v);break}else t(x,v);v=v.sibling}v=uP(_,x.mode,I),v.return=x,x=v}return a(x);case Rl:return w=_._init,y(x,v,w(_._payload),I)}if(og(_))return p(x,v,_,I);if(qh(_))return h(x,v,_,I);qy(x,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,v!==null&&v.tag===6?(r(x,v.sibling),v=o(v,_),v.return=x,x=v):(r(x,v),v=dP(_,x.mode,I),v.return=x,x=v),a(x)):r(x,v)}return y}var Zf=y7(!0),_7=y7(!1),__=Zl(null),I_=null,Of=null,w4=null;function S4(){w4=Of=I_=null}function k4(e){var t=__.current;Wt(__),e._currentValue=t}function jP(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function jf(e,t){I_=e,w4=Of=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(hn=!0),e.firstContext=null)}function ai(e){var t=e._currentValue;if(w4!==e)if(e={context:e,memoizedValue:t,next:null},Of===null){if(I_===null)throw Error(ie(308));Of=e,I_.dependencies={lanes:0,firstContext:e}}else Of=Of.next=e;return t}var bd=null;function C4(e){bd===null?bd=[e]:bd.push(e)}function I7(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,C4(t)):(r.next=o.next,o.next=r),t.interleaved=r,Ds(e,n)}function Ds(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var El=!1;function P4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w7(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ks(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ml(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ft&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Ds(e,r)}return o=n.interleaved,o===null?(t.next=t,C4(n)):(t.next=o.next,o.next=t),n.interleaved=t,Ds(e,r)}function t_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,f4(e,r)}}function QM(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function w_(e,t,r,n){var o=e.updateQueue;El=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var u=o.baseState;a=0,d=c=l=null,s=i;do{var f=s.lane,m=s.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,h=s;switch(f=t,m=r,h.tag){case 1:if(p=h.payload,typeof p=="function"){u=p.call(m,u,f);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,f=typeof p=="function"?p.call(m,u,f):p,f==null)break e;u=lr({},u,f);break e;case 2:El=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else m={eventTime:m,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Cd|=a,e.lanes=a,e.memoizedState=u}}function YM(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(ie(191,o));o.call(n)}}}var zg={},wa=Zl(zg),Cg=Zl(zg),Pg=Zl(zg);function yd(e){if(e===zg)throw Error(ie(174));return e}function D4(e,t){switch(zt(Pg,t),zt(Cg,e),zt(wa,zg),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_P(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_P(t,e)}Wt(wa),zt(wa,t)}function Gf(){Wt(wa),Wt(Cg),Wt(Pg)}function S7(e){yd(Pg.current);var t=yd(wa.current),r=_P(t,e.type);t!==r&&(zt(Cg,e),zt(wa,r))}function R4(e){Cg.current===e&&(Wt(wa),Wt(Cg))}var ar=Zl(0);function S_(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nP=[];function E4(){for(var e=0;e<nP.length;e++)nP[e]._workInProgressVersionPrimary=null;nP.length=0}var r_=Es.ReactCurrentDispatcher,iP=Es.ReactCurrentBatchConfig,kd=0,sr=null,Er=null,Wr=null,k_=!1,ug=!1,Dg=0,Bne=0;function So(){throw Error(ie(321))}function T4(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Gi(e[r],t[r]))return!1;return!0}function $4(e,t,r,n,o,i){if(kd=i,sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,r_.current=e===null||e.memoizedState===null?Hne:Wne,e=r(n,o),ug){i=0;do{if(ug=!1,Dg=0,25<=i)throw Error(ie(301));i+=1,Wr=Er=null,t.updateQueue=null,r_.current=Zne,e=r(n,o)}while(ug)}if(r_.current=C_,t=Er!==null&&Er.next!==null,kd=0,Wr=Er=sr=null,k_=!1,t)throw Error(ie(300));return e}function A4(){var e=Dg!==0;return Dg=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wr===null?sr.memoizedState=Wr=e:Wr=Wr.next=e,Wr}function si(){if(Er===null){var e=sr.alternate;e=e!==null?e.memoizedState:null}else e=Er.next;var t=Wr===null?sr.memoizedState:Wr.next;if(t!==null)Wr=t,Er=e;else{if(e===null)throw Error(ie(310));Er=e,e={memoizedState:Er.memoizedState,baseState:Er.baseState,baseQueue:Er.baseQueue,queue:Er.queue,next:null},Wr===null?sr.memoizedState=Wr=e:Wr=Wr.next=e}return Wr}function Rg(e,t){return typeof t=="function"?t(e):t}function aP(e){var t=si(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Er,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,l=null,c=i;do{var d=c.lane;if((kd&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=u,a=n):l=l.next=u,sr.lanes|=d,Cd|=d}c=c.next}while(c!==null&&c!==i);l===null?a=n:l.next=s,Gi(n,t.memoizedState)||(hn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,sr.lanes|=i,Cd|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function sP(e){var t=si(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Gi(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function k7(){}function C7(e,t){var r=sr,n=si(),o=t(),i=!Gi(n.memoizedState,o);if(i&&(n.memoizedState=o,hn=!0),n=n.queue,O4(R7.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Wr!==null&&Wr.memoizedState.tag&1){if(r.flags|=2048,Eg(9,D7.bind(null,r,n,o,t),void 0,null),Zr===null)throw Error(ie(349));(kd&30)!==0||P7(r,t,o)}return o}function P7(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function D7(e,t,r,n){t.value=r,t.getSnapshot=n,E7(t)&&T7(e)}function R7(e,t,r){return r(function(){E7(t)&&T7(e)})}function E7(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Gi(e,r)}catch{return!0}}function T7(e){var t=Ds(e,1);t!==null&&Zi(t,e,1,-1)}function JM(e){var t=ya();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rg,lastRenderedState:e},t.queue=e,e=e.dispatch=Vne.bind(null,sr,e),[t.memoizedState,e]}function Eg(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function $7(){return si().memoizedState}function o_(e,t,r,n){var o=ya();sr.flags|=e,o.memoizedState=Eg(1|t,r,void 0,n===void 0?null:n)}function L_(e,t,r,n){var o=si();n=n===void 0?null:n;var i=void 0;if(Er!==null){var a=Er.memoizedState;if(i=a.destroy,n!==null&&T4(n,a.deps)){o.memoizedState=Eg(t,r,i,n);return}}sr.flags|=e,o.memoizedState=Eg(1|t,r,i,n)}function eB(e,t){return o_(8390656,8,e,t)}function O4(e,t){return L_(2048,8,e,t)}function A7(e,t){return L_(4,2,e,t)}function O7(e,t){return L_(4,4,e,t)}function z7(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function N7(e,t,r){return r=r!=null?r.concat([e]):null,L_(4,4,z7.bind(null,t,e),r)}function z4(){}function F7(e,t){var r=si();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&T4(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function L7(e,t){var r=si();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&T4(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function M7(e,t,r){return(kd&21)===0?(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=r):(Gi(r,t)||(r=HB(),sr.lanes|=r,Cd|=r,e.baseState=!0),t)}function jne(e,t){var r=St;St=r!==0&&4>r?r:4,e(!0);var n=iP.transition;iP.transition={};try{e(!1),t()}finally{St=r,iP.transition=n}}function B7(){return si().memoizedState}function Une(e,t,r){var n=jl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j7(e))U7(t,r);else if(r=I7(e,t,r,n),r!==null){var o=Bo();Zi(r,e,n,o),V7(r,t,n)}}function Vne(e,t,r){var n=jl(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j7(e))U7(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Gi(s,a)){var l=t.interleaved;l===null?(o.next=o,C4(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=I7(e,t,o,n),r!==null&&(o=Bo(),Zi(r,e,n,o),V7(r,t,n))}}function j7(e){var t=e.alternate;return e===sr||t!==null&&t===sr}function U7(e,t){ug=k_=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function V7(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,f4(e,r)}}var C_={readContext:ai,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},Hne={readContext:ai,useCallback:function(e,t){return ya().memoizedState=[e,t===void 0?null:t],e},useContext:ai,useEffect:eB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,o_(4194308,4,z7.bind(null,t,e),r)},useLayoutEffect:function(e,t){return o_(4194308,4,e,t)},useInsertionEffect:function(e,t){return o_(4,2,e,t)},useMemo:function(e,t){var r=ya();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ya();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Une.bind(null,sr,e),[n.memoizedState,e]},useRef:function(e){var t=ya();return e={current:e},t.memoizedState=e},useState:JM,useDebugValue:z4,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=JM(!1),t=e[0];return e=jne.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sr,o=ya();if(Qt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Zr===null)throw Error(ie(349));(kd&30)!==0||P7(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,eB(R7.bind(null,n,i,e),[e]),n.flags|=2048,Eg(9,D7.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=ya(),t=Zr.identifierPrefix;if(Qt){var r=Ss,n=ws;r=(n&~(1<<32-Wi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Dg++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Bne++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Wne={readContext:ai,useCallback:F7,useContext:ai,useEffect:O4,useImperativeHandle:N7,useInsertionEffect:A7,useLayoutEffect:O7,useMemo:L7,useReducer:aP,useRef:$7,useState:function(){return aP(Rg)},useDebugValue:z4,useDeferredValue:function(e){var t=si();return M7(t,Er.memoizedState,e)},useTransition:function(){var e=aP(Rg)[0],t=si().memoizedState;return[e,t]},useMutableSource:k7,useSyncExternalStore:C7,useId:B7,unstable_isNewReconciler:!1},Zne={readContext:ai,useCallback:F7,useContext:ai,useEffect:O4,useImperativeHandle:N7,useInsertionEffect:A7,useLayoutEffect:O7,useMemo:L7,useReducer:sP,useRef:$7,useState:function(){return sP(Rg)},useDebugValue:z4,useDeferredValue:function(e){var t=si();return Er===null?t.memoizedState=e:M7(t,Er.memoizedState,e)},useTransition:function(){var e=sP(Rg)[0],t=si().memoizedState;return[e,t]},useMutableSource:k7,useSyncExternalStore:C7,useId:B7,unstable_isNewReconciler:!1};function Ui(e,t){if(e&&e.defaultProps){t=lr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function UP(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:lr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var M_={isMounted:function(e){return(e=e._reactInternals)?Rd(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Bo(),o=jl(e),i=ks(n,o);i.payload=t,r!=null&&(i.callback=r),t=Ml(e,i,o),t!==null&&(Zi(t,e,o,n),t_(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Bo(),o=jl(e),i=ks(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Ml(e,i,o),t!==null&&(Zi(t,e,o,n),t_(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Bo(),n=jl(e),o=ks(r,n);o.tag=2,t!=null&&(o.callback=t),t=Ml(e,o,n),t!==null&&(Zi(t,e,n,r),t_(t,e,n))}};function tB(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!Ig(r,n)||!Ig(o,i):!0}function H7(e,t,r){var n=!1,o=Hl,i=t.contextType;return typeof i=="object"&&i!==null?i=ai(i):(o=vn(t)?wd:Po.current,n=t.contextTypes,i=(n=n!=null)?Hf(e,o):Hl),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=M_,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function rB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&M_.enqueueReplaceState(t,t.state,null)}function VP(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},P4(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ai(i):(i=vn(t)?wd:Po.current,o.context=Hf(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(UP(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&M_.enqueueReplaceState(o,o.state,null),w_(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function qf(e,t){try{var r="",n=t;do r+=Ioe(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function lP(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function HP(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Gne=typeof WeakMap=="function"?WeakMap:Map;function W7(e,t,r){r=ks(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){D_||(D_=!0,e4=n),HP(e,t)},r}function Z7(e,t,r){r=ks(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){HP(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){HP(e,t),typeof n!="function"&&(Bl===null?Bl=new Set([this]):Bl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function oB(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Gne;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=sie.bind(null,e,t,r),t.then(e,e))}function nB(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function iB(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ks(-1,1),t.tag=2,Ml(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var qne=Es.ReactCurrentOwner,hn=!1;function Mo(e,t,r,n){t.child=e===null?_7(t,null,r,n):Zf(t,e.child,r,n)}function aB(e,t,r,n,o){r=r.render;var i=t.ref;return jf(t,o),n=$4(e,t,r,n,i,o),r=A4(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Rs(e,t,o)):(Qt&&r&&y4(t),t.flags|=1,Mo(e,t,n,o),t.child)}function sB(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!V4(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,G7(e,t,i,n,o)):(e=s_(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:Ig,r(a,n)&&e.ref===t.ref)return Rs(e,t,o)}return t.flags|=1,e=Ul(i,n),e.ref=t.ref,e.return=t,t.child=e}function G7(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(Ig(i,n)&&e.ref===t.ref)if(hn=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(hn=!0);else return t.lanes=e.lanes,Rs(e,t,o)}return WP(e,t,r,n,o)}function q7(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},zt(Nf,Fn),Fn|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,zt(Nf,Fn),Fn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,zt(Nf,Fn),Fn|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,zt(Nf,Fn),Fn|=n;return Mo(e,t,o,r),t.child}function K7(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function WP(e,t,r,n,o){var i=vn(r)?wd:Po.current;return i=Hf(t,i),jf(t,o),r=$4(e,t,r,n,i,o),n=A4(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Rs(e,t,o)):(Qt&&n&&y4(t),t.flags|=1,Mo(e,t,r,o),t.child)}function lB(e,t,r,n,o){if(vn(r)){var i=!0;x_(t)}else i=!1;if(jf(t,o),t.stateNode===null)n_(e,t),H7(t,r,n),VP(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=ai(c):(c=vn(r)?wd:Po.current,c=Hf(t,c));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==c)&&rB(t,a,n,c),El=!1;var f=t.memoizedState;a.state=f,w_(t,n,a,o),l=t.memoizedState,s!==n||f!==l||gn.current||El?(typeof d=="function"&&(UP(t,r,d,n),l=t.memoizedState),(s=El||tB(t,r,s,n,f,l,c))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,w7(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ui(t.type,s),a.props=c,u=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=ai(l):(l=vn(r)?wd:Po.current,l=Hf(t,l));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==u||f!==l)&&rB(t,a,n,l),El=!1,f=t.memoizedState,a.state=f,w_(t,n,a,o);var p=t.memoizedState;s!==u||f!==p||gn.current||El?(typeof m=="function"&&(UP(t,r,m,n),p=t.memoizedState),(c=El||tB(t,r,c,n,f,p,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return ZP(e,t,r,n,i,o)}function ZP(e,t,r,n,o,i){K7(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&GM(t,r,!1),Rs(e,t,i);n=t.stateNode,qne.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=Zf(t,e.child,null,i),t.child=Zf(t,null,s,i)):Mo(e,t,s,i),t.memoizedState=n.state,o&&GM(t,r,!0),t.child}function X7(e){var t=e.stateNode;t.pendingContext?ZM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ZM(e,t.context,!1),D4(e,t.containerInfo)}function cB(e,t,r,n,o){return Wf(),I4(o),t.flags|=256,Mo(e,t,r,n),t.child}var GP={dehydrated:null,treeContext:null,retryLane:0};function qP(e){return{baseLanes:e,cachePool:null,transitions:null}}function Q7(e,t,r){var n=t.pendingProps,o=ar.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),zt(ar,o&1),e===null)return BP(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=U_(a,n,0,null),e=Id(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=qP(r),t.memoizedState=GP,e):N4(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Kne(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Ul(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Ul(s,i):(i=Id(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?qP(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=GP,n}return i=e.child,e=i.sibling,n=Ul(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function N4(e,t){return t=U_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ky(e,t,r,n){return n!==null&&I4(n),Zf(t,e.child,null,r),e=N4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kne(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=lP(Error(ie(422))),Ky(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=U_({mode:"visible",children:n.children},o,0,null),i=Id(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&Zf(t,e.child,null,a),t.child.memoizedState=qP(a),t.memoizedState=GP,i);if((t.mode&1)===0)return Ky(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(ie(419)),n=lP(i,n,void 0),Ky(e,t,a,n)}if(s=(a&e.childLanes)!==0,hn||s){if(n=Zr,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Ds(e,o),Zi(n,e,o,-1))}return U4(),n=lP(Error(ie(421))),Ky(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=lie.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ln=Ll(o.nextSibling),Mn=t,Qt=!0,Hi=null,e!==null&&(ri[oi++]=ws,ri[oi++]=Ss,ri[oi++]=Sd,ws=e.id,Ss=e.overflow,Sd=t),t=N4(t,n.children),t.flags|=4096,t)}function dB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),jP(e.return,t,r)}function cP(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function Y7(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Mo(e,t,n.children,r),n=ar.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dB(e,r,t);else if(e.tag===19)dB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(zt(ar,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&S_(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),cP(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&S_(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}cP(t,!0,r,null,i);break;case"together":cP(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function n_(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Cd|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=Ul(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ul(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Xne(e,t,r){switch(t.tag){case 3:X7(t),Wf();break;case 5:S7(t);break;case 1:vn(t.type)&&x_(t);break;case 4:D4(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;zt(__,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(zt(ar,ar.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Q7(e,t,r):(zt(ar,ar.current&1),e=Rs(e,t,r),e!==null?e.sibling:null);zt(ar,ar.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Y7(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),zt(ar,ar.current),n)break;return null;case 22:case 23:return t.lanes=0,q7(e,t,r)}return Rs(e,t,r)}var J7,KP,e8,t8;J7=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};KP=function(){};e8=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,yd(wa.current);var i=null;switch(r){case"input":o=vP(e,o),n=vP(e,n),i=[];break;case"select":o=lr({},o,{value:void 0}),n=lr({},n,{value:void 0}),i=[];break;case"textarea":o=yP(e,o),n=yP(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=g_)}IP(r,n);var a;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(hg.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(s=o?.[c],n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(hg.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ht("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};t8=function(e,t,r,n){r!==n&&(t.flags|=4)};function Jh(e,t){if(!Qt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ko(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Qne(e,t,r){var n=t.pendingProps;switch(_4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ko(t),null;case 1:return vn(t.type)&&v_(),ko(t),null;case 3:return n=t.stateNode,Gf(),Wt(gn),Wt(Po),E4(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hi!==null&&(o4(Hi),Hi=null))),KP(e,t),ko(t),null;case 5:R4(t);var o=yd(Pg.current);if(r=t.type,e!==null&&t.stateNode!=null)e8(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return ko(t),null}if(e=yd(wa.current),Gy(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[_a]=t,n[kg]=i,e=(t.mode&1)!==0,r){case"dialog":Ht("cancel",n),Ht("close",n);break;case"iframe":case"object":case"embed":Ht("load",n);break;case"video":case"audio":for(o=0;o<ig.length;o++)Ht(ig[o],n);break;case"source":Ht("error",n);break;case"img":case"image":case"link":Ht("error",n),Ht("load",n);break;case"details":Ht("toggle",n);break;case"input":xM(n,i),Ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ht("invalid",n);break;case"textarea":yM(n,i),Ht("invalid",n)}IP(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&Zy(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&Zy(n.textContent,s,e),o=["children",""+s]):hg.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ht("scroll",n)}switch(r){case"input":Oy(n),bM(n,i,!0);break;case"textarea":Oy(n),_M(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=g_)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=RB(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[_a]=t,e[kg]=n,J7(e,t,!1,!1),t.stateNode=e;e:{switch(a=wP(r,n),r){case"dialog":Ht("cancel",e),Ht("close",e),o=n;break;case"iframe":case"object":case"embed":Ht("load",e),o=n;break;case"video":case"audio":for(o=0;o<ig.length;o++)Ht(ig[o],e);o=n;break;case"source":Ht("error",e),o=n;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),o=n;break;case"details":Ht("toggle",e),o=n;break;case"input":xM(e,n),o=vP(e,n),Ht("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=lr({},n,{value:void 0}),Ht("invalid",e);break;case"textarea":yM(e,n),o=yP(e,n),Ht("invalid",e);break;default:o=n}IP(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?$B(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&EB(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&gg(e,l):typeof l=="number"&&gg(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(hg.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ht("scroll",e):l!=null&&a4(e,i,l,a))}switch(r){case"input":Oy(e),bM(e,n,!1);break;case"textarea":Oy(e),_M(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Vl(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ff(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ff(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=g_)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ko(t),null;case 6:if(e&&t.stateNode!=null)t8(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=yd(Pg.current),yd(wa.current),Gy(t)){if(n=t.stateNode,r=t.memoizedProps,n[_a]=t,(i=n.nodeValue!==r)&&(e=Mn,e!==null))switch(e.tag){case 3:Zy(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Zy(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[_a]=t,t.stateNode=n}return ko(t),null;case 13:if(Wt(ar),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qt&&Ln!==null&&(t.mode&1)!==0&&(t.flags&128)===0)b7(),Wf(),t.flags|=98560,i=!1;else if(i=Gy(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[_a]=t}else Wf(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ko(t),i=!1}else Hi!==null&&(o4(Hi),Hi=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ar.current&1)!==0?Tr===0&&(Tr=3):U4())),t.updateQueue!==null&&(t.flags|=4),ko(t),null);case 4:return Gf(),KP(e,t),e===null&&wg(t.stateNode.containerInfo),ko(t),null;case 10:return k4(t.type._context),ko(t),null;case 17:return vn(t.type)&&v_(),ko(t),null;case 19:if(Wt(ar),i=t.memoizedState,i===null)return ko(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)Jh(i,!1);else{if(Tr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=S_(e),a!==null){for(t.flags|=128,Jh(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return zt(ar,ar.current&1|2),t.child}e=e.sibling}i.tail!==null&&_r()>Kf&&(t.flags|=128,n=!0,Jh(i,!1),t.lanes=4194304)}else{if(!n)if(e=S_(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Jh(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Qt)return ko(t),null}else 2*_r()-i.renderingStartTime>Kf&&r!==1073741824&&(t.flags|=128,n=!0,Jh(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_r(),t.sibling=null,r=ar.current,zt(ar,n?r&1|2:r&1),t):(ko(t),null);case 22:case 23:return j4(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Fn&1073741824)!==0&&(ko(t),t.subtreeFlags&6&&(t.flags|=8192)):ko(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function Yne(e,t){switch(_4(t),t.tag){case 1:return vn(t.type)&&v_(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gf(),Wt(gn),Wt(Po),E4(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return R4(t),null;case 13:if(Wt(ar),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));Wf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wt(ar),null;case 4:return Gf(),null;case 10:return k4(t.type._context),null;case 22:case 23:return j4(),null;case 24:return null;default:return null}}var Xy=!1,Co=!1,Jne=typeof WeakSet=="function"?WeakSet:Set,_e=null;function zf(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pr(e,t,n)}else r.current=null}function XP(e,t,r){try{r()}catch(n){pr(e,t,n)}}var uB=!1;function eie(e,t){if(AP=m_,e=a7(),b4(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==r||o!==0&&u.nodeType!==3||(s=a+o),u!==i||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===r&&++c===o&&(s=a),f===i&&++d===n&&(l=a),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(OP={focusedElem:e,selectionRange:r},m_=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var p=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ui(t.type,h),y);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(I){pr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return p=uB,uB=!1,p}function fg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&XP(t,r,i)}o=o.next}while(o!==n)}}function B_(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function QP(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function r8(e){var t=e.alternate;t!==null&&(e.alternate=null,r8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_a],delete t[kg],delete t[FP],delete t[Nne],delete t[Fne])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function o8(e){return e.tag===5||e.tag===3||e.tag===4}function fB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||o8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function YP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=g_));else if(n!==4&&(e=e.child,e!==null))for(YP(e,t,r),e=e.sibling;e!==null;)YP(e,t,r),e=e.sibling}function JP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(JP(e,t,r),e=e.sibling;e!==null;)JP(e,t,r),e=e.sibling}var ao=null,Vi=!1;function Dl(e,t,r){for(r=r.child;r!==null;)n8(e,t,r),r=r.sibling}function n8(e,t,r){if(Ia&&typeof Ia.onCommitFiberUnmount=="function")try{Ia.onCommitFiberUnmount($_,r)}catch{}switch(r.tag){case 5:Co||zf(r,t);case 6:var n=ao,o=Vi;ao=null,Dl(e,t,r),ao=n,Vi=o,ao!==null&&(Vi?(e=ao,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ao.removeChild(r.stateNode));break;case 18:ao!==null&&(Vi?(e=ao,r=r.stateNode,e.nodeType===8?rP(e.parentNode,r):e.nodeType===1&&rP(e,r),yg(e)):rP(ao,r.stateNode));break;case 4:n=ao,o=Vi,ao=r.stateNode.containerInfo,Vi=!0,Dl(e,t,r),ao=n,Vi=o;break;case 0:case 11:case 14:case 15:if(!Co&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&XP(r,t,a),o=o.next}while(o!==n)}Dl(e,t,r);break;case 1:if(!Co&&(zf(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){pr(r,t,s)}Dl(e,t,r);break;case 21:Dl(e,t,r);break;case 22:r.mode&1?(Co=(n=Co)||r.memoizedState!==null,Dl(e,t,r),Co=n):Dl(e,t,r);break;default:Dl(e,t,r)}}function mB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Jne),t.forEach(function(n){var o=cie.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function ji(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:ao=s.stateNode,Vi=!1;break e;case 3:ao=s.stateNode.containerInfo,Vi=!0;break e;case 4:ao=s.stateNode.containerInfo,Vi=!0;break e}s=s.return}if(ao===null)throw Error(ie(160));n8(i,a,o),ao=null,Vi=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){pr(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)i8(t,e),t=t.sibling}function i8(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ji(t,e),ba(e),n&4){try{fg(3,e,e.return),B_(3,e)}catch(h){pr(e,e.return,h)}try{fg(5,e,e.return)}catch(h){pr(e,e.return,h)}}break;case 1:ji(t,e),ba(e),n&512&&r!==null&&zf(r,r.return);break;case 5:if(ji(t,e),ba(e),n&512&&r!==null&&zf(r,r.return),e.flags&32){var o=e.stateNode;try{gg(o,"")}catch(h){pr(e,e.return,h)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&PB(o,i),wP(s,a);var c=wP(s,i);for(a=0;a<l.length;a+=2){var d=l[a],u=l[a+1];d==="style"?$B(o,u):d==="dangerouslySetInnerHTML"?EB(o,u):d==="children"?gg(o,u):a4(o,d,u,c)}switch(s){case"input":xP(o,i);break;case"textarea":DB(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Ff(o,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Ff(o,!!i.multiple,i.defaultValue,!0):Ff(o,!!i.multiple,i.multiple?[]:"",!1))}o[kg]=i}catch(h){pr(e,e.return,h)}}break;case 6:if(ji(t,e),ba(e),n&4){if(e.stateNode===null)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(h){pr(e,e.return,h)}}break;case 3:if(ji(t,e),ba(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{yg(t.containerInfo)}catch(h){pr(e,e.return,h)}break;case 4:ji(t,e),ba(e);break;case 13:ji(t,e),ba(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(M4=_r())),n&4&&mB(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Co=(c=Co)||d,ji(t,e),Co=c):ji(t,e),ba(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&(e.mode&1)!==0)for(_e=e,d=e.child;d!==null;){for(u=_e=d;_e!==null;){switch(f=_e,m=f.child,f.tag){case 0:case 11:case 14:case 15:fg(4,f,f.return);break;case 1:zf(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(h){pr(n,r,h)}}break;case 5:zf(f,f.return);break;case 22:if(f.memoizedState!==null){hB(u);continue}}m!==null?(m.return=f,_e=m):hB(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{o=u.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=TB("display",a))}catch(h){pr(e,e.return,h)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(h){pr(e,e.return,h)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:ji(t,e),ba(e),n&4&&mB(e);break;case 21:break;default:ji(t,e),ba(e)}}function ba(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(o8(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(gg(o,""),n.flags&=-33);var i=fB(e);JP(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=fB(e);YP(e,s,a);break;default:throw Error(ie(161))}}catch(l){pr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tie(e,t,r){_e=e,a8(e,t,r)}function a8(e,t,r){for(var n=(e.mode&1)!==0;_e!==null;){var o=_e,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||Xy;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Co;s=Xy;var c=Co;if(Xy=a,(Co=l)&&!c)for(_e=o;_e!==null;)a=_e,l=a.child,a.tag===22&&a.memoizedState!==null?gB(o):l!==null?(l.return=a,_e=l):gB(o);for(;i!==null;)_e=i,a8(i,t,r),i=i.sibling;_e=o,Xy=s,Co=c}pB(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,_e=i):pB(e,t,r)}}function pB(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Co||B_(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Co)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ui(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&YM(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}YM(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&yg(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}Co||t.flags&512&&QP(t)}catch(f){pr(t,t.return,f)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function hB(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function gB(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{B_(4,t)}catch(l){pr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){pr(t,o,l)}}var i=t.return;try{QP(t)}catch(l){pr(t,i,l)}break;case 5:var a=t.return;try{QP(t)}catch(l){pr(t,a,l)}}}catch(l){pr(t,t.return,l)}if(t===e){_e=null;break}var s=t.sibling;if(s!==null){s.return=t.return,_e=s;break}_e=t.return}}var rie=Math.ceil,P_=Es.ReactCurrentDispatcher,F4=Es.ReactCurrentOwner,ii=Es.ReactCurrentBatchConfig,ft=0,Zr=null,Pr=null,so=0,Fn=0,Nf=Zl(0),Tr=0,Tg=null,Cd=0,j_=0,L4=0,mg=null,pn=null,M4=0,Kf=1/0,_s=null,D_=!1,e4=null,Bl=null,Qy=!1,Ol=null,R_=0,pg=0,t4=null,i_=-1,a_=0;function Bo(){return(ft&6)!==0?_r():i_!==-1?i_:i_=_r()}function jl(e){return(e.mode&1)===0?1:(ft&2)!==0&&so!==0?so&-so:Mne.transition!==null?(a_===0&&(a_=HB()),a_):(e=St,e!==0||(e=window.event,e=e===void 0?16:QB(e.type)),e)}function Zi(e,t,r,n){if(50<pg)throw pg=0,t4=null,Error(ie(185));$g(e,r,n),((ft&2)===0||e!==Zr)&&(e===Zr&&((ft&2)===0&&(j_|=r),Tr===4&&$l(e,so)),xn(e,n),r===1&&ft===0&&(t.mode&1)===0&&(Kf=_r()+500,F_&&Gl()))}function xn(e,t){var r=e.callbackNode;joe(e,t);var n=f_(e,e===Zr?so:0);if(n===0)r!==null&&SM(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&SM(r),t===1)e.tag===0?Lne(vB.bind(null,e)):g7(vB.bind(null,e)),One(function(){(ft&6)===0&&Gl()}),r=null;else{switch(WB(n)){case 1:r=u4;break;case 4:r=UB;break;case 16:r=u_;break;case 536870912:r=VB;break;default:r=u_}r=p8(r,s8.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function s8(e,t){if(i_=-1,a_=0,(ft&6)!==0)throw Error(ie(327));var r=e.callbackNode;if(Uf()&&e.callbackNode!==r)return null;var n=f_(e,e===Zr?so:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=E_(e,n);else{t=n;var o=ft;ft|=2;var i=c8();(Zr!==e||so!==t)&&(_s=null,Kf=_r()+500,_d(e,t));do try{iie();break}catch(s){l8(e,s)}while(!0);S4(),P_.current=i,ft=o,Pr!==null?t=0:(Zr=null,so=0,t=Tr)}if(t!==0){if(t===2&&(o=DP(e),o!==0&&(n=o,t=r4(e,o))),t===1)throw r=Tg,_d(e,0),$l(e,n),xn(e,_r()),r;if(t===6)$l(e,n);else{if(o=e.current.alternate,(n&30)===0&&!oie(o)&&(t=E_(e,n),t===2&&(i=DP(e),i!==0&&(n=i,t=r4(e,i))),t===1))throw r=Tg,_d(e,0),$l(e,n),xn(e,_r()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:vd(e,pn,_s);break;case 3:if($l(e,n),(n&130023424)===n&&(t=M4+500-_r(),10<t)){if(f_(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Bo(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=NP(vd.bind(null,e,pn,_s),t);break}vd(e,pn,_s);break;case 4:if($l(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Wi(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=_r()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rie(n/1960))-n,10<n){e.timeoutHandle=NP(vd.bind(null,e,pn,_s),n);break}vd(e,pn,_s);break;case 5:vd(e,pn,_s);break;default:throw Error(ie(329))}}}return xn(e,_r()),e.callbackNode===r?s8.bind(null,e):null}function r4(e,t){var r=mg;return e.current.memoizedState.isDehydrated&&(_d(e,t).flags|=256),e=E_(e,t),e!==2&&(t=pn,pn=r,t!==null&&o4(t)),e}function o4(e){pn===null?pn=e:pn.push.apply(pn,e)}function oie(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Gi(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $l(e,t){for(t&=~L4,t&=~j_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Wi(t),n=1<<r;e[r]=-1,t&=~n}}function vB(e){if((ft&6)!==0)throw Error(ie(327));Uf();var t=f_(e,0);if((t&1)===0)return xn(e,_r()),null;var r=E_(e,t);if(e.tag!==0&&r===2){var n=DP(e);n!==0&&(t=n,r=r4(e,n))}if(r===1)throw r=Tg,_d(e,0),$l(e,t),xn(e,_r()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vd(e,pn,_s),xn(e,_r()),null}function B4(e,t){var r=ft;ft|=1;try{return e(t)}finally{ft=r,ft===0&&(Kf=_r()+500,F_&&Gl())}}function Pd(e){Ol!==null&&Ol.tag===0&&(ft&6)===0&&Uf();var t=ft;ft|=1;var r=ii.transition,n=St;try{if(ii.transition=null,St=1,e)return e()}finally{St=n,ii.transition=r,ft=t,(ft&6)===0&&Gl()}}function j4(){Fn=Nf.current,Wt(Nf)}function _d(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ane(r)),Pr!==null)for(r=Pr.return;r!==null;){var n=r;switch(_4(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&v_();break;case 3:Gf(),Wt(gn),Wt(Po),E4();break;case 5:R4(n);break;case 4:Gf();break;case 13:Wt(ar);break;case 19:Wt(ar);break;case 10:k4(n.type._context);break;case 22:case 23:j4()}r=r.return}if(Zr=e,Pr=e=Ul(e.current,null),so=Fn=t,Tr=0,Tg=null,L4=j_=Cd=0,pn=mg=null,bd!==null){for(t=0;t<bd.length;t++)if(r=bd[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}bd=null}return e}function l8(e,t){do{var r=Pr;try{if(S4(),r_.current=C_,k_){for(var n=sr.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}k_=!1}if(kd=0,Wr=Er=sr=null,ug=!1,Dg=0,F4.current=null,r===null||r.return===null){Tr=1,Tg=t,Pr=null;break}e:{var i=e,a=r.return,s=r,l=t;if(t=so,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=s,u=d.tag;if((d.mode&1)===0&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=nB(a);if(m!==null){m.flags&=-257,iB(m,a,s,i,t),m.mode&1&&oB(i,c,t),t=m,l=c;var p=t.updateQueue;if(p===null){var h=new Set;h.add(l),t.updateQueue=h}else p.add(l);break e}else{if((t&1)===0){oB(i,c,t),U4();break e}l=Error(ie(426))}}else if(Qt&&s.mode&1){var y=nB(a);if(y!==null){(y.flags&65536)===0&&(y.flags|=256),iB(y,a,s,i,t),I4(qf(l,s));break e}}i=l=qf(l,s),Tr!==4&&(Tr=2),mg===null?mg=[i]:mg.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=W7(i,l,t);QM(i,x);break e;case 1:s=l;var v=i.type,_=i.stateNode;if((i.flags&128)===0&&(typeof v.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Bl===null||!Bl.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var I=Z7(i,s,t);QM(i,I);break e}}i=i.return}while(i!==null)}u8(r)}catch(S){t=S,Pr===r&&r!==null&&(Pr=r=r.return);continue}break}while(!0)}function c8(){var e=P_.current;return P_.current=C_,e===null?C_:e}function U4(){(Tr===0||Tr===3||Tr===2)&&(Tr=4),Zr===null||(Cd&268435455)===0&&(j_&268435455)===0||$l(Zr,so)}function E_(e,t){var r=ft;ft|=2;var n=c8();(Zr!==e||so!==t)&&(_s=null,_d(e,t));do try{nie();break}catch(o){l8(e,o)}while(!0);if(S4(),ft=r,P_.current=n,Pr!==null)throw Error(ie(261));return Zr=null,so=0,Tr}function nie(){for(;Pr!==null;)d8(Pr)}function iie(){for(;Pr!==null&&!$oe();)d8(Pr)}function d8(e){var t=m8(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?u8(e):Pr=t,F4.current=null}function u8(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Qne(r,t,Fn),r!==null){Pr=r;return}}else{if(r=Yne(r,t),r!==null){r.flags&=32767,Pr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Tr=6,Pr=null;return}}if(t=t.sibling,t!==null){Pr=t;return}Pr=t=e}while(t!==null);Tr===0&&(Tr=5)}function vd(e,t,r){var n=St,o=ii.transition;try{ii.transition=null,St=1,aie(e,t,r,n)}finally{ii.transition=o,St=n}return null}function aie(e,t,r,n){do Uf();while(Ol!==null);if((ft&6)!==0)throw Error(ie(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Uoe(e,i),e===Zr&&(Pr=Zr=null,so=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Qy||(Qy=!0,p8(u_,function(){return Uf(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=ii.transition,ii.transition=null;var a=St;St=1;var s=ft;ft|=4,F4.current=null,eie(e,r),i8(r,e),Dne(OP),m_=!!AP,OP=AP=null,e.current=r,tie(r,e,o),Aoe(),ft=s,St=a,ii.transition=i}else e.current=r;if(Qy&&(Qy=!1,Ol=e,R_=o),i=e.pendingLanes,i===0&&(Bl=null),Noe(r.stateNode,n),xn(e,_r()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(D_)throw D_=!1,e=e4,e4=null,e;return(R_&1)!==0&&e.tag!==0&&Uf(),i=e.pendingLanes,(i&1)!==0?e===t4?pg++:(pg=0,t4=e):pg=0,Gl(),null}function Uf(){if(Ol!==null){var e=WB(R_),t=ii.transition,r=St;try{if(ii.transition=null,St=16>e?16:e,Ol===null)var n=!1;else{if(e=Ol,Ol=null,R_=0,(ft&6)!==0)throw Error(ie(331));var o=ft;for(ft|=4,_e=e.current;_e!==null;){var i=_e,a=i.child;if((_e.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(_e=c;_e!==null;){var d=_e;switch(d.tag){case 0:case 11:case 15:fg(8,d,i)}var u=d.child;if(u!==null)u.return=d,_e=u;else for(;_e!==null;){d=_e;var f=d.sibling,m=d.return;if(r8(d),d===c){_e=null;break}if(f!==null){f.return=m,_e=f;break}_e=m}}}var p=i.alternate;if(p!==null){var h=p.child;if(h!==null){p.child=null;do{var y=h.sibling;h.sibling=null,h=y}while(h!==null)}}_e=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,_e=a;else e:for(;_e!==null;){if(i=_e,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:fg(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,_e=x;break e}_e=i.return}}var v=e.current;for(_e=v;_e!==null;){a=_e;var _=a.child;if((a.subtreeFlags&2064)!==0&&_!==null)_.return=a,_e=_;else e:for(a=v;_e!==null;){if(s=_e,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:B_(9,s)}}catch(S){pr(s,s.return,S)}if(s===a){_e=null;break e}var I=s.sibling;if(I!==null){I.return=s.return,_e=I;break e}_e=s.return}}if(ft=o,Gl(),Ia&&typeof Ia.onPostCommitFiberRoot=="function")try{Ia.onPostCommitFiberRoot($_,e)}catch{}n=!0}return n}finally{St=r,ii.transition=t}}return!1}function xB(e,t,r){t=qf(r,t),t=W7(e,t,1),e=Ml(e,t,1),t=Bo(),e!==null&&($g(e,1,t),xn(e,t))}function pr(e,t,r){if(e.tag===3)xB(e,e,r);else for(;t!==null;){if(t.tag===3){xB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Bl===null||!Bl.has(n))){e=qf(r,e),e=Z7(t,e,1),t=Ml(t,e,1),e=Bo(),t!==null&&($g(t,1,e),xn(t,e));break}}t=t.return}}function sie(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Bo(),e.pingedLanes|=e.suspendedLanes&r,Zr===e&&(so&r)===r&&(Tr===4||Tr===3&&(so&130023424)===so&&500>_r()-M4?_d(e,0):L4|=r),xn(e,t)}function f8(e,t){t===0&&((e.mode&1)===0?t=1:(t=Fy,Fy<<=1,(Fy&130023424)===0&&(Fy=4194304)));var r=Bo();e=Ds(e,t),e!==null&&($g(e,t,r),xn(e,r))}function lie(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),f8(e,r)}function cie(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),f8(e,r)}var m8;m8=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)hn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return hn=!1,Xne(e,t,r);hn=(e.flags&131072)!==0}else hn=!1,Qt&&(t.flags&1048576)!==0&&v7(t,y_,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;n_(e,t),e=t.pendingProps;var o=Hf(t,Po.current);jf(t,r),o=$4(null,t,n,e,o,r);var i=A4();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vn(n)?(i=!0,x_(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,P4(t),o.updater=M_,t.stateNode=o,o._reactInternals=t,VP(t,n,e,r),t=ZP(null,t,n,!0,i,r)):(t.tag=0,Qt&&i&&y4(t),Mo(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(n_(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=uie(n),e=Ui(n,e),o){case 0:t=WP(null,t,n,e,r);break e;case 1:t=lB(null,t,n,e,r);break e;case 11:t=aB(null,t,n,e,r);break e;case 14:t=sB(null,t,n,Ui(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),WP(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),lB(e,t,n,o,r);case 3:e:{if(X7(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,o=i.element,w7(e,t),w_(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=qf(Error(ie(423)),t),t=cB(e,t,n,r,o);break e}else if(n!==o){o=qf(Error(ie(424)),t),t=cB(e,t,n,r,o);break e}else for(Ln=Ll(t.stateNode.containerInfo.firstChild),Mn=t,Qt=!0,Hi=null,r=_7(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wf(),n===o){t=Rs(e,t,r);break e}Mo(e,t,n,r)}t=t.child}return t;case 5:return S7(t),e===null&&BP(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,zP(n,o)?a=null:i!==null&&zP(n,i)&&(t.flags|=32),K7(e,t),Mo(e,t,a,r),t.child;case 6:return e===null&&BP(t),null;case 13:return Q7(e,t,r);case 4:return D4(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Zf(t,null,n,r):Mo(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),aB(e,t,n,o,r);case 7:return Mo(e,t,t.pendingProps,r),t.child;case 8:return Mo(e,t,t.pendingProps.children,r),t.child;case 12:return Mo(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,zt(__,n._currentValue),n._currentValue=a,i!==null)if(Gi(i.value,a)){if(i.children===o.children&&!gn.current){t=Rs(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ks(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),jP(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ie(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),jP(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Mo(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,jf(t,r),o=ai(o),n=n(o),t.flags|=1,Mo(e,t,n,r),t.child;case 14:return n=t.type,o=Ui(n,t.pendingProps),o=Ui(n.type,o),sB(e,t,n,o,r);case 15:return G7(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),n_(e,t),t.tag=1,vn(n)?(e=!0,x_(t)):e=!1,jf(t,r),H7(t,n,o),VP(t,n,o,r),ZP(null,t,n,!0,e,r);case 19:return Y7(e,t,r);case 22:return q7(e,t,r)}throw Error(ie(156,t.tag))};function p8(e,t){return jB(e,t)}function die(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(e,t,r,n){return new die(e,t,r,n)}function V4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uie(e){if(typeof e=="function")return V4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l4)return 11;if(e===c4)return 14}return 2}function Ul(e,t){var r=e.alternate;return r===null?(r=ni(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function s_(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")V4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Cf:return Id(r.children,o,i,t);case s4:a=8,o|=8;break;case mP:return e=ni(12,r,t,o|2),e.elementType=mP,e.lanes=i,e;case pP:return e=ni(13,r,t,o),e.elementType=pP,e.lanes=i,e;case hP:return e=ni(19,r,t,o),e.elementType=hP,e.lanes=i,e;case SB:return U_(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case IB:a=10;break e;case wB:a=9;break e;case l4:a=11;break e;case c4:a=14;break e;case Rl:a=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=ni(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Id(e,t,r,n){return e=ni(7,e,n,t),e.lanes=r,e}function U_(e,t,r,n){return e=ni(22,e,n,t),e.elementType=SB,e.lanes=r,e.stateNode={isHidden:!1},e}function dP(e,t,r){return e=ni(6,e,null,t),e.lanes=r,e}function uP(e,t,r){return t=ni(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fie(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=q2(0),this.expirationTimes=q2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=q2(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function H4(e,t,r,n,o,i,a,s,l){return e=new fie(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ni(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},P4(i),e}function mie(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:kf,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function h8(e){if(!e)return Hl;e=e._reactInternals;e:{if(Rd(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(vn(r))return h7(e,r,t)}return t}function g8(e,t,r,n,o,i,a,s,l){return e=H4(r,n,!0,e,o,i,a,s,l),e.context=h8(null),r=e.current,n=Bo(),o=jl(r),i=ks(n,o),i.callback=t??null,Ml(r,i,o),e.current.lanes=o,$g(e,o,n),xn(e,n),e}function V_(e,t,r,n){var o=t.current,i=Bo(),a=jl(o);return r=h8(r),t.context===null?t.context=r:t.pendingContext=r,t=ks(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ml(o,t,a),e!==null&&(Zi(e,o,a,i),t_(e,o,a)),a}function T_(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function bB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function W4(e,t){bB(e,t),(e=e.alternate)&&bB(e,t)}function pie(){return null}var v8=typeof reportError=="function"?reportError:function(e){console.error(e)};function Z4(e){this._internalRoot=e}H_.prototype.render=Z4.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));V_(e,t,null,null)};H_.prototype.unmount=Z4.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pd(function(){V_(null,e,null,null)}),t[Ps]=null}};function H_(e){this._internalRoot=e}H_.prototype.unstable_scheduleHydration=function(e){if(e){var t=qB();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Tl.length&&t!==0&&t<Tl[r].priority;r++);Tl.splice(r,0,e),r===0&&XB(e)}};function G4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function W_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yB(){}function hie(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=T_(a);i.call(c)}}var a=g8(t,n,e,0,null,!1,!1,"",yB);return e._reactRootContainer=a,e[Ps]=a.current,wg(e.nodeType===8?e.parentNode:e),Pd(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var c=T_(l);s.call(c)}}var l=H4(e,0,!1,null,null,!1,!1,"",yB);return e._reactRootContainer=l,e[Ps]=l.current,wg(e.nodeType===8?e.parentNode:e),Pd(function(){V_(t,l,r,n)}),l}function Z_(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=T_(a);s.call(l)}}V_(t,a,e,o)}else a=hie(r,t,e,o,n);return T_(a)}ZB=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ng(t.pendingLanes);r!==0&&(f4(t,r|1),xn(t,_r()),(ft&6)===0&&(Kf=_r()+500,Gl()))}break;case 13:Pd(function(){var n=Ds(e,1);if(n!==null){var o=Bo();Zi(n,e,1,o)}}),W4(e,1)}};m4=function(e){if(e.tag===13){var t=Ds(e,134217728);if(t!==null){var r=Bo();Zi(t,e,134217728,r)}W4(e,134217728)}};GB=function(e){if(e.tag===13){var t=jl(e),r=Ds(e,t);if(r!==null){var n=Bo();Zi(r,e,t,n)}W4(e,t)}};qB=function(){return St};KB=function(e,t){var r=St;try{return St=e,t()}finally{St=r}};kP=function(e,t,r){switch(t){case"input":if(xP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=N_(n);if(!o)throw Error(ie(90));CB(n),xP(n,o)}}}break;case"textarea":DB(e,r);break;case"select":t=r.value,t!=null&&Ff(e,!!r.multiple,t,!1)}};zB=B4;NB=Pd;var gie={usingClientEntryPoint:!1,Events:[Og,Ef,N_,AB,OB,B4]},eg={findFiberByHostInstance:xd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vie={bundleType:eg.bundleType,version:eg.version,rendererPackageName:eg.rendererPackageName,rendererConfig:eg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Es.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=MB(e),e===null?null:e.stateNode},findFiberByHostInstance:eg.findFiberByHostInstance||pie,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(tg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!tg.isDisabled&&tg.supportsFiber))try{$_=tg.inject(vie),Ia=tg}catch{}var tg;Un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gie;Un.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!G4(t))throw Error(ie(200));return mie(e,t,null,r)};Un.createRoot=function(e,t){if(!G4(e))throw Error(ie(299));var r=!1,n="",o=v8;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=H4(e,1,!1,null,null,r,!1,n,o),e[Ps]=t.current,wg(e.nodeType===8?e.parentNode:e),new Z4(t)};Un.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=MB(t),e=e===null?null:e.stateNode,e};Un.flushSync=function(e){return Pd(e)};Un.hydrate=function(e,t,r){if(!W_(t))throw Error(ie(200));return Z_(null,e,t,!0,r)};Un.hydrateRoot=function(e,t,r){if(!G4(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=v8;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=g8(t,null,e,1,r??null,o,!1,i,a),e[Ps]=t.current,wg(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new H_(t)};Un.render=function(e,t,r){if(!W_(t))throw Error(ie(200));return Z_(null,e,t,!1,r)};Un.unmountComponentAtNode=function(e){if(!W_(e))throw Error(ie(40));return e._reactRootContainer?(Pd(function(){Z_(null,null,e,!1,function(){e._reactRootContainer=null,e[Ps]=null})}),!0):!1};Un.unstable_batchedUpdates=B4;Un.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!W_(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return Z_(e,t,r,!1,n)};Un.version="18.3.1-next-f1338f8080-20240426"});var ql=fa((KDe,y8)=>{"use strict";function b8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b8)}catch(e){console.error(e)}}b8(),y8.exports=x8()});var uZ=fa(qR=>{"use strict";var dZ=ql();qR.createRoot=dZ.createRoot,qR.hydrateRoot=dZ.hydrateRoot;var nlt});var Nee=fa((D_t,zee)=>{"use strict";zee.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var mn=function(){return mn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},mn.apply(this,arguments)};function Xb(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function zN(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ny=b(R());var bo=b(R());var Jc="right-scroll-bar-position",ed="width-before-scroll-bar",ZC="with-scroll-bars-hidden",GC="--removed-body-scroll-bar-size";function ey(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var KN=b(R());function XN(e,t){var r=(0,KN.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ty=b(R());var Jte=typeof window<"u"?ty.useLayoutEffect:ty.useEffect,QN=new WeakMap;function qC(e,t){var r=XN(t||null,function(n){return e.forEach(function(o){return ey(o,n)})});return Jte(function(){var n=QN.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||ey(s,null)}),i.forEach(function(s){o.has(s)||ey(s,a)})}QN.set(r,e)},[e]),r}function ere(e){return e}function tre(e,t){t===void 0&&(t=ere);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function KC(e){e===void 0&&(e={});var t=tre(null);return t.options=mn({async:!0,ssr:!1},e),t}var YN=b(R()),JN=function(e){var t=e.sideCar,r=Xb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return YN.createElement(n,mn({},r))};JN.isSideCarExport=!0;function XC(e,t){return e.useMedium(t),JN}var ry=KC();var QC=function(){},Ch=bo.forwardRef(function(e,t){var r=bo.useRef(null),n=bo.useState({onScrollCapture:QC,onWheelCapture:QC,onTouchMoveCapture:QC}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,h=e.inert,y=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,_=e.gapMode,I=Xb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,w=qC([r,t]),P=mn(mn({},I),o);return bo.createElement(bo.Fragment,null,d&&bo.createElement(S,{sideCar:ry,removeScrollBar:c,shards:u,noRelative:m,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:_}),a?bo.cloneElement(bo.Children.only(s),mn(mn({},P),{ref:w})):bo.createElement(v,mn({},P,{className:l,ref:w}),s))});Ch.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ch.classNames={fullWidth:ed,zeroRight:Jc};var Ut=b(R());var lf=b(R());var rF=b(R());var eF;var tF=function(){if(eF)return eF;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rre(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tF();return t&&e.setAttribute("nonce",t),e}function ore(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nre(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var YC=function(){var e=0,t=null;return{add:function(r){e==0&&(t=rre())&&(ore(t,r),nre(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var JC=function(){var e=YC();return function(t,r){rF.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Ph=function(){var e=JC(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var ire={left:0,top:0,right:0,gap:0},e2=function(e){return parseInt(e||"",10)||0},are=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[e2(r),e2(n),e2(o)]},t2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ire;var t=are(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var sre=Ph(),sf="data-scroll-locked",lre=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
9
|
+
.`.concat(ZC,` {
|
|
10
|
+
overflow: hidden `).concat(n,`;
|
|
11
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
12
|
+
}
|
|
13
|
+
body[`).concat(sf,`] {
|
|
14
|
+
overflow: hidden `).concat(n,`;
|
|
15
|
+
overscroll-behavior: contain;
|
|
16
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
17
|
+
padding-left: `.concat(o,`px;
|
|
18
|
+
padding-top: `).concat(i,`px;
|
|
19
|
+
padding-right: `).concat(a,`px;
|
|
20
|
+
margin-left:0;
|
|
21
|
+
margin-top:0;
|
|
22
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
23
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(Jc,` {
|
|
27
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(ed,` {
|
|
31
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(Jc," .").concat(Jc,` {
|
|
35
|
+
right: 0 `).concat(n,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.`).concat(ed," .").concat(ed,` {
|
|
39
|
+
margin-right: 0 `).concat(n,`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body[`).concat(sf,`] {
|
|
43
|
+
`).concat(GC,": ").concat(s,`px;
|
|
44
|
+
}
|
|
45
|
+
`)},oF=function(){var e=parseInt(document.body.getAttribute(sf)||"0",10);return isFinite(e)?e:0},cre=function(){lf.useEffect(function(){return document.body.setAttribute(sf,(oF()+1).toString()),function(){var e=oF()-1;e<=0?document.body.removeAttribute(sf):document.body.setAttribute(sf,e.toString())}},[])},r2=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;cre();var i=lf.useMemo(function(){return t2(o)},[o]);return lf.createElement(sre,{styles:lre(i,!t,o,r?"":"!important")})};var o2=!1;if(typeof window<"u")try{Dh=Object.defineProperty({},"passive",{get:function(){return o2=!0,!0}}),window.addEventListener("test",Dh,Dh),window.removeEventListener("test",Dh,Dh)}catch{o2=!1}var Dh,td=o2?{passive:!1}:!1;var dre=function(e){return e.tagName==="TEXTAREA"},nF=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!dre(e)&&r[t]==="visible")},ure=function(e){return nF(e,"overflowY")},fre=function(e){return nF(e,"overflowX")},n2=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=iF(e,n);if(o){var i=aF(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},mre=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},pre=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},iF=function(e,t){return e==="v"?ure(t):fre(t)},aF=function(e,t){return e==="v"?mre(t):pre(t)},hre=function(e,t){return e==="h"&&t==="rtl"?-1:1},sF=function(e,t,r,n,o){var i=hre(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,f=0;do{if(!s)break;var m=aF(e,s),p=m[0],h=m[1],y=m[2],x=h-y-i*p;(p||x)&&iF(e,s)&&(u+=x,f+=p);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(f)<1||!o&&-a>f))&&(c=!0),c};var oy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lF=function(e){return[e.deltaX,e.deltaY]},cF=function(e){return e&&"current"in e?e.current:e},gre=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vre=function(e){return`
|
|
46
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
47
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
48
|
+
`)},xre=0,cf=[];function dF(e){var t=Ut.useRef([]),r=Ut.useRef([0,0]),n=Ut.useRef(),o=Ut.useState(xre++)[0],i=Ut.useState(Ph)[0],a=Ut.useRef(e);Ut.useEffect(function(){a.current=e},[e]),Ut.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=zN([e.lockRef.current],(e.shards||[]).map(cF),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Ut.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var x=oy(h),v=r.current,_="deltaX"in h?h.deltaX:v[0]-x[0],I="deltaY"in h?h.deltaY:v[1]-x[1],S,w=h.target,P=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in h&&P==="h"&&w.type==="range")return!1;var E=window.getSelection(),B=E&&E.anchorNode,H=B?B===w||B.contains(w):!1;if(H)return!1;var Z=n2(P,w);if(!Z)return!0;if(Z?S=P:(S=P==="v"?"h":"v",Z=n2(P,w)),!Z)return!1;if(!n.current&&"changedTouches"in h&&(_||I)&&(n.current=S),!S)return!0;var q=n.current||S;return sF(q,y,h,q==="h"?_:I,!0)},[]),l=Ut.useCallback(function(h){var y=h;if(!(!cf.length||cf[cf.length-1]!==i)){var x="deltaY"in y?lF(y):oy(y),v=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&gre(S.delta,x)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var _=(a.current.shards||[]).map(cF).filter(Boolean).filter(function(S){return S.contains(y.target)}),I=_.length>0?s(y,_[0]):!a.current.noIsolation;I&&y.cancelable&&y.preventDefault()}}},[]),c=Ut.useCallback(function(h,y,x,v){var _={name:h,delta:y,target:x,should:v,shadowParent:bre(x)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),d=Ut.useCallback(function(h){r.current=oy(h),n.current=void 0},[]),u=Ut.useCallback(function(h){c(h.type,lF(h),h.target,s(h,e.lockRef.current))},[]),f=Ut.useCallback(function(h){c(h.type,oy(h),h.target,s(h,e.lockRef.current))},[]);Ut.useEffect(function(){return cf.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,td),document.addEventListener("touchmove",l,td),document.addEventListener("touchstart",d,td),function(){cf=cf.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,td),document.removeEventListener("touchmove",l,td),document.removeEventListener("touchstart",d,td)}},[]);var m=e.removeScrollBar,p=e.inert;return Ut.createElement(Ut.Fragment,null,p?Ut.createElement(i,{styles:vre(o)}):null,m?Ut.createElement(r2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bre(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var uF=XC(ry,dF);var fF=ny.forwardRef(function(e,t){return ny.createElement(Ch,mn({},e,{ref:t,sideCar:uF}))});fF.classNames=Ch.classNames;var Ni=fF;function ut(e){return Object.keys(e)}function i2(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Rh(e,t){let r={...e},n=t;return i2(e)&&i2(t)&&Object.keys(t).forEach(o=>{i2(n[o])&&o in e?r[o]=Rh(r[o],n[o]):r[o]=n[o]}),r}function mF(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function yre(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function _l(e){let t=yre(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function a2(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function pF(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){let o=`${n/16}${e}`;return t?a2(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(i=>r(i)).join(",");if(n.includes(" "))return n.split(" ").map(i=>r(i)).join(" ");if(n.includes(e))return t?a2(n):n;let o=n.replace("px","");if(!Number.isNaN(Number(o))){let i=`${Number(o)/16}${e}`;return t?a2(i):i}}return n}return r}var W=pF("rem",{shouldScale:!0}),rd=pF("em");function gs(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function iy(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(n=>t.test(n))}return!1}var hF=b(R(),1);function yo(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==hF.Fragment:!1}var bF=b(O(),1),sy=b(R(),1);function Vt(e){let t=(0,sy.createContext)(null);return[({children:o,value:i})=>(0,bF.jsx)(t.Provider,{value:i,children:o}),()=>{let o=(0,sy.useContext)(t);if(o===null)throw new Error(e);return o}]}var yF=b(O(),1),ly=b(R(),1);function _o(e=null){let t=(0,ly.createContext)(e);return[({children:o,value:i})=>(0,yF.jsx)(t.Provider,{value:i,children:o}),()=>(0,ly.useContext)(t)]}function df(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function Pre(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function Dre(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function Rre(e,t,r){return df(e,r)===df(t,r)}function _F({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:i="rtl",orientation:a}){return s=>{r?.(s);let l=Array.from(df(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(p=>Rre(s.currentTarget,p,e)),c=l.findIndex(p=>s.currentTarget===p),d=Dre(c,l,n),u=Pre(c,l,n),f=i==="rtl"?u:d,m=i==="rtl"?d:u;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[f].focus(),o&&l[f].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[m].focus(),o&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[u].focus(),o&&l[u].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[d].focus(),o&&l[d].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();let p=l.length-1;!l[p].disabled&&l[p].focus();break}}}}var Ere={app:100,modal:200,popover:300,overlay:400,max:9999};function Pt(e){return Ere[e]}var od=()=>{};function IF(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||od:r=>{r.key==="Escape"&&(e(r),t.onTrigger?.())}}function xe(e,t="size",r=!0){if(e!==void 0)return iy(e)?r?W(e):e:`var(--${t}-${e})`}function Tt(e){return xe(e,"mantine-spacing")}function Ee(e){return e===void 0?"var(--mantine-radius-default)":xe(e,"mantine-radius")}function wt(e){return xe(e,"mantine-font-size")}function wF(e){return xe(e,"mantine-line-height",!1)}function uf(e){if(e)return xe(e,"mantine-shadow",!1)}function zn(e,t){return r=>{e?.(r),t?.(r)}}function ff(e,t){return e in t?_l(t[e]):_l(e)}function Eh(e,t){let r=e.map(n=>({value:n,px:ff(n,t)}));return r.sort((n,o)=>n.px-o.px),r}function nd(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function SF(e,t,r){return r?Array.from(df(r,t)?.querySelectorAll(e)||[]).findIndex(n=>n===r):null}var kF=b(R(),1);function CF(){let[e,t]=(0,kF.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function Il(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function Io(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function PF(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=Object.keys(e),{length:n}=r;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1){let i=r[o];if(!(i in t)||e[i]!==t[i]&&!(Number.isNaN(e[i])&&Number.isNaN(t[i])))return!1}return!0}var mf=b(R(),1);function Fi(e){let t=(0,mf.useRef)(e);return(0,mf.useEffect)(()=>{t.current=e}),(0,mf.useMemo)(()=>(...r)=>t.current?.(...r),[])}var id=b(R(),1);function vs(e,t){let r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=Fi(e),i=(0,id.useRef)(0),a=(0,id.useRef)(()=>{}),s=Object.assign((0,id.useCallback)((...l)=>{window.clearTimeout(i.current);let c=()=>{i.current!==0&&(i.current=0,o(...l))};a.current=c,s.flush=c,i.current=window.setTimeout(c,r)},[o,r]),{flush:a.current});return(0,id.useEffect)(()=>()=>{window.clearTimeout(i.current),n&&s.flush()},[s,n]),s}var cy=b(R(),1),DF=["mousedown","touchstart"];function s2(e,t,r){let n=(0,cy.useRef)(null);return(0,cy.useEffect)(()=>{let o=i=>{let{target:a}=i??{};if(Array.isArray(r)){let s=a?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||DF).forEach(i=>document.addEventListener(i,o)),()=>{(t||DF).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}var pf=b(R(),1);function Tre(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function $re(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function ad(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,o]=(0,pf.useState)(r?t:$re(e)),i=(0,pf.useRef)(null);return(0,pf.useEffect)(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Tre(i.current,a=>o(a.matches))},[e]),n}function Th(e,t){return ad("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}var dy=b(R(),1),Lo=typeof document<"u"?dy.useLayoutEffect:dy.useEffect;var RF=b(R(),1);var $h=b(R(),1);function br(e,t){let r=(0,$h.useRef)(!1);(0,$h.useEffect)(()=>()=>{r.current=!1},[]),(0,$h.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}function Ah({opened:e,shouldReturnFocus:t=!0}){let r=(0,RF.useRef)(null),n=()=>{r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&r.current?.focus({preventScroll:!0})};return br(()=>{let o=-1,i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}var hf=b(R(),1);var Are=/input|select|textarea|button|object/,l2="a, input, select, textarea, button, object, [tabindex]";function Ore(e){return e.style.display==="none"}function zre(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Ore(r))return!1;r=r.parentNode}return!0}function EF(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function uy(e){let t=e.nodeName.toLowerCase(),r=!Number.isNaN(EF(e));return(Are.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&zre(e)}function c2(e){let t=EF(e);return(Number.isNaN(t)||t>=0)&&uy(e)}function TF(e){return Array.from(e.querySelectorAll(l2)).filter(c2)}function $F(e,t){let r=TF(e);if(!r.length){t.preventDefault();return}let n=r[t.shiftKey?0:r.length-1],o=e.getRootNode(),i=n===o.activeElement||e===o.activeElement,a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(i=r.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===a.getAttribute("name")).includes(n)),!i)return;t.preventDefault();let l=r[t.shiftKey?r.length-1:0];l&&l.focus()}function d2(e=!0){let t=(0,hf.useRef)(null),r=o=>{let i=o.querySelector("[data-autofocus]");if(!i){let a=Array.from(o.querySelectorAll(l2));i=a.find(c2)||a.find(uy)||null,!i&&uy(o)&&(i=o)}i&&i.focus({preventScroll:!0})},n=(0,hf.useCallback)(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)},[e]);return(0,hf.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));let o=i=>{i.key==="Tab"&&t.current&&$F(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}var AF=b(R(),1),Nre=e=>(e+1)%1e6;function u2(){let[,e]=(0,AF.useReducer)(Nre,0);return e}var NF=b(R(),1);var OF=b(R(),1),Fre=OF.default.useId||(()=>{});function zF(){let e=Fre();return e?`mantine-${e.replace(/:/g,"")}`:""}function pt(e){let t=zF(),[r,n]=(0,NF.useState)(t);return Lo(()=>{n(Io())},[]),typeof e=="string"?e:typeof window>"u"?t:r}var xs=b(R(),1);var FF=b(R(),1);function wl(e,t,r){(0,FF.useEffect)(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Lre(e,t="use-local-storage"){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function LF(e){try{return e&&JSON.parse(e)}catch{return e}}function MF(e){return{getItem:o=>{try{return window[e].getItem(o)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(o,i)=>{try{window[e].setItem(o,i)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:o=>{try{window[e].removeItem(o)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function BF(e,t){let r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage",{getItem:n,setItem:o,removeItem:i}=MF(e);return function({key:s,defaultValue:l,getInitialValueInEffect:c=!0,sync:d=!0,deserialize:u=LF,serialize:f=m=>Lre(m,t)}){let m=(0,xs.useCallback)(v=>{let _;try{_=typeof window>"u"||!(e in window)||window[e]===null||!!v}catch{_=!0}if(_)return l;let I=n(s);return I!==null?u(I):l},[s,l]),[p,h]=(0,xs.useState)(m(c)),y=(0,xs.useCallback)(v=>{v instanceof Function?h(_=>{let I=v(_);return o(s,f(I)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:v(_)}})),I}):(o(s,f(v)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:v}})),h(v))},[s]),x=(0,xs.useCallback)(()=>{i(s),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:l}}))},[]);return wl("storage",v=>{d&&v.storageArea===window[e]&&v.key===s&&h(u(v.newValue??void 0))}),wl(r,v=>{d&&v.detail.key===s&&h(v.detail.value)}),(0,xs.useEffect)(()=>{l!==void 0&&p===void 0&&y(l)},[l,p,y]),(0,xs.useEffect)(()=>{let v=m();v!==void 0&&y(v)},[s]),[p===void 0?l:p,y,x]}}function jF(e){let{getItem:t}=MF(e);return function({key:n,defaultValue:o,deserialize:i=LF}){let a;try{a=typeof window>"u"||!(e in window)||window[e]===null}catch{a=!0}if(a)return o;let s=t(n);return s!==null?i(s):o}}function f2(e){return BF("localStorage","use-local-storage")(e)}var Mre=jF("localStorage");var UF=b(R(),1);function sd(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function fy(...e){let t=new Map;return r=>{if(e.forEach(n=>{let o=sd(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{let o=t.get(n);o?o():sd(n,null)}),t.clear()}}}function Ve(...e){return(0,UF.useCallback)(fy(...e),e)}var VF=b(R(),1);function rt({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){let[o,i]=(0,VF.useState)(t!==void 0?t:r),a=(s,...l)=>{i(s),n?.(s,...l)};return e!==void 0?[e,n,!0]:[o,a,!1]}function bs(e,t){return ad("(prefers-reduced-motion: reduce)",e,t)}var Oh=b(R(),1);function Bre(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!PF(e[r],t[r]))return!1;return!0}function jre(e){let t=(0,Oh.useRef)([]),r=(0,Oh.useRef)(0);return Bre(t.current,e)||(t.current=e,r.current+=1),[r.current]}function m2(e,t){(0,Oh.useEffect)(e,jre(t))}var WF=b(R(),1);var Ure={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function my(e){let t=e.replace("Key","").toLowerCase();return Ure[e]||t}function Vre(e){let t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift"),plus:t.includes("[plus]")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return{...r,key:o==="[plus]"?"+":o}}function Hre(e,t,r){let{alt:n,ctrl:o,meta:i,mod:a,shift:s,key:l}=e,{altKey:c,ctrlKey:d,metaKey:u,shiftKey:f,key:m,code:p}=t;if(n!==c)return!1;if(a){if(!d&&!u)return!1}else if(o!==d||i!==u)return!1;return s!==f?!1:!!(l&&(r?my(p)===my(l):my(m??p)===my(l)))}function HF(e,t){return r=>Hre(Vre(e),r,t)}function Wre(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function zh(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){(0,WF.useEffect)(()=>{let n=o=>{e.forEach(([i,a,s={preventDefault:!0,usePhysicalKeys:!1}])=>{HF(i,s.usePhysicalKeys)(o)&&Wre(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}var Li=b(R(),1);function ZF(){let e=window.document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement}function Zre(){let e=window.document;return typeof e.exitFullscreen=="function"?e.exitFullscreen():typeof e.msExitFullscreen=="function"?e.msExitFullscreen():typeof e.webkitExitFullscreen=="function"?e.webkitExitFullscreen():typeof e.mozCancelFullScreen=="function"?e.mozCancelFullScreen():null}function Gre(e){let t=e;return t.requestFullscreen?.()||t.msRequestFullscreen?.()||t.webkitEnterFullscreen?.()||t.webkitRequestFullscreen?.()||t.mozRequestFullscreen?.()}var GF=["","webkit","moz","ms"];function qF(e,{onFullScreen:t,onError:r}){return GF.forEach(n=>{e.addEventListener(`${n}fullscreenchange`,t),e.addEventListener(`${n}fullscreenerror`,r)}),()=>{GF.forEach(n=>{e.removeEventListener(`${n}fullscreenchange`,t),e.removeEventListener(`${n}fullscreenerror`,r)})}}function p2(){let[e,t]=(0,Li.useState)(!1),r=(0,Li.useRef)(null),n=(0,Li.useCallback)(s=>{t(s.target===ZF())},[t]),o=(0,Li.useCallback)(s=>{t(!1),console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${s} (${s.target})`)},[t]),i=(0,Li.useCallback)(async()=>{ZF()?await Zre():await Gre(r.current)},[]),a=(0,Li.useCallback)(s=>{s===null?r.current=window.document.documentElement:r.current=s},[]);return(0,Li.useEffect)(()=>{if(!r.current&&window.document)return r.current=window.document.documentElement,qF(r.current,{onFullScreen:n,onError:o});if(r.current)return qF(r.current,{onFullScreen:n,onError:o})},[r.current]),{ref:a,toggle:i,fullscreen:e}}var gf=b(R(),1);function h2(e=!1,t){let{onOpen:r,onClose:n}=t||{},[o,i]=(0,gf.useState)(e),a=(0,gf.useCallback)(()=>{i(c=>c||(r?.(),!0))},[r]),s=(0,gf.useCallback)(()=>{i(c=>c&&(n?.(),!1))},[n]),l=(0,gf.useCallback)(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var ld=b(R(),1);function g2(e,t,r={autoInvoke:!1}){let n=(0,ld.useRef)(null),o=(0,ld.useCallback)((...a)=>{n.current||(n.current=window.setTimeout(()=>{e(a),n.current=null},t))},[t]),i=(0,ld.useCallback)(()=>{n.current&&(window.clearTimeout(n.current),n.current=null)},[]);return(0,ld.useEffect)(()=>(r.autoInvoke&&o(),i),[i,o]),{start:o,clear:i}}var py=b(R(),1);function v2(e){let t=(0,py.useRef)(void 0);return(0,py.useEffect)(()=>{t.current=e},[e]),t.current}var Nh=b(R(),1);function x2(e,t,r){let n=(0,Nh.useRef)(null),o=(0,Nh.useRef)(null);return(0,Nh.useEffect)(()=>{let i=typeof r=="function"?r():r;return(i||o.current)&&(n.current=new MutationObserver(e),n.current.observe(i||o.current,t)),()=>{n.current?.disconnect()}},[e,t]),o}var hy=b(R(),1);function b2(){let[e,t]=(0,hy.useState)(!1);return(0,hy.useEffect)(()=>t(!0),[]),e}function qre(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function y2(e){function t(n){let o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});Lo(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>qre(`${e}:${String(n)}`,o[0])}return[t,r]}function gy(){return typeof process<"u"&&process.env?"production":"development"}var _2=b(R(),1);function Sl(e){let t=_2.default.version;return typeof _2.default.version!="string"||t.startsWith("18.")?e?.ref:e?.props?.ref}function KF(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=KF(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Kre(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=KF(e))&&(n&&(n+=" "),n+=t);return n}var Ze=Kre;var Xre={};function Qre(e){let t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=Ze(t[n],o):t[n]=o})}),t}function Mi({theme:e,classNames:t,props:r,stylesCtx:n}){let i=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||Xre);return Qre(i)}function ma({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((i,a)=>typeof a=="function"?{...i,...a(e,r,n)}:{...i,...a},{})}var c4e=b(R(),1),d4e=b(O(),1);var vy=b(R(),1),vf=(0,vy.createContext)(null);function pa(){let e=(0,vy.useContext)(vf);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function XF(){return pa().cssVariablesResolver}function QF(){return pa().classNamesPrefix}function kl(){return pa().getStyleNonce}function YF(){return pa().withStaticClasses}function JF(){return pa().headless}function eL(){return pa().stylesTransform?.sx}function tL(){return pa().stylesTransform?.styles}function xy(){return pa().env||"default"}var L2e=b(R(),1),M2e=b(O(),1);var R2e=b(R(),1),E2e=b(O(),1);function Yre(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Jre(e){let t=e.replace("#","");if(t.length===3){let a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){let a=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a}}let r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function eoe(e){let[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o===void 0?1:o}}function toe(e){let t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};let n=parseInt(r[1],10),o=parseInt(r[2],10)/100,i=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,s=(1-Math.abs(2*i-1))*o,l=n/60,c=s*(1-Math.abs(l%2-1)),d=i-s/2,u,f,m;return l>=0&&l<1?(u=s,f=c,m=0):l>=1&&l<2?(u=c,f=s,m=0):l>=2&&l<3?(u=0,f=s,m=c):l>=3&&l<4?(u=0,f=c,m=s):l>=4&&l<5?(u=c,f=0,m=s):(u=s,f=0,m=c),{r:Math.round((u+d)*255),g:Math.round((f+d)*255),b:Math.round((m+d)*255),a:a||1}}function xf(e){return Yre(e)?Jre(e):e.startsWith("rgb")?eoe(e):e.startsWith("hsl")?toe(e):{r:0,g:0,b:0,a:1}}function Fh(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r,g:n,b:o,a:i}=xf(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function ys(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function I2(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function roe(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function ooe(e){if(e.startsWith("oklch("))return(roe(e)||0)/100;let{r:t,g:r,b:n}=xf(e),o=t/255,i=r/255,a=n/255,s=I2(o),l=I2(i),c=I2(a);return .2126*s+.7152*l+.0722*c}function bf(e,t=.179){return e.startsWith("var(")?!1:ooe(e)>t}function yr({color:e,theme:t,colorScheme:r}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:bf(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:bf(r==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:bf(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[n,o]=e.split("."),i=o?Number(o):void 0,a=n in t.colors;if(a){let s=i!==void 0?t.colors[n][i]:t.colors[n][ys(t,r||"light")];return{color:n,value:s,shade:i,isThemeColor:a,isLight:bf(s,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${i}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:bf(e,t.luminanceThreshold),shade:i,variable:void 0}}function He(e,t){let r=yr({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function Lh(e,t){let r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},n=He(r.from,t),o=He(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function Jn(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){let i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);let{r,g:n,b:o}=xf(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var cd=Jn;var rL=({color:e,theme:t,variant:r,gradient:n,autoContrast:o})=>{let i=yr({color:e,theme:t}),a=typeof o=="boolean"?o:t.autoContrast;if(r==="filled"){let s=a&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:s,border:`${W(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:s,border:`${W(1)} solid transparent`}:{background:e,hover:Fh(e,.1),color:s,border:`${W(1)} solid transparent`}}if(r==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:Jn(s,.1),hover:Jn(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}}return{background:Jn(e,.1),hover:Jn(e,.12),color:e,border:`${W(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${W(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Jn(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${W(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:Jn(e,.05),color:e,border:`${W(1)} solid ${e}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:"transparent",hover:Jn(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}}return{background:"transparent",hover:Jn(e,.12),color:e,border:`${W(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${W(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Fh(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${W(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fh(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${W(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Fh(t.white,.01),color:e,border:`${W(1)} solid transparent`}:r==="gradient"?{background:Lh(n,t),hover:Lh(n,t),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${W(1)} solid var(--mantine-color-default-border)`}:{}};var oL={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var nL="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Mh={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:oL,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:rL,autoContrast:!1,luminanceThreshold:.3,fontFamily:nL,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:nL,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:W(34),lineHeight:"1.3"},h2:{fontSize:W(26),lineHeight:"1.35"},h3:{fontSize:W(22),lineHeight:"1.4"},h4:{fontSize:W(18),lineHeight:"1.45"},h5:{fontSize:W(16),lineHeight:"1.5"},h6:{fontSize:W(14),lineHeight:"1.5"}}},fontSizes:{xs:W(12),sm:W(14),md:W(16),lg:W(18),xl:W(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:W(2),sm:W(4),md:W(8),lg:W(16),xl:W(32)},spacing:{xs:W(10),sm:W(12),md:W(16),lg:W(20),xl:W(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), 0 ${W(1)} ${W(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(10)} ${W(15)} ${W(-5)}, rgba(0, 0, 0, 0.04) 0 ${W(7)} ${W(7)} ${W(-5)}`,md:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(20)} ${W(25)} ${W(-5)}, rgba(0, 0, 0, 0.04) 0 ${W(10)} ${W(10)} ${W(-5)}`,lg:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(28)} ${W(23)} ${W(-7)}, rgba(0, 0, 0, 0.04) 0 ${W(12)} ${W(12)} ${W(-7)}`,xl:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(36)} ${W(28)} ${W(-7)}, rgba(0, 0, 0, 0.04) 0 ${W(17)} ${W(17)} ${W(-7)}`},other:{},components:{}};var Cl=b(O(),1);function w2(e){return e==="auto"||e==="dark"||e==="light"}function iL({key:e="mantine-color-scheme-value"}={}){let t;return{get:r=>{if(typeof window>"u")return r;try{let n=window.localStorage.getItem(e);return w2(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(e,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{t=n=>{n.storageArea===window.localStorage&&n.key===e&&w2(n.newValue)&&r(n.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}var uL=b(O(),1);var rPe=b(R(),1);var cL=b(O(),1),dd=b(R(),1);var G2e=b(R(),1),q2e=b(O(),1);var noe="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color",aL="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function S2(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function sL(e){if(!(e.primaryColor in e.colors))throw new Error(noe);if(typeof e.primaryShade=="object"&&(!S2(e.primaryShade.dark)||!S2(e.primaryShade.light)))throw new Error(aL);if(typeof e.primaryShade=="number"&&!S2(e.primaryShade))throw new Error(aL)}function lL(e,t){if(!t)return sL(e),e;let r=Rh(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),sL(r),r}var by=(0,dd.createContext)(null),dL=()=>(0,dd.useContext)(by)||Mh;function lt(){let e=(0,dd.useContext)(by);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function Bh({theme:e,children:t,inherit:r=!0}){let n=dL(),o=(0,dd.useMemo)(()=>lL(r?n:Mh,e),[e,n,r]);return(0,cL.jsx)(by.Provider,{value:o,children:t})}Bh.displayName="@mantine/core/MantineThemeProvider";function fL(){let e=lt(),t=kl(),r=ut(e.breakpoints).reduce((n,o)=>{let i=e.breakpoints[o].includes("px"),a=_l(e.breakpoints[o]),s=i?`${a-.1}px`:rd(a-.1),l=i?`${a}px`:rd(a);return`${n}@media (max-width: ${s}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return(0,uL.jsx)("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:r}})}var vL=b(O(),1);function yy(e){return Object.entries(e).map(([t,r])=>`${t}: ${r};`).join("")}function yf(e,t){return(Array.isArray(e)?e:[e]).reduce((n,o)=>`${o}{${n}}`,t)}function mL(e,t){let r=yy(e.variables),n=r?yf(t,r):"",o=yy(e.dark),i=yy(e.light),a=o?t===":host"?yf(`${t}([data-mantine-color-scheme="dark"])`,o):yf(`${t}[data-mantine-color-scheme="dark"]`,o):"",s=i?t===":host"?yf(`${t}([data-mantine-color-scheme="light"])`,i):yf(`${t}[data-mantine-color-scheme="light"]`,i):"";return`${n}${a}${s}`}var $Pe=b(R(),1),APe=b(O(),1);var SPe=b(R(),1),kPe=b(O(),1);function Nn({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&yr({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function k2(e,t){return Nn({color:e.colors[e.primaryColor][ys(e,t)],theme:e,autoContrast:null})}var hPe=b(R(),1),gPe=b(O(),1);function jh({theme:e,color:t,colorScheme:r,name:n=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(r==="light"){let s=ys(e,"light"),l={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-filled)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${s===9?8:s+1})`,[`--mantine-color-${n}-light`]:cd(e.colors[t][s],.1),[`--mantine-color-${n}-light-hover`]:cd(e.colors[t][s],.12),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline-hover`]:cd(e.colors[t][s],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...l}:l}let i=ys(e,"dark"),a={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-4)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${i})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${i===9?8:i+1})`,[`--mantine-color-${n}-light`]:cd(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${n}-light-hover`]:cd(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${Math.max(i-5,0)})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${Math.max(i-4,0)})`,[`--mantine-color-${n}-outline-hover`]:cd(e.colors[t][Math.max(i-4,0)],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...a}:a}var bPe=b(R(),1),yPe=b(O(),1);function pL(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function _f(e,t,r){ut(t).forEach(n=>Object.assign(e,{[`--mantine-${r}-${n}`]:t[n]}))}var _y=e=>{let t=ys(e,"light"),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:W(e.defaultRadius),n={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":k2(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":k2(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};_f(n.variables,e.breakpoints,"breakpoint"),_f(n.variables,e.spacing,"spacing"),_f(n.variables,e.fontSizes,"font-size"),_f(n.variables,e.lineHeights,"line-height"),_f(n.variables,e.shadows,"shadow"),_f(n.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,a)=>{n.variables[`--mantine-primary-color-${a}`]=`var(--mantine-color-${e.primaryColor}-${a})`}),ut(e.colors).forEach(i=>{let a=e.colors[i];if(pL(a)){Object.assign(n.light,jh({theme:e,name:a.name,color:a.light,colorScheme:"light",withColorValues:!0})),Object.assign(n.dark,jh({theme:e,name:a.name,color:a.dark,colorScheme:"dark",withColorValues:!0}));return}a.forEach((s,l)=>{n.variables[`--mantine-color-${i}-${l}`]=s}),Object.assign(n.light,jh({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(n.dark,jh({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});let o=e.headings.sizes;return ut(o).forEach(i=>{n.variables[`--mantine-${i}-font-size`]=o[i].fontSize,n.variables[`--mantine-${i}-line-height`]=o[i].lineHeight,n.variables[`--mantine-${i}-font-weight`]=o[i].fontWeight||e.headings.fontWeight}),n};function hL({theme:e,generator:t}){let r=_y(e),n=t?.(e);return n?Rh(r,n):r}var FPe=b(R(),1),LPe=b(O(),1);var C2=_y(Mh);function gL(e){let t={variables:{},light:{},dark:{}};return ut(e.variables).forEach(r=>{C2.variables[r]!==e.variables[r]&&(t.variables[r]=e.variables[r])}),ut(e.light).forEach(r=>{C2.light[r]!==e.light[r]&&(t.light[r]=e.light[r])}),ut(e.dark).forEach(r=>{C2.dark[r]!==e.dark[r]&&(t.dark[r]=e.dark[r])}),t}function ioe(e){return`
|
|
49
|
+
${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
|
|
50
|
+
${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
|
|
51
|
+
`}function P2({cssVariablesSelector:e,deduplicateCssVariables:t}){let r=lt(),n=kl(),o=XF(),i=hL({theme:r,generator:o}),a=e===":root"&&t,s=a?gL(i):i,l=mL(s,e);return l?(0,vL.jsx)("style",{"data-mantine-styles":!0,nonce:n?.(),dangerouslySetInnerHTML:{__html:`${l}${a?"":ioe(e)}`}}):null}P2.displayName="@mantine/CssVariables";var o4e=b(R(),1);function xL(){let e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}var ha=b(R(),1);function If(e,t){let r=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,n=e!=="auto"?e:r?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",n)}function bL({manager:e,defaultColorScheme:t,getRootElement:r,forceColorScheme:n}){let o=(0,ha.useRef)(null),[i,a]=(0,ha.useState)(()=>e.get(t)),s=n||i,l=(0,ha.useCallback)(d=>{n||(If(d,r),a(d),e.set(d))},[e.set,s,n]),c=(0,ha.useCallback)(()=>{a(t),If(t,r),e.clear()},[e.clear,t]);return(0,ha.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),Lo(()=>{If(e.get(t),r)},[]),(0,ha.useEffect)(()=>{if(n)return If(n,r),()=>{};n===void 0&&If(i,r),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));let d=u=>{i==="auto"&&If(u.matches?"dark":"light",r)};return o.current?.addEventListener("change",d),()=>o.current?.removeEventListener("change",d)},[i,n]),{colorScheme:s,setColorScheme:l,clearColorScheme:c}}function yL({respectReducedMotion:e,getRootElement:t}){Lo(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}xL();function Iy({theme:e,children:t,getStyleNonce:r,withStaticClasses:n=!0,withGlobalClasses:o=!0,deduplicateCssVariables:i=!0,withCssVariables:a=!0,cssVariablesSelector:s=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=iL(),defaultColorScheme:d="light",getRootElement:u=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:m,stylesTransform:p,env:h}){let{colorScheme:y,setColorScheme:x,clearColorScheme:v}=bL({defaultColorScheme:d,forceColorScheme:m,manager:c,getRootElement:u});return yL({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:u}),(0,Cl.jsx)(vf.Provider,{value:{colorScheme:y,setColorScheme:x,clearColorScheme:v,getRootElement:u,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:f,cssVariablesSelector:s,withStaticClasses:n,stylesTransform:p,env:h},children:(0,Cl.jsxs)(Bh,{theme:e,children:[a&&(0,Cl.jsx)(P2,{cssVariablesSelector:s,deduplicateCssVariables:i}),o&&(0,Cl.jsx)(fL,{}),t]})})}Iy.displayName="@mantine/core/MantineProvider";function _L({children:e,theme:t}){return(0,Cl.jsx)(vf.Provider,{value:{colorScheme:"auto",setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:"mantine",cssVariablesSelector:":root",withStaticClasses:!1,headless:!0},children:(0,Cl.jsx)(Bh,{theme:t,children:e})})}_L.displayName="@mantine/core/HeadlessMantineProvider";function Vr({classNames:e,styles:t,props:r,stylesCtx:n}){let o=lt();return{resolvedClassNames:Mi({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:ma({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}var aoe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function IL({theme:e,options:t,unstyled:r}){return Ze(t?.focusable&&!r&&(e.focusClassName||aoe[e.focusRing]),t?.active&&!r&&e.activeClassName)}var r6e=b(R(),1),o6e=b(O(),1);function wL({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return Mi({theme:o,classNames:r?.classNames,props:r?.props||n,stylesCtx:t})[e]}function D2({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return Mi({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function SL({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function kL({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function CL({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function PL({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(i=>Mi({theme:t,classNames:t.components[i]?.classNames,props:n,stylesCtx:o})?.[r])}function DL({options:e,classes:t,selector:r,unstyled:n}){return e?.variant&&!n?t[`${r}--${e.variant}`]:void 0}function RL({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:i,classes:a,unstyled:s,className:l,rootSelector:c,props:d,stylesCtx:u,withStaticClasses:f,headless:m,transformedStyles:p}){return Ze(IL({theme:e,options:t,unstyled:s||m}),PL({theme:e,themeName:r,selector:n,props:d,stylesCtx:u}),DL({options:t,classes:a,selector:n,unstyled:s}),D2({selector:n,stylesCtx:u,theme:e,classNames:i,props:d}),D2({selector:n,stylesCtx:u,theme:e,classNames:p,props:d}),wL({selector:n,stylesCtx:u,options:t,props:d,theme:e}),SL({rootSelector:c,selector:n,className:l}),kL({selector:n,classes:a,unstyled:s||m}),f&&!m&&CL({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t?.withStaticClass}),t?.className)}function EL({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(i=>ma({theme:e,styles:e.components[i]?.styles,props:r,stylesCtx:n})[o]).reduce((i,a)=>({...i,...a}),{})}function wy({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...wy({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}var j4e=b(R(),1),U4e=b(O(),1);function TL(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],...gs(r[n])}}),t),{})}function $L({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:i,themeName:a,headless:s}){return TL([s?{}:t?.(r,n,o),...a.map(l=>r.components?.[l]?.vars?.(r,n,o)),e?.(r,n,o)])?.[i]}function AL({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:i,rootSelector:a,styles:s,style:l,vars:c,varsResolver:d,headless:u,withStylesTransform:f}){return{...!f&&EL({theme:e,themeName:t,props:o,stylesCtx:i,selector:r}),...!f&&ma({theme:e,styles:s,props:o,stylesCtx:i})[r],...!f&&ma({theme:e,styles:n?.styles,props:n?.props||o,stylesCtx:i})[r],...$L({theme:e,props:o,stylesCtx:i,vars:c,varsResolver:d,selector:r,themeName:t,headless:u}),...a===r?wy({style:l,theme:e}):null,...wy({style:n?.style,theme:e})}}var Q4e=b(R(),1),Y4e=b(O(),1);function OL({props:e,stylesCtx:t,themeName:r}){let n=lt(),o=tL()?.();return{getTransformedStyles:a=>o?[...a.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>o(n.components[l]?.styles,{props:e,theme:n,ctx:t}))].filter(Boolean):[],withStylesTransform:!!o}}function K({name:e,classes:t,props:r,stylesCtx:n,className:o,style:i,rootSelector:a="root",unstyled:s,classNames:l,styles:c,vars:d,varsResolver:u}){let f=lt(),m=QF(),p=YF(),h=JF(),y=(Array.isArray(e)?e:[e]).filter(_=>_),{withStylesTransform:x,getTransformedStyles:v}=OL({props:r,stylesCtx:n,themeName:y});return(_,I)=>({className:RL({theme:f,options:I,themeName:y,selector:_,classNamesPrefix:m,classNames:l,classes:t,unstyled:s,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:p,headless:h,transformedStyles:v([I?.styles,c])}),style:AL({theme:f,themeName:y,selector:_,options:I,props:r,stylesCtx:n,rootSelector:a,styles:c,style:i,vars:d,varsResolver:u,headless:h,withStylesTransform:x})})}function ga(e,t){return typeof e=="boolean"?e:t.autoContrast}var va=b(R(),1);var f6e=b(O(),1);function zL(e){let t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(n=>n.remove())}function ud({keepTransitions:e}={}){let t=(0,va.useRef)(od),r=(0,va.useRef)(-1),n=(0,va.useContext)(vf),o=kl(),i=(0,va.useRef)(o?.());if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");let a=u=>{n.setColorScheme(u),t.current=e?()=>{}:zL(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{n.clearColorScheme(),t.current=e?()=>{}:zL(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},l=Th("light",{getInitialValueInEffect:!1}),c=n.colorScheme==="auto"?l:n.colorScheme,d=(0,va.useCallback)(()=>a(c==="light"?"dark":"light"),[a,c]);return(0,va.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:a,clearColorScheme:s,toggleColorScheme:d}}function fd(e,t={getInitialValueInEffect:!0}){let r=Th(e,t),{colorScheme:n}=ud();return n==="auto"?r:n}var y6e=b(R(),1),_6e=b(O(),1);function z(e,t,r){let n=lt(),o=n.components[e]?.defaultProps,i=typeof o=="function"?o(n):o;return{...t,...i,...gs(r)}}var FL=b(O(),1),T6e=b(R(),1);var C6e=b(R(),1),P6e=b(O(),1);function Sy(e){return ut(e).reduce((t,r)=>e[r]!==void 0?`${t}${mF(r)}:${e[r]};`:t,"").trim()}function NL({selector:e,styles:t,media:r,container:n}){let o=t?Sy(t):"",i=Array.isArray(r)?r.map(s=>`@media${s.query}{${e}{${Sy(s.styles)}}}`):[],a=Array.isArray(n)?n.map(s=>`@container ${s.query}{${e}{${Sy(s.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${i.join("")}${a.join("")}`.trim()}function md(e){let t=kl();return(0,FL.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:NL(e)}})}var N6e=b(R(),1),F6e=b(O(),1);function Hr(e){let{m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:h,pr:y,pe:x,ps:v,bd:_,bg:I,c:S,opacity:w,ff:P,fz:E,fw:B,lts:H,ta:Z,lh:q,fs:T,tt:k,td:$,w:C,miw:A,maw:D,h:N,mih:U,mah:G,bgsz:re,bgp:ge,bgr:me,bga:X,pos:oe,top:Ie,left:se,bottom:$e,right:Ue,inset:Je,display:at,flex:ze,hiddenFrom:Kt,visibleFrom:Xt,lightHidden:io,darkHidden:pe,sx:ue,...Se}=e;return{styleProps:gs({m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:h,pr:y,pe:x,ps:v,bd:_,bg:I,c:S,opacity:w,ff:P,fz:E,fw:B,lts:H,ta:Z,lh:q,fs:T,tt:k,td:$,w:C,miw:A,maw:D,h:N,mih:U,mah:G,bgsz:re,bgp:ge,bgr:me,bga:X,pos:oe,top:Ie,left:se,bottom:$e,right:Ue,inset:Je,display:at,flex:ze,hiddenFrom:Kt,visibleFrom:Xt,lightHidden:io,darkHidden:pe,sx:ue}),rest:Se}}var LL={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};var _De=b(R(),1),IDe=b(O(),1);var W6e=b(R(),1),Z6e=b(O(),1);var j6e=b(R(),1),U6e=b(O(),1);function Uh(e,t){let r=yr({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function ML(e,t){let r=yr({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:Uh(e,t)}function BL(e,t){if(typeof e=="number")return W(e);if(typeof e=="string"){let[r,n,...o]=e.split(" ").filter(a=>a.trim()!==""),i=`${W(r)}`;return n&&(i+=` ${n}`),o.length>0&&(i+=` ${Uh(o.join(" "),t)}`),i.trim()}return e}var jL={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function UL(e){return typeof e=="string"&&e in jL?jL[e]:e}var Q6e=b(R(),1),Y6e=b(O(),1);var soe=["h1","h2","h3","h4","h5","h6"];function VL(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&soe.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"?W(e):typeof e=="string"?W(e):e}function HL(e){return e}var loe=["h1","h2","h3","h4","h5","h6"];function WL(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&loe.includes(e)?`var(--mantine-${e}-line-height)`:e}var oDe=b(R(),1),nDe=b(O(),1);function ZL(e){return typeof e=="number"?W(e):e}var sDe=b(R(),1),lDe=b(O(),1);function GL(e,t){if(typeof e=="number")return W(e);if(typeof e=="string"){let r=e.replace("-","");if(!(r in t.spacing))return W(e);let n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}var ky={color:Uh,textColor:ML,fontSize:VL,spacing:GL,identity:HL,size:ZL,lineHeight:WL,fontFamily:UL,border:BL};function qL(e){return e.replace("(min-width: ","").replace("em)","")}function KL({media:e,...t}){let n=Object.keys(e).sort((o,i)=>Number(qL(o))-Number(qL(i))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function coe(e){if(typeof e!="object"||e===null)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function doe(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function uoe(e){return typeof e=="object"&&e!==null?ut(e).filter(t=>t!=="base"):[]}function foe(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function XL({styleProps:e,data:t,theme:r}){return KL(ut(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;let i=t[o],a=Array.isArray(i.property)?i.property:[i.property],s=doe(e[o]);if(!coe(e[o]))return a.forEach(c=>{n.inlineStyles[c]=ky[i.type](s,r)}),n;n.hasResponsiveStyles=!0;let l=uoe(e[o]);return a.forEach(c=>{s&&(n.styles[c]=ky[i.type](s,r)),l.forEach(d=>{let u=`(min-width: ${r.breakpoints[d]})`;n.media[u]={...n.media[u],[c]:ky[i.type](foe(e[o],d),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}var QL=b(R(),1);function Cy(){return`__m__-${(0,QL.useId)().replace(/:/g,"")}`}function Vh(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Vh(n,t)}),{}):typeof e=="function"?e(t):e??{}}var pd=b(O(),1),eM=b(R(),1);function YL(e){return e.startsWith("data-")?e:`data-${e}`}function moe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return n===void 0||n===""||n===!1||n===null||(t[YL(r)]=e[r]),t},{})}function R2(e){return e?typeof e=="string"?{[YL(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...R2(r)}),{}):moe(e):null}function E2(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...E2(n,t)}),{}):typeof e=="function"?e(t):e??{}}function JL({theme:e,style:t,vars:r,styleProps:n}){let o=E2(t,e),i=E2(r,e);return{...o,...i,...n}}var tM=(0,eM.forwardRef)(({component:e,style:t,__vars:r,className:n,variant:o,mod:i,size:a,hiddenFrom:s,visibleFrom:l,lightHidden:c,darkHidden:d,renderRoot:u,__size:f,...m},p)=>{let h=lt(),y=e||"div",{styleProps:x,rest:v}=Hr(m),I=eL()?.()?.(x.sx),S=Cy(),w=XL({styleProps:x,theme:h,data:LL}),P={ref:p,style:JL({theme:h,style:t,vars:r,styleProps:w.inlineStyles}),className:Ze(n,I,{[S]:w.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":d,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${l}`]:l}),"data-variant":o,"data-size":iy(a)?void 0:a||void 0,size:f,...R2(i),...v};return(0,pd.jsxs)(pd.Fragment,{children:[w.hasResponsiveStyles&&(0,pd.jsx)(md,{selector:`.${S}`,styles:w.styles,media:w.media}),typeof u=="function"?u(P):(0,pd.jsx)(y,{...P})]})});tM.displayName="@mantine/core/Box";var F=tM;var T2=b(O(),1),Py=b(R(),1);function $2(e){return e}function A2(e){let t=e;return r=>{let n=(0,Py.forwardRef)((o,i)=>(0,T2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function M(e){let t=(0,Py.forwardRef)(e);return t.extend=$2,t.withProps=r=>{let n=(0,Py.forwardRef)((o,i)=>(0,T2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}var rM=b(O(),1),O2=b(R(),1);function ot(e){let t=(0,O2.forwardRef)(e);return t.withProps=r=>{let n=(0,O2.forwardRef)((o,i)=>(0,rM.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=$2,t}var poe=b(O(),1),Hh=b(R(),1);var hoe=(0,Hh.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function ei(){return(0,Hh.useContext)(hoe)}var K4=b(O(),1);var JDe=b(R(),1);var Yf=b(R(),1),_8=b(ql(),1);function xie(e){if(!e||typeof e=="string")return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function q4(e){return e?.current?e.current.scrollHeight:"auto"}var Ng=typeof window<"u"&&window.requestAnimationFrame;function I8({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){let o=(0,Yf.useRef)(null),i=0,a={height:0,overflow:"hidden"},[s,l]=(0,Yf.useState)(n?{}:a),c=p=>{(0,_8.flushSync)(()=>l(p))},d=p=>{c(h=>({...h,...p}))};function u(p){let h=e||xie(p);return{transition:`height ${h}ms ${t}, opacity ${h}ms ${t}`}}br(()=>{typeof Ng=="function"&&Ng(n?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Ng(()=>{let p=q4(o);d({...u(p),height:p})})}:()=>{let p=q4(o);d({...u(p),willChange:"height",height:p}),Ng(()=>d({height:i,overflow:"hidden"}))})},[n]);let f=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){let h=q4(o);h===s.height?c({}):d({height:h}),r()}else s.height===i&&(c(a),r())};function m({style:p={},refKey:h="ref",...y}={}){let x=y[h],v={"aria-hidden":!n,...y,[h]:fy(o,x),onTransitionEnd:f,style:{boxSizing:"border-box",...p,...s}};return Yf.default.version.startsWith("18")?n||(v.inert=""):v.inert=!n,v}return m}var bie={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},Jf=M((e,t)=>{let{children:r,in:n,transitionDuration:o,transitionTimingFunction:i,style:a,onTransitionEnd:s,animateOpacity:l,...c}=z("Collapse",bie,e),d=lt(),u=bs(),m=(d.respectReducedMotion?u:!1)?0:o,p=I8({opened:n,transitionDuration:m,transitionTimingFunction:i,onTransitionEnd:s});return m===0?n?(0,K4.jsx)(F,{...c,children:r}):null:(0,K4.jsx)(F,{...p({style:{opacity:n||!l?1:0,transition:l?`opacity ${m}ms ${i}`:"none",...Vh(a,d)},ref:t,...c}),children:r})});Jf.displayName="@mantine/core/Collapse";var di=b(O(),1),tc=b(R(),1);var ce=b(R(),1),nm=b(R(),1);function q_(){return typeof window<"u"}function Kl(e){return w8(e)?(e.nodeName||"").toLowerCase():"#document"}function co(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ka(e){var t;return(t=(w8(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function w8(e){return q_()?e instanceof Node||e instanceof co(e).Node:!1}function Nt(e){return q_()?e instanceof Element||e instanceof co(e).Element:!1}function bn(e){return q_()?e instanceof HTMLElement||e instanceof co(e).HTMLElement:!1}function G_(e){return!q_()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof co(e).ShadowRoot}function Fg(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function S8(e){return/^(table|td|th)$/.test(Kl(e))}function Lg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var yie=/transform|translate|scale|rotate|perspective|filter/,_ie=/paint|layout|strict|content/,Ed=e=>!!e&&e!=="none",X4;function K_(e){let t=Nt(e)?Vn(e):e;return Ed(t.transform)||Ed(t.translate)||Ed(t.scale)||Ed(t.rotate)||Ed(t.perspective)||!em()&&(Ed(t.backdropFilter)||Ed(t.filter))||yie.test(t.willChange||"")||_ie.test(t.contain||"")}function k8(e){let t=Sa(e);for(;bn(t)&&!Ts(t);){if(K_(t))return t;if(Lg(t))return null;t=Sa(t)}return null}function em(){return X4==null&&(X4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),X4}function Ts(e){return/^(html|body|#document)$/.test(Kl(e))}function Vn(e){return co(e).getComputedStyle(e)}function Mg(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sa(e){if(Kl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||G_(e)&&e.host||ka(e);return G_(t)?t.host:t}function C8(e){let t=Sa(e);return Ts(t)?(e.ownerDocument||e).body:bn(t)&&Fg(t)?t:C8(t)}function Uo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=C8(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=co(o);if(i){let s=X_(a);return t.concat(a,a.visualViewport||[],Fg(o)?o:[],s&&r?Uo(s):[])}else return t.concat(o,Uo(o,[],r))}function X_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q4(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function tm(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&G_(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Y4(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function J4(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function D8(e){return Iie()?!1:!P8()&&e.width===0&&e.height===0||P8()&&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 R8(){return/apple/i.test(navigator.vendor)}function P8(){let e=/android/i;return e.test(Y4())||e.test(J4())}function E8(){return Y4().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Iie(){return J4().includes("jsdom/")}function Q_(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function T8(e){return"nativeEvent"in e}function $8(e){return e.matches("html,body")}function Xl(e){return e?.ownerDocument||document}function Y_(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function Td(e){return"composedPath"in e?e.composedPath()[0]:e.target}var wie="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function A8(e){return bn(e)&&e.matches(wie)}var Hn=Math.min,yn=Math.max,jg=Math.round,Ug=Math.floor,Ca=e=>({x:e,y:e}),Sie={left:"right",right:"left",bottom:"top",top:"bottom"};function e6(e,t,r){return yn(e,Hn(t,r))}function Pa(e,t){return typeof e=="function"?e(t):e}function qi(e){return e.split("-")[0]}function $d(e){return e.split("-")[1]}function eI(e){return e==="x"?"y":"x"}function tI(e){return e==="y"?"height":"width"}function li(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function rI(e){return eI(li(e))}function N8(e,t,r){r===void 0&&(r=!1);let n=$d(e),o=rI(e),i=tI(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Bg(a)),[a,Bg(a)]}function F8(e){let t=Bg(e);return[J_(e),t,J_(t)]}function J_(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var O8=["left","right"],z8=["right","left"],kie=["top","bottom"],Cie=["bottom","top"];function Pie(e,t,r){switch(e){case"top":case"bottom":return r?t?z8:O8:t?O8:z8;case"left":case"right":return t?kie:Cie;default:return[]}}function L8(e,t,r,n){let o=$d(e),i=Pie(qi(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(J_)))),i}function Bg(e){let t=qi(e);return Sie[t]+e.slice(t.length)}function Die(e){var t,r,n,o;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(o=e.left)!=null?o:0}}function oI(e){return typeof e!="number"?Die(e):{top:e,right:e,bottom:e,left:e}}function Ki(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var I9=b(ql(),1);function M8(e,t,r){let{reference:n,floating:o}=e,i=li(t),a=rI(t),s=tI(a),l=qi(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}let p=$d(t);return p&&(m[a]+=f*(p==="end"?1:-1)*(r&&c?-1:1)),m}async function B8(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Pa(t,e),p=oI(m),y=s[f?u==="floating"?"reference":"floating":u],x=Ki(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),I=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},S=Ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:_,strategy:l}):v);return{top:(x.top-S.top+p.top)/I.y,bottom:(S.bottom-x.bottom+p.bottom)/I.y,left:(x.left-S.left+p.left)/I.x,right:(S.right-x.right+p.right)/I.x}}var Rie=50,j8=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:B8},l=await(a.isRTL==null?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=M8(c,n,l),f=n,m=0,p={};for(let h=0;h<i.length;h++){let y=i[h];if(!y)continue;let{name:x,fn:v}=y,{x:_,y:I,data:S,reset:w}=await v({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,u=I??u,p[x]={...p[x],...S},w&&m<Rie&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:u}=M8(c,f,l)),h=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}},U8=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Pa(e,t)||{};if(c==null)return{};let u=oI(d),f={x:r,y:n},m=rI(o),p=tI(m),h=await a.getDimensions(c),y=m==="y",x=y?"top":"left",v=y?"bottom":"right",_=y?"clientHeight":"clientWidth",I=i.reference[p]+i.reference[m]-f[m]-i.floating[p],S=f[m]-i.reference[m],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c)),P=w?w[_]:0;(!P||!await(a.isElement==null?void 0:a.isElement(w)))&&(P=s.floating[_]||i.floating[p]);let E=I/2-S/2,B=P/2-h[p]/2-1,H=Hn(u[x],B),Z=Hn(u[v],B),q=P-h[p]-Z,T=P/2-h[p]/2+E,k=e6(H,T,q),$=!l.arrow&&$d(o)!=null&&T!==k&&i.reference[p]/2-(T<H?H:Z)-h[p]/2<0,C=$?T<H?T-H:T-q:0;return{[m]:f[m]+C,data:{[m]:k,centerOffset:T-k-C,...$&&{alignmentOffset:C}},reset:$}}});var V8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...y}=Pa(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let x=qi(o),v=li(s),_=qi(s)===s,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(_||!h?[Bg(s)]:F8(s)),w=p!=="none";!f&&w&&S.push(...L8(s,h,p,I));let P=[s,...S],E=await l.detectOverflow(t,y),B=[],H=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&B.push(E[x]),u){let k=N8(o,a,I);B.push(E[k[0]],E[k[1]])}if(H=[...H,{placement:o,overflows:B}],!B.every(k=>k<=0)){var Z,q;let k=(((Z=i.flip)==null?void 0:Z.index)||0)+1,$=P[k];if($&&(!(u==="alignment"?v!==li($):!1)||H.every(D=>li(D.placement)===v?D.overflows[0]>0:!0)))return{data:{index:k,overflows:H},reset:{placement:$}};let C=(q=H.filter(A=>A.overflows[0]<=0).sort((A,D)=>A.overflows[1]-D.overflows[1])[0])==null?void 0:q.placement;if(!C)switch(m){case"bestFit":{var T;let A=(T=H.filter(D=>{if(w){let N=li(D.placement);return N===v||N==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(N=>N>0).reduce((N,U)=>N+U,0)]).sort((D,N)=>D[1]-N[1])[0])==null?void 0:T[0];A&&(C=A);break}case"initialPlacement":C=s;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function H8(e){let t=Hn(...e.map(i=>i.left)),r=Hn(...e.map(i=>i.top)),n=yn(...e.map(i=>i.right)),o=yn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Eie(e){let t=e.slice().sort((o,i)=>o.y-i.y),r=[],n=null;for(let o=0;o<t.length;o++){let i=t[o];!n||i.y-n.y>n.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>Ki(H8(o)))}var W8=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=Pa(e,t),d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]);if(!d.length)return{};let u=Eie(d),f=Ki(H8(d)),m=oI(s);function p(){if(u.length===2&&(u[0].left>u[1].right||u[1].left>u[0].right)&&l!=null&&c!=null)return u.find(y=>l>y.left-m.left&&l<y.right+m.right&&c>y.top-m.top&&c<y.bottom+m.bottom)||f;if(u.length>=2){if(li(r)==="y"){let w=u[0],P=u[u.length-1],E=qi(r)==="top",B=w.top,H=P.bottom,Z=E?w.left:P.left,q=E?w.right:P.right;return Ki({x:Z,y:B,width:q-Z,height:H-B})}let y=qi(r)==="left",x=yn(...u.map(w=>w.right)),v=Hn(...u.map(w=>w.left)),_=u.filter(w=>y?w.left===v:w.right===x),I=_[0].top,S=_[_.length-1].bottom;return Ki({x:v,y:I,width:x-v,height:S-I})}return f}let h=await i.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:a});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Z8=new Set(["left","top"]);async function Tie(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=qi(r),s=$d(r),l=li(r)==="y",c=Z8.has(a)?-1:1,d=i&&l?-1:1,u=Pa(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof p=="number"&&(m=s==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var G8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await Tie(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},q8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:_,y:I}=v;return{x:_,y:I}}},...c}=Pa(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),f=li(o),m=eI(f),p=d[m],h=d[f],y=(v,_)=>e6(_+u[v==="y"?"top":"left"],_,_-u[v==="y"?"bottom":"right"]);a&&(p=y(m,p)),s&&(h=y(f,h));let x=l.fn({...t,[m]:p,[f]:h});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[m]:a,[f]:s}}}}}},K8=function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,n;let{x:o,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=Pa(e,t),f={x:o,y:i},m=li(a),p=eI(m),h=f[p],y=f[m],x=Pa(c,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(r=x.mainAxis)!=null?r:0,crossAxis:(n=x.crossAxis)!=null?n:0};if(d){let S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+v.mainAxis,P=s.reference[p]+s.reference[S]-v.mainAxis;h<w?h=w:h>P&&(h=P)}if(u){var _,I;let S=p==="y"?"width":"height",w=Z8.has(qi(a)),P=s.reference[m]-s.floating[S]+(w&&((_=l.offset)==null?void 0:_[m])||0)+(w?0:v.crossAxis),E=s.reference[m]+s.reference[S]+(w?0:((I=l.offset)==null?void 0:I[m])||0)-(w?v.crossAxis:0);y<P?y=P:y>E&&(y=E)}return{[p]:h,[m]:y}}}},X8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Pa(e,t),l=await o.detectOverflow(t,s),c=qi(r),d=$d(r),u=li(r)==="y",{width:f,height:m}=n.floating,p,h;c==="top"||c==="bottom"?(p=c,h=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,p=d==="end"?"top":"bottom");let y=m-l.top-l.bottom,x=f-l.left-l.right,v=Hn(m-l[p],y),_=Hn(f-l[h],x),I=t.middlewareData.shift,S=!I,w=v,P=_;I!=null&&I.enabled.x&&(P=x),I!=null&&I.enabled.y&&(w=y),S&&!d&&(u?P=f-2*yn(l.left,l.right):w=m-2*yn(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:w});let E=await o.getDimensions(i.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function J8(e){let t=Vn(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=bn(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=jg(r)!==i||jg(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function r6(e){return Nt(e)?e:e.contextElement}function rm(e){let t=r6(e);if(!bn(t))return Ca(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=J8(t),a=(i?jg(r.width):r.width)/n,s=(i?jg(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var $ie=Ca(0);function e9(e){let t=co(e);return!em()||!t.visualViewport?$ie:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Aie(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===co(e)}function Ad(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=r6(e),a=Ca(1);t&&(n?Nt(n)&&(a=rm(n)):a=rm(e));let s=Aie(i,r,n)?e9(i):Ca(0),l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i&&n){let f=co(i),m=Nt(n)?co(n):n,p=f,h=X_(p);for(;h&&m!==p;){let y=rm(h),x=h.getBoundingClientRect(),v=Vn(h),_=x.left+(h.clientLeft+parseFloat(v.paddingLeft))*y.x,I=x.top+(h.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,u*=y.y,l+=_,c+=I,p=co(h),h=X_(p)}}return Ki({width:d,height:u,x:l,y:c})}function nI(e,t){let r=Mg(e).scrollLeft;return t?t.left+r:Ad(ka(e)).left+r}function t9(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-nI(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Oie(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=ka(n),s=t?Lg(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ca(1),d=Ca(0),u=bn(n);if((u||!i)&&((Kl(n)!=="body"||Fg(a))&&(l=Mg(n)),u)){let m=Ad(n);c=rm(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=a&&!u&&!i?t9(a,l):Ca(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function zie(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Nie(e){let t=Mg(e),r=e.ownerDocument.body,n=yn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=yn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+nI(e),a=-t.scrollTop;return Vn(r).direction==="rtl"&&(i+=yn(e.clientWidth,r.clientWidth)-n),{width:n,height:o,x:i,y:a}}var Fie=25;function Lie(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",o=co(e),i=ka(e),a=o.visualViewport,s=i.clientWidth,l=i.clientHeight,c=0,d=0;if(a){let f=!em()||t==="fixed";n?f||(c=-a.offsetLeft,d=-a.offsetTop):(s=a.width,l=a.height,f&&(c=a.offsetLeft,d=a.offsetTop))}if(nI(i)<=0){let f=i.ownerDocument,m=f.body,p=getComputedStyle(m),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-m.clientWidth-h),x=getComputedStyle(i).scrollbarGutter==="stable both-edges"?y/2:y;x<=Fie&&(s-=x)}return{width:s,height:l,x:c,y:d}}function Mie(e,t){let r=Ad(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=rm(e),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function Q8(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Lie(e,r,t);else if(t==="document")n=Nie(ka(e));else if(Nt(t))n=Mie(t,r);else{let o=e9(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ki(n)}function Bie(e,t){let r=t.get(e);if(r)return r;let n=Uo(e,[],!1).filter(s=>Nt(s)&&Kl(s)!=="body"),o=null,i=Vn(e).position==="fixed",a=i?Sa(e):e;for(;Nt(a)&&!Ts(a);){let s=Vn(a),l=K_(a),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&s.position==="static")?n=n.filter(u=>u!==a):o=s,a=Sa(a)}return t.set(e,n),n}function jie(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?Lg(t)?[]:Bie(t,this._c):[].concat(r),n],s=Q8(t,a[0],o),l=s.top,c=s.right,d=s.bottom,u=s.left;for(let f=1;f<a.length;f++){let m=Q8(t,a[f],o);l=yn(m.top,l),c=Hn(m.right,c),d=Hn(m.bottom,d),u=yn(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Uie(e){let{width:t,height:r}=J8(e);return{width:t,height:r}}function Vie(e,t,r){let n=bn(t),o=ka(t),i=r==="fixed",a=Ad(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=Ca(0);if((n||!i)&&((Kl(t)!=="body"||Fg(o))&&(s=Mg(t)),n)){let f=Ad(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=nI(o));let c=o&&!n&&!i?t9(o,s):Ca(0),d=a.left+s.scrollLeft-l.x-c.x,u=a.top+s.scrollTop-l.y-c.y;return{x:d,y:u,width:a.width,height:a.height}}function t6(e){return Vn(e).position==="static"}function Y8(e,t){if(!bn(e)||Vn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ka(e)===r&&(r=r.ownerDocument.body),r}function r9(e,t){let r=co(e);if(Lg(e))return r;if(!bn(e)){let o=Sa(e);for(;o&&!Ts(o);){if(Nt(o)&&!t6(o))return o;o=Sa(o)}return r}let n=Y8(e,t);for(;n&&S8(n)&&t6(n);)n=Y8(n,t);return n&&Ts(n)&&t6(n)&&!K_(n)?r:n||k8(e)||r}var Hie=async function(e){let t=this.getOffsetParent||r9,r=this.getDimensions,n=await r(e.floating);return{reference:Vie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Wie(e){return Vn(e).direction==="rtl"}var o6={convertOffsetParentRelativeRectToViewportRelativeRect:Oie,getDocumentElement:ka,getClippingRect:jie,getOffsetParent:r9,getElementRects:Hie,getClientRects:zie,getDimensions:Uie,getScale:rm,isElement:Nt,isRTL:Wie};function o9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zie(e,t,r){let n=null,o,i=ka(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function s(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:m,top:p,width:h,height:y}=f;if(d||t(),!h||!y)return;let x=Ug(p),v=Ug(i.clientWidth-(m+h)),_=Ug(i.clientHeight-(p+y)),I=Ug(m),w={rootMargin:-x+"px "+-v+"px "+-_+"px "+-I+"px",threshold:yn(0,Hn(1,u))||1},P=!0;function E(B){let H=B[0].intersectionRatio;if(!o9(f,e.getBoundingClientRect()))return s();if(H!==u){if(!P)return s();H?s(!1,H):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}let l=co(e),c=()=>s(r);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}function iI(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=r6(e),d=o||i?[...c?Uo(c):[],...t?Uo(t):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",r),i&&x.addEventListener("resize",r)});let u=c&&s?Zie(c,r,i):null,f=-1,m=null;a&&(m=new ResizeObserver(x=>{let[v]=x;v&&v.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(t)})),r()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,h=l?Ad(e):null;l&&y();function y(){let x=Ad(e);h&&!o9(h,x)&&r(),h=x,p=requestAnimationFrame(y)}return r(),()=>{var x;d.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),u?.(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var n9=G8;var i9=q8,a9=V8,s9=X8;var n6=U8,l9=W8,c9=K8,aI=(e,t,r)=>{let n=new Map,o=r??{},i={...o6,...o.platform,_c:n};return j8(e,t,{...o,platform:i})};var Dr=b(R(),1),f9=b(R(),1),m9=b(ql(),1),Gie=typeof document<"u",qie=function(){},sI=Gie?f9.useLayoutEffect:qie;function lI(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!lI(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!lI(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function p9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function d9(e,t){let r=p9(e);return Math.round(t*r)/r}function i6(e){let t=Dr.useRef(e);return sI(()=>{t.current=e}),t}function h9(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=Dr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=Dr.useState(n);lI(f,n)||m(n);let[p,h]=Dr.useState(null),[y,x]=Dr.useState(null),v=Dr.useCallback(D=>{D!==w.current&&(w.current=D,h(D))},[]),_=Dr.useCallback(D=>{D!==P.current&&(P.current=D,x(D))},[]),I=i||p,S=a||y,w=Dr.useRef(null),P=Dr.useRef(null),E=Dr.useRef(d),B=l!=null,H=i6(l),Z=i6(o),q=i6(c),T=Dr.useCallback(()=>{if(!w.current||!P.current)return;let D={placement:t,strategy:r,middleware:f};Z.current&&(D.platform=Z.current),aI(w.current,P.current,D).then(N=>{let U={...N,isPositioned:q.current!==!1};k.current&&!lI(E.current,U)&&(E.current=U,m9.flushSync(()=>{u(U)}))})},[f,t,r,Z,q]);sI(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(D=>({...D,isPositioned:!1})))},[c]);let k=Dr.useRef(!1);sI(()=>(k.current=!0,()=>{k.current=!1}),[]),sI(()=>{if(I&&(w.current=I),S&&(P.current=S),I&&S){if(H.current)return H.current(I,S,T);T()}},[I,S,T,H,B]);let $=Dr.useMemo(()=>({reference:w,floating:P,setReference:v,setFloating:_}),[v,_]),C=Dr.useMemo(()=>({reference:I,floating:S}),[I,S]),A=Dr.useMemo(()=>{let D={position:r,left:0,top:0};if(!C.floating)return D;let N=d9(C.floating,d.x),U=d9(C.floating,d.y);return s?{...D,transform:"translate("+N+"px, "+U+"px)",...p9(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:U}},[r,s,C.floating,d.x,d.y]);return Dr.useMemo(()=>({...d,update:T,refs:$,elements:C,floatingStyles:A}),[d,T,$,C,A])}var Kie=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?n6({element:n.current,padding:o}).fn(r):{}:n?n6({element:n,padding:o}).fn(r):{}}}},om=(e,t)=>{let r=n9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Od=(e,t)=>{let r=i9(e);return{name:r.name,fn:r.fn,options:[e,t]}},cI=(e,t)=>({fn:c9(e).fn,options:[e,t]}),zd=(e,t)=>{let r=a9(e);return{name:r.name,fn:r.fn,options:[e,t]}},a6=(e,t)=>{let r=s9(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Ql=(e,t)=>{let r=l9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vg=(e,t)=>{let r=Kie(e);return{name:r.name,fn:r.fn,options:[e,t]}};function w9(e){return ce.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}var S9={...ce},Xie=S9.useInsertionEffect,Qie=Xie||(e=>e());function $s(e){let t=ce.useRef(()=>{});return Qie(()=>{t.current=e}),ce.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var Yie="ArrowUp",Jie="ArrowDown",eae="ArrowLeft",tae="ArrowRight";var Da=typeof document<"u"?nm.useLayoutEffect:nm.useEffect;var rae=[eae,tae],oae=[Yie,Jie],FRe=[...rae,...oae];var g9=!1,nae=0,v9=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nae++;function iae(){let[e,t]=ce.useState(()=>g9?v9():void 0);return Da(()=>{e==null&&t(v9())},[]),ce.useEffect(()=>{g9=!0},[]),e}var aae=S9.useId,k9=aae||iae;function sae(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}var lae=ce.createContext(null),cae=ce.createContext(null),u6=()=>{var e;return((e=ce.useContext(lae))==null?void 0:e.id)||null},f6=()=>ce.useContext(cae);function m6(e){return"data-floating-ui-"+e}function s6(e){let t=(0,nm.useRef)(e);return Da(()=>{t.current=e}),t}var x9=m6("safe-polygon");function dI(e,t,r){return r&&!Q_(r)?0:typeof e=="number"?e:e?.[t]}function C9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:u=0,move:f=!0}=t,m=f6(),p=u6(),h=s6(c),y=s6(l),x=s6(r),v=ce.useRef(),_=ce.useRef(-1),I=ce.useRef(),S=ce.useRef(-1),w=ce.useRef(!0),P=ce.useRef(!1),E=ce.useRef(()=>{}),B=ce.useRef(!1),H=ce.useCallback(()=>{var A;let D=(A=o.current.openEvent)==null?void 0:A.type;return D?.includes("mouse")&&D!=="mousedown"},[o]);ce.useEffect(()=>{if(!s)return;function A(D){let{open:N}=D;N||(clearTimeout(_.current),clearTimeout(S.current),w.current=!0,B.current=!1)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[s,i]),ce.useEffect(()=>{if(!s||!h.current||!r)return;function A(N){H()&&n(!1,N,"hover")}let D=Xl(a.floating).documentElement;return D.addEventListener("mouseleave",A),()=>{D.removeEventListener("mouseleave",A)}},[a.floating,r,n,s,h,H]);let Z=ce.useCallback(function(A,D,N){D===void 0&&(D=!0),N===void 0&&(N="hover");let U=dI(y.current,"close",v.current);U&&!I.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>n(!1,A,N),U)):D&&(clearTimeout(_.current),n(!1,A,N))},[y,n]),q=$s(()=>{E.current(),I.current=void 0}),T=$s(()=>{if(P.current){let A=Xl(a.floating).body;A.style.pointerEvents="",A.removeAttribute(x9),P.current=!1}}),k=$s(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);ce.useEffect(()=>{if(!s)return;function A(G){if(clearTimeout(_.current),w.current=!1,d&&!Q_(v.current)||u>0&&!dI(y.current,"open"))return;let re=dI(y.current,"open",v.current);re?_.current=window.setTimeout(()=>{x.current||n(!0,G,"hover")},re):r||n(!0,G,"hover")}function D(G){if(k())return;E.current();let re=Xl(a.floating);if(clearTimeout(S.current),B.current=!1,h.current&&o.current.floatingContext){r||clearTimeout(_.current),I.current=h.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),q(),k()||Z(G,!0,"safe-polygon")}});let me=I.current;re.addEventListener("mousemove",me),E.current=()=>{re.removeEventListener("mousemove",me)};return}(v.current!=="touch"||!tm(a.floating,G.relatedTarget))&&Z(G)}function N(G){k()||o.current.floatingContext&&(h.current==null||h.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),q(),k()||Z(G)}})(G))}if(Nt(a.domReference)){var U;let G=a.domReference;return r&&G.addEventListener("mouseleave",N),(U=a.floating)==null||U.addEventListener("mouseleave",N),f&&G.addEventListener("mousemove",A,{once:!0}),G.addEventListener("mouseenter",A),G.addEventListener("mouseleave",D),()=>{var re;r&&G.removeEventListener("mouseleave",N),(re=a.floating)==null||re.removeEventListener("mouseleave",N),f&&G.removeEventListener("mousemove",A),G.removeEventListener("mouseenter",A),G.removeEventListener("mouseleave",D)}}},[a,s,e,d,u,f,Z,q,T,n,r,x,m,y,h,o,k]),Da(()=>{var A;if(s&&r&&(A=h.current)!=null&&A.__options.blockPointerEvents&&H()){P.current=!0;let N=a.floating;if(Nt(a.domReference)&&N){var D;let U=Xl(a.floating).body;U.setAttribute(x9,"");let G=a.domReference,re=m==null||(D=m.nodesRef.current.find(ge=>ge.id===p))==null||(D=D.context)==null?void 0:D.elements.floating;return re&&(re.style.pointerEvents=""),U.style.pointerEvents="none",G.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{U.style.pointerEvents="",G.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,r,p,a,m,h,H]),Da(()=>{r||(v.current=void 0,B.current=!1,q(),T())},[r,q,T]),ce.useEffect(()=>()=>{q(),clearTimeout(_.current),clearTimeout(S.current),T()},[s,a.domReference,q,T]);let $=ce.useMemo(()=>{function A(D){v.current=D.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(D){let{nativeEvent:N}=D;function U(){!w.current&&!x.current&&n(!0,N,"hover")}d&&!Q_(v.current)||r||u===0||B.current&&D.movementX**2+D.movementY**2<2||(clearTimeout(S.current),v.current==="touch"?U():(B.current=!0,S.current=window.setTimeout(U,u)))}}},[d,n,r,x,u]),C=ce.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(A){k()||Z(A.nativeEvent,!1)}}),[Z,k]);return ce.useMemo(()=>s?{reference:$,floating:C}:{},[s,$,C])}var d6=()=>{},P9=ce.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:d6,setState:d6,isInstantPhase:!1}),dae=()=>ce.useContext(P9);function D9(e){let{children:t,delay:r,timeoutMs:n=0}=e,[o,i]=ce.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=ce.useRef(null),s=ce.useCallback(l=>{i({currentId:l})},[]);return Da(()=>{o.currentId?a.current===null?a.current=o.currentId:o.isInstantPhase||i({isInstantPhase:!0}):(o.isInstantPhase&&i({isInstantPhase:!1}),a.current=null)},[o.currentId,o.isInstantPhase]),ce.createElement(P9.Provider,{value:ce.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,s])},t)}function R9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:o}=e,{id:i,enabled:a=!0}=t,s=i??o,l=dae(),{currentId:c,setCurrentId:d,initialDelay:u,setState:f,timeoutMs:m}=l;return Da(()=>{a&&c&&(f({delay:{open:1,close:dI(u,"close")}}),c!==s&&n(!1))},[a,s,n,f,c,u]),Da(()=>{function p(){n(!1),f({delay:u,currentId:null})}if(a&&c&&!r&&c===s){if(m){let h=window.setTimeout(p,m);return()=>{clearTimeout(h)}}p()}},[a,r,f,c,s,n,u,m]),Da(()=>{a&&(d===d6||!r||d(s))},[a,r,d,s]),l}function l6(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}var uae="data-floating-ui-focusable";var fae={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},mae={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},b9=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};function E9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:f=!1,bubbles:m,capture:p}=t,h=f6(),y=$s(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,v=ce.useRef(!1),_=ce.useRef(!1),{escapeKey:I,outsidePress:S}=b9(m),{escapeKey:w,outsidePress:P}=b9(p),E=ce.useRef(!1),B=$s($=>{var C;if(!r||!a||!s||$.key!=="Escape"||E.current)return;let A=(C=i.current.floatingContext)==null?void 0:C.nodeId,D=h?l6(h.nodesRef.current,A):[];if(!I&&($.stopPropagation(),D.length>0)){let N=!0;if(D.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}n(!1,T8($)?$.nativeEvent:$,"escape-key")}),H=$s($=>{var C;let A=()=>{var D;B($),(D=Td($))==null||D.removeEventListener("keydown",A)};(C=Td($))==null||C.addEventListener("keydown",A)}),Z=$s($=>{var C;let A=v.current;v.current=!1;let D=_.current;if(_.current=!1,c==="click"&&D||A||typeof x=="function"&&!x($))return;let N=Td($),U="["+m6("inert")+"]",G=Xl(o.floating).querySelectorAll(U),re=Nt(N)?N:null;for(;re&&!Ts(re);){let oe=Sa(re);if(Ts(oe)||!Nt(oe))break;re=oe}if(G.length&&Nt(N)&&!$8(N)&&!tm(N,o.floating)&&Array.from(G).every(oe=>!tm(re,oe)))return;if(bn(N)&&k){let oe=N.clientWidth>0&&N.scrollWidth>N.clientWidth,Ie=N.clientHeight>0&&N.scrollHeight>N.clientHeight,se=Ie&&$.offsetX>N.clientWidth;if(Ie&&Vn(N).direction==="rtl"&&(se=$.offsetX<=N.offsetWidth-N.clientWidth),se||oe&&$.offsetY>N.clientHeight)return}let ge=(C=i.current.floatingContext)==null?void 0:C.nodeId,me=h&&l6(h.nodesRef.current,ge).some(oe=>{var Ie;return Y_($,(Ie=oe.context)==null?void 0:Ie.elements.floating)});if(Y_($,o.floating)||Y_($,o.domReference)||me)return;let X=h?l6(h.nodesRef.current,ge):[];if(X.length>0){let oe=!0;if(X.forEach(Ie=>{var se;if((se=Ie.context)!=null&&se.open&&!Ie.context.dataRef.current.__outsidePressBubbles){oe=!1;return}}),!oe)return}n(!1,$,"outside-press")}),q=$s($=>{var C;let A=()=>{var D;Z($),(D=Td($))==null||D.removeEventListener(c,A)};(C=Td($))==null||C.addEventListener(c,A)});ce.useEffect(()=>{if(!r||!a)return;i.current.__escapeKeyBubbles=I,i.current.__outsidePressBubbles=S;let $=-1;function C(G){n(!1,G,"ancestor-scroll")}function A(){window.clearTimeout($),E.current=!0}function D(){$=window.setTimeout(()=>{E.current=!1},em()?5:0)}let N=Xl(o.floating);s&&(N.addEventListener("keydown",w?H:B,w),N.addEventListener("compositionstart",A),N.addEventListener("compositionend",D)),x&&N.addEventListener(c,P?q:Z,P);let U=[];return f&&(Nt(o.domReference)&&(U=Uo(o.domReference)),Nt(o.floating)&&(U=U.concat(Uo(o.floating))),!Nt(o.reference)&&o.reference&&o.reference.contextElement&&(U=U.concat(Uo(o.reference.contextElement)))),U=U.filter(G=>{var re;return G!==((re=N.defaultView)==null?void 0:re.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",C,{passive:!0})}),()=>{s&&(N.removeEventListener("keydown",w?H:B,w),N.removeEventListener("compositionstart",A),N.removeEventListener("compositionend",D)),x&&N.removeEventListener(c,P?q:Z,P),U.forEach(G=>{G.removeEventListener("scroll",C)}),window.clearTimeout($)}},[i,o,s,x,c,r,n,f,a,I,S,B,w,H,Z,P,q]),ce.useEffect(()=>{v.current=!1},[x,c]);let T=ce.useMemo(()=>({onKeyDown:B,[fae[u]]:$=>{d&&n(!1,$.nativeEvent,"reference-press")}}),[B,n,d,u]),k=ce.useMemo(()=>({onKeyDown:B,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[mae[c]]:()=>{v.current=!0}}),[B,c]);return ce.useMemo(()=>a?{reference:T,floating:k}:{},[a,T,k])}function pae(e){let{open:t=!1,onOpenChange:r,elements:n}=e,o=k9(),i=ce.useRef({}),[a]=ce.useState(()=>sae()),s=u6()!=null,[l,c]=ce.useState(n.reference),d=$s((m,p,h)=>{i.current.openEvent=m?p:void 0,a.emit("openchange",{open:m,event:p,reason:h,nested:s}),r?.(m,p,h)}),u=ce.useMemo(()=>({setPositionReference:c}),[]),f=ce.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return ce.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:f,events:a,floatingId:o,refs:u}),[t,d,f,a,o,u])}function im(e){e===void 0&&(e={});let{nodeId:t}=e,r=pae({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,a]=ce.useState(null),[s,l]=ce.useState(null),d=o?.domReference||i,u=ce.useRef(null),f=f6();Da(()=>{d&&(u.current=d)},[d]);let m=h9({...e,elements:{...o,...s&&{reference:s}}}),p=ce.useCallback(_=>{let I=Nt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(I),m.refs.setReference(I)},[m.refs]),h=ce.useCallback(_=>{(Nt(_)||_===null)&&(u.current=_,a(_)),(Nt(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!Nt(_))&&m.refs.setReference(_)},[m.refs]),y=ce.useMemo(()=>({...m.refs,setReference:h,setPositionReference:p,domReference:u}),[m.refs,h,p]),x=ce.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),v=ce.useMemo(()=>({...m,...n,refs:y,elements:x,nodeId:t}),[m,y,x,t,n]);return Da(()=>{n.dataRef.current.floatingContext=v;let _=f?.nodesRef.current.find(I=>I.id===t);_&&(_.context=v)}),ce.useMemo(()=>({...m,context:v,refs:y,elements:x}),[m,y,x,v])}function T9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=ce.useRef(!1),d=ce.useRef(),u=ce.useRef(!0);ce.useEffect(()=>{if(!s)return;let m=co(a.domReference);function p(){!r&&bn(a.domReference)&&a.domReference===Q4(Xl(a.domReference))&&(c.current=!0)}function h(){u.current=!0}return m.addEventListener("blur",p),m.addEventListener("keydown",h,!0),()=>{m.removeEventListener("blur",p),m.removeEventListener("keydown",h,!0)}},[a.domReference,r,s]),ce.useEffect(()=>{if(!s)return;function m(p){let{reason:h}=p;(h==="reference-press"||h==="escape-key")&&(c.current=!0)}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,s]),ce.useEffect(()=>()=>{clearTimeout(d.current)},[]);let f=ce.useMemo(()=>({onPointerDown(m){D8(m.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;let p=Td(m.nativeEvent);if(l&&Nt(p))try{if(R8()&&E8())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!u.current&&!A8(p))return}n(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;let p=m.relatedTarget,h=m.nativeEvent,y=Nt(p)&&p.hasAttribute(m6("focus-guard"))&&p.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var x;let v=Q4(a.domReference?a.domReference.ownerDocument:document);!p&&v===a.domReference||tm((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,v)||tm(a.domReference,v)||y||n(!1,h,"focus")})}}),[i,a.domReference,n,l]);return ce.useMemo(()=>s?{reference:f}:{},[s,f])}var y9="active",_9="selected";function c6(e,t,r){let n=new Map,o=r==="item",i=e;if(o&&e){let{[y9]:a,[_9]:s,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[uae]:""},...i,...t.map(a=>{let s=a?a[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,d]=l;if(!(o&&[y9,_9].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),a[c]=function(){for(var f,m=arguments.length,p=new Array(m),h=0;h<m;h++)p[h]=arguments[h];return(f=n.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else a[c]=d}),a),{})}}function $9(e){e===void 0&&(e=[]);let t=e.map(s=>s?.reference),r=e.map(s=>s?.floating),n=e.map(s=>s?.item),o=ce.useCallback(s=>c6(s,e,"reference"),t),i=ce.useCallback(s=>c6(s,e,"floating"),r),a=ce.useCallback(s=>c6(s,e,"item"),n);return ce.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}var hae=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function A9(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(r=hae.get(a))!=null?r:a,l=k9(),d=u6()!=null,u=ce.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":n?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,d,n,l,a]),f=ce.useMemo(()=>{let p={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?p:{...p,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),m=ce.useCallback(p=>{let{active:h,selected:y}=p,x={role:"option",...h&&{id:o+"-option"}};switch(a){case"select":return{...x,"aria-selected":h&&y};case"combobox":return{...x,...h&&{"aria-selected":!0}}}return{}},[o,a]);return ce.useMemo(()=>i?{reference:u,floating:f,item:m}:{},[i,u,f,m])}var p6=b(O(),1),am=b(R(),1);var BRe=b(R(),1);var URe=b(O(),1);var[O9,cr]=Vt("ScrollArea.Root component was not found in tree");function As(e,t){let r=Fi(t);Lo(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var gae=(0,am.forwardRef)((e,t)=>{let{style:r,...n}=e,o=cr(),[i,a]=(0,am.useState)(0),[s,l]=(0,am.useState)(0),c=!!(i&&s);return As(o.scrollbarX,()=>{let d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),l(d)}),As(o.scrollbarY,()=>{let d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),a(d)}),c?(0,p6.jsx)("div",{...n,ref:t,style:{...r,width:i,height:s}}):null}),z9=(0,am.forwardRef)((e,t)=>{let r=cr(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,p6.jsx)(gae,{...e,ref:t}):null});var h6=b(O(),1),ci=b(R(),1);var vae={scrollHideDelay:1e3,type:"hover"},g6=(0,ci.forwardRef)((e,t)=>{let r=z("ScrollAreaRoot",vae,e),{type:n,scrollHideDelay:o,scrollbars:i,...a}=r,[s,l]=(0,ci.useState)(null),[c,d]=(0,ci.useState)(null),[u,f]=(0,ci.useState)(null),[m,p]=(0,ci.useState)(null),[h,y]=(0,ci.useState)(null),[x,v]=(0,ci.useState)(0),[_,I]=(0,ci.useState)(0),[S,w]=(0,ci.useState)(!1),[P,E]=(0,ci.useState)(!1),B=Ve(t,H=>l(H));return(0,h6.jsx)(O9,{value:{type:n,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:w,scrollbarY:h,onScrollbarYChange:y,scrollbarYEnabled:P,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:I},children:(0,h6.jsx)(F,{...a,ref:B,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${x}px`,"--sa-corner-height":i!=="xy"?"0px":`${_}px`}})})});g6.displayName="@mantine/core/ScrollAreaRoot";var Wg=b(O(),1),gI=b(R(),1);var B9=b(O(),1),hI=b(R(),1);var I6=b(O(),1),Nd=b(R(),1);function uI(e,t){let r=e/t;return Number.isNaN(r)?0:r}function Yl(e){let t=uI(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function fI(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function xae(e,[t,r]){return Math.min(r,Math.max(t,e))}function v6(e,t,r="ltr"){let n=Yl(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=xae(e,l);return fI([0,a],[0,s])(c)}function N9(e,t,r,n="ltr"){let o=Yl(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u=n==="ltr"?[0,d]:[d*-1,0];return fI([l,c],u)(e)}var L9=b(O(),1),Jl=b(R(),1);function mI(e,t){return e>0&&e<t}function Xi(e){return e?parseInt(e,10):0}var b6=b(O(),1),Ea=b(R(),1);function Ra(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e?.(n),(r===!1||!n.defaultPrevented)&&t?.(n)}}var hEe=b(R(),1);var vEe=b(O(),1);var[F9,x6]=Vt("ScrollAreaScrollbar was not found in tree");var pI=(0,Ea.forwardRef)((e,t)=>{let{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...u}=e,f=cr(),[m,p]=(0,Ea.useState)(null),h=Ve(t,E=>p(E)),y=(0,Ea.useRef)(null),x=(0,Ea.useRef)(""),{viewport:v}=f,_=r.content-r.viewport,I=Fi(c),S=Fi(s),w=vs(d,10),P=E=>{if(y.current){let B=E.clientX-y.current.left,H=E.clientY-y.current.top;l({x:B,y:H})}};return(0,Ea.useEffect)(()=>{let E=B=>{let H=B.target;m?.contains(H)&&I(B,_)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[v,m,_,I]),(0,Ea.useEffect)(S,[r,S]),As(m,w),As(f.content,w),(0,b6.jsx)(F9,{value:{scrollbar:m,hasThumb:n,onThumbChange:Fi(o),onThumbPointerUp:Fi(i),onThumbPositionChange:S,onThumbPointerDown:Fi(a)},children:(0,b6.jsx)("div",{...u,ref:h,"data-mantine-scrollbar":!0,style:{position:"absolute",...u.style},onPointerDown:Ra(e.onPointerDown,E=>{E.preventDefault(),E.button===0&&(E.target.setPointerCapture(E.pointerId),y.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",P(E))}),onPointerMove:Ra(e.onPointerMove,P),onPointerUp:Ra(e.onPointerUp,E=>{let B=E.target;B.hasPointerCapture(E.pointerId)&&(E.preventDefault(),B.releasePointerCapture(E.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=x.current,y.current=null}})})});var y6=(0,Jl.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=cr(),[s,l]=(0,Jl.useState)(),c=(0,Jl.useRef)(null),d=Ve(t,c,a.onScrollbarXChange);return(0,Jl.useEffect)(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,L9.jsx)(pI,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{...o,"--sa-thumb-width":`${Yl(r)}px`},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),mI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Xi(s.paddingLeft),paddingEnd:Xi(s.paddingRight)}})}})});y6.displayName="@mantine/core/ScrollAreaScrollbarX";var M9=b(O(),1),ec=b(R(),1);var _6=(0,ec.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=cr(),[s,l]=(0,ec.useState)(),c=(0,ec.useRef)(null),d=Ve(t,c,a.onScrollbarYChange);return(0,ec.useEffect)(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),(0,M9.jsx)(pI,{...i,"data-orientation":"vertical",ref:d,sizes:r,style:{"--sa-thumb-height":`${Yl(r)}px`,...o},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),mI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Xi(s.paddingTop),paddingEnd:Xi(s.paddingBottom)}})}})});_6.displayName="@mantine/core/ScrollAreaScrollbarY";var Fd=(0,Nd.forwardRef)((e,t)=>{let{orientation:r="vertical",...n}=e,{dir:o}=ei(),i=cr(),a=(0,Nd.useRef)(null),s=(0,Nd.useRef)(0),[l,c]=(0,Nd.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=uI(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:m=>{s.current=m}},f=(m,p)=>N9(m,s.current,l,p);return r==="horizontal"?(0,I6.jsx)(y6,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollLeft,p=v6(m,l,o);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,o))}}):r==="vertical"?(0,I6.jsx)(_6,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollTop,p=v6(m,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null});Fd.displayName="@mantine/core/ScrollAreaScrollbarVisible";var Hg=(0,hI.forwardRef)((e,t)=>{let r=cr(),{forceMount:n,...o}=e,[i,a]=(0,hI.useState)(!1),s=e.orientation==="horizontal",l=vs(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:d)}},10);return As(r.viewport,l),As(r.content,l),n||i?(0,B9.jsx)(Fd,{"data-state":i?"visible":"hidden",...o,ref:t}):null});Hg.displayName="@mantine/core/ScrollAreaScrollbarAuto";var j9=b(O(),1),sm=b(R(),1);var w6=(0,sm.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),[i,a]=(0,sm.useState)(!1);return(0,sm.useEffect)(()=>{let{scrollArea:s}=o,l=0;if(s){let c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),r||i?(0,j9.jsx)(Hg,{"data-state":i?"visible":"hidden",...n,ref:t}):null});w6.displayName="@mantine/core/ScrollAreaScrollbarHover";var U9=b(O(),1),Ld=b(R(),1);var V9=(0,Ld.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),i=e.orientation==="horizontal",[a,s]=(0,Ld.useState)("hidden"),l=vs(()=>s("idle"),100);return(0,Ld.useEffect)(()=>{if(a==="idle"){let c=window.setTimeout(()=>s("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay]),(0,Ld.useEffect)(()=>{let{viewport:c}=o,d=i?"scrollLeft":"scrollTop";if(c){let u=c[d],f=()=>{let m=c[d];u!==m&&(s("scrolling"),l()),u=m};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l]),r||a!=="hidden"?(0,U9.jsx)(Fd,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ra(e.onPointerEnter,()=>s("interacting")),onPointerLeave:Ra(e.onPointerLeave,()=>s("idle"))}):null});var vI=(0,gI.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return(0,gI.useEffect)(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?(0,Wg.jsx)(w6,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Wg.jsx)(V9,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Wg.jsx)(Hg,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Wg.jsx)(Fd,{...n,ref:t}):null});vI.displayName="@mantine/core/ScrollAreaScrollbar";var S6=b(O(),1),Md=b(R(),1);function H9(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){let i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)}var W9=(0,Md.forwardRef)((e,t)=>{let{style:r,...n}=e,o=cr(),i=x6(),{onThumbPositionChange:a}=i,s=Ve(t,d=>i.onThumbChange(d)),l=(0,Md.useRef)(void 0),c=vs(()=>{l.current&&(l.current(),l.current=void 0)},100);return(0,Md.useEffect)(()=>{let{viewport:d}=o;if(d){let u=()=>{if(c(),!l.current){let f=H9(d,a);l.current=f,a()}};return a(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,c,a]),(0,S6.jsx)("div",{"data-state":i.hasThumb?"visible":"hidden",...n,ref:s,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Ra(e.onPointerDownCapture,d=>{let f=d.target.getBoundingClientRect(),m=d.clientX-f.left,p=d.clientY-f.top;i.onThumbPointerDown({x:m,y:p})}),onPointerUp:Ra(e.onPointerUp,i.onThumbPointerUp)})});W9.displayName="@mantine/core/ScrollAreaThumb";var xI=(0,Md.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=x6();return r||o.hasThumb?(0,S6.jsx)(W9,{ref:t,...n}):null});xI.displayName="@mantine/core/ScrollAreaThumb";var k6=b(O(),1),Z9=b(R(),1);var C6=(0,Z9.forwardRef)(({children:e,style:t,...r},n)=>{let o=cr(),i=Ve(n,o.onViewportChange);return(0,k6.jsx)(F,{...r,ref:i,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:(0,k6.jsx)("div",{style:{minWidth:"100%"},ref:o.onContentChange,children:e})})});C6.displayName="@mantine/core/ScrollAreaViewport";var bI={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};var G9={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},bae=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":W(t),"--scrollarea-over-scroll-behavior":r}}),$r=M((e,t)=>{let r=z("ScrollArea",G9,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,scrollbarSize:l,vars:c,type:d,scrollHideDelay:u,viewportProps:f,viewportRef:m,onScrollPositionChange:p,children:h,offsetScrollbars:y,scrollbars:x,onBottomReached:v,onTopReached:_,overscrollBehavior:I,...S}=r,[w,P]=(0,tc.useState)(!1),[E,B]=(0,tc.useState)(!1),[H,Z]=(0,tc.useState)(!1),q=K({name:"ScrollArea",props:r,classes:bI,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:bae}),T=(0,tc.useRef)(null),k=w9([m,T]);return(0,tc.useEffect)(()=>{if(!T.current||y!=="present")return;let $=T.current,C=new ResizeObserver(()=>{let{scrollHeight:A,clientHeight:D,scrollWidth:N,clientWidth:U}=$;B(A>D),Z(N>U)});return C.observe($),()=>C.disconnect()},[T,y]),(0,di.jsxs)(g6,{type:d==="never"?"always":d,scrollHideDelay:u,ref:t,scrollbars:x,...q("root"),...S,children:[(0,di.jsx)(C6,{...f,...q("viewport",{style:f?.style}),ref:k,"data-offset-scrollbars":y===!0?"xy":y||void 0,"data-scrollbars":x||void 0,"data-horizontal-hidden":y==="present"&&!H?"true":void 0,"data-vertical-hidden":y==="present"&&!E?"true":void 0,onScroll:$=>{f?.onScroll?.($),p?.({x:$.currentTarget.scrollLeft,y:$.currentTarget.scrollTop});let{scrollTop:C,scrollHeight:A,clientHeight:D}=$.currentTarget;C-(A-D)>=-.6&&v?.(),C===0&&_?.()},children:h}),(x==="xy"||x==="x")&&(0,di.jsx)(vI,{...q("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||y==="present"&&!H?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,di.jsx)(xI,{...q("thumb")})}),(x==="xy"||x==="y")&&(0,di.jsx)(vI,{...q("scrollbar"),orientation:"vertical","data-hidden":d==="never"||y==="present"&&!E?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,di.jsx)(xI,{...q("thumb")})}),(0,di.jsx)(z9,{...q("corner"),"data-hovered":w||void 0,"data-hidden":d==="never"||void 0})]})});$r.displayName="@mantine/core/ScrollArea";var yI=M((e,t)=>{let{children:r,classNames:n,styles:o,scrollbarSize:i,scrollHideDelay:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,scrollbars:h,style:y,vars:x,onBottomReached:v,onTopReached:_,...I}=z("ScrollAreaAutosize",G9,e);return(0,di.jsx)(F,{...I,ref:t,style:[{display:"flex",overflow:"auto"},y],children:(0,di.jsx)(F,{style:{display:"flex",flexDirection:"column",flex:1},children:(0,di.jsx)($r,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:i,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,vars:x,scrollbars:h,onBottomReached:v,onTopReached:_,children:r})})})});$r.classes=bI;yI.displayName="@mantine/core/ScrollAreaAutosize";yI.classes=bI;$r.Autosize=yI;var q9=b(O(),1),UTe=b(R(),1);var P6={root:"m_87cf2631"};var yae={__staticSelector:"UnstyledButton"},xt=ot((e,t)=>{let r=z("UnstyledButton",yae,e),{className:n,component:o="button",__staticSelector:i,unstyled:a,classNames:s,styles:l,style:c,...d}=r,u=K({name:i,props:r,classes:P6,className:n,style:c,classNames:s,styles:l,unstyled:a});return(0,q9.jsx)(F,{...u("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...d})});xt.classes=P6;xt.displayName="@mantine/core/UnstyledButton";var K9=b(O(),1),QTe=b(R(),1);var D6={root:"m_515a97f8"};var _ae={},_I=M((e,t)=>{let r=z("VisuallyHidden",_ae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,...c}=r,d=K({name:"VisuallyHidden",classes:D6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return(0,K9.jsx)(F,{component:"span",ref:t,...d("root"),...c})});_I.classes=D6;_I.displayName="@mantine/core/VisuallyHidden";var X9=b(O(),1),a$e=b(R(),1);var R6={root:"m_1b7284a3"};var Iae={},wae=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Ee(t),"--paper-shadow":uf(r)}}),Qi=ot((e,t)=>{let r=z("Paper",Iae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,withBorder:l,vars:c,radius:d,shadow:u,variant:f,mod:m,...p}=r,h=K({name:"Paper",props:r,classes:R6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:wae});return(0,X9.jsx)(F,{ref:t,mod:[{"data-with-border":l},m],...h("root"),variant:f,...p})});Qi.classes=R6;Qi.displayName="@mantine/core/Paper";var um=b(O(),1),Ta=b(R(),1);function II(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){let[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var ej=b(O(),1),tj=b(R(),1);function Q9(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function Y9(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}var Sae={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function J9({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){let[l,c="center"]=e.split("-"),d={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[Sae[l]]:n},u=-t/2;return l==="left"?{...d,...Q9(c,a,r,o),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...d,...Q9(c,a,r,o),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...d,...Y9(c,i,r,o,s),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...d,...Y9(c,i,r,o,s),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}var Zg=(0,tj.forwardRef)(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:i,arrowX:a,arrowY:s,style:l,...c},d)=>{let{dir:u}=ei();return i?(0,ej.jsx)("div",{...c,ref:d,style:{...l,...J9({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:u,arrowX:a,arrowY:s})}}):null});Zg.displayName="@mantine/core/FloatingArrow";var rj=b(O(),1);var w$e=b(R(),1);var E6={root:"m_9814e45f"};var kae={zIndex:Pt("modal")},Cae=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:i,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&Jn(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${W(o)})`:void 0,"--overlay-radius":i===void 0?void 0:Ee(i),"--overlay-z-index":a?.toString()}}),lm=ot((e,t)=>{let r=z("Overlay",kae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,fixed:c,center:d,children:u,radius:f,zIndex:m,gradient:p,blur:h,color:y,backgroundOpacity:x,mod:v,..._}=r,I=K({name:"Overlay",props:r,classes:E6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Cae});return(0,rj.jsx)(F,{ref:t,...I("root"),mod:[{center:d,fixed:c},v],..._,children:u})});lm.classes=E6;lm.displayName="@mantine/core/Overlay";var wI=b(O(),1),SI=b(R(),1),oj=b(ql(),1);function T6(e){let t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function Pae({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||T6(r):e;if(t){let n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;let o=T6(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return T6(r)}var Dae={},$6=M((e,t)=>{let{children:r,target:n,reuseTargetNode:o,...i}=z("Portal",Dae,e),[a,s]=(0,SI.useState)(!1),l=(0,SI.useRef)(null);return Lo(()=>(s(!0),l.current=Pae({target:n,reuseTargetNode:o,...i}),sd(t,l.current),!n&&!o&&l.current&&document.body.appendChild(l.current),()=>{!n&&!o&&l.current&&document.body.removeChild(l.current)}),[n]),!a||!l.current?null:(0,oj.createPortal)((0,wI.jsx)(wI.Fragment,{children:r}),l.current)});$6.displayName="@mantine/core/Portal";var Gg=b(O(),1),M$e=b(R(),1);var _n=M(({withinPortal:e=!0,children:t,...r},n)=>xy()==="test"||!e?(0,Gg.jsx)(Gg.Fragment,{children:t}):(0,Gg.jsx)($6,{ref:n,...r,children:t}));_n.displayName="@mantine/core/OptionalPortal";var cm=b(O(),1),J$e=b(R(),1);var qg=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Kg={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...qg("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...qg("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...qg("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...qg("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...qg("top"),common:{transformOrigin:"top right"}}};var nj={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function ij({transition:e,state:t,duration:r,timingFunction:n}){let o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Kg?{transitionProperty:Kg[e].transitionProperty,...o,...Kg[e].common,...Kg[e][nj[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[nj[t]]}}var Os=b(R(),1),aj=b(ql(),1);var K$e=b(O(),1);function sj({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s,enterDelay:l,exitDelay:c}){let d=lt(),u=bs(),f=d.respectReducedMotion?u:!1,[m,p]=(0,Os.useState)(f?0:e),[h,y]=(0,Os.useState)(n?"entered":"exited"),x=(0,Os.useRef)(-1),v=(0,Os.useRef)(-1),_=(0,Os.useRef)(-1);function I(){window.clearTimeout(x.current),window.clearTimeout(v.current),cancelAnimationFrame(_.current)}let S=P=>{I();let E=P?o:i,B=P?a:s,H=f?0:P?e:t;p(H),H===0?(typeof E=="function"&&E(),typeof B=="function"&&B(),y(P?"entered":"exited")):_.current=requestAnimationFrame(()=>{aj.default.flushSync(()=>{y(P?"pre-entering":"pre-exiting")}),_.current=requestAnimationFrame(()=>{typeof E=="function"&&E(),y(P?"entering":"exiting"),x.current=window.setTimeout(()=>{typeof B=="function"&&B(),y(P?"entered":"exited")},H)})})},w=P=>{if(I(),typeof(P?l:c)!="number"){S(P);return}v.current=window.setTimeout(()=>{S(P)},P?l:c)};return br(()=>{w(n)},[n]),(0,Os.useEffect)(()=>()=>{I()},[]),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:r||"ease"}}function Vo({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a="ease",onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f}){let m=xy(),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:y}=sj({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f});return p===0||m==="test"?o?(0,cm.jsx)(cm.Fragment,{children:i({})}):e?i({display:"none"}):null:h==="exited"?e?i({display:"none"}):null:(0,cm.jsx)(cm.Fragment,{children:i(ij({transition:t,duration:p,state:h,timingFunction:y}))})}Vo.displayName="@mantine/core/Transition";var i5e=b(R(),1);var s5e=b(O(),1);var[lj,kI]=Vt("Popover component was not found in the tree");var Bd=b(O(),1);var x5e=b(R(),1);var cj=b(O(),1),dj=b(R(),1);function dm({children:e,active:t=!0,refProp:r="ref",innerRef:n}){let o=d2(t),i=Ve(o,n);return yo(e)?(0,dj.cloneElement)(e,{[r]:i}):e}function uj(e){return(0,cj.jsx)(_I,{tabIndex:-1,"data-autofocus":!0,...e})}dm.displayName="@mantine/core/FocusTrap";uj.displayName="@mantine/core/FocusTrapInitialFocus";dm.InitialFocus=uj;var CI={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};var Rae={},PI=M((e,t)=>{let r=z("PopoverDropdown",Rae,e),{className:n,style:o,vars:i,children:a,onKeyDownCapture:s,variant:l,classNames:c,styles:d,...u}=r,f=kI(),m=Ah({opened:f.opened,shouldReturnFocus:f.returnFocus}),p=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},h=Ve(t,f.floating);return f.disabled?null:(0,Bd.jsx)(_n,{...f.portalProps,withinPortal:f.withinPortal,children:(0,Bd.jsx)(Vo,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||"fade",duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration=="number"?f.transitionProps.exitDuration:f.transitionProps?.duration,children:y=>(0,Bd.jsx)(dm,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,Bd.jsxs)(F,{...p,...u,variant:l,onKeyDownCapture:IF(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:m,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:c,styles:d,style:[{...y,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:W(f.width)},f.resolvedStyles.dropdown,d?.dropdown,o]}),children:[a,(0,Bd.jsx)(Zg,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:c,styles:d})})]})})})})});PI.classes=CI;PI.displayName="@mantine/core/PopoverDropdown";var fj=b(R(),1);var O5e=b(O(),1);var Eae={refProp:"ref",popupType:"dialog"},A6=M((e,t)=>{let{children:r,refProp:n,popupType:o,...i}=z("PopoverTarget",Eae,e);if(!yo(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let a=i,s=kI(),l=Ve(s.reference,Sl(r),t),c=s.withRoles?{"aria-haspopup":o,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return(0,fj.cloneElement)(r,{...a,...c,...s.targetProps,className:Ze(s.targetProps.className,a.className,r.props.className),[n]:l,...s.controlled?null:{onClick:s.onToggle}})});A6.displayName="@mantine/core/PopoverTarget";var mj=b(R(),1);var DI=b(R(),1);function RI({opened:e,floating:t,position:r,positionDependencies:n}){let[o,i]=(0,DI.useState)(0);(0,DI.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return iI(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),br(()=>{t.update()},n),br(()=>{i(a=>a+1)},[e])}function Tae(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function $ae(e,t){let r=Tae(e.middlewares),n=[om(e.offset)];return r.shift&&n.push(Od(typeof r.shift=="boolean"?{limiter:cI(),padding:5}:{limiter:cI(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?zd():zd(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?Ql():Ql(r.inline)),n.push(Vg({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(a6({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:i,availableHeight:a,...s}){let c=t().refs.floating.current?.style??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:i,availableHeight:a,...s}):Object.assign(c,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(c,{width:`${o.reference.width}px`})}})),n}function pj(e){let[t,r]=rt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=(0,mj.useRef)(t),o=()=>{t&&!e.disabled&&r(!1)},i=()=>!e.disabled&&r(!t),a=im({strategy:e.strategy,placement:e.position,middleware:$ae(e,()=>a)});return RI({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),br(()=>{e.onPositionChange?.(a.placement)},[a.placement]),br(()=>{t!==n.current&&(t?e.onOpen?.():e.onClose?.()),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:i}}var Aae={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Pt("popover"),__staticSelector:"Popover",width:"max-content"},Oae=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Ee(t),"--popover-shadow":uf(r)}});function Gr(e){let t=z("Popover",Aae,e),{children:r,position:n,offset:o,onPositionChange:i,positionDependencies:a,opened:s,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:d,width:u,middlewares:f,withArrow:m,arrowSize:p,arrowOffset:h,arrowRadius:y,arrowPosition:x,unstyled:v,classNames:_,styles:I,closeOnClickOutside:S,withinPortal:w,portalProps:P,closeOnEscape:E,clickOutsideEvents:B,trapFocus:H,onClose:Z,onDismiss:q,onOpen:T,onChange:k,zIndex:$,radius:C,shadow:A,id:D,defaultOpened:N,__staticSelector:U,withRoles:G,disabled:re,returnFocus:ge,variant:me,keepMounted:X,vars:oe,floatingStrategy:Ie,withOverlay:se,overlayProps:$e,...Ue}=t,Je=K({name:U,props:t,classes:CI,classNames:_,styles:I,unstyled:v,rootSelector:"dropdown",vars:oe,varsResolver:Oae}),{resolvedStyles:at}=Vr({classNames:_,styles:I,props:t}),ze=(0,Ta.useRef)(null),[Kt,Xt]=(0,Ta.useState)(null),[io,pe]=(0,Ta.useState)(null),{dir:ue}=ei(),Se=pt(D),Ae=pj({middlewares:f,width:u,position:II(ue,n),offset:typeof o=="number"?o+(m?p/2:0):o,arrowRef:ze,arrowOffset:h,onPositionChange:i,positionDependencies:a,opened:s,defaultOpened:N,onChange:k,onOpen:T,onClose:Z,onDismiss:q,strategy:Ie,disabled:re});s2(()=>{S&&(Ae.onClose(),q?.())},B,[Kt,io]);let Xe=(0,Ta.useCallback)(Pe=>{Xt(Pe),Ae.floating.refs.setReference(Pe)},[Ae.floating.refs.setReference]),Fe=(0,Ta.useCallback)(Pe=>{pe(Pe),Ae.floating.refs.setFloating(Pe)},[Ae.floating.refs.setFloating]),et=(0,Ta.useCallback)(()=>{l?.onExited?.(),c?.()},[l?.onExited,c]),de=(0,Ta.useCallback)(()=>{l?.onEntered?.(),d?.()},[l?.onEntered,d]);return(0,um.jsxs)(lj,{value:{returnFocus:ge,disabled:re,controlled:Ae.controlled,reference:Xe,floating:Fe,x:Ae.floating.x,y:Ae.floating.y,arrowX:Ae.floating?.middlewareData?.arrow?.x,arrowY:Ae.floating?.middlewareData?.arrow?.y,opened:Ae.opened,arrowRef:ze,transitionProps:{...l,onExited:et,onEntered:de},width:u,withArrow:m,arrowSize:p,arrowOffset:h,arrowRadius:y,arrowPosition:x,placement:Ae.floating.placement,trapFocus:H,withinPortal:w,portalProps:P,zIndex:$,radius:C,shadow:A,closeOnEscape:E,onDismiss:q,onClose:Ae.onClose,onToggle:Ae.onToggle,getTargetId:()=>`${Se}-target`,getDropdownId:()=>`${Se}-dropdown`,withRoles:G,targetProps:Ue,__staticSelector:U,classNames:_,styles:I,unstyled:v,variant:me,keepMounted:X,getStyles:Je,resolvedStyles:at,floatingStrategy:Ie},children:[r,se&&(0,um.jsx)(Vo,{transition:"fade",mounted:Ae.opened,duration:l?.duration||250,exitDuration:l?.exitDuration||250,children:Pe=>(0,um.jsx)(_n,{withinPortal:w,children:(0,um.jsx)(lm,{...$e,...Je("overlay",{className:$e?.className,style:[Pe,$e?.style]})})})})]})}Gr.Target=A6;Gr.Dropdown=PI;Gr.displayName="@mantine/core/Popover";Gr.extend=e=>e;var jd=b(O(),1),rOe=b(R(),1);var F6=b(O(),1),SAe=b(R(),1);var fm=b(O(),1),hj=b(R(),1);var Ho={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};var O6=(0,hj.forwardRef)(({className:e,...t},r)=>(0,fm.jsxs)(F,{component:"span",className:Ze(Ho.barsLoader,e),...t,ref:r,children:[(0,fm.jsx)("span",{className:Ho.bar}),(0,fm.jsx)("span",{className:Ho.bar}),(0,fm.jsx)("span",{className:Ho.bar})]}));O6.displayName="@mantine/core/Bars";var mm=b(O(),1),gj=b(R(),1);var z6=(0,gj.forwardRef)(({className:e,...t},r)=>(0,mm.jsxs)(F,{component:"span",className:Ze(Ho.dotsLoader,e),...t,ref:r,children:[(0,mm.jsx)("span",{className:Ho.dot}),(0,mm.jsx)("span",{className:Ho.dot}),(0,mm.jsx)("span",{className:Ho.dot})]}));z6.displayName="@mantine/core/Dots";var vj=b(O(),1),xj=b(R(),1);var N6=(0,xj.forwardRef)(({className:e,...t},r)=>(0,vj.jsx)(F,{component:"span",className:Ze(Ho.ovalLoader,e),...t,ref:r}));N6.displayName="@mantine/core/Oval";var L6={bars:O6,oval:N6,dots:z6},zae={loaders:L6,type:"oval"},Nae=(e,{size:t,color:r})=>({root:{"--loader-size":xe(t,"loader-size"),"--loader-color":r?He(r,e):void 0}}),uo=M((e,t)=>{let r=z("Loader",zae,e),{size:n,color:o,type:i,vars:a,className:s,style:l,classNames:c,styles:d,unstyled:u,loaders:f,variant:m,children:p,...h}=r,y=K({name:"Loader",props:r,classes:Ho,className:s,style:l,classNames:c,styles:d,unstyled:u,vars:a,varsResolver:Nae});return p?(0,F6.jsx)(F,{...y("root"),ref:t,...h,children:p}):(0,F6.jsx)(F,{...y("root"),ref:t,component:f[i],variant:m,size:n,...h})});uo.defaultLoaders=L6;uo.classes=Ho;uo.displayName="@mantine/core/Loader";var yj=b(O(),1);var MAe=b(R(),1);var zs={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};var bj={orientation:"horizontal"},Fae=(e,{borderWidth:t})=>({group:{"--ai-border-width":W(t)}}),EI=M((e,t)=>{let r=z("ActionIconGroup",bj,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ActionIconGroup",bj,e),p=K({name:"ActionIconGroup",props:r,classes:zs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:Fae,rootSelector:"group"});return(0,yj.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});EI.classes=zs;EI.displayName="@mantine/core/ActionIconGroup";var Ij=b(O(),1),GAe=b(R(),1);var _j={},Lae=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":wt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},TI=M((e,t)=>{let r=z("ActionIconGroupSection",_j,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ActionIconGroupSection",_j,e),p=K({name:"ActionIconGroupSection",props:r,classes:zs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:Lae,rootSelector:"groupSection"});return(0,Ij.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});TI.classes=zs;TI.displayName="@mantine/core/ActionIconGroupSection";var Mae={},Bae=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":xe(t,"ai-size"),"--ai-radius":r===void 0?void 0:Ee(r),"--ai-bg":i||n?s.background:void 0,"--ai-hover":i||n?s.hover:void 0,"--ai-hover-color":i||n?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":i||n?s.border:void 0}}},bt=ot((e,t)=>{let r=z("ActionIcon",Mae,e),{className:n,unstyled:o,variant:i,classNames:a,styles:s,style:l,loading:c,loaderProps:d,size:u,color:f,radius:m,__staticSelector:p,gradient:h,vars:y,children:x,disabled:v,"data-disabled":_,autoContrast:I,mod:S,...w}=r,P=K({name:["ActionIcon",p],props:r,className:n,style:l,classes:zs,classNames:a,styles:s,unstyled:o,vars:y,varsResolver:Bae});return(0,jd.jsxs)(xt,{...P("root",{active:!v&&!c&&!_}),...w,unstyled:o,variant:i,size:u,disabled:v||c,ref:t,mod:[{loading:c,disabled:v||_},S],children:[(0,jd.jsx)(Vo,{mounted:!!c,transition:"slide-down",duration:150,children:E=>(0,jd.jsx)(F,{component:"span",...P("loader",{style:E}),"aria-hidden":!0,children:(0,jd.jsx)(uo,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),(0,jd.jsx)(F,{component:"span",mod:{loading:c},...P("icon"),children:x})]})});bt.classes=zs;bt.displayName="@mantine/core/ActionIcon";bt.Group=EI;bt.GroupSection=TI;var M6=b(O(),1),wj=b(R(),1),B6=(0,wj.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>(0,M6.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:(0,M6.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));B6.displayName="@mantine/core/CloseIcon";var $I=b(O(),1);var bOe=b(R(),1);var j6={root:"m_86a44da5","root--subtle":"m_220c80f2"};var jae={variant:"subtle"},Uae=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":xe(t,"cb-size"),"--cb-radius":r===void 0?void 0:Ee(r),"--cb-icon-size":W(n)}}),ui=ot((e,t)=>{let r=z("CloseButton",jae,e),{iconSize:n,children:o,vars:i,radius:a,className:s,classNames:l,style:c,styles:d,unstyled:u,"data-disabled":f,disabled:m,variant:p,icon:h,mod:y,__staticSelector:x,...v}=r,_=K({name:x||"CloseButton",props:r,className:s,style:c,classes:j6,classNames:l,styles:d,unstyled:u,vars:i,varsResolver:Uae});return(0,$I.jsxs)(xt,{ref:t,...v,unstyled:u,variant:p,disabled:m,mod:[{disabled:m||f},y],..._("root",{variant:p,active:!m&&!f}),children:[h||(0,$I.jsx)(B6,{}),o]})});ui.classes=j6;ui.displayName="@mantine/core/CloseButton";var Cj=b(O(),1),TOe=b(R(),1);var Sj=b(R(),1);function kj(e){return Sj.Children.toArray(e).filter(Boolean)}var U6={root:"m_4081bf90"};var Vae={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Hae=(e,{grow:t,preventGrowOverflow:r,gap:n,align:o,justify:i,wrap:a},{childWidth:s})=>({root:{"--group-child-width":t&&r?s:void 0,"--group-gap":Tt(n),"--group-align":o,"--group-justify":i,"--group-wrap":a}}),De=M((e,t)=>{let r=z("Group",Vae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,children:l,gap:c,align:d,justify:u,wrap:f,grow:m,preventGrowOverflow:p,vars:h,variant:y,__size:x,mod:v,..._}=r,I=kj(l),S=I.length,w=Tt(c??"md"),E={childWidth:`calc(${100/S}% - (${w} - ${w} / ${S}))`},B=K({name:"Group",props:r,stylesCtx:E,className:o,style:i,classes:U6,classNames:n,styles:a,unstyled:s,vars:h,varsResolver:Hae});return(0,Cj.jsx)(F,{...B("root"),ref:t,variant:y,mod:[{grow:m},v],size:x,..._,children:I})});De.classes=U6;De.displayName="@mantine/core/Group";var Xg=b(O(),1),Ej=b(R(),1);var jOe=b(R(),1);var VOe=b(O(),1);var[Pj,qr]=Vt("ModalBase component was not found in tree");var V6=b(R(),1);var pm=b(R(),1);function Dj({opened:e,transitionDuration:t}){let[r,n]=(0,pm.useState)(e),o=(0,pm.useRef)(-1),a=bs()?0:t;return(0,pm.useEffect)(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function Rj({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:i,returnFocus:a}){let s=pt(e),[l,c]=(0,V6.useState)(!1),[d,u]=(0,V6.useState)(!1),f=typeof t?.duration=="number"?t?.duration:200,m=Dj({opened:r,transitionDuration:f});return wl("keydown",p=>{p.key==="Escape"&&o&&!p.isComposing&&r&&p.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&i()},{capture:!0}),Ah({opened:r,shouldReturnFocus:n&&a}),{_id:s,titleMounted:l,bodyMounted:d,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:u}}var H6=(0,Ej.forwardRef)(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:i,onEnterTransitionEnd:a,trapFocus:s,closeOnEscape:l,returnFocus:c,closeOnClickOutside:d,withinPortal:u,portalProps:f,lockScroll:m,children:p,zIndex:h,shadow:y,padding:x,__vars:v,unstyled:_,removeScrollProps:I,...S},w)=>{let{_id:P,titleMounted:E,bodyMounted:B,shouldLockScroll:H,setTitleMounted:Z,setBodyMounted:q}=Rj({id:n,transitionProps:o,opened:t,trapFocus:s,closeOnEscape:l,onClose:r,returnFocus:c}),{key:T,...k}=I||{};return(0,Xg.jsx)(_n,{...f,withinPortal:u,children:(0,Xg.jsx)(Pj,{value:{opened:t,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:i,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${P}-title`,getBodyId:()=>`${P}-body`,titleMounted:E,bodyMounted:B,setTitleMounted:Z,setBodyMounted:q,trapFocus:s,closeOnEscape:l,zIndex:h,unstyled:_},children:(0,Xg.jsx)(Ni,{enabled:H&&m,...k,children:(0,Xg.jsx)(F,{ref:w,...S,__vars:{...v,"--mb-z-index":(h||Pt("modal")).toString(),"--mb-shadow":uf(y),"--mb-padding":Tt(x)},children:p})},T)})})});H6.displayName="@mantine/core/ModalBase";var Aj=b(O(),1),Oj=b(R(),1);var Tj=b(R(),1);function $j(){let e=qr();return(0,Tj.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Yi={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};var W6=(0,Oj.forwardRef)(({className:e,...t},r)=>{let n=$j(),o=qr();return(0,Aj.jsx)(F,{ref:r,...t,id:n,className:Ze({[Yi.body]:!o.unstyled},e)})});W6.displayName="@mantine/core/ModalBaseBody";var zj=b(O(),1),Nj=b(R(),1);var Z6=(0,Nj.forwardRef)(({className:e,onClick:t,...r},n)=>{let o=qr();return(0,zj.jsx)(ui,{ref:n,...r,onClick:i=>{o.onClose(),t?.(i)},className:Ze({[Yi.close]:!o.unstyled},e),unstyled:o.unstyled})});Z6.displayName="@mantine/core/ModalBaseCloseButton";var Qg=b(O(),1),Fj=b(R(),1);var G6=(0,Fj.forwardRef)(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...i},a)=>{let s=qr();return(0,Qg.jsx)(Vo,{mounted:s.opened,transition:"pop",...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:l=>(0,Qg.jsx)("div",{...r,className:Ze({[Yi.inner]:!s.unstyled},r.className),children:(0,Qg.jsx)(dm,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,Qg.jsx)(Qi,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[o,l],className:Ze({[Yi.content]:!s.unstyled},t),unstyled:s.unstyled,children:i.children})})})})});G6.displayName="@mantine/core/ModalBaseContent";var Lj=b(O(),1),Mj=b(R(),1);var q6=(0,Mj.forwardRef)(({className:e,...t},r)=>{let n=qr();return(0,Lj.jsx)(F,{component:"header",ref:r,className:Ze({[Yi.header]:!n.unstyled},e),...t})});q6.displayName="@mantine/core/ModalBaseHeader";var K6=b(O(),1),jj=b(R(),1);var Wae={duration:200,timingFunction:"ease",transition:"fade"};function Bj(e){let t=qr();return{...Wae,...t.transitionProps,...e}}var X6=(0,jj.forwardRef)(({onClick:e,transitionProps:t,style:r,visible:n,...o},i)=>{let a=qr(),s=Bj(t);return(0,K6.jsx)(Vo,{mounted:n!==void 0?n:a.opened,...s,transition:"fade",children:l=>(0,K6.jsx)(lm,{ref:i,fixed:!0,style:[r,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e?.(c),a.closeOnClickOutside&&a.onClose()},...o})})});X6.displayName="@mantine/core/ModalBaseOverlay";var Hj=b(O(),1),Wj=b(R(),1);var Uj=b(R(),1);function Vj(){let e=qr();return(0,Uj.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var Q6=(0,Wj.forwardRef)(({className:e,...t},r)=>{let n=Vj(),o=qr();return(0,Hj.jsx)(F,{component:"h2",ref:r,className:Ze({[Yi.title]:!o.unstyled},e),...t,id:n})});Q6.displayName="@mantine/core/ModalBaseTitle";var AI=b(O(),1);function Zj({children:e}){return(0,AI.jsx)(AI.Fragment,{children:e})}var Ud=b(O(),1);var gNe=b(R(),1);var qze=b(R(),1),Kze=b(O(),1);var[Gj,qj]=_o({size:"sm"});var Kj=b(O(),1),Jze=b(R(),1);var Zae={},Y6=M((e,t)=>{let r=z("InputClearButton",Zae,e),{size:n,variant:o,vars:i,classNames:a,styles:s,...l}=r,c=qj(),{resolvedClassNames:d,resolvedStyles:u}=Vr({classNames:a,styles:s,props:r});return(0,Kj.jsx)(ui,{variant:o||"transparent",ref:t,size:n||c?.size||"sm",classNames:d,styles:u,__staticSelector:"InputClearButton",...l})});Y6.displayName="@mantine/core/InputClearButton";var Yj=b(O(),1);var p3e=b(R(),1);var s3e=b(R(),1),l3e=b(O(),1);var[Xj,fi]=_o({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Kr={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};var Qj={},Gae=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),hm=M((e,t)=>{let r=z("InputDescription",Qj,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=z("InputDescription",Qj,r),p=fi(),h=K({name:["InputWrapper",d],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"description",vars:l,varsResolver:Gae}),y=u&&p?.getStyles||h;return(0,Yj.jsx)(F,{component:"p",ref:t,variant:f,size:c,...y("description",p?.getStyles?{className:o,style:i}:void 0),...m})});hm.classes=Kr;hm.displayName="@mantine/core/InputDescription";var Jj=b(O(),1);var k3e=b(R(),1);var qae={},Kae=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),gm=M((e,t)=>{let r=z("InputError",qae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=r,p=K({name:["InputWrapper",d],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"error",vars:l,varsResolver:Kae}),h=fi(),y=u&&h?.getStyles||p;return(0,Jj.jsx)(F,{component:"p",ref:t,variant:f,size:c,...y("error",h?.getStyles?{className:o,style:i}:void 0),...m})});gm.classes=Kr;gm.displayName="@mantine/core/InputError";var OI=b(O(),1),z3e=b(R(),1);var eU={labelElement:"label"},Xae=(e,{size:t})=>({label:{"--input-label-size":wt(t),"--input-asterisk-color":void 0}}),vm=M((e,t)=>{let r=z("InputLabel",eU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,labelElement:c,size:d,required:u,htmlFor:f,onMouseDown:m,children:p,__staticSelector:h,variant:y,mod:x,...v}=z("InputLabel",eU,r),_=K({name:["InputWrapper",h],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"label",vars:l,varsResolver:Xae}),I=fi(),S=I?.getStyles||_;return(0,OI.jsxs)(F,{...S("label",I?.getStyles?{className:o,style:i}:void 0),component:c,variant:y,size:d,ref:t,htmlFor:c==="label"?f:void 0,mod:[{required:u},x],onMouseDown:w=>{m?.(w),!w.defaultPrevented&&w.detail>1&&w.preventDefault()},...v,children:[p,u&&(0,OI.jsx)("span",{...S("required"),"aria-hidden":!0,children:" *"})]})});vm.classes=Kr;vm.displayName="@mantine/core/InputLabel";var rU=b(O(),1),W3e=b(R(),1);var tU={},zI=M((e,t)=>{let r=z("InputPlaceholder",tU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,variant:d,error:u,mod:f,...m}=z("InputPlaceholder",tU,r),p=K({name:["InputPlaceholder",c],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"placeholder"});return(0,rU.jsx)(F,{...p("placeholder"),mod:[{error:!!u},f],component:"span",variant:d,ref:t,...m})});zI.classes=Kr;zI.displayName="@mantine/core/InputPlaceholder";var xm=b(O(),1),NI=b(R(),1);function oU(e,{hasDescription:t,hasError:r}){let n=e.findIndex(l=>l==="input"),o=e.slice(0,n),i=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&i.includes("description")||r&&i.includes("error"),offsetTop:a}}var Qae={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Yae=(e,{size:t})=>({label:{"--input-label-size":wt(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),FI=M((e,t)=>{let r=z("InputWrapper",Qae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,variant:d,__staticSelector:u,inputContainer:f,inputWrapperOrder:m,label:p,error:h,description:y,labelProps:x,descriptionProps:v,errorProps:_,labelElement:I,children:S,withAsterisk:w,id:P,required:E,__stylesApiProps:B,mod:H,...Z}=r,q=K({name:["InputWrapper",u],props:B||r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Yae}),T={size:c,variant:d,__staticSelector:u},k=pt(P),$=typeof w=="boolean"?w:E,C=_?.id||`${k}-error`,A=v?.id||`${k}-description`,D=k,N=!!h&&typeof h!="boolean",U=!!y,G=`${N?C:""} ${U?A:""}`,re=G.trim().length>0?G.trim():void 0,ge=x?.id||`${k}-label`,me=p&&(0,xm.jsx)(vm,{labelElement:I,id:ge,htmlFor:D,required:$,...T,...x,children:p},"label"),X=U&&(0,xm.jsx)(hm,{...v,...T,size:v?.size||T.size,id:v?.id||A,children:y},"description"),oe=(0,xm.jsx)(NI.Fragment,{children:f(S)},"input"),Ie=N&&(0,NI.createElement)(gm,{..._,...T,size:_?.size||T.size,key:"error",id:_?.id||C},h),se=m.map($e=>{switch($e){case"label":return me;case"input":return oe;case"description":return X;case"error":return Ie;default:return null}});return(0,xm.jsx)(Xj,{value:{getStyles:q,describedBy:re,inputId:D,labelId:ge,...oU(m,{hasDescription:U,hasError:N})},children:(0,xm.jsx)(F,{ref:t,variant:d,size:c,mod:[{error:!!h},H],...q("root"),...Z,children:se})})});FI.classes=Kr;FI.displayName="@mantine/core/InputWrapper";var Jae={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},ese=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":xe(t.size,"input-height"),"--input-fz":wt(t.size),"--input-radius":t.radius===void 0?void 0:Ee(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?W(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?W(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?xe(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),ct=ot((e,t)=>{let r=z("Input",Jae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,required:l,__staticSelector:c,__stylesApiProps:d,size:u,wrapperProps:f,error:m,disabled:p,leftSection:h,leftSectionProps:y,leftSectionWidth:x,rightSection:v,rightSectionProps:_,rightSectionWidth:I,rightSectionPointerEvents:S,leftSectionPointerEvents:w,variant:P,vars:E,pointer:B,multiline:H,radius:Z,id:q,withAria:T,withErrorStyles:k,mod:$,inputSize:C,__clearSection:A,__clearable:D,__defaultRightSection:N,...U}=r,{styleProps:G,rest:re}=Hr(U),ge=fi(),me={offsetBottom:ge?.offsetBottom,offsetTop:ge?.offsetTop},X=K({name:["Input",c],props:d||r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,stylesCtx:me,rootSelector:"wrapper",vars:E,varsResolver:ese}),oe=T?{required:l,disabled:p,"aria-invalid":!!m,"aria-describedby":ge?.describedBy,id:ge?.inputId||q}:{},Ie=v||D&&A||N;return(0,Ud.jsx)(Gj,{value:{size:u||"sm"},children:(0,Ud.jsxs)(F,{...X("wrapper"),...G,...f,mod:[{error:!!m&&k,pointer:B,disabled:p,multiline:H,"data-with-right-section":!!Ie,"data-with-left-section":!!h},$],variant:P,size:u,children:[h&&(0,Ud.jsx)("div",{...y,"data-position":"left",...X("section",{className:y?.className,style:y?.style}),children:h}),(0,Ud.jsx)(F,{component:"input",...re,...oe,ref:t,required:l,mod:{disabled:p,error:!!m&&k},variant:P,__size:C,...X("input")}),Ie&&(0,Ud.jsx)("div",{..._,"data-position":"right",...X("section",{className:_?.className,style:_?.style}),children:Ie})]})})});ct.classes=Kr;ct.Wrapper=FI;ct.Label=vm;ct.Error=gm;ct.Description=hm;ct.Placeholder=zI;ct.ClearButton=Y6;ct.displayName="@mantine/core/Input";var ONe=b(R(),1),zNe=b(O(),1);function nU(e,t,r){let n=z(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:d,unstyled:u,__staticSelector:f,__stylesApiProps:m,errorProps:p,labelProps:h,descriptionProps:y,wrapperProps:x,id:v,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:E,vars:B,mod:H,...Z}=n,{styleProps:q,rest:T}=Hr(Z),k={label:o,description:i,error:a,required:s,classNames:l,className:d,__staticSelector:f,__stylesApiProps:m||n,errorProps:p,labelProps:h,descriptionProps:y,unstyled:u,styles:c,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:E,id:v,mod:H,...x};return{...T,classNames:l,styles:c,unstyled:u,wrapperProps:{...k,...q},inputProps:{required:s,classNames:l,styles:c,unstyled:u,size:_,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:E,id:v}}}var J6=b(O(),1),BNe=b(R(),1);var tse={__staticSelector:"InputBase",withAria:!0},Yt=ot((e,t)=>{let{inputProps:r,wrapperProps:n,...o}=nU("InputBase",tse,e);return(0,J6.jsx)(ct.Wrapper,{...n,children:(0,J6.jsx)(ct,{...r,...o,ref:t})})});Yt.classes={...ct.classes,...ct.Wrapper.classes};Yt.displayName="@mantine/core/InputBase";var aU=b(O(),1),sU=b(R(),1);var $a=b(R(),1);var GNe=b(O(),1);function rse(e,t){if(!t||!e)return!1;let r=t.parentNode;for(;r!=null;){if(r===e)return!0;r=r.parentNode}return!1}function iU({target:e,parent:t,ref:r,displayAfterTransitionEnd:n}){let o=(0,$a.useRef)(-1),[i,a]=(0,$a.useState)(!1),[s,l]=(0,$a.useState)(typeof n=="boolean"?n:!1),c=()=>{if(!e||!t||!r.current)return;let m=e.getBoundingClientRect(),p=t.getBoundingClientRect(),h=window.getComputedStyle(e),y=window.getComputedStyle(t),x=Xi(h.borderTopWidth)+Xi(y.borderTopWidth),v=Xi(h.borderLeftWidth)+Xi(y.borderLeftWidth),_={top:m.top-p.top-x,left:m.left-p.left-v,width:m.width,height:m.height};r.current.style.transform=`translateY(${_.top}px) translateX(${_.left}px)`,r.current.style.width=`${_.width}px`,r.current.style.height=`${_.height}px`},d=()=>{window.clearTimeout(o.current),r.current&&(r.current.style.transitionDuration="0ms"),c(),o.current=window.setTimeout(()=>{r.current&&(r.current.style.transitionDuration="")},30)},u=(0,$a.useRef)(null),f=(0,$a.useRef)(null);return(0,$a.useEffect)(()=>{if(c(),e)return u.current=new ResizeObserver(d),u.current.observe(e),t&&(f.current=new ResizeObserver(d),f.current.observe(t)),()=>{u.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,$a.useEffect)(()=>{if(t){let m=p=>{rse(p.target,t)&&(d(),l(!1))};return t.addEventListener("transitionend",m),()=>{t.removeEventListener("transitionend",m)}}},[t]),g2(()=>{gy()!=="test"&&a(!0)},20,{autoInvoke:!0}),x2(m=>{m.forEach(p=>{p.type==="attributes"&&p.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:s}}var eD={root:"m_96b553a6"};var ose={},nse=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),LI=M((e,t)=>{let r=z("FloatingIndicator",ose,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,target:c,parent:d,transitionDuration:u,mod:f,displayAfterTransitionEnd:m,...p}=r,h=K({name:"FloatingIndicator",classes:eD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:nse}),y=(0,sU.useRef)(null),{initialized:x,hidden:v}=iU({target:c,parent:d,ref:y,displayAfterTransitionEnd:m}),_=Ve(t,y);return!c||!d?null:(0,aU.jsx)(F,{ref:_,mod:[{initialized:x,hidden:v},f],...h("root"),...p})});LI.displayName="@mantine/core/FloatingIndicator";LI.classes=eD;var tD=b(O(),1);var cFe=b(R(),1);function rD({style:e,size:t=16,...r}){return(0,tD.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:W(t),height:W(t),display:"block"},...r,children:(0,tD.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}rD.displayName="@mantine/core/AccordionChevron";var Aa=b(O(),1);var pFe=b(R(),1);var oD={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};var ise={},ase=(e,{radius:t,color:r,variant:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:n||"light",autoContrast:o});return{root:{"--alert-radius":t===void 0?void 0:Ee(t),"--alert-bg":r||n?i.background:void 0,"--alert-color":i.color,"--alert-bd":r||n?i.border:void 0}}},Oa=M((e,t)=>{let r=z("Alert",ise,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,title:u,children:f,id:m,icon:p,withCloseButton:h,onClose:y,closeButtonLabel:x,variant:v,autoContrast:_,...I}=r,S=K({name:"Alert",classes:oD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ase}),w=pt(m),P=u&&`${w}-title`||void 0,E=`${w}-body`;return(0,Aa.jsx)(F,{id:w,...S("root",{variant:v}),variant:v,ref:t,...I,role:"alert","aria-describedby":E,"aria-labelledby":P,children:(0,Aa.jsxs)("div",{...S("wrapper"),children:[p&&(0,Aa.jsx)("div",{...S("icon"),children:p}),(0,Aa.jsxs)("div",{...S("body"),children:[u&&(0,Aa.jsx)("div",{...S("title"),"data-with-close-button":h||void 0,children:(0,Aa.jsx)("span",{id:P,...S("label"),children:u})}),f&&(0,Aa.jsx)("div",{id:E,...S("message"),"data-variant":v,children:f})]}),h&&(0,Aa.jsx)(ui,{...S("closeButton"),onClick:y,variant:"transparent",size:16,iconSize:16,"aria-label":x,unstyled:s})]})})});Oa.classes=oD;Oa.displayName="@mantine/core/Alert";var cU=b(O(),1);var LFe=b(R(),1);var lU=b(O(),1),kFe=b(R(),1);var nD={root:"m_b6d8b162"};function sse(e){if(e==="start")return"start";if(e==="end"||e)return"end"}var lse={inherit:!1},cse=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:i})=>({root:{"--text-fz":wt(o),"--text-lh":wF(o),"--text-gradient":t==="gradient"?Lh(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":i?He(i,e):void 0}}),ye=ot((e,t)=>{let r=z("Text",lse,e),{lineClamp:n,truncate:o,inline:i,inherit:a,gradient:s,span:l,__staticSelector:c,vars:d,className:u,style:f,classNames:m,styles:p,unstyled:h,variant:y,mod:x,size:v,..._}=r,I=K({name:["Text",c],props:r,classes:nD,className:u,style:f,classNames:m,styles:p,unstyled:h,vars:d,varsResolver:cse});return(0,lU.jsx)(F,{...I("root",{focusable:!0}),ref:t,component:l?"span":"p",variant:y,mod:[{"data-truncate":sse(o),"data-line-clamp":typeof n=="number","data-inline":i,"data-inherit":a},x],size:v,..._})});ye.classes=nD;ye.displayName="@mantine/core/Text";var iD={root:"m_849cf0da"};var dse={underline:"hover"},Yg=ot((e,t)=>{let{underline:r,className:n,unstyled:o,mod:i,...a}=z("Anchor",dse,e);return(0,cU.jsx)(ye,{component:"a",ref:t,className:Ze({[iD.root]:!o},n),...a,mod:[{underline:r},i],__staticSelector:"Anchor",unstyled:o})});Yg.classes=iD;Yg.displayName="@mantine/core/Anchor";var Jg=b(O(),1),pBe=b(R(),1);var HFe=b(R(),1);var ZFe=b(O(),1);var[dU,mi]=Vt("AppShell was not found in tree");var uU=b(O(),1),XFe=b(R(),1);var Wo={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};var use={},MI=M((e,t)=>{let r=z("AppShellAside",use,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,uU.jsx)(F,{component:"aside",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("aside",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-aside-z-index":`calc(${d??m.zIndex} + 1)`}})});MI.classes=Wo;MI.displayName="@mantine/core/AppShellAside";var fU=b(O(),1);var aLe=b(R(),1);var fse={},BI=M((e,t)=>{let r=z("AppShellFooter",fse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,fU.jsx)(F,{component:"footer",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("footer",{className:Ze({[Ni.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-footer-z-index":(d??m.zIndex)?.toString()}})});BI.classes=Wo;BI.displayName="@mantine/core/AppShellFooter";var mU=b(O(),1);var hLe=b(R(),1);var mse={},jI=M((e,t)=>{let r=z("AppShellHeader",mse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,mU.jsx)(F,{component:"header",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("header",{className:Ze({[Ni.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-header-z-index":(d??m.zIndex)?.toString()}})});jI.classes=Wo;jI.displayName="@mantine/core/AppShellHeader";var pU=b(O(),1),ILe=b(R(),1);var pse={},UI=M((e,t)=>{let r=z("AppShellMain",pse,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=mi();return(0,pU.jsx)(F,{component:"main",ref:t,...c.getStyles("main",{className:o,style:i,classNames:n,styles:a}),...l})});UI.classes=Wo;UI.displayName="@mantine/core/AppShellMain";var _U=b(O(),1),VMe=b(R(),1);var AMe=b(R(),1),OMe=b(O(),1);var zLe=b(R(),1),NLe=b(O(),1);function za(e){return typeof e=="object"?e.base:e}function Na(e){let t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function Fa(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function hU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:n,theme:o}){let i=n?.width,a="translateX(var(--app-shell-aside-width))",s="translateX(calc(var(--app-shell-aside-width) * -1))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-aside-width"]="100%",r[n?.breakpoint]["--app-shell-aside-offset"]="0px"),Na(i)){let l=W(za(i));e["--app-shell-aside-width"]=l,e["--app-shell-aside-offset"]=l}if(Fa(i)&&(typeof i.base<"u"&&(e["--app-shell-aside-width"]=W(i.base),e["--app-shell-aside-offset"]=W(i.base)),ut(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-aside-width"]=W(i[l]),t[l]["--app-shell-aside-offset"]=W(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-aside-transform"]=a,t[l]["--app-shell-aside-transform-rtl"]=s,t[l]["--app-shell-aside-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=ff(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-aside-width"]="100%",r[l]["--app-shell-aside-offset"]="0px",r[l]["--app-shell-aside-transform"]=a,r[l]["--app-shell-aside-transform-rtl"]=s}}var WLe=b(R(),1),ZLe=b(O(),1);function gU({baseStyles:e,minMediaStyles:t,footer:r}){let n=r?.height,o="translateY(var(--app-shell-footer-height))",i=r?.offset??!0;if(Na(n)){let a=W(za(n));e["--app-shell-footer-height"]=a,i&&(e["--app-shell-footer-offset"]=a)}Fa(n)&&(typeof n.base<"u"&&(e["--app-shell-footer-height"]=W(n.base),i&&(e["--app-shell-footer-offset"]=W(n.base))),ut(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=W(n[a]),i&&(t[a]["--app-shell-footer-offset"]=W(n[a])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=o,e["--app-shell-footer-offset"]="0px !important")}var eMe=b(R(),1),tMe=b(O(),1);function vU({baseStyles:e,minMediaStyles:t,header:r}){let n=r?.height,o="translateY(calc(var(--app-shell-header-height) * -1))",i=r?.offset??!0;if(Na(n)){let a=W(za(n));e["--app-shell-header-height"]=a,i&&(e["--app-shell-header-offset"]=a)}Fa(n)&&(typeof n.base<"u"&&(e["--app-shell-header-height"]=W(n.base),i&&(e["--app-shell-header-offset"]=W(n.base))),ut(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=W(n[a]),i&&(t[a]["--app-shell-header-offset"]=W(n[a])))})),r?.collapsed&&(e["--app-shell-header-transform"]=o,e["--app-shell-header-offset"]="0px !important")}var cMe=b(R(),1),dMe=b(O(),1);function xU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:n,theme:o}){let i=n?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",s="translateX(var(--app-shell-navbar-width))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-navbar-width"]="100%",r[n?.breakpoint]["--app-shell-navbar-offset"]="0px"),Na(i)){let l=W(za(i));e["--app-shell-navbar-width"]=l,e["--app-shell-navbar-offset"]=l}if(Fa(i)&&(typeof i.base<"u"&&(e["--app-shell-navbar-width"]=W(i.base),e["--app-shell-navbar-offset"]=W(i.base)),ut(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-navbar-width"]=W(i[l]),t[l]["--app-shell-navbar-offset"]=W(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-navbar-transform"]=a,t[l]["--app-shell-navbar-transform-rtl"]=s,t[l]["--app-shell-navbar-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=ff(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-navbar-width"]="100%",r[l]["--app-shell-navbar-offset"]="0px",r[l]["--app-shell-navbar-transform"]=a,r[l]["--app-shell-navbar-transform-rtl"]=s}}var wMe=b(R(),1),SMe=b(O(),1);var vMe=b(R(),1),xMe=b(O(),1);function VI(e){return Number(e)===0?"0px":Tt(e)}function bU({padding:e,baseStyles:t,minMediaStyles:r}){Na(e)&&(t["--app-shell-padding"]=VI(za(e))),Fa(e)&&(e.base&&(t["--app-shell-padding"]=VI(e.base)),ut(e).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=VI(e[n]))}))}function yU({navbar:e,header:t,footer:r,aside:n,padding:o,theme:i}){let a={},s={},l={};xU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,navbar:e,theme:i}),hU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,aside:n,theme:i}),vU({baseStyles:l,minMediaStyles:a,header:t}),gU({baseStyles:l,minMediaStyles:a,footer:r}),bU({baseStyles:l,minMediaStyles:a,padding:o});let c=Eh(ut(a),i.breakpoints).map(f=>({query:`(min-width: ${rd(f.px)})`,styles:a[f.value]})),d=Eh(ut(s),i.breakpoints).map(f=>({query:`(max-width: ${rd(f.px)})`,styles:s[f.value]})),u=[...c,...d];return{baseStyles:l,media:u}}function IU({navbar:e,header:t,aside:r,footer:n,padding:o}){let i=lt(),a=pa(),{media:s,baseStyles:l}=yU({navbar:e,header:t,footer:n,aside:r,padding:o,theme:i});return(0,_U.jsx)(md,{media:s,styles:l,selector:a.cssVariablesSelector})}var wU=b(O(),1),XMe=b(R(),1);var hse={},HI=M((e,t)=>{let r=z("AppShellNavbar",hse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,wU.jsx)(F,{component:"nav",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("navbar",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${d??m.zIndex} + 1)`}})});HI.classes=Wo;HI.displayName="@mantine/core/AppShellNavbar";var SU=b(O(),1),nBe=b(R(),1);var gse={},WI=ot((e,t)=>{let r=z("AppShellSection",gse,e),{classNames:n,className:o,style:i,styles:a,vars:s,grow:l,mod:c,...d}=r,u=mi();return(0,SU.jsx)(F,{ref:t,mod:[{grow:l},c],...u.getStyles("section",{className:o,style:i,classNames:n,styles:a}),...d})});WI.classes=Wo;WI.displayName="@mantine/core/AppShellSection";var rc=b(R(),1);function kU({transitionDuration:e,disabled:t}){let[r,n]=(0,rc.useState)(!0),o=(0,rc.useRef)(-1),i=(0,rc.useRef)(-1);return wl("resize",()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>(0,rc.startTransition)(()=>{n(!1)}),200)}),Lo(()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,rc.startTransition)(()=>{n(!1)}),e||0)},[t,e]),r}var vse={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Pt("app")},xse=(e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}}),Ar=M((e,t)=>{let r=z("AppShell",vse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,navbar:c,withBorder:d,padding:u,transitionDuration:f,transitionTimingFunction:m,header:p,zIndex:h,layout:y,disabled:x,aside:v,footer:_,offsetScrollbars:I=y!=="alt",mod:S,...w}=r,P=K({name:"AppShell",classes:Wo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xse}),E=kU({disabled:x,transitionDuration:f});return(0,Jg.jsxs)(dU,{value:{getStyles:P,withBorder:d,zIndex:h,disabled:x,offsetScrollbars:I},children:[(0,Jg.jsx)(IU,{navbar:c,header:p,aside:v,footer:_,padding:u}),(0,Jg.jsx)(F,{ref:t,...P("root"),mod:[{resizing:E,layout:y,disabled:x},S],...w})]})});Ar.classes=Wo;Ar.displayName="@mantine/core/AppShell";Ar.Navbar=HI;Ar.Header=jI;Ar.Main=UI;Ar.Aside=MI;Ar.Footer=BI;Ar.Section=WI;function CU(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>CU(t))}:e}function bm(e){return e?e.map(t=>CU(t)):[]}function Vd(e){return e.reduce((t,r)=>"group"in r?{...t,...Vd(r.items)}:(t[r.value]=r,t),{})}var aD=b(O(),1),zBe=b(R(),1);var Zt={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};var bse={error:null},yse=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":xe(t,"combobox-chevron-size"),"--combobox-chevron-color":r?He(r,e):void 0}}),ZI=M((e,t)=>{let r=z("ComboboxChevron",bse,e),{size:n,error:o,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,mod:u,...f}=r,m=K({name:"ComboboxChevron",classes:Zt,props:r,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,varsResolver:yse,rootSelector:"chevron"});return(0,aD.jsx)(F,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},u],ref:t,children:(0,aD.jsx)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ZI.classes=Zt;ZI.displayName="@mantine/core/ComboboxChevron";var fD=b(O(),1);var W8e=b(R(),1);var WBe=b(R(),1);var GBe=b(O(),1);var[PU,Jt]=Vt("Combobox component was not found in tree");var DU=b(O(),1),RU=b(R(),1);var sD=(0,RU.forwardRef)(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},i)=>(0,DU.jsx)(ct.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t?.(a)},onClick:a=>{n(),r?.(a)}}));sD.displayName="@mantine/core/ComboboxClearButton";var EU=b(O(),1),JBe=b(R(),1);var _se={},GI=M((e,t)=>{let{classNames:r,styles:n,className:o,style:i,hidden:a,...s}=z("ComboboxDropdown",_se,e),l=Jt();return(0,EU.jsx)(Gr.Dropdown,{...s,ref:t,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:o,style:i,classNames:r,styles:n})})});GI.classes=Zt;GI.displayName="@mantine/core/ComboboxDropdown";var TU=b(O(),1);var l7e=b(R(),1);var Ise={refProp:"ref"},lD=M((e,t)=>{let{children:r,refProp:n}=z("ComboboxDropdownTarget",Ise,e);if(Jt(),!yo(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return(0,TU.jsx)(Gr.Target,{ref:t,refProp:n,children:r})});lD.displayName="@mantine/core/ComboboxDropdownTarget";var $U=b(O(),1),h7e=b(R(),1);var wse={},qI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxEmpty",wse,e),l=Jt();return(0,$U.jsx)(F,{ref:t,...l.getStyles("empty",{className:n,classNames:r,styles:i,style:o}),...s})});qI.classes=Zt;qI.displayName="@mantine/core/ComboboxEmpty";var OU=b(R(),1);var P7e=b(O(),1);var AU=b(R(),1);function ym({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:i}){let a=Jt(),[s,l]=(0,AU.useState)(null),c=u=>{if(e?.(u),!a.readOnly&&t){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;let f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(u.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(u.preventDefault(),a.store.openDropdown("keyboard"))}u.key==="Escape"&&a.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&o==="button"&&(u.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&s||void 0,autoComplete:i,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:c}}var Sse={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},cD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxEventsTarget",Sse,e);if(!yo(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=Jt(),u=ym({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l});return(0,OU.cloneElement)(r,{...u,...c,[n]:Ve(t,d.store.targetRef,Sl(r))})});cD.displayName="@mantine/core/ComboboxEventsTarget";var zU=b(O(),1),z7e=b(R(),1);var kse={},KI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxFooter",kse,e),l=Jt();return(0,zU.jsx)(F,{ref:t,...l.getStyles("footer",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});KI.classes=Zt;KI.displayName="@mantine/core/ComboboxFooter";var XI=b(O(),1),V7e=b(R(),1);var Cse={},QI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,children:s,label:l,...c}=z("ComboboxGroup",Cse,e),d=Jt();return(0,XI.jsxs)(F,{ref:t,...d.getStyles("group",{className:n,classNames:r,style:o,styles:i}),...c,children:[l&&(0,XI.jsx)("div",{...d.getStyles("groupLabel",{classNames:r,styles:i}),children:l}),s]})});QI.classes=Zt;QI.displayName="@mantine/core/ComboboxGroup";var NU=b(O(),1),Q7e=b(R(),1);var Pse={},YI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxHeader",Pse,e),l=Jt();return(0,NU.jsx)(F,{ref:t,...l.getStyles("header",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});YI.classes=Zt;YI.displayName="@mantine/core/ComboboxHeader";var FU=b(O(),1);function dD({value:e,valuesDivider:t=",",...r}){return(0,FU.jsx)("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}dD.displayName="@mantine/core/ComboboxHiddenInput";var LU=b(O(),1),MU=b(R(),1);var Dse={},JI=M((e,t)=>{let r=z("ComboboxOption",Dse,e),{classNames:n,className:o,style:i,styles:a,vars:s,onClick:l,id:c,active:d,onMouseDown:u,onMouseOver:f,disabled:m,selected:p,mod:h,...y}=r,x=Jt(),v=(0,MU.useId)(),_=c||v;return(0,LU.jsx)(F,{...x.getStyles("option",{className:o,classNames:n,styles:a,style:i}),...y,ref:t,id:_,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":m,"combobox-selected":p},h],role:"option",onClick:I=>{m?I.preventDefault():(x.onOptionSubmit?.(r.value,r),l?.(I))},onMouseDown:I=>{I.preventDefault(),u?.(I)},onMouseOver:I=>{x.resetSelectionOnOptionHover&&x.store.resetSelectedOption(),f?.(I)}})});JI.classes=Zt;JI.displayName="@mantine/core/ComboboxOption";var BU=b(O(),1),jU=b(R(),1);var Rse={},e0=M((e,t)=>{let r=z("ComboboxOptions",Rse,e),{classNames:n,className:o,style:i,styles:a,id:s,onMouseDown:l,labelledBy:c,...d}=r,u=Jt(),f=pt(s);return(0,jU.useEffect)(()=>{u.store.setListId(f)},[f]),(0,BU.jsx)(F,{ref:t,...u.getStyles("options",{className:o,style:i,classNames:n,styles:a}),...d,id:f,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l?.(m)}})});e0.classes=Zt;e0.displayName="@mantine/core/ComboboxOptions";var UU=b(O(),1);var I8e=b(R(),1);var Ese={withAriaAttributes:!0,withKeyboardNavigation:!0},t0=M((e,t)=>{let r=z("ComboboxSearch",Ese,e),{classNames:n,styles:o,unstyled:i,vars:a,withAriaAttributes:s,onKeyDown:l,withKeyboardNavigation:c,size:d,...u}=r,f=Jt(),m=f.getStyles("search"),p=ym({targetType:"input",withAriaAttributes:s,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return(0,UU.jsx)(ct,{ref:Ve(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:d||f.size,...p,...u,__staticSelector:"Combobox"})});t0.classes=Zt;t0.displayName="@mantine/core/ComboboxSearch";var VU=b(O(),1),HU=b(R(),1);var Tse={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},uD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxTarget",Tse,e);if(!yo(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=Jt(),u=ym({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l}),f=(0,HU.cloneElement)(r,{...u,...c});return(0,VU.jsx)(Gr.Target,{ref:Ve(t,d.store.targetRef),children:f})});uD.displayName="@mantine/core/ComboboxTarget";var $t=b(R(),1);function WU(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function ZU(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function GU(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function oc({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:i=!0,scrollBehavior:a="instant"}={}){let[s,l]=rt({value:t,defaultValue:e,finalValue:!1,onChange:r}),c=(0,$t.useRef)(null),d=(0,$t.useRef)(-1),u=(0,$t.useRef)(null),f=(0,$t.useRef)(null),m=(0,$t.useRef)(-1),p=(0,$t.useRef)(-1),h=(0,$t.useRef)(-1),y=(0,$t.useCallback)((C="unknown")=>{s||(l(!0),o?.(C))},[l,o,s]),x=(0,$t.useCallback)((C="unknown")=>{s&&(l(!1),n?.(C))},[l,n,s]),v=(0,$t.useCallback)((C="unknown")=>{s?x(C):y(C)},[x,y,s]),_=(0,$t.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-selected]`);C?.removeAttribute("data-combobox-selected"),C?.removeAttribute("aria-selected")},[]),I=(0,$t.useCallback)(C=>{let D=document.getElementById(c.current)?.querySelectorAll("[data-combobox-option]");if(!D)return null;let N=C>=D.length?0:C<0?D.length-1:C;return d.current=N,D?.[N]&&!D[N].hasAttribute("data-combobox-disabled")?(_(),D[N].setAttribute("data-combobox-selected","true"),D[N].setAttribute("aria-selected","true"),D[N].scrollIntoView({block:"nearest",behavior:a}),D[N].id):null},[a,_]),S=(0,$t.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-active]`);if(C){let A=document.querySelectorAll(`#${c.current} [data-combobox-option]`),D=Array.from(A).findIndex(N=>N===C);return I(D)}return I(0)},[I]),w=(0,$t.useCallback)(()=>I(ZU(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),P=(0,$t.useCallback)(()=>I(WU(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),E=(0,$t.useCallback)(()=>I(GU(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[I]),B=(0,$t.useCallback)((C="selected",A)=>{h.current=window.setTimeout(()=>{let D=document.querySelectorAll(`#${c.current} [data-combobox-option]`),N=Array.from(D).findIndex(U=>U.hasAttribute(`data-combobox-${C}`));d.current=N,A?.scrollIntoView&&D[N]?.scrollIntoView({block:"nearest",behavior:a})},0)},[]),H=(0,$t.useCallback)(()=>{d.current=-1,_()},[_]),Z=(0,$t.useCallback)(()=>{document.querySelectorAll(`#${c.current} [data-combobox-option]`)?.[d.current]?.click()},[]),q=(0,$t.useCallback)(C=>{c.current=C},[]),T=(0,$t.useCallback)(()=>{m.current=window.setTimeout(()=>u.current.focus(),0)},[]),k=(0,$t.useCallback)(()=>{p.current=window.setTimeout(()=>f.current.focus(),0)},[]),$=(0,$t.useCallback)(()=>d.current,[]);return(0,$t.useEffect)(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(p.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:y,closeDropdown:x,toggleDropdown:v,selectedOptionIndex:d.current,getSelectedOptionIndex:$,selectOption:I,selectFirstOption:E,selectActiveOption:S,selectNextOption:w,selectPreviousOption:P,resetSelectedOption:H,updateSelectedOptionIndex:B,listId:c.current,setListId:q,clickSelectedOption:Z,searchRef:u,focusSearchInput:T,targetRef:f,focusTarget:k}}var $se={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Ase=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":wt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:W(r),"--combobox-option-fz":wt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")}});function Be(e){let t=z("Combobox",$se,e),{classNames:r,styles:n,unstyled:o,children:i,store:a,vars:s,onOptionSubmit:l,onClose:c,size:d,dropdownPadding:u,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:p,...h}=t,y=oc(),x=a||y,v=K({name:m||"Combobox",classes:Zt,props:t,classNames:r,styles:n,unstyled:o,vars:s,varsResolver:Ase}),_=()=>{c?.(),x.closeDropdown()};return(0,fD.jsx)(PU,{value:{getStyles:v,store:x,onOptionSubmit:l,size:d,resetSelectionOnOptionHover:f,readOnly:p},children:(0,fD.jsx)(Gr,{opened:x.dropdownOpened,...h,onChange:I=>!I&&_(),withRoles:!1,unstyled:o,children:i})})}var Ose=e=>e;Be.extend=Ose;Be.classes=Zt;Be.displayName="@mantine/core/Combobox";Be.Target=uD;Be.Dropdown=GI;Be.Options=e0;Be.Option=JI;Be.Search=t0;Be.Empty=qI;Be.Chevron=ZI;Be.Footer=KI;Be.Header=YI;Be.EventsTarget=cD;Be.DropdownTarget=lD;Be.Group=QI;Be.ClearButton=sD;Be.HiddenInput=dD;var Zo=b(O(),1);var wm=b(O(),1),d0=b(R(),1);var nc=b(O(),1),qU=b(R(),1);var mD={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};var r0=mD,Hd=(0,qU.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:i,children:a,label:s,description:l,id:c,disabled:d,error:u,size:f,labelPosition:m="left",bodyElement:p="div",labelElement:h="label",variant:y,style:x,vars:v,mod:_,...I},S)=>{let w=K({name:e,props:t,className:r,style:x,classes:mD,classNames:n,styles:o,unstyled:i});return(0,nc.jsx)(F,{...w("root"),ref:S,__vars:{"--label-fz":wt(f),"--label-lh":xe(f,"label-lh")},mod:[{"label-position":m},_],variant:y,size:f,...I,children:(0,nc.jsxs)(F,{component:p,htmlFor:p==="label"?c:void 0,...w("body"),children:[a,(0,nc.jsxs)("div",{...w("labelWrapper"),"data-disabled":d||void 0,children:[s&&(0,nc.jsx)(F,{component:h,htmlFor:h==="label"?c:void 0,...w("label"),"data-disabled":d||void 0,children:s}),l&&(0,nc.jsx)(ct.Description,{size:f,__inheritStyles:!1,...w("description"),children:l}),u&&typeof u!="boolean"&&(0,nc.jsx)(ct.Error,{size:f,__inheritStyles:!1,...w("error"),children:u})]})]})})});Hd.displayName="@mantine/core/InlineInput";var hD=b(O(),1);var T9e=b(R(),1);var o0=b(R(),1),KU=(0,o0.createContext)(null),XU=KU.Provider,n0=()=>(0,o0.useContext)(KU);var S9e=b(R(),1),k9e=b(O(),1);var[QU,YU]=_o();var pD={card:"m_26775b0a"};var zse={withBorder:!0},Nse=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),i0=M((e,t)=>{let r=z("CheckboxCard",zse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,defaultChecked:p,onChange:h,...y}=r,x=K({name:"CheckboxCard",classes:pD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Nse,rootSelector:"card"}),v=n0(),_=typeof c=="boolean"?c:v?v.value.includes(f||""):void 0,[I,S]=rt({value:_,defaultValue:p,finalValue:!1,onChange:h});return(0,hD.jsx)(QU,{value:{checked:I},children:(0,hD.jsx)(xt,{ref:t,mod:[{"with-border":u,checked:I},d],...x("card"),...y,role:"checkbox","aria-checked":I,onClick:w=>{m?.(w),v?.onChange(f||""),S(!I)}})})});i0.displayName="@mantine/core/CheckboxCard";i0.classes=pD;var a0=b(O(),1);var G9e=b(R(),1);var ev=b(O(),1);var U9e=b(R(),1);function _m({children:e,role:t}){let r=fi();return r?(0,ev.jsx)("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):(0,ev.jsx)(ev.Fragment,{children:e})}var Fse={},s0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("CheckboxGroup",Fse,e),[d,u]=rt({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,a0.jsx)(XU,{value:{value:d,onChange:m=>{let p=typeof m=="string"?m:m.currentTarget.value;!l&&u(d.includes(p)?d.filter(h=>h!==p):[...d,p])},size:i},children:(0,a0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"CheckboxGroup",children:(0,a0.jsx)(_m,{role:"group",children:s})})})});s0.classes=ct.Wrapper.classes;s0.displayName="@mantine/core/CheckboxGroup";var xD=b(O(),1),aje=b(R(),1);var Im=b(O(),1);var rje=b(R(),1);function gD({size:e,style:t,...r}){let n=e!==void 0?{width:W(e),height:W(e),...t}:t;return(0,Im.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:(0,Im.jsx)("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function l0({indeterminate:e,...t}){return e?(0,Im.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:(0,Im.jsx)("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):(0,Im.jsx)(gD,{...t})}var vD={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};var Lse={icon:l0},Mse=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:He(r,e),"--checkbox-icon-color":o?He(o,e):ga(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},c0=M((e,t)=>{let r=z("CheckboxIndicator",Lse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,indeterminate:d,radius:u,color:f,iconColor:m,autoContrast:p,checked:h,mod:y,variant:x,disabled:v,..._}=r,I=c,S=K({name:"CheckboxIndicator",classes:vD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Mse,rootSelector:"indicator"}),w=YU(),P=typeof h=="boolean"||typeof d=="boolean"?h||d:w?.checked||!1;return(0,xD.jsx)(F,{ref:t,...S("indicator",{variant:x}),variant:x,mod:[{checked:P,disabled:v},y],..._,children:(0,xD.jsx)(I,{indeterminate:d,...S("icon")})})});c0.displayName="@mantine/core/CheckboxIndicator";c0.classes=vD;var bD={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};var Bse={labelPosition:"right",icon:l0},jse=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:He(r,e),"--checkbox-icon-color":o?He(o,e):ga(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},Ns=M((e,t)=>{let r=z("Checkbox",Bse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,id:u,size:f,radius:m,wrapperProps:p,checked:h,labelPosition:y,description:x,error:v,disabled:_,variant:I,indeterminate:S,icon:w,rootRef:P,iconColor:E,onChange:B,autoContrast:H,mod:Z,...q}=r,T=n0(),k=f||T?.size,$=w,C=K({name:"Checkbox",props:r,classes:bD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:jse}),{styleProps:A,rest:D}=Hr(q),N=pt(u),U=T?{checked:T.value.includes(D.value),onChange:ge=>{T.onChange(ge),B?.(ge)}}:{},G=(0,d0.useRef)(null),re=t||G;return(0,d0.useEffect)(()=>{re&&"current"in re&&re.current&&(re.current.indeterminate=S||!1)},[S,re]),(0,wm.jsx)(Hd,{...C("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:N,size:k,labelPosition:y,label:d,description:x,error:v,disabled:_,classNames:n,styles:a,unstyled:s,"data-checked":U.checked||h||void 0,variant:I,ref:P,mod:Z,...A,...p,children:(0,wm.jsxs)(F,{...C("inner"),mod:{"data-label-position":y},children:[(0,wm.jsx)(F,{component:"input",id:N,ref:re,checked:h,disabled:_,mod:{error:!!v,indeterminate:S},...C("input",{focusable:!0,variant:I}),onChange:B,...D,...U,type:"checkbox"}),(0,wm.jsx)($,{indeterminate:S,...C("icon")})]})})});Ns.classes={...bD,...r0};Ns.displayName="@mantine/core/Checkbox";Ns.Group=s0;Ns.Indicator=c0;Ns.Card=i0;function pi(e){return"group"in e}function yD({options:e,search:t,limit:r}){let n=t.trim().toLowerCase(),o=[];for(let i=0;i<e.length;i+=1){let a=e[i];if(o.length===r)return o;pi(a)&&o.push({group:a.group,items:yD({options:a.items,search:t,limit:r-o.length})}),pi(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function JU(e){if(e.length===0)return!0;for(let t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function _D(e,t=new Set){if(Array.isArray(e))for(let r of e)if(pi(r))_D(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function Use(e,t){return Array.isArray(e)?e.includes(t):e===t}function eV({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:i}){if(!pi(e)){let s=Use(r,e.value),l=t&&s&&(0,Zo.jsx)(gD,{className:Zt.optionsDropdownCheckIcon}),c=(0,Zo.jsxs)(Zo.Fragment,{children:[n==="left"&&l,(0,Zo.jsx)("span",{children:e.label}),n==="right"&&l]});return(0,Zo.jsx)(Be.Option,{value:e.value,disabled:e.disabled,className:Ze({[Zt.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof i=="function"?i({option:e,checked:s}):c})}let a=e.items.map(s=>(0,Zo.jsx)(eV,{data:s,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:i},s.value));return(0,Zo.jsx)(Be.Group,{label:e.group,children:a})}function Sm({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:i,maxDropdownHeight:a,withScrollArea:s=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:d,checkIconPosition:u,nothingFoundMessage:f,unstyled:m,labelId:p,renderOption:h,scrollAreaProps:y,"aria-label":x}){_D(e);let _=typeof o=="string"?(n||yD)({options:e,search:l?o:"",limit:i??1/0}):e,I=JU(_),S=_.map(w=>(0,Zo.jsx)(eV,{data:w,withCheckIcon:c,value:d,checkIconPosition:u,unstyled:m,renderOption:h},pi(w)?w.group:w.value));return(0,Zo.jsx)(Be.Dropdown,{hidden:t||r&&I,"data-composed":!0,children:(0,Zo.jsxs)(Be.Options,{labelledBy:p,"aria-label":x,children:[s?(0,Zo.jsx)($r.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...y,children:S}):S,I&&f&&(0,Zo.jsx)(Be.Empty,{children:f})]})})}var tv=b(O(),1),m0=b(R(),1);var ID=b(O(),1),aUe=b(R(),1);var u0=b(R(),1),tV=(0,u0.createContext)(null),rV=tV.Provider;function oV(){return{withinGroup:!!(0,u0.useContext)(tV)}}var km={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};var Vse={},Hse=(e,{spacing:t})=>({group:{"--ag-spacing":Tt(t)}}),f0=M((e,t)=>{let r=z("AvatarGroup",Vse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,spacing:c,...d}=r,u=K({name:"AvatarGroup",classes:km,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Hse,rootSelector:"group"});return(0,ID.jsx)(rV,{value:!0,children:(0,ID.jsx)(F,{ref:t,...u("group"),...d})})});f0.classes=km;f0.displayName="@mantine/core/AvatarGroup";var wD=b(O(),1);function nV(e){return(0,wD.jsx)("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wD.jsx)("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Wse(e){let t=0;for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}var Zse=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function iV(e,t=Zse){let r=Wse(e),n=Math.abs(r)%t.length;return t[n]}function aV(e,t=2){let r=e.split(" ");return r.length===1?e.slice(0,t).toUpperCase():r.map(n=>n[0]).slice(0,t).join("").toUpperCase()}var Gse={},qse=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a,name:s,allowedInitialsColors:l})=>{let c=i==="initials"&&typeof s=="string"?iV(s,l):i,d=e.variantColorResolver({color:c||"gray",theme:e,gradient:o,variant:n||"light",autoContrast:a});return{root:{"--avatar-size":xe(t,"avatar-size"),"--avatar-radius":r===void 0?void 0:Ee(r),"--avatar-bg":c||n?d.background:void 0,"--avatar-color":c||n?d.color:void 0,"--avatar-bd":c||n?d.border:void 0}}},Wd=ot((e,t)=>{let r=z("Avatar",Gse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,src:c,alt:d,radius:u,color:f,gradient:m,imageProps:p,children:h,autoContrast:y,mod:x,name:v,allowedInitialsColors:_,...I}=r,S=oV(),[w,P]=(0,m0.useState)(!c),E=K({name:"Avatar",props:r,classes:km,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:qse});return(0,m0.useEffect)(()=>P(!c),[c]),(0,tv.jsx)(F,{...E("root"),mod:[{"within-group":S.withinGroup},x],ref:t,...I,children:w?(0,tv.jsx)("span",{...E("placeholder"),title:d,children:h||typeof v=="string"&&aV(v)||(0,tv.jsx)(nV,{})}):(0,tv.jsx)("img",{...p,...E("image"),src:c,alt:d,onError:B=>{P(!0),p?.onError?.(B)}})})});Wd.classes=km;Wd.displayName="@mantine/core/Avatar";Wd.Group=f0;var Cm=b(O(),1),AUe=b(R(),1);var SD={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};var Kse={},Xse=(e,{radius:t,color:r,gradient:n,variant:o,size:i,autoContrast:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:a});return{root:{"--badge-height":xe(i,"badge-height"),"--badge-padding-x":xe(i,"badge-padding-x"),"--badge-fz":xe(i,"badge-fz"),"--badge-radius":t===void 0?void 0:Ee(t),"--badge-bg":r||o?s.background:void 0,"--badge-color":r||o?s.color:void 0,"--badge-bd":r||o?s.border:void 0,"--badge-dot-color":o==="dot"?He(r,e):void 0}}},In=ot((e,t)=>{let r=z("Badge",Kse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,gradient:u,leftSection:f,rightSection:m,children:p,variant:h,fullWidth:y,autoContrast:x,circle:v,mod:_,...I}=r,S=K({name:"Badge",props:r,classes:SD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Xse});return(0,Cm.jsxs)(F,{variant:h,mod:[{block:y,circle:v,"with-right-section":!!m,"with-left-section":!!f},_],...S("root",{variant:h}),ref:t,...I,children:[f&&(0,Cm.jsx)("span",{...S("section"),"data-position":"left",children:f}),(0,Cm.jsx)("span",{...S("label"),children:p}),m&&(0,Cm.jsx)("span",{...S("section"),"data-position":"right",children:m})]})});In.classes=SD;In.displayName="@mantine/core/Badge";var p0=b(O(),1);var WUe=b(R(),1);var kD={root:"m_fea6bf1a",burger:"m_d4fb9cad"};var Qse={},Yse=(e,{color:t,size:r,lineSize:n,transitionDuration:o,transitionTimingFunction:i})=>({root:{"--burger-color":t?He(t,e):void 0,"--burger-size":xe(r,"burger-size"),"--burger-line-size":n?W(n):void 0,"--burger-transition-duration":o===void 0?void 0:`${o}ms`,"--burger-transition-timing-function":i}}),rv=M((e,t)=>{let r=z("Burger",Qse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,children:d,transitionDuration:u,transitionTimingFunction:f,lineSize:m,...p}=r,h=K({name:"Burger",classes:kD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Yse});return(0,p0.jsxs)(xt,{...h("root"),ref:t,...p,children:[(0,p0.jsx)(F,{mod:["reduce-motion",{opened:c}],...h("burger")}),d]})});rv.classes=kD;rv.displayName="@mantine/core/Burger";var La=b(O(),1);var IVe=b(R(),1);var lV=b(O(),1);var nVe=b(R(),1);var Fs={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};var sV={orientation:"horizontal"},Jse=(e,{borderWidth:t})=>({group:{"--button-border-width":W(t)}}),h0=M((e,t)=>{let r=z("ButtonGroup",sV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ButtonGroup",sV,e),p=K({name:"ButtonGroup",props:r,classes:Fs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:Jse,rootSelector:"group"});return(0,lV.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});h0.classes=Fs;h0.displayName="@mantine/core/ButtonGroup";var dV=b(O(),1),fVe=b(R(),1);var cV={},ele=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":a?.includes("compact")?wt(a.replace("compact-","")):wt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},g0=M((e,t)=>{let r=z("ButtonGroupSection",cV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ButtonGroupSection",cV,e),p=K({name:"ButtonGroupSection",props:r,classes:Fs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:ele,rootSelector:"groupSection"});return(0,dV.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});g0.classes=Fs;g0.displayName="@mantine/core/ButtonGroupSection";var tle={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${W(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},rle={},ole=(e,{radius:t,color:r,gradient:n,variant:o,size:i,justify:a,autoContrast:s})=>{let l=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{root:{"--button-justify":a,"--button-height":xe(i,"button-height"),"--button-padding-x":xe(i,"button-padding-x"),"--button-fz":i?.includes("compact")?wt(i.replace("compact-","")):wt(i),"--button-radius":t===void 0?void 0:Ee(t),"--button-bg":r||o?l.background:void 0,"--button-hover":r||o?l.hover:void 0,"--button-color":l.color,"--button-bd":r||o?l.border:void 0,"--button-hover-color":r||o?l.hoverColor:void 0}}},ht=ot((e,t)=>{let r=z("Button",rle,e),{style:n,vars:o,className:i,color:a,disabled:s,children:l,leftSection:c,rightSection:d,fullWidth:u,variant:f,radius:m,loading:p,loaderProps:h,gradient:y,classNames:x,styles:v,unstyled:_,"data-disabled":I,autoContrast:S,mod:w,...P}=r,E=K({name:"Button",props:r,classes:Fs,className:i,style:n,classNames:x,styles:v,unstyled:_,vars:o,varsResolver:ole}),B=!!c,H=!!d;return(0,La.jsxs)(xt,{ref:t,...E("root",{active:!s&&!p&&!I}),unstyled:_,variant:f,disabled:s||p,mod:[{disabled:s||I,loading:p,block:u,"with-left-section":B,"with-right-section":H},w],...P,children:[(0,La.jsx)(Vo,{mounted:!!p,transition:tle,duration:150,children:Z=>(0,La.jsx)(F,{component:"span",...E("loader",{style:Z}),"aria-hidden":!0,children:(0,La.jsx)(uo,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...h})})}),(0,La.jsxs)("span",{...E("inner"),children:[c&&(0,La.jsx)(F,{component:"span",...E("section"),mod:{position:"left"},children:c}),(0,La.jsx)(F,{component:"span",mod:{loading:p},...E("label"),children:l}),d&&(0,La.jsx)(F,{component:"span",...E("section"),mod:{position:"right"},children:d})]})]})});ht.classes=Fs;ht.displayName="@mantine/core/Button";ht.Group=h0;ht.GroupSection=g0;var CD=b(O(),1),v0=b(R(),1);var NVe=b(R(),1);var LVe=b(O(),1);var[uV,fV]=Vt("Card component was not found in tree");var mV=b(O(),1),UVe=b(R(),1);var ov={root:"m_e615b15f",section:"m_599a2148"};var nle={},nv=ot((e,t)=>{let r=z("CardSection",nle,e),{classNames:n,className:o,style:i,styles:a,vars:s,withBorder:l,inheritPadding:c,mod:d,...u}=r,f=fV();return(0,mV.jsx)(F,{ref:t,mod:[{"with-border":l,"inherit-padding":c},d],...f.getStyles("section",{className:o,style:i,styles:a,classNames:n}),...u})});nv.classes=ov;nv.displayName="@mantine/core/CardSection";var ile={},ale=(e,{padding:t})=>({root:{"--card-padding":Tt(t)}}),Or=ot((e,t)=>{let r=z("Card",ile,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,padding:d,...u}=r,f=K({name:"Card",props:r,classes:ov,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ale}),m=v0.Children.toArray(c),p=m.map((h,y)=>typeof h=="object"&&h&&"type"in h&&h.type===nv?(0,v0.cloneElement)(h,{"data-first-section":y===0||void 0,"data-last-section":y===m.length-1||void 0}):h);return(0,CD.jsx)(uV,{value:{getStyles:f},children:(0,CD.jsx)(Qi,{ref:t,unstyled:s,...f("root"),...u,children:p})})});Or.classes=ov;Or.displayName="@mantine/core/Card";Or.Section=nv;var pV=b(O(),1),sHe=b(R(),1);var PD={root:"m_4451eb3a"};var sle={},ic=ot((e,t)=>{let r=z("Center",sle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,inline:c,mod:d,...u}=r,f=K({name:"Center",props:r,classes:PD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l});return(0,pV.jsx)(F,{ref:t,mod:[{inline:c},d],...f("root"),...u})});ic.classes=PD;ic.displayName="@mantine/core/Center";var hV=b(O(),1),gHe=b(R(),1);var DD={root:"m_b183c0a2"};var lle={},cle=(e,{color:t})=>({root:{"--code-bg":t?He(t,e):void 0}}),iv=M((e,t)=>{let r=z("Code",lle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,block:d,variant:u,mod:f,...m}=r,p=K({name:"Code",props:r,classes:DD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:cle});return(0,hV.jsx)(F,{component:d?"pre":"code",variant:u,ref:t,mod:[{block:d},f],...p("root"),...m,dir:"ltr"})});iv.classes=DD;iv.displayName="@mantine/core/Code";var av=b(R(),1);function gV({open:e,close:t,openDelay:r,closeDelay:n}){let o=(0,av.useRef)(-1),i=(0,av.useRef)(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0||r===void 0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)};return(0,av.useEffect)(()=>a,[]),{openDropdown:s,closeDropdown:l}}var b0=b(O(),1),UHe=b(R(),1);var vV=b(O(),1),$He=b(R(),1);var CHe=b(R(),1),PHe=b(O(),1);function RD({color:e,theme:t,defaultShade:r}){let n=yr({color:e,theme:t});return n.isThemeColor?n.shade===void 0?`var(--mantine-color-${n.color}-${r})`:`var(${n.variable})`:e}var ED={root:"m_bcb3f3c2"};var dle={color:"yellow"},ule=(e,{color:t})=>({root:{"--mark-bg-dark":RD({color:t,theme:e,defaultShade:5}),"--mark-bg-light":RD({color:t,theme:e,defaultShade:2})}}),x0=M((e,t)=>{let r=z("Mark",dle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,variant:d,...u}=r,f=K({name:"Mark",props:r,className:o,style:i,classes:ED,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ule});return(0,vV.jsx)(F,{component:"mark",ref:t,variant:d,...f("root"),...u})});x0.classes=ED;x0.displayName="@mantine/core/Mark";function xV(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function bV(e,t){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(xV):xV(t);if(!(Array.isArray(r)?r.filter(s=>s.trim().length>0).length>0:r.trim()!==""))return[{chunk:e,highlighted:!1}];let o=typeof r=="string"?r.trim():r.filter(s=>s.trim().length!==0).map(s=>s.trim()).sort((s,l)=>l.length-s.length).join("|"),i=new RegExp(`(${o})`,"gi");return e.split(i).map(s=>({chunk:s,highlighted:i.test(s)})).filter(({chunk:s})=>s)}var fle={},sv=ot((e,t)=>{let{unstyled:r,children:n,highlight:o,highlightStyles:i,color:a,...s}=z("Highlight",fle,e),l=bV(n,o);return(0,b0.jsx)(ye,{unstyled:r,ref:t,...s,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:d},u)=>d?(0,b0.jsx)(x0,{unstyled:r,color:a,style:i,"data-highlight":c,children:c},u):(0,b0.jsx)("span",{children:c},u))})});sv.classes=ye.classes;sv.displayName="@mantine/core/Highlight";var $V=b(O(),1),AV=b(R(),1);var TV=b(O(),1);function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pm.apply(null,arguments)}function Dm(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ji=b(R());var IV=b(R());var yV=b(R()),_V=yV.useLayoutEffect;var wV=function(t){var r=IV.default.useRef(t);return _V(function(){r.current=t}),r};var TD=b(R()),SV=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},kV=function(t,r){var n=TD.default.useRef();return TD.default.useCallback(function(o){t.current=o,n.current&&SV(n.current,null),n.current=r,r&&SV(r,o)},[r])};var CV={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},mle=function(t){Object.keys(CV).forEach(function(r){t.style.setProperty(r,CV[r],"important")})},PV=mle,Go=null,DV=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function ple(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Go||(Go=document.createElement("textarea"),Go.setAttribute("tabindex","-1"),Go.setAttribute("aria-hidden","true"),PV(Go)),Go.parentNode===null&&document.body.appendChild(Go);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;Go.style[m]=a[m]}),PV(Go),Go.value=t;var l=DV(Go,e);Go.value=t,l=DV(Go,e),Go.value="x";var c=Go.scrollHeight-o,d=c*r;s==="border-box"&&(d=d+o+i),l=Math.max(d,l);var u=c*n;return s==="border-box"&&(u=u+o+i),l=Math.min(u,l),[l,c]}var RV=function(){},hle=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},gle=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],vle=!!document.documentElement.currentStyle,xle=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=hle(gle,r),o=n.boxSizing;if(o==="")return null;vle&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},ble=xle;function $D(e,t,r){var n=wV(r);Ji.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var yle=function(t,r){$D(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},_le=function(t){$D(window,"resize",t)},Ile=function(t){$D(document.fonts,"loadingdone",t)},wle=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Sle=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?RV:a,l=t.onHeightChange,c=l===void 0?RV:l,d=Dm(t,wle),u=d.value!==void 0,f=Ji.useRef(null),m=kV(f,r),p=Ji.useRef(0),h=Ji.useRef(),y=function(){var _=f.current,I=n&&h.current?h.current:ble(_);if(I){h.current=I;var S=ple(I,_.value||_.placeholder||"x",i,o),w=S[0],P=S[1];p.current!==w&&(p.current=w,_.style.setProperty("height",w+"px","important"),c(w,{rowHeight:P}))}},x=function(_){u||y(),s(_)};return Ji.useLayoutEffect(y),yle(f,function(){if(!u){var v=f.current.value;requestAnimationFrame(function(){var _=f.current;_&&v!==_.value&&y()})}}),_le(y),Ile(y),Ji.createElement("textarea",Pm({},d,{onChange:x,ref:m}))},EV=Ji.forwardRef(Sle);var lWe=b(R(),1);var kle={},y0=M((e,t)=>{let{autosize:r,maxRows:n,minRows:o,__staticSelector:i,resize:a,...s}=z("Textarea",kle,e),l=r&&gy()!=="test";return(0,TV.jsx)(Yt,{component:l?EV:"textarea",ref:t,...s,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l?{maxRows:n,minRows:o}:{}})});y0.classes=Yt.classes;y0.displayName="@mantine/core/Textarea";function AD(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var Cle={serialize:JSON.stringify,deserialize:JSON.parse},lv=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,formatOnBlur:i,validationError:a,serialize:s,deserialize:l,onFocus:c,onBlur:d,readOnly:u,error:f,...m}=z("JsonInput",Cle,e),[p,h]=rt({value:r,defaultValue:n,finalValue:"",onChange:o}),[y,x]=(0,AV.useState)(AD(p,l));return(0,$V.jsx)(y0,{value:p,onChange:I=>h(I.currentTarget.value),onFocus:I=>{c?.(I),x(!0)},onBlur:I=>{typeof d=="function"&&d(I);let S=AD(I.currentTarget.value,l);i&&!u&&S&&I.currentTarget.value.trim()!==""&&h(s(l(I.currentTarget.value),null,2)),x(S)},ref:t,readOnly:u,...m,autoComplete:"off",__staticSelector:"JsonInput",error:y?f:a||!0,"data-monospace":!0})});lv.classes=Yt.classes;lv.displayName="@mantine/core/JsonInput";var zD=b(O(),1),BV=b(R(),1);var SWe=b(R(),1);var CWe=b(O(),1);var[OV,Ma]=Vt("Menu component was not found in the tree");var zV=b(O(),1),EWe=b(R(),1);var ea={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};var Ple={},_0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuDivider",Ple,e),l=Ma();return(0,zV.jsx)(F,{ref:t,...l.getStyles("divider",{className:n,style:o,styles:i,classNames:r}),...s})});_0.classes=ea;_0.displayName="@mantine/core/MenuDivider";var I0=b(O(),1),NV=b(R(),1);var Dle={},w0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,onMouseEnter:s,onMouseLeave:l,onKeyDown:c,children:d,...u}=z("MenuDropdown",Dle,e),f=(0,NV.useRef)(null),m=Ma(),p=zn(c,x=>{(x.key==="ArrowUp"||x.key==="ArrowDown")&&(x.preventDefault(),f.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),h=zn(s,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),y=zn(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return(0,I0.jsxs)(Gr.Dropdown,{...u,onMouseEnter:h,onMouseLeave:y,role:"menu","aria-orientation":"vertical",ref:Ve(t,f),...m.getStyles("dropdown",{className:n,style:o,styles:i,classNames:r,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:p,children:[m.withInitialFocusPlaceholder&&(0,I0.jsx)("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});w0.classes=ea;w0.displayName="@mantine/core/MenuDropdown";var Rm=b(O(),1),FV=b(R(),1);var Rle={},S0=ot((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,color:s,closeMenuOnClick:l,leftSection:c,rightSection:d,children:u,disabled:f,"data-disabled":m,...p}=z("MenuItem",Rle,e),h=Ma(),y=lt(),{dir:x}=ei(),v=(0,FV.useRef)(null),_=h.getItemIndex(v.current),I=p,S=zn(I.onMouseLeave,()=>h.setHovered(-1)),w=zn(I.onMouseEnter,()=>h.setHovered(h.getItemIndex(v.current))),P=zn(I.onClick,()=>{m||(typeof l=="boolean"?l&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),E=zn(I.onFocus,()=>h.setHovered(h.getItemIndex(v.current))),B=s?y.variantColorResolver({color:s,theme:y,variant:"light"}):void 0,H=s?yr({color:s,theme:y}):null;return(0,Rm.jsxs)(xt,{...p,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,onFocus:E,...h.getStyles("item",{className:n,style:o,styles:i,classNames:r}),ref:Ve(v,t),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||m||void 0,"data-hovered":h.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:w,onMouseLeave:S,onClick:P,onKeyDown:_F({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:I.onKeyDown}),__vars:{"--menu-item-color":H?.isThemeColor&&H?.shade===void 0?`var(--mantine-color-${H.color}-6)`:B?.color,"--menu-item-hover":B?.hover},children:[c&&(0,Rm.jsx)("div",{...h.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"left",children:c}),u&&(0,Rm.jsx)("div",{...h.getStyles("itemLabel",{styles:i,classNames:r}),children:u}),d&&(0,Rm.jsx)("div",{...h.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"right",children:d})]})});S0.classes=ea;S0.displayName="@mantine/core/MenuItem";var LV=b(O(),1),aZe=b(R(),1);var Ele={},k0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuLabel",Ele,e),l=Ma();return(0,LV.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,styles:i,classNames:r}),...s})});k0.classes=ea;k0.displayName="@mantine/core/MenuLabel";var MV=b(O(),1),C0=b(R(),1);var Tle={refProp:"ref"},OD=(0,C0.forwardRef)((e,t)=>{let{children:r,refProp:n,...o}=z("MenuTarget",Tle,e);if(!yo(r))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let i=Ma(),a=r.props,s=zn(a.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),l=zn(a.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),c=zn(a.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return(0,MV.jsx)(Gr.Target,{refProp:n,popupType:"menu",ref:t,...o,children:(0,C0.cloneElement)(r,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":i.opened?!0:void 0})})});OD.displayName="@mantine/core/MenuTarget";var $le={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Xr(e){let t=z("Menu",$le,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,trapFocus:s,onChange:l,closeOnItemClick:c,loop:d,closeOnEscape:u,trigger:f,openDelay:m,closeDelay:p,classNames:h,styles:y,unstyled:x,variant:v,vars:_,menuItemTabIndex:I,keepMounted:S,withInitialFocusPlaceholder:w,...P}=t,E=K({name:"Menu",classes:ea,props:t,classNames:h,styles:y,unstyled:x}),[B,{setHovered:H,resetHovered:Z}]=CF(),[q,T]=rt({value:i,defaultValue:a,finalValue:!1,onChange:l}),[k,$]=(0,BV.useState)(!1),C=()=>{T(!1),$(!1),q&&o?.()},A=()=>{T(!0),!q&&n?.()},D=()=>{q?C():A()},{openDropdown:N,closeDropdown:U}=gV({open:A,close:C,closeDelay:p,openDelay:m}),G=me=>SF("[data-menu-item]","[data-menu-dropdown]",me),{resolvedClassNames:re,resolvedStyles:ge}=Vr({classNames:h,styles:y,props:t});return br(()=>{Z()},[q]),(0,zD.jsx)(OV,{value:{getStyles:E,opened:q,toggleDropdown:D,getItemIndex:G,hovered:B,setHovered:H,openedViaClick:k,setOpenedViaClick:$,closeOnItemClick:c,closeDropdown:f==="click"?C:U,openDropdown:f==="click"?A:N,closeDropdownImmediately:C,loop:d,trigger:f,unstyled:x,menuItemTabIndex:I,withInitialFocusPlaceholder:w},children:(0,zD.jsx)(Gr,{...P,opened:q,onChange:D,defaultOpened:a,trapFocus:S?!1:s,closeOnEscape:u,__staticSelector:"Menu",classNames:re,styles:ge,unstyled:x,variant:v,keepMounted:S,children:r})})}Xr.extend=e=>e;Xr.withProps=A2(Xr);Xr.classes=ea;Xr.displayName="@mantine/core/Menu";Xr.Item=S0;Xr.Label=k0;Xr.Dropdown=w0;Xr.Target=OD;Xr.Divider=_0;var Ls=b(O(),1),KV=b(R(),1);var UV=b(O(),1),WZe=b(R(),1);var MZe=b(R(),1);var jZe=b(O(),1);var[jV,hi]=Vt("Modal component was not found in tree");var fo={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};var Ale={},cv=M((e,t)=>{let r=z("ModalBody",Ale,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,UV.jsx)(W6,{ref:t,...c.getStyles("body",{classNames:n,style:i,styles:a,className:o}),...l})});cv.classes=fo;cv.displayName="@mantine/core/ModalBody";var VV=b(O(),1),JZe=b(R(),1);var Ole={},dv=M((e,t)=>{let r=z("ModalCloseButton",Ole,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,VV.jsx)(Z6,{ref:t,...c.getStyles("close",{classNames:n,style:i,styles:a,className:o}),...l})});dv.classes=fo;dv.displayName="@mantine/core/ModalCloseButton";var ND=b(O(),1);var lGe=b(R(),1);var zle={},uv=M((e,t)=>{let r=z("ModalContent",zle,e),{classNames:n,className:o,style:i,styles:a,vars:s,children:l,__hidden:c,...d}=r,u=hi(),f=u.scrollAreaComponent||Zj;return(0,ND.jsx)(G6,{...u.getStyles("content",{className:o,style:i,styles:a,classNames:n}),innerProps:u.getStyles("inner",{className:o,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...d,children:(0,ND.jsx)(f,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${W(u.yOffset)} * 2))`},children:l})})});uv.classes=fo;uv.displayName="@mantine/core/ModalContent";var HV=b(O(),1),vGe=b(R(),1);var Nle={},fv=M((e,t)=>{let r=z("ModalHeader",Nle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,HV.jsx)(q6,{ref:t,...c.getStyles("header",{classNames:n,style:i,styles:a,className:o}),...l})});fv.classes=fo;fv.displayName="@mantine/core/ModalHeader";var WV=b(O(),1),kGe=b(R(),1);var Fle={},mv=M((e,t)=>{let r=z("ModalOverlay",Fle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,WV.jsx)(X6,{ref:t,...c.getStyles("overlay",{classNames:n,style:i,styles:a,className:o}),...l})});mv.classes=fo;mv.displayName="@mantine/core/ModalOverlay";var FD=b(O(),1);var OGe=b(R(),1);var Lle={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Pt("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Mle=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Ee(t),"--modal-size":xe(r,"modal-size"),"--modal-y-offset":W(n),"--modal-x-offset":W(o)}}),pv=M((e,t)=>{let r=z("ModalRoot",Lle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,yOffset:c,scrollAreaComponent:d,radius:u,fullScreen:f,centered:m,xOffset:p,__staticSelector:h,...y}=r,x=K({name:h,classes:fo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Mle});return(0,FD.jsx)(jV,{value:{yOffset:c,scrollAreaComponent:d,getStyles:x,fullScreen:f},children:(0,FD.jsx)(H6,{ref:t,...x("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===$r.Autosize||void 0,unstyled:s,...y})})});pv.classes=fo;pv.displayName="@mantine/core/ModalRoot";var ZV=b(O(),1),LD=b(R(),1);var[Ble,GV]=_o();function MD({children:e}){let[t,r]=(0,LD.useState)([]),[n,o]=(0,LD.useState)(Pt("modal"));return(0,ZV.jsx)(Ble,{value:{stack:t,addModal:(i,a)=>{r(s=>[...new Set([...s,i])]),o(s=>typeof a=="number"&&typeof s=="number"?Math.max(s,a):s)},removeModal:i=>r(a=>a.filter(s=>s!==i)),getZIndex:i=>`calc(${n} + ${t.indexOf(i)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}MD.displayName="@mantine/core/ModalStack";var qV=b(O(),1),XGe=b(R(),1);var jle={},hv=M((e,t)=>{let r=z("ModalTitle",jle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,qV.jsx)(Q6,{ref:t,...c.getStyles("title",{classNames:n,style:i,styles:a,className:o}),...l})});hv.classes=fo;hv.displayName="@mantine/core/ModalTitle";var Ule={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Pt("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},mo=M((e,t)=>{let{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s,radius:l,opened:c,stackId:d,zIndex:u,...f}=z("Modal",Ule,e),m=GV(),p=!!r||i,h=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},y=n===!1?!1:d&&m?m.currentId===d:c;return(0,KV.useEffect)(()=>{m&&d&&(c?m.addModal(d,u||Pt("modal")):m.removeModal(d))},[c,d,u]),(0,Ls.jsxs)(pv,{ref:t,radius:l,opened:c,zIndex:m&&d?m.getZIndex(d):u,...f,...h,children:[n&&(0,Ls.jsx)(mv,{visible:y,transitionProps:m&&d?{duration:0}:void 0,...o}),(0,Ls.jsxs)(uv,{radius:l,__hidden:m&&d&&c?d!==m.currentId:!1,children:[p&&(0,Ls.jsxs)(fv,{children:[r&&(0,Ls.jsx)(hv,{children:r}),i&&(0,Ls.jsx)(dv,{...a})]}),(0,Ls.jsx)(cv,{children:s})]})]})});mo.classes=fo;mo.displayName="@mantine/core/Modal";mo.Root=pv;mo.Overlay=mv;mo.Content=uv;mo.Body=cv;mo.Header=fv;mo.Title=hv;mo.CloseButton=dv;mo.Stack=MD;var Do=b(O(),1),rH=b(R(),1);var gv=b(O(),1),Bqe=b(R(),1);var xqe=b(R(),1),bqe=b(O(),1);var[XV,Em]=_o();var wqe=b(R(),1),Sqe=b(O(),1);var[QV,YV]=_o();var BD=b(O(),1),Rqe=b(R(),1);var Tm={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};var Vle={},Hle=(e,{gap:t},{size:r})=>({group:{"--pg-gap":t!==void 0?xe(t):xe(r,"pg-gap")}}),P0=M((e,t)=>{let r=z("PillGroup",Vle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,disabled:d,...u}=r,m=Em()?.size||c||void 0,p=K({name:"PillGroup",classes:Tm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Hle,stylesCtx:{size:m},rootSelector:"group"});return(0,BD.jsx)(QV,{value:{size:m,disabled:d},children:(0,BD.jsx)(F,{ref:t,size:m,...p("group"),...u})})});P0.classes=Tm;P0.displayName="@mantine/core/PillGroup";var Wle={variant:"default"},Zle=(e,{radius:t},{size:r})=>({root:{"--pill-fz":xe(r,"pill-fz"),"--pill-height":xe(r,"pill-height"),"--pill-radius":t===void 0?void 0:Ee(t)}}),Ms=M((e,t)=>{let r=z("Pill",Wle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,variant:c,children:d,withRemoveButton:u,onRemove:f,removeButtonProps:m,radius:p,size:h,disabled:y,mod:x,...v}=r,_=YV(),I=Em(),S=h||_?.size||void 0,w=I?.variant==="filled"?"contrast":c||"default",P=K({name:"Pill",classes:Tm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Zle,stylesCtx:{size:S}});return(0,gv.jsxs)(F,{component:"span",ref:t,variant:w,size:S,...P("root",{variant:w}),mod:[{"with-remove":u&&!y,disabled:y||_?.disabled},x],...v,children:[(0,gv.jsx)("span",{...P("label"),children:d}),u&&(0,gv.jsx)(ui,{variant:"transparent",radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:s,...m,...P("remove",{className:m?.className,style:m?.style}),onMouseDown:E=>{E.preventDefault(),E.stopPropagation(),m?.onMouseDown?.(E)},onClick:E=>{E.stopPropagation(),f?.(),m?.onClick?.(E)}})]})});Ms.classes=Tm;Ms.displayName="@mantine/core/Pill";Ms.Group=P0;var UD=b(O(),1),eH=b(R(),1);var JV=b(O(),1);var tKe=b(R(),1);var jD={field:"m_45c4369d"};var Gle={type:"visible"},D0=M((e,t)=>{let r=z("PillsInputField",Gle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,type:c,disabled:d,id:u,pointer:f,mod:m,...p}=r,h=Em(),y=fi(),x=K({name:"PillsInputField",classes:jD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"field"}),v=d||h?.disabled;return(0,JV.jsx)(F,{component:"input",ref:Ve(t,h?.fieldRef),"data-type":c,disabled:v,mod:[{disabled:v,pointer:f},m],...x("field"),...p,id:y?.inputId||u,"aria-invalid":h?.hasError,"aria-describedby":y?.describedBy,type:"text",onMouseDown:_=>!f&&_.stopPropagation()})});D0.classes=jD;D0.displayName="@mantine/core/PillsInputField";var qle={},ac=M((e,t)=>{let r=z("PillsInput",qle,e),{children:n,onMouseDown:o,onClick:i,size:a,disabled:s,__staticSelector:l,error:c,variant:d,...u}=r,f=(0,eH.useRef)(null);return(0,UD.jsx)(XV,{value:{fieldRef:f,size:a,disabled:s,hasError:!!c,variant:d},children:(0,UD.jsx)(Yt,{size:a,error:c,variant:d,component:"div",ref:t,onMouseDown:m=>{m.preventDefault(),o?.(m),f.current?.focus()},onClick:m=>{m.preventDefault(),m.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(m))},...u,multiline:!0,disabled:s,__staticSelector:l||"PillsInput",withAria:!1,children:n})})});ac.displayName="@mantine/core/PillsInput";ac.Field=D0;var xKe=b(O(),1);var yKe=b(R(),1);function tH({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(pi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.value.toLowerCase().trim())===-1)}):r.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}var Kle={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},Zd=M((e,t)=>{let r=z("MultiSelect",Kle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,variant:p,data:h,dropdownOpened:y,defaultDropdownOpened:x,onDropdownOpen:v,onDropdownClose:_,selectFirstOptionOnChange:I,onOptionSubmit:S,comboboxProps:w,filter:P,limit:E,withScrollArea:B,maxDropdownHeight:H,searchValue:Z,defaultSearchValue:q,onSearchChange:T,readOnly:k,disabled:$,onFocus:C,onBlur:A,radius:D,rightSection:N,rightSectionWidth:U,rightSectionPointerEvents:G,rightSectionProps:re,leftSection:ge,leftSectionWidth:me,leftSectionPointerEvents:X,leftSectionProps:oe,inputContainer:Ie,inputWrapperOrder:se,withAsterisk:$e,labelProps:Ue,descriptionProps:Je,errorProps:at,wrapperProps:ze,description:Kt,label:Xt,error:io,maxValues:pe,searchable:ue,nothingFoundMessage:Se,withCheckIcon:Ae,checkIconPosition:Xe,hidePickedOptions:Fe,withErrorStyles:et,name:de,form:Pe,id:xr,clearable:fn,clearButtonProps:zo,hiddenInputProps:jt,placeholder:kr,hiddenInputValuesDivider:ps,required:tf,mod:rf,renderOption:of,onRemove:Cr,onClear:xl,scrollAreaProps:bl,chevronColor:bh,...yh}=r,_h=pt(xr),nf=bm(h),yl=Vd(nf),ir=oc({opened:y,defaultOpened:x,onDropdownOpen:v,onDropdownClose:()=>{_?.(),ir.resetSelectedOption()}}),{styleProps:OC,rest:{type:Ete,autoComplete:zC,...NC}}=Hr(yh),[st,On]=rt({value:d,defaultValue:u,finalValue:[],onChange:f}),[Yn,FC]=rt({value:Z,defaultValue:q,finalValue:"",onChange:T}),zi=ke=>{FC(ke),ir.resetSelectedOption()},Yc=K({name:"MultiSelect",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:Ih,resolvedStyles:wh}=Vr({props:r,styles:a,classNames:n}),Zb=ke=>{m?.(ke),ke.key===" "&&!ue&&(ke.preventDefault(),ir.toggleDropdown()),ke.key==="Backspace"&&Yn.length===0&&st.length>0&&(Cr?.(st[st.length-1]),On(st.slice(0,st.length-1)))},LC=st.map((ke,No)=>(0,Do.jsx)(Ms,{withRemoveButton:!k&&!yl[ke]?.disabled,onRemove:()=>{On(st.filter(ua=>ke!==ua)),Cr?.(ke)},unstyled:s,disabled:$,...Yc("pill"),children:yl[ke]?.label||ke},`${ke}-${No}`));(0,rH.useEffect)(()=>{I&&ir.selectFirstOption()},[I,Yn]);let Gb=(0,Do.jsx)(Be.ClearButton,{...zo,onClear:()=>{xl?.(),On([]),zi("")}}),MC=tH({data:nf,value:st}),qb=fn&&st.length>0&&!$&&!k;return(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsxs)(Be,{store:ir,classNames:Ih,styles:wh,unstyled:s,size:c,readOnly:k,__staticSelector:"MultiSelect",onOptionSubmit:ke=>{S?.(ke),zi(""),ir.updateSelectedOptionIndex("selected"),st.includes(yl[ke].value)?(On(st.filter(No=>No!==yl[ke].value)),Cr?.(yl[ke].value)):st.length<pe&&On([...st,yl[ke].value])},...w,children:[(0,Do.jsx)(Be.DropdownTarget,{children:(0,Do.jsx)(ac,{...OC,__staticSelector:"MultiSelect",classNames:Ih,styles:wh,unstyled:s,size:c,className:o,style:i,variant:p,disabled:$,radius:D,__defaultRightSection:(0,Do.jsx)(Be.Chevron,{size:c,error:io,unstyled:s,color:bh}),__clearSection:Gb,__clearable:qb,rightSection:N,rightSectionPointerEvents:G||(Gb?"all":"none"),rightSectionWidth:U,rightSectionProps:re,leftSection:ge,leftSectionWidth:me,leftSectionPointerEvents:X,leftSectionProps:oe,inputContainer:Ie,inputWrapperOrder:se,withAsterisk:$e,labelProps:Ue,descriptionProps:Je,errorProps:at,wrapperProps:ze,description:Kt,label:Xt,error:io,withErrorStyles:et,__stylesApiProps:{...r,rightSectionPointerEvents:G||(qb?"all":"none"),multiline:!0},pointer:!ue,onClick:()=>ue?ir.openDropdown():ir.toggleDropdown(),"data-expanded":ir.dropdownOpened||void 0,id:_h,required:tf,mod:rf,children:(0,Do.jsxs)(Ms.Group,{disabled:$,unstyled:s,...Yc("pillsList"),children:[LC,(0,Do.jsx)(Be.EventsTarget,{autoComplete:zC,children:(0,Do.jsx)(ac.Field,{...NC,ref:t,id:_h,placeholder:kr,type:!ue&&!kr?"hidden":"visible",...Yc("inputField"),unstyled:s,onFocus:ke=>{C?.(ke),ue&&ir.openDropdown()},onBlur:ke=>{A?.(ke),ir.closeDropdown(),zi("")},onKeyDown:Zb,value:Yn,onChange:ke=>{zi(ke.currentTarget.value),ue&&ir.openDropdown(),I&&ir.selectFirstOption()},disabled:$,readOnly:k||!ue,pointer:!ue})})]})})}),(0,Do.jsx)(Sm,{data:Fe?MC:nf,hidden:k||$,filter:P,search:Yn,limit:E,hiddenWhenEmpty:!Se,withScrollArea:B,maxDropdownHeight:H,filterOptions:ue,value:st,checkIconPosition:Xe,withCheckIcon:Ae,nothingFoundMessage:Se,unstyled:s,labelId:Xt?`${_h}-label`:void 0,"aria-label":Xt?void 0:yh["aria-label"],renderOption:of,scrollAreaProps:bl})]}),(0,Do.jsx)(Be.HiddenInput,{name:de,valuesDivider:ps,value:st,form:Pe,disabled:$,...jt})]})});Zd.classes={...Yt.classes,...Be.classes};Zd.displayName="@mantine/core/MultiSelect";var wn=b(O(),1);var UKe=b(R(),1);var VD={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};var Xle={},Qle=(e,{variant:t,color:r,childrenOffset:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:t||"light",autoContrast:o});return{root:{"--nl-bg":r||t?i.background:void 0,"--nl-hover":r||t?i.hover:void 0,"--nl-color":r||t?i.color:void 0},children:{"--nl-offset":Tt(n)}}},Ba=ot((e,t)=>{let r=z("NavLink",Xle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,defaultOpened:d,onChange:u,children:f,onClick:m,active:p,disabled:h,leftSection:y,rightSection:x,label:v,description:_,disableRightSectionRotation:I,noWrap:S,childrenOffset:w,onKeyDown:P,autoContrast:E,mod:B,...H}=r,Z=K({name:"NavLink",props:r,classes:VD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Qle}),[q,T]=rt({value:c,defaultValue:d,finalValue:!1,onChange:u}),k=!!f,$=C=>{m?.(C),k&&(C.preventDefault(),T(!q))};return(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)(xt,{...Z("root"),component:"a",ref:t,onClick:$,onKeyDown:C=>{P?.(C),C.nativeEvent.code==="Space"&&k&&(C.preventDefault(),T(!q))},unstyled:s,mod:[{disabled:h,active:p,expanded:q},B],...H,children:[y&&(0,wn.jsx)(F,{component:"span",...Z("section"),mod:{position:"left"},children:y}),(0,wn.jsxs)(F,{...Z("body"),mod:{"no-wrap":S},children:[(0,wn.jsx)(F,{component:"span",...Z("label"),children:v}),(0,wn.jsx)(F,{component:"span",mod:{active:p},...Z("description"),children:_})]}),(k||x!==void 0)&&(0,wn.jsx)(F,{...Z("section"),component:"span",mod:{rotate:q&&!I,position:"right"},children:k?x!==void 0?x:(0,wn.jsx)(rD,{...Z("chevron")}):x})]}),k&&(0,wn.jsx)(Jf,{in:q,...Z("collapse"),children:(0,wn.jsx)("div",{...Z("children"),children:f})})]})});Ba.classes=VD;Ba.displayName="@mantine/core/NavLink";var Bs=b(O(),1),tXe=b(R(),1);var HD={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};var Yle={withCloseButton:!0},Jle=(e,{radius:t,color:r})=>({root:{"--notification-radius":t===void 0?void 0:Ee(t),"--notification-color":r?He(r,e):void 0}}),Gd=M((e,t)=>{let r=z("Notification",Yle,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:l,title:c,icon:d,children:u,onClose:f,closeButtonProps:m,classNames:p,style:h,styles:y,unstyled:x,variant:v,vars:_,mod:I,loaderProps:S,role:w,...P}=r,E=K({name:"Notification",classes:HD,props:r,className:n,style:h,classNames:p,styles:y,unstyled:x,vars:_,varsResolver:Jle});return(0,Bs.jsxs)(F,{...E("root"),mod:[{"data-with-icon":!!d||a,"data-with-border":l},I],ref:t,variant:v,role:w||"alert",...P,children:[d&&!a&&(0,Bs.jsx)("div",{...E("icon"),children:d}),a&&(0,Bs.jsx)(uo,{size:28,color:o,...S,...E("loader")}),(0,Bs.jsxs)("div",{...E("body"),children:[c&&(0,Bs.jsx)("div",{...E("title"),children:c}),(0,Bs.jsx)(F,{...E("description"),mod:{"data-with-title":!!c},children:u})]}),s&&(0,Bs.jsx)(ui,{iconSize:16,color:"gray",...m,unstyled:x,onClick:f,...E("closeButton")})]})});Gd.classes=HD;Gd.displayName="@mantine/core/Notification";var Ft=b(R());function lH(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var $m;(function(e){e.event="event",e.props="prop"})($m||($m={}));function sc(){}function ece(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(i,a){return i===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function vv(e){return!!(e||"").match(/\d/)}function lc(e){return e==null}function tce(e){return typeof e=="number"&&isNaN(e)}function cH(e){return lc(e)||tce(e)||typeof e=="number"&&!isFinite(e)}function dH(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function rce(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function oce(e,t,r){var n=rce(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function oH(e){var t=(0,Ft.useRef)(e);t.current=e;var r=(0,Ft.useRef)(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function ZD(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:n}}function nce(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function uH(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function nH(e,t){return Array(t+1).join(e)}function fH(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(i=Number(i),!i)return r+o;o=o.replace(".","");var a=1+i,s=o.length;return a<0?o="0."+nH("0",Math.abs(a))+o:a>=s?o=o+nH("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function iH(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=ZD(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),u=i;i&&Number(d[0])&&(u=i.split("").reverse().reduce(function(h,y,x){return h.length>x?(Number(h[0])+Number(y)).toString()+h.substring(1,h.length):y+h},d[0]));var f=uH(d[1]||"",t,r),m=s?"-":"",p=n?".":"";return""+m+u+p+f}function qd(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var mH=ece(function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}}),ice=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function ace(e,t,r){return Math.min(Math.max(e,t),r)}function WD(e){return Math.max(e.selectionStart,e.selectionEnd)}function sce(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function lce(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function cce(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function dce(e,t,r,n,o,i,a){a===void 0&&(a=cce);var s=o.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!r.startsWith(l)&&(t=l,r=l+r,n=n+l.length);for(var c=r.length,d=e.length,u={},f=new Array(c),m=0;m<c;m++){f[m]=-1;for(var p=0,h=d;p<h;p++){var y=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:p});if(y&&u[p]!==!0){f[m]=p,u[p]=!0;break}}}for(var x=n;x<c&&(f[x]===-1||!i(r[x]));)x++;var v=x===c||f[x]===-1?d:f[x];for(x=n-1;x>0&&f[x]===-1;)x--;var _=x===-1||f[x]===-1?0:f[x]+1;return _>v?v:n-_<v-n?_:v}function aH(e,t,r,n){var o=e.length;if(t=ace(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function uce(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(vv(e[r])||vv(e[r-1]));return t}function pH(e,t,r,n,o,i){i===void 0&&(i=sc);var a=oH(function(p,h){var y,x;return cH(p)?(x="",y=""):typeof p=="number"||h?(x=typeof p=="number"?fH(p):p,y=n(x)):(x=o(p,void 0),y=n(x)),{formattedValue:y,numAsString:x}}),s=(0,Ft.useState)(function(){return a(lc(e)?t:e,r)}),l=s[0],c=s[1],d=oH(function(p,h){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),i(p,h)}),u=e,f=r;lc(e)&&(u=l.numAsString,f=!0);var m=a(u,f);return(0,Ft.useMemo)(function(){c(m)},[m.formattedValue]),(0,Ft.useEffect)(function(){if(!lc(t)&&lc(e)&&l.formattedValue!==""){var p=parseFloat(l.numAsString);d({formattedValue:l.formattedValue,value:l.numAsString,floatValue:isNaN(p)?void 0:p},{event:void 0,source:$m.props})}},[]),[l,d]}function fce(e){return e.replace(/[^0-9]/g,"")}function mce(e){return e}function pce(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=mce);var s=e.removeFormatting;s===void 0&&(s=fce);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,u=e.isAllowed,f=e.onChange;f===void 0&&(f=sc);var m=e.onKeyDown;m===void 0&&(m=sc);var p=e.onMouseUp;p===void 0&&(p=sc);var h=e.onFocus;h===void 0&&(h=sc);var y=e.onBlur;y===void 0&&(y=sc);var x=e.value,v=e.getCaretBoundary;v===void 0&&(v=uce);var _=e.isValidInputCharacter;_===void 0&&(_=vv);var I=e.isCharacterSame,S=lH(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),w=pH(x,l,!!c,a,s,d),P=w[0],E=P.formattedValue,B=P.numAsString,H=w[1],Z=(0,Ft.useRef)(),q=(0,Ft.useRef)({formattedValue:E,numAsString:B}),T=function(pe,ue){q.current={formattedValue:pe.formattedValue,numAsString:pe.value},H(pe,ue)},k=(0,Ft.useState)(!1),$=k[0],C=k[1],A=(0,Ft.useRef)(null),D=(0,Ft.useRef)({setCaretTimeout:null,focusTimeout:null});(0,Ft.useEffect)(function(){return C(!0),function(){clearTimeout(D.current.setCaretTimeout),clearTimeout(D.current.focusTimeout)}},[]);var N=a,U=function(pe,ue){var Se=parseFloat(ue);return{formattedValue:pe,value:ue,floatValue:isNaN(Se)?void 0:Se}},G=function(pe,ue,Se){pe.selectionStart===0&&pe.selectionEnd===pe.value.length||(qd(pe,ue),D.current.setCaretTimeout=setTimeout(function(){pe.value===Se&&pe.selectionStart!==ue&&qd(pe,ue)},0))},re=function(pe,ue,Se){return aH(pe,ue,v(pe),Se)},ge=function(pe,ue,Se){var Ae=v(ue),Xe=dce(ue,E,pe,Se,Ae,_,I);return Xe=aH(ue,Xe,Ae),Xe},me=function(pe){var ue=pe.formattedValue;ue===void 0&&(ue="");var Se=pe.input,Ae=pe.source,Xe=pe.event,Fe=pe.numAsString,et;if(Se){var de=pe.inputValue||Se.value,Pe=WD(Se);Se.value=ue,et=ge(de,ue,Pe),et!==void 0&&G(Se,et,ue)}ue!==E&&T(U(ue,Fe),{event:Xe,source:Ae})};(0,Ft.useEffect)(function(){var pe=q.current,ue=pe.formattedValue,Se=pe.numAsString;(E!==ue||B!==Se)&&T(U(E,B),{event:void 0,source:$m.props})},[E,B]);var X=A.current?WD(A.current):void 0,oe=typeof window<"u"?Ft.useLayoutEffect:Ft.useEffect;oe(function(){var pe=A.current;if(E!==q.current.formattedValue&&pe){var ue=ge(q.current.formattedValue,E,X);pe.value=E,G(pe,ue,E)}},[E]);var Ie=function(pe,ue,Se){var Ae=ue.target,Xe=Z.current?ice(Z.current,Ae.selectionEnd):mH(E,pe),Fe=Object.assign(Object.assign({},Xe),{lastValue:E}),et=s(pe,Fe),de=N(et);if(et=s(de,void 0),u&&!u(U(de,et))){var Pe=ue.target,xr=WD(Pe),fn=ge(pe,E,xr);return Pe.value=E,G(Pe,fn,E),!1}return me({formattedValue:de,numAsString:et,inputValue:pe,event:ue,source:Se,input:ue.target}),!0},se=function(pe,ue){ue===void 0&&(ue=0);var Se=pe.selectionStart,Ae=pe.selectionEnd;Z.current={selectionStart:Se,selectionEnd:Ae+ue}},$e=function(pe){var ue=pe.target,Se=ue.value,Ae=Ie(Se,pe,$m.event);Ae&&f(pe),Z.current=void 0},Ue=function(pe){var ue=pe.target,Se=pe.key,Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;Fe===void 0&&(Fe="");var et;Se==="ArrowLeft"||Se==="Backspace"?et=Math.max(Ae-1,0):Se==="ArrowRight"?et=Math.min(Ae+1,Fe.length):Se==="Delete"&&(et=Ae);var de=0;Se==="Delete"&&Ae===Xe&&(de=1);var Pe=Se==="ArrowLeft"||Se==="ArrowRight";if(et===void 0||Ae!==Xe&&!Pe){m(pe),se(ue,de);return}var xr=et;if(Pe){var fn=Se==="ArrowLeft"?"left":"right";xr=re(Fe,et,fn),xr!==et&&pe.preventDefault()}else Se==="Delete"&&!_(Fe[et])?xr=re(Fe,et,"right"):Se==="Backspace"&&!_(Fe[et])&&(xr=re(Fe,et,"left"));xr!==et&&G(ue,xr,Fe),m(pe),se(ue,de)},Je=function(pe){var ue=pe.target,Se=function(){var Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;if(Fe===void 0&&(Fe=""),Ae===Xe){var et=re(Fe,Ae);et!==Ae&&G(ue,et,Fe)}};Se(),requestAnimationFrame(function(){Se()}),p(pe),se(ue)},at=function(pe){pe.persist&&pe.persist();var ue=pe.target,Se=pe.currentTarget;A.current=ue,D.current.focusTimeout=setTimeout(function(){var Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;Fe===void 0&&(Fe="");var et=re(Fe,Ae);et!==Ae&&!(Ae===0&&Xe===Fe.length)&&G(ue,et,Fe),h(Object.assign(Object.assign({},pe),{currentTarget:Se}))},0)},ze=function(pe){A.current=null,clearTimeout(D.current.focusTimeout),clearTimeout(D.current.setCaretTimeout),y(pe)},Kt=$&&sce()?"numeric":void 0,Xt=Object.assign({inputMode:Kt},S,{type:t,value:E,onChange:$e,onKeyDown:Ue,onMouseUp:Je,onFocus:at,onBlur:ze});if(r==="text")return o?Ft.default.createElement(Ft.default.Fragment,null,o(E,S)||null):Ft.default.createElement("span",Object.assign({},S,{ref:i}),E);if(n){var io=n;return Ft.default.createElement(io,Object.assign({},Xt,{ref:i}))}return Ft.default.createElement("input",Object.assign({},Xt,{ref:i}))}function sH(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=R0(t),c=l.thousandSeparator,d=l.decimalSeparator,u=r!==0&&e.indexOf(".")!==-1||r&&n,f=ZD(e,a),m=f.beforeDecimal,p=f.afterDecimal,h=f.addNegation;return r!==void 0&&(p=uH(p,r,!!n)),c&&(m=oce(m,c,s)),o&&(m=o+m),i&&(p=p+i),h&&(m="-"+m),e=m+(u&&d||"")+p,e}function R0(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function hce(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}function gce(e,t){return new RegExp("(^-)|[0-9]|"+dH(e),t?"g":void 0)}function vce(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function xce(e,t,r){var n;t===void 0&&(t=lce(e));var o=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,l=t.from,c=t.to,d=c.start,u=c.end,f=R0(r),m=f.allowedDecimalSeparators,p=f.decimalSeparator,h=e[u]===p;if(vv(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(u-d===1&&m.indexOf(e[d])!==-1){var y=s===0?"":p;e=e.substring(0,d)+y+e.substring(d+1,e.length)}var x=function(A,D,N){var U=!1,G=!1;i.startsWith("-")?U=!1:A.startsWith("--")?(U=!1,G=!0):a.startsWith("-")&&A.length===a.length?U=!1:A[0]==="-"&&(U=!0);var re=U?1:0;return G&&(re=2),re&&(A=A.substring(re),D-=re,N-=re),{value:A,start:D,end:N,hasNegation:U}},v=x(e,d,u),_=v.hasNegation;n=v,e=n.value,d=n.start,u=n.end;var I=x(t.lastValue,l.start,l.end),S=I.start,w=I.end,P=I.value,E=e.substring(d,u);e.length&&P.length&&(S>P.length-a.length||w<i.length)&&!(E&&a.startsWith(E))&&(e=P);var B=0;e.startsWith(i)?B+=i.length:d<i.length&&(B=d),e=e.substring(B),u-=B;var H=e.length,Z=e.length-a.length;e.endsWith(a)?H=Z:(u>Z||u>e.length-a.length)&&(H=u),e=e.substring(0,H),e=hce(_?"-"+e:e,o),e=(e.match(gce(p,!0))||[]).join("");var q=e.indexOf(p);e=e.replace(new RegExp(dH(p),"g"),function(A,D){return D===q?".":""});var T=ZD(e,o),k=T.beforeDecimal,$=T.afterDecimal,C=T.addNegation;return c.end-c.start<l.end-l.start&&k===""&&h&&!parseFloat($)&&(e=C?"-":""),e}function bce(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";o.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function yce(e){var t=R0(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
|
|
52
|
+
Decimal separator can't be same as thousand separator.
|
|
53
|
+
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
54
|
+
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
55
|
+
`);return o.startsWith("-")&&i&&(console.error(`
|
|
56
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
57
|
+
prefix: `+o+`
|
|
58
|
+
allowNegative: `+i+`
|
|
59
|
+
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function _ce(e){e=yce(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,n=e.thousandsGroupStyle,o=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=sc);var l=e.onBlur;l===void 0&&(l=sc);var c=e.thousandSeparator,d=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var m=e.defaultValue,p=e.value,h=e.valueIsNumericString,y=e.onValueChange,x=lH(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),v=R0(e),_=v.decimalSeparator,I=v.allowedDecimalSeparators,S=function(N){return sH(N,e)},w=function(N,U){return xce(N,U,e)},P=lc(p)?m:p,E=h??vce(P,f,o);lc(p)?lc(m)||(E=E||typeof m=="number"):E=E||typeof p=="number";var B=function(N){return cH(N)?N:(typeof N=="number"&&(N=fH(N)),E&&typeof d=="number"?iH(N,d,!!u):N)},H=pH(B(p),B(m),!!E,S,w,y),Z=H[0],q=Z.numAsString,T=Z.formattedValue,k=H[1],$=function(N){var U=N.target,G=N.key,re=U.selectionStart,ge=U.selectionEnd,me=U.value;if(me===void 0&&(me=""),(G==="Backspace"||G==="Delete")&&ge<f.length&&me!=="-"){N.preventDefault();return}if(re!==ge){s(N);return}G==="Backspace"&&me[0]==="-"&&re===f.length+1&&i&&qd(U,1),d&&u&&(G==="Backspace"&&me[re-1]===_?(qd(U,re-1),N.preventDefault()):G==="Delete"&&me[re]===_&&N.preventDefault()),I?.includes(G)&&me[re]===_&&qd(U,re+1);var X=c===!0?",":c;G==="Backspace"&&me[re-1]===X&&qd(U,re-1),G==="Delete"&&me[re]===X&&qd(U,re+1),s(N)},C=function(N){var U=q;if(U.match(/\d/g)||(U=""),a||(U=nce(U)),u&&d&&(U=iH(U,d,u)),U!==q){var G=sH(U,e);k({formattedValue:G,value:U,floatValue:parseFloat(U)},{event:N,source:$m.event})}l(N)},A=function(N){return N===_?!0:vv(N)},D=function(N){var U=N.currentValue,G=N.lastValue,re=N.formattedValue,ge=N.currentValueIndex,me=N.formattedValueIndex,X=U[ge],oe=re[me],Ie=mH(G,U),se=Ie.to,$e=function(Ue){return w(Ue).indexOf(".")+f.length};return p===0&&u&&d&&U[se.start]===_&&$e(U)<ge&&$e(re)>me?!1:ge>=se.start&&ge<se.end&&I&&I.includes(X)&&oe===_?!0:X===oe};return Object.assign(Object.assign({},x),{value:T,valueIsNumericString:!1,isValidInputCharacter:A,isCharacterSame:D,onValueChange:k,format:S,removeFormatting:w,getCaretBoundary:function(N){return bce(N,e)},onKeyDown:$,onBlur:C})}function hH(e){var t=_ce(e);return Ft.default.createElement(pce,Object.assign({},t))}var cc=b(O(),1),Am=b(R(),1);var GD=b(O(),1);function qD({direction:e,style:t,...r}){return(0,GD.jsx)("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:(0,GD.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var E0={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};var Ice=/^(0\.0*|-0(\.0*)?)$/,wce=/^-?0\d+(\.\d+)?\.?$/;function XD(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function KD(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||XD(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function Sce(e){return e.toString().replace(".","").length}function kce(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Sce(t)<14&&t!==""}function gH(e,t,r){if(e===void 0)return!0;let n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}var Cce={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},Pce=(e,{size:t})=>({controls:{"--ni-chevron-size":xe(t,"ni-chevron-size")}});function Dce(e,t,r){let n=e.toString().replace(/^0+/,""),o=parseFloat(n);return Number.isNaN(o)?n:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):n:Il(o,r,t)}var Kd=M((e,t)=>{let r=z("NumberInput",Cce,e),{className:n,classNames:o,styles:i,unstyled:a,vars:s,onChange:l,onValueChange:c,value:d,defaultValue:u,max:f,min:m,step:p,hideControls:h,rightSection:y,isAllowed:x,clampBehavior:v,onBlur:_,allowDecimal:I,decimalScale:S,onKeyDown:w,onKeyDownCapture:P,handlersRef:E,startValue:B,disabled:H,rightSectionPointerEvents:Z,allowNegative:q,readOnly:T,size:k,rightSectionWidth:$,stepHoldInterval:C,stepHoldDelay:A,allowLeadingZeros:D,withKeyboardEvents:N,trimLeadingZeroesOnBlur:U,...G}=r,re=K({name:"NumberInput",classes:E0,props:r,classNames:o,styles:i,unstyled:a,vars:s,varsResolver:Pce}),{resolvedClassNames:ge,resolvedStyles:me}=Vr({classNames:o,styles:i,props:r}),[X,oe]=rt({value:d,defaultValue:u,finalValue:"",onChange:l}),Ie=A!==void 0&&C!==void 0,se=(0,Am.useRef)(null),$e=(0,Am.useRef)(null),Ue=(0,Am.useRef)(0),Je=(de,Pe)=>{Pe.source==="event"&&oe(kce(de.floatValue,de.value)&&!Ice.test(de.value)&&!(D&&wce.test(de.value))?de.floatValue:de.value),c?.(de,Pe)},at=de=>{let Pe=String(de).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Pe?Math.max(0,(Pe[1]?Pe[1].length:0)-(Pe[2]?+Pe[2]:0)):0},ze=de=>{se.current&&typeof de<"u"&&se.current.setSelectionRange(de,de)},Kt=(0,Am.useRef)(od);Kt.current=()=>{if(!KD(X))return;let de,Pe=at(X),xr=at(p),fn=Math.max(Pe,xr),zo=10**fn;if(!XD(X)&&(typeof X!="number"||Number.isNaN(X)))de=Il(B,m,f);else if(f!==void 0){let kr=(Math.round(Number(X)*zo)+Math.round(p*zo))/zo;de=kr<=f?kr:f}else de=(Math.round(Number(X)*zo)+Math.round(p*zo))/zo;let jt=de.toFixed(fn);oe(parseFloat(jt)),c?.({floatValue:parseFloat(jt),formattedValue:jt,value:jt},{source:"increment"}),setTimeout(()=>ze(se.current?.value.length),0)};let Xt=(0,Am.useRef)(od);Xt.current=()=>{if(!KD(X))return;let de,Pe=m!==void 0?m:q?Number.MIN_SAFE_INTEGER:0,xr=at(X),fn=at(p),zo=Math.max(xr,fn),jt=10**zo;if(!XD(X)&&typeof X!="number"||Number.isNaN(X))de=Il(B,Pe,f);else{let ps=(Math.round(Number(X)*jt)-Math.round(p*jt))/jt;de=Pe!==void 0&&ps<Pe?Pe:ps}let kr=de.toFixed(zo);oe(parseFloat(kr)),c?.({floatValue:parseFloat(kr),formattedValue:kr,value:kr},{source:"decrement"}),setTimeout(()=>ze(se.current?.value.length),0)};let io=de=>{w?.(de),!(T||!N)&&(de.key==="ArrowUp"&&(de.preventDefault(),Kt.current()),de.key==="ArrowDown"&&(de.preventDefault(),Xt.current()))},pe=de=>{if(P?.(de),de.key==="Backspace"){let Pe=se.current;Pe.selectionStart===0&&Pe.selectionStart===Pe.selectionEnd&&(de.preventDefault(),window.setTimeout(()=>ze(0),0))}},ue=de=>{let Pe=X;v==="blur"&&typeof Pe=="number"&&(Pe=Il(Pe,m,f)),U&&typeof Pe=="string"&&at(Pe)<15&&(Pe=Dce(Pe,f,m)),X!==Pe&&oe(Pe),_?.(de)};sd(E,{increment:Kt.current,decrement:Xt.current});let Se=de=>{de?Kt.current():Xt.current(),Ue.current+=1},Ae=de=>{if(Se(de),Ie){let Pe=typeof C=="number"?C:C(Ue.current);$e.current=window.setTimeout(()=>Ae(de),Pe)}},Xe=(de,Pe)=>{de.preventDefault(),se.current?.focus(),Se(Pe),Ie&&($e.current=window.setTimeout(()=>Ae(Pe),A))},Fe=()=>{$e.current&&window.clearTimeout($e.current),$e.current=null,Ue.current=0},et=(0,cc.jsxs)("div",{...re("controls"),children:[(0,cc.jsx)(xt,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof X=="number"&&f!==void 0&&X>=f,mod:{direction:"up"},onMouseDown:de=>de.preventDefault(),onPointerDown:de=>{Xe(de,!0)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,cc.jsx)(qD,{direction:"up"})}),(0,cc.jsx)(xt,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof X=="number"&&m!==void 0&&X<=m,mod:{direction:"down"},onMouseDown:de=>de.preventDefault(),onPointerDown:de=>{Xe(de,!1)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,cc.jsx)(qD,{direction:"down"})})]});return(0,cc.jsx)(Yt,{component:hH,allowNegative:q,className:Ze(E0.root,n),size:k,...G,readOnly:T,disabled:H,value:X,getInputRef:Ve(t,se),onValueChange:Je,rightSection:h||T||!KD(X)?y:y||et,classNames:ge,styles:me,unstyled:a,__staticSelector:"NumberInput",decimalScale:I?S:0,onKeyDown:io,onKeyDownCapture:pe,rightSectionPointerEvents:Z??(H?"none":void 0),rightSectionWidth:$??`var(--ni-right-section-width-${k||"sm"})`,allowLeadingZeros:D,onBlur:ue,isAllowed:de=>v==="strict"?x?x(de)&&gH(de.floatValue,m,f):gH(de.floatValue,m,f):x?x(de):!0})});Kd.classes={...Yt.classes,...E0};Kd.displayName="@mantine/core/NumberInput";var Om=b(O(),1);var OXe=b(R(),1);var QD=b(O(),1),vH=({reveal:e})=>(0,QD.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:(0,QD.jsx)("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var T0={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};var Rce={visibilityToggleIcon:vH},Ece=(e,{size:t})=>({root:{"--psi-icon-size":xe(t,"psi-icon-size"),"--psi-button-size":xe(t,"psi-button-size")}}),Xd=M((e,t)=>{let r=z("PasswordInput",Rce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,required:c,error:d,leftSection:u,disabled:f,id:m,variant:p,inputContainer:h,description:y,label:x,size:v,errorProps:_,descriptionProps:I,labelProps:S,withAsterisk:w,inputWrapperOrder:P,wrapperProps:E,radius:B,rightSection:H,rightSectionWidth:Z,rightSectionPointerEvents:q,leftSectionWidth:T,visible:k,defaultVisible:$,onVisibilityChange:C,visibilityToggleIcon:A,visibilityToggleButtonProps:D,rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withErrorStyles:re,mod:ge,...me}=r,X=pt(m),[oe,Ie]=rt({value:k,defaultValue:$,finalValue:!1,onChange:C}),se=()=>Ie(!oe),$e=K({name:"PasswordInput",classes:T0,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ece}),{resolvedClassNames:Ue,resolvedStyles:Je}=Vr({classNames:n,styles:a,props:r}),{styleProps:at,rest:ze}=Hr(me),Kt=A,Xt=_?.id||`${X}-error`,io=I?.id||`${X}-description`,Se=`${!!d&&typeof d!="boolean"?Xt:""} ${!!y?io:""}`,Ae=Se.trim().length>0?Se.trim():void 0,Xe=(0,Om.jsx)(bt,{...$e("visibilityToggle"),disabled:f,radius:B,"aria-hidden":!D,tabIndex:-1,...D,variant:D?.variant??"subtle",color:"gray",unstyled:s,onTouchEnd:Fe=>{Fe.preventDefault(),D?.onTouchEnd?.(Fe),se()},onMouseDown:Fe=>{Fe.preventDefault(),D?.onMouseDown?.(Fe),se()},onKeyDown:Fe=>{D?.onKeyDown?.(Fe),Fe.key===" "&&(Fe.preventDefault(),se())},children:(0,Om.jsx)(Kt,{reveal:oe})});return(0,Om.jsx)(ct.Wrapper,{required:c,id:X,label:x,error:d,description:y,size:v,classNames:Ue,styles:Je,__staticSelector:"PasswordInput",unstyled:s,withAsterisk:w,inputWrapperOrder:P,inputContainer:h,variant:p,labelProps:{...S,htmlFor:X},descriptionProps:{...I,id:io},errorProps:{..._,id:Xt},mod:ge,...$e("root"),...at,...E,children:(0,Om.jsx)(ct,{component:"div",error:d,leftSection:u,size:v,classNames:{...Ue,input:Ze(T0.input,Ue.input)},styles:Je,radius:B,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:Z,rightSection:H??Xe,variant:p,unstyled:s,leftSectionWidth:T,rightSectionPointerEvents:q||"all",rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withAria:!1,withErrorStyles:re,children:(0,Om.jsx)("input",{required:c,"data-invalid":!!d||void 0,"data-with-left-section":!!u||void 0,...$e("innerInput"),disabled:f,id:X,ref:t,...ze,"aria-describedby":Ae,autoComplete:ze.autoComplete||"off",type:oe?"text":"password"})})})});Xd.classes={...Yt.classes,...T0};Xd.displayName="@mantine/core/PasswordInput";var JD=b(O(),1),RQe=b(R(),1);var bH=b(O(),1),JXe=b(R(),1);var GXe=b(R(),1);var KXe=b(O(),1);var[xH,$0]=Vt("Progress.Root component was not found in tree");var js={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};var Tce={},A0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ProgressLabel",Tce,e),l=$0();return(0,bH.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,classNames:r,styles:i}),...s})});A0.classes=js;A0.displayName="@mantine/core/ProgressLabel";var YD=b(O(),1),sQe=b(R(),1);var $ce={},Ace=(e,{size:t,radius:r,transitionDuration:n})=>({root:{"--progress-size":xe(t,"progress-size"),"--progress-radius":r===void 0?void 0:Ee(r),"--progress-transition-duration":typeof n=="number"?`${n}ms`:void 0}}),xv=M((e,t)=>{let r=z("ProgressRoot",$ce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,transitionDuration:d,...u}=r,f=K({name:"Progress",classes:js,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ace});return(0,YD.jsx)(xH,{value:{getStyles:f,autoContrast:c},children:(0,YD.jsx)(F,{ref:t,...f("root"),...u})})});xv.classes=js;xv.displayName="@mantine/core/ProgressRoot";var yH=b(O(),1),vQe=b(R(),1);var Oce={withAria:!0},bv=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,value:s,withAria:l,color:c,striped:d,animated:u,mod:f,...m}=z("ProgressSection",Oce,e),p=$0(),h=lt(),y=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,yH.jsx)(F,{ref:t,...p.getStyles("section",{className:n,classNames:r,styles:i,style:o}),...m,...y,mod:[{striped:d||u,animated:u},f],__vars:{"--progress-section-width":`${s}%`,"--progress-section-color":He(c,h),"--progress-label-color":ga(p.autoContrast,h)?Nn({color:c,theme:h,autoContrast:p.autoContrast}):void 0}})});bv.classes=js;bv.displayName="@mantine/core/ProgressSection";var zce={},dc=M((e,t)=>{let r=z("Progress",zce,e),{value:n,classNames:o,styles:i,vars:a,color:s,striped:l,animated:c,"aria-label":d,...u}=r,{resolvedClassNames:f,resolvedStyles:m}=Vr({classNames:o,styles:i,props:r});return(0,JD.jsx)(xv,{ref:t,classNames:f,styles:m,vars:a,...u,children:(0,JD.jsx)(bv,{value:n,color:s,striped:l,animated:c,"aria-label":d})})});dc.classes=js;dc.displayName="@mantine/core/Progress";dc.Section=bv;dc.Root=xv;dc.Label=A0;var zm=b(O(),1);var MYe=b(R(),1);var tR=b(O(),1),XQe=b(R(),1);var MQe=b(R(),1),BQe=b(O(),1);var[_H,O0]=_o();var HQe=b(R(),1),WQe=b(O(),1);var[IH,wH]=_o();var eR={card:"m_9dc8ae12"};var Nce={withBorder:!0},Fce=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),z0=M((e,t)=>{let r=z("RadioCard",Nce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,name:p,onKeyDown:h,...y}=r,x=K({name:"RadioCard",classes:eR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Fce,rootSelector:"card"}),{dir:v}=ei(),_=O0(),I=typeof c=="boolean"?c:_?.value===f||!1,S=p||_?.name,w=P=>{if(h?.(P),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(P.nativeEvent.code)){P.preventDefault();let E=Array.from(document.querySelectorAll(`[role="radio"][name="${S||"__mantine"}"]`)),B=E.findIndex(q=>q===P.target),H=B+1>=E.length?0:B+1,Z=B-1<0?E.length-1:B-1;P.nativeEvent.code==="ArrowDown"&&(E[H].focus(),E[H].click()),P.nativeEvent.code==="ArrowUp"&&(E[Z].focus(),E[Z].click()),P.nativeEvent.code==="ArrowLeft"&&(E[v==="ltr"?Z:H].focus(),E[v==="ltr"?Z:H].click()),P.nativeEvent.code==="ArrowRight"&&(E[v==="ltr"?H:Z].focus(),E[v==="ltr"?H:Z].click())}};return(0,tR.jsx)(IH,{value:{checked:I},children:(0,tR.jsx)(xt,{ref:t,mod:[{"with-border":u,checked:I},d],...x("card"),...y,role:"radio","aria-checked":I,name:S,onClick:P=>{m?.(P),_?.onChange(f||"")},onKeyDown:w})})});z0.displayName="@mantine/core/RadioCard";z0.classes=eR;var N0=b(O(),1);var cYe=b(R(),1);var Lce={},F0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,name:l,readOnly:c,...d}=z("RadioGroup",Lce,e),u=pt(l),[f,m]=rt({value:r,defaultValue:n,finalValue:"",onChange:o});return(0,N0.jsx)(_H,{value:{value:f,onChange:h=>!c&&m(typeof h=="string"?h:h.currentTarget.value),size:i,name:u},children:(0,N0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...d,labelElement:"div",__staticSelector:"RadioGroup",children:(0,N0.jsx)(_m,{role:"radiogroup",children:s})})})});F0.classes=ct.Wrapper.classes;F0.displayName="@mantine/core/RadioGroup";var rR=b(O(),1);var xYe=b(R(),1);function L0({size:e,style:t,...r}){return(0,rR.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:W(e),height:W(e),...t},"aria-hidden":!0,...r,children:(0,rR.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var nR=b(O(),1),IYe=b(R(),1);var oR={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};var Mce={icon:L0},Bce=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--radio-size":xe(n,"radio-size"),"--radio-radius":t===void 0?void 0:Ee(t),"--radio-color":i==="outline"?l:He(r,e),"--radio-icon-size":xe(n,"radio-icon-size"),"--radio-icon-color":o?He(o,e):ga(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},M0=M((e,t)=>{let r=z("RadioIndicator",Mce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,radius:d,color:u,iconColor:f,autoContrast:m,checked:p,mod:h,variant:y,disabled:x,...v}=r,_=c,I=K({name:"RadioIndicator",classes:oR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Bce,rootSelector:"indicator"}),S=wH(),w=typeof p=="boolean"?p:S?.checked||!1;return(0,nR.jsx)(F,{ref:t,...I("indicator",{variant:y}),variant:y,mod:[{checked:w,disabled:x},h],...v,children:(0,nR.jsx)(_,{...I("icon")})})});M0.displayName="@mantine/core/RadioIndicator";M0.classes=oR;var iR={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};var jce={labelPosition:"right"},Uce=(e,{size:t,radius:r,color:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:n||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--radio-size":xe(t,"radio-size"),"--radio-radius":r===void 0?void 0:Ee(r),"--radio-color":i==="outline"?l:He(n,e),"--radio-icon-color":o?He(o,e):ga(a,e)?Nn({color:n,theme:e,autoContrast:a}):void 0,"--radio-icon-size":xe(t,"radio-icon-size")}}},Us=M((e,t)=>{let r=z("Radio",jce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,id:c,size:d,label:u,labelPosition:f,description:m,error:p,radius:h,color:y,variant:x,disabled:v,wrapperProps:_,icon:I=L0,rootRef:S,iconColor:w,onChange:P,mod:E,...B}=r,H=K({name:"Radio",classes:iR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Uce}),Z=O0(),q=Z?.size??d,T=r.size?d:q,{styleProps:k,rest:$}=Hr(B),C=pt(c),A=Z?{checked:Z.value===$.value,name:$.name??Z.name,onChange:D=>{Z.onChange(D),P?.(D)}}:{};return(0,zm.jsx)(Hd,{...H("root"),__staticSelector:"Radio",__stylesApiProps:r,id:C,size:T,labelPosition:f,label:u,description:m,error:p,disabled:v,classNames:n,styles:a,unstyled:s,"data-checked":A.checked||void 0,variant:x,ref:S,mod:E,...k,..._,children:(0,zm.jsxs)(F,{...H("inner"),mod:{"label-position":f},children:[(0,zm.jsx)(F,{...H("radio",{focusable:!0,variant:x}),onChange:P,...$,...A,component:"input",mod:{error:!!p},ref:t,id:C,disabled:v,type:"radio"}),(0,zm.jsx)(I,{...H("icon"),"aria-hidden":!0})]})})});Us.classes=iR;Us.displayName="@mantine/core/Radio";Us.Group=F0;Us.Card=z0;Us.Indicator=M0;var Vs=b(O(),1),H0=b(R(),1);var Vce={duration:100,transition:"fade"};function SH(e,t){return{...Vce,...t,...e}}var Qd=b(O(),1),CH=b(R(),1);var uc=b(R(),1);function kH({offset:e,position:t,defaultOpened:r}){let[n,o]=(0,uc.useState)(r),i=(0,uc.useRef)(null),{x:a,y:s,elements:l,refs:c,update:d,placement:u}=im({placement:t,middleware:[Od({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=u.includes("right")?e:t.includes("left")?e*-1:0,m=u.includes("bottom")?e:t.includes("top")?e*-1:0,p=(0,uc.useCallback)(({clientX:h,clientY:y})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:h,y,left:h+f,top:y+m,right:h,bottom:y}}})},[l.reference]);return(0,uc.useEffect)(()=>{if(c.floating.current){let h=i.current;h.addEventListener("mousemove",p);let y=Uo(c.floating.current);return y.forEach(x=>{x.addEventListener("scroll",d)}),()=>{h.removeEventListener("mousemove",p),y.forEach(x=>{x.removeEventListener("scroll",d)})}}},[l.reference,c.floating.current,d,p,n]),{handleMouseMove:p,x:a,y:s,opened:n,setOpened:o,boundaryRef:i,floating:c.setFloating}}var Nm={tooltip:"m_1b3c8819",arrow:"m_f898399f"};var Hce={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:Pt("popover")},Wce=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?He(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),B0=M((e,t)=>{let r=z("TooltipFloating",Hce,e),{children:n,refProp:o,withinPortal:i,style:a,className:s,classNames:l,styles:c,unstyled:d,radius:u,color:f,label:m,offset:p,position:h,multiline:y,zIndex:x,disabled:v,defaultOpened:_,variant:I,vars:S,portalProps:w,...P}=r,E=lt(),B=K({name:"TooltipFloating",props:r,classes:Nm,className:s,style:a,classNames:l,styles:c,unstyled:d,rootSelector:"tooltip",vars:S,varsResolver:Wce}),{handleMouseMove:H,x:Z,y:q,opened:T,boundaryRef:k,floating:$,setOpened:C}=kH({offset:p,position:h,defaultOpened:_});if(!yo(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let A=Ve(k,Sl(n),t),D=n.props,N=G=>{D.onMouseEnter?.(G),H(G),C(!0)},U=G=>{D.onMouseLeave?.(G),C(!1)};return(0,Qd.jsxs)(Qd.Fragment,{children:[(0,Qd.jsx)(_n,{...w,withinPortal:i,children:(0,Qd.jsx)(F,{...P,...B("tooltip",{style:{...Vh(a,E),zIndex:x,display:!v&&T?"block":"none",top:(q&&Math.round(q))??"",left:(Z&&Math.round(Z))??""}}),variant:I,ref:$,mod:{multiline:y},children:m})}),(0,CH.cloneElement)(n,{...D,[o]:A,onMouseEnter:N,onMouseLeave:U})]})});B0.classes=Nm;B0.displayName="@mantine/core/TooltipFloating";var aR=b(O(),1);var DJe=b(R(),1);var j0=b(R(),1),PH=(0,j0.createContext)(!1),DH=PH.Provider,RH=()=>(0,j0.useContext)(PH);var Zce={openDelay:0,closeDelay:0};function U0(e){let{openDelay:t,closeDelay:r,children:n}=z("TooltipGroup",Zce,e);return(0,aR.jsx)(DH,{value:!0,children:(0,aR.jsx)(D9,{delay:{open:t,close:r},children:n})})}U0.displayName="@mantine/core/TooltipGroup";U0.extend=e=>e;var V0=b(R(),1);function Gce(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function qce(e){let t=Gce(e.middlewares),r=[om(e.offset)];return t.shift&&r.push(Od(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&r.push(typeof t.flip=="boolean"?zd():zd(t.flip)),r.push(Vg({element:e.arrowRef,padding:e.arrowOffset})),t.inline?r.push(typeof t.inline=="boolean"?Ql():Ql(t.inline)):e.inline&&r.push(Ql()),r}function EH(e){let[t,r]=(0,V0.useState)(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,i=RH(),a=pt(),s=(0,V0.useCallback)(w=>{r(w),w&&v(a)},[a]),{x:l,y:c,context:d,refs:u,update:f,placement:m,middlewareData:{arrow:{x:p,y:h}={}}}=im({strategy:e.strategy,placement:e.position,open:o,onOpenChange:s,middleware:qce(e)}),{delay:y,currentId:x,setCurrentId:v}=R9(d,{id:a}),{getReferenceProps:_,getFloatingProps:I}=$9([C9(d,{enabled:e.events?.hover,delay:i?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),T9(d,{enabled:e.events?.focus,visibleOnly:!0}),A9(d,{role:"tooltip"}),E9(d,{enabled:typeof e.opened>"u"})]);RI({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:u,update:f}}),br(()=>{e.onPositionChange?.(m)},[m]);let S=o&&x&&x!==a;return{x:l,y:c,arrowX:p,arrowY:h,reference:u.setReference,floating:u.setFloating,getFloatingProps:I,getReferenceProps:_,isGroupPhase:S,opened:o,placement:m}}var TH={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Pt("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},Kce=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?He(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),kt=M((e,t)=>{let r=z("Tooltip",TH,e),{children:n,position:o,refProp:i,label:a,openDelay:s,closeDelay:l,onPositionChange:c,opened:d,defaultOpened:u,withinPortal:f,radius:m,color:p,classNames:h,styles:y,unstyled:x,style:v,className:_,withArrow:I,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:E,offset:B,transitionProps:H,multiline:Z,events:q,zIndex:T,disabled:k,positionDependencies:$,onClick:C,onMouseEnter:A,onMouseLeave:D,inline:N,variant:U,keepMounted:G,vars:re,portalProps:ge,mod:me,floatingStrategy:X,middlewares:oe,...Ie}=z("Tooltip",TH,r),{dir:se}=ei(),$e=(0,H0.useRef)(null),Ue=EH({position:II(se,o),closeDelay:l,openDelay:s,onPositionChange:c,opened:d,defaultOpened:u,events:q,arrowRef:$e,arrowOffset:w,offset:typeof B=="number"?B+(I?S/2:0):B,positionDependencies:[...$,n],inline:N,strategy:X,middlewares:oe}),Je=K({name:"Tooltip",props:r,classes:Nm,className:_,style:v,classNames:h,styles:y,unstyled:x,rootSelector:"tooltip",vars:re,varsResolver:Kce});if(!yo(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let at=Ve(Ue.reference,Sl(n),t),ze=SH(H,{duration:100,transition:"fade"}),Kt=n.props;return(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(_n,{...ge,withinPortal:f,children:(0,Vs.jsx)(Vo,{...ze,keepMounted:G,mounted:!k&&!!Ue.opened,duration:Ue.isGroupPhase?10:ze.duration,children:Xt=>(0,Vs.jsxs)(F,{...Ie,"data-fixed":X==="fixed"||void 0,variant:U,mod:[{multiline:Z},me],...Ue.getFloatingProps({ref:Ue.floating,className:Je("tooltip").className,style:{...Je("tooltip").style,...Xt,zIndex:T,top:Ue.y??0,left:Ue.x??0}}),children:[a,(0,Vs.jsx)(Zg,{ref:$e,arrowX:Ue.arrowX,arrowY:Ue.arrowY,visible:I,position:Ue.placement,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:E,...Je("arrow")})]})})}),(0,H0.cloneElement)(n,Ue.getReferenceProps({onClick:C,onMouseEnter:A,onMouseLeave:D,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,className:Ze(_,Kt.className),...Kt,[i]:at}))]})});kt.classes=Nm;kt.displayName="@mantine/core/Tooltip";kt.Floating=B0;kt.Group=U0;var yv=b(O(),1),fc=b(R(),1);var sR={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};var Xce={withItemsBorders:!0},Qce=(e,{radius:t,color:r,transitionDuration:n,size:o,transitionTimingFunction:i})=>({root:{"--sc-radius":t===void 0?void 0:Ee(t),"--sc-color":r?He(r,e):void 0,"--sc-shadow":r?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":n===void 0?void 0:`${n}ms`,"--sc-transition-timing-function":i,"--sc-padding":xe(o,"sc-padding"),"--sc-font-size":wt(o)}}),Yd=M((e,t)=>{let r=z("SegmentedControl",Xce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,data:c,value:d,defaultValue:u,onChange:f,size:m,name:p,disabled:h,readOnly:y,fullWidth:x,orientation:v,radius:_,color:I,transitionDuration:S,transitionTimingFunction:w,variant:P,autoContrast:E,withItemsBorders:B,mod:H,...Z}=r,q=K({name:"SegmentedControl",props:r,classes:sR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Qce}),T=lt(),k=c.map(se=>typeof se=="string"?{label:se,value:se}:se),$=b2(),[C,A]=(0,fc.useState)(Io()),[D,N]=(0,fc.useState)(null),[U,G]=(0,fc.useState)({}),re=(se,$e)=>{U[$e]=se,G(U)},[ge,me]=rt({value:d,defaultValue:u,finalValue:Array.isArray(c)?k.find(se=>!se.disabled)?.value??c[0]?.value??null:null,onChange:f}),X=pt(p),oe=k.map(se=>(0,fc.createElement)(F,{...q("control"),mod:{active:ge===se.value,orientation:v},key:se.value},(0,fc.createElement)("input",{...q("input"),disabled:h||se.disabled,type:"radio",name:X,value:se.value,id:`${X}-${se.value}`,checked:ge===se.value,onChange:()=>!y&&me(se.value),"data-focus-ring":T.focusRing,key:`${se.value}-input`}),(0,fc.createElement)(F,{component:"label",...q("label"),mod:{active:ge===se.value&&!(h||se.disabled),disabled:h||se.disabled,"read-only":y},htmlFor:`${X}-${se.value}`,ref:$e=>re($e,se.value),__vars:{"--sc-label-color":I!==void 0?Nn({color:I,theme:T,autoContrast:E}):void 0},key:`${se.value}-label`},(0,yv.jsx)("span",{...q("innerLabel"),children:se.label})))),Ie=Ve(t,se=>N(se));return m2(()=>{A(Io())},[c.length]),c.length===0?null:(0,yv.jsxs)(F,{...q("root"),variant:P,size:m,ref:Ie,mod:[{"full-width":x,orientation:v,initialized:$,"with-items-borders":B},H],...Z,role:"radiogroup","data-disabled":h,children:[typeof ge=="string"&&(0,yv.jsx)(LI,{target:U[ge],parent:D,component:"span",transitionDuration:"var(--sc-transition-duration)",...q("indicator")},C),oe]})});Yd.classes=sR;Yd.displayName="@mantine/core/SegmentedControl";var gi=b(O(),1),Jd=b(R(),1);var Yce={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Hs=M((e,t)=>{let r=z("Select",Yce,e),{classNames:n,styles:o,unstyled:i,vars:a,dropdownOpened:s,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:d,onFocus:u,onBlur:f,onClick:m,onChange:p,data:h,value:y,defaultValue:x,selectFirstOptionOnChange:v,onOptionSubmit:_,comboboxProps:I,readOnly:S,disabled:w,filter:P,limit:E,withScrollArea:B,maxDropdownHeight:H,size:Z,searchable:q,rightSection:T,checkIconPosition:k,withCheckIcon:$,nothingFoundMessage:C,name:A,form:D,searchValue:N,defaultSearchValue:U,onSearchChange:G,allowDeselect:re,error:ge,rightSectionPointerEvents:me,id:X,clearable:oe,clearButtonProps:Ie,hiddenInputProps:se,renderOption:$e,onClear:Ue,autoComplete:Je,scrollAreaProps:at,__defaultRightSection:ze,__clearSection:Kt,__clearable:Xt,chevronColor:io,...pe}=r,ue=(0,Jd.useMemo)(()=>bm(h),[h]),Se=(0,Jd.useMemo)(()=>Vd(ue),[ue]),Ae=pt(X),[Xe,Fe,et]=rt({value:y,defaultValue:x,finalValue:null,onChange:p}),de=typeof Xe=="string"?Se[Xe]:void 0,Pe=v2(de),[xr,fn,zo]=rt({value:N,defaultValue:U,finalValue:de?de.label:"",onChange:G}),jt=oc({opened:s,defaultOpened:l,onDropdownOpen:()=>{d?.(),jt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),jt.resetSelectedOption()}}),kr=Cr=>{fn(Cr),jt.resetSelectedOption()},{resolvedClassNames:ps,resolvedStyles:tf}=Vr({props:r,styles:o,classNames:n});(0,Jd.useEffect)(()=>{v&&jt.selectFirstOption()},[v,xr]),(0,Jd.useEffect)(()=>{y===null&&kr(""),typeof y=="string"&&de&&(Pe?.value!==de.value||Pe?.label!==de.label)&&kr(de.label)},[y,de]),(0,Jd.useEffect)(()=>{!et&&!zo&&kr(typeof Xe=="string"&&Se[Xe]?.label||"")},[h,Xe]);let rf=(0,gi.jsx)(Be.ClearButton,{...Ie,onClear:()=>{Fe(null,null),kr(""),Ue?.()}}),of=oe&&!!Xe&&!w&&!S;return(0,gi.jsxs)(gi.Fragment,{children:[(0,gi.jsxs)(Be,{store:jt,__staticSelector:"Select",classNames:ps,styles:tf,unstyled:i,readOnly:S,onOptionSubmit:Cr=>{_?.(Cr);let xl=re&&Se[Cr].value===Xe?null:Se[Cr],bl=xl?xl.value:null;bl!==Xe&&Fe(bl,xl),!et&&kr(typeof bl=="string"&&xl?.label||""),jt.closeDropdown()},size:Z,...I,children:[(0,gi.jsx)(Be.Target,{targetType:q?"input":"button",autoComplete:Je,children:(0,gi.jsx)(Yt,{id:Ae,ref:t,__defaultRightSection:(0,gi.jsx)(Be.Chevron,{size:Z,error:ge,unstyled:i,color:io}),__clearSection:rf,__clearable:of,rightSection:T,rightSectionPointerEvents:me||(of?"all":"none"),...pe,size:Z,__staticSelector:"Select",disabled:w,readOnly:S||!q,value:xr,onChange:Cr=>{kr(Cr.currentTarget.value),jt.openDropdown(),v&&jt.selectFirstOption()},onFocus:Cr=>{q&&jt.openDropdown(),u?.(Cr)},onBlur:Cr=>{q&&jt.closeDropdown(),kr(Xe!=null&&Se[Xe]?.label||""),f?.(Cr)},onClick:Cr=>{q?jt.openDropdown():jt.toggleDropdown(),m?.(Cr)},classNames:ps,styles:tf,unstyled:i,pointer:!q,error:ge})}),(0,gi.jsx)(Sm,{data:ue,hidden:S||w,filter:P,search:xr,limit:E,hiddenWhenEmpty:!C,withScrollArea:B,maxDropdownHeight:H,filterOptions:q&&de?.label!==xr,value:Xe,checkIconPosition:k,withCheckIcon:$,nothingFoundMessage:C,unstyled:i,labelId:pe.label?`${Ae}-label`:void 0,"aria-label":pe.label?void 0:pe["aria-label"],renderOption:$e,scrollAreaProps:at})]}),(0,gi.jsx)(Be.HiddenInput,{value:Xe,name:A,form:D,disabled:w,...se})]})});Hs.classes={...Yt.classes,...Be.classes};Hs.displayName="@mantine/core/Select";var vi=b(O(),1),Zet=b(R(),1);var cR=b(O(),1);var Fet=b(R(),1);function $H({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=lt(),i=t===void 0?e:t,a=gs({"--sg-spacing-x":Tt(nd(e)),"--sg-spacing-y":Tt(nd(i)),"--sg-cols":nd(r)?.toString()}),s=ut(o.breakpoints).reduce((d,u)=>(d[u]||(d[u]={}),typeof e=="object"&&e[u]!==void 0&&(d[u]["--sg-spacing-x"]=Tt(e[u])),typeof i=="object"&&i[u]!==void 0&&(d[u]["--sg-spacing-y"]=Tt(i[u])),typeof r=="object"&&r[u]!==void 0&&(d[u]["--sg-cols"]=r[u]),d),{}),c=Eh(ut(s),o.breakpoints).filter(d=>ut(s[d.value]).length>0).map(d=>({query:`(min-width: ${o.breakpoints[d.value]})`,styles:s[d.value]}));return(0,cR.jsx)(md,{styles:a,media:c,selector:n})}function lR(e){return typeof e=="object"&&e!==null?ut(e):[]}function Jce(e){return e.sort((t,r)=>_l(t)-_l(r))}function ede({spacing:e,verticalSpacing:t,cols:r}){let n=Array.from(new Set([...lR(e),...lR(t),...lR(r)]));return Jce(n)}function AH({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=t===void 0?e:t,i=gs({"--sg-spacing-x":Tt(nd(e)),"--sg-spacing-y":Tt(nd(o)),"--sg-cols":nd(r)?.toString()}),a=ede({spacing:e,verticalSpacing:t,cols:r}),s=a.reduce((c,d)=>(c[d]||(c[d]={}),typeof e=="object"&&e[d]!==void 0&&(c[d]["--sg-spacing-x"]=Tt(e[d])),typeof o=="object"&&o[d]!==void 0&&(c[d]["--sg-spacing-y"]=Tt(o[d])),typeof r=="object"&&r[d]!==void 0&&(c[d]["--sg-cols"]=r[d]),c),{}),l=a.map(c=>({query:`simple-grid (min-width: ${c})`,styles:s[c]}));return(0,cR.jsx)(md,{styles:i,container:l,selector:n})}var dR={container:"m_925c2d2c",root:"m_2415a157"};var tde={cols:1,spacing:"md",type:"media"},Fm=M((e,t)=>{let r=z("SimpleGrid",tde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,cols:c,verticalSpacing:d,spacing:u,type:f,...m}=r,p=K({name:"SimpleGrid",classes:dR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l}),h=Cy();return f==="container"?(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsx)(AH,{...r,selector:`.${h}`}),(0,vi.jsx)("div",{...p("container"),children:(0,vi.jsx)(F,{ref:t,...p("root",{className:h}),...m})})]}):(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsx)($H,{...r,selector:`.${h}`}),(0,vi.jsx)(F,{ref:t,...p("root",{className:h}),...m})]})});Fm.classes=dR;Fm.displayName="@mantine/core/SimpleGrid";var OH=b(O(),1);var ntt=b(R(),1);var uR={root:"m_18320242","skeleton-fade":"m_299c329c"};var rde={visible:!0,animate:!0},ode=(e,{width:t,height:r,radius:n,circle:o})=>({root:{"--skeleton-height":W(r),"--skeleton-width":o?W(r):W(t),"--skeleton-radius":o?"1000px":n===void 0?void 0:Ee(n)}}),Sn=M((e,t)=>{let r=z("Skeleton",rde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,width:c,height:d,circle:u,visible:f,radius:m,animate:p,mod:h,...y}=r,x=K({name:"Skeleton",classes:uR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ode});return(0,OH.jsx)(F,{ref:t,...x("root"),mod:[{visible:f,animate:p},h],...y})});Sn.classes=uR;Sn.displayName="@mantine/core/Skeleton";var zH=b(O(),1),ptt=b(R(),1);var fR={root:"m_6d731127"};var nde={gap:"md",align:"stretch",justify:"flex-start"},ide=(e,{gap:t,align:r,justify:n})=>({root:{"--stack-gap":Tt(t),"--stack-align":r,"--stack-justify":n}}),je=M((e,t)=>{let r=z("Stack",nde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,align:c,justify:d,gap:u,variant:f,...m}=r,p=K({name:"Stack",props:r,classes:fR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ide});return(0,zH.jsx)(F,{ref:t,...p("root"),variant:f,...m})});je.classes=fR;je.displayName="@mantine/core/Stack";var eu=b(O(),1);var ztt=b(R(),1);var W0=b(R(),1),NH=(0,W0.createContext)(null),FH=NH.Provider,LH=()=>(0,W0.useContext)(NH);var Z0=b(O(),1);var ktt=b(R(),1);var ade={},G0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("SwitchGroup",ade,e),[d,u]=rt({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,Z0.jsx)(FH,{value:{value:d,onChange:m=>{let p=m.currentTarget.value;!l&&u(d.includes(p)?d.filter(h=>h!==p):[...d,p])},size:i},children:(0,Z0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:(0,Z0.jsx)(_m,{role:"group",children:s})})})});G0.classes=ct.Wrapper.classes;G0.displayName="@mantine/core/SwitchGroup";var mR={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};var sde={labelPosition:"right"},lde=(e,{radius:t,color:r,size:n})=>({root:{"--switch-radius":t===void 0?void 0:Ee(t),"--switch-height":xe(n,"switch-height"),"--switch-width":xe(n,"switch-width"),"--switch-thumb-size":xe(n,"switch-thumb-size"),"--switch-label-font-size":xe(n,"switch-label-font-size"),"--switch-track-label-padding":xe(n,"switch-track-label-padding"),"--switch-color":r?He(r,e):void 0}}),ja=M((e,t)=>{let r=z("Switch",sde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,offLabel:u,onLabel:f,id:m,size:p,radius:h,wrapperProps:y,thumbIcon:x,checked:v,defaultChecked:_,onChange:I,labelPosition:S,description:w,error:P,disabled:E,variant:B,rootRef:H,mod:Z,...q}=r,T=LH(),k=p||T?.size,$=K({name:"Switch",props:r,classes:mR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:lde}),{styleProps:C,rest:A}=Hr(q),D=pt(m),N=T?{checked:T.value.includes(A.value),onChange:T.onChange}:{},[U,G]=rt({value:N.checked??v,defaultValue:_,finalValue:!1});return(0,eu.jsxs)(Hd,{...$("root"),__staticSelector:"Switch",__stylesApiProps:r,id:D,size:k,labelPosition:S,label:d,description:w,error:P,disabled:E,bodyElement:"label",labelElement:"span",classNames:n,styles:a,unstyled:s,"data-checked":N.checked||v||void 0,variant:B,ref:H,mod:Z,...C,...y,children:[(0,eu.jsx)("input",{...A,disabled:E,checked:U,"data-checked":N.checked||v||void 0,onChange:re=>{T?N.onChange?.(re):I?.(re),G(re.currentTarget.checked)},id:D,ref:t,type:"checkbox",role:"switch",...$("input")}),(0,eu.jsxs)(F,{"aria-hidden":"true",component:"span",mod:{error:P,"label-position":S,"without-labels":!f&&!u},...$("track"),children:[(0,eu.jsx)(F,{component:"span",mod:"reduce-motion",...$("thumb"),children:x}),(0,eu.jsx)("span",{...$("trackLabel"),children:U?f:u})]})]})});ja.classes={...mR,...r0};ja.displayName="@mantine/core/Switch";ja.Group=G0;var tw=b(O(),1);var Irt=b(R(),1);var jH=b(O(),1),trt=b(R(),1);var Ktt=b(R(),1);var Qtt=b(O(),1);var[MH,BH]=Vt("Table component was not found in the tree");var mc={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function cde(e,t){if(!t)return;let r={};return t.columnBorder&&e.withColumnBorders&&(r["data-with-column-border"]=!0),t.rowBorder&&e.withRowBorders&&(r["data-with-row-border"]=!0),t.striped&&e.striped&&(r["data-striped"]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(r["data-hover"]=!0),t.captionSide&&e.captionSide&&(r["data-side"]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(r["data-sticky"]=!0),r}function tu(e,t){let r=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=M((o,i)=>{let a=z(r,{},o),{classNames:s,className:l,style:c,styles:d,...u}=a,f=BH();return(0,jH.jsx)(F,{component:e,ref:i,...cde(f,t),...f.getStyles(e,{className:l,classNames:s,style:c,styles:d,props:a}),...u})});return n.displayName=`@mantine/core/${r}`,n.classes=mc,n}var _v=tu("th",{columnBorder:!0}),q0=tu("td",{columnBorder:!0}),Lm=tu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),K0=tu("thead",{stickyHeader:!0}),X0=tu("tbody"),Q0=tu("tfoot"),Y0=tu("caption",{captionSide:!0});var qo=b(O(),1);function J0({data:e}){return(0,qo.jsxs)(qo.Fragment,{children:[e.caption&&(0,qo.jsx)(Y0,{children:e.caption}),e.head&&(0,qo.jsx)(K0,{children:(0,qo.jsx)(Lm,{children:e.head.map((t,r)=>(0,qo.jsx)(_v,{children:t},r))})}),e.body&&(0,qo.jsx)(X0,{children:e.body.map((t,r)=>(0,qo.jsx)(Lm,{children:t.map((n,o)=>(0,qo.jsx)(q0,{children:n},o))},r))}),e.foot&&(0,qo.jsx)(Q0,{children:(0,qo.jsx)(Lm,{children:e.foot.map((t,r)=>(0,qo.jsx)(_v,{children:t},r))})})]})}J0.displayName="@mantine/core/TableDataRenderer";var pR=b(O(),1);var frt=b(R(),1);var dde={type:"scrollarea"},ude=(e,{minWidth:t,maxHeight:r,type:n})=>({scrollContainer:{"--table-min-width":W(t),"--table-max-height":W(r),"--table-overflow":n==="native"?"auto":void 0}}),ew=M((e,t)=>{let r=z("TableScrollContainer",dde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,minWidth:d,maxHeight:u,type:f,scrollAreaProps:m,...p}=r,h=K({name:"TableScrollContainer",classes:mc,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ude,rootSelector:"scrollContainer"});return(0,pR.jsx)(F,{component:f==="scrollarea"?$r:"div",...f==="scrollarea"?u?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:t,...h("scrollContainer"),...p,children:(0,pR.jsx)("div",{...h("scrollContainerInner"),children:c})})});ew.classes=mc;ew.displayName="@mantine/core/TableScrollContainer";var fde={withRowBorders:!0,verticalSpacing:7},mde=(e,{layout:t,captionSide:r,horizontalSpacing:n,verticalSpacing:o,borderColor:i,stripedColor:a,highlightOnHoverColor:s,striped:l,highlightOnHover:c,stickyHeaderOffset:d,stickyHeader:u})=>({table:{"--table-layout":t,"--table-caption-side":r,"--table-horizontal-spacing":Tt(n),"--table-vertical-spacing":Tt(o),"--table-border-color":i?He(i,e):void 0,"--table-striped-color":l&&a?He(a,e):void 0,"--table-highlight-on-hover-color":c&&s?He(s,e):void 0,"--table-sticky-header-offset":u?W(d):void 0}}),dr=M((e,t)=>{let r=z("Table",fde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,horizontalSpacing:c,verticalSpacing:d,captionSide:u,stripedColor:f,highlightOnHoverColor:m,striped:p,highlightOnHover:h,withColumnBorders:y,withRowBorders:x,withTableBorder:v,borderColor:_,layout:I,variant:S,data:w,children:P,stickyHeader:E,stickyHeaderOffset:B,mod:H,tabularNums:Z,...q}=r,T=K({name:"Table",props:r,className:o,style:i,classes:mc,classNames:n,styles:a,unstyled:s,rootSelector:"table",vars:l,varsResolver:mde});return(0,tw.jsx)(MH,{value:{getStyles:T,stickyHeader:E,striped:p===!0?"odd":p||void 0,highlightOnHover:h,withColumnBorders:y,withRowBorders:x,captionSide:u||"bottom"},children:(0,tw.jsx)(F,{component:"table",variant:S,ref:t,mod:[{"data-with-table-border":v,"data-tabular-nums":Z},H],...T("table"),...q,children:P||!!w&&(0,tw.jsx)(J0,{data:w})})})});dr.classes=mc;dr.displayName="@mantine/core/Table";dr.Td=q0;dr.Th=_v;dr.Tr=Lm;dr.Thead=K0;dr.Tbody=X0;dr.Tfoot=Q0;dr.Caption=Y0;dr.ScrollContainer=ew;dr.DataRenderer=J0;var Ko=b(O(),1),rw=b(R(),1);var Nrt=b(O(),1);var Lrt=b(R(),1);function UH({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(pi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.label.toLowerCase().trim())===-1)}):r.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function pde(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(r=>r.trim()).filter(r=>r!==""):[t]}function hR({splitChars:e,allowDuplicates:t,maxTags:r,value:n,currentTags:o}){let i=pde(e,n),a=t?[...o,...i]:[...new Set([...o,...i])];return r?a.slice(0,r):a}var hde={maxTags:1/0,allowDuplicates:!1,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:","},pc=M((e,t)=>{let r=z("TagsInput",hde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,maxTags:p,allowDuplicates:h,onDuplicate:y,variant:x,data:v,dropdownOpened:_,defaultDropdownOpened:I,onDropdownOpen:S,onDropdownClose:w,selectFirstOptionOnChange:P,onOptionSubmit:E,comboboxProps:B,filter:H,limit:Z,withScrollArea:q,maxDropdownHeight:T,searchValue:k,defaultSearchValue:$,onSearchChange:C,readOnly:A,disabled:D,splitChars:N,onFocus:U,onBlur:G,onPaste:re,radius:ge,rightSection:me,rightSectionWidth:X,rightSectionPointerEvents:oe,rightSectionProps:Ie,leftSection:se,leftSectionWidth:$e,leftSectionPointerEvents:Ue,leftSectionProps:Je,inputContainer:at,inputWrapperOrder:ze,withAsterisk:Kt,required:Xt,labelProps:io,descriptionProps:pe,errorProps:ue,wrapperProps:Se,description:Ae,label:Xe,error:Fe,withErrorStyles:et,name:de,form:Pe,id:xr,clearable:fn,clearButtonProps:zo,hiddenInputProps:jt,hiddenInputValuesDivider:kr,mod:ps,renderOption:tf,onRemove:rf,onClear:of,scrollAreaProps:Cr,acceptValueOnBlur:xl,...bl}=r,bh=pt(xr),yh=bm(v),_h=Vd(yh),nf=(0,rw.useRef)(null),yl=Ve(nf,t),ir=oc({opened:_,defaultOpened:I,onDropdownOpen:S,onDropdownClose:()=>{w?.(),ir.resetSelectedOption()}}),{styleProps:OC,rest:{type:Ete,autoComplete:zC,...NC}}=Hr(bl),[st,On]=rt({value:d,defaultValue:u,finalValue:[],onChange:f}),[Yn,FC]=rt({value:k,defaultValue:$,finalValue:"",onChange:C}),zi=ke=>{FC(ke),ir.resetSelectedOption()},Yc=K({name:"TagsInput",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:Ih,resolvedStyles:wh}=Vr({props:r,styles:a,classNames:n}),Zb=ke=>{let No=st.some(ua=>ua.toLowerCase()===ke.toLowerCase());No&&y?.(ke),(!No||No&&h)&&st.length<p&&(E?.(ke),zi(""),ke.length>0&&On([...st,ke]))},LC=ke=>{if(m?.(ke),ke.isPropagationStopped())return;let No=Yn.trim(),{length:ua}=No;if(N.includes(ke.key)&&ua>0&&(On(hR({splitChars:N,allowDuplicates:h,maxTags:p,value:Yn,currentTags:st})),zi(""),ke.preventDefault()),ke.key==="Enter"&&ua>0&&!ke.nativeEvent.isComposing){if(ke.preventDefault(),!!document.querySelector(`#${ir.listId} [data-combobox-option][data-combobox-selected]`))return;Zb(No)}ke.key==="Backspace"&&ua===0&&st.length>0&&!ke.nativeEvent.isComposing&&(rf?.(st[st.length-1]),On(st.slice(0,st.length-1)))},Gb=ke=>{if(re?.(ke),ke.preventDefault(),ke.clipboardData){let No=ke.clipboardData.getData("text/plain");On(hR({splitChars:N,allowDuplicates:h,maxTags:p,value:`${Yn}${No}`,currentTags:st})),zi("")}},MC=st.map((ke,No)=>(0,Ko.jsx)(Ms,{withRemoveButton:!A,onRemove:()=>{let ua=st.slice();ua.splice(No,1),On(ua),rf?.(ke)},unstyled:s,disabled:D,...Yc("pill"),children:ke},`${ke}-${No}`));(0,rw.useEffect)(()=>{P&&ir.selectFirstOption()},[P,st,Yn]);let qb=(0,Ko.jsx)(Be.ClearButton,{...zo,onClear:()=>{On([]),zi(""),nf.current?.focus(),ir.openDropdown(),of?.()}});return(0,Ko.jsxs)(Ko.Fragment,{children:[(0,Ko.jsxs)(Be,{store:ir,classNames:Ih,styles:wh,unstyled:s,size:c,readOnly:A,__staticSelector:"TagsInput",onOptionSubmit:ke=>{E?.(ke),zi(""),st.length<p&&On([...st,_h[ke].label]),ir.resetSelectedOption()},...B,children:[(0,Ko.jsx)(Be.DropdownTarget,{children:(0,Ko.jsx)(ac,{...OC,__staticSelector:"TagsInput",classNames:Ih,styles:wh,unstyled:s,size:c,className:o,style:i,variant:x,disabled:D,radius:ge,rightSection:me,__clearSection:qb,__clearable:fn&&st.length>0&&!D&&!A,rightSectionWidth:X,rightSectionPointerEvents:oe,rightSectionProps:Ie,leftSection:se,leftSectionWidth:$e,leftSectionPointerEvents:Ue,leftSectionProps:Je,inputContainer:at,inputWrapperOrder:ze,withAsterisk:Kt,required:Xt,labelProps:io,descriptionProps:pe,errorProps:ue,wrapperProps:Se,description:Ae,label:Xe,error:Fe,withErrorStyles:et,__stylesApiProps:{...r,multiline:!0},id:bh,mod:ps,children:(0,Ko.jsxs)(Ms.Group,{disabled:D,unstyled:s,...Yc("pillsList"),children:[MC,(0,Ko.jsx)(Be.EventsTarget,{autoComplete:zC,children:(0,Ko.jsx)(ac.Field,{...NC,ref:yl,...Yc("inputField"),unstyled:s,onKeyDown:LC,onFocus:ke=>{U?.(ke),ir.openDropdown()},onBlur:ke=>{G?.(ke),xl&&Zb(Yn),ir.closeDropdown()},onPaste:Gb,value:Yn,onChange:ke=>zi(ke.currentTarget.value),required:Xt&&st.length===0,disabled:D,readOnly:A,id:bh})})]})})}),(0,Ko.jsx)(Sm,{data:UH({data:yh,value:st}),hidden:A||D,filter:H,search:Yn,limit:Z,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:T,unstyled:s,labelId:Xe?`${bh}-label`:void 0,"aria-label":Xe?void 0:bl["aria-label"],renderOption:tf,scrollAreaProps:Cr})]}),(0,Ko.jsx)(Be.HiddenInput,{name:de,form:Pe,value:st,valuesDivider:kr,disabled:D,...jt})]})});pc.classes={...Yt.classes,...Be.classes};pc.displayName="@mantine/core/TagsInput";var VH=b(O(),1),aot=b(R(),1);var gde={},er=M((e,t)=>{let r=z("TextInput",gde,e);return(0,VH.jsx)(Yt,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});er.classes=Yt.classes;er.displayName="@mantine/core/TextInput";var HH=b(O(),1),mot=b(R(),1);var gR={root:"m_7341320d"};var vde={},xde=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ti-size":xe(t,"ti-size"),"--ti-radius":r===void 0?void 0:Ee(r),"--ti-bg":i||n?s.background:void 0,"--ti-color":i||n?s.color:void 0,"--ti-bd":i||n?s.border:void 0}}},ru=M((e,t)=>{let r=z("ThemeIcon",vde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,...d}=r,u=K({name:"ThemeIcon",classes:gR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xde});return(0,HH.jsx)(F,{ref:t,...u("root"),...d})});ru.classes=gR;ru.displayName="@mantine/core/ThemeIcon";var ZH=b(O(),1),Dot=b(R(),1);var wot=b(R(),1),Sot=b(O(),1);var bde=["h1","h2","h3","h4","h5","h6"],yde=["xs","sm","md","lg","xl"];function WH(e,t){let r=t!==void 0?t:`h${e}`;return bde.includes(r)?{fontSize:`var(--mantine-${r}-font-size)`,fontWeight:`var(--mantine-${r}-font-weight)`,lineHeight:`var(--mantine-${r}-line-height)`}:yde.includes(r)?{fontSize:`var(--mantine-font-size-${r})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:W(r),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var vR={root:"m_8a5d1357"};var _de={order:1},Ide=(e,{order:t,size:r,lineClamp:n,textWrap:o})=>{let i=WH(t,r);return{root:{"--title-fw":i.fontWeight,"--title-lh":i.lineHeight,"--title-fz":i.fontSize,"--title-line-clamp":typeof n=="number"?n.toString():void 0,"--title-text-wrap":o}}},xi=M((e,t)=>{let r=z("Title",_de,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,order:l,vars:c,size:d,variant:u,lineClamp:f,textWrap:m,mod:p,...h}=r,y=K({name:"Title",props:r,classes:vR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Ide});return[1,2,3,4,5,6].includes(l)?(0,ZH.jsx)(F,{...y("root"),component:`h${l}`,variant:u,ref:t,mod:[{order:l,"data-line-clamp":typeof f=="number"},p],size:d,...h}):null});xi.classes=vR;xi.displayName="@mantine/core/Title";var Mm=b(O(),1),bi=b(R(),1);var Ws=b(O(),1);var qH=b(R(),1);var GH=b(R(),1),Iv=(0,GH.createContext)(null);Iv.displayName="@mantine/modals/ModalsContext";function KH(){let e=(0,qH.useContext)(Iv);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}function XH({id:e,cancelProps:t,confirmProps:r,labels:n={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:a,onCancel:s,onConfirm:l,children:c}){let{cancel:d,confirm:u}=n,f=KH(),m=h=>{typeof t?.onClick=="function"&&t?.onClick(h),typeof s=="function"&&s(),i&&f.closeModal(e)},p=h=>{typeof r?.onClick=="function"&&r?.onClick(h),typeof l=="function"&&l(),o&&f.closeModal(e)};return(0,Ws.jsxs)(Ws.Fragment,{children:[c&&(0,Ws.jsx)(F,{mb:"md",children:c}),(0,Ws.jsxs)(De,{mt:c?0:"md",justify:"flex-end",...a,children:[(0,Ws.jsx)(ht,{variant:"default",...t,onClick:m,children:t?.children||d}),(0,Ws.jsx)(ht,{...r,onClick:p,children:r?.children||u})]})]})}var[QH,ou]=y2("mantine-modals"),YH=e=>{let t=e.modalId||Io();return ou("openModal")({...e,modalId:t}),t},JH=e=>{let t=e.modalId||Io();return ou("openConfirmModal")({...e,modalId:t}),t},eW=e=>{let t=e.modalId||Io();return ou("openContextModal")({...e,modalId:t}),t},tW=ou("closeModal"),rW=ou("closeAllModals"),oW=e=>ou("updateModal")(e),nW=e=>ou("updateContextModal")(e),Ua={open:YH,close:tW,closeAll:rW,openConfirmModal:JH,openContextModal:eW,updateModal:oW,updateContextModal:nW};function iW(e,t){t&&e.type==="confirm"&&e.props.onCancel?.(),e.props.onClose?.()}function aW(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{let r=e.modals.find(o=>o.id===t.modalId);if(!r)return e;iW(r,t.canceled);let n=e.modals.filter(o=>o.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(r=>{iW(r,t.canceled)}),{current:e.current,modals:[]}):e;case"UPDATE":{let{modalId:r,newProps:n}=t,o=e.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...n}}:a.type==="context"?{...a,props:{...a.props,...n,innerProps:{...a.props.innerProps,...n.innerProps}}}:a),i=e.current?.id===r&&o.find(a=>a.id===r)||e.current;return{...e,modals:o,current:i}}default:return e}}function wde(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d,...u}=e;return{confirmProps:{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:{id:t,...u}}}function xR({children:e,modalProps:t,labels:r,modals:n}){let[o,i]=(0,bi.useReducer)(aW,{modals:[],current:null}),a=(0,bi.useRef)(o);a.current=o;let s=(0,bi.useCallback)(v=>{i({type:"CLOSE_ALL",canceled:v})},[a,i]),l=(0,bi.useCallback)(({modalId:v,..._})=>{let I=v||Io();return i({type:"OPEN",modal:{id:I,type:"content",props:_}}),I},[i]),c=(0,bi.useCallback)(({modalId:v,..._})=>{let I=v||Io();return i({type:"OPEN",modal:{id:I,type:"confirm",props:_}}),I},[i]),d=(0,bi.useCallback)((v,{modalId:_,...I})=>{let S=_||Io();return i({type:"OPEN",modal:{id:S,type:"context",props:I,ctx:v}}),S},[i]),u=(0,bi.useCallback)((v,_)=>{i({type:"CLOSE",modalId:v,canceled:_})},[a,i]),f=(0,bi.useCallback)(({modalId:v,..._})=>{i({type:"UPDATE",modalId:v,newProps:_})},[i]),m=(0,bi.useCallback)(({modalId:v,..._})=>{i({type:"UPDATE",modalId:v,newProps:_})},[i]);QH({openModal:l,openConfirmModal:c,openContextModal:({modal:v,..._})=>d(v,_),closeModal:u,closeContextModal:u,closeAllModals:s,updateModal:f,updateContextModal:m});let p={modalProps:t||{},modals:o.modals,openModal:l,openConfirmModal:c,openContextModal:d,closeModal:u,closeContextModal:u,closeAll:s,updateModal:f,updateContextModal:m},h=()=>{let v=a.current.current;switch(v?.type){case"context":{let{innerProps:_,...I}=v.props,S=n[v.ctx];return{modalProps:I,content:(0,Mm.jsx)(S,{innerProps:_,context:p,id:v.id})}}case"confirm":{let{modalProps:_,confirmProps:I}=wde(v.props);return{modalProps:_,content:(0,Mm.jsx)(XH,{...I,id:v.id,labels:v.props.labels||r})}}case"content":{let{children:_,...I}=v.props;return{modalProps:I,content:_}}default:return{modalProps:{},content:null}}},{modalProps:y,content:x}=h();return(0,Mm.jsxs)(Iv.Provider,{value:p,children:[(0,Mm.jsx)(mo,{zIndex:Pt("modal")+1,...t,...y,opened:o.modals.length>0,onClose:()=>u(o.current?.id),children:x}),e]})}var sW=b(R(),1);function wv(e){let t=e,r=!1,n=new Set;return{getState(){return t},updateState(o){t=typeof o=="function"?o(t):o},setState(o){this.updateState(o),n.forEach(i=>i(t))},initialize(o){r||(t=o,r=!0)},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Sv(e){return(0,sW.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function Sde(e,t,r){let n=[],o=[],i={};for(let a of e){let s=a.position||t;i[s]=i[s]||0,i[s]+=1,i[s]<=r?o.push(a):n.push(a)}return{notifications:o,queue:n}}var lW=()=>wv({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Zs=lW(),bR=(e=Zs)=>Sv(e);function nu(e,t){let r=e.getState(),n=t([...r.notifications,...r.queue]),o=Sde(n,r.defaultPosition,r.limit);e.setState({notifications:o.notifications,queue:o.queue,limit:r.limit,defaultPosition:r.defaultPosition})}function cW(e,t=Zs){let r=e.id||Io();return nu(t,n=>e.id&&n.some(o=>o.id===e.id)?n:[...n,{...e,id:r}]),r}function ow(e,t=Zs){return nu(t,r=>r.filter(n=>n.id===e?(n.onClose?.(n),!1):!0)),e}function dW(e,t=Zs){return nu(t,r=>r.map(n=>n.id===e.id?{...n,...e}:n)),e.id}function uW(e=Zs){nu(e,()=>[])}function fW(e=Zs){nu(e,t=>t.slice(0,e.getState().limit))}var Xo={show:cW,hide:ow,update:dW,clean:uW,cleanQueue:fW,updateState:nu};var po=b(O(),1),Rv=b(R(),1);function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},nw(e,t)}function iw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nw(e,t)}var kv=b(R()),Cv=b(ql());var yR={disabled:!1};var mW=b(R()),Bm=mW.default.createContext(null);var pW=function(t){return t.scrollTop};var Pv="unmounted",iu="exited",au="entering",Um="entered",_R="exiting",Gs=(function(e){iw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?s?(l=iu,i.appearStatus=au):l=Um:n.unmountOnExit||n.mountOnEnter?l=Pv:l=iu,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Pv?{status:iu}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==au&&a!==Um&&(i=au):(a===au||a===Um)&&(i=_R)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===au){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Cv.default.findDOMNode(this);a&&pW(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===iu&&this.setState({status:Pv})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Cv.default.findDOMNode(this),s],c=l[0],d=l[1],u=this.getTimeouts(),f=s?u.appear:u.enter;if(!o&&!a||yR.disabled){this.safeSetState({status:Um},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:au},function(){i.props.onEntering(c,d),i.onTransitionEnd(f,function(){i.safeSetState({status:Um},function(){i.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Cv.default.findDOMNode(this);if(!i||yR.disabled){this.safeSetState({status:iu},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:_R},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:iu},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Cv.default.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Pv)return null;var i=this.props,a=i.children,s=i.in,l=i.mountOnEnter,c=i.unmountOnExit,d=i.appear,u=i.enter,f=i.exit,m=i.timeout,p=i.addEndListener,h=i.onEnter,y=i.onEntering,x=i.onEntered,v=i.onExit,_=i.onExiting,I=i.onExited,S=i.nodeRef,w=Dm(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return kv.default.createElement(Bm.Provider,{value:null},typeof a=="function"?a(o,w):kv.default.cloneElement(kv.default.Children.only(a),w))},t})(kv.default.Component);Gs.contextType=Bm;Gs.propTypes={};function jm(){}Gs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:jm,onEntering:jm,onEntered:jm,onExit:jm,onExiting:jm,onExited:jm};Gs.UNMOUNTED=Pv;Gs.EXITED=iu;Gs.ENTERING=au;Gs.ENTERED=Um;Gs.EXITING=_R;var IR=Gs;function hW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dv=b(R());var yi=b(R());function aw(e,t){var r=function(i){return t&&(0,yi.isValidElement)(i)?t(i):i},n=Object.create(null);return e&&yi.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function kde(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(n[l])for(a=0;a<n[l].length;a++){var c=n[l][a];s[n[l][a]]=r(c)}s[l]=r(l)}for(a=0;a<o.length;a++)s[o[a]]=r(o[a]);return s}function su(e,t,r){return r[t]!=null?r[t]:e.props[t]}function gW(e,t){return aw(e.children,function(r){return(0,yi.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:su(r,"appear",e),enter:su(r,"enter",e),exit:su(r,"exit",e)})})}function vW(e,t,r){var n=aw(e.children),o=kde(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if((0,yi.isValidElement)(a)){var s=i in t,l=i in n,c=t[i],d=(0,yi.isValidElement)(c)&&!c.props.in;l&&(!s||d)?o[i]=(0,yi.cloneElement)(a,{onExited:r.bind(null,a),in:!0,exit:su(a,"exit",e),enter:su(a,"enter",e)}):!l&&s&&!d?o[i]=(0,yi.cloneElement)(a,{in:!1}):l&&s&&(0,yi.isValidElement)(c)&&(o[i]=(0,yi.cloneElement)(a,{onExited:r.bind(null,a),in:c.props.in,exit:su(a,"exit",e),enter:su(a,"enter",e)}))}}),o}var Cde=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Pde={component:"div",childFactory:function(t){return t}},wR=(function(e){iw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(hW(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?gW(o,s):vW(o,a,s),firstRender:!1}},r.handleExited=function(o,i){var a=aw(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=Pm({},s.children);return delete l[o.key],{children:l}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Dm(o,["component","childFactory"]),l=this.state.contextValue,c=Cde(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?Dv.default.createElement(Bm.Provider,{value:l},c):Dv.default.createElement(Bm.Provider,{value:l},Dv.default.createElement(i,s,c))},t})(Dv.default.Component);wR.propTypes={};wR.defaultProps=Pde;var hc=wR;var SR=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function xW(e,t){return e.reduce((r,n)=>(r[n.position||t].push(n),r),SR.reduce((r,n)=>(r[n]=[],r),{}))}var bW={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Dde={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function yW({state:e,maxHeight:t,position:r,transitionDuration:n}){let[o,i]=r.split("-"),a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:bW[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:Dde[a]},c={opacity:0,maxHeight:0,transform:bW[a]};return{...s,...{entering:l,entered:l,exiting:c,exited:c}[e]}}var IW=b(O(),1),lu=b(R(),1);function _W(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var kR=(0,lu.forwardRef)(({data:e,onHide:t,autoClose:r,...n},o)=>{let{autoClose:i,message:a,...s}=e,l=_W(r,e.autoClose),c=(0,lu.useRef)(-1),d=()=>window.clearTimeout(c.current),u=()=>{t(e.id),d()},f=()=>{typeof l=="number"&&(c.current=window.setTimeout(u,l))};return(0,lu.useEffect)(()=>{e.onOpen?.(e)},[]),(0,lu.useEffect)(()=>(f(),d),[l]),(0,IW.jsx)(Gd,{...n,...s,onClose:u,ref:o,onMouseEnter:d,onMouseLeave:f,children:a})});kR.displayName="@mantine/notifications/NotificationContainer";var CR={root:"m_b37d9ac7",notification:"m_5ed0edd0"};var Rde=IR,Ede={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Pt("overlay"),store:Zs,withinPortal:!0},Tde=(e,{zIndex:t,containerWidth:r})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":W(r)}}),ta=M((e,t)=>{let r=z("Notifications",Ede,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,position:c,autoClose:d,transitionDuration:u,containerWidth:f,notificationMaxHeight:m,limit:p,zIndex:h,store:y,portalProps:x,withinPortal:v,..._}=r,I=lt(),S=bR(y),w=u2(),P=bs(),E=(0,Rv.useRef)({}),B=(0,Rv.useRef)(0),Z=(I.respectReducedMotion?P:!1)?1:u,q=K({name:"Notifications",classes:CR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Tde});(0,Rv.useEffect)(()=>{y?.updateState($=>({...$,limit:p||5,defaultPosition:c}))},[p,c]),br(()=>{S.notifications.length>B.current&&setTimeout(()=>w(),0),B.current=S.notifications.length},[S.notifications]);let T=xW(S.notifications,c),k=SR.reduce(($,C)=>($[C]=T[C].map(({style:A,...D})=>(0,po.jsx)(Rde,{timeout:Z,onEnter:()=>E.current[D.id].offsetHeight,nodeRef:{current:E.current[D.id]},children:N=>(0,po.jsx)(kR,{ref:U=>{E.current[D.id]=U},data:D,onHide:U=>ow(U,y),autoClose:d,...q("notification",{style:{...yW({state:N,position:C,transitionDuration:Z,maxHeight:m}),...A}})})},D.id)),$),{});return(0,po.jsxs)(_n,{withinPortal:v,...x,children:[(0,po.jsx)(F,{...q("root"),"data-position":"top-center",ref:t,..._,children:(0,po.jsx)(hc,{children:k["top-center"]})}),(0,po.jsx)(F,{...q("root"),"data-position":"top-left",..._,children:(0,po.jsx)(hc,{children:k["top-left"]})}),(0,po.jsx)(F,{...q("root",{className:Ni.classNames.fullWidth}),"data-position":"top-right",..._,children:(0,po.jsx)(hc,{children:k["top-right"]})}),(0,po.jsx)(F,{...q("root",{className:Ni.classNames.fullWidth}),"data-position":"bottom-right",..._,children:(0,po.jsx)(hc,{children:k["bottom-right"]})}),(0,po.jsx)(F,{...q("root"),"data-position":"bottom-left",..._,children:(0,po.jsx)(hc,{children:k["bottom-left"]})}),(0,po.jsx)(F,{...q("root"),"data-position":"bottom-center",..._,children:(0,po.jsx)(hc,{children:k["bottom-center"]})})]})});ta.classes=CR;ta.displayName="@mantine/notifications/Notifications";ta.show=Xo.show;ta.hide=Xo.hide;ta.update=Xo.update;ta.clean=Xo.clean;ta.cleanQueue=Xo.cleanQueue;ta.updateState=Xo.updateState;var Vm=b(R(),1),wW=b(O(),1),PR=Vm.createContext(void 0),Hm=e=>{let t=Vm.useContext(PR);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DR=({client:e,children:t})=>(Vm.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,wW.jsx)(PR.Provider,{value:e,children:t}));var $de={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gc,RR,SW,Ade=(SW=class{constructor(){Ce(this,gc,$de);Ce(this,RR,!1)}setTimeoutProvider(e){fe(this,gc,e)}setTimeout(e,t){return L(this,gc).setTimeout(e,t)}clearTimeout(e){L(this,gc).clearTimeout(e)}setInterval(e,t){return L(this,gc).setInterval(e,t)}clearInterval(e){L(this,gc).clearInterval(e)}},gc=new WeakMap,RR=new WeakMap,SW),Va=new Ade;function kW(e){setTimeout(e,0)}var TR=typeof window>"u"||"Deno"in globalThis;function Ir(){}function DW(e,t){return typeof e=="function"?e(t):e}function sw(e){return typeof e=="number"&&e>=0&&e!==1/0}function lw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function At(e,t){return typeof e=="function"?e(t):e}function cw(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==Ev(a,t.options))return!1}else if(!vc(t.queryKey,a))return!1}if(r!=="all"){let l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function dw(e,t){let{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(cu(t.options.mutationKey)!==cu(i))return!1}else if(!vc(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Ev(e,t){return(t?.queryKeyHashFn||cu)(e)}function cu(e){return JSON.stringify(e,(t,r)=>ER(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function vc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!vc(e[n],t[n]))return!1;return!0}let r=Object.keys(t);for(let n of r)if(!vc(e[n],t[n]))return!1;return!0}return!1}var Ode=Object.prototype.hasOwnProperty;function $R(e,t,r=0){if(e===t)return e;if(r>500)return t;let n=CW(e)&&CW(t);if(!n&&!(ER(e)&&ER(t)))return t;let o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,s=n?new Array(a):{},l=0;for(let c=0;c<a;c++){let d=n?c:i[c],u=e[d],f=t[d];if(u===f){s[d]=u,(n?c<o:Ode.call(e,d))&&l++;continue}if(u===null||f===null||typeof u!="object"||typeof f!="object"){s[d]=f;continue}let m=$R(u,f,r+1);s[d]=m,m===u&&l++}return o===a&&l===o?e:s}function uw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function CW(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ER(e){if(!PW(e))return!1;let t=Object.getPrototypeOf(e),r=t?.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;let n=r.prototype;return!(!PW(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function PW(e){return Object.prototype.toString.call(e)==="[object Object]"}function RW(e){return new Promise(t=>{Va.setTimeout(t,e)})}function Tv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?$R(e,t):t}function EW(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function TW(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Wm=Symbol();function fw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mw(e,t){return typeof e=="function"?e(...t):!!e}function $W(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var zde=()=>TR,Zm=()=>zde();var Ha=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(){}};var du,xc,Gm,AW,Nde=(AW=class extends Ha{constructor(){super();Ce(this,du);Ce(this,xc);Ce(this,Gm);fe(this,Gm,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,xc)||this.setEventListener(L(this,Gm))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,xc))==null||t.call(this),fe(this,xc,void 0))}setEventListener(t){var r;fe(this,Gm,t),(r=L(this,xc))==null||r.call(this),fe(this,xc,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,du)!==t&&(fe(this,du,t),this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof L(this,du)=="boolean"?L(this,du):globalThis.document?.visibilityState!=="hidden"}},du=new WeakMap,xc=new WeakMap,Gm=new WeakMap,AW),qm=new Nde;var OW=kW;function Fde(){let e=[],t=0,r=s=>{s()},n=s=>{s()},o=OW,i=s=>{t?e.push(s):o(()=>{r(s)})},a=()=>{let s=e;e=[],s.length&&o(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{o=s}}}var Gt=Fde();var Km,bc,Xm,zW,Lde=(zW=class extends Ha{constructor(){super();Ce(this,Km,!0);Ce(this,bc);Ce(this,Xm);fe(this,Xm,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,bc)||this.setEventListener(L(this,Xm))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,bc))==null||t.call(this),fe(this,bc,void 0))}setEventListener(t){var r;fe(this,Xm,t),(r=L(this,bc))==null||r.call(this),fe(this,bc,t(this.setOnline.bind(this)))}setOnline(t){L(this,Km)!==t&&(fe(this,Km,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Km)}},Km=new WeakMap,bc=new WeakMap,Xm=new WeakMap,zW),Qm=new Lde;function Mde(e){return Math.min(1e3*2**e,3e4)}function AR(e){return(e??"online")==="online"?Qm.isOnline():!0}var pw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hw(e){let t=!1,r=0,n,o="pending",i,a,s=new Promise((v,_)=>{i=v,a=_});s.catch(Ir);let l=()=>o!=="pending",c=v=>{if(!l()){let _=new pw(v);h(_),e.onCancel?.(_)}},d=()=>{t=!0},u=()=>{t=!1},f=()=>qm.isFocused()&&(e.networkMode==="always"||Qm.isOnline())&&e.canRun(),m=()=>AR(e.networkMode)&&e.canRun(),p=v=>{l()||(n?.(),o="resolved",i(v))},h=v=>{l()||(n?.(),o="rejected",a(v))},y=v=>new Promise(_=>{n=I=>{(l()||v())&&_(I)},e.onPause?.()}).then(()=>{n=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let v,_=r===0?e.initialPromise:void 0;try{v=_??e.fn()}catch(I){v=Promise.reject(I)}Promise.resolve(v).then(p).catch(I=>{if(l())return;let S=e.retry??(Zm()?0:3),w=e.retryDelay??Mde,P=typeof w=="function"?w(r,I):w,E=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,I);if(t||!E){h(I);return}r++,e.onFail?.(r,I),RW(P).then(()=>f()?void 0:y(f)).then(()=>{t?h(I):x()})})};return{promise:s,status:()=>o,cancel:c,continue:()=>(n?.(),s),cancelRetry:d,continueRetry:u,canStart:m,start:()=>(m()?x():y(m).then(x),s)}}var uu,NW,gw=(NW=class{constructor(){Ce(this,uu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sw(this.gcTime)&&fe(this,uu,Va.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zm()?1/0:3e5))}clearGcTimeout(){L(this,uu)!==void 0&&(Va.clearTimeout(L(this,uu)),fe(this,uu,void 0))}},uu=new WeakMap,NW);function LW(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,c=async()=>{let d=!1,u=p=>{$W(p,()=>t.signal,()=>d=!0)},f=fw(t.options,t.fetchOptions),m=async(p,h,y)=>{if(d)return Promise.reject(t.signal.reason);if(h==null&&p.pages.length)return Promise.resolve(p);let v=(()=>{let w={client:t.client,queryKey:t.queryKey,pageParam:h,direction:y?"backward":"forward",meta:t.options.meta};return u(w),w})(),_=await f(v),{maxPages:I}=t.options,S=y?TW:EW;return{pages:S(p.pages,_,I),pageParams:S(p.pageParams,h,I)}};if(o&&i.length){let p=o==="backward",h=p?Bde:FW,y={pages:i,pageParams:a};s=await m(y,h(n,y),p)}else{let p=e??i.length;do{let h=l===0?a[0]??n.initialPageParam:FW(n,s);if(l>0&&h==null)break;s=await m(s,h),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function FW(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Bde(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Ym,fu,Jm,_i,mu,zr,$v,pu,ra,qs,jW,UW=(jW=class extends gw{constructor(t){super();Ce(this,ra);Ce(this,Ym);Ce(this,fu);Ce(this,Jm);Ce(this,_i);Ce(this,mu);Ce(this,zr);Ce(this,$v);Ce(this,pu);fe(this,pu,!1),fe(this,$v,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,mu,t.client),fe(this,_i,L(this,mu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,fu,BW(this.options)),this.state=t.state??L(this,fu),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,Ym)}get promise(){return L(this,zr)?.promise}setOptions(t){if(this.options={...L(this,$v),...t},t?._type&&fe(this,Ym,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=BW(this.options);r.data!==void 0&&(this.setState(MW(r.data,r.dataUpdatedAt)),fe(this,fu,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,_i).remove(this)}setData(t,r){let n=Tv(this.state.data,t,this.options);return tt(this,ra,qs).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(t){tt(this,ra,qs).call(this,{type:"setState",state:t})}cancel(t){let r=L(this,zr)?.promise;return L(this,zr)?.cancel(t),r?r.then(Ir).catch(Ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,fu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>At(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>At(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!lw(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),L(this,zr)?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),L(this,zr)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,_i).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let r=this.observers.indexOf(t);r!==-1&&(this.observers.splice(r,1),this.observers.length||(L(this,zr)&&(L(this,pu)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,zr).cancel({revert:!0}):L(this,zr).cancelRetry()),this.scheduleGc()),L(this,_i).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,ra,qs).call(this,{type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&L(this,zr)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(L(this,zr))return L(this,zr).continueRetry(),L(this,zr).promise}if(t&&this.setOptions(t),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,o=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(fe(this,pu,!0),n.signal)})},i=()=>{let c=fw(this.options,r),u=(()=>{let f={client:L(this,mu),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return fe(this,pu,!1),this.options.persister?this.options.persister(c,u,this):c(u)},s=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,mu),state:this.state,fetchFn:i};return o(c),c})();(L(this,Ym)==="infinite"?LW(this.options.pages):this.options.behavior)?.onFetch(s,this),fe(this,Jm,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&tt(this,ra,qs).call(this,{type:"fetch",meta:s.fetchOptions?.meta});let l=fe(this,zr,hw({initialPromise:r?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof pw&&c.revert&&this.setState({...L(this,Jm),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{tt(this,ra,qs).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{tt(this,ra,qs).call(this,{type:"pause"})},onContinue:()=>{tt(this,ra,qs).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{let c=await l.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),L(this,_i).config.onSuccess?.(c,this),L(this,_i).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof pw){if(c.silent)return L(this,zr).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw tt(this,ra,qs).call(this,{type:"error",error:c}),L(this,_i).config.onError?.(c,this),L(this,_i).config.onSettled?.(this.state.data,c,this),c}finally{L(this,zr)===l&&fe(this,zr,void 0),this.scheduleGc()}}},Ym=new WeakMap,fu=new WeakMap,Jm=new WeakMap,_i=new WeakMap,mu=new WeakMap,zr=new WeakMap,$v=new WeakMap,pu=new WeakMap,ra=new WeakSet,qs=function(t){let r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...OR(n.data,this.options),fetchMeta:t.meta??null};case"success":let o={...n,...MW(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Jm,t.manual?o:void 0),o;case"error":let i=t.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,...t.state}}};this.state=r(this.state),Gt.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),L(this,_i).notify({query:this,type:"updated",action:t})})},jW);function OR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function MW(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function BW(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Qo,dt,Ov,Yo,hu,ep,Ks,zv,tp,rp,gu,vu,yc,op,gt,Av,zR,NR,FR,LR,MR,BR,jR,UR,WW,HR=(WW=class extends Ha{constructor(t,r){super();Ce(this,gt);Ce(this,Qo);Ce(this,dt);Ce(this,Ov);Ce(this,Yo);Ce(this,hu);Ce(this,ep);Ce(this,Ks);Ce(this,zv);Ce(this,tp);Ce(this,rp);Ce(this,gu);Ce(this,vu);Ce(this,yc);Ce(this,op,new Set);this.options=r,fe(this,Qo,t),fe(this,Ks,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,dt).addObserver(this),VW(L(this,dt),this.options)?tt(this,gt,Av).call(this):this.updateResult(),tt(this,gt,MR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return VR(L(this,dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return VR(L(this,dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,gt,BR).call(this),tt(this,gt,jR).call(this),L(this,dt).removeObserver(this)}setOptions(t){let r=this.options,n=L(this,dt);if(this.options=L(this,Qo).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof At(this.options.enabled,L(this,dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,gt,UR).call(this),L(this,dt).setOptions(this.options),r._defaulted&&!uw(this.options,r)&&L(this,Qo).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,dt),observer:this});let o=this.hasListeners();o&&HW(L(this,dt),n,this.options,r)&&tt(this,gt,Av).call(this),this.updateResult(),o&&(L(this,dt)!==n||At(this.options.enabled,L(this,dt))!==At(r.enabled,L(this,dt))||At(this.options.staleTime,L(this,dt))!==At(r.staleTime,L(this,dt)))&&tt(this,gt,NR).call(this);let i=tt(this,gt,FR).call(this);o&&(L(this,dt)!==n||At(this.options.enabled,L(this,dt))!==At(r.enabled,L(this,dt))||i!==L(this,yc))&&tt(this,gt,LR).call(this,i)}getOptimisticResult(t){let r=L(this,Qo).getQueryCache().build(L(this,Qo),t),n=this.createResult(r,t);return uw(this.getCurrentResult(),n)||(fe(this,Yo,n),fe(this,ep,this.options),fe(this,hu,L(this,dt).state)),n}getCurrentResult(){return L(this,Yo)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r?.(o),Reflect.get(n,o))})}trackProp(t){L(this,op).add(t)}getCurrentQuery(){return L(this,dt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let r=L(this,Qo).defaultQueryOptions(t),n=L(this,Qo).getQueryCache().build(L(this,Qo),r),o=()=>{},i,a=new Promise(s=>{i=s,o=L(this,Qo).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===n.queryHash&&n.state.data!==void 0&&(o(),s(this.createResult(n,r)))})});return Promise.race([n.fetch().then(()=>{let s=this.createResult(n,r);return i?.(s),s}).finally(()=>{o()}),a])}fetch(t){return tt(this,gt,Av).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,Yo)))}createResult(t,r){let n=L(this,dt),o=this.options,i=L(this,Yo),a=L(this,hu),s=L(this,ep),l=t!==n?t.state:L(this,Ov),{state:c}=t,d={...c},u=!1,f;if(r._optimisticResults){let w=this.hasListeners(),P=!w&&VW(t,r),E=w&&HW(t,n,r,o);(P||E)&&(d={...d,...OR(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:h}=d;f=d.data;let y=!1;if(r.placeholderData!==void 0&&f===void 0&&h==="pending"){let w;i?.isPlaceholderData&&r.placeholderData===s?.placeholderData?(w=i.data,y=!0):w=typeof r.placeholderData=="function"?r.placeholderData(L(this,rp)?.state.data,L(this,rp)):r.placeholderData,w!==void 0&&(h="success",f=Tv(i?.data,w,r),u=!0)}if(r.select&&f!==void 0&&!y)if(i&&f===a?.data&&r.select===L(this,zv))f=L(this,tp);else try{fe(this,zv,r.select),f=r.select(f),f=Tv(i?.data,f,r),fe(this,tp,f),fe(this,Ks,null)}catch(w){fe(this,Ks,w)}else f===void 0&&fe(this,Ks,null);L(this,Ks)&&(m=L(this,Ks),f=L(this,tp),p=Date.now(),h="error",u=!1);let x=d.fetchStatus==="fetching",v=h==="pending",_=h==="error",I=v&&x,S=f!==void 0;return{status:h,fetchStatus:d.fetchStatus,isPending:v,isSuccess:h==="success",isError:_,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!v,isLoadingError:_&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:_&&S,isStale:WR(t,r),refetch:this.refetch,isEnabled:At(r.enabled,t)!==!1}}updateResult(){let t=L(this,Yo),r=this.createResult(L(this,dt),this.options);if(fe(this,hu,L(this,dt).state),fe(this,ep,this.options),L(this,hu).data!==void 0&&fe(this,rp,L(this,dt)),uw(r,t))return;fe(this,Yo,r);let o=(()=>{if(!t)return!0;let{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!L(this,op).size)return!0;let s=new Set(a??L(this,op));return this.options.throwOnError&&s.add("error"),Object.keys(L(this,Yo)).some(l=>{let c=l;return L(this,Yo)[c]!==t[c]&&s.has(c)})})();Gt.batch(()=>{o&&this.listeners.forEach(i=>{i(L(this,Yo))}),L(this,Qo).getQueryCache().notify({query:L(this,dt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,gt,MR).call(this)}},Qo=new WeakMap,dt=new WeakMap,Ov=new WeakMap,Yo=new WeakMap,hu=new WeakMap,ep=new WeakMap,Ks=new WeakMap,zv=new WeakMap,tp=new WeakMap,rp=new WeakMap,gu=new WeakMap,vu=new WeakMap,yc=new WeakMap,op=new WeakMap,gt=new WeakSet,Av=function(t){tt(this,gt,UR).call(this);let r=L(this,dt).fetch(this.options,t);return t?.throwOnError||(r=r.catch(Ir)),r},zR=function(t){return!Zm()&&At(this.options.enabled,L(this,dt))!==!1&&sw(t)},NR=function(){tt(this,gt,BR).call(this);let t=At(this.options.staleTime,L(this,dt));if(L(this,Yo).isStale||!tt(this,gt,zR).call(this,t))return;let r=lw(L(this,Yo).dataUpdatedAt,t)+1;fe(this,gu,Va.setTimeout(()=>{L(this,Yo).isStale||this.updateResult()},r))},FR=function(){return At(this.options.refetchInterval,L(this,dt))??!1},LR=function(t){tt(this,gt,jR).call(this),fe(this,yc,t),!(L(this,yc)===0||!tt(this,gt,zR).call(this,L(this,yc)))&&fe(this,vu,Va.setInterval(()=>{(this.options.refetchIntervalInBackground||qm.isFocused())&&tt(this,gt,Av).call(this)},L(this,yc)))},MR=function(){tt(this,gt,NR).call(this),tt(this,gt,LR).call(this,tt(this,gt,FR).call(this))},BR=function(){L(this,gu)!==void 0&&(Va.clearTimeout(L(this,gu)),fe(this,gu,void 0))},jR=function(){L(this,vu)!==void 0&&(Va.clearInterval(L(this,vu)),fe(this,vu,void 0))},UR=function(){let t=L(this,Qo).getQueryCache().build(L(this,Qo),this.options);if(t===L(this,dt))return;let r=L(this,dt);fe(this,dt,t),fe(this,Ov,t.state),this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))},WW);function jde(e,t){return At(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&At(t.retryOnMount,e)===!1)}function VW(e,t){return jde(e,t)||e.state.data!==void 0&&VR(e,t,t.refetchOnMount)}function VR(e,t,r){if(At(t.enabled,e)!==!1&&At(t.staleTime,e)!=="static"){let n=At(r,e);return n==="always"||n!==!1&&WR(e,t)}return!1}function HW(e,t,r,n){return(e!==t||At(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&WR(e,r)}function WR(e,t){return At(t.enabled,e)!==!1&&e.isStaleByTime(At(t.staleTime,e))}var Nv,Wa,Ro,xu,Za,_c,ZW,GW=(ZW=class extends gw{constructor(t){super();Ce(this,Za);Ce(this,Nv);Ce(this,Wa);Ce(this,Ro);Ce(this,xu);fe(this,Nv,t.client),this.mutationId=t.mutationId,fe(this,Ro,t.mutationCache),fe(this,Wa,[]),this.state=t.state||Ude(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Wa).includes(t)||(L(this,Wa).push(t),this.clearGcTimeout(),L(this,Ro).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Wa,L(this,Wa).filter(r=>r!==t)),this.scheduleGc(),L(this,Ro).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Wa).length||(this.state.status==="pending"?this.scheduleGc():L(this,Ro).remove(this))}continue(){return L(this,xu)?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let r=()=>{tt(this,Za,_c).call(this,{type:"continue"})},n={client:L(this,Nv),meta:this.options.meta,mutationKey:this.options.mutationKey},o=fe(this,xu,hw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{tt(this,Za,_c).call(this,{type:"failed",failureCount:s,error:l})},onPause:()=>{tt(this,Za,_c).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Ro).canRun(this)})),i=this.state.status==="pending",a=!o.canStart();try{if(i)r();else{tt(this,Za,_c).call(this,{type:"pending",variables:t,isPaused:a}),L(this,Ro).config.onMutate&&await L(this,Ro).config.onMutate(t,this,n);let l=await this.options.onMutate?.(t,n);l!==this.state.context&&tt(this,Za,_c).call(this,{type:"pending",context:l,variables:t,isPaused:a})}let s=await o.start();return await L(this,Ro).config.onSuccess?.(s,t,this.state.context,this,n),await this.options.onSuccess?.(s,t,this.state.context,n),await L(this,Ro).config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,t,this.state.context,n),tt(this,Za,_c).call(this,{type:"success",data:s}),s}catch(s){try{await L(this,Ro).config.onError?.(s,t,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,t,this.state.context,n)}catch(l){Promise.reject(l)}try{await L(this,Ro).config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,n)}catch(l){Promise.reject(l)}throw tt(this,Za,_c).call(this,{type:"error",error:s}),s}finally{L(this,xu)===o&&fe(this,xu,void 0),L(this,Ro).runNext(this)}}},Nv=new WeakMap,Wa=new WeakMap,Ro=new WeakMap,xu=new WeakMap,Za=new WeakSet,_c=function(t){let r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Gt.batch(()=>{L(this,Wa).forEach(n=>{n.onMutationUpdate(t)}),L(this,Ro).notify({mutation:this,type:"updated",action:t})})},ZW);function Ude(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xs,oa,Fv,qW,KW=(qW=class extends Ha{constructor(t={}){super();Ce(this,Xs);Ce(this,oa);Ce(this,Fv);this.config=t,fe(this,Xs,new Set),fe(this,oa,new Map),fe(this,Fv,0)}build(t,r,n){let o=new GW({client:t,mutationCache:this,mutationId:++Sh(this,Fv)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){L(this,Xs).add(t);let r=vw(t);if(typeof r=="string"){let n=L(this,oa).get(r);n?n.push(t):L(this,oa).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,Xs).delete(t)){let r=vw(t);if(typeof r=="string"){let n=L(this,oa).get(r);if(n)if(n.length>1){let o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&L(this,oa).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){let r=vw(t);if(typeof r=="string"){let n=L(this,oa).get(r)?.find(o=>o.state.status==="pending");return!n||n===t}else return!0}runNext(t){let r=vw(t);return typeof r=="string"?L(this,oa).get(r)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gt.batch(()=>{L(this,Xs).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,Xs).clear(),L(this,oa).clear()})}getAll(){return Array.from(L(this,Xs))}find(t){let r={exact:!0,...t};return this.getAll().find(n=>dw(r,n))}findAll(t={}){return this.getAll().filter(r=>dw(t,r))}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){let t=this.getAll().filter(r=>r.state.isPaused);return Gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ir))))}},Xs=new WeakMap,oa=new WeakMap,Fv=new WeakMap,qW);function vw(e){return e.options.scope?.id}var Ga,XW,QW=(XW=class extends Ha{constructor(t={}){super();Ce(this,Ga);this.config=t,fe(this,Ga,new Map)}build(t,r,n){let o=r.queryKey,i=r.queryHash??Ev(o,r),a=this.get(i);return a||(a=new UW({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){L(this,Ga).has(t.queryHash)||(L(this,Ga).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){L(this,Ga).get(t.queryHash)===t&&(t.destroy(),L(this,Ga).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Ga).get(t)}getAll(){return[...L(this,Ga).values()]}find(t){let r={exact:!0,...t};return this.getAll().find(n=>cw(r,n))}findAll(t={}){let r=this.getAll();return Object.keys(t).length>0?r.filter(n=>cw(t,n)):r}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ga=new WeakMap,XW);var ur,Ic,wc,np,ip,Sc,ap,sp,YW,ZR=(YW=class{constructor(e={}){Ce(this,ur);Ce(this,Ic);Ce(this,wc);Ce(this,np);Ce(this,ip);Ce(this,Sc);Ce(this,ap);Ce(this,sp);fe(this,ur,e.queryCache||new QW),fe(this,Ic,e.mutationCache||new KW),fe(this,wc,e.defaultOptions||{}),fe(this,np,new Map),fe(this,ip,new Map),fe(this,Sc,0)}mount(){Sh(this,Sc)._++,L(this,Sc)===1&&(fe(this,ap,qm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ur).onFocus())})),fe(this,sp,Qm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ur).onOnline())})))}unmount(){var e,t;Sh(this,Sc)._--,L(this,Sc)===0&&((e=L(this,ap))==null||e.call(this),fe(this,ap,void 0),(t=L(this,sp))==null||t.call(this),fe(this,sp,void 0))}isFetching(e){return L(this,ur).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Ic).findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,ur).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=L(this,ur).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(At(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,ur).findAll(e).map(({queryKey:t,state:r})=>[t,r.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=L(this,ur).get(n.queryHash)?.state.data,i=DW(t,o);if(i!==void 0)return L(this,ur).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Gt.batch(()=>L(this,ur).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,ur).get(t.queryHash)?.state}removeQueries(e){let t=L(this,ur);Gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=L(this,ur);return Gt.batch(()=>{let n=r.findAll(e),o=new Set(n);return n.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>o.has(i)},t)})}cancelQueries(e,t={}){let r={revert:!0,...t},n=Gt.batch(()=>L(this,ur).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Ir).catch(Ir)}invalidateQueries(e,t={}){return Gt.batch(()=>(L(this,ur).findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},n=Gt.batch(()=>L(this,ur).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Ir)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Ir)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,ur).build(this,t),n=r.isStaleByTime(At(t.staleTime,r))?await r.fetch(t):r.state.data,o=t.select;return o?o(n):n}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,ur).build(this,t);return r.isStaleByTime(At(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ir).catch(Ir)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ir).catch(Ir)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qm.isOnline()?L(this,Ic).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ur)}getMutationCache(){return L(this,Ic)}getDefaultOptions(){return L(this,wc)}setDefaultOptions(e){fe(this,wc,e)}setQueryDefaults(e,t){L(this,np).set(cu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...L(this,np).values()],r={};return t.forEach(n=>{vc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,ip).set(cu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...L(this,ip).values()],r={};return t.forEach(n=>{vc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...L(this,wc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ev(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===Wm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...L(this,wc).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,ur).clear(),L(this,Ic).clear()}},ur=new WeakMap,Ic=new WeakMap,wc=new WeakMap,np=new WeakMap,ip=new WeakMap,Sc=new WeakMap,ap=new WeakMap,sp=new WeakMap,YW);var xw=b(R(),1),JW=xw.createContext(!1),eZ=()=>xw.useContext(JW),Lst=JW.Provider;var Lv=b(R(),1),Vde=b(O(),1);function Hde(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wde=Lv.createContext(Hde()),tZ=()=>Lv.useContext(Wde);var rZ=b(R(),1);var oZ=(e,t,r)=>{let n=r?.state.error&&typeof e.throwOnError=="function"?mw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},nZ=e=>{rZ.useEffect(()=>{e.clearReset()},[e])},iZ=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||mw(r,[e.error,n]));var aZ=e=>{if(e.suspense){let r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},sZ=(e,t)=>e?.suspense&&t.isPending,lZ=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});var kc=b(R(),1);function cZ(e,t,r){let n=eZ(),o=tZ(),i=Hm(r),a=i.defaultQueryOptions(e),s=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":l?"optimistic":void 0,aZ(a),oZ(a,o,s),nZ(o);let[c]=kc.useState(()=>new t(i,a)),d=c.getOptimisticResult(a),u=!n&&l;if(kc.useSyncExternalStore(kc.useCallback(f=>{let m=u?c.subscribe(Gt.batchCalls(f)):Ir;return c.updateResult(),m},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),kc.useEffect(()=>{c.setOptions(a)},[a,c]),sZ(a,d))throw lZ(a,c,o);if(iZ({result:d,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:c.trackResult(d)}function GR(e,t){return cZ(e,HR,t)}var Rte=b(uZ(),1);var lp=b(R(),1);var fZ={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ne=(e,t,r,n)=>{let o=(0,lp.forwardRef)(({color:i="currentColor",size:a=24,stroke:s=2,title:l,className:c,children:d,...u},f)=>(0,lp.createElement)("svg",{ref:f,...fZ[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,c].filter(Boolean).join(" "),...e==="filled"?{fill:i}:{strokeWidth:s,stroke:i},...u},[l&&(0,lp.createElement)("title",{key:"svg-title"},l),...n.map(([m,p])=>(0,lp.createElement)(m,p)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};var Zde=[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]],KR=ne("outline","adjustments","Adjustments",Zde);var Gde=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Mv=ne("outline","alert-triangle","AlertTriangle",Gde);var qde=[["path",{d:"M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-2"}],["path",{d:"M14 7l6 0",key:"svg-3"}],["path",{d:"M17 4l0 6",key:"svg-4"}]],XR=ne("outline","apps","Apps",qde);var Kde=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],QR=ne("outline","arrow-left","ArrowLeft",Kde);var Xde=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],YR=ne("outline","arrow-up","ArrowUp",Xde);var Qde=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]],cp=ne("outline","box","Box",Qde);var Yde=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],JR=ne("outline","check","Check",Yde);var Jde=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Bv=ne("outline","chevron-down","ChevronDown",Jde);var eue=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],eE=ne("outline","chevron-right","ChevronRight",eue);var tue=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],tE=ne("outline","chevron-up","ChevronUp",tue);var rue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],rE=ne("outline","circle-minus","CircleMinus",rue);var oue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],oE=ne("outline","circle-plus","CirclePlus",oue);var nue=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],nE=ne("outline","database","Database",nue);var iue=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],jv=ne("outline","device-floppy","DeviceFloppy",iue);var aue=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],iE=ne("outline","dots","Dots",aue);var sue=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],aE=ne("outline","eye-off","EyeOff",sue);var lue=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],sE=ne("outline","eye","Eye",lue);var cue=[["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M12 10.5v1.5",key:"svg-1"}],["path",{d:"M12 16v1.5",key:"svg-2"}],["path",{d:"M15.031 12.25l-1.299 .75",key:"svg-3"}],["path",{d:"M10.268 15l-1.3 .75",key:"svg-4"}],["path",{d:"M15 15.803l-1.285 -.773",key:"svg-5"}],["path",{d:"M10.285 12.97l-1.285 -.773",key:"svg-6"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-7"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-8"}]],lE=ne("outline","file-settings","FileSettings",cue);var due=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],cE=ne("outline","file","File",due);var uue=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M20 21l2 -2l-2 -2",key:"svg-1"}],["path",{d:"M17 17l-2 2l2 2",key:"svg-2"}]],Uv=ne("outline","folder-code","FolderCode",uue);var fue=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Vv=ne("outline","folder-open","FolderOpen",fue);var mue=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Hv=ne("outline","folder","Folder",mue);var pue=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 13h3l3 3h4l3 -3h3",key:"svg-1"}]],dE=ne("outline","inbox","Inbox",pue);var hue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],Wv=ne("outline","info-circle","InfoCircle",hue);var gue=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],uE=ne("outline","list-check","ListCheck",gue);var vue=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],fE=ne("outline","lock","Lock",vue);var xue=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],mE=ne("outline","maximize","Maximize",xue);var bue=[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],pE=ne("outline","minimize","Minimize",bue);var yue=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],Zv=ne("outline","moon","Moon",yue);var _ue=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Gv=ne("outline","pencil","Pencil",_ue);var Iue=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],hE=ne("outline","player-play","PlayerPlay",Iue);var wue=[["path",{d:"M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10",key:"svg-0"}]],gE=ne("outline","player-stop","PlayerStop",wue);var Sue=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],dp=ne("outline","plus","Plus",Sue);var kue=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],bw=ne("outline","refresh","Refresh",kue);var Cue=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],vE=ne("outline","restore","Restore",Cue);var Pue=[["path",{d:"M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],xE=ne("outline","robot","Robot",Pue);var Due=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],kn=ne("outline","search","Search",Due);var Rue=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],bE=ne("outline","settings","Settings",Rue);var Eue=[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245",key:"svg-0"}]],yE=ne("outline","star","Star",Eue);var Tue=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],_E=ne("outline","sun","Sun",Tue);var $ue=[["path",{d:"M8 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M13 15l3 0",key:"svg-1"}],["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],Qs=ne("outline","terminal-2","Terminal2",$ue);var Aue=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M21 12h-6",key:"svg-2"}]],IE=ne("outline","text-decrease","TextDecrease",Aue);var Oue=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M18 9v6",key:"svg-2"}],["path",{d:"M21 12h-6",key:"svg-3"}]],wE=ne("outline","text-increase","TextIncrease",Oue);var zue=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],SE=ne("outline","tool","Tool",zue);var Nue=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],yw=ne("outline","trash","Trash",Nue);var Fue=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],kE=ne("outline","users","Users",Fue);var Lue=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],qv=ne("outline","x","X",Lue);var TC=b(R(),1);var mZ="x-sandbox-web";var PE=class extends Error{constructor(r,n){super(n);Et(this,"status",r)}};async function CE(e,t,r){let n=await fetch(t,{method:e,credentials:"same-origin",headers:{[mZ]:"1",...r===void 0?{}:{"Content-Type":"application/json"}},body:r===void 0?void 0:JSON.stringify(r)}),o=await n.json().catch(()=>null);if(!n.ok){let i=o?.error;throw new PE(n.status,typeof i=="string"?i:"The server said "+n.status)}return o}var DE={login:e=>CE("POST","/api/login",{token:e}),info:()=>CE("GET","/api/info"),sessions:()=>CE("GET","/api/sessions")};var Ti=b(R(),1);var g={};hs(g,{$brand:()=>UE,$input:()=>f5,$output:()=>u5,INVALID:()=>tn,NEVER:()=>jE,TimePrecision:()=>w5,ZodAny:()=>dO,ZodArray:()=>pO,ZodBase64:()=>g1,ZodBase64URL:()=>v1,ZodBigInt:()=>qp,ZodBigIntFormat:()=>y1,ZodBoolean:()=>Gp,ZodCIDRv4:()=>p1,ZodCIDRv6:()=>h1,ZodCUID:()=>s1,ZodCUID2:()=>l1,ZodCatch:()=>zO,ZodCodec:()=>Vx,ZodCompileAsyncError:()=>ia,ZodCompileUnsupportedError:()=>nt,ZodCreditCard:()=>rO,ZodCustom:()=>Hx,ZodCustomStringFormat:()=>Nu,ZodDate:()=>Fx,ZodDefault:()=>RO,ZodDiscriminatedUnion:()=>gO,ZodE164:()=>x1,ZodEmail:()=>o1,ZodEmoji:()=>i1,ZodEnum:()=>Hp,ZodError:()=>tge,ZodExactOptional:()=>S1,ZodFile:()=>kO,ZodFirstPartyTypeKind:()=>KO,ZodFunction:()=>WO,ZodGUID:()=>n1,ZodIBAN:()=>oO,ZodIPv4:()=>f1,ZodIPv6:()=>m1,ZodISODate:()=>zc,ZodISODateTime:()=>Oc,ZodISODuration:()=>Fc,ZodISOTime:()=>Nc,ZodInstanceOf:()=>qO,ZodIntersection:()=>vO,ZodIssueCode:()=>nge,ZodJWT:()=>b1,ZodKSUID:()=>u1,ZodLazy:()=>UO,ZodLiteral:()=>SO,ZodMAC:()=>tO,ZodMap:()=>IO,ZodNaN:()=>FO,ZodNanoID:()=>a1,ZodNever:()=>fO,ZodNonOptional:()=>k1,ZodNull:()=>lO,ZodNullable:()=>DO,ZodNumber:()=>Zp,ZodNumberFormat:()=>Fu,ZodObject:()=>Mx,ZodOptional:()=>jx,ZodPipe:()=>Ux,ZodPrefault:()=>TO,ZodPreprocess:()=>LO,ZodPromise:()=>HO,ZodReadonly:()=>MO,ZodRealError:()=>En,ZodRecord:()=>Vp,ZodSet:()=>wO,ZodString:()=>Wp,ZodStringFormat:()=>Ct,ZodSuccess:()=>OO,ZodSymbol:()=>aO,ZodTemplateLiteral:()=>jO,ZodTransform:()=>CO,ZodTuple:()=>bO,ZodType:()=>We,ZodULID:()=>c1,ZodURL:()=>Nx,ZodUUID:()=>Qa,ZodUndefined:()=>sO,ZodUnion:()=>Bx,ZodUnknown:()=>uO,ZodVoid:()=>mO,ZodXID:()=>d1,ZodXor:()=>hO,_ZodString:()=>r1,_default:()=>EO,_function:()=>GK,any:()=>SK,array:()=>Lx,base64:()=>nK,base64url:()=>iK,bigint:()=>bK,boolean:()=>iO,catch:()=>NO,check:()=>qK,cidrv4:()=>rK,cidrv6:()=>oK,clone:()=>yt,codec:()=>VK,coerce:()=>QO,compile:()=>g5,config:()=>hr,core:()=>rl,creditCard:()=>sK,cuid:()=>qq,cuid2:()=>Kq,currencyCode:()=>mK,custom:()=>KK,date:()=>CK,decode:()=>qA,decodeAsync:()=>XA,deepPartial:()=>lX,describe:()=>XK,discriminatedUnion:()=>$K,e164:()=>aK,email:()=>Lq,emoji:()=>Zq,encode:()=>GA,encodeAsync:()=>KA,endsWith:()=>$p,enum:()=>I1,exactOptional:()=>PO,file:()=>MK,flattenError:()=>ix,float32:()=>hK,float64:()=>gK,formatError:()=>ax,fromJSONSchema:()=>aX,function:()=>GK,getDiscriminatedOption:()=>M$,getErrorMap:()=>age,globalRegistry:()=>go,gt:()=>Ka,gte:()=>Zn,guid:()=>Mq,hash:()=>pK,hex:()=>fK,hostname:()=>uK,httpUrl:()=>Wq,iban:()=>lK,includes:()=>Ep,input:()=>dX,instanceof:()=>YK,int:()=>e1,int32:()=>vK,int64:()=>yK,intersection:()=>xO,invertCodec:()=>HK,ipv4:()=>Jq,ipv6:()=>tK,iso:()=>Wx,json:()=>eX,jwt:()=>cK,keyof:()=>PK,ksuid:()=>Yq,lazy:()=>VO,length:()=>Tu,literal:()=>LK,locales:()=>Cx,looseObject:()=>EK,looseRecord:()=>OK,lowercase:()=>Dp,lt:()=>qa,lte:()=>Wn,mac:()=>eK,map:()=>zK,maxLength:()=>Eu,maxSize:()=>Ec,memoizer:()=>Sx,meta:()=>QK,mime:()=>Op,minLength:()=>tl,minSize:()=>Xa,multipleOf:()=>Rc,nan:()=>UK,nanoid:()=>Gq,nativeEnum:()=>FK,negative:()=>VS,never:()=>_1,nonnegative:()=>WS,nonoptional:()=>AO,nonpositive:()=>HS,normalize:()=>zp,null:()=>cO,nullable:()=>zx,nullish:()=>BK,number:()=>nO,object:()=>DK,optional:()=>Ou,output:()=>uX,overwrite:()=>aa,parse:()=>VA,parseAsync:()=>HA,partialRecord:()=>AK,pipe:()=>t1,positive:()=>US,prefault:()=>$O,preprocess:()=>tX,prettifyError:()=>ZE,promise:()=>ZK,properties:()=>Ap,property:()=>ZS,readonly:()=>BO,record:()=>_O,refine:()=>ZO,regex:()=>Pp,regexes:()=>Si,registry:()=>vS,safeDecode:()=>YA,safeDecodeAsync:()=>eO,safeEncode:()=>QA,safeEncodeAsync:()=>JA,safeParse:()=>WA,safeParseAsync:()=>ZA,set:()=>NK,setErrorMap:()=>ige,size:()=>Ru,slugify:()=>Mp,startsWith:()=>Tp,strictObject:()=>RK,string:()=>Ox,stringFormat:()=>dK,stringbool:()=>JK,success:()=>jK,superRefine:()=>GO,symbol:()=>IK,templateLiteral:()=>WK,toJSONSchema:()=>XS,toLowerCase:()=>Fp,toUpperCase:()=>Lp,toZod:()=>Kv,transform:()=>w1,treeifyError:()=>WE,trim:()=>Np,tuple:()=>yO,uint32:()=>xK,uint64:()=>_K,ulid:()=>Xq,undefined:()=>wK,union:()=>Kp,unknown:()=>Au,uppercase:()=>Rp,url:()=>Hq,util:()=>Q,uuid:()=>Bq,uuidv4:()=>jq,uuidv6:()=>Uq,uuidv7:()=>Vq,validate:()=>sx,validateAsync:()=>lx,void:()=>kK,withParser:()=>xS,xid:()=>Qq,xor:()=>TK});var rl={};hs(rl,{$ZodAny:()=>T$,$ZodArray:()=>N$,$ZodAsyncError:()=>Dn,$ZodBase64:()=>b$,$ZodBase64URL:()=>y$,$ZodBigInt:()=>oS,$ZodBigIntFormat:()=>P$,$ZodBoolean:()=>xx,$ZodCIDRv4:()=>v$,$ZodCIDRv6:()=>x$,$ZodCUID:()=>i$,$ZodCUID2:()=>a$,$ZodCatch:()=>t5,$ZodCheck:()=>Dt,$ZodCheckBigIntFormat:()=>$T,$ZodCheckEndsWith:()=>HT,$ZodCheckGreaterThan:()=>jw,$ZodCheckIncludes:()=>UT,$ZodCheckLengthEquals:()=>LT,$ZodCheckLessThan:()=>Bw,$ZodCheckLowerCase:()=>BT,$ZodCheckMaxLength:()=>NT,$ZodCheckMaxSize:()=>AT,$ZodCheckMimeType:()=>GT,$ZodCheckMinLength:()=>FT,$ZodCheckMinSize:()=>OT,$ZodCheckMultipleOf:()=>ET,$ZodCheckNumberFormat:()=>TT,$ZodCheckOverwrite:()=>qT,$ZodCheckProperties:()=>ZT,$ZodCheckProperty:()=>WT,$ZodCheckRegex:()=>MT,$ZodCheckSizeEquals:()=>zT,$ZodCheckStartsWith:()=>VT,$ZodCheckStringFormat:()=>Ip,$ZodCheckUpperCase:()=>jT,$ZodCodec:()=>yx,$ZodCreditCard:()=>I$,$ZodCustom:()=>l5,$ZodCustomStringFormat:()=>k$,$ZodCyclicError:()=>dS,$ZodDate:()=>z$,$ZodDefault:()=>Q$,$ZodDiscriminatedUnion:()=>B$,$ZodE164:()=>_$,$ZodEmail:()=>JT,$ZodEmoji:()=>o$,$ZodEncodeError:()=>Dc,$ZodEnum:()=>W$,$ZodError:()=>nx,$ZodExactOptional:()=>K$,$ZodFile:()=>G$,$ZodFunction:()=>a5,$ZodGUID:()=>QT,$ZodIBAN:()=>w$,$ZodIPv4:()=>p$,$ZodIPv6:()=>h$,$ZodISODate:()=>u$,$ZodISODateTime:()=>d$,$ZodISODuration:()=>m$,$ZodISOTime:()=>f$,$ZodIntersection:()=>j$,$ZodJWT:()=>S$,$ZodKSUID:()=>c$,$ZodLazy:()=>_x,$ZodLiteral:()=>Z$,$ZodMAC:()=>g$,$ZodMap:()=>V$,$ZodNaN:()=>r5,$ZodNanoID:()=>n$,$ZodNever:()=>A$,$ZodNonOptional:()=>J$,$ZodNull:()=>E$,$ZodNullable:()=>X$,$ZodNumber:()=>rS,$ZodNumberFormat:()=>C$,$ZodObject:()=>qZ,$ZodObjectJIT:()=>F$,$ZodOptional:()=>iS,$ZodPipe:()=>aS,$ZodPrefault:()=>Y$,$ZodPreprocess:()=>o5,$ZodPromise:()=>s5,$ZodReadonly:()=>n5,$ZodRealError:()=>Rn,$ZodRecord:()=>U$,$ZodRegistry:()=>gS,$ZodSet:()=>H$,$ZodString:()=>Su,$ZodStringFormat:()=>_t,$ZodSuccess:()=>e5,$ZodSymbol:()=>D$,$ZodTemplateLiteral:()=>i5,$ZodTransform:()=>q$,$ZodTuple:()=>nS,$ZodType:()=>Me,$ZodULID:()=>s$,$ZodURL:()=>r$,$ZodUUID:()=>YT,$ZodUndefined:()=>R$,$ZodUnion:()=>bx,$ZodUnknown:()=>$$,$ZodVoid:()=>O$,$ZodXID:()=>l$,$ZodXor:()=>L$,$brand:()=>UE,$constructor:()=>j,$input:()=>f5,$output:()=>u5,Doc:()=>wu,INVALID:()=>tn,JSONSchema:()=>zq,JSONSchemaGenerator:()=>QS,NEVER:()=>jE,TimePrecision:()=>w5,URL_BAD_FORMAT:()=>e$,URL_UNPARSEABLE:()=>mx,ZodCompileAsyncError:()=>ia,ZodCompileUnsupportedError:()=>nt,_any:()=>B5,_array:()=>G5,_base64:()=>LS,_base64url:()=>MS,_bigint:()=>A5,_boolean:()=>T5,_catch:()=>Vhe,_check:()=>bq,_cidrv4:()=>NS,_cidrv6:()=>FS,_coercedBigint:()=>O5,_coercedBoolean:()=>$5,_coercedDate:()=>W5,_coercedNumber:()=>k5,_coercedString:()=>b5,_creditCard:()=>_5,_cuid:()=>RS,_cuid2:()=>ES,_custom:()=>K5,_date:()=>H5,_decode:()=>Rw,_decodeAsync:()=>Tw,_default:()=>Bhe,_discriminatedUnion:()=>Dhe,_e164:()=>BS,_email:()=>_S,_emoji:()=>PS,_encode:()=>Dw,_encodeAsync:()=>Ew,_endsWith:()=>$p,_enum:()=>Ohe,_file:()=>q5,_float32:()=>P5,_float64:()=>D5,_gt:()=>Ka,_gte:()=>Zn,_guid:()=>IS,_iban:()=>I5,_includes:()=>Ep,_int:()=>C5,_int32:()=>R5,_int64:()=>z5,_intersection:()=>Rhe,_ipv4:()=>OS,_ipv6:()=>zS,_isoDate:()=>Rx,_isoDateTime:()=>Dx,_isoDuration:()=>Tx,_isoTime:()=>Ex,_jwt:()=>jS,_ksuid:()=>AS,_lazy:()=>Ghe,_length:()=>Tu,_literal:()=>Nhe,_lowercase:()=>Dp,_lt:()=>qa,_lte:()=>Wn,_mac:()=>y5,_map:()=>$he,_max:()=>Wn,_maxLength:()=>Eu,_maxSize:()=>Ec,_mime:()=>Op,_min:()=>Zn,_minLength:()=>tl,_minSize:()=>Xa,_multipleOf:()=>Rc,_nan:()=>Z5,_nanoid:()=>DS,_nativeEnum:()=>zhe,_negative:()=>VS,_never:()=>U5,_nonnegative:()=>WS,_nonoptional:()=>jhe,_nonpositive:()=>HS,_normalize:()=>zp,_null:()=>M5,_nullable:()=>Mhe,_number:()=>S5,_optional:()=>Lhe,_overwrite:()=>aa,_parse:()=>vp,_parseAsync:()=>bp,_pipe:()=>Hhe,_positive:()=>US,_promise:()=>qhe,_properties:()=>Ap,_property:()=>ZS,_readonly:()=>Whe,_record:()=>The,_refine:()=>X5,_regex:()=>Pp,_safeDecode:()=>Aw,_safeDecodeAsync:()=>zw,_safeEncode:()=>$w,_safeEncodeAsync:()=>Ow,_safeParse:()=>yp,_safeParseAsync:()=>_p,_set:()=>Ahe,_size:()=>Ru,_slugify:()=>Mp,_startsWith:()=>Tp,_string:()=>x5,_stringFormat:()=>$u,_stringbool:()=>eA,_success:()=>Uhe,_superRefine:()=>Q5,_symbol:()=>F5,_templateLiteral:()=>Zhe,_toLowerCase:()=>Fp,_toUpperCase:()=>Lp,_transform:()=>Fhe,_trim:()=>Np,_tuple:()=>Ehe,_uint32:()=>E5,_uint64:()=>N5,_ulid:()=>TS,_undefined:()=>L5,_union:()=>Che,_unknown:()=>j5,_uppercase:()=>Rp,_url:()=>Px,_uuid:()=>wS,_uuidv4:()=>SS,_uuidv6:()=>kS,_uuidv7:()=>CS,_void:()=>V5,_xid:()=>$S,_xor:()=>Phe,base64Charset:()=>Qw,base64urlCharset:()=>vx,canParseURL:()=>t$,clone:()=>yt,compile:()=>g5,compileFn:()=>bS,config:()=>hr,createStandardJSONSchemaMethod:()=>Bp,createToJSONSchemaMethod:()=>rA,decode:()=>Efe,decodeAsync:()=>$fe,describe:()=>Y5,encode:()=>Rfe,encodeAsync:()=>Tfe,extractDefs:()=>$c,finalize:()=>Ac,flattenError:()=>ix,formatError:()=>ax,getDiscriminatedOption:()=>M$,globalConfig:()=>Qr,globalRegistry:()=>go,handleUnrepresentable:()=>Nr,initializeContext:()=>Tc,isBackEdge:()=>fS,isRecursiveSchema:()=>uS,isValidBase64:()=>gx,isValidBase64URL:()=>Yw,isValidCIDRv6:()=>Xw,isValidCreditCard:()=>Jw,isValidIBAN:()=>eS,isValidIPv6:()=>hx,isValidJWT:()=>tS,locales:()=>Cx,memoizer:()=>Sx,mergeValues:()=>wp,meta:()=>J5,parse:()=>xp,parseAsync:()=>Pw,parseURLObject:()=>WZ,prettifyError:()=>ZE,process:()=>It,processSchema:()=>It,regexes:()=>Si,registry:()=>vS,safeDecode:()=>Ofe,safeDecodeAsync:()=>Nfe,safeEncode:()=>Afe,safeEncodeAsync:()=>zfe,safeParse:()=>Sfe,safeParseAsync:()=>kfe,standardProps:()=>Zw,stripTabAndNewline:()=>px,toDotPath:()=>SZ,toJSONSchema:()=>XS,toZod:()=>Kv,treeifyError:()=>WE,urlHostnameOk:()=>qw,urlProtocolOk:()=>Kw,util:()=>Q,validate:()=>sx,validateAsync:()=>lx,validateURL:()=>Gw,version:()=>KT,withParser:()=>xS});var Q={};hs(Q,{BIGINT_FORMAT_RANGES:()=>ex,CONSTANT_CATCH:()=>kw,Class:()=>TE,NUMBER_FORMAT_RANGES:()=>Jv,aborted:()=>en,allowsEval:()=>OE,assert:()=>Hue,assertEqual:()=>Bue,assertIs:()=>Uue,assertNever:()=>Vue,assertNotEqual:()=>jue,assignProp:()=>ho,attachSchema:()=>Sw,base64ToUint8Array:()=>xZ,base64urlToUint8Array:()=>cfe,cached:()=>pp,captureStackTrace:()=>Iw,cleanEnum:()=>lfe,cleanRegex:()=>Js,clone:()=>yt,cloneDef:()=>Gue,codePointLength:()=>_u,constantCatch:()=>ME,createTransparentProxy:()=>Jue,defineLazy:()=>$E,defineLazyInternal:()=>Ge,derived:()=>mfe,esc:()=>Jo,escapeRegex:()=>wi,explicitlyAborted:()=>FE,extend:()=>rfe,finalizeIssue:()=>Pn,floatSafeRemainder:()=>Xv,getElementAtPath:()=>que,getEnumValues:()=>fp,getLengthableOrigin:()=>rx,getParsedType:()=>Yue,getSizableOrigin:()=>tx,hexToUint8Array:()=>ufe,hide:()=>ox,installLazyProp:()=>vfe,isObject:()=>yu,isPlainObject:()=>Ii,issue:()=>gp,joinValues:()=>V,jsonStringifyReplacer:()=>mp,members:()=>LE,merge:()=>nfe,mergeDefs:()=>na,normalizeParams:()=>ae,nullish:()=>_w,numKeys:()=>Que,objectClone:()=>Wue,omit:()=>tfe,optionalKeys:()=>NE,own:()=>Pc,parsedType:()=>ee,partial:()=>ife,pick:()=>efe,prefixIssues:()=>Cn,primitiveTypes:()=>zE,promiseAllObject:()=>Kue,propertyKeyTypes:()=>Yv,randomString:()=>Xue,rawShape:()=>hp,required:()=>afe,safeExtend:()=>ofe,shallowClone:()=>Qv,slugify:()=>AE,stringifyPrimitive:()=>Y,toZod:()=>Kv,uint8ArrayToBase64:()=>bZ,uint8ArrayToBase64url:()=>dfe,uint8ArrayToHex:()=>ffe,unwrapMessage:()=>up});function Bue(e){return e}function jue(e){return e}function Kv(){return e=>e}function Uue(e){}function Vue(e){throw new Error("Unexpected value in exhaustive check")}function Hue(e){}function fp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function V(e,t="|"){return e.map(r=>Y(r)).join(t)}function mp(e,t){return typeof t=="bigint"?t.toString():t}var EE=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function pp(e){return new EE(e)}function _w(e){return e==null}function Js(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Xv(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var pZ=Symbol("evaluating");function $E(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==pZ)return n===void 0&&(n=pZ,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Wue(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ho(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function hp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Ys(e){return hp(e._zod.def)??e._zod.def.shape}function hZ(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return ho(this,t,n),n},enumerable:!0,configurable:!0})}function gZ(e,t,r){t in e?ho(e,t,r):e[t]=r}function bu(e,t,r,n){let o=Ys(t);for(let i of r){let a=Object.getOwnPropertyDescriptor(o,i);a.enumerable&&(a.get?hZ(e,i,()=>{let s=t._zod.def.shape[i];return n?n(s,i):s}):gZ(e,i,n?n(a.value,i):a.value))}}function Zue(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?hZ(e,r,()=>t[r]):gZ(e,r,n.value))}}function na(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Gue(e){return na(e._zod.def)}function que(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Kue(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function Xue(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Jo(e){return JSON.stringify(e)}function AE(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Iw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var OE=pp(()=>{if(Qr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ii(e){if(yu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(yu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Qv(e){return Ii(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Que(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Yue=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Yv=new Set(["string","number","symbol"]),zE=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ae(e){let 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 Jue(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function Y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function NE(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Jv={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]},ex={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function efe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return bu(i,e,ww(e,t)),yt(e,na(r,{shape:i,checks:[]}))}function ww(e,t){let r=Ys(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function tfe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ww(e,t)),a={};return bu(a,e,Reflect.ownKeys(Ys(e)).filter(s=>!i.has(s))),yt(e,na(r,{shape:a,checks:[]}))}function rfe(e,t){if(!Ii(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=Ys(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return yt(e,na(e._zod.def,{shape:vZ(e,t)}))}function vZ(e,t){let r={};return bu(r,e,Reflect.ownKeys(Ys(e))),Zue(r,t),r}function ofe(e,t){if(!Ii(t))throw new Error("Invalid input to safeExtend: expected a plain object");return yt(e,na(e._zod.def,{shape:vZ(e,t)}))}function nfe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};bu(r,e,Reflect.ownKeys(Ys(e))),bu(r,t,Reflect.ownKeys(Ys(t)));let n=na(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return yt(e,n)}function ife(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let s=r?new Set(ww(t,r)):void 0,l={};return bu(l,t,Reflect.ownKeys(Ys(t)),e&&((c,d)=>s&&!s.has(d)?c:new e({type:"optional",innerType:c}))),yt(t,na(t._zod.def,{shape:l,checks:[]}))}function afe(e,t,r){let n=r?new Set(ww(t,r)):void 0,o={};return bu(o,t,Reflect.ownKeys(Ys(t)),(i,a)=>n&&!n.has(a)?i:new e({type:"nonoptional",innerType:i})),yt(t,na(t._zod.def,{shape:o}))}function en(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function FE(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Cn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function up(e){return typeof e=="string"?e:e?.message}function Sw(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function Pn(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:up(e.inst?._zod.def?.error?.(e))??up(i?.(e))??up(t?.error?.(e))??up(r.customError?.(e))??up(r.localeError?.(e))??"Invalid input",s={};for(let l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(s[l]=e[l]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function tx(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var sfe=/[\uD800-\uDBFF]/;function _u(e){let t=e.length;if(!sfe.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function rx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ee(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function gp(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function lfe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function xZ(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function bZ(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function cfe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return xZ(t+r)}function dfe(e){return bZ(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ufe(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function ffe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var TE=class{constructor(...t){}};function LE(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):pfe(e,r,n.value)}}function Pc(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function ox(e,t,r){return Pc(e,t,r,!1)}function mfe(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return Pc(this,r,n(this))},set(o){Pc(this,r,o)}})}return t}function pfe(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Pc(this,t,r.bind(this))},set(n){Pc(this,t,n)}})}function hfe(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var RE,Cc=!1,gfe={configurable:!0,get(){Cc=!0}};function Ge(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&RE!==e._zod){RE=void 0;return}RE=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,gfe);let o=Cc;Cc=!1;try{let i=r(this);return Cc?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Cc=Cc||o,i}catch(i){throw delete this[t],Cc=Cc||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function vfe(e,t,r,n){let o=hfe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var kw="~constantCatch";function ME(e){let t=()=>e;return t[kw]=!0,t}var yZ,jE=Object.freeze({status:"aborted"}),BE={value:void 0,enumerable:!1},_Z="captureStackTrace"in Error?Error:null;function xfe(e){let t=_Z;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return _Z=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function j(e,t,r,n){let o={};function i(f){this.def=f,this.constr=u,this.traits=new Set}i.prototype=o;let a=r,s=a&&new WeakSet;function l(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{BE.value=new i(m);try{Object.defineProperty(f,"_zod",BE)}finally{BE.value=void 0}}if(f._zod.traits.add(e),t(f,m),s){let h=Object.getPrototypeOf(f),y=f._zod.constr.prototype,x=h;for(;x&&x!==y;)x=Object.getPrototypeOf(x);let v=x??h;s.has(v)||(s.add(v),LE(v,a))}let p=u.prototype;for(let h in p)Object.prototype.hasOwnProperty.call(p,h)&&(h in f||(f[h]=p[h].bind(f)))}let c=n?.Parent??Object;class d extends c{}Object.defineProperty(d,"name",{value:e});function u(f){let m=n?.Parent?xfe(d):this;l(m,f);let p=m._zod.deferred;if(p){for(let y of p)y();m._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(m),m}return Object.defineProperty(u,"init",{value:l}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var UE=Symbol("zod_brand"),Dn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Dc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(yZ=globalThis).__zod_globalConfig??(yZ.__zod_globalConfig={});var Qr=globalThis.__zod_globalConfig;function hr(e){return e&&Object.assign(Qr,e),Qr}function bfe(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,mp,2)),e.message}function yfe(e){this._zod.message=e}var _fe={get:bfe,set:yfe,enumerable:!0,configurable:!0},HE={value:void 0,enumerable:!1},IZ=new WeakSet([Object.prototype,Error.prototype]),wZ=(e,t)=>{e.name="$ZodError",HE.value=t,Object.defineProperty(e,"issues",HE),HE.value=void 0,Object.defineProperty(e,"message",_fe);let r=Object.getPrototypeOf(e);IZ.has(r)||(IZ.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},nx=j("$ZodError",wZ),Rn=j("$ZodError",wZ,void 0,{Parent:Error});function Ife(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function ix(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?Ife(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function ax(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<s.length;){let d=s[c],u=c===s.length-1;if(d==="_errors"){u&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=l[d];u&&f._errors.push(t(a)),l=f,c++}}}};return n(e),r}function WE(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var a;for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let l=[...i,...s.path];if(l.length===0){r.errors.push(t(s));continue}let c=r,d=0;for(;d<l.length;){let u=l[d],f=d===l.length-1;typeof u=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,u)||Object.defineProperty(c.properties,u,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[u]):(c.items??(c.items=[]),(a=c.items)[u]??(a[u]={errors:[]}),c=c.items[u]),f&&c.errors.push(t(s)),d++}}};return n(e),r}function SZ(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function ZE(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${SZ(n.path)}`);return t.join(`
|
|
60
|
+
`)}function Cw(e,t){return{callee:t?.callee??e,Err:t?.Err}}var vp=e=>{let t=(r,n,o,i)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new Dn;if(s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Pn(c,a,hr())));throw Iw(l,i?.callee??t),l}return s.value};return t},xp=vp(Rn),bp=e=>{let t=async(r,n,o,i)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Pn(c,a,hr())));throw Iw(l,i?.callee??t),l}return s.value};return t},Pw=bp(Rn),yp=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Dn;return i.issues.length?kZ(e,i.issues,o):{success:!0,data:i.value}},Sfe=yp(Rn);function kZ(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>Pn(o,r,hr()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var _p=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?kZ(e,i.issues,o):{success:!0,data:i.value}},kfe=_p(Rn),Cfe=Symbol.for("zod.compile.invalid"),Pfe=Symbol.for("zod.compile.fallback"),sx=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==Cfe)return!0;if(n.definite===!0&&r===void 0)return!1}return Dfe(e,t,r)});function Dfe(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[Pfe]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new Dn;return i.issues.length===0}var lx=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Dw=e=>{let t=vp(e),r=(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,s,Cw(r,a))};return r},Rfe=Dw(Rn),Rw=e=>{let t=vp(e),r=(n,o,i,a)=>t(n,o,i,Cw(r,a));return r},Efe=Rw(Rn),Ew=e=>{let t=bp(e),r=async(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,s,Cw(r,a))};return r},Tfe=Ew(Rn),Tw=e=>{let t=bp(e),r=async(n,o,i,a)=>await t(n,o,i,Cw(r,a));return r},$fe=Tw(Rn),$w=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return yp(e)(t,r,o)},Afe=$w(Rn),Aw=e=>(t,r,n)=>yp(e)(t,r,n),Ofe=Aw(Rn),Ow=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return _p(e)(t,r,o)},zfe=Ow(Rn),zw=e=>async(t,r,n)=>_p(e)(t,r,n),Nfe=zw(Rn);var Si={};hs(Si,{anyString:()=>bT,base64:()=>dT,base64url:()=>uT,bigint:()=>_T,boolean:()=>IT,browserEmail:()=>Hfe,cidrv4:()=>lT,cidrv6:()=>cT,creditCard:()=>Nw,cuid:()=>qE,cuid2:()=>KE,currencyCode:()=>hT,date:()=>gT,datetime:()=>xT,domain:()=>mT,duration:()=>tT,e164:()=>pT,email:()=>oT,emoji:()=>nT,extendedDuration:()=>Ffe,guid:()=>rT,hex:()=>PT,hostname:()=>fT,html5Email:()=>jfe,httpProtocol:()=>cx,iban:()=>Fw,idnEmail:()=>Vfe,integer:()=>dx,ipv4:()=>iT,ipv6:()=>aT,ksuid:()=>YE,lowercase:()=>kT,mac:()=>sT,md5_base64:()=>qfe,md5_base64url:()=>Kfe,md5_hex:()=>Gfe,nanoid:()=>JE,nanoidOfLength:()=>eT,null:()=>wT,number:()=>el,rfc5322Email:()=>Ufe,sha1_base64:()=>Qfe,sha1_base64url:()=>Yfe,sha1_hex:()=>Xfe,sha256_base64:()=>eme,sha256_base64url:()=>tme,sha256_hex:()=>Jfe,sha384_base64:()=>ome,sha384_base64url:()=>nme,sha384_hex:()=>rme,sha512_base64:()=>ame,sha512_base64url:()=>sme,sha512_hex:()=>ime,string:()=>yT,time:()=>vT,ulid:()=>XE,undefined:()=>ST,unicodeEmail:()=>CZ,uppercase:()=>CT,uuid:()=>Iu,uuid4:()=>Lfe,uuid6:()=>Mfe,uuid7:()=>Bfe,xid:()=>QE});var qE=/^[cC][0-9a-z]{6,}$/,KE=/^[0-9a-z]+$/,XE=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,QE=/^[0-9a-vA-V]{20}$/,YE=/^[A-Za-z0-9]{27}$/,JE=/^[a-zA-Z0-9_-]{21}$/;function eT(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var tT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ffe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rT=/^([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})$/,Iu=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)$/,Lfe=Iu(4),Mfe=Iu(6),Bfe=Iu(7),oT=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jfe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ufe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,CZ=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Vfe=CZ,Hfe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Wfe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function nT(){return new RegExp(Wfe,"u")}var iT=/^(?:(?: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])$/,aT=/^(([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}|:))$/,sT=e=>{let t=wi(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},lT=/^((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])$/,cT=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uT=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,fT=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,mT=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,cx=/^https?$/,pT=/^\+[1-9]\d{6,14}$/,Nw=/^\d(?:[ -]?\d){11,18}$/,hT=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Fw=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,PZ="(?:(?:\\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])))";function Zfe(e){return new RegExp(`^${e}$`)}var gT=Zfe(PZ);function GE(e){let 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function vT(e){return new RegExp(`^${GE(e)}$`)}function xT(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${GE({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${GE({precision:e.precision})}`:r;return new RegExp(`^${PZ}T(?:${n})$`)}var bT=/^[\s\S]{0,}$/,yT=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},_T=/^-?\d+n?$/,dx=/^-?\d+$/,el=/^-?\d+(?:\.\d+)?$/,IT=/^(?:true|false)$/i,wT=/^null$/i;var ST=/^undefined$/i;var kT=/^[^A-Z]*$/,CT=/^[^a-z]*$/,PT=/^[0-9a-fA-F]*$/;function ux(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function fx(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Gfe=/^[0-9a-fA-F]{32}$/,qfe=ux(22,"=="),Kfe=fx(22),Xfe=/^[0-9a-fA-F]{40}$/,Qfe=ux(27,"="),Yfe=fx(27),Jfe=/^[0-9a-fA-F]{64}$/,eme=ux(43,"="),tme=fx(43),rme=/^[0-9a-fA-F]{96}$/,ome=ux(64,""),nme=fx(64),ime=/^[0-9a-fA-F]{128}$/,ame=ux(86,"=="),sme=fx(86);var Dt=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),DT=e=>{let t=e.value;return!_w(t)&&t.size!==void 0},RT=e=>{let t=e.value;return!_w(t)&&t.length!==void 0},Lw={number:"number",bigint:"bigint",object:"date"},Bw=j("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);let r=Lw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Lw[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jw=j("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);let r=Lw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Lw[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ET=j("$ZodCheckMultipleOf",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Xv(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),TT=j("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Jv[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),$T=j("$ZodCheckBigIntFormat",(e,t)=>{Dt.init(e,t);let[r,n]=ex[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),AT=j("$ZodCheckMaxSize",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=DT),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:tx(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),OT=j("$ZodCheckMinSize",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=DT),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:tx(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zT=j("$ZodCheckSizeEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=DT),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:tx(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),NT=j("$ZodCheckMaxLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=RT),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?_u(o):i)<=t.maximum)return;let s=rx(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),FT=j("$ZodCheckMinLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=RT),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?_u(o):i)>=t.minimum)return;let s=rx(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),LT=j("$ZodCheckLengthEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=RT),e._zod.check=n=>{let o=n.value,i=o.length,a=typeof o=="string"&&i>=t.length&&i<=t.length*2?_u(o):i;if(a===t.length)return;let s=rx(o),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ip=j("$ZodCheckStringFormat",(e,t)=>{var r,n;Dt.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),MT=j("$ZodCheckRegex",(e,t)=>{Ip.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),BT=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kT),Ip.init(e,t)}),jT=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=CT),Ip.init(e,t)}),UT=j("$ZodCheckIncludes",(e,t)=>{Dt.init(e,t);let r=wi(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),VT=j("$ZodCheckStartsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`^${wi(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),HT=j("$ZodCheckEndsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`.*${wi(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Mw(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues))}var WT=j("$ZodCheckProperty",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Mw(o,r,t.property));Mw(n,r,t.property)}}),ZT=j("$ZodCheckProperties",(e,t)=>{Dt.init(e,t),ox(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let o=n.value,i;for(let[a,s]of r){let l=s._zod.run({value:o[a],issues:[]},{});l instanceof Promise?(i??(i=[]),i.push(l.then(c=>Mw(c,n,a)))):Mw(l,n,a)}if(i)return Promise.all(i).then(()=>{})}}),GT=j("$ZodCheckMimeType",(e,t)=>{Dt.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),qT=j("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var wu=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
61
|
+
`).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
62
|
+
${r.join(`
|
|
63
|
+
`)}
|
|
64
|
+
};`)(...Object.values(this.closed))}};var KT={major:4,minor:6,patch:5};var Me=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=KT;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,l,c)=>{if(s.memo)return s;let d=en(s),u;for(let f of l){if(f._zod.def.when){if(FE(s)||!f._zod.def.when(s))continue}else if(d)continue;let m=s.issues.length,p=f._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new Dn;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(Sw(s.issues,m,e),d||(d=en(s,m)))});else{if(s.issues.length===m)continue;Sw(s.issues,m,e),d||(d=en(s,m))}}return u?u.then(()=>s):s},a=(s,l,c)=>{if(en(s))return s.aborted=!0,s;let d=i(l,o,c);if(d instanceof Promise){if(c.async===!1)throw new Dn;return d.then(u=>e._zod.parse(u,c))}return e._zod.parse(d,c)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return d instanceof Promise?d.then(u=>a(u,s,l)):a(d,s,l)}let c=e._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Dn;return c.then(d=>i(d,o,l))}return i(c,o,l)}}},{get"~standard"(){return ox(this,"~standard",Zw(this))},set"~standard"(e){Pc(this,"~standard",e)}}),HZ=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Pn(r,t,hr()))}:{value:e.value};async function lme(e,t){let r={async:!0};return HZ(await e._zod.run({value:t,issues:[]},r),r)}function Zw(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return HZ(n,r)}catch{}return lme(e,t)},vendor:"zod",version:1}}var Su=j("$ZodString",(e,t)=>{Me.init(e,t),e._zod.pattern=t.pattern??bT,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_t=j("$ZodStringFormat",(e,t)=>{Ip.init(e,t),Su.init(e,t)}),QT=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=rT),_t.init(e,t)}),YT=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Iu(n))}else t.pattern??(t.pattern=Iu());_t.init(e,t)}),JT=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=oT),_t.init(e,t)}),e$=1,mx=2;function t$(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Gw(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?t$(e)||mx:WZ(e,t)}function WZ(e,t){if(!t.normalize&&t.protocol?.source===cx.source&&!/^https?:\/\//i.test(e))return e$;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??mx}return new URL(e)}catch{return mx}}var cme=/[\t\n\r]/g;function px(e){return e.replace(cme,"")}function qw(e,t){return t.lastIndex=0,t.test(e.hostname)}function Kw(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var r$=j("$ZodURL",(e,t)=>{_t.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=Gw(n,t);if(o===e$){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===mx){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=px(n);return}t.hostname&&!qw(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Kw(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:px(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),o$=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nT()),_t.init(e,t)}),n$=j("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?JE:eT(t.length)),_t.init(e,t)}),i$=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=qE),_t.init(e,t)}),a$=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=KE),_t.init(e,t)}),s$=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=XE),_t.init(e,t)}),l$=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=QE),_t.init(e,t)}),c$=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=YE),_t.init(e,t)}),d$=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xT(t)),_t.init(e,t)}),u$=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gT),_t.init(e,t)}),f$=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=vT(t)),_t.init(e,t)}),m$=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tT),_t.init(e,t)}),p$=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=iT),_t.init(e,t)}),dme=/^[0-9a-fA-F:.]+$/;function hx(e){return dme.test(e)?t$(`http://[${e}]`):!1}var h$=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=aT),_t.init(e,t),e._zod.check=r=>{hx(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),g$=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=sT(t.delimiter)),_t.init(e,t)}),v$=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lT),_t.init(e,t)});function Xw(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:hx(r)}var x$=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=cT),_t.init(e,t),e._zod.check=r=>{Xw(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function gx(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Qw=/^[0-9a-zA-Z+/]*={0,2}$/,b$=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qw),_t.init(e,t),e._zod.check=r=>{gx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),vx=/^[A-Za-z0-9_-]*$/;function Yw(e){if(!vx.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return gx(r)}var y$=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vx),_t.init(e,t),e._zod.check=r=>{Yw(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),_$=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=pT),_t.init(e,t)}),ume=/[- ]/g;function fme(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function Jw(e){return Nw.test(e)?fme(e.replace(ume,"")):!1}var I$=j("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Nw),_t.init(e,t),e._zod.check=r=>{Jw(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function mme(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function eS(e){return Fw.test(e)?mme(e):!1}var w$=j("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Fw),_t.init(e,t),e._zod.check=r=>{eS(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function tS(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var S$=j("$ZodJWT",(e,t)=>{_t.init(e,t),e._zod.check=r=>{tS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),k$=j("$ZodCustomStringFormat",(e,t)=>{_t.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),rS=j("$ZodNumber",(e,t)=>{Me.init(e,t),e._zod.pattern=el,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),C$=j("$ZodNumberFormat",(e,t)=>{TT.init(e,t),rS.init(e,t)}),xx=j("$ZodBoolean",(e,t)=>{Me.init(e,t),e._zod.pattern=IT,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),oS=j("$ZodBigInt",(e,t)=>{Me.init(e,t),e._zod.pattern=_T,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),P$=j("$ZodBigIntFormat",(e,t)=>{$T.init(e,t),oS.init(e,t)}),D$=j("$ZodSymbol",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),R$=j("$ZodUndefined",(e,t)=>{Me.init(e,t),e._zod.pattern=ST,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),E$=j("$ZodNull",(e,t)=>{Me.init(e,t),e._zod.pattern=wT,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),T$=j("$ZodAny",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),$$=j("$ZodUnknown",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),A$=j("$ZodNever",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),O$=j("$ZodVoid",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),z$=j("$ZodDate",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function RZ(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues)),t.value[r]=e.value}var N$=j("$ZodArray",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let a=[],s=o?.abortEarly;for(let l=0;l<i.length;l++){let c=i[l],d=t.element._zod.run({value:c,issues:[]},o);if(d instanceof Promise)a.push(d.then(u=>RZ(u,n,l)));else if(RZ(d,n,l),s&&d.issues.length!==0&&en(d))break}return a.length?Promise.all(a).then(()=>n):n}});function Ww(e,t,r,n,o,i){let a=r in n,s=i==="optional";if(!(!a&&s&&o==="optional")){if(e.issues.length){if(o!==void 0&&s&&!a)return;t.issues.push(...Cn(r,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||o==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var pme=[];function ZZ(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:pme,o=n.length?[...t,...n]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=NE(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function GZ(e,t,r,n,o,i,a){let s=[],l=o.keySet,c=o.catchall._zod,d=c.def.type,u=c.optin,f=c.optout,m=0;for(let p in t){if(a&&r.issues.length!==m){if(en(r,m))break;m=r.issues.length}if(l.has(p))continue;if(p==="__proto__"){d==="never"&&s.push(p);continue}if(d==="never"){s.push(p);continue}let h=c.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(y=>Ww(y,r,p,t,u,f))):Ww(h,r,p,t,u,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var qZ=j("$ZodObject",(e,t)=>{Me.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let c=()=>{let d={...n};return Object.defineProperty(t,"shape",{value:d}),c.raw=d,d};c.raw=n,Object.defineProperty(t,"shape",{get:c})}let o=pp(()=>ZZ(t));Ge(e,"propValues",c=>{let d=c.def.shape,u={};for(let f in d){let m=d[f]._zod;if(m.values){Object.prototype.hasOwnProperty.call(u,f)||ho(u,f,new Set);for(let p of m.values)u[f].add(p);m.optin!==void 0&&u[f].add(void 0)}}return u});let i=yu,a=t.catchall,s,l=Qr.memoizer;l?.attach(e),e._zod.parse=(c,d)=>{s??(s=o.value);let u=c.value;if(!i(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.value=l?l.alloc(e,c,{},d):{};let f=[],m=s.shape,p=d?.abortEarly,h=c.issues.length;for(let y of s.allKeys){if(p&&c.issues.length!==h){if(en(c,h))break;h=c.issues.length}if(y==="__proto__")continue;let x=m[y],v=x._zod.optin,_=x._zod.optout,I=x._zod.run({value:u[y],issues:[]},d);I instanceof Promise?f.push(I.then(S=>Ww(S,c,y,u,v,_))):Ww(I,c,y,u,v,_)}return a?GZ(f,u,c,d,o.value,e,p===!0):f.length?Promise.all(f).then(()=>c):c}}),F$=j("$ZodObjectJIT",(e,t)=>{qZ.init(e,t);let r=e._zod.parse,n=pp(()=>ZZ(t)),o=Qr.memoizer,i=m=>{let p=n.value,h=p.symbolKeys,y=new wu(["payload","ctx"],{shape:m,inst:e,memo:o,syms:h}),x=S=>`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`,v=(S,w)=>`
|
|
65
|
+
let ${S}_ab = false;
|
|
66
|
+
for (let i = 0; i < ${S}.issues.length; i++) {
|
|
67
|
+
const iss = ${S}.issues[i];
|
|
68
|
+
iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
|
|
69
|
+
payload.issues.push(iss);
|
|
70
|
+
if (iss.continue !== true) ${S}_ab = true;
|
|
71
|
+
}
|
|
72
|
+
if (${S}_ab && ctx && ctx.abortEarly) {
|
|
73
|
+
payload.value = newResult;
|
|
74
|
+
return payload;
|
|
75
|
+
}`;y.write("const input = payload.value;");let _=Object.create(null),I=0;for(let S of p.allKeys)_[S]=`key_${I++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let S of p.allKeys){if(S==="__proto__")continue;let w=_[S],P=typeof S=="symbol"?`syms[${h.indexOf(S)}]`:Jo(S),E=`${P} in input`,B=m[S],H=B?._zod?.optin,Z=H!==void 0,q=B?._zod?.optout==="optional";if(y.write(`const ${w} = ${x(P)};`),Z&&q){let T=H==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;y.write(`
|
|
76
|
+
const ${w}_present = ${E};
|
|
77
|
+
if (!${w}.issues.length || ${w}_present) {
|
|
78
|
+
if (${w}.issues.length) {${v(w,P)}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (${T}) {
|
|
82
|
+
newResult[${P}] = ${w}.value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
`)}else Z?(y.write(`
|
|
87
|
+
if (${w}.issues.length) {${v(w,P)}
|
|
88
|
+
}
|
|
89
|
+
`),H==="defaulted"?y.write(`newResult[${P}] = ${w}.value;`):y.write(`
|
|
90
|
+
if (${w}.value !== undefined || ${E}) {
|
|
91
|
+
newResult[${P}] = ${w}.value;
|
|
92
|
+
}
|
|
93
|
+
`)):y.write(`
|
|
94
|
+
const ${w}_present = ${E};
|
|
95
|
+
if (${w}.issues.length) {${v(w,P)}
|
|
96
|
+
}
|
|
97
|
+
if (!${w}_present && !${w}.issues.length) {
|
|
98
|
+
payload.issues.push({
|
|
99
|
+
code: "invalid_type",
|
|
100
|
+
expected: "nonoptional",
|
|
101
|
+
input: undefined,
|
|
102
|
+
path: [${P}]
|
|
103
|
+
});
|
|
104
|
+
if (ctx && ctx.abortEarly) {
|
|
105
|
+
payload.value = newResult;
|
|
106
|
+
return payload;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (${w}_present) {
|
|
111
|
+
newResult[${P}] = ${w}.value;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
`)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()},a,s=yu,l=!Qr.jitless,d=l&&OE.value,u=t.catchall,f;e._zod.parse=(m,p)=>{f??(f=n.value);let h=m.value;return s(h)?l&&d&&p?.async===!1&&p.jitless!==!0?(a||(a=i(t.shape)),m=a(m,p),u?GZ([],h,m,p,f,e,p?.abortEarly===!0):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function EZ(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!en(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Pn(a,n,hr())))}),t)}var bx=j("$ZodUnion",(e,t)=>{Me.init(e,t),Ge(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Ge(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ge(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),Ge(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Js(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(s=>EZ(s,n,e,o)):EZ(a,n,e,o)}});function TZ(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Pn(a,n,hr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var L$=j("$ZodXor",(e,t)=>{bx.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),i=!0):a.push(l)}return i?Promise.all(a).then(s=>TZ(s,n,e,o)):TZ(a,n,e,o)}});function M$(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=KZ(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function KZ(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var B$=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,bx.init(e,t);let r=e._zod.parse;Ge(e,"propValues",o=>{let i={},a=0;for(let s of o.def.options){let l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);l[o.def.discriminator]?.has(void 0)&&a++;for(let[c,d]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||ho(i,c,new Set);for(let u of d)i[c].add(u)}}return!o.def.unionFallback&&a>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let a=hp(o._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=pp(()=>KZ(t));e._zod.parse=(o,i)=>{let a=o.value;if(!yu(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],l=n.value.get(s);return l&&(s!==void 0||i.direction!=="backward")?l._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(c=>n.value.get(c)!==null),input:a,path:[t.discriminator],inst:e}),o)}}),j$=j("$ZodIntersection",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>$Z(r,l,c)):$Z(r,i,a)}});function wp(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(Ii(e)&&Ii(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let a=wp(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],a=wp(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function $Z(e,t,r){let n=new Map,o,i=new Map,a=(c,d)=>{let u;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),u=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let f=String(c.path[0]);i.has(f)||i.set(f,c),u=[f]}else return!1;for(let f of u)n.has(f)||n.set(f,{}),n.get(f)[d]=!0;return!0};for(let c of t.issues)a(c,"l")||e.issues.push(c);for(let c of r.issues)a(c,"r")||e.issues.push(c);let s=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=o?s.filter(d=>o.keys.includes(d)):[];c.length&&e.issues.push({...o,keys:c});for(let d of s)!c.includes(d)&&i.has(d)&&e.issues.push(i.get(d))}let l=wp(t.value,r.value);if(!l.valid){if(en(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}var nS=j("$ZodTuple",(e,t)=>{Me.init(e,t);let r=t.items,n=Qr.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let a=o.value;if(!Array.isArray(a))return o.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let s=[],l=AZ(r,"optin"),c=AZ(r,"optout");if(!t.rest){if(a.length<l)return o.issues.push({code:"too_small",minimum:l,inclusive:!0,input:a,inst:e,origin:"array"}),o;a.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=new Array(r.length),u=t.rest?i?.abortEarly:void 0,f=!1;for(let m=0;m<r.length;m++){let p=r[m]._zod.run({value:a[m],issues:[]},i);p instanceof Promise?s.push(p.then(h=>{d[m]=h})):(d[m]=p,u&&!f&&p.issues.length&&(f=en(p)))}if(t.rest&&!f){let m=r.length-1,p=a.slice(r.length),h=o.issues.length;for(let y of p){if(u&&o.issues.length!==h){if(en(o,h))break;h=o.issues.length}m++;let x=t.rest._zod.run({value:y,issues:[]},i);x instanceof Promise?s.push(x.then(v=>OZ(v,o,m))):OZ(x,o,m)}}return s.length?Promise.all(s).then(()=>zZ(d,o,r,a,c)):zZ(d,o,r,a,c)}});function AZ(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function OZ(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues)),t.value[r]=e.value}function zZ(e,t,r,n,o){for(let i=0;i<r.length;i++){let a=e[i],s=i<n.length;if(!s&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(a.issues.length){if(!s&&i>=o){t.value.length=i;break}t.issues.push(...Cn(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var U$=j("$ZodRecord",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Ii(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let l=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){if(l.add(typeof d=="number"?d.toString():d),d==="__proto__")continue;let u=t.keyType._zod.run({value:d,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Pn(p,o,hr())),input:d,path:[d],inst:e});continue}let f=u.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[d],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Cn(d,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Cn(d,m.issues)),n.value[f]=m.value)}let c;for(let d in i)if(!l.has(d))if(t.mode==="loose"){if(d==="__proto__")continue;n.value[d]=i[d]}else c=c??[],c.push(d);c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let l;for(let c of Reflect.ownKeys(i)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;let d=t.keyType._zod.run({value:c,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&el.test(c)&&d.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[c]=i[c]:s?(l=l??[],l.push(c)):n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Pn(p,o,hr())),input:c,path:[c],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[c],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Cn(c,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Cn(c,m.issues)),n.value[f]=m.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),V$=j("$ZodMap",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let a=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let s=o?.abortEarly,l=n.issues.length;for(let[c,d]of i){if(s&&n.issues.length!==l){if(en(n,l))break;l=n.issues.length}let u=t.keyType._zod.run({value:c,issues:[]},o),f=t.valueType._zod.run({value:d,issues:[]},o);u instanceof Promise||f instanceof Promise?a.push(Promise.all([u,f]).then(([m,p])=>{NZ(m,p,n,c,i,e,o)})):NZ(u,f,n,c,i,e,o)}return a.length?Promise.all(a).then(()=>n):n}});function NZ(e,t,r,n,o,i,a){e.issues.length&&(Yv.has(typeof n)?r.issues.push(...Cn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(s=>Pn(s,a,hr()))})),t.issues.length&&(Yv.has(typeof n)?r.issues.push(...Cn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(s=>Pn(s,a,hr()))})),r.value.set(e.value,t.value)}var H$=j("$ZodSet",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let s=o?.abortEarly,l=n.issues.length;for(let c of i){if(s&&n.issues.length!==l){if(en(n,l))break;l=n.issues.length}let d=t.valueType._zod.run({value:c,issues:[]},o);d instanceof Promise?a.push(d.then(u=>FZ(u,n))):FZ(d,n)}return a.length?Promise.all(a).then(()=>n):n}});function FZ(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var W$=j("$ZodEnum",(e,t)=>{Me.init(e,t);let r=fp(t.entries),n=new Set(r);e._zod.values=n,Ge(e,"pattern",o=>{let i=fp(o.def.entries).filter(a=>Yv.has(typeof a));return new RegExp(i.length?`^(${i.map(a=>wi(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),Z$=j("$ZodLiteral",(e,t)=>{Me.init(e,t);let r=new Set(t.values);e._zod.values=r,Ge(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?wi(i):i?wi(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),G$=j("$ZodFile",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),q$=j("$ZodTransform",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Qr.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Dc(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new Dn;return r.value=o,r}});function LZ(e,t){return e.value=t.issues.length?void 0:t.value,e}var iS=j("$ZodOptional",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Ge(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),Ge(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Js(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>LZ(r,i)):LZ(r,o)}return t.innerType._zod.run(r,n)}}),K$=j("$ZodExactOptional",(e,t)=>{iS.init(e,t),Ge(e,"values",r=>r.def.innerType._zod.values),Ge(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),X$=j("$ZodNullable",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin),Ge(e,"optout",r=>r.def.innerType._zod.optout),Ge(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Js(n.source)}|null)$`):void 0}),Ge(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),Q$=j("$ZodDefault",(e,t)=>{Me.init(e,t),e._zod.optin="defaulted",Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>MZ(i,t)):MZ(o,t)}});function MZ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Y$=j("$ZodPrefault",(e,t)=>{Me.init(e,t),e._zod.optin="defaulted",Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),J$=j("$ZodNonOptional",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>BZ(i,e)):BZ(o,e)}});function BZ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var e5=j("$ZodSuccess",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Dc("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function jZ(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Pn(o,n,hr()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var t5=j("$ZodCatch",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ge(e,"optout",r=>r.def.innerType._zod.optout),Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>jZ(r,i,t,n)):jZ(r,o,t,n)}}),r5=j("$ZodNaN",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),aS=j("$ZodPipe",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>r.def.in._zod.values),Ge(e,"optin",r=>r.def.in._zod.optin),Ge(e,"optout",r=>r.def.out._zod.optout),Ge(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Uw(a,t.in,n)):Uw(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Uw(i,t.out,n)):Uw(o,t.out,n)}});function Uw(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var yx=j("$ZodCodec",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>r.def.in._zod.values),Ge(e,"optin",r=>r.def.in._zod.optin),Ge(e,"optout",r=>r.def.out._zod.optout),Ge(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Vw(a,t,n)):Vw(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Vw(a,t,n)):Vw(i,t,n)}}});function Vw(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>Hw(e,i,t.out,r)):Hw(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>Hw(e,i,t.in,r)):Hw(e,o,t.in,r)}}function Hw(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var o5=j("$ZodPreprocess",(e,t)=>{aS.init(e,t)}),n5=j("$ZodReadonly",(e,t)=>{Me.init(e,t),Ge(e,"propValues",r=>r.def.innerType._zod.propValues),Ge(e,"values",r=>r.def.innerType._zod.values),Ge(e,"optin",r=>r.def.innerType?._zod?.optin),Ge(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(UZ):UZ(o)}});function UZ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function hme(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let s of t.checks??[]){let l=s._zod.def;l.pattern&&(r=l.pattern),n||(n=!!l.format?.includes("int"));let c=l.minimum??l.length,d=l.maximum??l.length;c!==void 0&&(o===void 0||c>o)&&(o=c),d!==void 0&&(i===void 0||d<i)&&(i=d)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return yT({minimum:o,maximum:i}).source;let a=e._zod.pattern;return(n&&a===el?dx:a)?.source}function XT(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=XT(n);return r&&o&&i&&i!==o?r.replace(Js(o),()=>Js(i)):r}if(t.options){let o=t.options.map(XT);if(o.every(Boolean))return`^(${o.map(i=>Js(i)).join("|")})$`}return hme(e)}var i5=j("$ZodTemplateLiteral",(e,t)=>{Me.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=XT(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(Js(o))}else if(n===null||zE.has(typeof n))r.push(wi(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),a5=j("$ZodFunction",(e,t)=>(Me.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?xp(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?xp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Pw(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Pw(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new nS({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),s5=j("$ZodPromise",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),_x=j("$ZodLazy",(e,t)=>{Me.init(e,t),$E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Ge(e,"pattern",r=>r.innerType?._zod?.pattern),Ge(e,"propValues",r=>r.innerType?._zod?.propValues),Ge(e,"optin",r=>r.innerType?._zod?.optin??void 0),Ge(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),l5=j("$ZodCustom",(e,t)=>{Dt.init(e,t),Me.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>VZ(i,r,n,e));VZ(o,r,n,e)}});function VZ(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(gp(o))}}var dS=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},d5="~memo",QZ=[];function YZ(e){return e!==null&&typeof e=="object"}function c5(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var JZ=new WeakMap,Sp=0,cS=1,Ix=2;function wx(e,t,r){let n=JZ.get(e);if(n!==void 0)return n?Ix:Sp;if(t.has(e))return Ix;t.add(e);let o=Sp,i=d=>{if(o!==Ix&&d?._zod){let u=wx(d,t,r);u>o&&(o=u)}},a=(d,u)=>{let f=Sp;for(let m of Reflect.ownKeys(d)){let p=Object.getOwnPropertyDescriptor(d,m);if(u&&!p.enumerable)continue;let h=p.get?cS:p.value?._zod?wx(p.value,t,r):Sp;h>f&&(f=h)}return f},s=d=>{d>o&&(o=d)},l=e._zod.def,c=l.type;switch(c){case"object":{let d=hp(l);s(d?a(d,!0):cS),i(l.catchall);break}case"array":i(l.element);break;case"tuple":for(let d of l.items)i(d);i(l.rest);break;case"record":case"map":i(l.keyType),i(l.valueType);break;case"set":i(l.valueType);break;case"union":for(let d of l.options)i(d);break;case"intersection":i(l.left),i(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(l.innerType);break;case"pipe":i(l.in),i(l.out);break;case"function":i(l.input),i(l.output);break;case"lazy":{let d=l._cachedInner??(r?e._zod.innerType:void 0);s(d?wx(d,t,!1):cS);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let d in l){let u=Object.getOwnPropertyDescriptor(l,d);if(!u||u.get)continue;let f=u.value;if(!(!f||typeof f!="object")){if(f._zod)i(f);else if(Array.isArray(f))for(let m of f)i(m)}}}return t.delete(e),gme(e,o)}function gme(e,t){return t!==cS&&JZ.set(e,t===Ix),t}function uS(e){return wx(e,new Set,!0)!==Sp}function vme(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var sS,lS=[],xme={alloc(e,t,r){let n=sS;if(!n)return r;sS=void 0;let o={value:r,issues:null};return n.set(t.value,o),lS.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&fS(i,o.value))throw new dS;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(l,c)=>{if(r===void 0){let x=wx(e,new Set,!1);if(x===Sp)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(l,c);x===Ix||n?r=!0:n=!0}let d=l.value;if(!YZ(d))return a(l,c);let u=c[d5];u||(u={buckets:new WeakMap,backEdges:void 0},c[d5]=u);let f;o===c?f=i:(f=vme(u,e),o=c,i=f);let m=f.get(d);if(m)return l.value=m.value,m.issues?m.issues.length&&l.issues.push(...c5(m.issues)):(l.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(m.value)),l;sS=f;let p=lS.length,h=a(l,c);sS=void 0;let y=lS.length>p?lS.pop():void 0;return h instanceof Promise?h.then(x=>(y&&(y.issues=x.issues.length?c5(x.issues):QZ),x)):(y&&(y.issues=h.issues.length?c5(h.issues):QZ),h)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Sx(){return xme}function fS(e,t){let r=e[d5]?.backEdges;return r!==void 0&&YZ(t)&&r.has(t)}var Cx={};hs(Cx,{ar:()=>eG,az:()=>tG,be:()=>oG,bg:()=>nG,bn:()=>iG,ca:()=>aG,ckb:()=>sG,cs:()=>lG,da:()=>cG,de:()=>dG,el:()=>uG,en:()=>mS,eo:()=>fG,es:()=>mG,fa:()=>pG,fi:()=>hG,fr:()=>gG,frCA:()=>vG,gu:()=>xG,he:()=>bG,hi:()=>yG,hr:()=>_G,hu:()=>IG,hy:()=>SG,id:()=>kG,is:()=>CG,it:()=>PG,ja:()=>DG,ka:()=>RG,kh:()=>EG,km:()=>pS,kn:()=>TG,ko:()=>$G,lt:()=>OG,mk:()=>zG,ms:()=>NG,ne:()=>FG,nl:()=>LG,nn:()=>MG,no:()=>BG,ota:()=>jG,pl:()=>VG,ps:()=>UG,pt:()=>HG,ptBR:()=>WG,ro:()=>ZG,ru:()=>qG,sk:()=>KG,sl:()=>XG,sv:()=>QG,ta:()=>YG,tg:()=>JG,th:()=>eq,tk:()=>tq,tr:()=>rq,ua:()=>oq,uk:()=>hS,ur:()=>nq,uz:()=>iq,vi:()=>aq,yo:()=>cq,zhCN:()=>sq,zhTW:()=>lq});var bme=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Y(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function eG(){return{localeError:bme()}}var yme=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Y(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function tG(){return{localeError:yme()}}function rG(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var _me=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Y(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=rG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=rG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function oG(){return{localeError:_me()}}var Ime=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Y(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function nG(){return{localeError:Ime()}}var wme=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(o){return e[o]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${Y(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${V(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function iG(){return{localeError:wme()}}var Sme=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Y(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${V(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",a=t(o.origin);return a?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(o.origin);return a?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function aG(){return{localeError:Sme()}}var kme=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(o){return e[o]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a,l=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(d=>s.endsWith(d))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":l}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${Y(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${V(o.values,"|")}`;case"too_big":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${i.prefix}"`:i.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[i.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function sG(){return{localeError:kme()}}var Cme=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Y(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function lG(){return{localeError:Cme()}}var Pme=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${Y(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${o.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function cG(){return{localeError:Pme()}}var Dme=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Y(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function dG(){return{localeError:Dme()}}var Rme=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Y(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function uG(){return{localeError:Rme()}}var Eme=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,a){return i==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let a=o(i.expected),s=ee(i.input),l=o(s,i.input);return`Invalid input: expected ${a}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Y(i.values[0])}`:`Invalid option: expected one of ${V(i.values,"|")}`;case"too_big":{let a=i.exact?"exactly ":i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.exact?"exactly ":i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${V(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function mS(){return{localeError:Eme()}}var Tme=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${Y(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function fG(){return{localeError:Tme()}}var $me=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Y(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${o.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${o.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function mG(){return{localeError:$me()}}var Ame=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Y(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${V(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function pG(){return{localeError:Ame()}}var Ome=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Y(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${V(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function hG(){return{localeError:Ome()}}var zme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Y(o.values[0])} attendu`:`Option invalide : une valeur parmi ${V(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Trop grand : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Trop petit : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function gG(){return{localeError:zme()}}var Nme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Y(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",a=t(o.origin);return a?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",a=t(o.origin);return a?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function vG(){return{localeError:Nme()}}var Fme=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(o){return e[o]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${Y(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${V(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function xG(){return{localeError:Fme()}}var Lme=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,n=c=>{let d=r(c);return d?d.label:c??e.unknown.label},o=c=>`\u05D4${n(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let d=c.expected,u=l[d??""]??n(d),f=ee(c.input),m=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Y(c.values[0])}`;let d=c.values.map(m=>Y(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?"<=":"<",m=i(c.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()}`}case"too_small":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let y=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let h=c.inclusive?`${c.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?">=":">",m=i(c.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let u=s[d.format],f=u?.label??d.format,p=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${V(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function bG(){return{localeError:Lme()}}var Mme=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${Y(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${i}${o.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${i}${o.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function yG(){return{localeError:Mme()}}var Bme=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Y(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${o.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${o.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function _G(){return{localeError:Bme()}}var jme=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Y(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function IG(){return{localeError:jme()}}function wG(e,t,r){return Math.abs(e)===1?t:r}function kp(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Ume=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Y(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=wG(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${kp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${kp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=wG(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${kp(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${kp(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${V(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${kp(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${kp(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function SG(){return{localeError:Ume()}}var Vme=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Y(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function kG(){return{localeError:Vme()}}var Hme=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Y(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${V(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function CG(){return{localeError:Hme()}}var Wme=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Y(o.values[0])}`:`Opzione non valida: atteso uno tra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${V(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function PG(){return{localeError:Wme()}}var Zme=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Y(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${V(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(o.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(o.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function DG(){return{localeError:Zme()}}var Gme=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Y(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${V(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function RG(){return{localeError:Gme()}}var qme=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Y(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${V(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function pS(){return{localeError:qme()}}function EG(){return pS()}var Kme=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(o){return e[o]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${Y(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${i.prefix}"`:i.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${i.suffix}"`:i.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${i.includes}"`:i.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function TG(){return{localeError:Kme()}}var Xme=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Y(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${V(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${a}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${V(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function $G(){return{localeError:Xme()}}var kx=e=>e.charAt(0).toUpperCase()+e.slice(1);function AG(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var Qme=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,a,s){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${Y(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${V(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,a=t(o.origin,AG(Number(o.maximum)),o.inclusive??!1,"smaller");if(a?.verb)return`${kx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.maximum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${kx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${a?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,a=t(o.origin,AG(Number(o.minimum)),o.inclusive??!1,"bigger");if(a?.verb)return`${kx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.minimum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${kx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${V(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${kx(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function OG(){return{localeError:Qme()}}var Yme=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Y(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function zG(){return{localeError:Yme()}}var Jme=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Y(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: dijangka ${o.origin??"nilai"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: dijangka ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function NG(){return{localeError:Jme()}}var epe=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${Y(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function FG(){return{localeError:epe()}}var tpe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Y(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function LG(){return{localeError:tpe()}}var rpe=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${s}`:`Ugyldig input: forventa ${i}, fekk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${Y(o.values[0])}`:`Ugyldig val: forventa eitt av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function MG(){return{localeError:rpe()}}var ope=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Y(o.values[0])}`:`Ugyldig valg: forventet en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function BG(){return{localeError:ope()}}var npe=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Y(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function jG(){return{localeError:npe()}}var ipe=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Y(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${V(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function UG(){return{localeError:ipe()}}var ape=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Y(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function VG(){return{localeError:ape()}}var spe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${Y(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Demasiado grande: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Demasiado pequeno: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function HG(){return{localeError:spe()}}var lpe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${Y(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Grande demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Grande demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Pequeno demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Pequeno demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function WG(){return{localeError:lpe()}}var cpe=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Y(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Prea mic: a\u0219teptat ca ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${V(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function ZG(){return{localeError:cpe()}}function GG(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var dpe=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Y(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=GG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=GG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function qG(){return{localeError:dpe()}}var upe=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${Y(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function KG(){return{localeError:upe()}}var fpe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Y(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function XG(){return{localeError:fpe()}}var mpe=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Y(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function QG(){return{localeError:mpe()}}var ppe=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Y(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function YG(){return{localeError:ppe()}}var hpe=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},n={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${i} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return o.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${Y(o.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${V(o.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:i.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:i.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${i.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:i.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${i.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[i.format]??o.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${o.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${o.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${V(o.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${o.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function JG(){return{localeError:hpe()}}var gpe=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Y(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${V(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function eq(){return{localeError:gpe()}}var vpe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(o){return e[o]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${s} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${Y(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function tq(){return{localeError:vpe()}}var xpe=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Y(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function rq(){return{localeError:xpe()}}var bpe=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Y(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function hS(){return{localeError:bpe()}}function oq(){return hS()}var ype=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Y(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${V(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function nq(){return{localeError:ype()}}var _pe=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Y(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function iq(){return{localeError:_pe()}}var Ipe=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Y(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${V(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function aq(){return{localeError:Ipe()}}var wpe=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Y(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function sq(){return{localeError:wpe()}}var Spe=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Y(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function lq(){return{localeError:Spe()}}var kpe=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Y(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${a.verb} ${i}${o.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${a.verb} ${i}${o.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${V(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function cq(){return{localeError:kpe()}}var dq,u5=Symbol("ZodOutput"),f5=Symbol("ZodInput"),gS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function vS(){return new gS}(dq=globalThis).__zod_globalRegistry??(dq.__zod_globalRegistry=vS());var go=globalThis.__zod_globalRegistry;var tn=Symbol.for("zod.compile.invalid"),uq=Symbol.for("zod.compile.fallback"),ia=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},nt=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function Ppe(e,t){try{return bS(e,{assertOnly:!0})}catch{return t}}function g5(e,t){try{let r=bS(e),n=xS(e,r);return n._zod.bag.validator=Ppe(e,r),n}catch(r){if(t?.strict)throw r;return e}}function xS(e,t){if(uS(e))throw new nt("a schema whose subtree contains a reference cycle");let r=yt(e),n=e._zod.run,o=n.__originalRun??n,i=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[uq]||s&&fS(s,a.value))return o(a,s);let l=t(a.value);return l!==tn?(a.value=l,a):(s&&(s[uq]=!0),o(a,s))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||Dpe(r,e,t),r}function Dpe(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(a,s)=>{let l=r(a);return l!==tn?{success:!0,data:l}:i(a,s)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(a,s)=>{let l=r(a);return l!==tn?l:i(a,s)}}}function bS(e,t){let r=!0;try{r=uS(e)}catch{}if(r)throw new nt("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new wu(["input"]),i=tr(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let a=["INVALID",...n.constants.keys()],s=[tn,...n.constants.values()],l=o.content.join(`
|
|
115
|
+
`),c=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
116
|
+
${l}`:l:"",d=Function,u=`return (input) => {
|
|
117
|
+
${l}
|
|
118
|
+
}`,f;try{f=new d(...a,u)(...s)}catch(m){throw new nt(`this schema (generated code failed to evaluate: ${m.message})`)}return t?.debug&&(f.code=c),f.definite=n.definite,f}function Ne(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Pu(e,t){return e.definite=!1,Ne(e,t)}function Te(e){return`v${e.varCounter++}`}function Rpe(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return tn;let n=r;return n.issues.length===0?n.value:tn}function Eo(e,t,r,n,o=!0){let i=e.content.length,a=t.constants.size,s=t.constantCounter,l=t.varCounter;try{return tr(e,t,r,n,o)}catch(c){if(!(c instanceof nt)||!c.islandable)throw c;if(e.content.length=i,t.constants.size>a){let d=Array.from(t.constants.keys()).slice(a);for(let u of d)t.constants.delete(u)}return t.constantCounter=s,t.varCounter=l,Epe(e,t,r,n)}}function Epe(e,t,r,n){t.definite=!1;let o=Ne(t,r),i=Ne(t,Rpe),a=Te(t);return e.write(`const ${a} = ${i}(${o}, ${n});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var Tpe=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function $pe(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let a of o){let s=a._zod.def;if(s.when&&!Tpe.has(s.check))throw new nt('check with a custom "when" condition');switch(s.check){case"greater_than":Ape(e,t,s,i);break;case"less_than":Ope(e,t,s,i);break;case"multiple_of":zpe(e,t,s,i);break;case"number_format":vq(e,s,i);break;case"min_length":{let l=ku(s.minimum,"min_length"),c=m5(e,t,i,`${i}.length >= ${l} && ${i}.length < ${s.minimum*2}`);e.write(`if (${c} < ${l}) return INVALID;`);break}case"max_length":{let l=ku(s.maximum,"max_length"),c=m5(e,t,i,`${i}.length > ${l}`);e.write(`if (${c} > ${l}) return INVALID;`);break}case"length_equals":{let l=ku(s.length,"length_equals"),c=m5(e,t,i,`${i}.length >= ${l} && ${i}.length <= ${s.length*2}`);e.write(`if (${c} !== ${l}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${ku(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${ku(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${ku(s.size,"size_equals")}) return INVALID;`);break;case"string_format":i=xq(e,t,s,i);break;case"custom":i=jpe(e,t,a,i);break;case"bigint_format":Npe(e,s,i);break;case"mime_type":Fpe(e,t,s,i);break;case"property":Mpe(e,t,s,i);break;case"properties":Lpe(e,t,s,i);break;case"overwrite":{let l=Te(t);Bpe(e,t,a,i,l),i=l;break}default:throw new nt(`check type ${s.check}`)}}return i}function m5(e,t,r,n){let o=Ne(t,_u),i=Te(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function ku(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new nt(`${t} bound of type ${typeof e}`);return`${e}`}function gq(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new nt("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new nt("comparison check with Invalid Date bound");return Ne(e,t)}throw new nt(`comparison check bound of type ${typeof t}`)}function Ape(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${gq(t,r.value)}) return INVALID;`)}function Ope(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${gq(t,r.value)}) return INVALID;`)}function zpe(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new nt("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=Ne(t,Xv);e.write(`if (${o}(${n}, ${ku(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function vq(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new nt(`number format ${n}`)}}function Npe(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new nt(`bigint format ${n}`)}}function Fpe(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=Ne(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function Lpe(e,t,r,n){if(r.when)throw new nt('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let a=typeof i=="symbol"?Ne(t,i):Jo(i),s=Te(t);e.write(`const ${s} = ${n}[${a}];`),Eo(e,t,o[i],s,!1)}}function Mpe(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;tr(e,t,r.schema,o)}function Bpe(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new nt("overwrite check without a transform function");if(Du(i))throw new ia("z.compile: async overwrite transforms are not supported");let a=Ne(t,i);e.write(`const ${o} = ${a}(${n});`)}function p5(){throw new Dn}function v5(e){this.issues.push(e)}function jpe(e,t,r,n){let o=r._zod.def;if(o.fn){if(Du(o.fn))throw new ia("z.compile: async .refine() predicates are not supported");let i=Pu(t,o.fn),a=Ne(t,p5),s=Te(t);return e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),n}if(r._zod.check){if(Du(r._zod.check))throw new ia("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,s=Pu(t,c=>{let d={value:c,issues:[],addIssue:v5};return i(d)instanceof Promise&&p5(),d.issues.length===0?d.value:tn}),l=Te(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}throw new nt("custom check without a predicate or check function")}var Upe=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function xq(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let c=Ne(t,gx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="base64url"){let c=Ne(t,Yw);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="jwt"){let c=Ne(t,tS),d=Ne(t,r.alg??null);return e.write(`if (!${c}(${n}, ${d})) return INVALID;`),n}if(i==="ipv6"){let c=Ne(t,hx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="cidrv6"){let c=Ne(t,Xw);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="credit_card"){let c=Ne(t,Jw);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="iban"){let c=Ne(t,eS);return e.write(`if (!${c}(${n})) return INVALID;`),n}let a=r;if(i==="url"||i==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=Ne(t,Gw),d=Ne(t,r),u=Te(t),f=Te(t);if(e.write(`const ${u} = ${n}.trim();`),e.write(`const ${f} = ${c}(${u}, ${d});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let h=Ne(t,qw);e.write(`if (!${h}(${f}, ${d}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=Ne(t,Kw);e.write(`if (!${h}(${f}, ${d}.protocol)) return INVALID;`)}if(!o)return null;let m=Te(t),p=a.normalize?`${f}.href`:`${Ne(t,px)}(${u})`;return e.write(`const ${m} = ${p};`),m}let s=r.fn;if(s){if(Du(s))throw new nt(`async string format ${i}`);let c=Ne(t,s);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(Upe.has(i)&&r.pattern){let c=Ne(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${n})) return INVALID;`),n}let l=r.format;switch(l){case"regex":throw new nt("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${Jo(r.includes)})) return INVALID;`);break;case"starts_with":{let c=r.prefix;e.write(`if (${n}.slice(0, ${c.length}) !== ${Jo(c)}) return INVALID;`);break}case"ends_with":{let c=r.suffix;e.write(`if (${n}.slice(-${c.length}) !== ${Jo(c)}) return INVALID;`);break}default:throw new nt(`string format ${l}`)}return n}function tr(e,t,r,n,o=!0){let i=r._zod.def,a=i.type;if(i.coerce)throw new nt(`coercion (z.coerce.${a}())`);let s=o||!!i.checks?.length,l;switch(a){case"string":l=Vpe(e,t,r,n,s);break;case"number":l=Hpe(e,r,n);break;case"boolean":l=Wpe(e,n);break;case"bigint":l=Zpe(e,r,n);break;case"symbol":l=Gpe(e,n);break;case"undefined":l=qpe(e,n);break;case"null":l=Kpe(e,n);break;case"any":case"unknown":l=n;break;case"never":e.write("return INVALID;"),l=n;break;case"void":l=Xpe(e,n);break;case"nan":l=Qpe(e,n);break;case"date":l=Ype(e,n);break;case"object":l=Jpe(e,t,r,n,s);break;case"optional":l=ehe(e,t,r,n,s);break;case"nullable":l=ohe(e,t,r,n,s);break;case"array":l=nhe(e,t,r,n,s);break;case"literal":l=ihe(e,t,r,n);break;case"enum":l=ahe(e,t,r,n);break;case"readonly":{let c=mq(e,t,r,n),d=Te(t);e.write(`const ${d} = Object.freeze(${c});`),l=d;break}case"success":mq(e,t,r,n),l="true";break;case"default":case"prefault":l=she(e,t,r,n);break;case"nonoptional":l=lhe(e,t,r,n);break;case"tuple":l=che(e,t,r,n);break;case"union":l=dhe(e,t,r,n);break;case"intersection":l=mhe(e,t,r,n);break;case"record":l=phe(e,t,r,n);break;case"map":l=ghe(e,t,r,n);break;case"set":l=vhe(e,t,r,n);break;case"file":l=xhe(e,n);break;case"template_literal":l=bhe(e,t,r,n);break;case"lazy":l=yhe(e,t,r,n);break;case"pipe":l=_he(e,t,r,n);break;case"custom":l=Ihe(e,t,r,n);break;case"transform":l=khe(e,t,r,n);break;case"catch":l=She(e,t,r,n);break;default:throw new nt(`schema type ${a}`)}return l===null?null:$pe(e,t,r,l)}function Vpe(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:xq(e,t,i,n,o)}function Hpe(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&vq(e,{format:n.format},r),r}function Wpe(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Zpe(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function Gpe(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function qpe(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Kpe(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function Xpe(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Qpe(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function Ype(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function Jpe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let a=i.shape,s=Object.keys(a),l=Object.getOwnPropertySymbols(a),c=l.length?[...s,...l]:s,d=v=>typeof v=="symbol"?Ne(t,v):Jo(v),u=v=>typeof v=="symbol"?`[${d(v)}]`:Jo(v),f=a;if(s.includes("__proto__"))throw new nt('object shape key "__proto__"');let m=new Map;for(let v of c){let _=f[v],I=d(v),S=Te(t);if(e.write(`const ${S} = ${n}[${I}];`),_._zod.optin!==void 0){let w=Te(t);e.write(`let ${w} = (() => {`),e.indented(P=>{let E=Eo(P,t,_,S);P.write(`return ${E};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${w} === INVALID) {`),e.indented(P=>{P.write(`if (${I} in ${n}) return INVALID;`),P.write(`${w} = undefined;`)}),e.write("}")):e.write(`if (${w} === INVALID) return INVALID;`),m.set(v,w)}else{rhe(_)&&e.write(`if (!(${I} in ${n})) return INVALID;`);let w=Eo(e,t,_,S,o);w!==null&&m.set(v,w)}}let p=i.catchall,h="none";if(p){let v=p._zod.def.type;if(v==="never"){let _=s.map(I=>`k !== ${Jo(I)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(v==="unknown"||v==="any")&&!p._zod.def.checks?.length?h="passthrough":h="schema"}let y=Te(t),x=c.some(v=>fq(f[v])||h5(f[v]));if(!o){if(h==="schema"){let v=s.length>0?Ne(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),v&&_.write(`if (${v}.has(k)) continue;`);let I=Te(t);_.write(`const ${I} = ${n}[k];`),Eo(_,t,p,I,!1)}),e.write("}")}return null}if(x){e.write(`const ${y} = {};`);for(let v of c){let _=d(v),I=m.get(v);h5(f[v])?e.write(`if (${_} in ${n}) ${y}[${_}] = ${I};`):fq(f[v])?e.write(`if (${I} !== undefined || ${_} in ${n}) ${y}[${_}] = ${I};`):e.write(`${y}[${_}] = ${I};`)}}else{let v=c.map(_=>`${u(_)}: ${m.get(_)}`).join(", ");e.write(`const ${y} = { ${v} };`)}if(h!=="none"){let v=s.length>0?Ne(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),v&&_.write(`if (${v}.has(k)) continue;`),h==="passthrough")_.write(`${y}[k] = ${n}[k];`);else{let I=Te(t);_.write(`const ${I} = ${n}[k];`);let S=Eo(_,t,p,I);_.write(`${y}[k] = ${S};`)}}),e.write("}")}return y}function ehe(e,t,r,n,o=!0){let i=r._zod.def;if(the(r))return tr(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let s=Te(t),l=Te(t);return e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(c=>{c.write(`const ${l} = (() => {`),c.indented(d=>{let u=tr(d,t,i.innerType,n);d.write(`return ${u};`)}),c.write("})();"),c.write(`if (${l} !== INVALID) ${s} = ${l};`)}),e.write("} else {"),e.indented(c=>{let d=tr(c,t,i.innerType,n);c.write(`${s} = ${d};`)}),e.write("}"),s}let a=o?Te(t):null;return a&&e.write(`let ${a};`),e.write(`if (${n} !== undefined) {`),e.indented(s=>{let l=tr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function the(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function rhe(e){return e._zod.optin===void 0&&Cu(e)}function Cu(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Cu(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Cu(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Cu):!0;case"intersection":return!t.left||!t.right?!0:Cu(t.left)&&Cu(t.right);case"pipe":return t.in?Cu(t.in):!0;default:return!0}}function h5(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function fq(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Cp(e)}function Cp(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Cp(t.innerType):!0;case"union":return t.options?t.options.some(Cp):!0;case"intersection":return!t.left||!t.right||Cp(t.left)||Cp(t.right);case"pipe":return t.out?Cp(t.out):!0;default:return!0}}function ohe(e,t,r,n,o=!0){let i=r._zod.def,a=o?Te(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${n} !== null) {`),e.indented(s=>{let l=tr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function nhe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`);let a=o?Te(t):null,s=Te(t),l=Te(t);return a&&e.write(`const ${a} = new Array(${n}.length);`),e.write(`for (let ${s} = 0; ${s} < ${n}.length; ${s}++) {`),e.indented(c=>{c.write(`const ${l} = ${n}[${s}];`);let d=Eo(c,t,i.element,l,o);a&&d!==null&&c.write(`${a}[${s}] = ${d};`)}),e.write("}"),a}function ihe(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let s=Ne(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}let a=i[0];if(typeof a=="number"&&Number.isNaN(a)){let s=Ne(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}if(typeof a=="string")e.write(`if (${n} !== ${Jo(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${n} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${n} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${n} !== ${a}n) return INVALID;`);else throw new nt(`literal type ${typeof a}`);return n}function ahe(e,t,r,n){let o=r._zod.values;if(!o)throw new nt("enum schema without enumerated values");let i=Ne(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function mq(e,t,r,n){let o=r._zod.def;return tr(e,t,o.innerType,n)}function she(e,t,r,n){let o=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return tr(e,t,o.innerType,n);let l=Ne(t,a),c=Te(t);return e.write(`let ${c} = ${n};`),e.write(`if (${n} === undefined) ${c} = ${l}();`),tr(e,t,o.innerType,c)}let s=Te(t);if(a){let l=Ne(t,a),c=Ne(t,Qv);e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(d=>{d.write(`${s} = ${c}(${l}());`)}),e.write("} else {"),e.indented(d=>{let u=tr(d,t,o.innerType,n);d.write(`${s} = ${u} === undefined ? ${c}(${l}()) : ${u};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(l=>{let c=tr(l,t,o.innerType,n);l.write(`${s} = ${c};`)}),e.write("}");return s}function lhe(e,t,r,n){let o=r._zod.def,i=tr(e,t,o.innerType,n),a=Te(t);return e.write(`const ${a} = ${i};`),e.write(`if (${a} === undefined) return INVALID;`),a}function che(e,t,r,n){let o=r._zod.def,i=o.items,a=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let s=pq(i,"optin"),l=pq(i,"optout");a?e.write(`if (${n}.length < ${s}) return INVALID;`):e.write(`if (${n}.length < ${s} || ${n}.length > ${i.length}) return INVALID;`);let c=Te(t);e.write(`const ${c} = [];`);for(let d=0;d<i.length;d++){let u=i[d];if(d>=l)e.write(`if (${c}.length === ${d}) {`),e.indented(f=>{f.write(`if (${d} < ${n}.length) {`),f.indented(m=>{let p=Te(t);m.write(`const ${p} = ${n}[${d}];`);let h=Eo(m,t,u,p);m.write(`${c}[${d}] = ${h};`)}),f.write("} else {"),f.indented(m=>{if(h5(u)){m.write(`${c}.length = ${d};`);return}let p=Te(t),h=Te(t);m.write(`const ${p} = undefined;`),m.write(`const ${h} = (() => {`),m.indented(y=>{let x=Eo(y,t,u,p);y.write(`return ${x};`)}),m.write("})();"),m.write(`if (${h} === INVALID || ${h} === undefined) ${c}.length = ${d};`),m.write(`else ${c}[${d}] = ${h};`)}),f.write("}")}),e.write("}");else{let f=Te(t);e.write(`const ${f} = ${n}[${d}];`);let m=Eo(e,t,u,f);e.write(`${c}[${d}] = ${m};`)}}if(a){let d=Te(t),u=Te(t);e.write(`for (let ${d} = ${i.length}; ${d} < ${n}.length; ${d}++) {`),e.indented(f=>{f.write(`const ${u} = ${n}[${d}];`);let m=Eo(f,t,a,u);f.write(`${c}[${d}] = ${m};`)}),e.write("}")}return c}function pq(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function dhe(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return uhe(e,t,o,n);if(o.inclusive===!1)throw new nt("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return tr(e,t,i[0],n);if(i.every(l=>l._zod.def.type==="literal"&&!l._zod.def.checks?.length)){let l=new Set(i.flatMap(d=>d._zod.def.values)),c=Ne(t,l);return e.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=Te(t);e.write(`let ${s};`);for(let l=0;l<i.length;l++){let c=i[l];l===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(d=>{let u=tr(d,t,c,n);d.write(`return ${u};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function uhe(e,t,r,n){if(r.unionFallback)throw new nt("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=Te(t),i=Te(t);e.write(`const ${o} = ${n}?.[${Jo(r.discriminator)}];`),e.write(`let ${i};`);let a=!0,s=new Set;for(let l of r.options){let c=l._zod.propValues?.[r.discriminator];if(!c||c.size===0)throw new nt("discriminated union option without static discriminator values");for(let f of c){if(s.has(f))throw new nt(`duplicate discriminator value ${String(f)}`);s.add(f)}let d=Array.from(c,f=>fhe(t,o,f)),u=a?"if":"else if";e.write(`${u} (${d.join(" || ")}) {`),e.indented(f=>{let m=tr(f,t,l,n);f.write(`${i} = ${m};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),i}function fhe(e,t,r){if(typeof r=="string")return`${t} === ${Jo(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=Ne(e,r);return`${t} === ${n}`}throw new nt(`literal discriminator value ${String(r)}`)}function mhe(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=Eo(e,t,o.left,n),a=Eo(e,t,o.right,n),s=Ne(t,wp),l=Te(t);return e.write(`const ${l} = ${s}(${i}, ${a});`),e.write(`if (!${l}.valid) return INVALID;`),`${l}.data`}function phe(e,t,r,n){let o=r._zod.def,i=Ne(t,Ii);e.write(`if (!${i}(${n})) return INVALID;`);let a=Te(t),s=Te(t),l=Te(t);e.write(`const ${a} = {};`);let c=o,d=c.partial?void 0:o.keyType._zod.values;if(d){let m=[];for(let h of d){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new nt(`record key value ${String(h)}`);let y=typeof h=="number"?h.toString():h;if(y==="__proto__")throw new nt('record key "__proto__"');m.push(y);let x=Ne(t,h),v=tr(e,t,o.keyType,x),_=Te(t);e.write(`const ${_} = ${n}[${hhe(t,y)}];`);let I=Eo(e,t,o.valueType,_);e.write(`${a}[${v}] = ${I};`)}let p=Ne(t,new Set(m));return e.write(`for (const ${s} in ${n}) {`),e.indented(h=>{h.write(`if (${p}.has(${s})) continue;`),c.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${n}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}let u=o.keyType._zod.def;if(!(u.type==="string"&&u.format===void 0&&!u.coerce&&(u.checks?.length??0)===0)){let m=o.mode==="loose",p=bS(o.keyType);p.definite===!1&&(t.definite=!1);let h=Ne(t,p),y=Ne(t,el),x=Te(t);return hq(e,t,n,s,v=>{v.write(`let ${x} = ${h}(${s});`),v.write(`if (${x} === INVALID && typeof ${s} === "string" && ${y}.test(${s})) ${x} = ${h}(Number(${s}));`),m?v.write(`if (${x} === INVALID) { ${a}[${s}] = ${n}[${s}]; continue; }`):v.write(`if (${x} === INVALID) return INVALID;`),v.write(`if (${x} === "__proto__") continue;`);let _=Te(t);v.write(`const ${_} = ${n}[${s}];`);let I=Eo(v,t,o.valueType,_);v.write(`${a}[${x}] = ${I};`)}),a}return hq(e,t,n,s,m=>{m.write(`const ${l} = ${n}[${s}];`);let p=Eo(m,t,o.valueType,l);m.write(`${a}[${s}] = ${p};`)},"return INVALID;"),a}function hq(e,t,r,n,o,i){let a=Ne(t,Object.prototype.propertyIsEnumerable),s=Te(t),l=Te(t),c=Te(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${l} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${c} = 0; ${c} < ${l}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${l}[${c}];`),d.write(`if (${n} === "__proto__" || !${a}.call(${r}, ${n})) continue;`),o(d)}),e.write("}"),e.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${s}[${c}];`),d.write(`if (!${a}.call(${r}, ${n})) continue;`),i?d.write(i):o(d)}),e.write("}")}function hhe(e,t){return typeof t=="string"?Jo(t):Ne(e,t)}function ghe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=Te(t),a=Te(t),s=Te(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${a}, ${s}] of ${n}) {`),e.indented(l=>{let c=tr(l,t,o.keyType,a),d=tr(l,t,o.valueType,s);l.write(`${i}.set(${c}, ${d});`)}),e.write("}"),i}function vhe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=Te(t),a=Te(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${a} of ${n}) {`),e.indented(s=>{let l=tr(s,t,o.valueType,a);s.write(`${i}.add(${l});`)}),e.write("}"),i}function xhe(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function bhe(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=Ne(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function yhe(e,t,r,n){let o=r._zod.def,i=Pu(t,o.getter),a=Ne(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(l=>{l.write(`const inner = ${i}();`),l.write(`${a}.parser = function(input) {`),l.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),l.write("};")}),e.write("}");let s=Te(t);return e.write(`const ${s} = ${a}.parser(${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function _he(e,t,r,n){let o=r._zod.def,i=tr(e,t,o.in,n);if(o.transform){if(Du(o.transform))throw new ia("z.compile: async transforms in pipes are not supported");let a=o.transform,l=Pu(t,d=>{let u={value:d,issues:[],addIssue:v5},f=a(d,u);return f instanceof Promise?tn:u.issues.length===0?f:tn}),c=Te(t);return e.write(`const ${c} = ${l}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),tr(e,t,o.out,c)}else return tr(e,t,o.out,i)}function Du(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Ihe(e,t,r,n){let o=r._zod.def;if(o.fn){if(Du(o.fn))throw new ia("z.compile: async custom predicates are not supported");let i=Pu(t,o.fn),a=Ne(t,p5),s=Te(t);e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new nt("custom schema without a predicate function");return n}function whe(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return tn;let o=n;return o.issues.length===0?o.value:t()}function She(e,t,r,n){let o=r._zod.def;if(!o.catchValue[kw])throw new nt("catch with a callback (only a constant catch value compiles)",!1);let i=Te(t);e.write(`let ${i} = (() => {`),e.indented(c=>{let d=Eo(c,t,o.innerType,n);c.write(`return ${d};`)}),e.write("})();");let a=Ne(t,o.innerType),s=Pu(t,o.catchValue),l=Ne(t,whe);return e.write(`if (${i} === INVALID) {`),e.indented(c=>{c.write(`${i} = ${l}(${a}, ${s}, ${n});`),c.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function khe(e,t,r,n){let o=r._zod.def;if(o.transform){if(Du(o.transform))throw new ia("z.compile: async transforms are not supported");let i=o.transform,s=Pu(t,c=>{let d={value:c,issues:[],addIssue:v5},u=i(c,d);return u instanceof Promise?tn:d.issues.length===0?u:tn}),l=Te(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}return n}function yS(e){return e.checks&&(e.checks=[...e.checks]),e}function x5(e,t){return new e(yS({type:"string",...ae(t)}))}function b5(e,t){return new e(yS({type:"string",coerce:!0,...ae(t)}))}function _S(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ae(t)})}function IS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ae(t)})}function wS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ae(t)})}function SS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ae(t)})}function kS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ae(t)})}function CS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ae(t)})}function Px(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ae(t)})}function PS(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ae(t)})}function DS(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ae(t)})}function RS(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ae(t)})}function ES(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ae(t)})}function TS(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ae(t)})}function $S(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ae(t)})}function AS(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ae(t)})}function OS(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ae(t)})}function zS(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ae(t)})}function y5(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ae(t)})}function NS(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ae(t)})}function FS(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ae(t)})}function LS(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ae(t)})}function MS(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ae(t)})}function BS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ae(t)})}function _5(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...ae(t)})}function I5(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...ae(t)})}function jS(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ae(t)})}var w5={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Dx(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ae(t)})}function Rx(e,t){return new e({type:"string",format:"date",check:"string_format",...ae(t)})}function Ex(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ae(t)})}function Tx(e,t){return new e({type:"string",format:"duration",check:"string_format",...ae(t)})}function S5(e,t){return new e(yS({type:"number",checks:[],...ae(t)}))}function k5(e,t){return new e(yS({type:"number",coerce:!0,checks:[],...ae(t)}))}function C5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ae(t)})}function P5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ae(t)})}function D5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ae(t)})}function R5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ae(t)})}function E5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ae(t)})}function T5(e,t){return new e({type:"boolean",...ae(t)})}function $5(e,t){return new e({type:"boolean",coerce:!0,...ae(t)})}function A5(e,t){return new e({type:"bigint",...ae(t)})}function O5(e,t){return new e({type:"bigint",coerce:!0,...ae(t)})}function z5(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ae(t)})}function N5(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ae(t)})}function F5(e,t){return new e({type:"symbol",...ae(t)})}function L5(e,t){return new e({type:"undefined",...ae(t)})}function M5(e,t){return new e({type:"null",...ae(t)})}function B5(e){return new e({type:"any"})}function j5(e){return new e({type:"unknown"})}function U5(e,t){return new e({type:"never",...ae(t)})}function V5(e,t){return new e({type:"void",...ae(t)})}function H5(e,t){return new e({type:"date",...ae(t)})}function W5(e,t){return new e({type:"date",coerce:!0,...ae(t)})}function Z5(e,t){return new e({type:"nan",...ae(t)})}function qa(e,t){return new Bw({check:"less_than",...ae(t),value:e,inclusive:!1})}function Wn(e,t){return new Bw({check:"less_than",...ae(t),value:e,inclusive:!0})}function Ka(e,t){return new jw({check:"greater_than",...ae(t),value:e,inclusive:!1})}function Zn(e,t){return new jw({check:"greater_than",...ae(t),value:e,inclusive:!0})}function US(e){return Ka(0,e)}function VS(e){return qa(0,e)}function HS(e){return Wn(0,e)}function WS(e){return Zn(0,e)}function Rc(e,t){return new ET({check:"multiple_of",...ae(t),value:e})}function Ec(e,t){return new AT({check:"max_size",...ae(t),maximum:e})}function Xa(e,t){return new OT({check:"min_size",...ae(t),minimum:e})}function Ru(e,t){return new zT({check:"size_equals",...ae(t),size:e})}function Eu(e,t){return new NT({check:"max_length",...ae(t),maximum:e})}function tl(e,t){return new FT({check:"min_length",...ae(t),minimum:e})}function Tu(e,t){return new LT({check:"length_equals",...ae(t),length:e})}function Pp(e,t){return new MT({check:"string_format",format:"regex",...ae(t),pattern:e})}function Dp(e){return new BT({check:"string_format",format:"lowercase",...ae(e)})}function Rp(e){return new jT({check:"string_format",format:"uppercase",...ae(e)})}function Ep(e,t){return new UT({check:"string_format",format:"includes",...ae(t),includes:e})}function Tp(e,t){return new VT({check:"string_format",format:"starts_with",...ae(t),prefix:e})}function $p(e,t){return new HT({check:"string_format",format:"ends_with",...ae(t),suffix:e})}function ZS(e,t,r){return new WT({check:"property",property:e,schema:t,...ae(r)})}function Ap(e,t){return new ZT({check:"properties",shape:e,...ae(t)})}function Op(e,t){return new GT({check:"mime_type",mime:e,...ae(t)})}function aa(e){return new qT({check:"overwrite",tx:e})}function zp(e){return aa(t=>t.normalize(e))}function Np(){return aa(e=>e.trim())}function Fp(){return aa(e=>e.toLowerCase())}function Lp(){return aa(e=>e.toUpperCase())}function Mp(){return aa(e=>AE(e))}function G5(e,t,r){return new e({type:"array",element:t,...ae(r)})}function Che(e,t,r){return new e({type:"union",options:t,...ae(r)})}function Phe(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ae(r)})}function Dhe(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ae(n)})}function Rhe(e,t,r){return new e({type:"intersection",left:t,right:r})}function Ehe(e,t,r,n){let o=r instanceof Me,i=o?n:r,a=o?r:null;return new e({type:"tuple",items:t,rest:a,...ae(i)})}function The(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ae(n)})}function $he(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ae(n)})}function Ahe(e,t,r){return new e({type:"set",valueType:t,...ae(r)})}function Ohe(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...ae(r)})}function zhe(e,t,r){return new e({type:"enum",entries:t,...ae(r)})}function Nhe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ae(r)})}function q5(e,t){return new e({type:"file",...ae(t)})}function Fhe(e,t){return new e({type:"transform",transform:t})}function Lhe(e,t){return new e({type:"optional",innerType:t})}function Mhe(e,t){return new e({type:"nullable",innerType:t})}function Bhe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Qv(r)}})}function jhe(e,t,r){return new e({type:"nonoptional",innerType:t,...ae(r)})}function Uhe(e,t){return new e({type:"success",innerType:t})}function Vhe(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:ME(r)})}function Hhe(e,t,r){return new e({type:"pipe",in:t,out:r})}function Whe(e,t){return new e({type:"readonly",innerType:t})}function Zhe(e,t,r){return new e({type:"template_literal",parts:t,...ae(r)})}function Ghe(e,t){return new e({type:"lazy",getter:t})}function qhe(e,t){return new e({type:"promise",innerType:t})}function K5(e,t,r){let n=ae(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function X5(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ae(r)})}function Q5(e,t){let r=bq(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(gp(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(gp(i))}},e(n.value,n)),t);return r}function bq(e,t){let r=new Dt({check:"custom",...ae(t)});return r._zod.check=e,r}function Y5(e){let t=new Dt({check:"describe"});return t._zod.onattach=[r=>{let n=go.get(r)??{};go.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function J5(e){let t=new Dt({check:"meta"});return t._zod.onattach=[r=>{let n=go.get(r)??{};go.add(r,{...n,...e})}],t._zod.check=()=>{},t}function eA(e,t){let r=ae(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(m=>typeof m=="string"?m.toLowerCase():m),o=o.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(n),a=new Set(o),s=e.Codec??yx,l=e.Boolean??xx,c=e.String??Su,d=new c({type:"string",error:r.error}),u=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:d,out:u,transform:((m,p)=>{let h=m;return r.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:a.has(h)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:p.value,inst:f,continue:!1}),{})}),reverseTransform:((m,p)=>m===!0?n[0]||"true":o[0]||"false"),error:r.error});return f._zod.bag.truthy=n,f._zod.bag.falsy=o,f._zod.bag.case=r.case??"insensitive",f}function $u(e,t,r,n={}){let o=ae(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function $x(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&ho(e,n,r[n]);return e}function Tc(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??go,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Nr(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function It(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,f,d)}let u=e._zod.parent;u&&(a.ref||(a.ref=u),It(u,t,d),t.seen.get(u).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&$x(a.schema,l),t.io==="input"&&rn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function yq(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function $c(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=n.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let o=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(a[0])?.id,f=e.external.uri??(p=>p);if(u)return{ref:f(u)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${yq(m)}`}}let l="#",c=`${l}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:l};let d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+yq(d)}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=o(a);s.def={...s.schema},c&&(s.defId=c);let d=s.schema;for(let u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
119
|
+
|
|
120
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function wq(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;wq(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var Sq=new Set(["type","properties","required","additionalProperties"]),_q=["oneOf","anyOf"];function Iq(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function tA(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!Sq.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let c of t){let d=c.properties?.[a]??Iq(c);d!=null&&(s.some(u=>JSON.stringify(u)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:tA(s)??{allOf:s};ho(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=Iq(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Khe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of Sq)if(o in e)return;let r=t.filter(o=>_q.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=tA(t);else{let o=r[0],i=_q.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>tA([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,$x(e,n))}function Ac(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);let m=e.seen.get(u),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):$x(c,p),$x(c,d),s._zod.parent===u)for(let y in c)y==="$ref"||y==="allOf"||y in d||delete c[y];if(p.$ref&&m.def)for(let y in c)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(c[y])===JSON.stringify(m.def[y])&&delete c[y]}let f=s._zod.parent;if(f&&f!==u){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let p in c)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(c[p])===JSON.stringify(m.def[p])&&delete c[p]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())wq(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let c of[l.schema,l.def]){let d=c?.allOf;if(!Array.isArray(d))continue;let u=s.get(d);u?u.push(c):s.set(d,[c])}for(let l of e.intersections)for(let c of s.get(l)??[])Khe(c)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}$x(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,ho(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Bp(t,"input",e.processors),output:Bp(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function rn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return rn(n.element,r);if(n.type==="set")return rn(n.valueType,r);if(n.type==="lazy")return rn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return rn(n.innerType,r);if(n.type==="intersection")return rn(n.left,r)||rn(n.right,r);if(n.type==="record"||n.type==="map")return rn(n.keyType,r)||rn(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:rn(n.in,r)||rn(n.out,r);if(n.type==="object"){for(let o in n.shape)if(rn(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(rn(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(rn(o,r))return!0;return!!(n.rest&&rn(n.rest,r))}return!1}var rA=(e,t={})=>r=>{let n=Tc({...r,processors:t});return It(e,n),$c(n,e),Ac(n,e)},Bp=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=Tc({...o??{},target:i,io:t,processors:r});return It(e,a),$c(a,e),Ac(a,e)};var jp=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Up=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},kq=(e,t)=>{jp(e,"minimum",t),Up(e,"maximum",t)},Rq=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Eq=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Tq=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},$q=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Cq=(e,t)=>jp(e,"minimum",t.minimum),Pq=(e,t)=>Up(e,"maximum",t.maximum),Dq=e=>(t,r)=>{$q(t,r.format);let[n,o]=e[r.format];jp(t,"minimum",n),Up(t,"maximum",o)},Xhe={greater_than:(e,t)=>jp(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Up(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Rq(e,t.value),number_format:Dq(Jv),bigint_format:Dq(ex),min_length:Cq,max_length:Pq,length_equals:(e,t)=>kq(e,t.length),min_size:Cq,max_size:Pq,size_equals:(e,t)=>kq(e,t.size),string_format:(e,t)=>{$q(e,t.format),t.pattern&&Eq(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Tq(e,t.mime)};function Fr(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)Xhe[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&jp(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&jp(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Up(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Up(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Rq(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&Tq(t,o.mime);for(let i of o.patterns??[])Eq(t,i);return t}var Qhe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Yhe=new Map([[Qw,dT],[vx,uT]]),Aq=e=>Yhe.get(e)??e,iA=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:d}=Fr(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=Qhe[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){let u=[...l].map(Aq);u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},aA=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=Fr(e);o.type=d?"integer":"number";let u=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(u?m?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c:typeof i=="number"&&(o.minimum=i),f?m?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let p=new Set;for(let x of s)Number.isFinite(x)&&x!==0?p.add(Math.abs(x)):Nr(e,t,o,n,`A multipleOf divisor of ${x} cannot be represented in JSON Schema`);let[h,...y]=p;h!==void 0&&(o.multipleOf=h),y.length&&(o.allOf=[...o.allOf??[],...y.map(x=>({multipleOf:x}))])}},sA=(e,t,r,n)=>{r.type="boolean"},lA=(e,t,r,n)=>{Nr(e,t,r,n,"BigInt cannot be represented in JSON Schema")},cA=(e,t,r,n)=>{Nr(e,t,r,n,"Symbols cannot be represented in JSON Schema")},dA=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},uA=(e,t,r,n)=>{Nr(e,t,r,n,"Undefined cannot be represented in JSON Schema")},fA=(e,t,r,n)=>{Nr(e,t,r,n,"Void cannot be represented in JSON Schema")},mA=(e,t,r,n)=>{r.not={}},pA=(e,t,r,n)=>{},hA=(e,t,r,n)=>{},gA=(e,t,r,n)=>{Nr(e,t,r,n,"Date cannot be represented in JSON Schema")},vA=(e,t,r,n)=>{let o=e._zod.def,i=fp(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},xA=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Nr(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Nr(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},bA=(e,t,r,n)=>{Nr(e,t,r,n,"NaN cannot be represented in JSON Schema")},yA=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},_A=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Fr(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},IA=(e,t,r,n)=>{r.type="boolean"},wA=(e,t,r,n)=>{Nr(e,t,r,n,"Custom types cannot be represented in JSON Schema")},SA=(e,t,r,n)=>{Nr(e,t,r,n,"Function types cannot be represented in JSON Schema")},kA=(e,t,r,n)=>{Nr(e,t,r,n,"Transforms cannot be represented in JSON Schema")},CA=(e,t,r,n)=>{Nr(e,t,r,n,"Map cannot be represented in JSON Schema")},PA=(e,t,r,n)=>{Nr(e,t,r,n,"Set cannot be represented in JSON Schema")},DA=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Fr(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=It(i.element,t,{...n,path:[...n.path,"items"]})};function Ax(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Ax(t.out):t.type==="catch"?Ax(t.innerType):e._zod.optin}var RA=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Nr(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let c in a)ho(o.properties,c,It(a[c],t,{...n,path:[...n.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let d=i.shape[c];(t.io==="input"?Ax(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=It(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},qS=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>It(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},EA=(e,t,r,n)=>{let o=e._zod.def,i=It(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=It(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},TA=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((h,y)=>It(h,t,{...n,path:[...n.path,a,y]})),c=i.rest?It(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let h=i.items[d-1];if(!(t.io==="input"?Ax(h)!==void 0:h._zod.optout==="optional"))break;d--}let u=i.items.length,f=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,f?o.items=!1:c&&(o.items=c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},c&&o.items.anyOf.push(c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):(o.items=l,f?o.additionalItems=!1:c&&(o.additionalItems=c),d>0&&(o.minItems=d),f&&(o.maxItems=u));let{minimum:m,maximum:p}=Fr(e);typeof m=="number"&&(o.minItems=m),typeof p=="number"&&(o.maxItems=p)};function oA(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let h=oA(e,p,r);return h===p?t:h}for(let p of["anyOf","oneOf"]){let h=t[p];if(!Array.isArray(h))continue;let y=h.map(x=>oA(e,x,r));y.some((x,v)=>x!==h[v])&&(t={...t,[p]:y})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(p=>p==="number"||p==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(p=>typeof p=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:f,...m}=t;return m.enum?m.enum=m.enum.map(p=>typeof p=="number"?String(p):p):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?el:dx).source)),m}var nA=new WeakMap;function Jhe(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of nA.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=oA(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var $A=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Fr(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=It(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of s)ho(o.patternProperties,Aq(u).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=It(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=nA.get(t);d||(d=[],nA.set(t,d),t.deferred.push(()=>Jhe(t))),d.push(e)}o.additionalProperties=It(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,c=t.io==="input"&&Ax(i.valueType)!==void 0;if(l&&!i.partial&&!c){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d.map(String))}},AA=(e,t,r,n)=>{let o=e._zod.def,i=It(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},OA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},zA=Symbol();function Oq(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Nr(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),zA):JSON.parse(a)}var NA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=Oq(o.defaultValue,e,t,r,n);a!==zA&&(r.default=a)},FA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=Oq(o.defaultValue,e,t,r,n);a!==zA&&(r._prefault=a)},LA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Nr(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},MA=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;It(a,t,n);let s=t.seen.get(e);s.ref=a},BA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},jA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},KS=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},UA=(e,t,r,n)=>{let o=e._zod.innerType;It(o,t,n);let i=t.seen.get(e);i.ref=o},GS={string:iA,number:aA,boolean:sA,bigint:lA,symbol:cA,null:dA,undefined:uA,void:fA,never:mA,any:pA,unknown:hA,date:gA,enum:vA,literal:xA,nan:bA,template_literal:yA,file:_A,success:IA,custom:wA,function:SA,transform:kA,map:CA,set:PA,array:DA,object:RA,union:qS,intersection:EA,tuple:TA,record:$A,nullable:AA,nonoptional:OA,default:NA,prefault:FA,catch:LA,pipe:MA,readonly:BA,promise:jA,optional:KS,lazy:UA};function XS(e,t){if("_idmap"in e){let n=e,o=Tc({...t,processors:GS}),i={};for(let l of n._idmap.entries()){let[c,d]=l;It(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[c,d]=l;$c(o,d),ho(a,c,Ac(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=Tc({...t,processors:GS});return It(e,r),$c(r,e),Ac(r,e)}var QS=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Tc({processors:GS,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return It(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,$c(this.ctx,t);let n=Ac(this.ctx,t),{"~standard":o,...i}=n;return i}};var zq={};var Xp={};hs(Xp,{ZodAny:()=>dO,ZodArray:()=>pO,ZodBase64:()=>g1,ZodBase64URL:()=>v1,ZodBigInt:()=>qp,ZodBigIntFormat:()=>y1,ZodBoolean:()=>Gp,ZodCIDRv4:()=>p1,ZodCIDRv6:()=>h1,ZodCUID:()=>s1,ZodCUID2:()=>l1,ZodCatch:()=>zO,ZodCodec:()=>Vx,ZodCreditCard:()=>rO,ZodCustom:()=>Hx,ZodCustomStringFormat:()=>Nu,ZodDate:()=>Fx,ZodDefault:()=>RO,ZodDiscriminatedUnion:()=>gO,ZodE164:()=>x1,ZodEmail:()=>o1,ZodEmoji:()=>i1,ZodEnum:()=>Hp,ZodExactOptional:()=>S1,ZodFile:()=>kO,ZodFunction:()=>WO,ZodGUID:()=>n1,ZodIBAN:()=>oO,ZodIPv4:()=>f1,ZodIPv6:()=>m1,ZodISODate:()=>zc,ZodISODateTime:()=>Oc,ZodISODuration:()=>Fc,ZodISOTime:()=>Nc,ZodInstanceOf:()=>qO,ZodIntersection:()=>vO,ZodJWT:()=>b1,ZodKSUID:()=>u1,ZodLazy:()=>UO,ZodLiteral:()=>SO,ZodMAC:()=>tO,ZodMap:()=>IO,ZodNaN:()=>FO,ZodNanoID:()=>a1,ZodNever:()=>fO,ZodNonOptional:()=>k1,ZodNull:()=>lO,ZodNullable:()=>DO,ZodNumber:()=>Zp,ZodNumberFormat:()=>Fu,ZodObject:()=>Mx,ZodOptional:()=>jx,ZodPipe:()=>Ux,ZodPrefault:()=>TO,ZodPreprocess:()=>LO,ZodPromise:()=>HO,ZodReadonly:()=>MO,ZodRecord:()=>Vp,ZodSet:()=>wO,ZodString:()=>Wp,ZodStringFormat:()=>Ct,ZodSuccess:()=>OO,ZodSymbol:()=>aO,ZodTemplateLiteral:()=>jO,ZodTransform:()=>CO,ZodTuple:()=>bO,ZodType:()=>We,ZodULID:()=>c1,ZodURL:()=>Nx,ZodUUID:()=>Qa,ZodUndefined:()=>sO,ZodUnion:()=>Bx,ZodUnknown:()=>uO,ZodVoid:()=>mO,ZodXID:()=>d1,ZodXor:()=>hO,_ZodString:()=>r1,_default:()=>EO,_function:()=>GK,any:()=>SK,array:()=>Lx,base64:()=>nK,base64url:()=>iK,bigint:()=>bK,boolean:()=>iO,catch:()=>NO,check:()=>qK,cidrv4:()=>rK,cidrv6:()=>oK,codec:()=>VK,creditCard:()=>sK,cuid:()=>qq,cuid2:()=>Kq,currencyCode:()=>mK,custom:()=>KK,date:()=>CK,describe:()=>XK,discriminatedUnion:()=>$K,e164:()=>aK,email:()=>Lq,emoji:()=>Zq,enum:()=>I1,exactOptional:()=>PO,file:()=>MK,float32:()=>hK,float64:()=>gK,function:()=>GK,guid:()=>Mq,hash:()=>pK,hex:()=>fK,hostname:()=>uK,httpUrl:()=>Wq,iban:()=>lK,instanceof:()=>YK,int:()=>e1,int32:()=>vK,int64:()=>yK,intersection:()=>xO,invertCodec:()=>HK,ipv4:()=>Jq,ipv6:()=>tK,json:()=>eX,jwt:()=>cK,keyof:()=>PK,ksuid:()=>Yq,lazy:()=>VO,literal:()=>LK,looseObject:()=>EK,looseRecord:()=>OK,mac:()=>eK,map:()=>zK,meta:()=>QK,nan:()=>UK,nanoid:()=>Gq,nativeEnum:()=>FK,never:()=>_1,nonoptional:()=>AO,null:()=>cO,nullable:()=>zx,nullish:()=>BK,number:()=>nO,object:()=>DK,optional:()=>Ou,partialRecord:()=>AK,pipe:()=>t1,prefault:()=>$O,preprocess:()=>tX,promise:()=>ZK,readonly:()=>BO,record:()=>_O,refine:()=>ZO,set:()=>NK,strictObject:()=>RK,string:()=>Ox,stringFormat:()=>dK,stringbool:()=>JK,success:()=>jK,superRefine:()=>GO,symbol:()=>IK,templateLiteral:()=>WK,transform:()=>w1,tuple:()=>yO,uint32:()=>xK,uint64:()=>_K,ulid:()=>Xq,undefined:()=>wK,union:()=>Kp,unknown:()=>Au,url:()=>Hq,uuid:()=>Bq,uuidv4:()=>jq,uuidv6:()=>Uq,uuidv7:()=>Vq,void:()=>kK,xid:()=>Qq,xor:()=>TK});var YS={};hs(YS,{endsWith:()=>$p,gt:()=>Ka,gte:()=>Zn,includes:()=>Ep,length:()=>Tu,lowercase:()=>Dp,lt:()=>qa,lte:()=>Wn,maxLength:()=>Eu,maxSize:()=>Ec,mime:()=>Op,minLength:()=>tl,minSize:()=>Xa,multipleOf:()=>Rc,negative:()=>VS,nonnegative:()=>WS,nonpositive:()=>HS,normalize:()=>zp,overwrite:()=>aa,positive:()=>US,properties:()=>Ap,property:()=>ZS,regex:()=>Pp,size:()=>Ru,slugify:()=>Mp,startsWith:()=>Tp,toLowerCase:()=>Fp,toUpperCase:()=>Lp,trim:()=>Np,uppercase:()=>Rp});var Nq=new WeakSet([Object.prototype,Error.prototype]);function JS(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var Fq=(e,t)=>{nx.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);Nq.has(r)||(Nq.add(r),JS(r,"format",n=>o=>ax(n,o)),JS(r,"flatten",n=>o=>ix(n,o)),JS(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,mp,2)}),JS(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,mp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},tge=j("ZodError",Fq),En=j("ZodError",Fq,void 0,{Parent:Error});var VA=vp(En),HA=bp(En),WA=yp(En),ZA=_p(En),GA=Dw(En),qA=Rw(En),KA=Ew(En),XA=Tw(En),QA=$w(En),YA=Aw(En),JA=Ow(En),eO=zw(En);function oge(){Qr.localeError||hr(mS())}function zu(){Qr.memoizer||hr({memoizer:Sx()})}var We=j("ZodType",(e,t)=>(oge(),Me.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Q.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return yt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(ZO(e,t))},superRefine(e,t){return this.check(GO(e,t))},overwrite(e){return this.check(aa(e))},optional(){return Ou(this)},exactOptional(){return PO(this)},nullable(){return zx(this)},nullish(){return Ou(zx(this))},nonoptional(e){return AO(this,e)},array(){return Lx(this)},or(e){return Kp([this,e])},and(e){return xO(this,e)},transform(e){return t1(this,w1(e))},default(e){return EO(this,e)},prefault(e){return $O(this,e)},catch(e){return NO(this,e)},pipe(e){return t1(this,e)},readonly(){return BO(this)},describe(e){let t=this.clone();return go.add(t,{description:e}),t},meta(...e){if(e.length===0)return go.get(this);let t=this.clone();return go.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Q.hide(this,"~standard",{...Zw(this),jsonSchema:{input:Bp(this,"input"),output:Bp(this,"output")}})},set"~standard"(e){Q.own(this,"~standard",e)},parse:function e(t,r){return VA(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await HA(this,t,r,{callee:e})},safeParse(e,t){return WA(this,e,t)},async safeParseAsync(e,t){return ZA(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Q.own(this,"spa",e)},validate(e,t){return sx(this,e,t)},validateAsync(e,t){return lx(this,e,t)},encode:function e(t,r){return GA(this,t,r,{callee:e})},decode:function e(t,r){return qA(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await KA(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await XA(this,t,r,{callee:e})},safeEncode(e,t){return QA(this,e,t)},safeDecode(e,t){return YA(this,e,t)},async safeEncodeAsync(e,t){return JA(this,e,t)},async safeDecodeAsync(e,t){return eO(this,e,t)},toJSONSchema(e){return rA(this,{})(e)},get description(){return go.get(this)?.description},get _def(){return this._zod.def}}),r1=j("_ZodString",(e,t)=>{Su.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>iA(e,r,n,o)},Q.derived({format:e=>Fr(e).format??null,minLength:e=>Fr(e).minimum??null,maxLength:e=>Fr(e).maximum??null},{regex(...e){return this.check(Pp(...e))},includes(...e){return this.check(Ep(...e))},startsWith(...e){return this.check(Tp(...e))},endsWith(...e){return this.check($p(...e))},min(...e){return this.check(tl(...e))},max(...e){return this.check(Eu(...e))},length(...e){return this.check(Tu(...e))},nonempty(...e){return this.check(tl(1,...e))},lowercase(e){return this.check(Dp(e))},uppercase(e){return this.check(Rp(e))},trim(){return this.check(Np())},normalize(...e){return this.check(zp(...e))},toLowerCase(){return this.check(Fp())},toUpperCase(){return this.check(Lp())},slugify(){return this.check(Mp())}})),Wp=j("ZodString",(e,t)=>{Su.init(e,t),r1.init(e,t)},{email(e){return this.check(_S(o1,e))},url(e){return this.check(Px(Nx,e))},jwt(e){return this.check(jS(b1,e))},emoji(e){return this.check(PS(i1,e))},guid(e){return this.check(IS(n1,e))},uuid(e){return this.check(wS(Qa,e))},uuidv4(e){return this.check(SS(Qa,e))},uuidv6(e){return this.check(kS(Qa,e))},uuidv7(e){return this.check(CS(Qa,e))},nanoid(e){return this.check(DS(a1,e))},cuid(e){return this.check(RS(s1,e))},cuid2(e){return this.check(ES(l1,e))},ulid(e){return this.check(TS(c1,e))},base64(e){return this.check(LS(g1,e))},base64url(e){return this.check(MS(v1,e))},xid(e){return this.check($S(d1,e))},ksuid(e){return this.check(AS(u1,e))},ipv4(e){return this.check(OS(f1,e))},ipv6(e){return this.check(zS(m1,e))},cidrv4(e){return this.check(NS(p1,e))},cidrv6(e){return this.check(FS(h1,e))},e164(e){return this.check(BS(x1,e))},datetime(e){return this.check(Dx(Oc,e))},date(e){return this.check(Rx(zc,e))},time(e){return this.check(Ex(Nc,e))},duration(e){return this.check(Tx(Fc,e))}});function Ox(e){return x5(Wp,e)}var Ct=j("ZodStringFormat",(e,t)=>{_t.init(e,t),r1.init(e,t)}),Oc=j("ZodISODateTime",(e,t)=>{d$.init(e,t),Ct.init(e,t)}),zc=j("ZodISODate",(e,t)=>{u$.init(e,t),Ct.init(e,t)}),Nc=j("ZodISOTime",(e,t)=>{f$.init(e,t),Ct.init(e,t)}),Fc=j("ZodISODuration",(e,t)=>{m$.init(e,t),Ct.init(e,t)}),o1=j("ZodEmail",(e,t)=>{JT.init(e,t),Ct.init(e,t)});function Lq(e){return _S(o1,e)}var n1=j("ZodGUID",(e,t)=>{QT.init(e,t),Ct.init(e,t)});function Mq(e){return IS(n1,e)}var Qa=j("ZodUUID",(e,t)=>{YT.init(e,t),Ct.init(e,t)});function Bq(e){return wS(Qa,e)}function jq(e){return SS(Qa,e)}function Uq(e){return kS(Qa,e)}function Vq(e){return CS(Qa,e)}var Nx=j("ZodURL",(e,t)=>{r$.init(e,t),Ct.init(e,t)});function Hq(e){return Px(Nx,e)}function Wq(e){return Px(Nx,{protocol:cx,hostname:mT,...Q.normalizeParams(e)})}var i1=j("ZodEmoji",(e,t)=>{o$.init(e,t),Ct.init(e,t)});function Zq(e){return PS(i1,e)}var a1=j("ZodNanoID",(e,t)=>{n$.init(e,t),Ct.init(e,t)});function Gq(e){return DS(a1,e)}var s1=j("ZodCUID",(e,t)=>{i$.init(e,t),Ct.init(e,t)});function qq(e){return RS(s1,e)}var l1=j("ZodCUID2",(e,t)=>{a$.init(e,t),Ct.init(e,t)});function Kq(e){return ES(l1,e)}var c1=j("ZodULID",(e,t)=>{s$.init(e,t),Ct.init(e,t)});function Xq(e){return TS(c1,e)}var d1=j("ZodXID",(e,t)=>{l$.init(e,t),Ct.init(e,t)});function Qq(e){return $S(d1,e)}var u1=j("ZodKSUID",(e,t)=>{c$.init(e,t),Ct.init(e,t)});function Yq(e){return AS(u1,e)}var f1=j("ZodIPv4",(e,t)=>{p$.init(e,t),Ct.init(e,t)});function Jq(e){return OS(f1,e)}var tO=j("ZodMAC",(e,t)=>{g$.init(e,t),Ct.init(e,t)});function eK(e){return y5(tO,e)}var m1=j("ZodIPv6",(e,t)=>{h$.init(e,t),Ct.init(e,t)});function tK(e){return zS(m1,e)}var p1=j("ZodCIDRv4",(e,t)=>{v$.init(e,t),Ct.init(e,t)});function rK(e){return NS(p1,e)}var h1=j("ZodCIDRv6",(e,t)=>{x$.init(e,t),Ct.init(e,t)});function oK(e){return FS(h1,e)}var g1=j("ZodBase64",(e,t)=>{b$.init(e,t),Ct.init(e,t)});function nK(e){return LS(g1,e)}var v1=j("ZodBase64URL",(e,t)=>{y$.init(e,t),Ct.init(e,t)});function iK(e){return MS(v1,e)}var x1=j("ZodE164",(e,t)=>{_$.init(e,t),Ct.init(e,t)});function aK(e){return BS(x1,e)}var rO=j("ZodCreditCard",(e,t)=>{I$.init(e,t),Ct.init(e,t)});function sK(e){return _5(rO,e)}var oO=j("ZodIBAN",(e,t)=>{w$.init(e,t),Ct.init(e,t)});function lK(e){return I5(oO,e)}var b1=j("ZodJWT",(e,t)=>{S$.init(e,t),Ct.init(e,t)});function cK(e){return jS(b1,e)}var Nu=j("ZodCustomStringFormat",(e,t)=>{k$.init(e,t),Ct.init(e,t)});function dK(e,t,r={}){return $u(Nu,e,t,r)}function uK(e){return $u(Nu,"hostname",fT,e)}function fK(e){return $u(Nu,"hex",PT,e)}function mK(e){return $u(Nu,"currency_code",hT,e)}function pK(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=Si[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return $u(Nu,n,o,t)}var Zp=j("ZodNumber",(e,t)=>{rS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aA(e,r,n,o),e.isFinite=!0},Q.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Fr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Fr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Fr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Fr(e).format??null},{gt(e,t){return this.check(Ka(e,t))},gte(e,t){return this.check(Zn(e,t))},min(e,t){return this.check(Zn(e,t))},lt(e,t){return this.check(qa(e,t))},lte(e,t){return this.check(Wn(e,t))},max(e,t){return this.check(Wn(e,t))},int(e){return this.check(e1(e))},safe(e){return this.check(e1(e))},positive(e){return this.check(Ka(0,e))},nonnegative(e){return this.check(Zn(0,e))},negative(e){return this.check(qa(0,e))},nonpositive(e){return this.check(Wn(0,e))},multipleOf(e,t){return this.check(Rc(e,t))},step(e,t){return this.check(Rc(e,t))},finite(){return this}}));function nO(e){return S5(Zp,e)}var Fu=j("ZodNumberFormat",(e,t)=>{C$.init(e,t),Zp.init(e,t)});function e1(e){return C5(Fu,e)}function hK(e){return P5(Fu,e)}function gK(e){return D5(Fu,e)}function vK(e){return R5(Fu,e)}function xK(e){return E5(Fu,e)}var Gp=j("ZodBoolean",(e,t)=>{xx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sA(e,r,n,o)});function iO(e){return T5(Gp,e)}var qp=j("ZodBigInt",(e,t)=>{oS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lA(e,r,n,o)},Q.derived({minValue:e=>Fr(e).minimum??null,maxValue:e=>Fr(e).maximum??null,format:e=>Fr(e).format??null},{gte(e,t){return this.check(Zn(e,t))},min(e,t){return this.check(Zn(e,t))},gt(e,t){return this.check(Ka(e,t))},lt(e,t){return this.check(qa(e,t))},lte(e,t){return this.check(Wn(e,t))},max(e,t){return this.check(Wn(e,t))},positive(e){return this.check(Ka(BigInt(0),e))},negative(e){return this.check(qa(BigInt(0),e))},nonpositive(e){return this.check(Wn(BigInt(0),e))},nonnegative(e){return this.check(Zn(BigInt(0),e))},multipleOf(e,t){return this.check(Rc(e,t))}}));function bK(e){return A5(qp,e)}var y1=j("ZodBigIntFormat",(e,t)=>{P$.init(e,t),qp.init(e,t)});function yK(e){return z5(y1,e)}function _K(e){return N5(y1,e)}var aO=j("ZodSymbol",(e,t)=>{D$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cA(e,r,n,o)});function IK(e){return F5(aO,e)}var sO=j("ZodUndefined",(e,t)=>{R$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uA(e,r,n,o)});function wK(e){return L5(sO,e)}var lO=j("ZodNull",(e,t)=>{E$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dA(e,r,n,o)});function cO(e){return M5(lO,e)}var dO=j("ZodAny",(e,t)=>{T$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pA(e,r,n,o)});function SK(){return B5(dO)}var uO=j("ZodUnknown",(e,t)=>{$$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hA(e,r,n,o)});function Au(){return j5(uO)}var fO=j("ZodNever",(e,t)=>{A$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mA(e,r,n,o)});function _1(e){return U5(fO,e)}var mO=j("ZodVoid",(e,t)=>{O$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fA(e,r,n,o)});function kK(e){return V5(mO,e)}var Fx=j("ZodDate",(e,t)=>{z$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gA(e,r,n,o),e.min=(r,n)=>e.check(Zn(r,n)),e.max=(r,n)=>e.check(Wn(r,n))},Q.derived({minDate:e=>{let{minimum:t}=Fr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Fr(e);return t?new Date(t):null}},{}));function CK(e){return H5(Fx,e)}var pO=j("ZodArray",(e,t)=>{zu(),N$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>DA(e,r,n,o),e.element=t.element},{min(e,t){return this.check(tl(e,t))},nonempty(e){return this.check(tl(1,e))},max(e,t){return this.check(Eu(e,t))},length(e,t){return this.check(Tu(e,t))},unwrap(){return this.element}});function Lx(e,t){return G5(pO,e,t)}function PK(e){let t=e._zod.def.shape;return I1(Object.keys(t))}var Mx=j("ZodObject",(e,t)=>{zu(),F$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>RA(e,r,n,o),Q.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return I1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Q.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Q.mergeDefs(this._zod.def,{catchall:Au()}))},loose(){return this.clone(Q.mergeDefs(this._zod.def,{catchall:Au()}))},strict(){return this.clone(Q.mergeDefs(this._zod.def,{catchall:_1()}))},strip(){return this.clone(Q.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return Q.extend(this,e)},safeExtend(e){return Q.safeExtend(this,e)},merge(e){return Q.merge(this,e)},pick(e){return Q.pick(this,e)},omit(e){return Q.omit(this,e)},partial(...e){return Q.partial(jx,this,e[0])},exactPartial(...e){return Q.partial(S1,this,e[0],"exactPartial")},required(...e){return Q.required(k1,this,e[0])}});function DK(e,t){let r={type:"object",shape:e??{},...Q.normalizeParams(t)};return new Mx(r)}function RK(e,t){return new Mx({type:"object",shape:e,catchall:_1(),...Q.normalizeParams(t)})}function EK(e,t){return new Mx({type:"object",shape:e,catchall:Au(),...Q.normalizeParams(t)})}var Bx=j("ZodUnion",(e,t)=>{bx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qS(e,r,n,o),e.options=t.options});function Kp(e,t){return new Bx({type:"union",options:e,...Q.normalizeParams(t)})}var hO=j("ZodXor",(e,t)=>{Bx.init(e,t),L$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qS(e,r,n,o),e.options=t.options});function TK(e,t){return new hO({type:"union",options:e,inclusive:!1,...Q.normalizeParams(t)})}var gO=j("ZodDiscriminatedUnion",(e,t)=>{Bx.init(e,t),B$.init(e,t)});function $K(e,t,r){return new gO({type:"union",options:t,discriminator:e,...Q.normalizeParams(r)})}var vO=j("ZodIntersection",(e,t)=>{j$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>EA(e,r,n,o)});function xO(e,t){return new vO({type:"intersection",left:e,right:t})}var bO=j("ZodTuple",(e,t)=>{zu(),nS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>TA(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new jx({type:"optional",innerType:t}))})}});function yO(e,t,r){let n=t instanceof Me,o=n?r:t,i=n?t:null;return new bO({type:"tuple",items:e,rest:i,...Q.normalizeParams(o)})}var Vp=j("ZodRecord",(e,t)=>{zu(),U$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$A(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function _O(e,t,r){return!t||!t._zod?new Vp({type:"record",keyType:Ox(),valueType:e,...Q.normalizeParams(t)}):new Vp({type:"record",keyType:e,valueType:t,...Q.normalizeParams(r)})}function AK(e,t,r){return new Vp({type:"record",keyType:e,valueType:t,...Q.normalizeParams(r),partial:!0})}function OK(e,t,r){return new Vp({type:"record",keyType:e,valueType:t,mode:"loose",...Q.normalizeParams(r)})}var IO=j("ZodMap",(e,t)=>{zu(),V$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>CA(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Xa(...r)),e.nonempty=r=>e.check(Xa(1,r)),e.max=(...r)=>e.check(Ec(...r)),e.size=(...r)=>e.check(Ru(...r))});function zK(e,t,r){return new IO({type:"map",keyType:e,valueType:t,...Q.normalizeParams(r)})}var wO=j("ZodSet",(e,t)=>{zu(),H$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>PA(e,r,n,o),e.min=(...r)=>e.check(Xa(...r)),e.nonempty=r=>e.check(Xa(1,r)),e.max=(...r)=>e.check(Ec(...r)),e.size=(...r)=>e.check(Ru(...r))});function NK(e,t){return new wO({type:"set",valueType:e,...Q.normalizeParams(t)})}var Hp=j("ZodEnum",(e,t)=>{W$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,o,i)=>vA(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Hp({...t,checks:[],...Q.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Hp({...t,checks:[],...Q.normalizeParams(o),entries:i})}});function I1(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Hp({type:"enum",entries:r,...Q.normalizeParams(t)})}function FK(e,t){return new Hp({type:"enum",entries:e,...Q.normalizeParams(t)})}var SO=j("ZodLiteral",(e,t)=>{Z$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xA(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function LK(e,t){return new SO({type:"literal",values:Array.isArray(e)?e:[e],...Q.normalizeParams(t)})}var kO=j("ZodFile",(e,t)=>{G$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_A(e,r,n,o),e.min=(r,n)=>e.check(Xa(r,n)),e.max=(r,n)=>e.check(Ec(r,n)),e.mime=(r,n)=>e.check(Op(Array.isArray(r)?r:[r],n))});function MK(e){return q5(kO,e)}var CO=j("ZodTransform",(e,t)=>{zu(),q$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kA(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Dc(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Q.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Q.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function w1(e){return new CO({type:"transform",transform:e})}var jx=j("ZodOptional",(e,t)=>{iS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>KS(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ou(e){return new jx({type:"optional",innerType:e})}var S1=j("ZodExactOptional",(e,t)=>{K$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>KS(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function PO(e){return new S1({type:"optional",innerType:e})}var DO=j("ZodNullable",(e,t)=>{X$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>AA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function zx(e){return new DO({type:"nullable",innerType:e})}function BK(e){return Ou(zx(e))}var RO=j("ZodDefault",(e,t)=>{Q$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>NA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function EO(e,t){return new RO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}var TO=j("ZodPrefault",(e,t)=>{Y$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>FA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function $O(e,t){return new TO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Q.shallowClone(t)}})}var k1=j("ZodNonOptional",(e,t)=>{J$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>OA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function AO(e,t){return new k1({type:"nonoptional",innerType:e,...Q.normalizeParams(t)})}var OO=j("ZodSuccess",(e,t)=>{e5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>IA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jK(e){return new OO({type:"success",innerType:e})}var zO=j("ZodCatch",(e,t)=>{t5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>LA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function NO(e,t){return new zO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Q.constantCatch(t)})}var FO=j("ZodNaN",(e,t)=>{r5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bA(e,r,n,o)});function UK(e){return Z5(FO,e)}var Ux=j("ZodPipe",(e,t)=>{aS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>MA(e,r,n,o),e.in=t.in,e.out=t.out});function t1(e,t){return new Ux({type:"pipe",in:e,out:t})}var Vx=j("ZodCodec",(e,t)=>{Ux.init(e,t),yx.init(e,t)});function VK(e,t,r){return new Vx({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function HK(e){let t=e._zod.def;return new Vx({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var LO=j("ZodPreprocess",(e,t)=>{Ux.init(e,t),o5.init(e,t)}),MO=j("ZodReadonly",(e,t)=>{n5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>BA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function BO(e){return new MO({type:"readonly",innerType:e})}var jO=j("ZodTemplateLiteral",(e,t)=>{i5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yA(e,r,n,o)});function WK(e,t){return new jO({type:"template_literal",parts:e,...Q.normalizeParams(t)})}var UO=j("ZodLazy",(e,t)=>{_x.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>UA(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function VO(e){return new UO({type:"lazy",getter:e})}var HO=j("ZodPromise",(e,t)=>{s5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ZK(e){return new HO({type:"promise",innerType:e})}var WO=j("ZodFunction",(e,t)=>{a5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>SA(e,r,n,o)});function GK(e){return new WO({type:"function",input:Array.isArray(e?.input)?yO(e?.input):e?.input??Lx(Au()),output:e?.output??Au()})}var Hx=j("ZodCustom",(e,t)=>{l5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wA(e,r,n,o)});function qK(e){let t=new Dt({check:"custom"});return t._zod.check=e,t}function KK(e,t){return K5(Hx,e??(()=>!0),t)}function ZO(e,t={}){return X5(Hx,e,t)}function GO(e,t){return Q5(e,t)}var XK=Y5,QK=J5,qO=j("ZodInstanceOf",(e,t)=>{Hx.init(e,t)},{properties(e,t){return this.check(Ap(e,t))}});function YK(e,t={}){let r=new qO({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Q.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var JK=(...e)=>eA({Codec:Vx,Boolean:Gp,String:Wp},...e);function eX(e){let t=VO(()=>Kp([Ox(e),nO(),iO(),cO(),Lx(t),_O(Ox(),t)]));return t}function tX(e,t){return new LO({type:"pipe",in:w1(e),out:t})}var nge={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ige(e){hr({customError:e})}function age(){return hr().customError}var KO;KO||(KO={});var Wx={};hs(Wx,{ZodISODate:()=>zc,ZodISODateTime:()=>Oc,ZodISODuration:()=>Fc,ZodISOTime:()=>Nc,date:()=>lge,datetime:()=>sge,duration:()=>dge,time:()=>cge});function sge(e){return Dx(Oc,e)}function lge(e){return Rx(zc,e)}function cge(e){return Ex(Nc,e)}function dge(e){return Tx(Fc,e)}var ve={...Xp,...YS,iso:Wx},uge=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function fge(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function rX(e,t){return e.map((r,n)=>n<t?r:r.optional())}function mge(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function pge(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:mge(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function hge(e,t){return ve.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function XO(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=XO(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=XO(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var gge=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),vge=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Zx(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Zx):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>gge.has(t)?Zx(r):!vge.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Zx))}function oX(e){return e===1?"element":"elements"}function xge(e,t){return ve.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=XO(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${oX(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${oX(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function nX(e,t){if(e!==!1)return e===void 0||e===!0?ve.any():on(e,t)}var bge=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function iX(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ve.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return ve.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=pge(o,t),a=on(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return ve.null();if(o.length===0)return ve.never();if(o.length===1)return ve.literal(o[0]);if(o.every(a=>typeof a=="string"))return ve.enum(o);let i=o.map(a=>ve.literal(a));return i.length<2?i[0]:ve.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ve.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return iX(a,t)});return o.length===0?ve.never():o.length===1?o[0]:ve.union(o)}if(!r)return ve.any();let n;switch(r){case"string":{let o=ve.string();if(e.format){let i=e.format;i==="email"?o=o.check(ve.email()):i==="uri"||i==="uri-reference"?o=o.check(ve.url()):i==="uuid"||i==="guid"?o=o.check(ve.uuid()):i==="date-time"?o=o.check(ve.iso.datetime({offset:!0})):i==="date"?o=o.check(ve.iso.date()):i==="time"?o=o.check(ve.regex(bge)):i==="duration"?o=o.check(ve.iso.duration()):i==="hostname"?o=o.check(ve.hostname()):i==="ipv4"?o=o.check(ve.ipv4()):i==="ipv6"?o=o.check(ve.ipv6()):i==="mac"?o=o.check(ve.mac()):i==="cidr"?o=o.check(ve.cidrv4()):i==="cidr-v6"?o=o.check(ve.cidrv6()):i==="base64"?o=o.check(ve.base64()):i==="base64url"?o=o.check(ve.base64url()):i==="e164"?o=o.check(ve.e164()):i==="credit_card"?o=o.check(ve.creditCard()):i==="iban"?o=o.check(ve.iban()):i==="jwt"?o=o.check(ve.jwt()):i==="emoji"?o=o.check(ve.emoji()):i==="nanoid"?o=o.check(ve.nanoid()):i==="cuid"?o=o.check(ve.cuid()):i==="cuid2"?o=o.check(ve.cuid2()):i==="ulid"?o=o.check(ve.ulid()):i==="xid"?o=o.check(ve.xid()):i==="ksuid"&&(o=o.check(ve.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?ve.number().int():ve.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=ve.boolean();break}case"null":{n=ve.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?on(e.additionalProperties,t):void 0;for(let[u,f]of Object.entries(i)){let m=on(f,t);ho(o,u,a.has(u)?m:m.optional())}if(e.patternProperties){let u=e.patternProperties,f=Object.keys(u),m=[];for(let h of f){let y=on(u[h],t),x=ve.string().regex(new RegExp(h));m.push(ve.looseRecord(x,y))}let p=[];if(Object.keys(o).length>0&&p.push(ve.object(o).passthrough()),p.push(...m),p.length===0)n=ve.object({}).passthrough();else if(p.length===1)n=p[0];else{let h=ve.intersection(p[0],p[1]);for(let y=2;y<p.length;y++)h=ve.intersection(h,p[y]);n=h}if(e.additionalProperties===!1){let h=Object.keys(o),y=f.map(v=>new RegExp(v)),x=n;n=n.check(v=>{if(!Ii(v.value))return;let _=[];for(let I of Object.keys(v.value))h.includes(I)||y.some(S=>S.test(I))||_.push(I);_.length&&v.issues.push({code:"unrecognized_keys",keys:_,input:v.value,inst:x})})}}else{let u=ve.object(o);e.additionalProperties===!1?n=u.strict():s?n=u.catchall(s):n=u.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||c!==void 0||d!==void 0){let u;if(l){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;u=on(f,t)}n=hge(n,{keySchema:u,minProperties:c,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(u=>on(u,t)),l=rX(s,a),c=Array.isArray(i)?void 0:nX(i,t),d=ve.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(ve.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(ve.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(u=>on(u,t)),l=rX(s,a),c=nX(e.additionalItems,t),d=ve.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(ve.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(ve.maxLength(e.maxItems)))}else if(i!==void 0){let a=on(i,t),s=ve.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=ve.array(ve.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=xge(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?on(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function on(e,t){if(typeof e=="boolean")return e?ve.any():ve.never();let r=iX(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>on(c,t)),l=ve.union(s);r=n?ve.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>on(c,t)),l=ve.xor(s);r=n?ve.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:ve.any();else{let s=n?r:on(e.allOf[0],t),l=n?0:1;for(let c=l;c<e.allOf.length;c++)s=ve.intersection(s,on(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ve.nullable(r)),e.readOnly===!0&&(r=ve.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Zx(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Zx(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))uge.has(s)||ho(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function aX(e,t){if(typeof e=="boolean")return e?ve.any():ve.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=fge(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??go};return on(r,i)}var sX=Symbol("z.visit/resolving");function Gx(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===sX)return new _x({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,sX);let l=i(a),c=r(l,l!==a);return n.set(a,c),c}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,d=Object.keys(c),u=!1,f={};for(let p of d){let h=o(c[p]);h!==c[p]&&(u=!0),f[p]=h}let m=s.catchall;return s.catchall&&(m=o(s.catchall),m!==s.catchall&&(u=!0)),u?yt(a,{...s,shape:f,catchall:m}):a}case"array":{let c=o(s.element);return c===s.element?a:yt(a,{...s,element:c})}case"tuple":{let c=s.items,d=!1,u=[];for(let m of c){let p=o(m);p!==m&&(d=!0),u.push(p)}let f=s.rest;return s.rest&&(f=o(s.rest),f!==s.rest&&(d=!0)),d?yt(a,{...s,items:u,rest:f}):a}case"record":case"map":{let c=o(s.keyType),d=o(s.valueType);return c===s.keyType&&d===s.valueType?a:yt(a,{...s,keyType:c,valueType:d})}case"set":{let c=o(s.valueType);return c===s.valueType?a:yt(a,{...s,valueType:c})}case"union":{let c=s.options,d=!1,u=[];for(let f of c){let m=o(f);m!==f&&(d=!0),u.push(m)}return d?yt(a,{...s,options:u}):a}case"intersection":{let c=o(s.left),d=o(s.right);return c===s.left&&d===s.right?a:yt(a,{...s,left:c,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=o(s.innerType);return c===s.innerType?a:yt(a,{...s,innerType:c})}case"pipe":{let c=o(s.in),d=o(s.out);return c===s.in&&d===s.out?a:yt(a,{...s,in:c,out:d})}case"function":{let c=o(s.input),d=o(s.output);return c===s.input&&d===s.output?a:yt(a,{...s,input:c,output:d})}case"lazy":{let c=s.getter,{_cachedInner:d,...u}=s;return yt(a,{...u,getter:()=>o(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function lX(e){return Gx(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Kp(r.options)}})}function yge(e,t){if(!t?.length)return e;let r=e._zod.def;return yt(e,na(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function cX(e){return yge(e.out,e.checks)}function _ge(e){return e.in._zod.traits.has("$ZodTransform")?cX(e):e.in}function dX(e){return Gx(e,{pipe:t=>_ge(t._zod.def),default:(t,r)=>r?Ou(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function uX(e){return Gx(e,{pipe:t=>cX(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var QO={};hs(QO,{bigint:()=>kge,boolean:()=>Sge,date:()=>Cge,number:()=>wge,string:()=>Ige});function Ige(e){return b5(Wp,e)}function wge(e){return k5(Zp,e)}function Sge(e){return $5(Gp,e)}function kge(e){return O5(qp,e)}function Cge(e){return W5(Fx,e)}var qx=class extends Error{constructor(r,n){super(r);Et(this,"fix",n);this.name="UserError"}},fX=(e,t)=>{throw new qx(e,t)};var Pge=g.enum(["user","cancelled","invalid","bug"]),mX=g.strictObject({kind:Pge,message:g.string().max(2e3),fix:g.string().max(2e3).optional()}),Kx=class extends Error{constructor(t="Nothing changed."){super(t),this.name="Cancelled"}};function YO(e){return e.kind==="cancelled"?new Kx(e.message):new qx(e.message,e.fix)}function pX(e){return e.issues.map(t=>(t.path.length?t.path.join(".")+": ":"")+t.message).join("; ")}function we(e){return{...e,cli:e.cli,kind:"operation"}}function Qe(e){return{...e,cli:e.cli,kind:"query"}}function mt(e){return{...e,kind:"view"}}function Dge(e,t){let r=e.input.safeParse(t??{});return r.success||fX("That does not work for "+e.title.toLowerCase()+": "+pX(r.error)),r.data}function hX(e,t){let r=e.inputs?.(t)??{};return Object.fromEntries(Object.entries(e.queries).map(([n,o])=>[n,Dge(o,r[n])]))}var Rge=new Set(["$schema"]),sa=class e{constructor(t){Et(this,"schema");this.schema=t}get inner(){let t=this.schema;for(;;){let r=t._zod.def;if(["optional","default","nullable","prefault","readonly"].includes(r.type)&&r.innerType)t=r.innerType;else if(r.type==="pipe"&&r.in)t=r.in;else return t}}get type(){return this.inner._zod.def.type}get isSection(){return this.type==="object"&&!!this.inner.shape}get description(){return this.schema.description??this.inner.description}get min(){return this.inner.minValue??void 0}get max(){return this.inner.maxValue??void 0}get integer(){return!!this.inner.isInt}get secret(){let t=r=>r.meta?.();return t(this.schema)?.secret===!0||t(this.inner)?.secret===!0}get optional(){return["optional","default"].includes(this.schema._zod.def.type)}rangeText(){let t=(this.inner._zod.def.checks??[]).map(l=>l._zod.def),r=t.find(l=>l.check==="greater_than"),n=t.find(l=>l.check==="less_than"),o=r?.value,i=n?.value;if(o!==void 0&&i!==void 0&&r?.inclusive!==!1&&n?.inclusive!==!1)return o+" to "+i;let a=o===void 0?"":(r?.inclusive===!1?"more than ":"at least ")+o,s=i===void 0?"":(n?.inclusive===!1?"less than ":"at most ")+i;return[a,s].filter(Boolean).join(" and ")}children(){return Object.entries(this.inner.shape??{}).filter(([t])=>!Rge.has(t)).map(([t,r])=>[t,new e(r)])}child(t){let r=this.inner.shape?.[t];return r?new e(r):void 0}leaves(t=[]){return this.children().flatMap(([r,n])=>n.isSection?n.leaves([...t,r]):[{key:[...t,r],node:n}])}get element(){let t=this.inner._zod.def;return t.type==="array"&&t.element?new e(t.element):t.type==="record"&&t.valueType?new e(t.valueType):void 0}get options(){return(this.inner._zod.def.options??[]).map(t=>new e(t))}get choices(){let t=this.inner._zod.def;return t.type==="enum"?Object.values(t.entries??{}):t.type==="literal"?t.values??[]:[]}get editor(){let t=this.type;if(t==="boolean")return"boolean";if(t==="enum"||t==="literal")return"choice";if(t==="union")return this.options.every(n=>["literal","enum","boolean"].includes(n.type))?"choice":"union";if(t==="number"||t==="string")return t;let r=this.element;return t==="array"&&r?r.type==="string"?"string-list":r.type==="enum"?"choice-list":r.type==="object"?"object-list":"json":t==="record"&&r?["string","number","boolean"].includes(r.type)?"string-map":r.type==="object"?"object-map":"json":t==="object"?"object":"json"}get choiceValues(){return this.type!=="union"?this.choices:this.options.flatMap(t=>t.type==="boolean"?[!0,!1]:t.choices)}get openOption(){return this.options.find(t=>!["literal","enum","boolean"].includes(t.type))}initial(){let t=this.schema._zod.def;if(t.type==="default")return structuredClone(t.defaultValue);switch(this.type){case"boolean":return!1;case"number":return this.min??0;case"string":return"";case"enum":case"literal":return this.choices[0];case"union":return this.options[0]?.initial();case"array":return[];case"record":return{};case"object":return Object.fromEntries(this.children().filter(([,r])=>!["optional","default"].includes(r.schema._zod.def.type)).map(([r,n])=>[r,n.initial()]));default:return null}}check(t){let r=this.schema.safeParse(t);return r.success?!0:r.error.issues.map(n=>(n.path.length?n.path.join(".")+": ":"")+n.message).join("; ")}};function Tn(e,t=Date.now()){let r=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return Number.isNaN(r)?"":r<45?"just now":r<3600?Math.round(r/60)+" min ago":r<86400?Math.round(r/3600)+" h ago":Math.round(r/86400)+" d ago"}function Qp(e,t,r=t+"s"){return e+" "+(e===1?t:r)}var Ege=new Set(["mb","gb","cpu","gpu","jdk","sdk","id","url","ui","npm","msvc","uv","api","ssh","vm","io"]),Tge={harness:"agent",harnesses:"agents"};function Xx(e){let t=["B","KB","MB","GB","TB"],r=e<=0?0:Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/1024**r;return(r===0?String(e):n.toFixed(n<10?1:0))+" "+t[r]}function gX(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(" ").filter(Boolean).map(r=>Tge[r.toLowerCase()]??r).map((r,n)=>{let o=r.toLowerCase();return Ege.has(o)?r.toUpperCase():n===0?r[0].toUpperCase()+r.slice(1):o}).join(" ")}var $ge=["boolean","enum","number","text","secret","path","list","map","object","json"],Age=g.union([g.string(),g.number(),g.boolean()]),Lc=g.lazy(()=>g.strictObject({name:g.string(),key:g.array(g.string()),kind:g.enum($ge),label:g.string(),help:g.string().optional(),optional:g.boolean(),default:g.unknown().optional(),choices:g.array(g.strictObject({value:Age,label:g.string()})).optional(),open:Lc.optional(),min:g.number().optional(),max:g.number().optional(),integer:g.boolean().optional(),range:g.string().optional(),pathKind:g.enum(["dir","file"]).optional(),literals:g.array(g.string()).optional(),element:Lc.optional(),fields:g.array(Lc).optional()})),vX={"storage.root":"dir","projects.roots":"dir","projects.exclude":"dir","projects.declinedRoots":"dir","claudeProfile.hostDir":"dir","claudeProfile.globalStateFile":"file",scripts:"file"};function Oge(e){let t=e.join("."),r=e[e.length-1]??"";if(vX[t])return vX[t];if(e[0]==="mappings"&&r==="host"||r==="hostDir"||/(Dir|Folder)$/.test(r))return"dir";if(/File$/.test(r))return"file"}function zge(e){return/"auto"/.test(e.description??"")?["auto"]:[]}function Nge(e){return e===!0?"On":e===!1?"Off":String(e)}function xX(e){return e!==void 0&&Number.isFinite(e)&&Math.abs(e)<Number.MAX_SAFE_INTEGER}function Fge(e){let t=e.schema._zod.def;return t.type==="default"?t.defaultValue:void 0}function Mc(e,t=[],r){let n=e instanceof sa?e:new sa(e),o=t[t.length-1]??"",i={name:o,key:[...t],label:r??(o?gX(o):""),...n.description?{help:n.description}:{},optional:n.optional},a=Fge(n),s=l=>a===void 0?{}:{default:l?a===""?"":"***":a};switch(n.editor){case"boolean":return{...i,kind:"boolean",...s(!1)};case"choice":case"union":{let l=n.openOption;return{...i,kind:"enum",...s(!1),choices:n.choiceValues.filter(c=>["string","number","boolean"].includes(typeof c)).map(c=>({value:c,label:Nge(c)})),...l?{open:Mc(l,t,i.label)}:{}}}case"number":{let l=n.rangeText();return{...i,kind:"number",...s(!1),...xX(n.min)?{min:n.min}:{},...xX(n.max)?{max:n.max}:{},...n.integer?{integer:!0}:{},...l?{range:l}:{}}}case"string":{if(n.secret)return{...i,kind:"secret",...s(!0)};let l=Oge(t);return l?{...i,kind:"path",...s(!1),pathKind:l,literals:zge(n)}:{...i,kind:"text",...s(!1)}}case"string-list":case"choice-list":case"object-list":return{...i,kind:"list",...s(!1),element:Mc(n.element,t,"Entry")};case"string-map":case"object-map":return{...i,kind:"map",...s(n.element?.secret??!1),element:Lge(n,t)};case"object":return{...i,kind:"object",...s(!1),fields:C1(n,t)};default:return{...i,kind:"json",...s(!1)}}}function Lge(e,t){return Mc(e.element,[...t,"*"],"Value")}function C1(e,t=[]){return(e instanceof sa?e:new sa(e)).children().map(([n,o])=>Mc(o,[...t,n]))}function Mge(e){if(typeof e!="object"||e===null||Array.isArray(e))return String(e);let t=e;return typeof t.host=="string"&&typeof t.guest=="string"?t.host+" \u2192 "+t.guest+(t.readOnly?" (read-only)":""):Object.values(t).filter(n=>typeof n=="string"&&n!=="").slice(0,2).join(" \xB7 ")||"{ "+Object.keys(t).join(", ")+" }"}function JO(e,t){return e.length>t?e.slice(0,Math.max(0,t-1))+"\u2026":e}function P1(e,t,r=60){if(e===void 0)return{text:"not set",tone:"muted"};if(t?.kind==="secret")return e===""?{text:"(empty)",tone:"muted"}:{text:"***"};if(e===!0)return{text:"On",tone:"ok"};if(e===!1)return{text:"Off",tone:"muted"};if(e===null)return{text:"none",tone:"muted"};if(typeof e=="string")return e===""?{text:"(empty)",tone:"muted"}:{text:JO(e,r)};if(typeof e=="number")return{text:String(e)};if(Array.isArray(e))return e.length===0?{text:"none",tone:"muted"}:{text:JO(e.length+" \xB7 "+e.map(o=>typeof o=="object"?Mge(o):String(o)).join(", "),r)};let n=Object.keys(e);return n.length?{text:JO(n.length+" \xB7 "+n.join(", "),r)}:{text:"none",tone:"muted"}}function D1(e,t){if(t===void 0||t==="")return e.optional||e.kind==="text"?void 0:"Required.";if(e.kind==="number"){let r=typeof t=="number"?t:Number(t);if(!Number.isFinite(r))return"Enter a number.";if(e.integer&&!Number.isInteger(r))return"Enter a whole number.";if(e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max)return e.range?"Use "+e.range+".":"Out of range."}if(e.kind==="enum"&&!e.open&&!e.choices?.some(r=>r.value===t))return"Choose one."}var Yp=g.array(g.string()).optional(),bX=g.strictObject({value:g.string(),label:g.string(),description:g.string().optional()}),R1=g.strictObject({message:g.string(),fix:g.string()}),Bge=g.strictObject({kind:g.literal("confirm"),title:g.string(),lines:Yp,yes:g.string().optional(),danger:g.boolean().optional(),typed:g.string().optional(),implied:g.boolean().optional(),skipWithYes:g.boolean().optional(),noTerminal:g.strictObject({message:g.string(),fix:g.string()}).optional()}),jge=g.strictObject({kind:g.literal("choose"),title:g.string(),lines:Yp,choices:g.array(bX).min(1),initial:g.string().optional(),noTerminal:R1.optional()}),Uge=g.strictObject({kind:g.literal("text"),title:g.string(),lines:Yp,initial:g.string().optional(),allowEmpty:g.boolean().optional(),problem:g.string().optional(),noTerminal:R1.optional()}),Vge=g.strictObject({kind:g.literal("secret"),title:g.string(),lines:Yp,problem:g.string().optional()}),Hge=g.strictObject({kind:g.literal("path"),title:g.string(),lines:Yp,pathKind:g.enum(["dir","file"]),initial:g.string().optional(),literals:g.array(g.string()).optional(),problem:g.string().optional(),noTerminal:R1.optional()}),Wge=g.strictObject({kind:g.literal("checklist"),title:g.string(),lines:Yp,choices:g.array(bX),checked:g.array(g.string()).optional(),noTerminal:R1.optional()}),yX=g.discriminatedUnion("kind",[Bge,jge,Uge,Vge,Hge,Wge]),Ypt={confirm:g.boolean(),choose:g.string().max(1e3).optional(),text:g.string().max(1e4).optional(),secret:g.string().max(1e4).optional(),path:g.string().max(2e3).optional(),checklist:g.array(g.string().max(1e3)).max(1e3).optional()};async function ez(e,t,r){for(let n=t;;){let o=await e(n);if(o===void 0||!r)return o;let i=r(o);if(i===!0)return o;n={...n,problem:i}}}function Zge(e,t){return{progress:r=>t.progress(r),log:(r,n)=>t.log(r,n),confirm:r=>e({...r,kind:"confirm"}),choose:r=>e({...r,kind:"choose"}),text:({validate:r,...n})=>ez(e,{...n,kind:"text"},r),secret:({validate:r,...n})=>ez(e,{...n,kind:"secret"},r),path:({validate:r,...n})=>ez(e,{...n,kind:"path"},r),checklist:r=>e({...r,kind:"checklist"})}}var Jpt=Zge(e=>Promise.reject(new Error("A query asked a question: "+e.title)),{progress:()=>{},log:()=>{}});var Ya=g.string().regex(/^[A-Za-z0-9_-]{1,64}$/),_X=g.string().regex(/^[a-z][A-Za-z0-9]*(\.[a-z][A-Za-z0-9]*)+$/).max(80),Gge=g.enum(["ok","warn","danger","muted","accent"]),qge=g.strictObject({t:g.literal("call"),id:Ya,op:_X,input:g.unknown()}),Kge=g.strictObject({t:g.literal("answer"),id:Ya,value:g.unknown()}),Xge=g.strictObject({t:g.literal("subscribe"),id:Ya,query:_X,input:g.unknown()}),Qge=g.strictObject({t:g.literal("unsubscribe"),id:Ya}),nht=g.discriminatedUnion("t",[qge,Kge,Xge,Qge]),IX=g.discriminatedUnion("t",[g.strictObject({t:g.literal("progress"),id:Ya,text:g.string()}),g.strictObject({t:g.literal("log"),id:Ya,text:g.string(),tone:Gge.optional()}),g.strictObject({t:g.literal("ask"),id:Ya,question:yX}),g.strictObject({t:g.literal("result"),id:Ya,output:g.unknown()}),g.strictObject({t:g.literal("error"),id:Ya,error:mX}),g.strictObject({t:g.literal("data"),id:Ya,output:g.unknown()})]);function he(e,t,r={}){return{kind:"operation",op:e.id,input:t,label:e.title,...e.danger?{danger:!0}:{},...r}}function Ja(e,t,r={}){return{kind:"link",target:e,label:t,...r}}function wX(e){return e.sections.some(t=>(t.facts?.length??0)>0||(t.items?.length??0)>0||(t.text?.length??0)>0)}var SX=g.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),Yge=g.object({name:g.string().describe("The agent"),ready:g.boolean().describe("Installed in the sandbox already (starts without an install)"),isDefault:g.boolean().describe("The agent that starts by default"),removable:g.boolean().describe("You added it (built-in agents cannot be removed)")}),Jge=g.object({folder:g.string().describe("The folder a start works on (the current folder)"),defaultAgent:g.string().describe("The default agent"),agents:g.array(Yge).describe("Every agent in your settings, built in or added")}),tz=Qe({id:"agents.list",title:"Agents",summary:"the agents you can start, and which one is the default",input:g.object({}),output:Jge,surfaces:{except:{cli:"sandbox config list shows the agents (harnesses) and the default (defaultHarness)"}}}),rz=we({id:"agents.start",title:"Start an agent",summary:"start an agent in a project of the running sandbox",input:g.object({agent:SX.describe("The agent to start"),project:SX.optional().describe("The project of the running sandbox (asked when there are several)")}),output:g.object({session:g.string().describe("The new session"),message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox <agent> and sandbox launch start agents on the command line (they boot the sandbox and can attach the terminal)",menu:"the menu starts agents with launch, which can boot the sandbox and attach this terminal"}}}),E1=we({id:"agents.add",title:"Add an agent\u2026",summary:"add an agent by its npm or Python package, or a program on this PC",input:g.object({}),output:g.object({name:g.string().describe("The new agent"),message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses adds agents on the command line"}}}),T1=we({id:"agents.makeDefault",title:"Make default",summary:"make an agent the one that starts by default",input:g.object({name:g.string().describe("The agent")}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set defaultHarness <name> does this on the command line"}}}),$1=we({id:"agents.remove",title:"Remove",summary:"take an agent you added out of your settings",input:g.object({name:g.string().describe("The agent")}),output:g.object({message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses removes agents on the command line"}}});function eve(e){return e.split(/[\\/]/).pop()??e}function tve(e,t){let r=e.removable?e.isDefault?" You added it. Make another agent the default to remove it.":" You added it.":"";return"Starts "+e.name+" in "+t+"."+(e.isDefault?" It is the default agent.":"")+r}function rve(e){return e.removable&&!e.isDefault?"x removes it.":void 0}function ove(e,t){return{id:"agent:"+e.name,label:e.name,hint:e.ready?"ready":"installs on first start",tone:e.ready?"ok":"muted",icon:e.name,badges:e.isDefault?[{text:"default",tone:"accent"}]:[],description:tve(e,t),keys:rve(e),primary:Ja({kind:"start-agent",agent:e.name},"Start "+e.name,{verb:"start"}),actions:[...e.isDefault?[]:[he(T1,{name:e.name},{key:"d",verb:"make default",importance:1})],...e.removable&&!e.isDefault?[he($1,{name:e.name},{key:"x",verb:"remove",importance:1})]:[]]}}function nve(e){let t=eve(e.folder),r=[...e.agents].sort((n,o)=>Number(o.isDefault)-Number(n.isDefault));return{title:"Agents",sections:[{id:"start",title:"Start in "+t,cards:!0,items:[...r.map(n=>ove(n,t)),{id:"add",label:"Add an agent\u2026",description:"Add another agent by its npm or Python package, or a program on this PC. It is saved in your settings and appears in this list.",primary:he(E1,{},{verb:"add"})}]}]}}var kX=mt({id:"agents",title:"Agents",summary:"The agents you can start: start one, add one, choose the default.",queries:{agents:tz},operations:[rz,E1,T1,$1],build:({agents:e})=>nve(e)});var Jp=g.string().default("claude").describe("whose login: an agent that keeps one (default: claude)"),Yx=g.string().optional().describe("account name"),ive=g.object({name:g.string().describe("The saved login"),email:g.string().nullable().describe("Its email, when the agent says"),isDefault:g.boolean().describe("New launches start with it"),isActive:g.boolean().describe("The sandbox uses it now"),savedAt:g.string().describe("When it was saved (ISO time)")}),ave=g.object({name:g.string().describe("The agent"),kept:g.boolean().describe("Its login can be saved and switched"),canSavePc:g.boolean().describe("This PC's login can be saved"),accounts:g.array(ive).describe("Its saved logins (empty when not kept)")}),sve=g.object({agent:g.string().describe("The agent asked for (the command line table shows only it)"),agents:g.array(ave).describe("Every agent, Claude first")}),oz=g.object({message:g.string().describe("What happened")});function lve(e){let t=e.agents.find(i=>i.name===e.agent)?.accounts??[];if(!t.length)return e.agent==="claude"?"No saved accounts. Sign in inside the sandbox, then: sandbox account save <name> (or --from-host to save this PC's login)":"No saved "+e.agent+" accounts. Sign in inside the sandbox, then: sandbox account save <name> --agent "+e.agent;let r=[["","NAME","EMAIL","SAVED"],...t.map(i=>[(i.isActive?"*":" ")+(i.isDefault?"D":" "),i.name,i.email??"-",i.savedAt.slice(0,16).replace("T"," ")])],n=r[0].map((i,a)=>Math.max(...r.map(s=>s[a].length)));return[...r.map(i=>i.map((a,s)=>s===i.length-1?a:a.padEnd(n[s]+2)).join("")),"","* = active in the sandbox D = default for new launches"].join(`
|
|
121
|
+
`)}var nz=Qe({id:"accounts.list",title:"Accounts",summary:"Claude logins: list, save, use, set the default, remove",input:g.object({agent:Jp}),output:sve,text:lve,cli:{name:"account",action:"list",json:!0,flags:{agent:{flag:"--agent",value:"name",choices:"harnesses",label:"Agent"}},shapeJson:e=>e.agents.find(t=>t.name===e.agent)?.accounts??[]}}),Qx=we({id:"accounts.save",title:"Save the sandbox's login",summary:"save the sandbox's (or this PC's) login under a name",input:g.object({agent:Jp,name:Yx,fromHost:g.boolean().default(!1).describe("(save) save this PC's login instead of the sandbox's")}),output:g.object({name:g.string().describe("The saved login"),message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"account",action:"save",positional:["name"],flags:{agent:{flag:"--agent"},fromHost:{flag:"--from-host"}}}}),A1=we({id:"accounts.use",title:"Use this login",summary:"make the sandbox use a saved login (running sessions restart)",input:g.object({agent:Jp,name:Yx,noRestart:g.boolean().default(!1).describe("(use) do not restart running sessions")}),output:g.object({lines:g.array(g.string()).describe("What happened, line by line")}),text:e=>e.lines.join(`
|
|
122
|
+
`),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),O1=we({id:"accounts.default",title:"Make default",summary:"the login new launches start with",input:g.object({agent:Jp,name:Yx}),output:oz,text:e=>e.message,cli:{name:"account",action:"default",positional:["name"],flags:{agent:{flag:"--agent"}}}}),z1=we({id:"accounts.rename",title:"Rename\u2026",summary:"give a saved login another name (it keeps working)",input:g.object({agent:Jp,name:Yx,to:g.string().optional().describe("(rename) the new name")}),output:oz,text:e=>e.message,cli:{name:"account",action:"rename",positional:["name"],flags:{agent:{flag:"--agent"},to:{flag:"--to"}}}}),N1=we({id:"accounts.remove",title:"Remove\u2026",summary:"delete a saved login (you would sign in again)",danger:!0,input:g.object({agent:Jp,name:Yx}),output:oz,text:e=>e.message,cli:{name:"account",action:"remove",positional:["name"],flags:{agent:{flag:"--agent"}},yes:"(remove) do not ask first"}});function cve(e){return[{id:"@save-sandbox",label:"+ Save the sandbox's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login you signed in with inside the sandbox, under a name you choose.",primary:he(Qx,{agent:e.name,fromHost:!1},{verb:"save",label:"Save the sandbox's login"})},...e.canSavePc?[{id:"@save-pc",label:"+ Save this PC's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login of this PC, under a name you choose.",primary:he(Qx,{agent:e.name,fromHost:!0},{verb:"save",label:"Save this PC's login"})}]:[]]}function dve(e,t){let r=[t.isActive?"in the sandbox":"",t.isDefault?"default":""].filter(Boolean).join(" \xB7 ");return{id:e.name+":"+t.name,label:t.name,group:"Saved logins",icon:e.name,hint:r,badges:[...t.isActive?[{text:"in the sandbox",tone:"ok"}]:[],...t.isDefault?[{text:"default",tone:"accent"}]:[]],description:"Choose it to make the sandbox use this login.",details:["Agent "+e.name,"Email "+(t.email??"-"),"Saved "+t.savedAt.slice(0,16).replace("T"," ")],primary:he(A1,{agent:e.name,name:t.name},{verb:"use"}),actions:[he(O1,{agent:e.name,name:t.name},{key:"d",verb:"make default",importance:1}),he(z1,{agent:e.name,name:t.name},{key:"r",verb:"rename",importance:2}),he(N1,{agent:e.name,name:t.name},{key:"x",verb:"remove",importance:1})]}}function uve(e){return e.kept?{id:e.name,title:e.name,summary:e.accounts.length?Qp(e.accounts.length,"saved login"):"no saved login yet",description:"Saved "+e.name+" logins.",cards:!0,items:[...cve(e),...e.accounts.map(t=>dve(e,t))]}:{id:e.name,title:e.name,summary:"not kept between sandboxes",items:[{id:"info:"+e.name,label:"This agent's login is not kept between sandboxes",tone:"muted",description:"Sign in again in each new sandbox, or use an API key in the agent\u2019s environment."}]}}function fve(e){return{title:"Accounts",sections:e.agents.map(uve)}}var CX=mt({id:"accounts",title:"Accounts",summary:"Logins saved on this PC, per agent. Use puts one into the sandbox; new launches start with the default.",queries:{accounts:nz},operations:[Qx,A1,O1,z1,N1],build:({accounts:e})=>fve(e)});var mve=g.object({name:g.string(),path:g.string(),kind:g.enum(["dir","file"])}),pve=g.object({path:g.string(),parent:g.string().nullable(),entries:g.array(mve),truncated:g.boolean(),places:g.array(g.object({label:g.string(),path:g.string()}))}),eh=Qe({id:"files.browse",title:"Browse folders",summary:"list what is in a folder of this PC, to pick a folder or a file",input:g.object({path:g.string().max(1024).optional().describe("The folder (none: only the places to start from)"),files:g.boolean().default(!1).describe("List files too, not only folders")}),output:pve,surfaces:{except:{cli:"a path is typed on the command line",menu:"the menu asks for a path as text and checks it"}}});var hve=g.object({bytes:g.number().describe("Bytes counted"),files:g.number().describe("Files counted"),partial:g.boolean().describe("The count stopped at its limit: there is at least this much")}),gve=g.object({root:g.string().describe("The folder your saved data is in"),exists:g.boolean().describe("It exists"),holdsData:g.boolean().describe("Something is in it"),measured:hve.nullable().describe("Its size; null when not measured"),size:g.string().describe('Its size in words; "nothing in it yet" when empty; "not measured yet" when not counted'),defaultRoot:g.string().describe("The default folder"),defaultInUse:g.boolean().describe("The default folder is the one in use"),otherFoldersWithData:g.array(g.string()).describe("Other folders that hold data")}),iz=Qe({id:"storage.show",title:"Data folder",summary:"where your saved data lives",input:g.object({measure:g.boolean().default(!0).describe("add up its size (big folders take a moment)")}),output:gve,text:e=>["Your saved data is in: "+e.root," "+e.size,"The default folder is: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(t=>"Another folder with data: "+t),"","Move it with: sandbox storage move <folder> (or switch without moving: sandbox storage use <folder>)","What takes the space: sandbox data"].join(`
|
|
123
|
+
`),cli:{name:"storage",action:"show",json:!0,shapeJson:e=>({root:e.root,exists:e.exists,...e.measured??{bytes:0,files:0,partial:!1},defaultRoot:e.defaultRoot,otherFoldersWithData:e.otherFoldersWithData})}}),vve=g.object({from:g.string().describe("The old folder"),to:g.string().describe("The new folder"),copied:g.boolean().describe("It was copied (another drive)"),files:g.number().describe("Files moved"),bytes:g.number().describe("Bytes moved"),pinned:g.string().describe("What storage.root now says"),removedOld:g.boolean().describe("The old folder is gone"),notes:g.array(g.string()).describe("Extra notes"),message:g.string().describe("What happened")}),F1=we({id:"storage.move",title:"Move the data\u2026",summary:"move your saved data to another folder",input:g.object({folder:g.string().optional().describe("the folder to move to"),keepOld:g.boolean().default(!1).describe("copy instead of moving: the old folder stays (needs room for both)")}),output:vve,text:e=>e.message,cli:{name:"storage",action:"move",positional:["folder"],flags:{keepOld:{flag:"--keep-old"}},json:!0,shapeJson:({message:e,...t})=>t}}),L1=we({id:"storage.use",title:"Use another folder\u2026",summary:"use another folder for your saved data, without moving it",input:g.object({folder:g.string().optional().describe("the folder to use")}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"use",positional:["folder"]}}),Lu=we({id:"storage.change",title:"Data folder",summary:"pick another folder for your saved data, then move it there or switch to it",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"the command line has storage move <folder> and storage use <folder>"}}}),xve=g.object({setting:g.enum(["off","vhdx"]).describe("storage.contained"),maxGb:g.number().describe("storage.containedMaxGb"),available:g.boolean().describe("This PC can use it"),reasons:g.array(g.string()).describe("Why not"),fixes:g.array(g.string()).describe("What would fix it"),image:g.string().describe("The disk image file"),imageExists:g.boolean().describe("It exists"),imageBytes:g.number().nullable().describe("Its size on disk"),mountFolder:g.string().describe("Where it is mounted"),recordedMounted:g.boolean().describe("The record says it is mounted"),holders:g.number().describe("Sandboxes using it"),mountedNow:g.boolean().nullable().describe("It is mounted now (null: not checked)")}),az=Qe({id:"storage.containedStatus",title:"Contained storage (beta)",summary:"(beta) the disk image for tools, state and logs",input:g.object({}),output:xve,text:e=>["Contained storage (beta, untested on a real PC)"," setting: storage.contained = "+e.setting+" (limit "+e.maxGb+" GB)"," this PC: "+(e.available?"can use it":"cannot use it: "+e.reasons.join(" ")+" "+e.fixes.join(" "))," image: "+e.image+(e.imageExists?" ("+Xx(e.imageBytes??0)+" on disk)":" (not made yet)")," mount folder: "+e.mountFolder,...e.mountedNow===null?[]:[" mounted now: "+(e.mountedNow?"yes":"no")+(e.recordedMounted!==e.mountedNow?" (the record says "+(e.recordedMounted?"yes":"no")+"; sandbox doctor looks into it)":"")],"","Turn it on with: sandbox storage contained on Turn it off with: sandbox storage contained off"].join(`
|
|
124
|
+
`),cli:{name:"storage",action:"contained status",json:!0,shapeJson:({fixes:e,...t})=>t}}),M1=we({id:"storage.containedOn",title:"Turn contained storage on\u2026",summary:"(beta) keep tools, state and logs in a disk image",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained on"}}),B1=we({id:"storage.containedOff",title:"Turn contained storage off\u2026",summary:"(beta) move tools, state and logs back into plain folders",danger:!0,input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained off"}});function bve(e,t){let n={id:"folder",title:"Data folder",items:[{id:"@data-folder",label:"Data folder",hint:e.root,description:"Where your tools, logins, history and logs are kept between sandboxes. Press Enter to move them to another folder or drive, or to use a different folder.",details:[e.size,"Default folder: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(i=>"Another folder with data: "+i)],primary:he(Lu,{},{label:"Data folder",verb:"change"})}],actions:[he(F1,{}),he(L1,{})]},o={id:"contained",title:"Contained storage (beta)",description:"Beta, and not yet tested on a real PC: keeps the sandbox tools, state and logs in one disk image file.",facts:[{id:"setting",label:"Turned on",value:t.setting==="vhdx"?"yes":"no",tone:t.setting==="vhdx"?"ok":"muted"},{id:"pc",label:"This PC",value:t.available?"can use it":"cannot use it",tone:t.available?"ok":"warn",...t.available?{}:{description:[...t.reasons,...t.fixes].join(" ")}},{id:"image",label:"Image",value:t.imageExists?Xx(t.imageBytes??0)+" on disk":"not made yet",description:t.image},{id:"mount",label:"Mount folder",value:t.mountFolder},{id:"mounted",label:"Mounted now",value:t.mountedNow===null?"not checked":t.mountedNow?"yes":"no"}],actions:t.setting==="off"?[he(M1,{})]:[he(B1,{})]};return{title:"Storage",sections:[n,o]}}var PX=mt({id:"storage",title:"Storage",summary:"Where your saved data lives: move it, switch folders, (beta) a disk image.",queries:{storage:iz,contained:az},operations:[Lu,F1,L1,M1,B1],pickers:[eh],inputs:()=>({storage:{measure:!0}}),build:({storage:e,contained:t})=>bve(e,t)});var j1=g.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),sz=g.string().regex(/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/).max(200).describe("The setting, e.g. sandbox.memoryMb"),yve=g.object({id:g.string().describe("The setting, e.g. sandbox.memoryMb"),key:g.array(g.string()),label:g.string(),category:g.string(),section:g.string().optional(),field:Lc,value:g.unknown(),set:g.boolean(),yours:g.unknown(),yoursSet:g.boolean(),inProject:g.unknown().optional(),default:g.unknown().optional(),locked:g.boolean()}),_ve=g.object({scope:j1,file:g.string().describe("The file this scope edits"),exists:g.boolean(),dataFolder:g.string().optional(),exportFile:g.string().optional().describe("Where an export goes by default (full path; your own settings only)"),categories:g.array(g.object({id:g.string(),label:g.string(),description:g.string()})),rows:g.array(yve)}),lz=Qe({id:"settings.list",title:"Settings",summary:"every setting with its value, by category",input:g.object({scope:j1.default("user")}),output:_ve,cli:{name:"config",action:"list",json:!0}}),RX=Qe({id:"settings.get",title:"Get a setting",summary:"show one setting (secrets as ***)",input:g.object({key:sz}),output:g.object({key:g.string(),value:g.unknown()}),text:e=>typeof e.value=="string"?e.value:JSON.stringify(e.value,null,2),surfaces:{except:{menu:"Settings shows every value",web:"the Settings page shows every value"}},cli:{name:"config",action:"get",positional:["key"]}}),es=we({id:"settings.set",title:"Change a setting",summary:"change one setting (text is read like the command line: true/on, numbers, JSON)",input:g.object({scope:j1.default("user"),key:sz,value:g.unknown().describe("The new value")}),output:g.object({key:g.string(),changed:g.boolean(),message:g.string()}),text:e=>e.message,cli:{name:"config",action:"set",positional:["key","value"]}}),U1=we({id:"settings.reset",title:"Reset a setting",summary:"put one setting back to its default (in a project file: remove it)",input:g.object({scope:j1.default("user"),key:sz}),output:g.object({key:g.string(),changed:g.boolean(),message:g.string()}),text:e=>e.message,cli:{name:"config",action:"reset",positional:["key"]}}),EX=g.string().max(2e3).regex(/\.json$/i,"The file name should end in .json."),Jx=we({id:"settings.export",title:"Export settings\u2026",summary:"write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)",input:g.object({settingsFile:EX.optional().describe("(export, import) the .json file; default sandbox-settings.json in the current folder"),withPaths:g.boolean().default(!1).describe("(export) keep folders and files of this PC in the file")}),output:g.object({file:g.string().describe("The file written (full path)"),leftOut:g.array(g.string()).describe('What was left out, one "<key> (<why>)" each'),pathsLeftOut:g.boolean().describe("A folder or file of this PC was left out (and --with-paths was not given)")}),text:e=>["Wrote "+e.file+" (only what differs from the defaults).",...e.leftOut.length?["Left out:",...e.leftOut.map(t=>" "+t)]:[],...e.pathsLeftOut?["Keep this PC's folders and files in the file with --with-paths."]:[]].join(`
|
|
125
|
+
`),cli:{name:"config",action:"export",positional:["settingsFile"],flags:{withPaths:{flag:"--with-paths"}}}}),eb=we({id:"settings.import",title:"Import settings\u2026",summary:"read a shared settings file, show what it would change, and apply it after one yes",input:g.object({settingsFile:EX.optional().describe("(export, import) the .json file")}),output:g.object({changed:g.number().describe("How many settings changed"),message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"config",action:"import",positional:["settingsFile"]}});function DX(e,t){return{...Mc(new sa(e.input).child("settingsFile"),["settingsFile"]),label:t,optional:!1}}function Ive(e,t){let r=n=>P1(n,e.field,40).text;return["Setting "+e.id,"All projects "+r(e.yours)+(e.yoursSet?" (your file)":" (built-in default)"),"This project "+(e.inProject===void 0?"not set":r(e.inProject)),...t==="user"?["Default "+r(e.default)]:[],...t==="project"&&e.locked?["A project can only make this stricter than your own setting."]:[]]}function wve(e,t){let r=t==="project"&&!e.set?"all projects: "+P1(e.yours,e.field,40).text:P1(e.value,e.field).text,n=e.field.kind==="secret"?"":e.value;return{id:e.id,label:e.label,hint:r,...e.set?{tone:t==="project"?"accent":"ok",badges:[{text:"changed",tone:"accent"}]}:{},description:e.field.help,group:e.section,details:Ive(e,t),keywords:e.id,code:e.id,cells:{setting:e.id,value:r},primary:he(es,{scope:t,key:e.id},{label:"Change",verb:"edit",inline:!0,fields:[{...e.field,name:"value",label:e.label}],initial:{value:n}}),actions:e.set?[he(U1,{scope:t,key:e.id},{label:t==="project"?"Remove":"Reset to default",verb:"reset",key:"r"})]:[]}}function Sve(e){return{id:"@data-folder",label:"Data folder",hint:e,cells:{setting:"storage.root",value:e},description:"Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.",primary:he(Lu,{},{label:"Data folder",verb:"change"})}}function kve(e){let t=e.categories.map(r=>({id:r.id,title:r.label,description:r.description,columns:[{key:"setting",label:"SETTING"},{key:"value",label:"VALUE"}],columnsOn:"cli",items:[...e.rows.filter(n=>n.category===r.id).map(n=>wve(n,e.scope)),...r.id==="general"&&e.dataFolder?[Sve(e.dataFolder)]:[]]}));return{title:"Settings",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only what a project may set; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:e.scope==="user"?[he(Jx,{},{verb:"export",fields:[DX(Jx,"Where to write the settings file")],initial:{settingsFile:e.exportFile},description:"Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out."}),he(eb,{},{verb:"import",fields:[DX(eb,"Which settings file")],description:"Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken."})]:[]}}var TX=mt({id:"settings",title:"Settings",summary:"Every setting, for all projects or just this project, with its value, default and description.",queries:{settings:lz},operations:[es,U1,Jx,eb,Lu],pickers:[eh],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({settings:{scope:e.scope}}),build:({settings:e})=>kve(e)});var V1=g.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),Cve=[{id:"editors",label:"Editors & docs",description:"Code and text editors (VS Code is on by default), plus diagrams and document conversion.",members:["editors","diagrams"]},{id:"clients",label:"DB & API clients",description:"GUIs for the sandbox databases, tools to send HTTP, REST and GraphQL requests, and to inspect traffic.",members:["databases","api","network"]},{id:"tools",label:"Git & utilities",description:"Git GUIs and terminal UIs, archives, file search and comparing, process tools, and decompilers.",members:["git","utilities","reversing"]},{id:"cli",label:"Command-line & cloud",description:"Small developer tools (JSON, search, builds, media ...) and tools for clouds and Kubernetes.",members:["cli","cloud"]},{id:"play",label:"Browsers & games",description:"Browsers for testing web apps, and game engines and editors (they draw with OpenGL on the CPU).",members:["browsers","gamedev"]}];var Pve=g.object({id:g.string().describe("The app"),name:g.string().describe("Its name"),about:g.string().describe("What it is for"),group:g.string().describe("The group it is listed under (APP_GROUPS id)"),size:g.string().describe("Its download size"),cli:g.boolean().describe("A command-line tool (on PATH), not a desktop app"),mesa:g.boolean().describe("Needs OpenGL on the CPU (Mesa)"),fullGitOnly:g.boolean().describe("Only with full git access"),setting:g.string().optional().describe("The setting it stands for (VS Code, Windows Terminal)"),settingField:Lc.optional(),settingValue:g.unknown().optional(),installed:g.boolean().describe("Downloaded already into the data folder"),on:g.boolean().describe("Installed in every sandbox of this scope")}),Dve=g.object({id:g.string().describe("Its key in apps.custom"),name:g.string().describe("Its name"),from:g.string().describe('"From the latest <repo> release." or "From <url>"'),cli:g.boolean().describe("A command-line tool")}),Rve=g.object({scope:V1,file:g.string().describe("The file this scope edits"),exists:g.boolean().describe("The file exists already"),apps:g.array(Pve).describe("The catalogue entries this scope can change"),custom:g.array(Dve).describe("Your own programs (your own scope only)"),customValue:g.unknown().optional().describe("apps.custom as saved, to edit (your own scope only)"),customField:Lc.optional().describe("The Field of apps.custom (your own scope only)")}),cz=Qe({id:"apps.list",title:"Apps",summary:"the apps catalogue: what every sandbox installs",input:g.object({scope:V1.default("user")}),output:Rve,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),H1=we({id:"apps.toggle",title:"Install in every sandbox",summary:"turn an app of the catalogue on or off for this scope",input:g.object({scope:V1.default("user"),id:g.string().max(100).describe("The app"),on:g.boolean().describe("Install it (true) or not (false)")}),output:g.object({message:g.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),W1=we({id:"apps.setCustom",title:"Your own programs",summary:"change your own programs (apps.custom)",input:g.object({scope:V1.default("user"),value:g.unknown().describe("Programs of your own: a GitHub release or a download link, and the program to start.")}),output:g.object({message:g.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.custom"}}}),Z1=we({id:"apps.request",title:"Request an app\u2026",summary:"open a prefilled GitHub request for an app that is not in the list",input:g.object({}),output:g.object({url:g.string().describe("The request page")}),text:e=>"Opened the request form in your browser: "+e.url,surfaces:{except:{cli:"a request is filed on GitHub; the address is in docs"}}});function Eve(e){return["Download ~"+e.size+" once, kept in C:\\AgentData\\tools\\"+(e.setting?"":"apps\\")+e.id+(e.installed?" (downloaded already)":""),"Starts "+(e.cli?"from a terminal (on PATH)":"from the desktop or Start > Sandbox apps"),...e.mesa?["Graphics OpenGL on the CPU (Mesa) is added for it"]:[],...e.fullGitOnly?["Needs full git access (Settings > Projects & setup > Git): it pushes with its own git."]:[],...e.setting?["Setting "+e.setting]:[]]}function Tve(e){return{name:"on",key:["apps","install"],kind:"boolean",label:e.name,optional:!1}}function $ve(e,t){let r=e.setting&&e.settingField?he(es,{scope:"user",key:e.setting},{label:"Change",verb:"change",inline:!0,fields:[{...e.settingField,name:"value",label:e.name}],initial:{value:e.settingValue}}):he(H1,{scope:t,id:e.id},{label:e.on?"Turn off":"Turn on",verb:"tick",inline:!0,fields:[Tve(e)],initial:{on:e.on}});return{id:e.id,label:e.name,description:e.about,code:e.id,keywords:e.id,details:Eve(e),...e.on?{tone:"ok"}:{},primary:r}}function Ave(e){return{id:"custom-"+e.id,label:e.name,description:e.from,hint:e.cli?"command line":"desktop",disabled:"Your own programs are always installed; change or remove them with Your own programs."}}function Ove(e){let t=Cve.map(n=>({id:n.id,title:n.label,description:n.description,items:e.apps.filter(o=>o.group===n.id).map(o=>$ve(o,e.scope))})).filter(n=>(n.items?.length??0)>0);e.scope==="user"&&t.push({id:"custom",title:"Your own programs",description:"Programs you added yourself, from a GitHub release or a download link.",items:e.custom.map(Ave)});let r=e.scope==="user";return{title:"Apps",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only apps from the list; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:r?[...e.customField?[he(W1,{scope:"user"},{key:"c",verb:"your own programs",fields:[{...e.customField,name:"value",label:"Your own programs"}],initial:{value:e.customValue}})]:[],he(Z1,{},{key:"r",verb:"request an app"})]:[]}}var $X=mt({id:"apps",title:"Apps",summary:"Tick the apps every sandbox should have. Each downloads once and is kept.",queries:{apps:cz},operations:[H1,W1,Z1,es],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({apps:{scope:e.scope}}),build:({apps:e})=>Ove(e)});var ki={desktop:"desktop window",gpu:"GPU",clipboard:"clipboard",audio:"audio",video:"camera",printers:"printers",liveFolderAdd:"add folders while running",attachedDisks:"attached disks",multipleInstances:"several at once",hvsocket:"Hyper-V sockets"},zve=Object.keys(ki),Nve="see docs/design/engines.md",AX=g.enum(["windows-sandbox","hcs"]).describe("The engine"),Fve=g.object({desktop:g.boolean().describe(ki.desktop),gpu:g.boolean().describe(ki.gpu),clipboard:g.boolean().describe(ki.clipboard),audio:g.boolean().describe(ki.audio),video:g.boolean().describe(ki.video),printers:g.boolean().describe(ki.printers),liveFolderAdd:g.boolean().describe(ki.liveFolderAdd),attachedDisks:g.boolean().describe(ki.attachedDisks),multipleInstances:g.boolean().describe(ki.multipleInstances),hvsocket:g.boolean().describe(ki.hvsocket)}),Lve=g.object({available:g.boolean().describe("This PC can run it"),reasons:g.array(g.string()).describe("Why not, in plain words"),fixes:g.array(g.string()).describe("The command that fixes each reason (never run for you)")}).describe("Whether this PC can run it"),OX=g.object({id:AX,inUse:g.boolean().describe("The setting sandbox.engine names it"),capabilities:Fve.describe("What it can do"),check:Lve}),Mve=g.object({engine:AX.describe("The engine in use (the setting sandbox.engine)"),engines:g.array(OX).describe("Every engine")});function Bve(e){if(e.check.available){let r=[e.id+" can be used on this PC."];return e.id==="hcs"&&r.push("HCS is in alpha: starting it is not enabled yet (docs/design/engines.md)."),r.join(`
|
|
126
|
+
`)}let t=[e.id+" cannot be used on this PC yet:"];return e.check.reasons.forEach((r,n)=>{t.push(""," "+(n+1)+". "+r," To fix: "+(e.check.fixes[n]??Nve))}),t.push("","Nothing was changed. These commands change Windows, so they are yours to run (or not)."),t.join(`
|
|
127
|
+
`)}var dz=Qe({id:"engine.status",title:"Engine",summary:"the engine in use and what each engine can do on this PC",input:g.object({}),output:Mve,cli:{name:"engine",action:"show",json:!0}}),zX=Qe({id:"engine.check",title:"Check an engine",summary:"what this PC lacks for an engine, and the commands that would fix it",input:g.object({engine:g.string().default("hcs").describe("the engine to check")}),output:OX,surfaces:{except:{menu:"the Engine category shows every engine and its check with the fixes (engine.status)",web:"the Engine page shows every engine and its check with the fixes (engine.status)"}},text:Bve,cli:{name:"engine",action:"check",positional:["engine"],json:!0,exitCode:e=>e.check.available?0:1}}),jve=g.object({id:g.string().describe("The compute system"),kind:g.string().describe("Container or VirtualMachine (the utility VM)"),state:g.string().describe("What it is doing"),since:g.string().nullable().describe("When it was created (ISO time), when HCS says")}),Uve=g.object({available:g.boolean().describe("HCS could be asked"),message:g.string().describe("What was found, or why nothing is listed"),systems:g.array(jve).describe("Ours that are running now")}),uz=Qe({id:"engine.leftovers",title:"HCS systems left running",summary:"list the HCS compute systems this tool left running (a crashed command can leave one up)",input:g.object({}),output:Uve,cli:{name:"engine",action:"leftovers",json:!0}}),G1=we({id:"engine.clean",title:"Stop the leftover systems\u2026",summary:"stop the HCS compute systems this tool left running (frees their memory; nothing else is touched)",input:g.object({}),output:g.object({available:g.boolean().describe("HCS could be asked"),stopped:g.number().describe("How many were stopped"),failed:g.number().describe("How many could not be stopped"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"engine",action:"clean"}});function Vve(e){return{id:"leftover:"+e.id,label:e.id,hint:e.state+(e.since?" started "+Tn(e.since):""),tone:"warn",details:["System "+e.id,"Kind "+e.kind,"State "+e.state,...e.since?["Created "+e.since]:[]]}}function Hve(e){return e.systems.length?[{id:"leftovers",title:"HCS systems left running",summary:Qp(e.systems.length,"system")+" (they hold memory; a sandbox running on purpose is listed too)",items:e.systems.map(Vve),actions:[he(G1,{},{key:"x",verb:"stop them",importance:1})]}]:[]}function Wve(e){let t=zve.map(n=>{let o=e.capabilities[n];return{id:n,label:ki[n],value:o?"yes":"no",...o?{}:{tone:"muted"}}}),r=[...e.check.reasons.map((n,o)=>({id:"reason:"+o,label:n,tone:"warn"})),...e.check.fixes.map((n,o)=>({id:"fix:"+o,label:"Fix: "+n}))];return{id:e.id,title:e.id+(e.id==="hcs"?" (alpha)":"")+(e.inUse?" (in use)":""),summary:e.check.available?"can be used on this PC":"cannot be used yet",facts:t,items:r}}function Zve(e,t){return{title:"Engine",notice:{text:"Engine in use: "+e.engine+" (setting: sandbox.engine)"},sections:[...e.engines.map(Wve),...t?Hve(t):[]]}}var NX=mt({id:"engine",title:"Engine",summary:"What runs your sandbox, and what each engine can do on this PC.",queries:{engines:dz,leftovers:uz},operations:[G1],build:({engines:e,leftovers:t})=>Zve(e,t)});var LX="sandbox doctor and sandbox repair are hand-written renderers of this run (lines redrawn in place, --json alone, repair before the settings load)",Gve=g.enum(["ok","fixed","needs-you","warn","skipped"]).describe("What the check found"),qve=g.object({id:g.string().describe("The check"),group:g.string().describe("Its heading (This PC, Install ...)"),name:g.string().describe("What was checked"),status:Gve,detail:g.string().describe("What was found"),means:g.string().optional().describe("What it means for you"),fix:g.string().optional().describe("What to do yourself"),plan:g.string().optional().describe("What repair would change"),lines:g.array(g.string()).optional().describe("More lines (a diff, folders)"),fixable:g.boolean().describe("Repair can mend it"),timedOut:g.boolean().optional().describe("It took too long"),applied:g.object({done:g.string(),before:g.string(),after:g.string()}).optional().describe("What a fix changed"),error:g.string().optional().describe("Why a fix did not work")}),MX=g.object({total:g.number().describe("Checks that ran"),ok:g.number().describe("Checks that are fine"),fixed:g.number().describe("Problems repair fixed"),warn:g.number().describe("Warnings"),needsYou:g.number().describe("Problems you need to fix"),skipped:g.number().describe("Checks that did not run"),fixable:g.number().describe("Problems repair can still mend")}).describe("How many checks ended how"),Kve=g.object({name:g.string().describe("What was looked at"),status:g.enum(["ok","warn","action"]).describe("OK, a warning, or something to do"),detail:g.string().describe("What was found")}),Xve=g.object({at:g.string().describe("When it ran (ISO time)"),mode:g.enum(["check","repair"]).describe("A check or a repair"),checks:g.array(qve).describe("The results"),summary:MX,details:g.array(g.tuple([g.string(),g.string()])).describe("The doctor details: name and value"),setup:g.object({checks:g.array(Kve),canEnable:g.boolean().describe("Windows Sandbox can be turned on from here"),error:g.string().nullable().describe("Why the setup could not be read")}).nullable().describe("What sandbox setup found"),log:g.string().nullable().describe("The repair log, if one was written")});function BX(e){return[e.ok+" ok",e.fixed&&e.fixed+" fixed",e.needsYou&&e.needsYou+" "+(e.needsYou===1?"needs":"need")+" you",e.warn&&e.warn+(e.warn===1?" warning":" warnings"),e.skipped&&e.skipped+" skipped"].filter(Boolean).join(", ")}var Qve={ok:"[ok]",fixed:"[fixed]",warn:"[!]","needs-you":"[x]",skipped:"[-]"},th={ok:void 0,fixed:"accent",warn:"warn","needs-you":"danger",skipped:"muted"},fz=6;function Yve(e){let t={text:" "+Qve[e.status]+" "+e.name+": "+e.detail+(e.timedOut?" (took too long)":""),...th[e.status]?{tone:th[e.status]}:{}};if(e.status==="ok")return[t];let r=[t];e.means&&r.push({text:" What it means: "+e.means}),e.fixable&&e.plan?r.push({text:" Fix: sandbox repair will "+e.plan}):e.fix&&r.push({text:" Fix: "+e.fix});let n=e.lines??[];for(let o of n.slice(0,fz))r.push({text:" "+o});return n.length>fz&&r.push({text:" ... and "+(n.length-fz)+" more"}),r}var FX={ok:"OK",fixed:"FIXED","needs-you":"NEEDS YOU",warn:"WARNING",skipped:"SKIPPED"};function Jve(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}var jX=g.object({summary:MX,changed:g.boolean().describe("Fixes were applied"),log:g.string().nullable().describe("The repair log, if one was written")}),mz=Qe({id:"health.last",title:"Health",summary:"the last check or repair of this PC and the sandbox",input:g.object({}),output:g.object({last:Xve.nullable().describe("Nothing yet: no check has run")}),surfaces:{except:{cli:"the command line prints results as it checks (sandbox doctor)"}}}),tb=we({id:"health.check",title:"Check this PC",summary:"check this PC, the install, your settings and the sandbox (changes nothing)",input:g.object({harness:g.string().optional().describe("agent to check")}),output:jX,text:e=>"Summary: "+BX(e.summary),surfaces:{except:{cli:LX}}}),rb=we({id:"health.repair",title:"Run the checks and fix what can be fixed",summary:"find and fix problems (install, data folder, settings, stale state, half-installed tools)",input:g.object({}),output:jX,danger:!0,text:e=>"Summary: "+BX(e.summary)+(e.log?". Log: "+e.log:". No log was written (the storage folder does not exist yet)."),surfaces:{except:{cli:LX}}}),q1=we({id:"health.enableSandbox",title:"Turn on Windows Sandbox",summary:"turn on the Windows Sandbox feature (Windows asks for admin permission; restart to finish)",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox setup asks and turns it on (hand-written: it also offers to restart Windows)",web:"Windows asks for admin permission on this PC; use the menu or sandbox setup"}}});function exe(e){return e.checks.map((t,r)=>{let n=Yve(t).slice(1).map(o=>o.text.trim());return{id:"repair:"+r,label:t.name,hint:FX[t.status],...th[t.status]?{tone:th[t.status]}:{},badges:[{text:FX[t.status],...th[t.status]?{tone:th[t.status]}:{}}],description:t.detail,...n.length?{details:n}:{}}})}function txe(e){let t=e.last,r=he(tb,{},{verb:"check"}),n=he(rb,{},{verb:"check and fix"});if(!t)return{title:"Health",sections:[{id:"doctor",title:"Doctor",cards:!0,items:[{id:"health:check",label:"Check this PC",description:"Looks at this PC: Windows features, the install, the folders and the sandbox. It takes a few seconds, so it only runs when you ask.",primary:r}]},{id:"repair",title:"Repair",cards:!0,items:[{id:"repair:run",label:"Run the checks and fix what can be fixed",description:"Checks the install, data folder, settings and sandbox, lists what it would change, and asks before it fixes anything.",primary:n}]}]};let o=!!t.setup?.canEnable,i=[{id:"status",summary:(t.mode==="repair"?"Repaired ":"Checked ")+Tn(t.at),facts:t.log?[{id:"log",label:"Log",value:t.log}]:[]},{id:"doctor",title:"Doctor",items:t.details.map(([a,s],l)=>({id:"doctor:"+l,label:a,hint:Jve(s,50),details:[s]}))},{id:"repair",title:"Repair",items:exe(t)}];if(t.setup){let a=t.setup;i.push({id:"setup",title:"Set up this PC",items:a.error?[{id:"setup:error",label:a.error}]:a.checks.map((s,l)=>({id:"setup:"+l,label:s.name,hint:s.status==="ok"?"OK":s.status==="warn"?"WARNING":"ACTION NEEDED",tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger",description:s.detail})),notes:o?[{text:"Turn Windows Sandbox on from the menu or with sandbox setup.",tone:"muted",only:"web"}]:[]})}return{title:"Health",sections:i,actions:[he(rb,{},{key:"f",verb:"check and fix",importance:1}),he(tb,{},{key:"l",verb:t?"check again":"check",importance:2}),...o?[he(q1,{},{key:"e",verb:"turn on Windows Sandbox",importance:3})]:[]]}}var UX=mt({id:"health",title:"Health",summary:"Checks this PC and your settings, repairs problems, and sets up Windows Sandbox.",queries:{last:mz},operations:[tb,rb,q1],build:({last:e})=>txe(e)});var VX=["tools","databases","state","logs","data","host"],rxe={tools:"Toolchains",databases:"Databases",state:"Agent state",logs:"Logs",data:"Other",host:"On this PC"},oxe=g.object({area:g.enum(VX).describe("Which kind of data it is"),name:g.string().describe("The folder as listed (tools: its name; others: area/name)"),path:g.string().describe("Its full path on this PC"),bytes:g.number().describe("Its size in bytes (links count 0)"),size:g.string().describe("Its size in words, e.g. 1.5 KB"),target:g.string().nullable().describe("What sandbox data clean calls it; null when it is kept on purpose")}),nxe=g.object({drive:g.string().describe("The drive, e.g. C:\\"),totalBytes:g.number().describe("Its size in bytes"),freeBytes:g.number().describe("Free bytes"),usedBytes:g.number().describe("Used bytes"),holdsStorage:g.boolean().describe("The sandbox keeps its files on this drive"),used:g.string().describe("Used, in words"),usedPercent:g.number().describe("Used, in percent of the size (rounded)"),free:g.string().describe("Free, in words"),total:g.string().describe("Size, in words")}),ixe=g.object({dataPath:g.string().describe("The data folder (C:\\AgentData inside the sandbox)"),storageRoot:g.string().describe("The storage folder that holds it"),totalBytes:g.number().describe("Everything listed, in bytes"),total:g.string().describe("Everything listed, in words"),storageShare:g.string().describe('"<- sandbox storage (<total> of it)": the note on the storage drive'),areaTotals:g.record(g.string(),g.string()).describe("Each area's total in words"),entries:g.array(oxe).describe("What is stored, by area, biggest first"),disks:g.array(nxe).describe("This PC's drives")}),pz=Qe({id:"data.show",title:"Stored data",summary:"show what is kept between sandboxes (tools, databases, logins, logs), or delete some of it",input:g.object({}),output:ixe,cli:{name:"data",action:"show",json:!0,shapeJson:e=>({dataPath:e.dataPath,storageRoot:e.storageRoot,totalBytes:e.totalBytes,entries:e.entries.map(({area:t,name:r,path:n,bytes:o})=>({area:t,name:r,path:n,bytes:o})),disks:e.disks.map(({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i})=>({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i}))})}}),HX=g.object({message:g.string().describe("What happened")}),K1=we({id:"data.clean",title:"Delete stored data\u2026",summary:"delete chosen parts of what is kept between sandboxes",input:g.object({targets:g.array(g.string()).default([]).describe("what to clean, e.g. tools/go databases logs")}),output:HX.extend({freedBytes:g.number().describe("Bytes freed (0 when nothing was removed)")}),danger:!0,text:e=>e.message,next:e=>e.freedBytes>0?"sandbox data (see what is left)":void 0,cli:{name:"data",action:"clean",positional:["targets"]}}),WX=g.object({days:g.number().int().min(1).default(7).describe("launch folders older than this many days")}),X1=we({id:"data.prune",title:"Clean up\u2026",summary:"delete old launch folders, logs and leftovers",input:WX,output:HX.extend({removed:g.boolean().describe("Something was deleted")}),text:e=>e.message,next:e=>e.removed?"sandbox data (see what else is saved, and clean it)":void 0,cli:{name:"clean",group:"Data",flags:{days:{flag:"--days",value:"n"}},yes:"do not ask before deleting"}}),axe=Mc(new sa(WX).child("days"),["days"]);function sxe(e){let t={id:"disks",title:"Disks",columns:[{key:"drive",label:"DRIVE"},{key:"used",label:"USED"},{key:"free",label:"FREE"},{key:"size",label:"SIZE"},{key:"note",label:""}],columnsOn:"cli",items:e.disks.map(i=>({id:"disk:"+i.drive,label:i.drive,hint:i.used+" used \xB7 "+i.free+" free of "+i.total,...i.holdsStorage?{description:"The sandbox keeps its files on this drive."}:{},cells:{drive:i.drive,used:i.used+" ("+i.usedPercent+"%)",free:i.free,size:i.total,note:i.holdsStorage?e.storageShare:""}})),notes:[{text:"Persistent data for the sandbox: "+e.dataPath+" (C:\\AgentData inside)"}]},r=VX.flatMap(i=>{let a=e.entries.filter(s=>s.area===i);return a.length?[{id:"area:"+i,title:rxe[i],summary:e.areaTotals[i]??"",columns:[{key:"name",label:""},{key:"size",label:""},{key:"path",label:""}],columnsOn:"cli",items:a.map(s=>({id:"entry:"+s.name,label:s.name,hint:s.size,...s.target?{keys:"x deletes it."}:{description:"Kept on this PC on purpose; it is not deleted here."},details:["Folder "+s.path],cells:{name:" "+s.name,size:s.size,path:s.path},actions:s.target?[he(K1,{targets:[s.target]},{label:"Delete",key:"x",verb:"delete"})]:[]}))}]:[]}),n={id:"total",facts:[{id:"total",label:"Total",value:e.total}],notes:[...e.entries.length?[]:[{text:"Nothing stored yet. Toolchains, databases and agent logins appear here after the first start."}],{text:"Free space with: sandbox data clean <target...> (e.g. tools/go, databases/postgres-18, logs, launches)",tone:"muted",only:"cli"}]},o={id:"clean",title:"Clean up",actions:[he(X1,{},{label:"Clean up\u2026",verb:"choose what",description:"Delete caches, old sandboxes and other leftovers (the clean command, with its options).",fields:[axe]})]};return{title:"Data",sections:[t,...r,n,o]}}var ZX=mt({id:"data",title:"Data",summary:"What the sandbox keeps between runs, and deleting parts of it.",queries:{data:pz},operations:[K1,X1],build:({data:e})=>sxe(e)});var lxe=g.object({name:g.string().describe("The project"),host:g.string().describe("Its folder on this PC"),guest:g.string().describe("Its folder in the sandbox"),mechanism:g.string().describe("How it got into the sandbox (launch, root, boot or share)"),here:g.boolean().describe("The project of the current folder"),setup:g.object({phase:g.string(),message:g.string()}).describe("How far its setup is"),databases:g.array(g.object({database:g.string(),port:g.number(),state:g.string()})),sessions:g.array(g.object({id:g.string(),harness:g.string(),viewers:g.string(),started:g.string()})),repoGuard:g.array(g.string()).describe("Repo guard findings in its folder")}),cxe=g.object({running:g.boolean().describe("A Windows Sandbox is running"),phase:g.string().describe("What it is doing (ready, provisioning ...)"),message:g.string().optional().describe("Its last message"),headless:g.boolean().optional().describe("Its window is hidden"),startedAt:g.number().nullable().describe("When it started (ms), if known"),daemon:g.string().describe("The sandbox helper's answer"),account:g.string().nullable().describe("The Claude login it uses"),syncWatcher:g.boolean().describe("The background history sync runs")}),dxe=g.object({shared:g.object({line:g.string().describe('"Running, started by alice (shared with you)"'),limited:g.boolean().describe("Not shared with you: nothing more is shown"),startedBy:g.string().nullable().describe("Whose it is")}).optional(),sandbox:cxe,here:g.object({folder:g.string(),project:g.string().nullable(),guest:g.string().nullable()}),roots:g.array(g.object({host:g.string(),guest:g.string()})),projects:g.array(lxe),otherSessions:g.array(g.object({id:g.string(),harness:g.string(),cwd:g.string()})),repoGuard:g.object({guarded:g.number(),findings:g.array(g.string())})}),GX=g.object({message:g.string().describe("What happened")});function uxe(e){let t=/^pong \((\d+) session/.exec(e);return t?"responding, "+Qp(Number(t[1]),"session")+" running":e}function qX(e){return e.running&&e.startedAt?Tn(e.startedAt).replace(" ago",""):null}var hz=Qe({id:"sandbox.status",title:"Sandbox status",summary:"show what the sandbox is doing",input:g.object({}),output:dxe,live:{everyMs:2500},cli:{name:"status",group:"Sessions",json:!0,shapeJson:e=>{if(e.shared?.limited)return{sandbox:{running:!0,shared:!1,startedBy:e.shared.startedBy}};let t=e.sandbox;return{sandbox:{...e.shared?.startedBy?{startedBy:e.shared.startedBy,shared:!0}:{},running:t.running,phase:t.phase,message:t.message,headless:t.headless,uptime:qX(t),daemon:t.daemon,account:t.account,syncWatcher:t.syncWatcher},here:e.here,roots:e.roots,projects:e.projects,otherSessions:e.otherSessions,repoGuard:e.repoGuard}}}}),Q1=we({id:"sandbox.showWindow",title:"Show the window",summary:"show the sandbox window",input:g.object({}),output:GX,text:e=>e.message,cli:{name:"show",group:"Sessions"}}),Y1=we({id:"sandbox.hideWindow",title:"Hide the window",summary:"hide the sandbox window (it keeps running)",input:g.object({}),output:GX,text:e=>e.message,cli:{name:"hide",group:"Sessions"}}),J1=we({id:"sandbox.stop",title:"Stop the sandbox\u2026",summary:"shut the sandbox down (every project's sessions end)",input:g.object({}),output:g.object({stopped:g.boolean().describe("It was asked to shut down"),message:g.string()}),danger:!0,text:e=>e.message,cli:{name:"stop",group:"Agents",yes:"do not ask when other projects' sessions would end"}}),fxe={launch:"started from here",root:"in a project root",boot:"mapped at start"};function mxe(e){return{id:"project:"+e.name,label:e.name,icon:"project",hint:e.host+" -> "+e.guest+" ("+(fxe[e.mechanism]??"wsb share")+")",marked:e.here,details:["setup: "+e.setup.phase+(e.setup.phase==="ready"?"":" - "+e.setup.message),...e.databases.length?["databases: "+e.databases.map(t=>t.database+" :"+t.port+" "+t.state).join(", ")]:[],...e.sessions.map(t=>"session "+t.id+" "+t.harness+" "+t.viewers+" "+Tn(t.started)),...e.repoGuard.map(t=>"guard: "+t)]}}function pxe(e){let t=e.sandbox,r=e.projects.reduce((o,i)=>o+i.sessions.length,0)+e.otherSessions.length,n=(o,i,a,s={})=>({id:o,label:i,value:a,...s});return[...e.shared?.startedBy?[n("owner","Started by",e.shared.startedBy)]:[],n("state","State",t.running?t.message||t.phase:"not running",{tone:t.running?t.phase==="ready"?"ok":"warn":"muted"}),...t.running?[n("window","Window",t.headless?"hidden (sandbox show opens it)":"shown"),n("uptime","Uptime",qX(t)??"-"),n("helper","Helper",t.daemon==="-"?"-":uxe(t.daemon)),n("sessions","Sessions",String(r))]:[],n("account","Account",t.account??"none selected (sandbox account use)"),n("sync","Background sync",t.syncWatcher?"on":"off")]}function hxe(e){let t=e.roots.map(n=>({id:"root:"+n.host,label:"root",icon:"folder",hint:n.host+" -> "+n.guest+" (every project in it opens without a restart)"})),r=e.projects.some(n=>n.here);return{id:"projects",title:"Projects",items:[...e.projects.map(mxe),...t],notes:[r?{text:"* = the project of this folder",tone:"muted"}:{text:e.here.folder+" is not in this sandbox (start it here: sandbox claude)",tone:"muted"}]}}function gxe(e){let t=e.repoGuard.findings;return{id:"guard",title:"Repo guard",summary:e.repoGuard.guarded+" folder(s) guarded; "+(t.length?t.length+" change(s) neutralised:":"nothing from the sandbox needed neutralising"),items:t.slice(-10).map((r,n)=>({id:"guard:"+n,label:r,tone:"warn"}))}}function vxe(e){let t=e.shared?{text:e.shared.line+(e.shared.limited?"":". Its window is on their desktop; use its agents here."),tone:"accent"}:void 0;if(e.shared?.limited)return{title:"Sandbox",notice:t,sections:[]};let r=e.sandbox.running,n={id:"status",title:"Status",facts:pxe(e),actions:r?[e.sandbox.headless?he(Q1,{},{key:"w",verb:"show",importance:3}):he(Y1,{},{key:"h",verb:"hide",importance:3}),he(J1,{},{key:"x",verb:"stop",importance:1})]:[]},o={id:"other-sessions",title:"Other sessions",items:e.otherSessions.map(i=>({id:"session:"+i.id,label:"session "+i.id,hint:i.harness+" "+i.cwd}))};return{title:"Sandbox",notice:t,sections:[n,...r?[hxe(e)]:[],...o.items?.length?[o]:[],gxe(e)]}}var KX=mt({id:"sandbox",title:"Sandbox",summary:"What the sandbox is doing, its window, and stopping it.",queries:{status:hz},operations:[Q1,Y1,J1],build:({status:e})=>vxe(e)});var xxe=g.object({folder:g.string().describe("The project folder on this PC"),here:g.boolean().describe("The folder you are in is inside it"),known:g.boolean().describe("Started with this tool before"),root:g.string().nullable().describe("The project root it is in, if any"),excluded:g.boolean().describe("Excluded from the projects mapped at every start"),mappedAtStart:g.boolean().describe("Mapped at every start"),running:g.string().nullable().describe("Its name and how it got into the running sandbox, if it is there")}),bxe=g.object({all:g.boolean().describe("Every project is mapped at every start (except excluded ones)"),roots:g.array(g.string()).describe("Folders of projects, each opened without a restart"),exclude:g.array(g.string()).describe("Folders left out of the projects mapped at every start"),projects:g.array(xxe).describe("Every project worth listing")}),rh=g.object({message:g.string().describe("What happened")}),ek=e=>g.string().optional().describe(e+" (. = this folder; asked when left out)"),gz=Qe({id:"projects.list",title:"Projects",summary:"list your projects, roots and the all-projects setting",input:g.object({}),output:bxe,cli:{name:"projects",action:"list",json:!0}}),tk=we({id:"projects.choose",title:"Choose the projects mapped at every start\u2026",summary:"tick the projects mapped at every start; the rest are excluded",input:g.object({}),output:rh,text:e=>e.message,cli:{name:"projects",action:"choose"}}),ob=we({id:"projects.add",title:"Add a project\u2026",summary:"remember a project folder",input:g.object({projectFolder:ek("The project folder")}),output:g.object({message:g.string().describe("What happened"),next:g.string().optional().describe("What to do next, when mapping all projects is off")}),text:e=>e.next?e.message+`
|
|
128
|
+
`+e.next:e.message,cli:{name:"projects",action:"add",positional:["projectFolder"]}}),rk=we({id:"projects.remove",title:"Forget project",summary:"forget a project (nothing in the folder is touched)",input:g.object({projectFolder:ek("The project folder")}),output:rh,danger:!0,text:e=>e.message,cli:{name:"projects",action:"remove",positional:["projectFolder"]}}),ok=we({id:"projects.include",title:"Include",summary:"map a project at every start again",input:g.object({projectFolder:ek("The project folder")}),output:rh,text:e=>e.message,cli:{name:"projects",action:"include",positional:["projectFolder"]}}),nk=we({id:"projects.exclude",title:"Exclude",summary:"leave a project out of the projects mapped at every start",input:g.object({projectFolder:ek("The project folder")}),output:rh,text:e=>e.message,cli:{name:"projects",action:"exclude",positional:["projectFolder"]}}),ik=we({id:"projects.all",title:"Map all projects at every start",summary:"map every project at every start, or not",input:g.object({state:g.enum(["on","off"]).optional().describe("on or off (left out: say which it is)")}),output:rh,text:e=>e.message,cli:{name:"projects",action:"all",positional:["state"]}}),Mu=we({id:"projects.roots",title:"Project roots",summary:"list, add or remove project roots",input:g.object({change:g.enum(["list","add","remove"]).default("list").describe("list, add or remove"),rootFolder:g.string().optional().describe("(add, remove) the folder that holds your projects")}),output:rh,text:e=>e.message,cli:{name:"projects",action:"roots",positional:["change","rootFolder"]}}),XX=C1(Mu.input).find(e=>e.name==="rootFolder"),yxe=C1(ob.input).find(e=>e.name==="projectFolder"),_xe="Every project in this folder (also new ones) opens without a restart.";function QX(e){return e.root?"root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"}function Ixe(e){return{id:"project:"+e.folder,label:e.folder,marked:e.here,icon:"project",hint:e.running??(e.root?"in a root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"),description:e.here?"This is the folder you started the menu in.":void 0,details:["At start "+QX(e),"In sandbox "+(e.running??"-")],cells:{here:e.here?"*":"",folder:e.folder,atStart:QX(e),running:e.running??"-"},actions:[he(rk,{projectFolder:e.folder},{key:"f",verb:"forget project",importance:1}),e.excluded?he(ok,{projectFolder:e.folder}):he(nk,{projectFolder:e.folder})]}}function wxe(e){return{id:"root:"+e,label:e,hint:"root",icon:"folder",description:_xe,keys:"f removes the root.",actions:[he(Mu,{change:"remove",rootFolder:e},{label:"Remove the root",key:"f",verb:"remove root",importance:1})]}}function Sxe(e){let t={id:"settings",facts:[{id:"all",label:"All projects",value:e.all?"on (every project below is mapped at every start, except excluded ones)":"off"},{id:"roots",label:"Roots",value:e.roots.length?e.roots.join(", "):"none (sandbox projects roots add <folder>)"}],actions:[he(ik,{state:e.all?"off":"on"},{label:e.all?"Stop mapping all projects":"Map all projects at every start"})],notes:[{text:"sandbox projects all on|off",tone:"muted",only:"cli"}]},r={id:"roots",title:"Project roots",items:[{id:"@add-root",label:"+ Add a project root\u2026",description:"Pick a folder that holds your projects: every project in it (also new ones) opens without a restart.",primary:he(Mu,{change:"add"},{label:"Choose the folder\u2026",verb:"choose folder",fields:[XX]})},...e.roots.map(wxe)]},n={id:"projects",title:"Projects",columns:[{key:"here",label:""},{key:"folder",label:"FOLDER"},{key:"atStart",label:"AT START"},{key:"running",label:"RUNNING SANDBOX"}],columnsOn:"cli",items:e.projects.map(Ixe),notes:e.projects.length===0?[{text:"No projects yet: start one with sandbox claude in its folder.",tone:"muted"}]:[{text:"* = this folder. Choose with: sandbox projects choose",tone:"muted",only:"cli"}]};return{title:"Projects",sections:[t,r,n],actions:[he(tk,{},{label:"Choose\u2026"}),he(ob,{},{fields:[yxe]}),he(Mu,{change:"add"},{label:"Add a project root\u2026",key:"a",verb:"add root",importance:1,fields:[XX]})]}}var YX=mt({id:"projects",title:"Projects",summary:"The projects a sandbox opens without a restart: roots, your projects, all or chosen.",queries:{projects:gz},operations:[tk,ob,rk,ok,nk,ik,Mu],build:({projects:e})=>Sxe(e)});var ak="@crash",kxe=1e3,eQ="sandbox logs is hand-written: --follow prints new lines until Ctrl+C; it reads this same query (readQuery)",Cxe=g.object({name:g.string().describe("The log file"),path:g.string().describe("Where it is on this PC"),bytes:g.number().describe("Its size in bytes"),modified:g.number().describe("When it was last written (ms)")}),Pxe=g.object({folder:g.string().describe("The folder the logs are in"),files:g.array(Cxe).describe("The log files, newest first"),crash:g.boolean().describe("A crash report exists")}),Dxe=g.object({name:g.string().describe("The log shown, or @crash for the last crash report (empty: there are no logs)"),file:g.string().describe("Its full path (empty: there are no logs)"),text:g.string().describe("The text read, made safe for a terminal"),next:g.number().describe("Where to read on from next time (bytes)")}),vz=Qe({id:"logs.list",title:"Logs",summary:"list the sandbox's own logs",input:g.object({}),output:Pxe,surfaces:{except:{cli:eQ}}}),xz=Qe({id:"logs.tail",title:"Log",summary:"the end of one log, followed as it grows",input:g.object({name:g.string().max(200).optional().describe("The log to show (default: the newest), or @crash for the last crash report"),from:g.number().int().min(0).default(0).describe("Read on from this byte (0: the end of the log)"),lines:g.number().int().min(1).max(1e3).default(120).describe("How many lines of the end to show")}),output:Dxe,live:{everyMs:1e3},surfaces:{except:{cli:eQ}}}),JX={text:"showing",tone:"accent"};function Rxe(e){let t=e.split(`
|
|
129
|
+
`);return t.length&&t[t.length-1]===""&&t.pop(),t.slice(-kxe)}function Exe(e,t){let r=t?.file?t:void 0,n=e.files.map(i=>({id:"log:"+i.name,label:i.name,hint:Xx(i.bytes)+" "+Tn(i.modified),keys:"Enter shows the end of this log in the terminal.",primary:Ja({kind:"view",view:"logs",params:{name:i.name}},"Show",{verb:"show"}),...r?.name===i.name?{badges:[JX]}:{}}));e.crash&&n.push({id:"log:"+ak,label:"Last crash report",description:"What Windows logged, this PC and the sandbox memory when the sandbox last ended in a crash.",primary:Ja({kind:"view",view:"logs",params:{name:ak}},"Show",{verb:"show"}),...r?.name===ak?{badges:[JX]}:{}});let o=r?[{id:"tail",title:r.name===ak?"Last crash report":r.name,summary:r.file,text:Rxe(r.text)}]:[];return{title:"Logs",sections:[{id:"files",items:n},...o],actions:[Ja({kind:"command",argv:["logs","--follow"]},"Follow the newest log",{key:"f",verb:"follow in the terminal",importance:2})],empty:{title:"No logs yet",text:"Logs appear after the first start.",cliText:"No sandbox logs yet."}}}var tQ=mt({id:"logs",title:"Logs",summary:"The sandbox's own logs: pick one to see its end as it grows.",queries:{files:vz,tail:xz},operations:[],params:["name"],inputs:e=>({tail:e.name?{name:e.name}:{}}),build:({files:e,tail:t})=>Exe(e,t)});var Txe=g.object({viewers:g.number(),remote:g.number()}),$xe=g.object({id:g.string().describe("The session"),launchId:g.string(),harness:g.string().describe("The agent"),cwd:g.string().describe("Its folder in the sandbox"),project:g.string().optional(),phase:g.enum(["starting","running","exited","failed"]).describe("What it is doing"),message:g.string(),updatedAt:g.string(),startedAt:g.string().describe("When it started"),conversation:g.string().optional(),exitCode:g.number().optional(),projectName:g.string().optional().describe("The project it runs in"),here:g.boolean().optional().describe("In the project of the current folder"),viewers:Txe.nullable().optional(),canOpen:g.boolean()}),Axe=g.object({sandboxRunning:g.boolean(),defaultAgent:g.string(),wide:g.boolean(),owner:g.string().optional(),sessions:g.array($xe)});function rQ(e){return e===void 0?"-":e===null?"unknown (older session)":e.remote+" here, "+(e.viewers-e.remote)+" in sandbox"}function Oxe(e){let t=(r,n)=>r.startedAt<n.startedAt?1:-1;return[...e.filter(r=>r.here).sort(t),...e.filter(r=>!r.here).sort(t)]}var bz=Qe({id:"sessions.list",title:"Sessions",summary:"list agent sessions and who is attached",input:g.object({wide:g.boolean().default(!1).describe("also show each session's folder")}),output:Axe,live:{everyMs:2500},cli:{name:"sessions",group:"Sessions",json:!0,flags:{wide:{flag:"--wide",noMenu:!0}},shapeJson:e=>e.sessions.map(({canOpen:t,...r})=>r)}}),sk=we({id:"sessions.restart",title:"Restart agents",summary:"restart this project's running agents in place; they resume their conversation",input:g.object({harness:g.string().optional().describe("only this agent"),all:g.boolean().default(!1).describe("every project's sessions, not only this folder's")}),output:g.object({message:g.string().describe("The sandbox's answer")}),text:e=>e.message,cli:{name:"restart",group:"Agents",flags:{harness:{flag:"--harness",shownAs:"--agent",value:"name",choices:"harnesses"},all:{flag:"--all"}}}});function zxe(e,t){let r=e.phase+(e.exitCode!==void 0?" ("+e.exitCode+")":""),n=e.phase==="running";return{id:e.id,label:e.harness+" "+(e.projectName??"-"),hint:r+" "+Tn(e.startedAt),badges:[{text:e.phase,tone:n?"ok":e.phase==="failed"?"danger":"muted"}],group:e.here?"This folder's project":"Other sessions",marked:e.here,icon:e.harness,description:n?"Opens this session's terminal (in a terminal, Ctrl+] detaches; the session keeps running).":void 0,details:["Session "+e.id,"Folder "+e.cwd,"Attached "+rQ(e.viewers)],cells:{here:e.here?"*":"",id:e.id,agent:e.harness,project:e.projectName??"-",state:r,attached:rQ(e.viewers),...t?{folder:e.cwd}:{},started:Tn(e.startedAt)},...n&&e.canOpen?{primary:Ja({kind:"terminal",session:e.id},"Open",{verb:"attach"})}:{},...n?{}:{disabled:"This session has ended."},...n&&!e.canOpen?{disabled:"Not reachable from this PC."}:{}}}function Nxe(e){let t=Oxe(e.sessions),r=e.defaultAgent,n=Ja({kind:"start-agent",agent:r},"Start "+r,{verb:"start"}),o=t.length&&!t.some(i=>i.phase==="running"||i.phase==="starting")?[{id:"start",actions:[{...n,description:"Starts "+r+" in this folder."}]}]:[];return{title:"Sessions",...e.owner?{notice:{text:e.owner,tone:"accent"}}:{},sections:[{id:"sessions",cards:!0,columns:[{key:"here",label:""},{key:"id",label:"ID"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"state",label:"STATE"},{key:"attached",label:"ATTACHED"},...e.wide?[{key:"folder",label:"FOLDER"}]:[],{key:"started",label:"STARTED"}],items:t.map(i=>zxe(i,e.wide)),notes:[...t.some(i=>i.here)?[{text:"* = the project of this folder",tone:"muted"}]:[],...e.wide?[]:[{text:"Folders: sandbox sessions --wide",tone:"muted",only:"cli"}]]},...o],actions:[...e.sandboxRunning?[{...n,label:"New session",key:"n",verb:"new session",importance:1}]:[],...t.length?[he(sk,{all:!1},{key:"r",verb:"restart agents",importance:1})]:[],Ja({kind:"command",argv:["resume"]},"Reopen last sessions",{key:"o",verb:"reopen last sessions",importance:2})],empty:{title:e.sandboxRunning?"No sessions":"No sandbox is running",text:e.sandboxRunning?"No agent is running. Start "+r+" in this folder.":"Starting "+r+" starts the sandbox too; its session is listed here.",action:n,cliText:"No sessions. Start one with: sandbox claude"}}}var oQ=mt({id:"sessions",title:"Sessions",summary:"The agent sessions of the running sandbox: open one, restart the agents.",queries:{sessions:bz},operations:[sk],build:({sessions:e})=>Nxe(e)});var Fxe=g.enum(["nordvpn","openvpn-file","wireguard-file"]).describe("Which VPN (setting vpn.provider)"),Lxe=g.enum(["none","saved","unreadable"]).describe("Whether a login is saved and can be opened by you"),Mxe=["The VPN is an alpha: a tunnel carrying traffic is not confirmed yet (docs/vpn.md lists what still needs checking).","The agent in the sandbox can read the VPN login (a service login you can revoke) and can turn the tunnel off, because it is the administrator there.","Free VPNs see all your traffic: use one you trust."];var Bxe=g.object({enabled:g.boolean().describe("The VPN is on (setting vpn.enabled)"),provider:Fxe,protocol:g.enum(["udp","tcp"]).describe("udp or tcp (setting vpn.protocol)"),country:g.string().describe("The NordVPN country; empty = the best server anywhere"),killSwitch:g.boolean().describe("No internet when the tunnel fails (setting vpn.killSwitch)"),login:Lxe,loginSavedAt:g.string().nullable().describe("When the login was saved (the date and time, never the login)"),running:g.object({level:g.enum(["ok","warn","bad"]).describe("How the tunnel is doing"),text:g.string().describe("What the sandbox reported")}).nullable().describe("The running sandbox's tunnel, when one runs with the VPN on")}),yz=Qe({id:"vpn.status",title:"VPN",summary:"the VPN settings, whether a login is saved, and the running tunnel",input:g.object({tunnel:g.boolean().default(!0).describe("also ask the running sandbox how its tunnel is doing (one request to api.ipify.org)")}),output:Bxe,cli:{name:"vpn",action:"status",json:!0}}),lk=we({id:"vpn.login",title:"Save the VPN login\u2026",summary:"save the VPN login (typed hidden, kept encrypted, never printed)",input:g.object({}).strict(),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"vpn",action:"login"}}),ck=we({id:"vpn.logout",title:"Delete the VPN login",summary:"delete the saved VPN login",input:g.object({}).strict(),output:g.object({deleted:g.boolean().describe("A login was saved and is gone"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"vpn",action:"logout"}}),jxe={nordvpn:"NordVPN","wireguard-file":"your own WireGuard .conf","openvpn-file":"your own .ovpn file"},Uxe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},Vxe={none:"warn",saved:"ok",unreadable:"danger"},Hxe={ok:"ok",warn:"warn",bad:"danger"};function Wxe(e){let t=e.provider==="wireguard-file",r=e.loginSavedAt?" "+e.loginSavedAt.slice(0,10):"",n=[e.enabled?{id:"vpn",label:"VPN",value:"on",tone:"ok"}:{id:"vpn",label:"VPN",value:"off (applies from the next start)",tone:"muted"},{id:"provider",label:"Provider",value:jxe[e.provider]},{id:"protocol",label:"Protocol",value:e.protocol},{id:"country",label:"Country",value:e.country||"best available"},e.killSwitch?{id:"killSwitch",label:"Kill switch",value:"on (no internet if the tunnel fails)"}:{id:"killSwitch",label:"Kill switch",value:"off",tone:"warn"},t?{id:"login",label:"Login",value:"not needed (the keys are in your config)",tone:"muted"}:{id:"login",label:"Login",value:Uxe[e.login]+r,tone:Vxe[e.login]},...e.running?[{id:"running",label:"Running now",value:e.running.text,tone:Hxe[e.running.level]}]:[]],o=[...!t&&e.login==="none"?[{text:"Next: sandbox vpn login",tone:"muted",only:"cli"}]:[],...e.login==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox vpn login",tone:"muted"}]:[],...Mxe.map(l=>({text:l,tone:"warn"}))],a=[he(es,{scope:"user",key:"vpn.enabled",value:!e.enabled},{label:e.enabled?"Turn the VPN off":"Turn the VPN on",verb:e.enabled?"turn off":"turn on",key:"o"}),...t?[]:[he(lk,{},{key:"v",verb:"save login"}),...e.login!=="none"?[he(ck,{},{key:"x",verb:"delete login"})]:[]]];return{title:"VPN",sections:[{id:"vpn",facts:n,notes:o,actions:a}]}}var nQ=mt({id:"vpn",title:"VPN",summary:"The sandbox's VPN: whether it is on, the saved login, and the tunnel.",queries:{status:yz},operations:[lk,ck,es],build:({status:e})=>Wxe(e)});var Zxe="https://github.com/settings/personal-access-tokens/new",ugt=["Open "+Zxe+" (a fine-grained personal access token).",'Under "Repository access" choose "Only select repositories" and pick only the ones the agent should reach.',"Give only the permissions it needs, for example Contents (read and write), Pull requests (read and write) and Actions (read).","Set an expiry date, then generate the token and copy it."],Gxe=["The agent in the sandbox can read the token and use it for everything it allows: limit it to some repositories and permissions.",'It is handed over only with github.shareToken on and git access "full". Revoke it on GitHub whenever you like.'],qxe=g.enum(["none","saved","unreadable"]).describe("Whether a token is saved and can be opened by you"),Kxe=g.object({shareToken:g.boolean().describe("Sandboxes get the token (setting github.shareToken)"),gitAccess:g.enum(["full","readonly","none"]).describe("Git access in your settings (provisioning.git.access)"),token:qxe,kind:g.enum(["fine-grained","classic"]).nullable().describe("What kind of token is saved (never the token)"),savedAt:g.string().nullable().describe("When the token was saved (the date and time, never the token)")}),_z=Qe({id:"github.status",title:"GitHub",summary:"whether sandboxes get your GitHub token, and whether one is saved (never the token)",input:g.object({}).strict(),output:Kxe,cli:{name:"github",action:"status",json:!0}}),dk=we({id:"github.login",title:"Save the GitHub token\u2026",summary:"save a GitHub token for sandboxes (typed hidden, kept encrypted, never printed)",input:g.object({}).strict(),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"github",action:"login"}}),uk=we({id:"github.logout",title:"Delete the GitHub token",summary:"delete the saved GitHub token",input:g.object({}).strict(),output:g.object({deleted:g.boolean().describe("A token was saved and is gone"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"github",action:"logout"}}),Xxe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},Qxe={none:"warn",saved:"ok",unreadable:"danger"},Yxe={"fine-grained":"fine-grained",classic:"classic (reaches every repository you can: a fine-grained token is safer)"};function Jxe(e){let t=e.savedAt?" "+e.savedAt.slice(0,10):"",r=[e.shareToken?{id:"share",label:"Share with sandboxes",value:"on",tone:"ok"}:{id:"share",label:"Share with sandboxes",value:"off (turn on: sandbox config set github.shareToken true)"},e.gitAccess==="full"?{id:"gitAccess",label:"Git access",value:"full"}:{id:"gitAccess",label:"Git access",value:e.gitAccess+' (the token is only handed over with "full")',tone:"warn"},{id:"token",label:"Token",value:Xxe[e.token]+t,tone:Qxe[e.token]},...e.kind?[{id:"kind",label:"Kind",value:Yxe[e.kind],...e.kind==="classic"?{tone:"warn"}:{}}]:[]],n=[...e.token==="none"?[{text:"Next: sandbox github login",tone:"muted",only:"cli"}]:[],...e.token==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox github login",tone:"muted"}]:[],...Gxe.map(a=>({text:a,tone:"muted"}))],o=[he(dk,{},{key:"g",verb:"save token"}),...e.token!=="none"?[he(uk,{},{key:"x",verb:"delete token"})]:[]];return{title:"GitHub",sections:[{id:"github",facts:r,notes:n,actions:o}]}}var iQ=mt({id:"github",title:"GitHub",summary:"A GitHub token for sandboxes: whether they get it, and the saved token.",queries:{status:_z},operations:[dk,uk],build:({status:e})=>Jxe(e)});var ebe=g.object({version:g.string().describe("The version that failed"),reason:g.string().describe("Why it failed, in one sentence")}),tbe=g.object({managed:g.boolean().describe("Installed by the installer, so it can update itself"),version:g.string().describe("The version installed"),scope:g.enum(["user","machine"]).nullable().describe("Installed for you, or for everyone on this PC"),autoUpdate:g.boolean().describe("New versions install by themselves"),autoOffText:g.string().nullable().describe("Why automatic updates were turned off, if they were"),previous:g.string().nullable().describe("The version an update replaced (roll back goes there)"),failed:ebe.nullable().describe("The last update that failed"),npmCommand:g.string().describe("How an npm install is updated"),error:g.string().nullable().describe("Why the status could not be read"),settings:g.object({pending:g.array(g.string()).describe('Each change still to make, as "name: what it does"'),error:g.string().nullable().describe("Why your saved settings could not be read")}).describe("Changes still to make to your saved settings")}),Iz=Qe({id:"updates.status",title:"Updates",summary:"which version is installed and what your saved settings still need",input:g.object({}),output:tbe,surfaces:{except:{cli:"no command shows this page; sandbox update --check and --version cover the command line"}}}),aQ=g.object({line:g.string().describe("What happened, in one sentence")}),ts=we({id:"updates.update",title:"Update now",summary:"install the newest version, or check, go back, or switch automatic updates",input:g.object({check:g.boolean().default(!1).describe("only look whether a newer version exists"),rollback:g.boolean().default(!1).describe("go back to the version before the last update"),auto:g.enum(["on","off"]).optional().describe("install new versions by themselves (for everyone on this PC: needs an admin terminal)"),unattended:g.boolean().default(!1).describe("used by automatic updates: no questions, short output"),feed:g.string().optional().describe("take the release from this folder (a feed.json and the package) instead of GitHub")}),output:aQ.extend({latest:g.string().nullable().describe("The newer version a check found")}),danger:!0,text:e=>e.line,cli:{name:"update",group:"Health",flags:{check:{flag:"--check"},rollback:{flag:"--rollback"},auto:{flag:"--auto",value:"on|off"},unattended:{flag:"--unattended",noMenu:!0,advanced:!0},feed:{flag:"--feed",value:"folder",noMenu:!0,advanced:!0}},yes:"(--rollback) do not ask first"}}),nb=we({id:"updates.migrate",title:"Update saved settings",summary:"bring your saved settings up to date with this version",input:g.object({dryRun:g.boolean().default(!1).describe("only list what would change"),restore:g.string().optional().describe("put back the files saved before an update (a folder under <storage>\\backups)")}),output:aQ,text:e=>e.line,cli:{name:"migrate",group:"Health",flags:{dryRun:{flag:"--dry-run"},restore:{flag:"--restore",value:"backup",advanced:!0}},yes:"(--restore) do not ask first"}}),Bc=(e,t,r={})=>({id:"updates:"+e,label:t,...r});function rbe(e,t){let r=e.managed&&!e.error,n=e.scope==="machine",o=e.autoUpdate?"off":"on",i=he(ts,{rollback:!0},{label:"Roll back",verb:"go back"}),a={id:"program",title:"This program",notes:[{text:"After an update this page still runs the version it started with; sandbox web open (or the next sandbox start) starts the new one.",tone:"muted",only:"web"}],items:e.error?[{id:"updates:error",label:e.error,tone:"danger"}]:e.managed?[Bc("version","Version",{hint:e.version,description:"Installed "+(n?"for everyone on this PC":"for you")+"."}),Bc("latest","Newest version",{hint:t??"not looked yet",tone:t?"warn":"muted",keys:t?"Enter installs it.":"Enter looks on GitHub for a newer version.",primary:t?he(ts,{},{label:"Install "+t,verb:"install"}):he(ts,{check:!0},{label:"Check now",verb:"look",danger:!1})}),Bc("auto","Automatic updates",{hint:e.autoUpdate?"on":"off",tone:e.autoUpdate?"ok":"muted",description:n?"For everyone: needs an admin terminal.":"A new version installs when no sandbox runs.",keys:"Enter switches them.",primary:he(ts,{auto:o},{label:"Automatic updates "+o,verb:"switch",danger:!1}),actions:[he(ts,{auto:o},{key:"a",label:"Automatic updates "+o,verb:"automatic on/off",danger:!1})]}),...e.autoOffText?[Bc("autooff","Automatic updates turned off",{hint:"off",tone:"warn",description:e.autoOffText,details:[e.autoOffText]})]:[],...e.previous?[Bc("previous","Previous version",{hint:e.previous,keys:"Enter goes back to it.",primary:i,actions:[{...i,key:"r",verb:"roll back"}]})]:[],...e.failed?[Bc("failed","Last failed update",{hint:e.failed.version,tone:"danger",description:e.failed.reason,details:[e.failed.reason,"It is not tried again until a newer version is released."]})]:[]]:[Bc("version","Version",{hint:e.version,description:"Installed with npm, so npm updates it: "+e.npmCommand}),Bc("npm","Update",{hint:"with npm",tone:"muted",description:"Run "+e.npmCommand+" in a terminal."})]},s=e.settings.pending,c={id:"settings",title:"Saved settings",items:e.settings.error?[{id:"settings:error",label:e.settings.error,tone:"danger"}]:s.length?s.map((d,u)=>({id:"settings:"+u,label:d.split(":")[0],hint:"to update",tone:"warn",description:"A backup is kept first.",keys:"Enter updates your saved settings.",details:[d],primary:he(nb,{},{label:"Update saved settings",verb:"update"}),actions:[he(nb,{},{key:"s",label:"Update saved settings",verb:"update saved settings"})]})):[{id:"settings:none",label:"Up to date",hint:"OK",tone:"ok",description:"Nothing to update."}]};return{title:"Updates",sections:[a,c],actions:r?[he(ts,{check:!0},{key:"c",label:"Check now",verb:"check now",danger:!1}),he(ts,{},{key:"u",label:"Update now",verb:"update now"})]:[]}}var sQ=mt({id:"updates",title:"Updates",summary:"Which version is installed, installing a newer one, and bringing your saved settings up to date.",queries:{status:Iz},operations:[ts,nb],build:({status:e})=>rbe(e,null)});var fk={except:{web:"the page is the web UI"}},obe=g.object({running:g.boolean().describe("The web UI server answers"),port:g.number().nullable().describe("Its port on 127.0.0.1, when it runs"),address:g.string().nullable().describe("Its address (without the login token), when it runs")}),nbe=g.object({message:g.string().describe("What happened")}),wz=Qe({id:"web.status",title:"Web UI",summary:"whether the web UI server runs, and its address",input:g.object({}),output:obe,surfaces:fk,text:e=>e.running&&e.port?"The web UI is running at http://127.0.0.1:"+e.port+"/ (sandbox web open signs you in).":"The web UI is not running (sandbox web start).",cli:{name:"web",action:"status",json:!0}}),mk=we({id:"web.start",title:"Start the web UI",summary:"start the web UI server in the background (this PC only)",input:g.object({}),output:g.object({port:g.number().describe("Its port"),message:g.string().describe("What happened")}),surfaces:fk,text:e=>e.message,cli:{name:"web",action:"start"}}),pk=we({id:"web.open",title:"Open the web UI",summary:"start the web UI if needed and open it in your browser, signed in",input:g.object({}),output:nbe,surfaces:fk,text:e=>e.message,cli:{name:"web",action:"open"}}),hk=we({id:"web.stop",title:"Stop the web UI",summary:"stop the web UI server",input:g.object({}),output:g.object({stopped:g.boolean().describe("It was running and stopped"),message:g.string().describe("What happened")}),surfaces:fk,text:e=>e.message,cli:{name:"web",action:"stop"}});function ibe(e){let t=he(pk,{},{key:"o",verb:"open"}),r=he(mk,{},{key:"s",verb:"start"}),n=he(hk,{},{key:"x",verb:"stop"});return{title:"Web UI",sections:[{id:"web",facts:[{id:"running",label:"Running",value:e.running?"yes":"no",tone:e.running?"ok":"muted"},...e.address?[{id:"address",label:"Address",value:e.address+" (this PC only)"}]:[]],actions:e.running?[t,n]:[r,t],notes:[{text:"Loopback only, behind a token. Open signs you in.",tone:"muted"}]}]}}var lQ=mt({id:"web",title:"Web UI",summary:"The web UI server on this PC: start, open, stop.",queries:{status:wz},operations:[mk,pk,hk],build:({status:e})=>ibe(e)});var cQ=[G1,Q1,Y1,J1,sk,rz,E1,T1,$1,es,U1,Jx,eb,Qx,A1,O1,z1,N1,H1,W1,Z1,tk,ob,rk,ok,nk,ik,Mu,tb,rb,q1,K1,X1,ts,nb,F1,L1,Lu,M1,B1,mk,pk,hk,lk,ck,dk,uk],dQ=[hz,bz,tz,lz,RX,eh,nz,cz,gz,mz,pz,iz,az,vz,xz,Iz,dz,zX,uz,wz,yz,_z],abe=[KX,oQ,kX,TX,CX,$X,YX,UX,ZX,PX,tQ,sQ,NX,lQ,nQ,iQ],Ngt=[...cQ,...dQ];function gk(e){return cQ.find(t=>t.id===e)}function Bu(e){return dQ.find(t=>t.id===e)}function uQ(e){return abe.find(t=>t.id===e)}function vk(e){return e.flatMap(t=>[t,...vk(t.children??[])])}function fQ(e){return vk(e).flatMap(t=>t.view?[t.view]:[])}var oh=[{label:"Agents",view:"agents"},{label:"Sessions",view:"sessions"},{label:"Sandbox",children:[{label:"Status",view:"sandbox"},{label:"Projects",view:"projects"}]},{label:"Apps",view:"apps"},{label:"Settings",children:[{label:"All settings",view:"settings"},{label:"VPN",view:"vpn"},{label:"GitHub",view:"github"}]},{label:"Accounts",view:"accounts"},{label:"Maintenance",children:[{label:"Updates",view:"updates"},{label:"Data",view:"data"},{label:"Storage",view:"storage"},{label:"Health",view:"health"},{label:"Logs",view:"logs"},{label:"Engine",view:"engine"},{label:"More",elsewhere:"The less common commands are in the menu (sandbox > Maintenance)."}]}];var xk=b(O(),1),bk={Agents:xE,Sessions:Qs,Sandbox:cp,Apps:XR,Settings:bE,Accounts:kE,Maintenance:SE},sbe={project:Uv,folder:Hv,database:nE,session:Qs},lbe={claude:"orange",codex:"dark",gemini:"blue",opencode:"gray",qwen:"violet",crush:"pink",copilot:"teal",kilo:"yellow",amp:"red",cline:"cyan",continue:"grape",kimi:"indigo",aider:"green",deepseek:"blue",reasonix:"lime"};function ju({name:e,size:t=36}){let r=sbe[e];return r?(0,xk.jsx)(Wd,{size:t,radius:"md",color:"indigo",variant:"light",children:(0,xk.jsx)(r,{size:t*.55,stroke:1.6})}):(0,xk.jsx)(Wd,{size:t,radius:"md",color:lbe[e]??"indigo",variant:"filled",fw:700,children:e.slice(0,1).toUpperCase()})}var yk=b(R(),1),cbe="sessions";function dbe(e,t=""){let r=/^\/s\/([A-Za-z0-9_-]{1,64})\/?$/.exec(e);if(r)return{page:"terminal",id:r[1]};let n=/^\/v\/([a-z][a-z0-9-]{0,40})\/?$/.exec(e),o=Object.fromEntries(new URLSearchParams(t));return{page:"view",view:n?n[1]:cbe,params:o}}function nn(e,t={}){let r=new URLSearchParams(t).toString();return"/v/"+e+(r?"?"+r:"")}function vo(e){history.pushState(null,"",e),window.dispatchEvent(new PopStateEvent("popstate"))}function mQ(){let[e,t]=(0,yk.useState)({path:location.pathname,search:location.search});return(0,yk.useEffect)(()=>{let r=()=>t({path:location.pathname,search:location.search});return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),dbe(e.path,e.search)}var os=b(R(),1);var wk=b(R(),1);var rs=b(R(),1);var vt=b(O(),1),ube={ask:()=>Promise.resolve(void 0)};function pQ(e,t){if(!t||!/^[A-Za-z]:\\|^\\\\/.test(t))return;if(e==="dir")return t;let r=t.lastIndexOf("\\");return r>2?t.slice(0,r):t.slice(0,3)}function fbe({kind:e,initial:t,done:r}){let n=Ik(),[o,i]=(0,rs.useState)(null),[a,s]=(0,rs.useState)(pQ(e,t)??""),[l,c]=(0,rs.useState)(e==="file"?t??null:null),[d,u]=(0,rs.useState)(null),[f,m]=(0,rs.useState)(!1),p=(0,rs.useCallback)(x=>{m(!0),u(null),mbe(n,x,e==="file").then(v=>{i(v),s(v.path),c(null),m(!1)},v=>{u(v instanceof Error?v.message:"That folder cannot be opened."),m(!1)})},[n,e]);(0,rs.useEffect)(()=>p(pQ(e,t)),[p,e,t]);let h=e==="dir"?l??o?.path??"":l??"",y=x=>{x.key==="Enter"&&(x.preventDefault(),p(a.trim()||void 0))};return(0,vt.jsxs)(je,{gap:"sm",children:[(0,vt.jsxs)(De,{gap:"xs",wrap:"nowrap",children:[(0,vt.jsx)(kt,{label:"Up one folder",children:(0,vt.jsx)(bt,{size:"lg",variant:"default","aria-label":"Up one folder",disabled:!o?.path,onClick:()=>p(o?.parent??void 0),children:(0,vt.jsx)(YR,{size:16})})}),(0,vt.jsx)(er,{style:{flex:1},value:a,placeholder:"Type a path and press Enter",onChange:x=>s(x.currentTarget.value),onKeyDown:y,ff:"monospace","aria-label":"Folder",rightSection:f?(0,vt.jsx)(uo,{size:14}):null})]}),d&&(0,vt.jsx)(Oa,{color:"red",variant:"light",p:"xs",children:d}),(0,vt.jsxs)(De,{align:"stretch",gap:"sm",wrap:"nowrap",children:[(0,vt.jsxs)(je,{gap:2,w:170,visibleFrom:"xs",style:{flex:"none"},children:[(0,vt.jsx)(ye,{size:"xs",fw:650,c:"dimmed",tt:"uppercase",px:6,pb:4,children:"Places"}),(o?.places??[]).map(x=>(0,vt.jsxs)("div",{className:"picker-entry",onClick:()=>p(x.path),title:x.path,children:[x.label.endsWith(":")?(0,vt.jsx)(jv,{size:16}):(0,vt.jsx)(Uv,{size:16}),(0,vt.jsx)(ye,{size:"sm",truncate:!0,children:x.label})]},x.path))]}),(0,vt.jsxs)($r,{className:"picker-list",style:{flex:1},type:"auto",children:[!o?.path&&(0,vt.jsx)(ye,{size:"sm",c:"dimmed",p:"md",children:"Pick a place on the left, or type a path."}),o?.path&&o.entries.length===0&&(0,vt.jsx)(ye,{size:"sm",c:"dimmed",p:"md",children:e==="dir"?"No folders in here.":"Nothing in here."}),o?.entries.map(x=>(0,vt.jsxs)("div",{className:"picker-entry","data-selected":l===x.path,onClick:()=>c(x.path),onDoubleClick:()=>x.kind==="dir"?p(x.path):r(x.path),children:[x.kind==="dir"?(0,vt.jsx)(Hv,{size:16,color:"var(--mantine-color-yellow-6)"}):(0,vt.jsx)(cE,{size:16,color:"var(--app-muted)"}),(0,vt.jsx)(ye,{size:"sm",truncate:!0,children:x.name})]},x.path)),o?.truncated&&(0,vt.jsx)(ye,{size:"xs",c:"dimmed",p:"sm",children:"Only the first entries are shown: type the rest of the path."})]})]}),(0,vt.jsxs)(De,{justify:"space-between",wrap:"nowrap",gap:"sm",children:[(0,vt.jsx)(ye,{size:"xs",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:h||(e==="file"?"Pick a file":"Pick a folder")}),(0,vt.jsxs)(De,{gap:"xs",wrap:"nowrap",style:{flex:"none"},children:[(0,vt.jsx)(ht,{variant:"default",onClick:()=>r(void 0),children:"Cancel"}),(0,vt.jsx)(ht,{disabled:!h,onClick:()=>r(h),children:e==="dir"?"Choose this folder":"Choose"})]})]})]})}function mbe(e,t,r){return e.call("files.browse",{path:t,files:r},ube)}function _k(e,t,r){return new Promise(n=>{let o=!1,i=s=>{o||(o=!0,Ua.close(a),n(s))},a=Ua.open({title:r??(e==="dir"?"Choose a folder":"Choose a file"),size:"xl",onClose:()=>i(void 0),children:(0,vt.jsx)(fbe,{kind:e,initial:t,done:i})})})}var rr=b(O(),1);function hQ(e){return e.kind==="confirm"?!1:void 0}function pbe({question:e,said:t,done:r}){let[n,o]=(0,wk.useState)(e.kind==="text"||e.kind==="path"?e.initial??"":""),[i,a]=(0,wk.useState)(e.kind==="choose"?e.initial??e.choices[0]?.value??"":""),[s,l]=(0,wk.useState)(e.kind==="checklist"?[...e.checked??[]]:[]),c=[...t,...e.lines??[]],d="problem"in e?e.problem:void 0,u=e.kind!=="confirm"||!e.typed||n.trim().toLowerCase()===e.typed;return(0,rr.jsx)("form",{onSubmit:m=>{m.preventDefault(),e.kind==="confirm"?r(u):e.kind==="choose"?r(i):e.kind==="checklist"?r(s):r(n===""&&e.kind==="text"&&!e.allowEmpty?void 0:n)},children:(0,rr.jsxs)(je,{gap:"sm",children:[c.map((m,p)=>(0,rr.jsx)(ye,{size:"sm",children:m},p)),d&&(0,rr.jsx)(Oa,{color:"orange",variant:"light",p:"xs",children:d}),e.kind==="confirm"&&e.typed&&(0,rr.jsx)(er,{label:'Type "'+e.typed+'" to confirm',value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="choose"&&(0,rr.jsx)(Us.Group,{value:i,onChange:a,children:(0,rr.jsx)(je,{gap:"xs",children:e.choices.map(m=>(0,rr.jsx)(Us,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="checklist"&&(0,rr.jsx)(Ns.Group,{value:s,onChange:l,children:(0,rr.jsx)(je,{gap:"xs",children:e.choices.map(m=>(0,rr.jsx)(Ns,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="text"&&(0,rr.jsx)(er,{value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="path"&&(0,rr.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-end",children:[(0,rr.jsx)(er,{style:{flex:1},ff:"monospace",value:n,onChange:m=>o(m.currentTarget.value),description:"The full path of a "+(e.pathKind==="file"?"file":"folder")+" on this PC","data-autofocus":!0}),(0,rr.jsx)(kt,{label:e.pathKind==="file"?"Choose a file":"Choose a folder",children:(0,rr.jsx)(bt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{_k(e.pathKind,n||void 0).then(m=>m&&o(m))},children:(0,rr.jsx)(Vv,{size:18,stroke:1.6})})})]}),e.kind==="secret"&&(0,rr.jsx)(Xd,{value:n,onChange:m=>o(m.currentTarget.value),autoComplete:"new-password","data-autofocus":!0}),(0,rr.jsxs)(De,{justify:"flex-end",children:[(0,rr.jsx)(ht,{variant:"default",onClick:()=>r(hQ(e)),children:"Cancel"}),(0,rr.jsx)(ht,{type:"submit",color:e.kind==="confirm"&&e.danger?"red":void 0,disabled:!u,children:e.kind==="confirm"?e.yes??"Yes":"OK"})]})]})})}function gQ(e,t=[]){return new Promise(r=>{let n=!1,o=a=>{n||(n=!0,Ua.close(i),r(a))},i=Ua.open({title:e.title,centered:!0,onClose:()=>o(hQ(e)),children:(0,rr.jsx)(pbe,{question:e,said:t,done:o})})})}var bQ=b(O(),1),vQ=(0,os.createContext)(null);function xQ({client:e,children:t}){return(0,bQ.jsx)(vQ.Provider,{value:e,children:t})}function Ik(){let e=(0,os.useContext)(vQ);if(!e)throw new Error("useRpc needs an RpcProvider");return e}var hbe={ask:()=>Promise.resolve(void 0)};function ol(e,t){let r=Ik(),n=Hm(),o=e.live!==void 0,i=JSON.stringify(t??{}),[a,s]=(0,os.useState)(null),l=GR({queryKey:[e.id,i],queryFn:()=>r.call(e.id,t,hbe),enabled:!o});(0,os.useEffect)(()=>{if(o)return r.subscribe(e.id,JSON.parse(i),d=>{s(null),n.setQueryData([e.id,i],d)},s)},[r,n,e.id,i,o]);let c=a??l.error;return{data:l.data,error:c,pending:l.data===void 0&&!c}}function Sk(){let e=Ik(),t=Hm();return(0,os.useCallback)(async(r,n={},o={})=>{let i=gk(r.op),a="op-"+Date.now(),s=[],l=!1;try{let c=await e.call(r.op,{...r.input,...n},{progress:f=>{let m={id:a,title:r.label,message:f,loading:!0,autoClose:!1};l?Xo.update(m):Xo.show(m),l=!0},log:f=>s.push(f),ask:f=>gQ(f,s.splice(0))}),d=i?.text?.(c)??"Done.",u={id:a,title:o.inline?void 0:r.label,message:d,color:"green",loading:!1,autoClose:o.inline?2500:5e3};return l?Xo.update(u):Xo.show(u),{ok:!0,text:d,output:c}}catch(c){if(l&&Xo.hide(a),c instanceof Kx)return{ok:!1,cancelled:!0,message:"Cancelled."};let d=c instanceof Error?c.message:"It did not work.",u=c.fix??(s.length?s.join(" "):void 0);return o.inline||Xo.show({title:d,message:u,color:"red",autoClose:1e4}),{ok:!1,message:d,fix:u}}finally{await t.invalidateQueries()}},[e,t])}var gbe=2,vbe=1,yQ=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),i=window.getComputedStyle(this._terminal.element),a={top:parseInt(i.getPropertyValue("padding-top")),bottom:parseInt(i.getPropertyValue("padding-bottom")),right:parseInt(i.getPropertyValue("padding-right")),left:parseInt(i.getPropertyValue("padding-left"))},s=a.top+a.bottom,l=a.right+a.left,c=n-s,d=o-l-t;return{cols:Math.max(gbe,Math.floor(d/e.css.cell.width)),rows:Math.max(vbe,Math.floor(c/e.css.cell.height))}}};var xbe=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?_Q.isErrorNoTelemetry(e)?new _Q(e.message+`
|
|
130
|
+
|
|
131
|
+
`+e.stack):new Error(e.message+`
|
|
132
|
+
|
|
133
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},bbe=new xbe;function Sz(e){ybe(e)||bbe.onUnexpectedError(e)}var Pz="Canceled";function ybe(e){return e instanceof _be?!0:e instanceof Error&&e.name===Pz&&e.message===Pz}var _be=class extends Error{constructor(){super(Pz),this.name=this.message}},_Q=class Dz extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Dz)return t;let r=new Dz;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function Ibe(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var wbe=class AQ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(AQ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=Ibe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};wbe.assertInvariants=!1;var Rz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Rz||(Rz={}));function Sbe(e,t){return(r,n)=>t(e(r),e(n))}var kbe=(e,t)=>e-t,IQ=class Ez{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Ez(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new Ez(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Rz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};IQ.empty=new IQ(e=>{});function Cbe(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var wQ,SQ,avt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[wQ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(SQ=Symbol.iterator,wQ=Symbol.toStringTag,SQ)](){return this.values()}},Pbe=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function Dbe(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var Tz;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function y(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=y;function*x(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=x;function v(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=v;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(Tz||(Tz={}));var Rbe=!1,ih=null,Ebe=class OQ{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:OQ.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
134
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new Pbe;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
135
|
+
`),l)}n.sort(Sbe(l=>l.idx,kbe));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
136
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
137
|
+
`)),p=Cbe([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
141
|
+
${d.join(`
|
|
142
|
+
`)}
|
|
143
|
+
============================================================
|
|
144
|
+
|
|
145
|
+
`}return n.length>t&&(a+=`
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
... and ${n.length-t} more leaking disposables
|
|
149
|
+
|
|
150
|
+
`),{leaks:n,details:a}}};Ebe.idx=0;function Tbe(e){ih=e}if(Rbe){let e="__is_disposable_tracked__";Tbe(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==is.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==is.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function $k(e){return ih?.trackDisposable(e),e}function Ak(e){ih?.markAsDisposed(e)}function ab(e,t){ih?.setParent(e,t)}function $be(e,t){if(ih)for(let r of e)ih.setParent(r,t)}function ib(e){if(Tz.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function zQ(...e){let t=ah(()=>ib(e));return $be(e,t),t}function ah(e){let t=$k({dispose:Dbe(()=>{Ak(t),e()})});return t}var NQ=class FQ{constructor(){this._toDispose=new Set,this._isDisposed=!1,$k(this)}dispose(){this._isDisposed||(Ak(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ib(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return ab(t,this),this._isDisposed?FQ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),ab(t,null))}};NQ.DISABLE_DISPOSED_WARNING=!1;var Lz=NQ,is=class{constructor(){this._store=new Lz,$k(this),ab(this._store,this)}dispose(){Ak(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};is.None=Object.freeze({dispose(){}});var Ek=class{constructor(){this._isDisposed=!1,$k(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&ab(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Ak(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&ab(e,null),e}},kQ=class $z{constructor(t){this.element=t,this.next=$z.Undefined,this.prev=$z.Undefined}};kQ.Undefined=new kQ(void 0);var Abe=globalThis.performance&&typeof globalThis.performance.now=="function",Obe=class LQ{static create(t){return new LQ(t)}constructor(t){this._now=Abe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},zbe=!1,CQ=!1,Nbe=!1,Tk;(e=>{e.None=()=>is.None;function t(T){if(Nbe){let{onDidAddListener:k}=T,$=zz.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=zQ(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new ns(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,ge=0,me,X={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{ge++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||ge>1)&&oe.fire(se),ge=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&ge>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(X);let oe=new ns(X);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function y(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ns({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=y;function x(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==v&&$.call(C,U)},void 0,A)}}e.chain=x;let v=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:v),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:v}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===v)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new ns({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new ns({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ns;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new ns(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function q(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof Lz?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=q})(Tk||(Tk={}));var Az=class Oz{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Oz._idPool++}`,Oz.all.add(this)}start(t){this._stopWatch=new Obe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Az.all=new Set,Az._idPool=0;var Fbe=Az,PQ=-1,MQ=class BQ{constructor(t,r,n=(BQ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new Mbe(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};MQ._idPool=1;var Lbe=MQ,zz=class jQ{constructor(t){this.value=t}static create(){let t=new Error;return new jQ(t.stack??"")}print(){console.warn(this.value.split(`
|
|
151
|
+
`).slice(2).join(`
|
|
152
|
+
`))}},Mbe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Bbe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},jbe=0,Ck=class{constructor(e){this.value=e,this.id=jbe++}},Ube=2,Vbe=(e,t)=>{if(e instanceof Ck)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},Pk;if(zbe){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
153
|
+
`)),e.length=0)},3e3),Pk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ns=class{constructor(e){this._size=0,this._options=e,this._leakageMon=PQ>0||this._options?.leakWarningThreshold?new Lbe(e?.onListenerError??Sz,this._options?.leakWarningThreshold??PQ):void 0,this._perfMon=this._options?._profName?new Fbe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(CQ){let e=this._listeners;queueMicrotask(()=>{Vbe(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Bbe(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Sz)(c),is.None}if(this._disposed)return is.None;t&&(e=e.bind(t));let n=new Ck(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=zz.create(),o=this._leakageMon.check(n.stack,this._size+1)),CQ&&(n.stack=i??zz.create()),this._listeners?this._listeners instanceof Ck?(this._deliveryQueue??(this._deliveryQueue=new Hbe),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=ah(()=>{Pk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof Lz?r.add(a):Array.isArray(r)&&r.push(a),Pk){let s=new Error().stack.split(`
|
|
154
|
+
`).slice(2,3).join(`
|
|
155
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);Pk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*Ube<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Sz;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ck)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Hbe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},UQ=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),DQ;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof Wbe?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tk.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:UQ})})(DQ||(DQ={}));var Wbe=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?UQ:(this._emitter||(this._emitter=new ns),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},nh="en",Nz=!1,Fz=!1,Dk=!1,Zbe=!1,Gbe=!1,VQ=!1,qbe=!1,Kbe=!1,Xbe=!1,Qbe=!1,kk,Rk=nh,RQ=nh,Ybe,nl,il=globalThis,Gn;typeof il.vscode<"u"&&typeof il.vscode.process<"u"?Gn=il.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Gn=process);var HQ=typeof Gn?.versions?.electron=="string",Jbe=HQ&&Gn?.type==="renderer";if(typeof Gn=="object"){Nz=Gn.platform==="win32",Fz=Gn.platform==="darwin",Dk=Gn.platform==="linux",Zbe=Dk&&!!Gn.env.SNAP&&!!Gn.env.SNAP_REVISION,qbe=HQ,Xbe=!!Gn.env.CI||!!Gn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,kk=nh,Rk=nh;let e=Gn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);kk=t.userLocale,RQ=t.osLocale,Rk=t.resolvedLanguage||nh,Ybe=t.languagePack?.translationsConfigFile}catch{}Gbe=!0}else typeof navigator=="object"&&!Jbe?(nl=navigator.userAgent,Nz=nl.indexOf("Windows")>=0,Fz=nl.indexOf("Macintosh")>=0,Kbe=(nl.indexOf("Macintosh")>=0||nl.indexOf("iPad")>=0||nl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Dk=nl.indexOf("Linux")>=0,Qbe=nl?.indexOf("Mobi")>=0,VQ=!0,Rk=globalThis._VSCODE_NLS_LANGUAGE||nh,kk=navigator.language.toLowerCase(),RQ=kk):console.error("Unable to resolve platform.");var kz=0;Fz?kz=1:Nz?kz=3:Dk&&(kz=2);var eye=VQ&&typeof il.importScripts=="function",svt=eye?il.origin:void 0,as=nl,jc=Rk,EQ;(e=>{function t(){return jc}e.value=t;function r(){return jc.length===2?jc==="en":jc.length>=3?jc[0]==="e"&&jc[1]==="n"&&jc[2]==="-":!1}e.isDefaultVariant=r;function n(){return jc==="en"}e.isDefault=n})(EQ||(EQ={}));var tye=typeof il.postMessage=="function"&&!il.importScripts,rye=(()=>{if(tye){let e=[];il.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),il.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),oye=!!(as&&as.indexOf("Chrome")>=0),lvt=!!(as&&as.indexOf("Firefox")>=0),cvt=!!(!oye&&as&&as.indexOf("Safari")>=0),dvt=!!(as&&as.indexOf("Edg/")>=0),uvt=!!(as&&as.indexOf("Android")>=0);function WQ(e,t=0,r){let n=setTimeout(()=>{e(),r&&o.dispose()},t),o=ah(()=>{clearTimeout(n),r?.deleteAndLeak(o)});return r?.add(o),o}var nye,Cz;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Cz=(e,t)=>{rye(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:Cz=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},nye=e=>Cz(globalThis,e)})();var TQ;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(TQ||(TQ={}));var $Q=class Ci{static fromArray(t){return new Ci(r=>{r.emitMany(t)})}static fromPromise(t){return new Ci(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Ci(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Ci(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ns,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Tk.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Ci(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Ci.map(this,t)}static filter(t,r){return new Ci(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Ci.filter(this,t)}static coalesce(t){return Ci.filter(t,r=>!!r)}coalesce(){return Ci.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Ci.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};$Q.EMPTY=$Q.fromArray([]);var iye=class extends is{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new Ek),this._linesCacheDisposables=this._register(new Ek),this._register(ah(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=zQ(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=WQ(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let r=[],n=[0],o=this._terminal.buffer.active.getLine(e);for(;o;){let i=this._terminal.buffer.active.getLine(e+1),a=i?i.isWrapped:!1,s=o.translateToString(!a&&t);if(a&&i){let l=o.getCell(o.length-1);l&&l.getCode()===0&&l.getWidth()===1&&i.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(r.push(s),a)n.push(n[n.length-1]+s.length);else break;e++,o=i}return[r.join(""),n]}},aye=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},sye=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,r,n){if(!e||e.length===0){this._terminal.clearSelection();return}if(r>this._terminal.cols)throw new Error(`Invalid col: ${r} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let o={startRow:t,startCol:r},i=this._findInLine(e,o,n);if(!i)for(let a=t+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=a,o.startCol=0,i=this._findInLine(e,o,n),!i);a++);return i}findNextWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=0,i=0;n&&(r===e?(o=n.end.x,i=n.end.y):(o=n.start.x,i=n.start.y)),this._lineCache.initLinesCache();let a={startRow:i,startCol:o},s=this._findInLine(e,a,t);if(!s)for(let l=i+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);if(!s&&i!==0)for(let l=0;l<i&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);return!s&&n&&(a.startRow=n.start.y,a.startCol=0,s=this._findInLine(e,a,t)),s}findPreviousWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=this._terminal.buffer.active.baseY+this._terminal.rows-1,i=this._terminal.cols,a=!0;this._lineCache.initLinesCache();let s={startRow:o,startCol:i},l;if(n&&(s.startRow=o=n.start.y,s.startCol=i=n.start.x,r!==e&&(l=this._findInLine(e,s,t,!1),l||(s.startRow=o=n.end.y,s.startCol=i=n.end.x))),l||(l=this._findInLine(e,s,t,a)),!l){s.startCol=Math.max(s.startCol,this._terminal.cols);for(let c=o-1;c>=0&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);}if(!l&&o!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=o&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);return l}_isWholeWord(e,t,r){return(e===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e-1]))&&(e+r.length===t.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e+r.length]))}_findInLine(e,t,r={},n=!1){let o=t.startRow,i=t.startCol;if(this._terminal.buffer.active.getLine(o)?.isWrapped){if(n){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,r)}let a=this._lineCache.getLineFromCache(o);a||(a=this._lineCache.translateBufferLineToStringWithWrap(o,!0),this._lineCache.setLineInCache(o,a));let[s,l]=a,c=this._bufferColsToStringOffset(o,i),d=e,u=s;r.regex||(d=r.caseSensitive?e:e.toLowerCase(),u=r.caseSensitive?s:s.toLowerCase());let f=-1;if(r.regex){let m=RegExp(d,r.caseSensitive?"g":"gi"),p;if(n)for(;p=m.exec(u.slice(0,c));)f=m.lastIndex-p[0].length,e=p[0],m.lastIndex-=e.length-1;else p=m.exec(u.slice(c)),p&&p[0].length>0&&(f=c+(m.lastIndex-p[0].length),e=p[0])}else n?c-d.length>=0&&(f=u.lastIndexOf(d,c-d.length)):f=u.indexOf(d,c);if(f>=0){if(r.wholeWord&&!this._isWholeWord(f,u,e))return;let m=0;for(;m<l.length-1&&f>=l[m+1];)m++;let p=m;for(;p<l.length-1&&f+e.length>=l[p+1];)p++;let h=f-l[m],y=f+e.length-l[p],x=this._stringLengthToBufferSize(o+m,h),v=this._stringLengthToBufferSize(o+p,y)-x+this._terminal.cols*(p-m);return{term:e,col:x,row:o+m,size:v}}}_stringLengthToBufferSize(e,t){let r=this._terminal.buffer.active.getLine(e);if(!r)return 0;for(let n=0;n<t;n++){let o=r.getCell(n);if(!o)break;let i=o.getChars();i.length>1&&(t-=i.length-1);let a=r.getCell(n+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let r=e,n=0,o=this._terminal.buffer.active.getLine(r);for(;t>0&&o;){for(let i=0;i<t&&i<this._terminal.cols;i++){let a=o.getCell(i);if(!a)break;a.getWidth()&&(n+=a.getCode()===0?1:a.getChars().length)}if(r++,o=this._terminal.buffer.active.getLine(r),o&&!o.isWrapped)break;t-=this._terminal.cols}return n}},lye=class extends is{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(ah(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let r of e){let n=this._createResultDecorations(r,t,!1);if(n)for(let o of n)this._storeDecoration(o,r)}}createActiveDecoration(e,t){let r=this._createResultDecorations(e,t,!0);if(r)return{decorations:r,match:e,dispose(){ib(r)}}}clearHighlightDecorations(){ib(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,r){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),r&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(e,t,r){let n=[],o=e.col,i=e.size,a=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;i>0;){let l=Math.min(this._terminal.cols-o,i);n.push([a,o,l]),o=0,i-=l,a++}let s=[];for(let l of n){let c=this._terminal.registerMarker(l[0]),d=this._terminal.registerDecoration({marker:c,x:l[1],width:l[2],backgroundColor:r?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(c.line)?void 0:{color:r?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:"center"}});if(d){let u=[];u.push(c),u.push(d.onRender(f=>this._applyStyles(f,r?t.activeMatchBorder:t.matchBorder,!1))),u.push(d.onDispose(()=>ib(u))),s.push(d)}}return s.length===0?void 0:s}},cye=class extends is{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ns)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let r=this._searchResults[t];if(r.row===e.row&&r.col===e.col&&r.size===e.size)return t}return-1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},ZQ=class extends is{constructor(e){super(),this._highlightTimeout=this._register(new Ek),this._lineCache=this._register(new Ek),this._state=new aye,this._resultTracker=this._register(new cye),this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new iye(e),this._engine=new sye(e,this._lineCache.value),this._decorationManager=new lye(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(ah(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=WQ(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findNextAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let r=[],n,o=this._engine.find(e,0,0,t);for(;o&&(n?.row!==o.row||n?.col!==o.col)&&!(r.length>=this._highlightLimit);)n=o,r.push(n),o=this._engine.find(e,n.col+n.term.length>=this._terminal.cols?n.row+1:n.row,n.col+n.term.length>=this._terminal.cols?0:n.col+1,t);this._resultTracker.updateResults(r,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(r,t.decorations)}_findNextAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}findPrevious(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findPreviousAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}_selectResult(e,t,r){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!r&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let n=e.row-this._terminal.buffer.active.viewportY;n-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(n)}return!0}};var Mz=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],dye=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Lr;function uye(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var fye=class{constructor(){if(this.version="6",!Lr){Lr=new Uint8Array(65536),Lr.fill(1),Lr[0]=0,Lr.fill(0,1,32),Lr.fill(0,127,160),Lr.fill(2,4352,4448),Lr[9001]=2,Lr[9002]=2,Lr.fill(2,11904,42192),Lr[12351]=1,Lr.fill(2,44032,55204),Lr.fill(2,63744,64256),Lr.fill(2,65040,65050),Lr.fill(2,65072,65136),Lr.fill(2,65280,65377),Lr.fill(2,65504,65511);for(let e=0;e<Mz.length;++e)Lr.fill(0,Mz[e][0],Mz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Lr[e]:uye(e,dye)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Fk.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Fk.createPropertyValue(0,r,n)}},mye=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?GQ.isErrorNoTelemetry(e)?new GQ(e.message+`
|
|
156
|
+
|
|
157
|
+
`+e.stack):new Error(e.message+`
|
|
158
|
+
|
|
159
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},pye=new mye;function Bz(e){hye(e)||pye.onUnexpectedError(e)}var Vz="Canceled";function hye(e){return e instanceof gye?!0:e instanceof Error&&e.name===Vz&&e.message===Vz}var gye=class extends Error{constructor(){super(Vz),this.name=this.message}},GQ=class Hz extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Hz)return t;let r=new Hz;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function vye(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}function xye(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var bye=class rY{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(rY.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=xye(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};bye.assertInvariants=!1;var Wz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Wz||(Wz={}));function yye(e,t){return(r,n)=>t(e(r),e(n))}var _ye=(e,t)=>e-t,qQ=class Zz{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Zz(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new Zz(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Wz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};qQ.empty=new qQ(e=>{});function Iye(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var KQ,XQ,$vt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[KQ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(XQ=Symbol.iterator,KQ=Symbol.toStringTag,XQ)](){return this.values()}},wye=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}},Gz;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function y(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=y;function*x(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=x;function v(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=v;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(Gz||(Gz={}));var Sye=!1,sh=null,kye=class oY{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:oY.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
160
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new wye;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
161
|
+
`),l)}n.sort(yye(l=>l.idx,_ye));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
162
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
163
|
+
`)),p=Iye([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
167
|
+
${d.join(`
|
|
168
|
+
`)}
|
|
169
|
+
============================================================
|
|
170
|
+
|
|
171
|
+
`}return n.length>t&&(a+=`
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
... and ${n.length-t} more leaking disposables
|
|
175
|
+
|
|
176
|
+
`),{leaks:n,details:a}}};kye.idx=0;function Cye(e){sh=e}if(Sye){let e="__is_disposable_tracked__";Cye(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==lh.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==lh.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Jz(e){return sh?.trackDisposable(e),e}function e3(e){sh?.markAsDisposed(e)}function qz(e,t){sh?.setParent(e,t)}function Pye(e,t){if(sh)for(let r of e)sh.setParent(r,t)}function nY(e){if(Gz.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Dye(...e){let t=iY(()=>nY(e));return Pye(e,t),t}function iY(e){let t=Jz({dispose:vye(()=>{e3(t),e()})});return t}var aY=class sY{constructor(){this._toDispose=new Set,this._isDisposed=!1,Jz(this)}dispose(){this._isDisposed||(e3(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{nY(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return qz(t,this),this._isDisposed?sY.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),qz(t,null))}};aY.DISABLE_DISPOSED_WARNING=!1;var t3=aY,lh=class{constructor(){this._store=new t3,Jz(this),qz(this._store,this)}dispose(){e3(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};lh.None=Object.freeze({dispose(){}});var QQ=class Kz{constructor(t){this.element=t,this.next=Kz.Undefined,this.prev=Kz.Undefined}};QQ.Undefined=new QQ(void 0);var Rye=globalThis.performance&&typeof globalThis.performance.now=="function",Eye=class lY{static create(t){return new lY(t)}constructor(t){this._now=Rye&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Tye=!1,YQ=!1,$ye=!1,JQ;(e=>{e.None=()=>lh.None;function t(T){if($ye){let{onDidAddListener:k}=T,$=Yz.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=Dye(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new Uc(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,ge=0,me,X={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{ge++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||ge>1)&&oe.fire(se),ge=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&ge>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(X);let oe=new Uc(X);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function y(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new Uc({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=y;function x(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==v&&$.call(C,U)},void 0,A)}}e.chain=x;let v=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:v),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:v}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===v)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new Uc({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new Uc({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new Uc;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new Uc(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function q(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof t3?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=q})(JQ||(JQ={}));var Xz=class Qz{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Qz._idPool++}`,Qz.all.add(this)}start(t){this._stopWatch=new Eye,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Xz.all=new Set,Xz._idPool=0;var Aye=Xz,eY=-1,cY=class dY{constructor(t,r,n=(dY._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new zye(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};cY._idPool=1;var Oye=cY,Yz=class uY{constructor(t){this.value=t}static create(){let t=new Error;return new uY(t.stack??"")}print(){console.warn(this.value.split(`
|
|
177
|
+
`).slice(2).join(`
|
|
178
|
+
`))}},zye=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Nye=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Fye=0,Ok=class{constructor(e){this.value=e,this.id=Fye++}},Lye=2,Mye=(e,t)=>{if(e instanceof Ok)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},zk;if(Tye){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
179
|
+
`)),e.length=0)},3e3),zk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var Uc=class{constructor(e){this._size=0,this._options=e,this._leakageMon=eY>0||this._options?.leakWarningThreshold?new Oye(e?.onListenerError??Bz,this._options?.leakWarningThreshold??eY):void 0,this._perfMon=this._options?._profName?new Aye(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(YQ){let e=this._listeners;queueMicrotask(()=>{Mye(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Nye(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Bz)(c),lh.None}if(this._disposed)return lh.None;t&&(e=e.bind(t));let n=new Ok(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=Yz.create(),o=this._leakageMon.check(n.stack,this._size+1)),YQ&&(n.stack=i??Yz.create()),this._listeners?this._listeners instanceof Ok?(this._deliveryQueue??(this._deliveryQueue=new Bye),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=iY(()=>{zk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof t3?r.add(a):Array.isArray(r)&&r.push(a),zk){let s=new Error().stack.split(`
|
|
180
|
+
`).slice(2,3).join(`
|
|
181
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);zk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*Lye<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Bz;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ok)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Bye=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Fk=class Nk{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Uc,this.onChange=this._onChange.event;let t=new fye;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=Nk.extractWidth(s);Nk.extractShouldJoin(s)&&(l-=Nk.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},jz=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],jye=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],Uz=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],Uye=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],al;function tY(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var Vye=class{constructor(){if(this.version="11",!al){al=new Uint8Array(65536),al.fill(1),al[0]=0,al.fill(0,1,32),al.fill(0,127,160);for(let e=0;e<jz.length;++e)al.fill(0,jz[e][0],jz[e][1]+1);for(let e=0;e<Uz.length;++e)al.fill(2,Uz[e][0],Uz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?al[e]:tY(e,jye)?0:tY(e,Uye)?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Fk.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Fk.createPropertyValue(0,r,n)}},fY=class{activate(e){e.unicode.register(new Vye)}dispose(){}};var Hye=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){let r=Zye.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,n)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,n,o)}},t))}};function Wye(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var Zye=class Lk{static computeLink(t,r,n,o){let i=new RegExp(r.source,(r.flags||"")+"g"),[a,s]=Lk._getWindowedLineStrings(t-1,n),l=a.join(""),c,d=[];for(;c=i.exec(l);){let u=c[0];if(!Wye(u))continue;let[f,m]=Lk._mapStrIdx(n,s,0,c.index),[p,h]=Lk._mapStrIdx(n,f,m,u.length);if(f===-1||m===-1||p===-1||h===-1)continue;let y={start:{x:m+1,y:f+1},end:{x:h,y:p+1}};d.push({range:y,text:u,activate:o})}return d}static _getWindowedLineStrings(t,r){let n,o=t,i=t,a=0,s="",l=[];if(n=r.buffer.active.getLine(t)){let c=n.translateToString(!0);if(n.isWrapped&&c[0]!==" "){for(a=0;(n=r.buffer.active.getLine(--o))&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),!(!n.isWrapped||s.indexOf(" ")!==-1)););l.reverse()}for(l.push(c),a=0;(n=r.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),s.indexOf(" ")===-1););}return[l,o]}static _mapStrIdx(t,r,n,o){let i=t.buffer.active,a=i.getNullCell(),s=n;for(;o;){let l=i.getLine(r);if(!l)return[-1,-1];for(let c=s;c<l.length;++c){l.getCell(c,a);let d=a.getChars();if(a.getWidth()&&(o-=d.length||1,c===l.length-1&&d==="")){let u=i.getLine(r+1);u&&u.isWrapped&&(u.getCell(0,a),a.getWidth()===2&&(o+=1))}if(o<0)return[r,c]}r++,s=0}return[r,s]}},Gye=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function qye(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var mY=class{constructor(e=qye,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||Gye;this._linkProvider=this._terminal.registerLinkProvider(new Hye(this._terminal,r,this._handler,t))}dispose(){this._linkProvider?.dispose()}};var yJ=Object.defineProperty,Kye=Object.getOwnPropertyDescriptor,Xye=(e,t)=>{for(var r in t)yJ(e,r,{get:t[r],enumerable:!0})},vr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kye(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&yJ(t,r,o),o},be=(e,t)=>(r,n)=>t(r,n,e),pY="Terminal input",x3={get:()=>pY,set:e=>pY=e},hY="Too much output to announce, navigate to rows manually to read",b3={get:()=>hY,set:e=>hY=e};function Qye(e){return e.replace(/\r?\n/g,"\r")}function Yye(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function Jye(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function e_e(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let o=e.clipboardData.getData("text/plain");_J(o,t,r,n)}}function _J(e,t,r,n){e=Qye(e),e=Yye(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function IJ(e,t,r){let n=r.getBoundingClientRect(),o=e.clientX-n.left-10,i=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${o}px`,t.style.top=`${i}px`,t.style.zIndex="1000",t.focus()}function gY(e,t,r,n,o){IJ(e,t,r),o&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function Gc(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function sC(e,t=0,r=e.length){let n="";for(let o=t;o<r;++o){let i=e[o];i>65535?(i-=65536,n+=String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):n+=String.fromCharCode(i)}return n}var t_e=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o=0;if(this._interim){let i=e.charCodeAt(o++);56320<=i&&i<=57343?t[n++]=(this._interim-55296)*1024+i-56320+65536:(t[n++]=this._interim,t[n++]=i),this._interim=0}for(let i=o;i<r;++i){let a=e.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return this._interim=a,n;let s=e.charCodeAt(i);56320<=s&&s<=57343?t[n++]=(a-55296)*1024+s-56320+65536:(t[n++]=a,t[n++]=s);continue}a!==65279&&(t[n++]=a)}return n}},r_e=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o,i,a,s,l=0,c=0;if(this.interim[0]){let f=!1,m=this.interim[0];m&=(m&224)===192?31:(m&240)===224?15:7;let p=0,h;for(;(h=this.interim[++p]&63)&&p<4;)m<<=6,m|=h;let y=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,x=y-p;for(;c<x;){if(c>=r)return 0;if(h=e[c++],(h&192)!==128){c--,f=!0;break}else this.interim[p++]=h,m<<=6,m|=h&63}f||(y===2?m<128?c--:t[n++]=m:y===3?m<2048||m>=55296&&m<=57343||m===65279||(t[n++]=m):m<65536||m>1114111||(t[n++]=m)),this.interim.fill(0)}let d=r-4,u=c;for(;u<r;){for(;u<d&&!((o=e[u])&128)&&!((i=e[u+1])&128)&&!((a=e[u+2])&128)&&!((s=e[u+3])&128);)t[n++]=o,t[n++]=i,t[n++]=a,t[n++]=s,u+=4;if(o=e[u++],o<128)t[n++]=o;else if((o&224)===192){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(l=(o&31)<<6|i&63,l<128){u--;continue}t[n++]=l}else if((o&240)===224){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(o&15)<<12|(i&63)<<6|a&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[n++]=l}else if((o&248)===240){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,this.interim[2]=a,n;if(s=e[u++],(s&192)!==128){u--;continue}if(l=(o&7)<<18|(i&63)<<12|(a&63)<<6|s&63,l<65536||l>1114111)continue;t[n++]=l}}return n}},wJ="",qc=" ",Db=class SJ{constructor(){this.fg=0,this.bg=0,this.extended=new Yk}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new SJ;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Yk=class kJ{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new kJ(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ei=class CJ extends Db{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Yk,this.combinedData=""}static fromCharData(t){let r=new CJ;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Gc(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(n-55296)*1024+o-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},vY="di$target",y3="di$dependencies",r3=new Map;function o_e(e){return e[y3]||[]}function oo(e){if(r3.has(e))return r3.get(e);let t=function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n_e(t,r,o)};return t._id=e,r3.set(e,t),t}function n_e(e,t,r){t[vY]===t?t[y3].push({id:e,index:r}):(t[y3]=[{id:e,index:r}],t[vY]=t)}var an=oo("BufferService"),PJ=oo("CoreMouseService"),Ku=oo("CoreService"),i_e=oo("CharsetService"),aN=oo("InstantiationService"),DJ=oo("LogService"),sn=oo("OptionsService"),RJ=oo("OscLinkService"),a_e=oo("UnicodeService"),Rb=oo("DecorationService"),_3=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],o=this._optionsService.rawOptions.linkHandler,i=new Ei,a=r.getTrimmedLength(),s=-1,l=-1,c=!1;for(let d=0;d<a;d++)if(!(l===-1&&!r.hasContent(d))){if(r.loadCell(d,i),i.hasExtendedAttrs()&&i.extended.urlId)if(l===-1){l=d,s=i.extended.urlId;continue}else c=i.extended.urlId!==s;else l!==-1&&(c=!0);if(c||l!==-1&&d===a-1){let u=this._oscLinkService.getLinkData(s)?.uri;if(u){let f={start:{x:l+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},m=!1;if(!o?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(m=!0)}catch{m=!0}m||n.push({text:u,range:f,activate:(p,h)=>o?o.activate(p,h,f):s_e(p,h),hover:(p,h)=>o?.hover?.(p,h,f),leave:(p,h)=>o?.leave?.(p,h,f)})}c=!1,i.hasExtendedAttrs()&&i.extended.urlId?(l=d,s=i.extended.urlId):(l=-1,s=-1)}}t(n)}};_3=vr([be(0,an),be(1,sn),be(2,RJ)],_3);function s_e(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
182
|
+
|
|
183
|
+
WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var lC=oo("CharSizeService"),ul=oo("CoreBrowserService"),sN=oo("MouseService"),fl=oo("RenderService"),l_e=oo("SelectionService"),EJ=oo("CharacterJoinerService"),fh=oo("ThemeService"),TJ=oo("LinkProviderService"),c_e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?xY.isErrorNoTelemetry(e)?new xY(e.message+`
|
|
184
|
+
|
|
185
|
+
`+e.stack):new Error(e.message+`
|
|
186
|
+
|
|
187
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},d_e=new c_e;function Hk(e){u_e(e)||d_e.onUnexpectedError(e)}var I3="Canceled";function u_e(e){return e instanceof f_e?!0:e instanceof Error&&e.name===I3&&e.message===I3}var f_e=class extends Error{constructor(){super(I3),this.name=this.message}};function m_e(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var xY=class w3 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof w3)return t;let r=new w3;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},S3=class $J extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,$J.prototype)}};function p_e(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var h_e=class AJ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(AJ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=p_e(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};h_e.assertInvariants=!1;function qn(e,t=0){return e[e.length-(1+t)]}var k3;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(k3||(k3={}));function g_e(e,t){return(r,n)=>t(e(r),e(n))}var v_e=(e,t)=>e-t,bY=class C3{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new C3(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new C3(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||k3.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};bY.empty=new bY(e=>{});function x_e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var yY,_Y,Qvt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[yY]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(_Y=Symbol.iterator,yY=Symbol.toStringTag,_Y)](){return this.values()}},b_e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function y_e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var P3;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function y(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=y;function*x(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=x;function v(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=v;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(P3||(P3={}));var __e=!1,Zu=null,I_e=class OJ{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:OJ.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
|
|
188
|
+
`).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new b_e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
|
|
189
|
+
`),l)}n.sort(g_e(l=>l.idx,v_e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
|
|
190
|
+
`)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
|
|
191
|
+
`)),p=x_e([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
|
|
195
|
+
${d.join(`
|
|
196
|
+
`)}
|
|
197
|
+
============================================================
|
|
198
|
+
|
|
199
|
+
`}return n.length>t&&(a+=`
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
... and ${n.length-t} more leaking disposables
|
|
203
|
+
|
|
204
|
+
`),{leaks:n,details:a}}};I_e.idx=0;function w_e(e){Zu=e}if(__e){let e="__is_disposable_tracked__";w_e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==qe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==qe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function cC(e){return Zu?.trackDisposable(e),e}function dC(e){Zu?.markAsDisposed(e)}function Sb(e,t){Zu?.setParent(e,t)}function S_e(e,t){if(Zu)for(let r of e)Zu.setParent(r,t)}function IY(e){return Zu?.markAsSingleton(e),e}function Gu(e){if(P3.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function k_e(...e){let t=qt(()=>Gu(e));return S_e(e,t),t}function qt(e){let t=cC({dispose:y_e(()=>{dC(t),e()})});return t}var zJ=class NJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,cC(this)}dispose(){this._isDisposed||(dC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Gu(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Sb(t,this),this._isDisposed?NJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Sb(t,null))}};zJ.DISABLE_DISPOSED_WARNING=!1;var Kc=zJ,qe=class{constructor(){this._store=new Kc,cC(this),Sb(this._store,this)}dispose(){dC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};qe.None=Object.freeze({dispose(){}});var uh=class{constructor(){this._isDisposed=!1,cC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Sb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,dC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Sb(e,null),e}},Qn=typeof window=="object"?window:globalThis,D3=class R3{constructor(t){this.element=t,this.next=R3.Undefined,this.prev=R3.Undefined}};D3.Undefined=new D3(void 0);var fr=D3,wY=class{constructor(){this._first=fr.Undefined,this._last=fr.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===fr.Undefined}clear(){let e=this._first;for(;e!==fr.Undefined;){let t=e.next;e.prev=fr.Undefined,e.next=fr.Undefined,e=t}this._first=fr.Undefined,this._last=fr.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new fr(e);if(this._first===fr.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==fr.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==fr.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==fr.Undefined&&e.next!==fr.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===fr.Undefined&&e.next===fr.Undefined?(this._first=fr.Undefined,this._last=fr.Undefined):e.next===fr.Undefined?(this._last=this._last.prev,this._last.next=fr.Undefined):e.prev===fr.Undefined&&(this._first=this._first.next,this._first.prev=fr.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==fr.Undefined;)yield e.element,e=e.next}},C_e=globalThis.performance&&typeof globalThis.performance.now=="function",P_e=class FJ{static create(t){return new FJ(t)}constructor(t){this._now=C_e&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},D_e=!1,SY=!1,R_e=!1,ro;(e=>{e.None=()=>qe.None;function t(T){if(R_e){let{onDidAddListener:k}=T,$=$3.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=k_e(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new le(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,ge=0,me,X={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{ge++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||ge>1)&&oe.fire(se),ge=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&ge>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(X);let oe=new le(X);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function y(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new le({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=y;function x(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==v&&$.call(C,U)},void 0,A)}}e.chain=x;let v=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:v),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:v}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===v)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new le({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new le({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new le;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new le(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function q(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof Kc?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=q})(ro||(ro={}));var E3=class T3{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${T3._idPool++}`,T3.all.add(this)}start(t){this._stopWatch=new P_e,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};E3.all=new Set,E3._idPool=0;var E_e=E3,kY=-1,LJ=class MJ{constructor(t,r,n=(MJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new $_e(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};LJ._idPool=1;var T_e=LJ,$3=class BJ{constructor(t){this.value=t}static create(){let t=new Error;return new BJ(t.stack??"")}print(){console.warn(this.value.split(`
|
|
205
|
+
`).slice(2).join(`
|
|
206
|
+
`))}},$_e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},A_e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},O_e=0,Wk=class{constructor(e){this.value=e,this.id=O_e++}},z_e=2,N_e=(e,t)=>{if(e instanceof Wk)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},Zk;if(D_e){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
|
|
207
|
+
`)),e.length=0)},3e3),Zk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var le=class{constructor(e){this._size=0,this._options=e,this._leakageMon=kY>0||this._options?.leakWarningThreshold?new T_e(e?.onListenerError??Hk,this._options?.leakWarningThreshold??kY):void 0,this._perfMon=this._options?._profName?new E_e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(SY){let e=this._listeners;queueMicrotask(()=>{N_e(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new A_e(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Hk)(c),qe.None}if(this._disposed)return qe.None;t&&(e=e.bind(t));let n=new Wk(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=$3.create(),o=this._leakageMon.check(n.stack,this._size+1)),SY&&(n.stack=i??$3.create()),this._listeners?this._listeners instanceof Wk?(this._deliveryQueue??(this._deliveryQueue=new F_e),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=qt(()=>{Zk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof Kc?r.add(a):Array.isArray(r)&&r.push(a),Zk){let s=new Error().stack.split(`
|
|
208
|
+
`).slice(2,3).join(`
|
|
209
|
+
`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);Zk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*z_e<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Hk;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Wk)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},F_e=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},A3=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new le,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new le,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};A3.INSTANCE=new A3;var lN=A3;function L_e(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}var Jvt=lN.INSTANCE.onDidChangeZoomLevel;function M_e(e){return lN.INSTANCE.getZoomFactor(e)}var ext=lN.INSTANCE.onDidChangeFullscreen,mh=typeof navigator=="object"?navigator.userAgent:"",O3=mh.indexOf("Firefox")>=0,Gk=mh.indexOf("AppleWebKit")>=0,cN=mh.indexOf("Chrome")>=0,jJ=!cN&&mh.indexOf("Safari")>=0,txt=mh.indexOf("Electron/")>=0,rxt=mh.indexOf("Android")>=0,qk=!1;if(typeof Qn.matchMedia=="function"){let e=Qn.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Qn.matchMedia("(display-mode: fullscreen)");qk=e.matches,L_e(Qn,e,({matches:r})=>{qk&&t.matches||(qk=r)})}function B_e(){return qk}var dh="en",Jk=!1,eC=!1,yb=!1,j_e=!1,UJ=!1,VJ=!1,U_e=!1,V_e=!1,H_e=!1,W_e=!1,Mk,Kk=dh,CY=dh,Z_e,ll,dl=globalThis,Xn;typeof dl.vscode<"u"&&typeof dl.vscode.process<"u"?Xn=dl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Xn=process);var HJ=typeof Xn?.versions?.electron=="string",G_e=HJ&&Xn?.type==="renderer";if(typeof Xn=="object"){Jk=Xn.platform==="win32",eC=Xn.platform==="darwin",yb=Xn.platform==="linux",j_e=yb&&!!Xn.env.SNAP&&!!Xn.env.SNAP_REVISION,U_e=HJ,H_e=!!Xn.env.CI||!!Xn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Mk=dh,Kk=dh;let e=Xn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Mk=t.userLocale,CY=t.osLocale,Kk=t.resolvedLanguage||dh,Z_e=t.languagePack?.translationsConfigFile}catch{}UJ=!0}else typeof navigator=="object"&&!G_e?(ll=navigator.userAgent,Jk=ll.indexOf("Windows")>=0,eC=ll.indexOf("Macintosh")>=0,V_e=(ll.indexOf("Macintosh")>=0||ll.indexOf("iPad")>=0||ll.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,yb=ll.indexOf("Linux")>=0,W_e=ll?.indexOf("Mobi")>=0,VJ=!0,Kk=globalThis._VSCODE_NLS_LANGUAGE||dh,Mk=navigator.language.toLowerCase(),CY=Mk):console.error("Unable to resolve platform.");var o3=0;eC?o3=1:Jk?o3=3:yb&&(o3=2);var WJ=Jk,cs=eC,q_e=yb,n3=UJ,K_e=VJ&&typeof dl.importScripts=="function",oxt=K_e?dl.origin:void 0,ds=ll,Vc=Kk,PY;(e=>{function t(){return Vc}e.value=t;function r(){return Vc.length===2?Vc==="en":Vc.length>=3?Vc[0]==="e"&&Vc[1]==="n"&&Vc[2]==="-":!1}e.isDefaultVariant=r;function n(){return Vc==="en"}e.isDefault=n})(PY||(PY={}));var X_e=typeof dl.postMessage=="function"&&!dl.importScripts,Q_e=(()=>{if(X_e){let e=[];dl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),dl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Y_e=!!(ds&&ds.indexOf("Chrome")>=0),nxt=!!(ds&&ds.indexOf("Firefox")>=0),ixt=!!(!Y_e&&ds&&ds.indexOf("Safari")>=0),axt=!!(ds&&ds.indexOf("Edg/")>=0),sxt=!!(ds&&ds.indexOf("Android")>=0),Hc=typeof navigator=="object"?navigator:{},lxt={clipboard:{writeText:n3||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Hc&&Hc.clipboard&&Hc.clipboard.writeText),readText:n3||!!(Hc&&Hc.clipboard&&Hc.clipboard.readText)},keyboard:n3||B_e()?0:Hc.keyboard||jJ?1:2,touch:"ontouchstart"in Qn||Hc.maxTouchPoints>0,pointerEvents:Qn.PointerEvent&&("ontouchstart"in Qn||navigator.maxTouchPoints>0)},dN=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},i3=new dN,DY=new dN,RY=new dN,J_e=new Array(230),z3;(e=>{function t(s){return i3.keyCodeToStr(s)}e.toString=t;function r(s){return i3.strToKeyCode(s)}e.fromString=r;function n(s){return DY.keyCodeToStr(s)}e.toUserSettingsUS=n;function o(s){return RY.keyCodeToStr(s)}e.toUserSettingsGeneral=o;function i(s){return DY.strToKeyCode(s)||RY.strToKeyCode(s)}e.fromUserSettings=i;function a(s){if(s>=98&&s<=113)return null;switch(s){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return i3.keyCodeToStr(s)}e.toElectronAccelerator=a})(z3||(z3={}));var eIe=class ZJ{constructor(t,r,n,o,i){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=o,this.keyCode=i}equals(t){return t instanceof ZJ&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",o=this.metaKey?"1":"0";return`K${t}${r}${n}${o}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new tIe([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},tIe=class{constructor(e){if(e.length===0)throw m_e("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function rIe(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return z3.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(O3)switch(t){case 59:return 85;case 60:if(q_e)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(cs)return 57;break}else if(Gk&&(cs&&t===93||!cs&&t===92))return 57;return J_e[t]||0}var oIe=cs?256:2048,nIe=512,iIe=1024,aIe=cs?2048:256,N3=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=rIe(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=oIe),this.altKey&&(t|=nIe),this.shiftKey&&(t|=iIe),this.metaKey&&(t|=aIe),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new eIe(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},EY=new WeakMap;function sIe(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var lIe=class{static getSameOriginWindowChain(e){let t=EY.get(e);if(!t){t=[],EY.set(e,t);let r=e,n;do n=sIe(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,o=this.getSameOriginWindowChain(e);for(let i of o){let a=i.window.deref();if(r+=a?.scrollY??0,n+=a?.scrollX??0,a===t||!i.iframeElement)break;let s=i.iframeElement.getBoundingClientRect();r+=s.top,n+=s.left}return{top:r,left:n}}},pb=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=lIe.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},TY=class{constructor(e,t=0,r=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(cN){let o=navigator.userAgent.match(/Chrome\/(\d+)/);n=(o?parseInt(o[1]):123)<=122}if(e){let o=e,i=e,a=e.view?.devicePixelRatio||1;if(typeof o.wheelDeltaY<"u")n?this.deltaY=o.wheelDeltaY/(120*a):this.deltaY=o.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?O3&&!cs?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")jJ&&WJ?this.deltaX=-(o.wheelDeltaX/120):n?this.deltaX=o.wheelDeltaX/(120*a):this.deltaX=o.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?O3&&!cs?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},GJ=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),$Y;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof cIe?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ro.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:GJ})})($Y||($Y={}));var cIe=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?GJ:(this._emitter||(this._emitter=new le),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var uN=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new S3("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new S3("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},dIe=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new S3("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=r.setInterval(()=>{e()},t);this.disposable=qt(()=>{r.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},uIe,a3;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?a3=(e,t)=>{Q_e(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:a3=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},uIe=e=>a3(globalThis,e)})();var AY;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(AY||(AY={}));var OY=class Di{static fromArray(t){return new Di(r=>{r.emitMany(t)})}static fromPromise(t){return new Di(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Di(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Di(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new le,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await ro.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Di(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Di.map(this,t)}static filter(t,r){return new Di(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Di.filter(this,t)}static coalesce(t){return Di.filter(t,r=>!!r)}coalesce(){return Di.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Di.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};OY.EMPTY=OY.fromArray([]);function fIe(e){return 55296<=e&&e<=56319}function zY(e){return 56320<=e&&e<=57343}function mIe(e,t){return(e-55296<<10)+(t-56320)+65536}function pIe(e){return fN(e,0)}function fN(e,t){switch(typeof e){case"object":return e===null?cl(349,t):Array.isArray(e)?gIe(e,t):vIe(e,t);case"string":return qJ(e,t);case"boolean":return hIe(e,t);case"number":return cl(e,t);case"undefined":return cl(937,t);default:return cl(617,t)}}function cl(e,t){return(t<<5)-t+e|0}function hIe(e,t){return cl(e?433:863,t)}function qJ(e,t){t=cl(149417,t);for(let r=0,n=e.length;r<n;r++)t=cl(e.charCodeAt(r),t);return t}function gIe(e,t){return t=cl(104579,t),e.reduce((r,n)=>fN(n,r),t)}function vIe(e,t){return t=cl(181387,t),Object.keys(e).sort().reduce((r,n)=>(r=qJ(n,r),fN(e[n],r)),t)}function s3(e,t,r=32){let n=r-t,o=~((1<<n)-1);return(e<<t|(o&e)>>>n)>>>0}function NY(e,t=0,r=e.byteLength,n=0){for(let o=0;o<r;o++)e[t+o]=n}function xIe(e,t,r="0"){for(;e.length<t;)e=r+e;return e}function sb(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""):xIe((e>>>0).toString(16),t/4)}var bIe=class KJ{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let r=t.length;if(r===0)return;let n=this._buff,o=this._buffLen,i=this._leftoverHighSurrogate,a,s;for(i!==0?(a=i,s=-1,i=0):(a=t.charCodeAt(0),s=0);;){let l=a;if(fIe(a))if(s+1<r){let c=t.charCodeAt(s+1);zY(c)?(s++,l=mIe(a,c)):l=65533}else{i=a;break}else zY(a)&&(l=65533);if(o=this._push(n,o,l),s++,s<r)a=t.charCodeAt(s);else break}this._buffLen=o,this._leftoverHighSurrogate=i}_push(t,r,n){return n<128?t[r++]=n:n<2048?(t[r++]=192|(n&1984)>>>6,t[r++]=128|(n&63)>>>0):n<65536?(t[r++]=224|(n&61440)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0):(t[r++]=240|(n&1835008)>>>18,t[r++]=128|(n&258048)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),sb(this._h0)+sb(this._h1)+sb(this._h2)+sb(this._h3)+sb(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,NY(this._buff,this._buffLen),this._buffLen>56&&(this._step(),NY(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=KJ._bigBlock32,r=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,r.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,s3(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,i=this._h2,a=this._h3,s=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&i|~o&a,c=1518500249):u<40?(l=o^i^a,c=1859775393):u<60?(l=o&i|o&a|i&a,c=2400959708):(l=o^i^a,c=3395469782),d=s3(n,5)+l+s+c+t.getUint32(u*4,!1)&4294967295,s=a,a=i,i=s3(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}};bIe._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:cxt,getWindow:ca,getDocument:dxt,getWindows:uxt,getWindowsCount:fxt,getWindowId:FY,getWindowById:mxt,hasWindow:pxt,onDidRegisterWindow:yIe,onWillUnregisterWindow:hxt,onDidUnregisterWindow:gxt}=(function(){let e=new Map,t={window:Qn,disposables:new Kc};e.set(Qn.vscodeWindowId,t);let r=new le,n=new le,o=new le;function i(a,s){return(typeof a=="number"?e.get(a):void 0)??(s?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return qe.None;let s=new Kc,l={window:a,disposables:s.add(new Kc)};return e.set(a.vscodeWindowId,l),s.add(qt(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),s.add(Le(a,Yr.BEFORE_UNLOAD,()=>{o.fire(a)})),r.fire(l),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:i,getWindow(a){let s=a;if(s?.ownerDocument?.defaultView)return s.ownerDocument.defaultView.window;let l=a;return l?.view?l.view.window:Qn},getDocument(a){return ca(a).document}}})(),_Ie=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Le(e,t,r,n){return new _Ie(e,t,r,n)}function IIe(e,t){return function(r){return t(new pb(e,r))}}function wIe(e){return function(t){return e(new N3(t))}}var LY=function(e,t,r,n){let o=r;return t==="click"||t==="mousedown"||t==="contextmenu"?o=IIe(ca(e),r):(t==="keydown"||t==="keypress"||t==="keyup")&&(o=wIe(r)),Le(e,t,o,n)},SIe,tC,kIe=class extends dIe{constructor(e){super(),this.defaultTarget=e&&ca(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},l3=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Hk(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,o=i=>{r.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),n.set(i,!0);a.length>0;)a.sort(l3.sort),a.shift().execute();n.set(i,!1)};tC=(i,a,s=0)=>{let l=FY(i),c=new l3(a,s),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),r.get(l)||(r.set(l,!0),i.requestAnimationFrame(()=>o(l))),c},SIe=(i,a,s)=>{let l=FY(i);if(n.get(l)){let c=new l3(a,s),d=t.get(l);return d||(d=[],t.set(l,d)),d.push(c),c}else return tC(i,a,s)}})();var MY=class Xk{constructor(t,r){this.width=t,this.height=r}with(t=this.width,r=this.height){return t!==this.width||r!==this.height?new Xk(t,r):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Xk?t:new Xk(t.width,t.height)}static equals(t,r){return t===r?!0:!t||!r?!1:t.width===r.width&&t.height===r.height}};MY.None=new MY(0,0);function CIe(e){let t=e.getBoundingClientRect(),r=ca(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var vxt=new class{constructor(){this.mutationObservers=new Map}observe(e,t,r){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));let o=pIe(r),i=n.get(o);if(i)i.users+=1;else{let a=new le,s=new MutationObserver(c=>a.fire(c));s.observe(e,r);let l=i={users:1,observer:s,onDidMutate:a.event};t.add(qt(()=>{l.users-=1,l.users===0&&(a.dispose(),s.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(e))})),n.set(o,i)}return i.onDidMutate}},Yr={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Gk?"webkitAnimationStart":"animationstart",ANIMATION_END:Gk?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Gk?"webkitAnimationIteration":"animationiteration"},PIe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function XJ(e,t,r,...n){let o=PIe.exec(t);if(!o)throw new Error("Bad use of emmet");let i=o[1]||"div",a;return e!=="http://www.w3.org/1999/xhtml"?a=document.createElementNS(e,i):a=document.createElement(i),o[3]&&(a.id=o[3]),o[4]&&(a.className=o[4].replace(/\./g," ").trim()),r&&Object.entries(r).forEach(([s,l])=>{typeof l>"u"||(/^on\w+$/.test(s)?a[s]=l:s==="selected"?l&&a.setAttribute(s,"true"):a.setAttribute(s,l))}),a.append(...n),a}function DIe(e,t,...r){return XJ("http://www.w3.org/1999/xhtml",e,t,...r)}DIe.SVG=function(e,t,...r){return XJ("http://www.w3.org/2000/svg",e,t,...r)};var RIe=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=$n(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=$n(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=$n(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=$n(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=$n(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=$n(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=$n(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=$n(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=$n(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=$n(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=$n(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=$n(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=$n(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=$n(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function $n(e){return typeof e=="number"?`${e}px`:e}function _b(e){return new RIe(e)}var QJ=class{constructor(){this._hooks=new Kc,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=o;let i=e;try{e.setPointerCapture(t),this._hooks.add(qt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{i=ca(e)}this._hooks.add(Le(i,Yr.POINTER_MOVE,a=>{if(a.buttons!==r){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Le(i,Yr.POINTER_UP,a=>this.stopMonitoring(!0)))}};function EIe(e,t,r){let n=null,o=null;if(typeof r.value=="function"?(n="value",o=r.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",o=r.get),!o)throw new Error("not supported");let i=`$memoize$${t}`;r[n]=function(...a){return this.hasOwnProperty(i)||Object.defineProperty(this,i,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,a)}),this[i]}}var la;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(la||(la={}));var hb=class To extends qe{constructor(){super(),this.dispatched=!1,this.targets=new wY,this.ignoreTargets=new wY,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ro.runAndSubscribe(yIe,({window:t,disposables:r})=>{r.add(Le(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Le(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Le(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Qn,disposables:this._store}))}static addTarget(t){if(!To.isTouchDevice())return qe.None;To.INSTANCE||(To.INSTANCE=IY(new To));let r=To.INSTANCE.targets.push(t);return qt(r)}static ignoreTarget(t){if(!To.isTouchDevice())return qe.None;To.INSTANCE||(To.INSTANCE=IY(new To));let r=To.INSTANCE.ignoreTargets.push(t);return qt(r)}static isTouchDevice(){return"ontouchstart"in Qn||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=t.targetTouches.length;n<o;n++){let i=t.targetTouches.item(n);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:r,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[r],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};let a=this.newGestureEvent(la.Start,i.target);a.pageX=i.pageX,a.pageY=i.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),o=Object.keys(this.activeTouches).length;for(let i=0,a=r.changedTouches.length;i<a;i++){let s=r.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("move of an UNKNOWN touch",s);continue}let l=this.activeTouches[s.identifier],c=Date.now()-l.initialTimeStamp;if(c<To.HOLD_DELAY&&Math.abs(l.initialPageX-qn(l.rollingPageX))<30&&Math.abs(l.initialPageY-qn(l.rollingPageY))<30){let d=this.newGestureEvent(la.Tap,l.initialTarget);d.pageX=qn(l.rollingPageX),d.pageY=qn(l.rollingPageY),this.dispatchEvent(d)}else if(c>=To.HOLD_DELAY&&Math.abs(l.initialPageX-qn(l.rollingPageX))<30&&Math.abs(l.initialPageY-qn(l.rollingPageY))<30){let d=this.newGestureEvent(la.Contextmenu,l.initialTarget);d.pageX=qn(l.rollingPageX),d.pageY=qn(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=qn(l.rollingPageX),u=qn(l.rollingPageY),f=qn(l.rollingTimestamps)-l.rollingTimestamps[0],m=d-l.rollingPageX[0],p=u-l.rollingPageY[0],h=[...this.targets].filter(y=>l.initialTarget instanceof Node&&y.contains(l.initialTarget));this.inertia(t,h,n,Math.abs(m)/f,m>0?1:-1,d,Math.abs(p)/f,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(la.End,l.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===la.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>To.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===la.Change||t.type===la.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let o=0,i=t.initialTarget;for(;i&&i!==n;)o++,i=i.parentElement;r.push([o,n])}r.sort((n,o)=>n[0]-o[0]);for(let[n,o]of r)o.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,o,i,a,s,l,c){this.handle=tC(t,()=>{let d=Date.now(),u=d-n,f=0,m=0,p=!0;o+=To.SCROLL_FRICTION*u,s+=To.SCROLL_FRICTION*u,o>0&&(p=!1,f=i*o*u),s>0&&(p=!1,m=l*s*u);let h=this.newGestureEvent(la.Change);h.translationX=f,h.translationY=m,r.forEach(y=>y.dispatchEvent(h)),p||this.inertia(t,r,d,o,i,a+f,s,l,c+m)})}onTouchMove(t){let r=Date.now();for(let n=0,o=t.changedTouches.length;n<o;n++){let i=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}let a=this.activeTouches[i.identifier],s=this.newGestureEvent(la.Change,a.initialTarget);s.translationX=i.pageX-qn(a.rollingPageX),s.translationY=i.pageY-qn(a.rollingPageY),s.pageX=i.pageX,s.pageY=i.pageY,this.dispatchEvent(s),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(i.pageX),a.rollingPageY.push(i.pageY),a.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};hb.SCROLL_FRICTION=-.005,hb.HOLD_DELAY=700,hb.CLEAR_TAP_COUNT_TIME=400,vr([EIe],hb,"isTouchDevice",1);var TIe=hb,mN=class extends qe{onclick(e,t){this._register(Le(e,Yr.CLICK,r=>t(new pb(ca(e),r))))}onmousedown(e,t){this._register(Le(e,Yr.MOUSE_DOWN,r=>t(new pb(ca(e),r))))}onmouseover(e,t){this._register(Le(e,Yr.MOUSE_OVER,r=>t(new pb(ca(e),r))))}onmouseleave(e,t){this._register(Le(e,Yr.MOUSE_LEAVE,r=>t(new pb(ca(e),r))))}onkeydown(e,t){this._register(Le(e,Yr.KEY_DOWN,r=>t(new N3(r))))}onkeyup(e,t){this._register(Le(e,Yr.KEY_UP,r=>t(new N3(r))))}oninput(e,t){this._register(Le(e,Yr.INPUT,t))}onblur(e,t){this._register(Le(e,Yr.BLUR,t))}onfocus(e,t){this._register(Le(e,Yr.FOCUS,t))}onchange(e,t){this._register(Le(e,Yr.CHANGE,t))}ignoreGesture(e){return TIe.ignoreTarget(e)}},BY=11,$Ie=class extends mN{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=BY+"px",this.domNode.style.height=BY+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new QJ),this._register(LY(this.bgDomNode,Yr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(LY(this.domNode,Yr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new kIe),this._pointerdownScheduleRepeatTimer=this._register(new uN)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,ca(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},AIe=class F3{constructor(t,r,n,o,i,a,s){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,o=o|0,i=i|0,a=a|0,s=s|0),this.rawScrollLeft=o,this.rawScrollTop=s,r<0&&(r=0),o+r>n&&(o=n-r),o<0&&(o=0),i<0&&(i=0),s+i>a&&(s=a-i),s<0&&(s=0),this.width=r,this.scrollWidth=n,this.scrollLeft=o,this.height=i,this.scrollHeight=a,this.scrollTop=s}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new F3(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new F3(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,o=this.scrollWidth!==t.scrollWidth,i=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,s=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:s,scrollTopChanged:l}}},OIe=class extends qe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new AIe(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new UY(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=UY.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},jY=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function c3(e,t){let r=t-e;return function(n){return e+r*FIe(n)}}function zIe(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var UY=class L3{constructor(t,r,n,o){this.from=t,this.to=r,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let o,i;return t<r?(o=t+.75*n,i=r-.75*n):(o=t-.75*n,i=r+.75*n),zIe(c3(t,o),c3(i,r),.33)}return c3(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),o=this.scrollTop(r);return new jY(n,o,!1)}return new jY(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return L3.start(t,r,n)}static start(t,r,n){n=n+10;let o=Date.now()-10;return new L3(t,r,o,n)}};function NIe(e){return Math.pow(e,3)}function FIe(e){return 1-NIe(1-e)}var LIe=class extends qe{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new uN)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},MIe=140,YJ=class extends mN{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new LIe(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new QJ),this._shouldRender=!0,this.domNode=_b(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Le(this.domNode.domNode,Yr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new $Ie(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=_b(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Le(this.slider.domNode,Yr.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);r<=o&&o<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let o=CIe(this.domNode.domNode);t=e.pageX-o.left,r=e.pageY-o.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{let i=this._sliderOrthogonalPointerPosition(o),a=Math.abs(i-r);if(WJ&&a>MIe){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let s=this._sliderPointerPosition(o)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(s))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},JJ=class M3{constructor(t,r,n,o,i,a){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=o,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new M3(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,o,i){let a=Math.max(0,n-t),s=Math.max(0,a-2*r),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*s/o))),d=(s-c)/(o-n),u=i*d;return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=M3._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},BIe=class extends YJ{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new JJ(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},jIe=class extends YJ{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new JJ(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},UIe=500,VY=50,HY=!0,VIe=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},B3=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,o=this._rear;do{let i=o===this._front?t:Math.pow(2,-n);if(t-=i,r+=this._memory[o].score*i,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(cN){let r=ca(t.browserEvent),n=M_e(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let o=null,i=new VIe(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(o=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,o)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let o=Math.abs(t.deltaX),i=Math.abs(t.deltaY),a=Math.abs(r.deltaX),s=Math.abs(r.deltaY),l=Math.max(Math.min(o,a),1),c=Math.max(Math.min(i,s),1),d=Math.max(o,a),u=Math.max(i,s);d%l===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};B3.INSTANCE=new B3;var HIe=B3,WIe=class extends mN{constructor(e,t,r){super(),this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new le),this.onWillScroll=this._onWillScroll.event,this._options=GIe(t),this._scrollable=r,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));let n={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new jIe(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new BIe(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=_b(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=_b(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=_b(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new uN),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Gu(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,cs&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new TY(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Gu(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new TY(r))};this._mouseWheelToDispose.push(Le(this._listenOnDomNode,Yr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=HIe.INSTANCE;HY&&t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+o===0?i=o=0:Math.abs(o)>=Math.abs(i)?i=0:o=0),this._options.flipAxes&&([o,i]=[i,o]);let a=!cs&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(i=i*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let s=this._scrollable.getFutureScrollPosition(),l={};if(o){let c=VY*o,d=s.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,d)}if(i){let c=VY*i,d=s.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,d)}l=this._scrollable.validateScrollPosition(l),(s.scrollLeft!==l.scrollLeft||s.scrollTop!==l.scrollTop)&&(HY&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",o=t?" top":"",i=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${i}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),UIe)}},ZIe=class extends WIe{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function GIe(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,cs&&(t.className+=" mac"),t}var j3=class extends qe{constructor(e,t,r,n,o,i,a,s){super(),this._bufferService=r,this._optionsService=a,this._renderService=s,this._onRequestScrollLines=this._register(new le),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new OIe({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>tC(n.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new ZIe(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(o.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(ro.runAndSubscribe(i.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=i.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(qt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(qt(()=>this._styleElement.remove())),this._register(ro.runAndSubscribe(i.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${i.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${i.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${i.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
210
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};j3=vr([be(2,an),be(3,ul),be(4,PJ),be(5,fh),be(6,sn),be(7,fl)],j3);var U3=class extends qe{constructor(e,t,r,n,o){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=o,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(i=>this._removeDecoration(i))),this._register(qt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};U3=vr([be(1,an),be(2,ul),be(3,Rb),be(4,fl)],U3);var qIe=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},ss={full:0,left:0,center:0,right:0},Wc={full:0,left:0,center:0,right:0},lb={full:0,left:0,center:0,right:0},rC=class extends qe{constructor(e,t,r,n,o,i,a,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=o,this._optionsService=i,this._themeService=a,this._coreBrowserService=s,this._colorZoneStore=new qIe,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(qt(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Wc.full=this._canvas.width,Wc.left=e,Wc.center=t,Wc.right=e,this._refreshDrawHeightConstants(),lb.full=1,lb.left=1,lb.center=1+Wc.left,lb.right=1+Wc.left+Wc.center}_refreshDrawHeightConstants(){ss.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);ss.left=t,ss.center=t,ss.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(lb[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-ss[e.position||"full"]/2),Wc[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+ss[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};rC=vr([be(2,an),be(3,Rb),be(4,fl),be(5,sn),be(6,fh),be(7,ul)],rC);var te;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
211
|
+
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))(te||(te={}));var Ib;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(Ib||(Ib={}));var V3;(e=>e.ST=`${te.ESC}\\`)(V3||(V3={}));var H3=class{constructor(e,t,r,n,o,i){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=o,this._renderService=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${te.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};H3=vr([be(2,an),be(3,sn),be(4,Ku),be(5,fl)],H3);var Jr=0,eo=0,to=0,gr=0,WY={css:"#00000000",rgba:0},Sr;(e=>{function t(o,i,a,s){return s!==void 0?`#${Uu(o)}${Uu(i)}${Uu(a)}${Uu(s)}`:`#${Uu(o)}${Uu(i)}${Uu(a)}`}e.toCss=t;function r(o,i,a,s=255){return(o<<24|i<<16|a<<8|s)>>>0}e.toRgba=r;function n(o,i,a,s){return{css:e.toCss(o,i,a,s),rgba:e.toRgba(o,i,a,s)}}e.toColor=n})(Sr||(Sr={}));var Lt;(e=>{function t(l,c){if(gr=(c.rgba&255)/255,gr===1)return{css:c.css,rgba:c.rgba};let d=c.rgba>>24&255,u=c.rgba>>16&255,f=c.rgba>>8&255,m=l.rgba>>24&255,p=l.rgba>>16&255,h=l.rgba>>8&255;Jr=m+Math.round((d-m)*gr),eo=p+Math.round((u-p)*gr),to=h+Math.round((f-h)*gr);let y=Sr.toCss(Jr,eo,to),x=Sr.toRgba(Jr,eo,to);return{css:y,rgba:x}}e.blend=t;function r(l){return(l.rgba&255)===255}e.isOpaque=r;function n(l,c,d){let u=wb.ensureContrastRatio(l.rgba,c.rgba,d);if(u)return Sr.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=n;function o(l){let c=(l.rgba|255)>>>0;return[Jr,eo,to]=wb.toChannels(c),{css:Sr.toCss(Jr,eo,to),rgba:c}}e.opaque=o;function i(l,c){return gr=Math.round(c*255),[Jr,eo,to]=wb.toChannels(l.rgba),{css:Sr.toCss(Jr,eo,to,gr),rgba:Sr.toRgba(Jr,eo,to,gr)}}e.opacity=i;function a(l,c){return gr=l.rgba&255,i(l,gr*c/255)}e.multiplyOpacity=a;function s(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=s})(Lt||(Lt={}));var or;(e=>{let t,r;try{let o=document.createElement("canvas");o.width=1,o.height=1;let i=o.getContext("2d",{willReadFrequently:!0});i&&(t=i,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(o){if(o.match(/#[\da-f]{3,8}/i))switch(o.length){case 4:return Jr=parseInt(o.slice(1,2).repeat(2),16),eo=parseInt(o.slice(2,3).repeat(2),16),to=parseInt(o.slice(3,4).repeat(2),16),Sr.toColor(Jr,eo,to);case 5:return Jr=parseInt(o.slice(1,2).repeat(2),16),eo=parseInt(o.slice(2,3).repeat(2),16),to=parseInt(o.slice(3,4).repeat(2),16),gr=parseInt(o.slice(4,5).repeat(2),16),Sr.toColor(Jr,eo,to,gr);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}let i=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(i)return Jr=parseInt(i[1]),eo=parseInt(i[2]),to=parseInt(i[3]),gr=Math.round((i[5]===void 0?1:parseFloat(i[5]))*255),Sr.toColor(Jr,eo,to,gr);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=o,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Jr,eo,to,gr]=t.getImageData(0,0,1,1).data,gr!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Sr.toRgba(Jr,eo,to,gr),css:o}}e.toColor=n})(or||(or={}));var $o;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,o,i){let a=n/255,s=o/255,l=i/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+d*.7152+u*.0722}e.relativeLuminance2=r})($o||($o={}));var wb;(e=>{function t(a,s){if(gr=(s&255)/255,gr===1)return s;let l=s>>24&255,c=s>>16&255,d=s>>8&255,u=a>>24&255,f=a>>16&255,m=a>>8&255;return Jr=u+Math.round((l-u)*gr),eo=f+Math.round((c-f)*gr),to=m+Math.round((d-m)*gr),Sr.toRgba(Jr,eo,to)}e.blend=t;function r(a,s,l){let c=$o.relativeLuminance(a>>8),d=$o.relativeLuminance(s>>8);if(sl(c,d)<l){if(d<c){let m=n(a,s,l),p=sl(c,$o.relativeLuminance(m>>8));if(p<l){let h=o(a,s,l),y=sl(c,$o.relativeLuminance(h>>8));return p>y?m:h}return m}let u=o(a,s,l),f=sl(c,$o.relativeLuminance(u>>8));if(f<l){let m=n(a,s,l),p=sl(c,$o.relativeLuminance(m>>8));return f>p?u:m}return u}}e.ensureContrastRatio=r;function n(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,h=sl($o.relativeLuminance2(f,m,p),$o.relativeLuminance2(c,d,u));for(;h<l&&(f>0||m>0||p>0);)f-=Math.max(0,Math.ceil(f*.1)),m-=Math.max(0,Math.ceil(m*.1)),p-=Math.max(0,Math.ceil(p*.1)),h=sl($o.relativeLuminance2(f,m,p),$o.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.reduceLuminance=n;function o(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,h=sl($o.relativeLuminance2(f,m,p),$o.relativeLuminance2(c,d,u));for(;h<l&&(f<255||m<255||p<255);)f=Math.min(255,f+Math.ceil((255-f)*.1)),m=Math.min(255,m+Math.ceil((255-m)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),h=sl($o.relativeLuminance2(f,m,p),$o.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.increaseLuminance=o;function i(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=i})(wb||(wb={}));function Uu(e){let t=e.toString(16);return t.length<2?"0"+t:t}function sl(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var KIe=class extends Db{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},oC=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Ei}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),o=0,i=0,a=0,s=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==l){if(c-o>1){let d=this._getJoinedRanges(n,a,i,t,o);for(let u=0;u<d.length;u++)r.push(d[u])}o=c,a=i,s=this._workCell.fg,l=this._workCell.bg}i+=this._workCell.getChars().length||qc.length}if(this._bufferService.cols-o>1){let c=this._getJoinedRanges(n,a,i,t,o);for(let d=0;d<c.length;d++)r.push(c[d])}return r}_getJoinedRanges(e,t,r,n,o){let i=e.substring(t,r),a=[];try{a=this._characterJoiners[0].handler(i)}catch(s){console.error(s)}for(let s=1;s<this._characterJoiners.length;s++)try{let l=this._characterJoiners[s].handler(i);for(let c=0;c<l.length;c++)oC._mergeRanges(a,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(a,n,o),a}_stringRangesToCellRanges(e,t,r){let n=0,o=!1,i=0,a=e[n];if(a){for(let s=r;s<this._bufferService.cols;s++){let l=t.getWidth(s),c=t.getString(s).length||qc.length;if(l!==0){if(!o&&a[0]<=i&&(a[0]=s,o=!0),a[1]<=i){if(a[1]=s,a=e[++n],!a)break;a[0]<=i?(a[0]=s,o=!0):o=!1}i+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let o=e[n];if(r){if(t[1]<=o[0])return e[n-1][1]=t[1],e;if(t[1]<=o[1])return e[n-1][1]=Math.max(t[1],o[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=o[0])return e.splice(n,0,t),e;if(t[1]<=o[1])return o[0]=Math.min(t[0],o[0]),e;t[0]<o[1]&&(o[0]=Math.min(t[0],o[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};oC=vr([be(0,an)],oC);function XIe(e){return 57508<=e&&e<=57558}function QIe(e){return 9472<=e&&e<=9631}function YIe(e){return XIe(e)||QIe(e)}function JIe(){return{css:{canvas:Bk(),cell:Bk()},device:{canvas:Bk(),cell:Bk(),char:{width:0,height:0,left:0,top:0}}}}function Bk(){return{width:0,height:0}}var W3=class{constructor(e,t,r,n,o,i,a){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=o,this._decorationService=i,this._themeService=a,this._workCell=new Ei,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,o,i,a,s,l,c,d){let u=[],f=this._characterJoinerService.getJoinedCharacters(t),m=this._themeService.colors,p=e.getNoBgTrimmedLength();r&&p<i+1&&(p=i+1);let h,y=0,x="",v=0,_=0,I=0,S=0,w=!1,P=0,E=!1,B=0,H=0,Z=[],q=c!==-1&&d!==-1;for(let T=0;T<p;T++){e.loadCell(T,this._workCell);let k=this._workCell.getWidth();if(k===0)continue;let $=!1,C=T>=H,A=T,D=this._workCell;if(f.length>0&&T===f[0][0]&&C){let ze=f.shift(),Kt=this._isCellInSelection(ze[0],t);for(v=ze[0]+1;v<ze[1];v++)C&&(C=Kt===this._isCellInSelection(v,t));C&&(C=!r||i<ze[0]||i>=ze[1]),C?($=!0,D=new KIe(this._workCell,e.translateToString(!0,ze[0],ze[1]),ze[1]-ze[0]),A=ze[1]-1,k=D.getWidth()):H=ze[1]}let N=this._isCellInSelection(T,t),U=r&&T===i,G=q&&T>=c&&T<=d,re=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,ze=>{re=!0});let ge=D.getChars()||qc;if(ge===" "&&(D.isUnderline()||D.isOverline())&&(ge="\xA0"),B=k*s-l.get(ge,D.isBold(),D.isItalic()),!h)h=this._document.createElement("span");else if(y&&(N&&E||!N&&!E&&D.bg===_)&&(N&&E&&m.selectionForeground||D.fg===I)&&D.extended.ext===S&&G===w&&B===P&&!U&&!$&&!re&&C){D.isInvisible()?x+=qc:x+=ge,y++;continue}else y&&(h.textContent=x),h=this._document.createElement("span"),y=0,x="";if(_=D.bg,I=D.fg,S=D.extended.ext,w=G,P=B,E=N,$&&i>=T&&i<=A&&(i=T),!this._coreService.isCursorHidden&&U&&this._coreService.isCursorInitialized){if(Z.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&Z.push("xterm-cursor-blink"),Z.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(o)switch(o){case"outline":Z.push("xterm-cursor-outline");break;case"block":Z.push("xterm-cursor-block");break;case"bar":Z.push("xterm-cursor-bar");break;case"underline":Z.push("xterm-cursor-underline");break;default:break}}if(D.isBold()&&Z.push("xterm-bold"),D.isItalic()&&Z.push("xterm-italic"),D.isDim()&&Z.push("xterm-dim"),D.isInvisible()?x=qc:x=D.getChars()||qc,D.isUnderline()&&(Z.push(`xterm-underline-${D.extended.underlineStyle}`),x===" "&&(x="\xA0"),!D.isUnderlineColorDefault()))if(D.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${Db.toColorRGB(D.getUnderlineColor()).join(",")})`;else{let ze=D.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&D.isBold()&&ze<8&&(ze+=8),h.style.textDecorationColor=m.ansi[ze].css}D.isOverline()&&(Z.push("xterm-overline"),x===" "&&(x="\xA0")),D.isStrikethrough()&&Z.push("xterm-strikethrough"),G&&(h.style.textDecoration="underline");let me=D.getFgColor(),X=D.getFgColorMode(),oe=D.getBgColor(),Ie=D.getBgColorMode(),se=!!D.isInverse();if(se){let ze=me;me=oe,oe=ze;let Kt=X;X=Ie,Ie=Kt}let $e,Ue,Je=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,ze=>{ze.options.layer!=="top"&&Je||(ze.backgroundColorRGB&&(Ie=50331648,oe=ze.backgroundColorRGB.rgba>>8&16777215,$e=ze.backgroundColorRGB),ze.foregroundColorRGB&&(X=50331648,me=ze.foregroundColorRGB.rgba>>8&16777215,Ue=ze.foregroundColorRGB),Je=ze.options.layer==="top")}),!Je&&N&&($e=this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque,oe=$e.rgba>>8&16777215,Ie=50331648,Je=!0,m.selectionForeground&&(X=50331648,me=m.selectionForeground.rgba>>8&16777215,Ue=m.selectionForeground)),Je&&Z.push("xterm-decoration-top");let at;switch(Ie){case 16777216:case 33554432:at=m.ansi[oe],Z.push(`xterm-bg-${oe}`);break;case 50331648:at=Sr.toColor(oe>>16,oe>>8&255,oe&255),this._addStyle(h,`background-color:#${ZY((oe>>>0).toString(16),"0",6)}`);break;default:se?(at=m.foreground,Z.push("xterm-bg-257")):at=m.background}switch($e||D.isDim()&&($e=Lt.multiplyOpacity(at,.5)),X){case 16777216:case 33554432:D.isBold()&&me<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(me+=8),this._applyMinimumContrast(h,at,m.ansi[me],D,$e,void 0)||Z.push(`xterm-fg-${me}`);break;case 50331648:let ze=Sr.toColor(me>>16&255,me>>8&255,me&255);this._applyMinimumContrast(h,at,ze,D,$e,Ue)||this._addStyle(h,`color:#${ZY(me.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(h,at,m.foreground,D,$e,Ue)||se&&Z.push("xterm-fg-257")}Z.length&&(h.className=Z.join(" "),Z.length=0),!U&&!$&&!re&&C?y++:h.textContent=x,B!==this.defaultSpacing&&(h.style.letterSpacing=`${B}px`),u.push(h),T=A}return h&&y&&(h.textContent=x),u}_applyMinimumContrast(e,t,r,n,o,i){if(this._optionsService.rawOptions.minimumContrastRatio===1||YIe(n.getCode()))return!1;let a=this._getContrastCache(n),s;if(!o&&!i&&(s=a.getColor(t.rgba,r.rgba)),s===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);s=Lt.ensureContrastRatio(o||t,i||r,l),a.setColor((o||t).rgba,(i||r).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};W3=vr([be(1,EJ),be(2,sn),be(3,ul),be(4,Ku),be(5,Rb),be(6,fh)],W3);function ZY(e,t,r){for(;e.length<r;)e=t+e;return e}var e0e=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontStyle="italic";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontWeight="bold",i.style.fontStyle="italic",this._measureElements=[r,n,o,i],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(o),this._container.appendChild(i),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let o=e;t&&(o+="B"),r&&(o+="I");let i=this._holey.get(o);if(i===void 0){let a=0;t&&(a|=1),r&&(a|=2),i=this._measure(e,a),i>0&&this._holey.set(o,i)}return i}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},t0e=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let o=e.buffers.active.ydisp,i=t[1]-o,a=r[1]-o,s=Math.max(i,0),l=Math.min(a,e.rows-1);if(s>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=i,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function r0e(){return new t0e}var d3="xterm-dom-renderer-owner-",Pi="xterm-rows",jk="xterm-fg-",GY="xterm-bg-",cb="xterm-focus",Uk="xterm-selection",o0e=1,Z3=class extends qe{constructor(e,t,r,n,o,i,a,s,l,c,d,u,f,m){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=o,this._helperContainer=i,this._linkifier2=a,this._charSizeService=l,this._optionsService=c,this._bufferService=d,this._coreService=u,this._coreBrowserService=f,this._themeService=m,this._terminalClass=o0e++,this._rowElements=[],this._selectionRenderModel=r0e(),this.onRequestRedraw=this._register(new le).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Pi),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(Uk),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=JIe(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(p=>this._injectCss(p))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(W3,document),this._element.classList.add(d3+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(p=>this._handleLinkHover(p))),this._register(this._linkifier2.onHideLinkUnderline(p=>this._handleLinkLeave(p))),this._register(qt(()=>{this._element.classList.remove(d3+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new e0e(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Pi} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Pi} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Pi} .xterm-dim { color: ${Lt.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,o=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${o} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Pi}.${cb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Pi}.${cb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Pi}.${cb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${o} 1s step-end infinite;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Uk} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Uk} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Uk} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[i,a]of e.ansi.entries())t+=`${this._terminalSelector} .${jk}${i} { color: ${a.css}; }${this._terminalSelector} .${jk}${i}.xterm-dim { color: ${Lt.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${GY}${i} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${jk}257 { color: ${Lt.opaque(e.background).css}; }${this._terminalSelector} .${jk}257.xterm-dim { color: ${Lt.multiplyOpacity(Lt.opaque(e.background),.5).css}; }${this._terminalSelector} .${GY}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(cb),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(cb),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,o=this._selectionRenderModel.viewportEndRow,i=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(r){let l=e[0]>t[0];s.appendChild(this._createSelectionElement(i,l?t[0]:e[0],l?e[0]:t[0],a-i+1))}else{let l=n===i?e[0]:0,c=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(i,l,c));let d=a-i-1;if(s.appendChild(this._createSelectionElement(i+1,0,this._bufferService.cols,d)),i!==a){let u=o===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,u))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,r,n=1){let o=this._document.createElement("div"),i=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(r-t);return i+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-i),o.style.height=`${n*this.dimensions.css.cell.height}px`,o.style.top=`${e*this.dimensions.css.cell.height}px`,o.style.left=`${i}px`,o.style.width=`${a}px`,o}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,o=Math.min(r.x,this._bufferService.cols-1),i=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+r.ydisp,d=this._rowElements[l],u=r.lines.get(c);if(!d||!u)break;d.replaceChildren(...this._rowFactory.createRow(u,c,c===n,a,s,o,i,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${d3}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,o,i){r<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;r=Math.max(Math.min(r,a),0),n=Math.max(Math.min(n,a),0),o=Math.min(o,this._bufferService.cols);let s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,o-1),d=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let m=r;m<=n;++m){let p=m+s.ydisp,h=this._rowElements[m],y=s.lines.get(p);if(!h||!y)break;h.replaceChildren(...this._rowFactory.createRow(y,p,p===l,u,f,c,d,this.dimensions.css.cell.width,this._widthCache,i?m===r?e:0:-1,i?(m===n?t:o)-1:-1))}}};Z3=vr([be(7,aN),be(8,lC),be(9,sn),be(10,an),be(11,Ku),be(12,ul),be(13,fh)],Z3);var G3=class extends qe{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new le),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new i0e(this._optionsService))}catch{this._measureStrategy=this._register(new n0e(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};G3=vr([be(2,sn)],G3);var eee=class extends qe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},n0e=class extends eee{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},i0e=class extends eee{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},a0e=class extends qe{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new s0e(this._window)),this._onDprChange=this._register(new le),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new le),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(ro.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Le(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Le(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},s0e=class extends qe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new uh),this._onDprChange=this._register(new le),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(qt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Le(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},l0e=class extends qe{constructor(){super(),this.linkProviders=[],this._register(qt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function pN(e,t,r){let n=r.getBoundingClientRect(),o=e.getComputedStyle(r),i=parseInt(o.getPropertyValue("padding-left")),a=parseInt(o.getPropertyValue("padding-top"));return[t.clientX-n.left-i,t.clientY-n.top-a]}function c0e(e,t,r,n,o,i,a,s,l){if(!i)return;let c=pN(e,t,r);if(c)return c[0]=Math.ceil((c[0]+(l?a/2:0))/a),c[1]=Math.ceil(c[1]/s),c[0]=Math.min(Math.max(c[0],1),n+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c}var q3=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,o){return c0e(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(e,t){let r=pN(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};q3=vr([be(0,fl),be(1,lC)],q3);var d0e=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},tee={};Xye(tee,{getSafariVersion:()=>f0e,isChromeOS:()=>iee,isFirefox:()=>ree,isIpad:()=>m0e,isIphone:()=>p0e,isLegacyEdge:()=>u0e,isLinux:()=>hN,isMac:()=>nC,isNode:()=>uC,isSafari:()=>oee,isWindows:()=>nee});var uC=typeof process<"u"&&"title"in process,Eb=uC?"node":navigator.userAgent,Tb=uC?"node":navigator.platform,ree=Eb.includes("Firefox"),u0e=Eb.includes("Edge"),oee=/^((?!chrome|android).)*safari/i.test(Eb);function f0e(){if(!oee)return 0;let e=Eb.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var nC=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Tb),m0e=Tb==="iPad",p0e=Tb==="iPhone",nee=["Windows","Win16","Win32","WinCE"].includes(Tb),hN=Tb.indexOf("Linux")>=0,iee=/\bCrOS\b/.test(Eb),aee=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),o=e.timeRemaining(),r*1.5>o){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=o}this.clear()}},h0e=class extends aee{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},g0e=class extends aee{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},iC=!uC&&"requestIdleCallback"in window?g0e:h0e,v0e=class{constructor(){this._queue=new iC}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},K3=class extends qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=o,this._coreBrowserService=s,this._renderer=this._register(new uh),this._pausedResizeTask=new v0e,this._observerDisposable=this._register(new uh),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new le),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new le),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new le),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new le),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new d0e((c,d)=>this._renderRows(c,d),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new x0e(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(qt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(i.onDecorationRegistered(()=>this._fullRefresh())),this._register(i.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=qt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.value?.handleSelectionChanged(e,t,r)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};K3=vr([be(2,sn),be(3,lC),be(4,Ku),be(5,Rb),be(6,an),be(7,ul),be(8,fh)],K3);var x0e=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function b0e(e,t,r,n){let o=r.buffer.x,i=r.buffer.y;if(!r.buffer.hasScrollback)return I0e(o,i,e,t,r,n)+fC(i,t,r,n)+w0e(o,i,e,t,r,n);let a;if(i===t)return a=o>e?"D":"C",Cb(Math.abs(o-e),kb(a,n));a=i>t?"D":"C";let s=Math.abs(i-t),l=_0e(i>t?e:o,r)+(s-1)*r.cols+1+y0e(i>t?o:e,r);return Cb(l,kb(a,n))}function y0e(e,t){return e-1}function _0e(e,t){return t.cols-e}function I0e(e,t,r,n,o,i){return fC(t,n,o,i).length===0?"":Cb(lee(e,t,e,t-qu(t,o),!1,o).length,kb("D",i))}function fC(e,t,r,n){let o=e-qu(e,r),i=t-qu(t,r),a=Math.abs(o-i)-S0e(e,t,r);return Cb(a,kb(see(e,t),n))}function w0e(e,t,r,n,o,i){let a;fC(t,n,o,i).length>0?a=n-qu(n,o):a=t;let s=n,l=k0e(e,t,r,n,o,i);return Cb(lee(e,a,r,s,l==="C",o).length,kb(l,i))}function S0e(e,t,r){let n=0,o=e-qu(e,r),i=t-qu(t,r);for(let a=0;a<Math.abs(o-i);a++){let s=see(e,t)==="A"?-1:1;r.buffer.lines.get(o+s*a)?.isWrapped&&n++}return n}function qu(e,t){let r=0,n=t.buffer.lines.get(e),o=n?.isWrapped;for(;o&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),o=n?.isWrapped;return r}function k0e(e,t,r,n,o,i){let a;return fC(r,n,o,i).length>0?a=n-qu(n,o):a=t,e<r&&a<=n||e>=r&&a<n?"C":"D"}function see(e,t){return e>t?"A":"B"}function lee(e,t,r,n,o,i){let a=e,s=t,l="";for(;(a!==r||s!==n)&&s>=0&&s<i.buffer.lines.length;)a+=o?1:-1,o&&a>i.cols-1?(l+=i.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!o&&a<0&&(l+=i.buffer.translateBufferLineToString(s,!1,0,e+1),a=i.cols-1,e=a,s--);return l+i.buffer.translateBufferLineToString(s,!1,e,a)}function kb(e,t){let r=t?"O":"[";return te.ESC+r+e}function Cb(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var C0e=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function qY(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var u3=50,P0e=15,D0e=50,R0e=500,E0e="\xA0",T0e=new RegExp(E0e,"g"),X3=class extends qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=o,this._mouseService=i,this._optionsService=a,this._renderService=s,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Ei,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new le),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new le),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new le),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new le),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new C0e(this._bufferService),this._activeSelectionMode=0,this._register(qt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let o=e[0]<t[0]?e[0]:t[0],i=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let s=r.translateBufferLineToString(a,!0,o,i);n.push(s)}}else{let o=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],o));for(let i=e[1]+1;i<=t[1]-1;i++){let a=r.lines.get(i),s=r.translateBufferLineToString(i,!0);a?.isWrapped?n[n.length-1]+=s:n.push(s)}if(e[1]!==t[1]){let i=r.lines.get(t[1]),a=r.translateBufferLineToString(t[1],!0,0,t[0]);i&&i.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(o=>o.replace(T0e," ")).join(nee?`\r
|
|
212
|
+
`:`
|
|
213
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),hN&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let r=this._linkifier.currentLink?.link?.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=qY(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=pN(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-u3),u3),t/=u3,t/Math.abs(t)+Math.round(t*(P0e-1)))}shouldForceSelection(e){return nC?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),D0e)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(nC&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<R0e&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=b0e(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let o=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:o>1&&t!==n&&(r+=o-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let o=this._bufferService.buffer,i=o.lines.get(e[1]);if(!i)return;let a=o.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(i,e[0]),l=s,c=e[0]-s,d=0,u=0,f=0,m=0;if(a.charAt(s)===" "){for(;s>0&&a.charAt(s-1)===" ";)s--;for(;l<a.length&&a.charAt(l+1)===" ";)l++}else{let y=e[0],x=e[0];i.getWidth(y)===0&&(d++,y--),i.getWidth(x)===2&&(u++,x++);let v=i.getString(x).length;for(v>1&&(m+=v-1,l+=v-1);y>0&&s>0&&!this._isCharWordSeparator(i.loadCell(y-1,this._workCell));){i.loadCell(y-1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===0?(d++,y--):_>1&&(f+=_-1,s-=_-1),s--,y--}for(;x<i.length&&l+1<a.length&&!this._isCharWordSeparator(i.loadCell(x+1,this._workCell));){i.loadCell(x+1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===2?(u++,x++):_>1&&(m+=_-1,l+=_-1),l++,x++}}l++;let p=s+c-d+f,h=Math.min(this._bufferService.cols,l-s+d+u-f-m);if(!(!t&&a.slice(s,l).trim()==="")){if(r&&p===0&&i.getCodePoint(0)!==32){let y=o.lines.get(e[1]-1);if(y&&i.isWrapped&&y.getCodePoint(this._bufferService.cols-1)!==32){let x=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(x){let v=this._bufferService.cols-x.start;p-=v,h+=v}}}if(n&&p+h===this._bufferService.cols&&i.getCodePoint(this._bufferService.cols-1)!==32){let y=o.lines.get(e[1]+1);if(y?.isWrapped&&y.getCodePoint(0)!==32){let x=this._getWordAt([0,e[1]+1],!1,!1,!0);x&&(h+=x.length)}}return{start:p,length:h}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=qY(r,this._bufferService.cols)}};X3=vr([be(3,an),be(4,Ku),be(5,sN),be(6,sn),be(7,fl),be(8,ul)],X3);var KY=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},XY=class{constructor(){this._color=new KY,this._css=new KY}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Mr=Object.freeze((()=>{let e=[or.toColor("#2e3436"),or.toColor("#cc0000"),or.toColor("#4e9a06"),or.toColor("#c4a000"),or.toColor("#3465a4"),or.toColor("#75507b"),or.toColor("#06989a"),or.toColor("#d3d7cf"),or.toColor("#555753"),or.toColor("#ef2929"),or.toColor("#8ae234"),or.toColor("#fce94f"),or.toColor("#729fcf"),or.toColor("#ad7fa8"),or.toColor("#34e2e2"),or.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],o=t[r/6%6|0],i=t[r%6];e.push({css:Sr.toCss(n,o,i),rgba:Sr.toRgba(n,o,i)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:Sr.toCss(n,n,n),rgba:Sr.toRgba(n,n,n)})}return e})()),Vu=or.toColor("#ffffff"),gb=or.toColor("#000000"),QY=or.toColor("#ffffff"),YY=gb,db={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},$0e=Vu,Q3=class extends qe{constructor(e){super(),this._optionsService=e,this._contrastCache=new XY,this._halfContrastCache=new XY,this._onChangeColors=this._register(new le),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Vu,background:gb,cursor:QY,cursorAccent:YY,selectionForeground:void 0,selectionBackgroundTransparent:db,selectionBackgroundOpaque:Lt.blend(gb,db),selectionInactiveBackgroundTransparent:db,selectionInactiveBackgroundOpaque:Lt.blend(gb,db),scrollbarSliderBackground:Lt.opacity(Vu,.2),scrollbarSliderHoverBackground:Lt.opacity(Vu,.4),scrollbarSliderActiveBackground:Lt.opacity(Vu,.5),overviewRulerBorder:Vu,ansi:Mr.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Rt(e.foreground,Vu),t.background=Rt(e.background,gb),t.cursor=Lt.blend(t.background,Rt(e.cursor,QY)),t.cursorAccent=Lt.blend(t.background,Rt(e.cursorAccent,YY)),t.selectionBackgroundTransparent=Rt(e.selectionBackground,db),t.selectionBackgroundOpaque=Lt.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Rt(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Lt.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Rt(e.selectionForeground,WY):void 0,t.selectionForeground===WY&&(t.selectionForeground=void 0),Lt.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Lt.opacity(t.selectionBackgroundTransparent,.3)),Lt.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Lt.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Rt(e.scrollbarSliderBackground,Lt.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Rt(e.scrollbarSliderHoverBackground,Lt.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Rt(e.scrollbarSliderActiveBackground,Lt.opacity(t.foreground,.5)),t.overviewRulerBorder=Rt(e.overviewRulerBorder,$0e),t.ansi=Mr.slice(),t.ansi[0]=Rt(e.black,Mr[0]),t.ansi[1]=Rt(e.red,Mr[1]),t.ansi[2]=Rt(e.green,Mr[2]),t.ansi[3]=Rt(e.yellow,Mr[3]),t.ansi[4]=Rt(e.blue,Mr[4]),t.ansi[5]=Rt(e.magenta,Mr[5]),t.ansi[6]=Rt(e.cyan,Mr[6]),t.ansi[7]=Rt(e.white,Mr[7]),t.ansi[8]=Rt(e.brightBlack,Mr[8]),t.ansi[9]=Rt(e.brightRed,Mr[9]),t.ansi[10]=Rt(e.brightGreen,Mr[10]),t.ansi[11]=Rt(e.brightYellow,Mr[11]),t.ansi[12]=Rt(e.brightBlue,Mr[12]),t.ansi[13]=Rt(e.brightMagenta,Mr[13]),t.ansi[14]=Rt(e.brightCyan,Mr[14]),t.ansi[15]=Rt(e.brightWhite,Mr[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=Rt(e.extendedAnsi[n],Mr[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};Q3=vr([be(0,sn)],Q3);function Rt(e,t){if(e!==void 0)try{return or.toColor(e)}catch{}return t}var A0e=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},O0e=class{constructor(){this._services=new A0e,this._services.set(aN,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=o_e(e).sort((i,a)=>i.index-a.index),n=[];for(let i of r){let a=this._services.get(i.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${i.id._id}.`);n.push(a)}let o=r.length>0?r[0].index:t.length;if(t.length!==o)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},z0e={trace:0,debug:1,info:2,warn:3,error:4,off:5},N0e="xterm.js: ",Y3=class extends qe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),F0e=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=z0e[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":N0e)+t,...r)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Y3=vr([be(0,sn)],Y3);var F0e,JY=class extends qe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new le),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new le),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new le),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let o=t-1;o>=0;o--)this.set(e+o+r,this.get(e+o));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Ye=3,Rr=Object.freeze(new Db),Vk=0,f3=2,vb=class cee{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Ye);let o=r||Ei.fromCharData([0,wJ,1,0]);for(let i=0;i<t;++i)this.setCell(i,o);this.length=t}get(t){let r=this._data[t*Ye+0],n=r&2097151;return[this._data[t*Ye+1],r&2097152?this._combined[t]:n?Gc(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Ye+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Ye+0]=t|2097152|r[2]<<22):this._data[t*Ye+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Ye+0]>>22}hasWidth(t){return this._data[t*Ye+0]&12582912}getFg(t){return this._data[t*Ye+1]}getBg(t){return this._data[t*Ye+2]}hasContent(t){return this._data[t*Ye+0]&4194303}getCodePoint(t){let r=this._data[t*Ye+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Ye+0]&2097152}getString(t){let r=this._data[t*Ye+0];return r&2097152?this._combined[t]:r&2097151?Gc(r&2097151):""}isProtected(t){return this._data[t*Ye+2]&536870912}loadCell(t,r){return Vk=t*Ye,r.content=this._data[Vk+0],r.fg=this._data[Vk+1],r.bg=this._data[Vk+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Ye+0]=r.content,this._data[t*Ye+1]=r.fg,this._data[t*Ye+2]=r.bg}setCellFromCodepoint(t,r,n,o){o.bg&268435456&&(this._extendedAttrs[t]=o.extended),this._data[t*Ye+0]=r|n<<22,this._data[t*Ye+1]=o.fg,this._data[t*Ye+2]=o.bg}addCodepointToCell(t,r,n){let o=this._data[t*Ye+0];o&2097152?this._combined[t]+=Gc(r):o&2097151?(this._combined[t]=Gc(o&2097151)+Gc(r),o&=-2097152,o|=2097152):o=r|1<<22,n&&(o&=-12582913,o|=n<<22),this._data[t*Ye+0]=o}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let o=new Ei;for(let i=this.length-t-r-1;i>=0;--i)this.setCell(t+r+i,this.loadCell(t+i,o));for(let i=0;i<r;++i)this.setCell(t+i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let o=new Ei;for(let i=0;i<this.length-t-r;++i)this.setCell(t+i,this.loadCell(t+r+i,o));for(let i=this.length-r;i<this.length;++i)this.setCell(i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,o=!1){if(o){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*f3<this._data.buffer.byteLength;let n=t*Ye;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let o=new Uint32Array(n);o.set(this._data),this._data=o}for(let o=this.length;o<t;++o)this.setCell(o,r)}else{this._data=this._data.subarray(0,n);let o=Object.keys(this._combined);for(let a=0;a<o.length;a++){let s=parseInt(o[a],10);s>=t&&delete this._combined[s]}let i=Object.keys(this._extendedAttrs);for(let a=0;a<i.length;a++){let s=parseInt(i[a],10);s>=t&&delete this._extendedAttrs[s]}}return this.length=t,n*4*f3<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*f3<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new cee(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ye+0]&4194303)return t+(this._data[t*Ye+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ye+0]&4194303||this._data[t*Ye+2]&50331648)return t+(this._data[t*Ye+0]>>22);return 0}copyCellsFrom(t,r,n,o,i){let a=t._data;if(i)for(let l=o-1;l>=0;l--){for(let c=0;c<Ye;c++)this._data[(n+l)*Ye+c]=a[(r+l)*Ye+c];a[(r+l)*Ye+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}else for(let l=0;l<o;l++){for(let c=0;c<Ye;c++)this._data[(n+l)*Ye+c]=a[(r+l)*Ye+c];a[(r+l)*Ye+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}let s=Object.keys(t._combined);for(let l=0;l<s.length;l++){let c=parseInt(s[l],10);c>=r&&(this._combined[c-r+n]=t._combined[c])}}translateToString(t,r,n,o){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),o&&(o.length=0);let i="";for(;r<n;){let a=this._data[r*Ye+0],s=a&2097151,l=a&2097152?this._combined[r]:s?Gc(s):qc;if(i+=l,o)for(let c=0;c<l.length;++c)o.push(r);r+=a>>22||1}return o&&o.push(r),i}};function L0e(e,t,r,n,o,i){let a=[];for(let s=0;s<e.length-1;s++){let l=s,c=e.get(++l);if(!c.isWrapped)continue;let d=[e.get(s)];for(;l<e.length&&c.isWrapped;)d.push(c),c=e.get(++l);if(!i&&n>=s&&n<l){s+=d.length-1;continue}let u=0,f=Pb(d,u,t),m=1,p=0;for(;m<d.length;){let y=Pb(d,m,t),x=y-p,v=r-f,_=Math.min(x,v);d[u].copyCellsFrom(d[m],p,f,_,!1),f+=_,f===r&&(u++,f=0),p+=_,p===y&&(m++,p=0),f===0&&u!==0&&d[u-1].getWidth(r-1)===2&&(d[u].copyCellsFrom(d[u-1],r-1,f++,1,!1),d[u-1].setCell(r-1,o))}d[u].replaceCells(f,r,o);let h=0;for(let y=d.length-1;y>0&&(y>u||d[y].getTrimmedLength()===0);y--)h++;h>0&&(a.push(s+d.length-h),a.push(h)),s+=d.length-1}return a}function M0e(e,t){let r=[],n=0,o=t[n],i=0;for(let a=0;a<e.length;a++)if(o===a){let s=t[++n];e.onDeleteEmitter.fire({index:a-i,amount:s}),a+=s-1,i+=s,o=t[++n]}else r.push(a);return{layout:r,countRemoved:i}}function B0e(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function j0e(e,t,r){let n=[],o=e.map((l,c)=>Pb(e,c,t)).reduce((l,c)=>l+c),i=0,a=0,s=0;for(;s<o;){if(o-s<r){n.push(o-s);break}i+=r;let l=Pb(e,a,t);i>l&&(i-=l,a++);let c=e[a].getWidth(i-1)===2;c&&i--;let d=c?r-1:r;n.push(d),s+=d}return n}function Pb(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,o=e[t+1].getWidth(0)===2;return n&&o?r-1:r}var dee=class uee{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=uee._nextId++,this._onDispose=this.register(new le),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Gu(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};dee._nextId=1;var U0e=dee,jr={},Hu=jr.B;jr[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};jr.A={"#":"\xA3"};jr.B=void 0;jr[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};jr.C=jr[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};jr.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};jr.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};jr.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};jr.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};jr.E=jr[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};jr.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};jr.H=jr[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};jr["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var eJ=4294967295,tJ=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Rr.clone(),this.savedCharset=Hu,this.markers=[],this._nullCell=Ei.fromCharData([0,wJ,1,0]),this._whitespaceCell=Ei.fromCharData([0,qc,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new iC,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new JY(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Yk),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Yk),this._whitespaceCell}getBlankLine(e,t){return new vb(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>eJ?eJ:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Rr);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new JY(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(Rr),n=0,o=this._getCorrectBufferLength(t);if(o>this.lines.maxLength&&(this.lines.maxLength=o),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);let i=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new vb(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+i+1?(this.ybase--,i++,this.ydisp>0&&this.ydisp--):this.lines.push(new vb(e,r)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(o<this.lines.maxLength){let a=this.lines.length-o;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=o}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),i&&(this.y+=i),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let i=0;i<this.lines.length;i++)n+=+this.lines.get(i).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=L0e(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Rr),r);if(n.length>0){let o=M0e(this.lines,n);B0e(this.lines,o.layout),this._reflowLargerAdjustViewport(e,t,o.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell(Rr),o=r;for(;o-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new vb(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(Rr),o=[],i=0;for(let a=this.lines.length-1;a>=0;a--){let s=this.lines.get(a);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let l=[s];for(;s.isWrapped&&a>0;)s=this.lines.get(--a),l.unshift(s);if(!r){let _=this.ybase+this.y;if(_>=a&&_<a+l.length)continue}let c=l[l.length-1].getTrimmedLength(),d=j0e(l,this._cols,e),u=d.length-l.length,f;this.ybase===0&&this.y!==this.lines.length-1?f=Math.max(0,this.y-this.lines.maxLength+u):f=Math.max(0,this.lines.length-this.lines.maxLength+u);let m=[];for(let _=0;_<u;_++){let I=this.getBlankLine(Rr,!0);m.push(I)}m.length>0&&(o.push({start:a+l.length+i,newLines:m}),i+=m.length),l.push(...m);let p=d.length-1,h=d[p];h===0&&(p--,h=d[p]);let y=l.length-u-1,x=c;for(;y>=0;){let _=Math.min(x,h);if(l[p]===void 0)break;if(l[p].copyCellsFrom(l[y],x-_,h-_,_,!0),h-=_,h===0&&(p--,h=d[p]),x-=_,x===0){y--;let I=Math.max(y,0);x=Pb(l,I,this._cols)}}for(let _=0;_<l.length;_++)d[_]<e&&l[_].setCell(d[_],n);let v=u-f;for(;v-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+i)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+u,this.ybase+t-1)}if(o.length>0){let a=[],s=[];for(let h=0;h<this.lines.length;h++)s.push(this.lines.get(h));let l=this.lines.length,c=l-1,d=0,u=o[d];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+i);let f=0;for(let h=Math.min(this.lines.maxLength-1,l+i-1);h>=0;h--)if(u&&u.start>c+f){for(let y=u.newLines.length-1;y>=0;y--)this.lines.set(h--,u.newLines[y]);h++,a.push({index:c+1,amount:u.newLines.length}),f+=u.newLines.length,u=o[++d]}else this.lines.set(h,s[c--]);let m=0;for(let h=a.length-1;h>=0;h--)a[h].index+=m,this.lines.onInsertEmitter.fire(a[h]),m+=a[h].amount;let p=Math.max(0,l+i-this.lines.maxLength);p>0&&this.lines.onTrimEmitter.fire(p)}}translateBufferLineToString(e,t,r=0,n){let o=this.lines.get(e);return o?o.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new U0e(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},V0e=class extends qe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new le),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new tJ(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new tJ(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},fee=2,mee=1,J3=class extends qe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new le),this.onResize=this._onResize.event,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,fee),this.rows=Math.max(e.rawOptions.rows||0,mee),this.buffers=this._register(new V0e(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let o=r.ybase+r.scrollTop,i=r.ybase+r.scrollBottom;if(r.scrollTop===0){let a=r.lines.isFull;i===r.lines.length-1?a?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(i+1,0,n.clone()),a?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let a=i-o+1;r.lines.shiftElements(o+1,a-1,-1),r.lines.set(i,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};J3=vr([be(0,sn)],J3);var ch={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:nC,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},H0e=["normal","bold","100","200","300","400","500","600","700","800","900"],W0e=class extends qe{constructor(e){super(),this._onOptionChange=this._register(new le),this.onOptionChange=this._onOptionChange.event;let t={...ch};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(qt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in ch))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in ch))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=ch[e]),!Z0e(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=ch[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=H0e.includes(t)?t:ch[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function Z0e(e){return e==="block"||e==="underline"||e==="bar"}function xb(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&xb(e[n],t-1);return r}var rJ=Object.freeze({insertMode:!1}),oJ=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),eN=class extends qe{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new le),this.onData=this._onData.event,this._onUserInput=this._register(new le),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new le),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new le),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=xb(rJ),this.decPrivateModes=xb(oJ)}reset(){this.modes=xb(rJ),this.decPrivateModes=xb(oJ)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};eN=vr([be(0,an),be(1,DJ),be(2,sn)],eN);var nJ={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function m3(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var p3=String.fromCharCode,iJ={DEFAULT:e=>{let t=[m3(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${p3(t[0])}${p3(t[1])}${p3(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${m3(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${m3(e,!0)};${e.x};${e.y}${t}`}},tN=class extends qe{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new le),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(nJ))this.addProtocol(n,nJ[n]);for(let n of Object.keys(iJ))this.addEncoding(n,iJ[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,o=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=n+0,Math.abs(e.deltaY)<50&&(o*=.3),this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};tN=vr([be(0,an),be(1,Ku),be(2,sn)],tN);var h3=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],G0e=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Br;function q0e(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var K0e=class{constructor(){if(this.version="6",!Br){Br=new Uint8Array(65536),Br.fill(1),Br[0]=0,Br.fill(0,1,32),Br.fill(0,127,160),Br.fill(2,4352,4448),Br[9001]=2,Br[9002]=2,Br.fill(2,11904,42192),Br[12351]=1,Br.fill(2,44032,55204),Br.fill(2,63744,64256),Br.fill(2,65040,65050),Br.fill(2,65072,65136),Br.fill(2,65280,65377),Br.fill(2,65504,65511);for(let e=0;e<h3.length;++e)Br.fill(0,h3[e][0],h3[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Br[e]:q0e(e,G0e)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Wu.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Wu.createPropertyValue(0,r,n)}},Wu=class Qk{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new le,this.onChange=this._onChange.event;let t=new K0e;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=Qk.extractWidth(s);Qk.extractShouldJoin(s)&&(l-=Qk.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},X0e=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function aJ(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var ub=2147483647,Q0e=256,pee=class rN{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>Q0e)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new rN;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let o=t[n];if(Array.isArray(o))for(let i=0;i<o.length;++i)r.addSubParam(o[i]);else r.addParam(o)}return r}clone(){let t=new rN(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,o))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>ub?ub:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>ub?ub:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&(t[r]=this._subParams.slice(n,o))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,o=n[r-1];n[r-1]=~o?Math.min(o*10+t,ub):t}},fb=[],Y0e=class{constructor(){this._state=0,this._active=fb,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=fb}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=fb,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||fb,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",sC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=fb,this._id=-1,this._state=0}}},Kn=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=sC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},mb=[],J0e=class{constructor(){this._handlers=Object.create(null),this._active=mb,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=mb}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=mb,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||mb,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",sC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=mb,this._ident=0}},bb=new pee;bb.addParam(0);var sJ=class{constructor(e){this._handler=e,this._data="",this._params=bb,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():bb,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=sC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=bb,this._data="",this._hitLimit=!1,r));return this._params=bb,this._data="",this._hitLimit=!1,t}},ewe=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let o=0;o<e.length;o++)this.table[t<<8|e[o]]=r<<4|n}},Ri=160,twe=(function(){let e=new ewe(4095),t=Array.apply(null,Array(256)).map((s,l)=>l),r=(s,l)=>t.slice(s,l),n=r(32,127),o=r(0,24);o.push(25),o.push.apply(o,r(28,32));let i=r(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in i)e.addMany([24,26,153,154],a,3,0),e.addMany(r(128,144),a,3,0),e.addMany(r(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(o,0,3,0),e.addMany(o,1,3,1),e.add(127,1,0,1),e.addMany(o,8,0,8),e.addMany(o,3,3,3),e.add(127,3,0,3),e.addMany(o,4,3,4),e.add(127,4,0,4),e.addMany(o,6,3,6),e.addMany(o,5,3,5),e.add(127,5,0,5),e.addMany(o,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(o,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(o,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(o,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(o,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(o,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(o,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Ri,0,2,0),e.add(Ri,8,5,8),e.add(Ri,6,0,6),e.add(Ri,11,0,11),e.add(Ri,13,13,13),e})(),rwe=class extends qe{constructor(e=twe){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new pee,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(qt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new Y0e),this._dcsParser=this._register(new J0e),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let o=0;o<e.intermediates.length;++o){let i=e.intermediates.charCodeAt(o);if(32>i||i>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=i}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,o){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=o}parse(e,t,r){let n=0,o=0,i=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,i=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let s=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](this._params),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 4:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,i=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let s=i;s<t;++s){switch(n=e[s],o=this._transitions.table[this.currentState<<8|(n<160?n:Ri)],o>>4){case 2:for(let f=s+1;;++f){if(f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:s,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|n],c=l?l.length-1:-1;for(;c>=0&&(a=l[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,l,c,o,s),a;c<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++s<t&&(n=e[s])>47&&n<60);s--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let d=this._escHandlers[this._collect<<8|n],u=d?d.length-1:-1;for(;u>=0&&(a=d[u](),a!==!0);u--)if(a instanceof Promise)return this._preserveStack(4,d,u,o,s),a;u<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let f=s+1;;++f)if(f>=t||(n=e[f])===24||n===26||n===27||n>127&&n<Ri){this._dcsParser.put(e,s,f),s=f-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let f=s+1;;f++)if(f>=t||(n=e[f])<32||n>127&&n<Ri){this._oscParser.put(e,s,f),s=f-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=o&15}}},owe=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,nwe=/^[\da-f]+$/;function lJ(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=owe.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),nwe.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let o=0;o<3;++o){let i=parseInt(t.slice(r*o,r*o+r),16);n[o]=r===1?i<<4:r===2?i:r===3?i>>4:i>>8}return n}}function g3(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function iwe(e,t=16){let[r,n,o]=e;return`rgb:${g3(r,t)}/${g3(n,t)}/${g3(o,t)}`}var awe={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Zc=131072,cJ=10;function dJ(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var uJ=5e3,fJ=0,swe=class extends qe{constructor(e,t,r,n,o,i,a,s,l=new rwe){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=o,this._oscLinkService=i,this._coreMouseService=a,this._unicodeService=s,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new t_e,this._utf8Decoder=new r_e,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Rr.clone(),this._eraseAttrDataInternal=Rr.clone(),this._onRequestBell=this._register(new le),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new le),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new le),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new le),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new le),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new le),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new le),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new le),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new le),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new le),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new le),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new le),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new oN(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,d)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:d.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,d,u)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:d,data:u})}),this._parser.setDcsHandlerFallback((c,d,u)=>{d==="HOOK"&&(u=u.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:d,payload:u})}),this._parser.setPrintHandler((c,d,u)=>this.print(c,d,u)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(te.BEL,()=>this.bell()),this._parser.setExecuteHandler(te.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(te.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(te.BS,()=>this.backspace()),this._parser.setExecuteHandler(te.HT,()=>this.tab()),this._parser.setExecuteHandler(te.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(te.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Ib.IND,()=>this.index()),this._parser.setExecuteHandler(Ib.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Ib.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Kn(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new Kn(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new Kn(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new Kn(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new Kn(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new Kn(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new Kn(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new Kn(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new Kn(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new Kn(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new Kn(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new Kn(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in jr)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new sJ((c,d)=>this.requestStatusString(c,d)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),uJ))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${uJ} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,o=this._activeBuffer.y,i=0,a=this._parseStack.paused;if(a){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,o=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>Zc&&(i=this._parseStack.position+Zc)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<Zc&&(this._parseBuffer=new Uint32Array(Math.min(e.length,Zc))),a||this._dirtyRowTracker.clearRange(),e.length>Zc)for(let c=i;c<e.length;c+=Zc){let d=c+Zc<e.length?c+Zc:e.length,u=typeof e=="string"?this._stringDecoder.decode(e.substring(c,d),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,d),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,u))return this._preserveStack(n,o,u,c),this._logSlowResolvingAsync(r),r}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,c))return this._preserveStack(n,o,c,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==o)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,r){let n,o,i=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,d=this._curAttrData,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&u.getWidth(this._activeBuffer.x-1)===2&&u.setCellFromCodepoint(this._activeBuffer.x-1,0,1,d);let f=this._parser.precedingJoinState;for(let m=t;m<r;++m){if(n=e[m],n<127&&i){let x=i[String.fromCharCode(n)];x&&(n=x.charCodeAt(0))}let p=this._unicodeService.charProperties(n,f);o=Wu.extractWidth(p);let h=Wu.extractShouldJoin(p),y=h?Wu.extractWidth(f):0;if(f=p,a&&this._onA11yChar.fire(Gc(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+o-y>s){if(l){let x=u,v=this._activeBuffer.x-y;for(this._activeBuffer.x=y,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),y>0&&u instanceof vb&&u.copyCellsFrom(x,v,0,y,!1);v<s;)x.setCellFromCodepoint(v++,0,1,d)}else if(this._activeBuffer.x=s-1,o===2)continue}if(h&&this._activeBuffer.x){let x=u.getWidth(this._activeBuffer.x-1)?1:2;u.addCodepointToCell(this._activeBuffer.x-x,n,o);for(let v=o-y;--v>=0;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d);continue}if(c&&(u.insertCells(this._activeBuffer.x,o-y,this._activeBuffer.getNullCell(d)),u.getWidth(s-1)===2&&u.setCellFromCodepoint(s-1,0,1,d)),u.setCellFromCodepoint(this._activeBuffer.x++,n,o,d),o>0)for(;--o;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&r-t>0&&u.getWidth(this._activeBuffer.x)===0&&!u.hasContent(this._activeBuffer.x)&&u.setCellFromCodepoint(this._activeBuffer.x,0,1,d),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>dJ(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new sJ(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Kn(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,o=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),o),n&&(i.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+r)?.getTrimmedLength(););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let n=this._activeBuffer.lines.length-this._bufferService.rows;n>0&&(this._activeBuffer.lines.trimStart(n),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-n,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-n,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,o=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(o-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Rr));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=Wu.extractWidth(t),o=this._activeBuffer.x-n,i=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(o),a=new Uint32Array(i.length*r),s=0;for(let c=0;c<i.length;){let d=i.codePointAt(c)||0;a[s++]=d,c+=d>65535?2:1}let l=s;for(let c=1;c<r;++c)a.copyWithin(l,0,s),l+=s;return this.print(a,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(te.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(te.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(te.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(te.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(te.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Hu),this._charsetService.setgCharset(1,Hu),this._charsetService.setgCharset(2,Hu),this._charsetService.setgCharset(3,Hu);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let r;(h=>(h[h.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",h[h.SET=1]="SET",h[h.RESET=2]="RESET",h[h.PERMANENTLY_SET=3]="PERMANENTLY_SET",h[h.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(r||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:o,activeEncoding:i}=this._coreMouseService,a=this._coreService,{buffers:s,cols:l}=this._bufferService,{active:c,alt:d}=s,u=this._optionsService.rawOptions,f=(h,y)=>(a.triggerDataEvent(`${te.ESC}[${t?"":"?"}${h};${y}$y`),!0),m=h=>h?1:2,p=e.params[0];return t?p===2?f(p,4):p===4?f(p,m(a.modes.insertMode)):p===12?f(p,3):p===20?f(p,m(u.convertEol)):f(p,0):p===1?f(p,m(n.applicationCursorKeys)):p===3?f(p,u.windowOptions.setWinLines?l===80?2:l===132?1:0:0):p===6?f(p,m(n.origin)):p===7?f(p,m(n.wraparound)):p===8?f(p,3):p===9?f(p,m(o==="X10")):p===12?f(p,m(u.cursorBlink)):p===25?f(p,m(!a.isCursorHidden)):p===45?f(p,m(n.reverseWraparound)):p===66?f(p,m(n.applicationKeypad)):p===67?f(p,4):p===1e3?f(p,m(o==="VT200")):p===1002?f(p,m(o==="DRAG")):p===1003?f(p,m(o==="ANY")):p===1004?f(p,m(n.sendFocus)):p===1005?f(p,4):p===1006?f(p,m(i==="SGR")):p===1015?f(p,4):p===1016?f(p,m(i==="SGR_PIXELS")):p===1048?f(p,1):p===47||p===1047||p===1049?f(p,m(c===d)):p===2004?f(p,m(n.bracketedPasteMode)):p===2026?f(p,m(n.synchronizedOutput)):f(p,0)}_updateAttrColor(e,t,r,n,o){return t===2?(e|=50331648,e&=-16777216,e|=Db.fromColorRGB([r,n,o])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],o=0,i=0;do{if(n[i+o]=e.params[t+i],e.hasSubParams(t+i)){let a=e.getSubParams(t+i),s=0;do n[1]===5&&(o=1),n[i+s+1+o]=a[s];while(++s<a.length&&s+i+1+o<n.length);break}if(n[1]===5&&i+o>=2||n[1]===2&&i+o>=5)break;n[1]&&(o=1)}while(++i+t<e.length&&i+o<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return i}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Rr.fg,e.bg=Rr.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let o=0;o<t;o++)r=e.params[o],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(o)?e.getSubParams(o)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=Rr.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=Rr.bg&16777215):r===38||r===48||r===58?o+=this._extractColor(e,o,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=Rr.fg&16777215,n.bg&=-67108864,n.bg|=Rr.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${te.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[?${t};${r}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Rr.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!dJ(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${te.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>cJ&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>cJ&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),o=r.shift();if(/^\d+$/.exec(n)){let i=parseInt(n);if(mJ(i))if(o==="?")t.push({type:0,index:i});else{let a=lJ(o);a&&t.push({type:1,index:i,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,o=r.findIndex(i=>i.startsWith("id="));return o!==-1&&(n=r[o].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let o=lJ(r[n]);o&&this._onColor.fire([{type:1,index:this._specialColors[t],color:o}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let o=parseInt(r[n]);mJ(o)&&t.push({type:2,index:o})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Hu),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(awe[e[0]],jr[e[1]]||Hu),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Rr.clone(),this._eraseAttrDataInternal=Rr.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Ei;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=a=>(this._coreService.triggerDataEvent(`${te.ESC}${a}${te.ESC}\\`),!0),n=this._bufferService.buffer,o=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[o.cursorStyle]-(o.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},oN=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(fJ=e,e=t,t=fJ),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};oN=vr([be(0,an)],oN);function mJ(e){return 0<=e&&e<256}var lwe=5e7,pJ=12,cwe=50,dwe=class extends qe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new le),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>lwe)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],o=this._action(n,t);if(o){let a=s=>performance.now()-r>=pJ?setTimeout(()=>this._innerWrite(0,s)):this._innerWrite(r,s);o.catch(s=>(queueMicrotask(()=>{throw s}),Promise.resolve(!1))).then(a);return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=pJ)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>cwe&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},nN=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let s=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._dataByLinkId.set(l.id,l),l.id}let r=e,n=this._getEntryIdKey(r),o=this._entriesWithId.get(n);if(o)return this.addLineToLink(o.id,t.ybase+t.y),o.id;let i=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(a,i)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};nN=vr([be(0,an)],nN);var hJ=!1,uwe=class extends qe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new uh),this._onBinary=this._register(new le),this.onBinary=this._onBinary.event,this._onData=this._register(new le),this.onData=this._onData.event,this._onLineFeed=this._register(new le),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new le),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new le),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new le),this._instantiationService=new O0e,this.optionsService=this._register(new W0e(e)),this._instantiationService.setService(sn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(J3)),this._instantiationService.setService(an,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Y3)),this._instantiationService.setService(DJ,this._logService),this.coreService=this._register(this._instantiationService.createInstance(eN)),this._instantiationService.setService(Ku,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(tN)),this._instantiationService.setService(PJ,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Wu)),this._instantiationService.setService(a_e,this.unicodeService),this._charsetService=this._instantiationService.createInstance(X0e),this._instantiationService.setService(i_e,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(nN),this._instantiationService.setService(RJ,this._oscLinkService),this._inputHandler=this._register(new swe(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(ro.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(ro.forward(this._bufferService.onResize,this._onResize)),this._register(ro.forward(this.coreService.onData,this._onData)),this._register(ro.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new dwe((t,r)=>this._inputHandler.parse(t,r))),this._register(ro.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new le),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!hJ&&(this._logService.warn("writeSync is unreliable and will be removed soon."),hJ=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,fee),t=Math.max(t,mee),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(aJ.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(aJ(this._bufferService),!1))),this._windowsWrappingHeuristics.value=qt(()=>{for(let t of e)t.dispose()})}}},fwe={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function mwe(e,t,r,n){let o={type:0,cancel:!1,key:void 0},i=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?o.key=te.ESC+"OA":o.key=te.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?o.key=te.ESC+"OD":o.key=te.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?o.key=te.ESC+"OC":o.key=te.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?o.key=te.ESC+"OB":o.key=te.ESC+"[B");break;case 8:o.key=e.ctrlKey?"\b":te.DEL,e.altKey&&(o.key=te.ESC+o.key);break;case 9:if(e.shiftKey){o.key=te.ESC+"[Z";break}o.key=te.HT,o.cancel=!0;break;case 13:o.key=e.altKey?te.ESC+te.CR:te.CR,o.cancel=!0;break;case 27:o.key=te.ESC,e.altKey&&(o.key=te.ESC+te.ESC),o.cancel=!0;break;case 37:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"D":t?o.key=te.ESC+"OD":o.key=te.ESC+"[D";break;case 39:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"C":t?o.key=te.ESC+"OC":o.key=te.ESC+"[C";break;case 38:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"A":t?o.key=te.ESC+"OA":o.key=te.ESC+"[A";break;case 40:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"B":t?o.key=te.ESC+"OB":o.key=te.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(o.key=te.ESC+"[2~");break;case 46:i?o.key=te.ESC+"[3;"+(i+1)+"~":o.key=te.ESC+"[3~";break;case 36:i?o.key=te.ESC+"[1;"+(i+1)+"H":t?o.key=te.ESC+"OH":o.key=te.ESC+"[H";break;case 35:i?o.key=te.ESC+"[1;"+(i+1)+"F":t?o.key=te.ESC+"OF":o.key=te.ESC+"[F";break;case 33:e.shiftKey?o.type=2:e.ctrlKey?o.key=te.ESC+"[5;"+(i+1)+"~":o.key=te.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:e.ctrlKey?o.key=te.ESC+"[6;"+(i+1)+"~":o.key=te.ESC+"[6~";break;case 112:i?o.key=te.ESC+"[1;"+(i+1)+"P":o.key=te.ESC+"OP";break;case 113:i?o.key=te.ESC+"[1;"+(i+1)+"Q":o.key=te.ESC+"OQ";break;case 114:i?o.key=te.ESC+"[1;"+(i+1)+"R":o.key=te.ESC+"OR";break;case 115:i?o.key=te.ESC+"[1;"+(i+1)+"S":o.key=te.ESC+"OS";break;case 116:i?o.key=te.ESC+"[15;"+(i+1)+"~":o.key=te.ESC+"[15~";break;case 117:i?o.key=te.ESC+"[17;"+(i+1)+"~":o.key=te.ESC+"[17~";break;case 118:i?o.key=te.ESC+"[18;"+(i+1)+"~":o.key=te.ESC+"[18~";break;case 119:i?o.key=te.ESC+"[19;"+(i+1)+"~":o.key=te.ESC+"[19~";break;case 120:i?o.key=te.ESC+"[20;"+(i+1)+"~":o.key=te.ESC+"[20~";break;case 121:i?o.key=te.ESC+"[21;"+(i+1)+"~":o.key=te.ESC+"[21~";break;case 122:i?o.key=te.ESC+"[23;"+(i+1)+"~":o.key=te.ESC+"[23~";break;case 123:i?o.key=te.ESC+"[24;"+(i+1)+"~":o.key=te.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?o.key=te.NUL:e.keyCode>=51&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?o.key=te.DEL:e.keyCode===219?o.key=te.ESC:e.keyCode===220?o.key=te.FS:e.keyCode===221&&(o.key=te.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let a=fwe[e.keyCode]?.[e.shiftKey?1:0];if(a)o.key=te.ESC+a;else if(e.keyCode>=65&&e.keyCode<=90){let s=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(s);e.shiftKey&&(l=l.toUpperCase()),o.key=te.ESC+l}else if(e.keyCode===32)o.key=te.ESC+(e.ctrlKey?te.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let s=e.code.slice(3,4);e.shiftKey||(s=s.toLowerCase()),o.key=te.ESC+s,o.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?o.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(o.key=te.US),e.key==="@"&&(o.key=te.NUL));break}return o}var wr=0,pwe=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new iC,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new iC,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((o,i)=>this._getKey(o)-this._getKey(i)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let o=0;o<n.length;o++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[o]=e[t],t++):n[o]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(wr=this._search(t),wr===-1)||this._getKey(this._array[wr])!==t)return!1;do if(this._array[wr]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(wr),!0;while(++wr<this._array.length&&this._getKey(this._array[wr])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((o,i)=>o-i),t=0,r=new Array(this._array.length-e.length),n=0;for(let o=0;o<this._array.length;o++)e[t]===o?t++:r[n++]=this._array[o];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(wr=this._search(e),!(wr<0||wr>=this._array.length)&&this._getKey(this._array[wr])===e))do yield this._array[wr];while(++wr<this._array.length&&this._getKey(this._array[wr])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(wr=this._search(e),!(wr<0||wr>=this._array.length)&&this._getKey(this._array[wr])===e))do t(this._array[wr]);while(++wr<this._array.length&&this._getKey(this._array[wr])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,o=this._getKey(this._array[n]);if(o>e)r=n-1;else if(o<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},v3=0,gJ=0,hwe=class extends qe{constructor(){super(),this._decorations=new pwe(e=>e?.marker.line),this._onDecorationRegistered=this._register(new le),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new le),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(qt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new gwe(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,o=0;for(let i of this._decorations.getKeyIterator(t))n=i.options.x??0,o=n+(i.options.width??1),e>=n&&e<o&&(!r||(i.options.layer??"bottom")===r)&&(yield i)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,o=>{v3=o.options.x??0,gJ=v3+(o.options.width??1),e>=v3&&e<gJ&&(!r||(o.options.layer??"bottom")===r)&&n(o)})}},gwe=class extends Kc{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new le),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new le),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=or.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=or.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},vwe=1e3,xwe=class{constructor(e,t=vwe){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let o=n-this._lastRefreshMs,i=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},i)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},vJ=20,xJ=!1,aC=class extends qe{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let o=this._coreBrowserService.mainDocument;this._accessibilityContainer=o.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=o.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);if(this._topBoundaryFocusListener=i=>this._handleBoundaryFocus(i,0),this._bottomBoundaryFocusListener=i=>this._handleBoundaryFocus(i,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=o.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new xwe(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");xJ?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=o.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(o.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(o.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(i=>this._handleResize(i.rows))),this._register(this._terminal.onRender(i=>this._refreshRows(i.start,i.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(i=>this._handleChar(i))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
214
|
+
`))),this._register(this._terminal.onA11yTab(i=>this._handleTab(i))),this._register(this._terminal.onKey(i=>this._handleKey(i.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Le(o,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(qt(()=>{xJ?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<vJ+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
215
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===vJ+1&&(this._liveRegion.textContent+=b3.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let o=e;o<=t;o++){let i=r.lines.get(r.ydisp+o),a=[],s=i?.translateToString(!0,void 0,void 0,a)||"",l=(r.ydisp+o+1).toString(),c=this._rowElements[o];c&&(s.length===0?(c.textContent="\xA0",this._rowColumns.set(c,[0,1])):(c.textContent=s,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",n),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],o=r.getAttribute("aria-posinset"),i=t===0?"1":`${this._terminal.buffer.lines.length}`;if(o===i||e.relatedTarget!==n)return;let a,s;if(t===0?(a=r,s=this._rowElements.pop(),this._rowContainer.removeChild(s)):(a=this._rowElements.shift(),s=r,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),s.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:n.textContent?.length??0}),!this._rowContainer.contains(r.node))return;let o=({node:s,offset:l})=>{let c=s instanceof Text?s.parentNode:s,d=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let f=l<u.length?u[l]:u.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},i=o(t),a=o(r);if(!(!i||!a)){if(i.row>a.row||i.row===a.row&&i.column>=a.column)throw new Error("invalid range");this._terminal.select(i.column,i.row,(a.row-i.row)*this._terminal.cols-i.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,r=this._rowColumns.get(e)?.slice(-1)?.[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};aC=vr([be(1,aN),be(2,ul),be(3,fl)],aC);var iN=class extends qe{constructor(e,t,r,n,o){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=o,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new le),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new le),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(qt(()=>{Gu(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Le(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Le(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Le(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Le(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let o=r[n];if(o.classList.contains("xterm"))break;if(o.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(n=>{n?.forEach(o=>{o.link.dispose&&o.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[n,o]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(n)&&(r=this._checkLinkProviderResult(n,e,r)):o.provideLinks(e.y,i=>{if(this._isMouseOut)return;let a=i?.map(s=>({link:s}));this._activeProviderReplies?.set(n,a),r=this._checkLinkProviderResult(n,e,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let o=t.get(n);if(o)for(let i=0;i<o.length;i++){let a=o[i],s=a.link.range.start.y<e?0:a.link.range.start.x,l=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=s;c<=l;c++){if(r.has(c)){o.splice(i--,1);break}r.add(c)}}}}_checkLinkProviderResult(e,t,r){if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),o=!1;for(let i=0;i<e;i++)(!this._activeProviderReplies.has(i)||this._activeProviderReplies.get(i))&&(o=!0);if(!o&&n){let i=n.find(a=>this._linkAtPosition(a.link,t));i&&(r=!0,this._handleNewLink(i))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let i=0;i<this._activeProviderReplies.size;i++){let a=this._activeProviderReplies.get(i)?.find(s=>this._linkAtPosition(s.link,t));if(a){r=!0,this._handleNewLink(a);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&bwe(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Gu(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(n,o),this._lastMouseEvent)){let i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._askForLink(i,!1)}})))}_linkHover(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,o=t.y*this._bufferService.cols+t.x;return r<=o&&o<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,o){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:o}}};iN=vr([be(1,sN),be(2,fl),be(3,an),be(4,TJ)],iN);function bwe(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var ywe=class extends uwe{constructor(e={}){super(e),this._linkifier=this._register(new uh),this.browser=tee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new uh),this._onCursorMove=this._register(new le),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new le),this.onKey=this._onKey.event,this._onRender=this._register(new le),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new le),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new le),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new le),this.onBell=this._onBell.event,this._onFocus=this._register(new le),this._onBlur=this._register(new le),this._onA11yCharEmitter=this._register(new le),this._onA11yTabEmitter=this._register(new le),this._onWillOpen=this._register(new le),this._setup(),this._decorationService=this._instantiationService.createInstance(hwe),this._instantiationService.setService(Rb,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(l0e),this._instantiationService.setService(TJ,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(_3)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(ro.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(ro.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(ro.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(ro.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(qt(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let o=Lt.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${te.ESC}]${n};${iwe(o)}${V3.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(i=>i.ansi[t.index]=Sr.toColor(...t.color));else{let i=r;this._themeService.modifyColors(a=>a[i]=Sr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(aC,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,o=t.getWidth(r),i=this._renderService.dimensions.css.cell.width*o,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=i+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Le(this.element,"copy",t=>{this.hasSelection()&&Jye(t,this._selectionService)}));let e=t=>e_e(t,this.textarea,this.coreService,this.optionsService);this._register(Le(this.textarea,"paste",e)),this._register(Le(this.element,"paste",e)),ree?this._register(Le(this.element,"mousedown",t=>{t.button===2&&gY(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Le(this.element,"contextmenu",t=>{gY(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),hN&&this._register(Le(this.element,"auxclick",t=>{t.button===1&&IJ(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Le(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Le(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Le(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Le(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Le(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Le(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Le(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Le(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",x3.get()),iee||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(a0e,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(ul,this._coreBrowserService),this._register(Le(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Le(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(G3,this._document,this._helperContainer),this._instantiationService.setService(lC,this._charSizeService),this._themeService=this._instantiationService.createInstance(Q3),this._instantiationService.setService(fh,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(oC),this._instantiationService.setService(EJ,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(K3,this.rows,this.screenElement)),this._instantiationService.setService(fl,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(H3,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(q3),this._instantiationService.setService(sN,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(iN,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(j3,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(X3,this.element,this.screenElement,n)),this._instantiationService.setService(l_e,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(ro.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(U3,this.screenElement)),this._register(Le(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(aC,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(rC,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(rC,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Z3,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(i){let a=e._mouseService.getMouseReportCoords(i,e.screenElement);if(!a)return!1;let s,l;switch(i.overrideType||i.type){case"mousemove":l=32,i.buttons===void 0?(s=3,i.button!==void 0&&(s=i.button<3?i.button:3)):s=i.buttons&1?0:i.buttons&4?1:i.buttons&2?2:3;break;case"mouseup":l=0,s=i.button<3?i.button:3;break;case"mousedown":l=1,s=i.button<3?i.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(i)===!1)return!1;let c=i.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,s=4;break;default:return!1}return l===void 0||s===void 0||s>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:s,action:l,ctrl:i.ctrlKey,alt:i.altKey,shift:i.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:i=>(r(i),i.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(i)),wheel:i=>(r(i),this.cancel(i,!0)),mousedrag:i=>{i.buttons&&r(i)},mousemove:i=>{i.buttons||r(i)}};this._register(this.coreMouseService.onProtocolChange(i=>{i?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(i)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),i&8?n.mousemove||(t.addEventListener("mousemove",o.mousemove),n.mousemove=o.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),i&16?n.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),n.wheel=o.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),i&2?n.mouseup||(n.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),i&4?n.mousedrag||(n.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Le(t,"mousedown",i=>{if(i.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(i)))return r(i),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(i)})),this._register(Le(t,"wheel",i=>{if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(i)===!1)return!1;if(!this.buffer.hasScrollback){if(i.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(i,!0);let a=te.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(i.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(a,!0),this.cancel(i,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){_J(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=mwe(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===te.ETX||r.key===te.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(_we(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Rr));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(te.ESC+"[I"):this.coreService.triggerDataEvent(te.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),o=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[6;${o};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function _we(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var Iwe=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},wwe=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Ei)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},bJ=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new wwe(t)}getNullCell(){return new Ei}},Swe=class extends qe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new le),this.onBufferChange=this._onBufferChange.event,this._normal=new bJ(this._core.buffers.normal,"normal"),this._alternate=new bJ(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},kwe=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Cwe=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Pwe=["cols","rows"],ls=0,hee=class extends qe{constructor(e){super(),this._core=this._register(new ywe(e)),this._addonManager=this._register(new Iwe),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,o)=>{this._checkReadonlyOptions(n),this._core.options[n]=o};for(let n in this._core.options){let o={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,o)}}_checkReadonlyOptions(e){if(Pwe.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new kwe(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new Cwe(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new Swe(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
216
|
+
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return x3.get()},set promptLabel(e){x3.set(e)},get tooMuchOutput(){return b3.get()},set tooMuchOutput(e){b3.set(e)}}}_verifyIntegers(...e){for(ls of e)if(ls===1/0||isNaN(ls)||ls%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(ls of e)if(ls&&(ls===1/0||isNaN(ls)||ls%1!==0||ls<0))throw new Error("This API only accepts positive integers")}};var ln=b(R(),1);function gee(e){try{let t=JSON.parse(e);switch(t.t){case"ready":case"restarting":return{t:t.t};case"exit":return typeof t.code=="number"?{t:"exit",code:t.code}:null;case"error":return typeof t.message=="string"?{t:"error",message:t.message.slice(0,500)}:null;default:return null}}catch{return null}}var vee=[500,1e3,2e3,4e3,8e3],mC=class{constructor(t,r){Et(this,"sessionId",t);Et(this,"events",r);Et(this,"socket",null);Et(this,"timer");Et(this,"attempt",0);Et(this,"closed",!1);Et(this,"finished",!1);Et(this,"suspended",!1);Et(this,"size",{cols:120,rows:30})}open(t,r){this.size={cols:t,rows:r},this.connect()}connect(){this.events.state(this.attempt===0?"connecting":"reconnecting");let r=(location.protocol==="https:"?"wss:":"ws:")+"//"+location.host+"/api/sessions/"+this.sessionId+"/terminal?cols="+this.size.cols+"&rows="+this.size.rows,n=new WebSocket(r);n.binaryType="arraybuffer",this.socket=n,n.onmessage=o=>{if(o.data instanceof ArrayBuffer){this.events.output(new Uint8Array(o.data));return}let i=typeof o.data=="string"?gee(o.data):null;i&&(i.t==="ready"?(this.attempt=0,this.events.reset(),this.events.state("connected")):i.t==="exit"?(this.finished=!0,this.events.state("ended","The agent exited (code "+i.code+").")):i.t==="error"&&(this.finished=!0,this.events.state("failed",i.message)))},n.onclose=()=>{if(this.socket!==n||(this.socket=null,this.closed||this.finished||this.suspended))return;let o=vee[Math.min(this.attempt,vee.length-1)];this.attempt++,this.events.state("reconnecting"),this.timer=window.setTimeout(()=>this.connect(),o)}}send(t){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(t)}resize(t,r){this.size={cols:t,rows:r},this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({t:"resize",cols:t,rows:r}))}suspend(){if(this.closed||this.finished)return;this.suspended=!0,window.clearTimeout(this.timer);let t=this.socket;this.socket=null,t?.close(1e3)}resume(){!this.suspended||this.closed||this.finished||(this.suspended=!1,this.attempt=0,this.connect())}close(){this.closed=!0,window.clearTimeout(this.timer),this.socket?.close(1e3),this.socket=null}};var Iee=b(O(),1),xee={background:"#0e1015",foreground:"#e6e8ee",cursor:"#e6e8ee",selectionBackground:"#3b4252",black:"#1a1d24",brightBlack:"#6c7383"},bee={background:"#ffffff",foreground:"#1f2328",cursor:"#1f2328",selectionBackground:"#c7d2fe",black:"#1f2328",brightBlack:"#6e7781"},pC=[11,12,13,14,15,16,18,20],Dwe=2*6e4;function yee(e,t){/^https?:\/\//i.test(t)&&window.confirm(`Open this link in a new tab?
|
|
217
|
+
|
|
218
|
+
`+t.slice(0,300))&&window.open(t,"_blank","noopener,noreferrer")}var _ee=(0,ln.forwardRef)(function({sessionId:t,fontSize:r,onState:n,onReady:o},i){let a=(0,ln.useRef)(null),s=(0,ln.useRef)(null),l=(0,ln.useRef)(null),c=(0,ln.useRef)(null),d=(0,ln.useRef)(()=>{}),u=fd("dark")==="dark",f=(0,ln.useRef)(u),m=(0,ln.useRef)(r);return(0,ln.useImperativeHandle)(i,()=>({find:(p,h=!1)=>h?l.current?.findPrevious(p)??!1:l.current?.findNext(p)??!1,clearFind:()=>l.current?.clearDecorations(),type:p=>d.current(p),setFontSize:p=>{s.current&&(s.current.options.fontSize=p,c.current?.fit())},focus:()=>s.current?.focus()}),[]),(0,ln.useEffect)(()=>{let p=a.current;if(!p)return;let h=new yQ,y=new ZQ,x=new hee({fontFamily:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, Menlo, monospace',fontSize:m.current,lineHeight:1.15,cursorBlink:!0,scrollback:1e4,allowProposedApi:!0,theme:f.current?xee:bee,linkHandler:{activate:yee}});x.loadAddon(h),x.loadAddon(y),x.loadAddon(new mY(yee)),x.loadAddon(new fY),x.unicode.activeVersion="11",x.open(p),x.attachCustomKeyEventHandler(E=>E.type!=="keydown"||!E.ctrlKey||E.shiftKey||E.altKey||E.key.toLowerCase()!=="c"||!x.hasSelection()?!0:(navigator.clipboard?.writeText(x.getSelection()).catch(()=>{}),x.clearSelection(),!1)),s.current=x,l.current=y,c.current=h,h.fit();let v=new mC(t,{state:n,output:E=>x.write(E),reset:()=>x.reset()}),_=new TextEncoder;d.current=E=>v.send(_.encode(E)),x.onData(E=>v.send(_.encode(E))),x.onBinary(E=>v.send(Uint8Array.from(E,B=>B.charCodeAt(0)))),x.onResize(({cols:E,rows:B})=>v.resize(E,B));let I=new ResizeObserver(()=>h.fit());I.observe(p);let S,w=()=>{window.clearTimeout(S),document.hidden?S=window.setTimeout(()=>v.suspend(),Dwe):v.resume()},P=()=>v.close();return document.addEventListener("visibilitychange",w),window.addEventListener("pagehide",P),o(()=>v.close()),v.open(x.cols,x.rows),x.focus(),()=>{window.clearTimeout(S),document.removeEventListener("visibilitychange",w),window.removeEventListener("pagehide",P),I.disconnect(),v.close(),x.dispose(),s.current=null,l.current=null,c.current=null,d.current=()=>{}}},[t,n,o]),(0,ln.useEffect)(()=>{s.current&&(s.current.options.theme=u?xee:bee)},[u]),(0,Iee.jsx)("div",{ref:a,className:"terminal-host"})});var Ke=b(O(),1),Rwe=Bu("sessions.list"),Ewe={connecting:{text:"Connecting",color:"gray"},connected:{text:"Connected",color:"green"},reconnecting:{text:"Reconnecting",color:"orange"},ended:{text:"Ended",color:"gray"},failed:{text:"Cannot connect",color:"red"}},Twe=[{label:"Esc",bytes:"\x1B"},{label:"Tab",bytes:" "},{label:"Ctrl+C",bytes:""},{label:"\u2191",bytes:"\x1B[A"},{label:"\u2193",bytes:"\x1B[B"},{label:"\u2190",bytes:"\x1B[D"},{label:"\u2192",bytes:"\x1B[C"},{label:"Enter",bytes:"\r"},{label:"Shift+Tab",bytes:"\x1B[Z"}];function $we({terminal:e,close:t}){let[r,n]=(0,Ti.useState)(""),[o,i]=(0,Ti.useState)(!1),a=l=>i(r!==""&&!e?.find(r,l)),s=()=>{e?.clearFind(),t(),e?.focus()};return(0,Ke.jsx)(Qi,{className:"terminal-search",shadow:"md",p:6,withBorder:!0,children:(0,Ke.jsxs)(De,{gap:4,wrap:"nowrap",children:[(0,Ke.jsx)(er,{size:"xs",w:220,autoFocus:!0,placeholder:"Find in the terminal",value:r,error:o,onChange:l=>n(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"&&a(l.shiftKey),l.key==="Escape"&&s()},"aria-label":"Find in the terminal"}),(0,Ke.jsx)(bt,{"aria-label":"Previous",onClick:()=>a(!0),children:(0,Ke.jsx)(tE,{size:16})}),(0,Ke.jsx)(bt,{"aria-label":"Next",onClick:()=>a(!1),children:(0,Ke.jsx)(Bv,{size:16})}),(0,Ke.jsx)(bt,{"aria-label":"Close search",onClick:s,children:(0,Ke.jsx)(qv,{size:16})})]})})}function wee({id:e}){let[t,r]=(0,Ti.useState)("connecting"),[n,o]=(0,Ti.useState)(),[i,a]=(0,Ti.useState)(!1),[s,l]=f2({key:"terminal-font-size",defaultValue:14}),c=(0,Ti.useRef)(null),d=(0,Ti.useRef)(()=>{}),{toggle:u,fullscreen:f}=p2(),m=ad("(pointer: coarse)"),h=ol(Rwe,{}).data?.sessions.find(S=>S.id===e),y=(0,Ti.useCallback)((S,w)=>{r(S),o(w)},[]),x=(0,Ti.useCallback)(S=>{d.current=S},[]),v=S=>{let w=pC.indexOf(s),P=pC[Math.max(0,Math.min(pC.length-1,(w<0?3:w)+S))];l(P),c.current?.setFontSize(P)};zh([["mod+shift+F",()=>a(!0)]],[],!0);let _=Ewe[t],I=()=>{d.current(),vo(nn("sessions"))};return(0,Ke.jsxs)("div",{className:"terminal-page",style:{position:"relative"},children:[(0,Ke.jsxs)(De,{gap:"sm",px:"sm",py:6,wrap:"nowrap",className:"terminal-toolbar",children:[(0,Ke.jsx)(kt,{label:"Back to sessions (the session keeps running)",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Back",onClick:I,children:(0,Ke.jsx)(QR,{size:18})})}),h&&(0,Ke.jsx)(ju,{name:h.harness,size:28}),(0,Ke.jsxs)(F,{style:{minWidth:0},children:[(0,Ke.jsx)(ye,{fw:650,size:"sm",truncate:!0,lh:1.2,children:h?h.harness+" \xB7 "+(h.projectName??h.cwd):"Session "+e}),(0,Ke.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,lh:1.2,ff:"monospace",children:n??e})]}),(0,Ke.jsx)(In,{color:_.color,variant:"dot",style:{flex:"none"},children:_.text}),(0,Ke.jsxs)(De,{gap:2,ml:"auto",wrap:"nowrap",children:[(0,Ke.jsx)(kt,{label:"Find (Ctrl+Shift+F)",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Find",onClick:()=>a(S=>!S),children:(0,Ke.jsx)(kn,{size:18})})}),(0,Ke.jsx)(kt,{label:"Smaller text",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Smaller text",onClick:()=>v(-1),visibleFrom:"xs",children:(0,Ke.jsx)(IE,{size:18})})}),(0,Ke.jsx)(kt,{label:"Bigger text",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Bigger text",onClick:()=>v(1),visibleFrom:"xs",children:(0,Ke.jsx)(wE,{size:18})})}),(0,Ke.jsx)(kt,{label:f?"Leave full screen":"Full screen",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Full screen",onClick:()=>{u()},children:f?(0,Ke.jsx)(pE,{size:18}):(0,Ke.jsx)(mE,{size:18})})}),(0,Ke.jsx)(kt,{label:"Close this view; the session keeps running",children:(0,Ke.jsx)(ht,{size:"xs",variant:"default",ml:6,onClick:I,children:"Detach"})})]})]}),i&&(0,Ke.jsx)($we,{terminal:c.current,close:()=>a(!1)}),(0,Ke.jsx)(_ee,{ref:c,sessionId:e,fontSize:s,onState:y,onReady:x}),m&&(0,Ke.jsx)("div",{className:"key-bar",role:"toolbar","aria-label":"Keys",children:Twe.map(S=>(0,Ke.jsx)(ht,{size:"compact-sm",variant:"default",onClick:()=>{c.current?.type(S.bytes),c.current?.focus()},children:S.label},S.label))})]})}var ms=b(R(),1);var Zee=b(R(),1);var cn=b(R(),1);var hC=b(R(),1);function Awe(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}var Owe=typeof window<"u"?hC.useLayoutEffect:hC.useEffect;function xo(e,t){Owe(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function See(e,t){e&&Awe(e),xo(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),xo(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),xo(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),xo(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),xo(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),xo(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),xo(`mantine-form:${e}:clear-errors`,t.clearErrors),xo(`mantine-form:${e}:reset`,t.reset),xo(`mantine-form:${e}:validate`,t.validate),xo(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),xo(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),xo(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),xo(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),xo(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),xo(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),xo(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),xo(`mantine-form:${e}:reset-touched`,t.resetTouched)}function kee(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){let{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var ml=b(R(),1);function $b(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{let n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function Cee(e){let[t,r]=(0,ml.useState)($b(e)),n=(0,ml.useRef)(t),o=(0,ml.useCallback)(l=>{r(c=>{let d=$b(typeof l=="function"?l(c):l);return n.current=d,d})},[]),i=(0,ml.useCallback)(()=>o({}),[]),a=(0,ml.useCallback)(l=>{n.current[l]!==void 0&&o(c=>{let d={...c};return delete d[l],d})},[t]),s=(0,ml.useCallback)((l,c)=>{c==null||c===!1?a(l):n.current[l]!==c&&o(d=>({...d,[l]:c}))},[t]);return{errorsState:t,setErrors:o,clearErrors:i,setFieldError:s,clearFieldError:a}}var Ob=b(R(),1);function Ab(e,t){if(t===null||typeof t!="object")return{};let r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function Pee(e,t){let r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function gN(e,t,r,n){if(t===void 0)return r;let o=`${String(e)}`,i=r;n===-1&&(i=Ab(`${o}.${t}`,i));let a={...i},s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;let c=Pee(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{let d=Pee(l,o),u=l.replace(`${o}.${d}`,`${o}.${d+n}`);a[u]=c,s.add(u),s.has(l)||delete a[l]}),a}function Dee(e,{from:t,to:r},n){let o=`${e}.${t}`,i=`${e}.${r}`,a={...n},s=new Set;return Object.keys(n).forEach(l=>{if(s.has(l))return;let c,d;if(l.startsWith(o)?(c=l,d=l.replace(o,i)):l.startsWith(i)&&(c=l.replace(i,o),d=l),c&&d){let u=a[c],f=a[d];f===void 0?delete a[c]:a[c]=f,u===void 0?delete a[d]:a[d]=u,s.add(c),s.add(d)}}),a}function Ree(e,t,r){typeof r.value=="object"&&(r.value=Xu(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Xu(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Xu(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(Xu(s),Xu(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Xu(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)Ree(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||Ree(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function gC(e){return typeof e!="string"?[]:e.split(".")}function Mt(e,t){let r=gC(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function us(e,t,r){let n=gC(e);if(n.length===0)return r;let o=Xu(r);if(n.length===1)return o[n[0]]=t,o;let i=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return o;i=i[n[a]]}return i[n[n.length-1]]=t,o}function Eee(e,{from:t,to:r},n){let o=Mt(e,n);if(!Array.isArray(o))return n;let i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),us(e,i,n)}function Tee(e,t,r,n){let o=Mt(e,n);if(!Array.isArray(o))return n;let i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),us(e,i,n)}function $ee(e,t,r){let n=Mt(e,r);return Array.isArray(n)?us(e,n.filter((o,i)=>i!==t),r):r}function Aee(e,t,r,n){let o=Mt(e,n);if(!Array.isArray(o)||o.length<=r)return n;let i=[...o];return i[r]=t,us(e,i,n)}function Oee({$values:e,$errors:t,$status:r}){let n=(0,Ob.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>Dee(s,l,c)),e.setValues({values:Eee(s,l,e.refValues.current),updateState:!0})},[]),o=(0,Ob.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>gN(s,l,c,-1)),e.setValues({values:$ee(s,l,e.refValues.current),updateState:!0})},[]),i=(0,Ob.useCallback)((s,l,c)=>{r.clearFieldDirty(s),t.setErrors(d=>gN(s,c,d,1)),e.setValues({values:Tee(s,l,c,e.refValues.current),updateState:!0})},[]),a=(0,Ob.useCallback)((s,l,c)=>{r.clearFieldDirty(s),e.setValues({values:Aee(s,c,l,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:i,replaceListItem:a}}var Ur=b(R(),1),zb=b(Nee(),1);function ph(e,t){let r=Object.keys(e);if(typeof t=="string"){let n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function Fee({initialDirty:e,initialTouched:t,mode:r,$values:n}){let[o,i]=(0,Ur.useState)(t),[a,s]=(0,Ur.useState)(e),l=(0,Ur.useRef)(t),c=(0,Ur.useRef)(e),d=(0,Ur.useCallback)(w=>{let P=typeof w=="function"?w(l.current):w;l.current=P,r==="controlled"&&i(P)},[]),u=(0,Ur.useCallback)((w,P=!1)=>{let E=typeof w=="function"?w(c.current):w;c.current=E,(r==="controlled"||P)&&s(E)},[]),f=(0,Ur.useCallback)(()=>d({}),[]),m=(0,Ur.useCallback)(w=>{let P=w?{...n.refValues.current,...w}:n.refValues.current;n.setValuesSnapshot(P),u({})},[]),p=(0,Ur.useCallback)((w,P)=>{d(E=>ph(E,w)===P?E:{...E,[w]:P})},[]),h=(0,Ur.useCallback)((w,P,E)=>{u(B=>ph(B,w)===P?B:{...B,[w]:P},E)},[]),y=(0,Ur.useCallback)((w,P)=>{let E=ph(c.current,w),B=!(0,zb.default)(Mt(w,n.getValuesSnapshot()),P),H=Ab(w,c.current);H[w]=B,u(H,E!==B)},[]),x=(0,Ur.useCallback)(w=>ph(l.current,w),[]),v=(0,Ur.useCallback)(w=>u(P=>{if(typeof w!="string")return P;let E=Ab(w,P);return delete E[w],(0,zb.default)(E,P)?P:E}),[]),_=(0,Ur.useCallback)(w=>{if(w){let E=Mt(w,c.current);if(typeof E=="boolean")return E;let B=Mt(w,n.refValues.current),H=Mt(w,n.valuesSnapshot.current);return!(0,zb.default)(B,H)}return Object.keys(c.current).length>0?ph(c.current):!(0,zb.default)(n.refValues.current,n.valuesSnapshot.current)},[]),I=(0,Ur.useCallback)(()=>c.current,[]),S=(0,Ur.useCallback)(()=>l.current,[]);return{touchedState:o,dirtyState:a,touchedRef:l,dirtyRef:c,setTouched:d,setDirty:u,resetDirty:m,resetTouched:f,isTouched:x,setFieldTouched:p,setFieldDirty:h,setTouchedState:i,setDirtyState:s,clearFieldDirty:v,isDirty:_,getDirty:I,getTouched:S,setCalculatedFieldDirty:y}}var An=b(R(),1);function Lee({initialValues:e,onValuesChange:t,mode:r}){let n=(0,An.useRef)(!1),[o,i]=(0,An.useState)(e||{}),a=(0,An.useRef)(o),s=(0,An.useRef)(o),l=(0,An.useCallback)(({values:h,subscribers:y,updateState:x=!0,mergeWithPreviousValues:v=!0})=>{let _=a.current,I=h instanceof Function?h(a.current):h,S=v?{..._,...I}:I;a.current=S,x&&i(S),t?.(S,_),y?.filter(Boolean).forEach(w=>w({updatedValues:S,previousValues:_}))},[t]),c=(0,An.useCallback)(h=>{let y=Mt(h.path,a.current),x=h.value instanceof Function?h.value(y):h.value;if(y!==x){let v=a.current,_=us(h.path,x,a.current);l({values:_,updateState:h.updateState}),h.subscribers?.filter(Boolean).forEach(I=>I({path:h.path,updatedValues:_,previousValues:v}))}},[l]),d=(0,An.useCallback)(h=>{s.current=h},[]),u=(0,An.useCallback)((h,y)=>{n.current||(n.current=!0,l({values:h,updateState:r==="controlled"}),d(h),y())},[l]),f=(0,An.useCallback)(()=>{l({values:s.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=(0,An.useCallback)(()=>a.current,[]),p=(0,An.useCallback)(()=>s.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:s,setValues:l,setFieldValue:c,resetValues:f,setValuesSnapshot:d,initialize:u,getValues:m,getValuesSnapshot:p}}var Qu=b(R(),1);function Mee({$status:e}){let t=(0,Qu.useRef)({}),r=(0,Qu.useCallback)((o,i)=>{(0,Qu.useEffect)(()=>(t.current[o]=t.current[o]||[],t.current[o].push(i),()=>{t.current[o]=t.current[o].filter(a=>a!==i)}),[i])},[]),n=(0,Qu.useCallback)(o=>t.current[o]?t.current[o].map(i=>a=>i({previousValue:Mt(o,a.previousValues),value:Mt(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function vN(e,t){return e?`${e}-${t.toString()}`:t.toString()}var vC=Symbol("root-rule");function Bee(e){let t=$b(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function xN(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{let a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=Mt(s,t),c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((d,u)=>xN(a,t,`${s}.${u}`,o)),vC in a&&(o[s]=a[vC](l,t,s))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||xN(a,t,s,o),vC in a&&(o[s]=a[vC](l,t,s))),o},n)}function Nb(e,t){return Bee(typeof e=="function"?e(t):xN(e,t))}function Fb(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};let n=Nb(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}var jee="__MANTINE_FORM_INDEX__";function bN(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${jee}`)):!1:!1}function yN({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:s=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:d=h=>h,enhanceGetInputProps:u,validate:f,onSubmitPreventDefault:m="always",touchTrigger:p="change"}={}){let h=Cee(n),y=Lee({initialValues:r,onValuesChange:c,mode:t}),x=Fee({initialDirty:o,initialTouched:i,$values:y,mode:t}),v=Oee({$values:y,$errors:h,$status:x}),_=Mee({$status:x}),[I,S]=(0,cn.useState)(0),[w,P]=(0,cn.useState)({}),[E,B]=(0,cn.useState)(!1),H=(0,cn.useCallback)(()=>{y.resetValues(),h.clearErrors(),x.resetDirty(),x.resetTouched(),t==="uncontrolled"&&S(X=>X+1)},[]),Z=(0,cn.useCallback)(X=>{a&&h.clearErrors(),t==="uncontrolled"&&S(oe=>oe+1),Object.keys(_.subscribers.current).forEach(oe=>{let Ie=Mt(oe,y.refValues.current),se=Mt(oe,X);Ie!==se&&_.getFieldSubscribers(oe).forEach($e=>$e({previousValues:X,updatedValues:y.refValues.current}))})},[a]),q=(0,cn.useCallback)(X=>{let oe=y.refValues.current;y.initialize(X,()=>t==="uncontrolled"&&S(Ie=>Ie+1)),Z(oe)},[Z]),T=(0,cn.useCallback)((X,oe,Ie)=>{let se=bN(X,s),$e=oe instanceof Function?oe(Mt(X,y.refValues.current)):oe;x.setCalculatedFieldDirty(X,$e),p==="change"&&x.setFieldTouched(X,!0),!se&&a&&h.clearFieldError(X),y.setFieldValue({path:X,value:oe,updateState:t==="controlled",subscribers:[..._.getFieldSubscribers(X),se?Ue=>{let Je=Fb(X,f,Ue.updatedValues);Je.hasError?h.setFieldError(X,Je.error):h.clearFieldError(X)}:null,Ie?.forceUpdate!==!1&&t!=="controlled"?()=>P(Ue=>({...Ue,[X]:(Ue[X]||0)+1})):null]})},[c,f]),k=(0,cn.useCallback)(X=>{let oe=y.refValues.current;y.setValues({values:X,updateState:t==="controlled"}),Z(oe)},[c,Z]),$=(0,cn.useCallback)(()=>{let X=Nb(f,y.refValues.current);return h.setErrors(X.errors),X},[f]),C=(0,cn.useCallback)(X=>{let oe=Fb(X,f,y.refValues.current);return oe.hasError?h.setFieldError(X,oe.error):h.clearFieldError(X),oe},[f]),A=(X,{type:oe="input",withError:Ie=!0,withFocus:se=!0,...$e}={})=>{let Je={onChange:kee(at=>T(X,at,{forceUpdate:!1})),"data-path":vN(e,X)};return Ie&&(Je.error=h.errorsState[X]),oe==="checkbox"?Je[t==="controlled"?"checked":"defaultChecked"]=Mt(X,y.refValues.current):Je[t==="controlled"?"value":"defaultValue"]=Mt(X,y.refValues.current),se&&(Je.onFocus=()=>x.setFieldTouched(X,!0),Je.onBlur=()=>{if(bN(X,l)){let at=Fb(X,f,y.refValues.current);at.hasError?h.setFieldError(X,at.error):h.clearFieldError(X)}}),Object.assign(Je,u?.({inputProps:Je,field:X,options:{type:oe,withError:Ie,withFocus:se,...$e},form:me}))},D=(X,oe)=>Ie=>{m==="always"&&Ie?.preventDefault();let se=$();if(se.hasErrors)m==="validation-failed"&&Ie?.preventDefault(),oe?.(se.errors,y.refValues.current,Ie);else{let $e=X?.(d(y.refValues.current),Ie);$e instanceof Promise&&(B(!0),$e.finally(()=>B(!1)))}},N=X=>d(X||y.refValues.current),U=(0,cn.useCallback)(X=>{X.preventDefault(),H()},[]),G=(0,cn.useCallback)(X=>X?!Fb(X,f,y.refValues.current).hasError:!Nb(f,y.refValues.current).hasErrors,[f]),re=X=>`${I}-${X}-${w[X]||0}`,ge=(0,cn.useCallback)(X=>document.querySelector(`[data-path="${vN(e,X)}"]`),[]),me={watch:_.watch,initialized:y.initialized.current,values:y.stateValues,getValues:y.getValues,getInitialValues:y.getValuesSnapshot,setInitialValues:y.setValuesSnapshot,initialize:q,setValues:k,setFieldValue:T,submitting:E,setSubmitting:B,errors:h.errorsState,setErrors:h.setErrors,setFieldError:h.setFieldError,clearFieldError:h.clearFieldError,clearErrors:h.clearErrors,resetDirty:x.resetDirty,setTouched:x.setTouched,setDirty:x.setDirty,isTouched:x.isTouched,resetTouched:x.resetTouched,isDirty:x.isDirty,getTouched:x.getTouched,getDirty:x.getDirty,reorderListItem:v.reorderListItem,insertListItem:v.insertListItem,removeListItem:v.removeListItem,replaceListItem:v.replaceListItem,reset:H,validate:$,validateField:C,getInputProps:A,onSubmit:D,onReset:U,isValid:G,getTransformedValues:N,key:re,getInputNode:ge};return See(e,me),me}function Uee(e,t){return r=>{try{return xp(e,r),{}}catch(n){if(n instanceof nx){let o={};return t?.errorPriority==="first"&&n.issues.reverse(),n.issues.forEach(i=>{o[i.path.join(".")]=i.message}),o}throw n}}}var bC=b(R(),1);var nr=b(O(),1),xC="@custom";function Hee(e){return(e.choices??[]).map(t=>({value:String(t.value),label:t.label}))}function Wee(e,t){return e.choices?.find(r=>String(r.value)===t)?.value}function zwe({field:e,value:t,onChange:r,error:n}){let o=e.choices?.some(l=>l.value===t)??!1,[i,a]=(0,bC.useState)(!o&&t!==void 0&&e.open!==void 0),s=[...Hee(e),...e.open?[{value:xC,label:"Custom\u2026"}]:[]];return(0,nr.jsxs)(je,{gap:"xs",children:[(0,nr.jsx)(Hs,{label:e.label,description:e.help,data:s,value:i?xC:o?String(t):null,error:i?void 0:n,allowDeselect:!1,onChange:l=>{a(l===xC),l!==xC&&r(Wee(e,l))}}),i&&e.open&&(0,nr.jsx)(_N,{field:{...e.open,label:"Your own value",help:void 0},value:t,onChange:r,error:n})]})}function Lb({field:e,value:t,onPick:r}){let n=e.pathKind??e.element?.pathKind??"dir";return(0,nr.jsx)(kt,{label:n==="file"?"Choose a file":"Choose a folder",children:(0,nr.jsx)(bt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{_k(n,t,e.label).then(o=>o&&r(o))},children:(0,nr.jsx)(Vv,{size:18,stroke:1.6})})})}function Vee({field:e,value:t,onChange:r,error:n}){let[o,i]=(0,bC.useState)(t===void 0?"":JSON.stringify(t,null,2)),[a,s]=(0,bC.useState)();return(0,nr.jsx)(lv,{label:e.label,description:e.help,value:o,error:a??n,formatOnBlur:!0,autosize:!0,minRows:3,onChange:l=>{i(l);try{r(l.trim()===""?void 0:JSON.parse(l)),s(void 0)}catch{s("This is not valid JSON yet.")}}})}function _N(e){let{field:t,value:r,onChange:n,error:o}=e,i={label:t.label,description:t.help,error:o};switch(t.kind){case"boolean":return(0,nr.jsx)(ja,{label:t.label,description:t.help,checked:r===!0,error:o,onChange:a=>n(a.currentTarget.checked)});case"enum":return(0,nr.jsx)(zwe,{...e});case"number":return(0,nr.jsx)(Kd,{...i,value:typeof r=="number"?r:"",min:t.min,max:t.max,allowDecimal:!t.integer,placeholder:t.range,onChange:a=>n(typeof a=="number"?a:void 0)});case"secret":return(0,nr.jsx)(Xd,{...i,value:typeof r=="string"?r:"",placeholder:"Type a new value",autoComplete:"off",onChange:a=>n(a.currentTarget.value)});case"path":return(0,nr.jsxs)(De,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,nr.jsx)(er,{...i,style:{flex:1},ff:"monospace",placeholder:t.literals?.length?t.literals.join(" or ")+", or a path":"C:\\\u2026",value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)}),(0,nr.jsx)(Lb,{field:t,value:typeof r=="string"?r:void 0,onPick:n})]});case"text":return(0,nr.jsx)(er,{...i,value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)});case"list":{let a=Array.isArray(r)?r.map(s=>String(s)):[];return t.element?.kind==="enum"?(0,nr.jsx)(Zd,{...i,data:Hee(t.element),value:a,onChange:s=>n(s.map(l=>Wee(t.element,l)??l))}):t.element?.kind==="path"?(0,nr.jsxs)(De,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,nr.jsx)(pc,{...i,style:{flex:1},value:a,onChange:n,clearable:!0}),(0,nr.jsx)(Lb,{field:t,value:void 0,onPick:s=>n(a.includes(s)?a:[...a,s])})]}):t.element?.kind==="text"?(0,nr.jsx)(pc,{...i,value:a,onChange:n,clearable:!0}):(0,nr.jsx)(Vee,{...e})}default:return(0,nr.jsx)(Vee,{...e})}}var pl=b(O(),1);function Nwe(e){let t=gk(e.op)?.input,r=(e.fields??[]).map(o=>o.name);if(!(t instanceof g.ZodObject)||!r.length)return;let n=t.shape;return g.object(Object.fromEntries(r.filter(o=>n[o]).map(o=>[o,n[o]])))}function Fwe({action:e,submit:t,cancel:r}){let n=e.fields??[],o=Nwe(e),i=o?Uee(o):void 0,a=yN({mode:"controlled",initialValues:{...e.initial},validate:s=>{let l={};for(let c of n){let d=D1(c,s[c.name]);d&&(l[c.name]=d)}return{...i?i(s):{},...l}}});return(0,pl.jsx)("form",{onSubmit:a.onSubmit(t),children:(0,pl.jsxs)(je,{gap:"md",children:[n.map(s=>(0,pl.jsx)(_N,{field:s,value:a.values[s.name],error:a.errors[s.name],onChange:l=>a.setFieldValue(s.name,l)},s.name)),(0,pl.jsxs)(De,{justify:"flex-end",children:[(0,pl.jsx)(ht,{variant:"default",onClick:r,children:"Cancel"}),(0,pl.jsx)(ht,{type:"submit",color:e.danger?"red":void 0,children:"Save"})]})]})})}function yC(e){return new Promise(t=>{let r=!1,n=a=>{r||(r=!0,Ua.close(i),t(a))},o=e.fields??[],i=Ua.open({title:o.length===1?o[0].label:e.label,centered:!0,onClose:()=>n(void 0),children:(0,pl.jsx)(Fwe,{action:e,submit:n,cancel:()=>n(void 0)})})})}var Ao=b(O(),1),Lwe={attach:Qs,open:Qs,start:hE,stop:gE,restart:bw,reopen:bw,reset:vE,make:yE,remove:yw,delete:yw,edit:Gv,change:Gv,show:sE,hide:aE,add:dp,new:dp,forget:qv,include:oE,exclude:rE,rename:Gv,use:JR,save:jv,choose:uE};function Mwe(e){let t=e?.session;return typeof t=="string"?t:void 0}function IN(e){let t=(e.verb??e.label).split(/\s+/)[0].toLowerCase();return Lwe[t]}function _C(e){return e.kind==="operation"&&e.danger===!0}function $i(e){return e!==void 0&&!(e.kind==="link"&&e.target.kind==="command")}function Yu(){let e=Sk();return(0,Zee.useCallback)(async t=>{if(t.kind==="operation"){let n=t.fields?.length?await yC(t):{};return n?e(t,n):void 0}let r=t.target;if(r.kind==="terminal")vo("/s/"+r.session);else if(r.kind==="start-agent"){let n={kind:"operation",op:"agents.start",label:"Start "+r.agent,input:{agent:r.agent}},o=await e(n),i=o.ok?Mwe(o.output):void 0;return i&&vo("/s/"+i),o}else r.kind==="view"&&vo(nn(r.view,r.params))},[e])}function Ju({action:e,primary:t=!1,...r}){let n=Yu();if(!$i(e))return null;let o=_C(e),i=IN(e),a=(0,Ao.jsx)(ht,{variant:t?"filled":o?"light":"default",color:o?"red":void 0,leftSection:i?(0,Ao.jsx)(i,{size:16,stroke:1.8}):void 0,onClick:s=>{s.stopPropagation(),n(e)},...r,children:e.label});return e.description?(0,Ao.jsx)(kt,{label:e.description,children:a}):a}function Gee({action:e}){let t=Yu();if(!$i(e))return null;let r=IN(e);return r?(0,Ao.jsx)(kt,{label:e.label,children:(0,Ao.jsx)(bt,{"aria-label":e.label,color:_C(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:(0,Ao.jsx)(r,{size:16,stroke:1.7})})}):(0,Ao.jsx)(ht,{size:"compact-xs",variant:"subtle",color:_C(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:e.label})}function qee({actions:e}){let t=Yu(),r=e.filter($i);return r.length?(0,Ao.jsxs)(Xr,{position:"bottom-end",children:[(0,Ao.jsx)(Xr.Target,{children:(0,Ao.jsx)(bt,{"aria-label":"More actions",onClick:n=>n.stopPropagation(),children:(0,Ao.jsx)(iE,{size:16})})}),(0,Ao.jsx)(Xr.Dropdown,{children:r.map((n,o)=>{let i=IN(n);return(0,Ao.jsx)(Xr.Item,{color:_C(n)?"red":void 0,leftSection:i?(0,Ao.jsx)(i,{size:15}):void 0,onClick:()=>{t(n)},children:n.label},o)})})]}):null}var fs=b(R(),1);var hh=b(R(),1);var Bt=b(O(),1),wN="@custom";function Bwe(e){return["boolean","enum","number","text","path"].includes(e.kind)?!0:e.kind==="list"&&["enum","text","path"].includes(e.element?.kind??"")}function IC({action:e,summary:t}){let r=Sk(),n=e.fields?.[0],o=e.initial?.[n?.name??""],[i,a]=(0,hh.useState)(o),[s,l]=(0,hh.useState)(!1),[c,d]=(0,hh.useState)(null),u=JSON.stringify(o??null);if((0,hh.useEffect)(()=>a(JSON.parse(u)),[u]),!n)return null;let f=async y=>{if(JSON.stringify(y??null)===u)return;let x=D1(n,y);if(x){d(x);return}l(!0),d(null);let v=await r(e,{[n.name]:y},{inline:!0});l(!1),!v.ok&&!("cancelled"in v)&&(d(v.message+(v.fix?" "+v.fix:"")),a(JSON.parse(u)))},m=y=>{y.key==="Enter"&&f(i),y.key==="Escape"&&a(JSON.parse(u))},p=s?(0,Bt.jsx)(uo,{size:14}):void 0,h=c??void 0;if(!Bwe(n))return(0,Bt.jsxs)(De,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[t&&(0,Bt.jsx)(ye,{size:"sm",c:"dimmed",truncate:!0,children:t}),(0,Bt.jsx)(ht,{variant:"default",size:"xs",onClick:()=>{yC(e).then(async y=>{y&&await r(e,y,{inline:!0})})},children:n.kind==="secret"?"Set\u2026":"Edit\u2026"})]});switch(n.kind){case"boolean":return(0,Bt.jsxs)(je,{gap:4,align:"flex-end",children:[(0,Bt.jsxs)(De,{gap:"xs",children:[p,(0,Bt.jsx)(ja,{checked:i===!0,"aria-label":n.label,disabled:s,onChange:y=>{let x=y.currentTarget.checked;a(x),f(x)}})]}),h&&(0,Bt.jsx)(jwe,{text:h})]});case"enum":{let y=(n.choices??[]).map(_=>({value:String(_.value),label:_.label})),x=n.choices?.some(_=>_.value===i)??!1,v=!x&&i!==void 0&&n.open!==void 0;return(0,Bt.jsxs)(je,{gap:6,children:[(0,Bt.jsx)(Hs,{"aria-label":n.label,data:[...y,...n.open?[{value:wN,label:"Custom\u2026"}]:[]],value:v?wN:x?String(i):null,rightSection:p,error:v?void 0:h,disabled:s,onChange:_=>{if(_===wN){a(n.open?.kind==="number"?n.open.min??0:"");return}let I=n.choices?.find(S=>String(S.value)===_)?.value;a(I),f(I)}}),v&&n.open&&(0,Bt.jsx)(Kee,{field:n.open,value:i,error:h,onChange:a,onSave:f})]})}case"number":return(0,Bt.jsx)(Kee,{field:n,value:i,error:h,onChange:a,onSave:f,busy:s});case"path":return(0,Bt.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Bt.jsx)(er,{style:{flex:1},"aria-label":n.label,ff:"monospace",size:"sm",value:typeof i=="string"?i:"",placeholder:n.literals?.length?n.literals.join(" or ")+", or a path":"C:\\\u2026",rightSection:p,error:h,onChange:y=>a(y.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m}),(0,Bt.jsx)(Lb,{field:n,value:typeof i=="string"?i:void 0,onPick:y=>{a(y),f(y)}})]});case"list":{let y=Array.isArray(i)?i.map(_=>String(_)):[],x=n.element;if(x?.kind==="enum")return(0,Bt.jsx)(Zd,{"aria-label":n.label,data:(x.choices??[]).map(_=>({value:String(_.value),label:_.label})),value:y,error:h,rightSection:p,onChange:_=>{let I=_.map(S=>x.choices?.find(w=>String(w.value)===S)?.value??S);a(I),f(I)}});let v=_=>{a(_),f(_)};return(0,Bt.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Bt.jsx)(pc,{style:{flex:1},"aria-label":n.label,value:y,placeholder:y.length?void 0:"Type and press Enter",error:h,rightSection:p,onChange:v,clearable:!0}),x?.kind==="path"&&(0,Bt.jsx)(Lb,{field:n,value:void 0,onPick:_=>v(y.includes(_)?y:[...y,_])})]})}default:return(0,Bt.jsx)(er,{"aria-label":n.label,value:typeof i=="string"?i:"",rightSection:p,error:h,onChange:y=>a(y.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m})}}function Kee({field:e,value:t,error:r,busy:n,onChange:o,onSave:i}){let a=s=>{s.key==="Enter"&&i(t)};return e.kind==="number"?(0,Bt.jsx)(Kd,{"aria-label":e.label,value:typeof t=="number"?t:"",min:e.min,max:e.max,allowDecimal:!e.integer,thousandSeparator:",",placeholder:e.range,rightSection:n?(0,Bt.jsx)(uo,{size:14}):void 0,error:r,onChange:s=>o(typeof s=="number"?s:void 0),onBlur:()=>{i(t)},onKeyDown:a}):(0,Bt.jsx)(er,{"aria-label":e.label,value:typeof t=="string"?t:"",error:r,onChange:s=>o(s.currentTarget.value),onBlur:()=>{i(t)},onKeyDown:a})}function jwe({text:e}){return(0,Bt.jsx)(ye,{size:"xs",c:"red",ta:"right",children:e})}var mr=b(O(),1);function Xee(){return(0,mr.jsxs)(je,{gap:"lg","aria-busy":"true","aria-label":"Loading",children:[(0,mr.jsxs)(De,{justify:"space-between",children:[(0,mr.jsxs)(je,{gap:8,children:[(0,mr.jsx)(Sn,{h:26,w:180,radius:"md"}),(0,mr.jsx)(Sn,{h:14,w:320,radius:"md"})]}),(0,mr.jsx)(Sn,{h:34,w:120,radius:"md"})]}),[0,1].map(e=>(0,mr.jsx)(Or,{children:(0,mr.jsxs)(je,{gap:"sm",children:[(0,mr.jsx)(Sn,{h:16,w:140,radius:"md"}),(0,mr.jsx)(Sn,{h:12,radius:"md"}),(0,mr.jsx)(Sn,{h:12,w:"80%",radius:"md"}),(0,mr.jsx)(Sn,{h:12,w:"60%",radius:"md"})]})},e))]})}function Mb({title:e,text:t,icon:r=dE,action:n,tone:o="neutral"}){return(0,mr.jsx)(Or,{py:48,children:(0,mr.jsx)(ic,{children:(0,mr.jsxs)(je,{gap:"sm",align:"center",maw:440,ta:"center",children:[(0,mr.jsx)(ru,{size:52,radius:"xl",variant:"light",color:o==="danger"?"red":"indigo",children:(0,mr.jsx)(r,{size:26,stroke:1.6})}),e&&(0,mr.jsx)(xi,{order:3,children:e}),(0,mr.jsx)(ye,{c:"dimmed",size:"sm",children:t}),n]})})})}function SN({message:e,fix:t,retry:r}){return(0,mr.jsx)(Mb,{tone:"danger",icon:Mv,title:e,text:t??"Try again in a moment.",action:r&&(0,mr.jsx)(ht,{variant:"default",onClick:r,children:"Try again"})})}var Re=b(O(),1);function Bb(e){return"item-"+e.replace(/[^A-Za-z0-9_-]/g,"_")}function Uwe(e){return(e.items??[]).filter(t=>t.badges?.length).length}function Vwe({item:e}){return!e.details?.length&&!e.code?null:(0,Re.jsx)(kt,{label:(0,Re.jsxs)(je,{gap:0,children:[e.code&&(0,Re.jsx)(ye,{size:"xs",ff:"monospace",fw:700,children:e.code}),(e.details??[]).map((t,r)=>(0,Re.jsx)(ye,{size:"xs",ff:"monospace",style:{whiteSpace:"pre"},children:t},r))]}),maw:480,position:"top-start",children:(0,Re.jsx)(Wv,{size:14,color:"var(--app-muted)",style:{flex:"none",cursor:"help"}})})}var Hwe=150;function Wwe({text:e}){let[t,r]=(0,fs.useState)(!1),n=e.length>Hwe;return(0,Re.jsxs)(F,{mt:4,children:[(0,Re.jsx)(ye,{size:"xs",c:"dimmed",lh:1.5,lineClamp:n&&!t?2:void 0,children:e}),n&&(0,Re.jsx)(Yg,{component:"button",type:"button",size:"xs",onClick:()=>r(!t),children:t?"Less":"More"})]})}function Zwe({item:e,flash:t}){let r=$i(e.primary)&&!e.disabled?e.primary:void 0,n=r?.kind==="operation"&&r.inline?r:void 0,o=!!e.badges?.length;return(0,Re.jsxs)("div",{className:"setting-row"+(t?" flash":""),id:Bb(e.id),children:[(0,Re.jsxs)(F,{style:{minWidth:0},children:[(0,Re.jsxs)(De,{gap:6,wrap:"nowrap",children:[o&&(0,Re.jsx)("span",{className:"modified-dot",title:"Changed from the default"}),(0,Re.jsx)(ye,{fw:600,size:"sm",truncate:!0,children:e.label}),(0,Re.jsx)(Vwe,{item:e})]}),e.description&&(0,Re.jsx)(Wwe,{text:e.description}),e.disabled&&(0,Re.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",mt:4,children:e.disabled})]}),(0,Re.jsxs)(De,{gap:6,wrap:"nowrap",justify:"flex-end",align:"flex-start",children:[(0,Re.jsx)(F,{style:{flex:1,minWidth:0},children:n?(0,Re.jsx)(IC,{action:n,summary:e.hint}):(0,Re.jsxs)(De,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[e.hint&&(0,Re.jsx)(kt,{label:Xc(e.hint),openDelay:400,maw:480,multiline:!0,children:(0,Re.jsx)(ye,{size:"sm",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:Xc(e.hint)})}),r&&(0,Re.jsx)(F,{style:{flex:"none"},children:(0,Re.jsx)(Ju,{action:r,size:"xs"})})]})}),(0,Re.jsx)(F,{w:28,style:{flex:"none"},children:(0,Re.jsx)(SC,{actions:e.actions??[]})})]})]})}function Gwe({text:e}){let t=/[A-Za-z]:\\[^\s]+|\/[^\s]+/.exec(e)?.[0],r=t?t.split(/[\\/]/).pop():void 0;return(0,Re.jsx)(kt,{label:e,openDelay:300,maw:560,multiline:!0,children:(0,Re.jsxs)(De,{gap:6,wrap:"nowrap",mt:-8,style:{width:"fit-content",cursor:"default"},children:[(0,Re.jsx)(lE,{size:15,color:"var(--app-muted)",style:{flex:"none"}}),(0,Re.jsx)(ye,{size:"xs",c:"dimmed",children:r?"Saved in "+r:e})]})})}function kN(e){let t=decodeURIComponent(location.hash.slice(1));if(t.startsWith("item-"))for(let r of e){let n=r.items?.find(o=>Bb(o.id)===t);if(n)return{section:r.id,item:n.id}}return{section:e.find(r=>r.id===t)?.id}}function Qee({page:e,summary:t,toolbar:r}){let n=(0,fs.useMemo)(()=>e.sections.filter(p=>p.items?.length),[e]),[o,i]=(0,fs.useState)(()=>kN(n).section??n[0]?.id),[a,s]=(0,fs.useState)(()=>kN(n).item),[l,c]=(0,fs.useState)("");(0,fs.useEffect)(()=>{let p=()=>{let h=kN(n);h.section&&i(h.section),h.item&&(c(""),s(h.item))};return window.addEventListener("hashchange",p),()=>window.removeEventListener("hashchange",p)},[n]),(0,fs.useEffect)(()=>{if(!a)return;document.getElementById(Bb(a))?.scrollIntoView({block:"center",behavior:"smooth"});let p=window.setTimeout(()=>s(void 0),1800);return()=>window.clearTimeout(p)},[a,o]);let d=n.find(p=>p.id===o)??n[0],u=l.trim()?PN({...e,sections:n},l).sections:null,f=p=>{c(""),i(p),history.replaceState(null,"",location.pathname+location.search+"#"+p),window.scrollTo({top:0})},m=p=>(0,Re.jsx)(Zwe,{item:p,flash:a===p.id},p.id);return(0,Re.jsxs)(je,{gap:"lg",children:[(0,Re.jsx)(CN,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,Re.jsx)(Gwe,{text:e.notice.text}),(0,Re.jsxs)("div",{className:"category-layout",children:[(0,Re.jsxs)(je,{gap:"sm",className:"category-nav",children:[(0,Re.jsx)(er,{leftSection:(0,Re.jsx)(kn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:l,onChange:p=>c(p.currentTarget.value),"aria-label":"Search "+e.title.toLowerCase()}),(0,Re.jsx)(je,{gap:2,visibleFrom:"md",children:n.map(p=>{let h=Uwe(p);return(0,Re.jsx)(Ba,{label:p.title,active:!u&&p.id===d?.id,onClick:()=>f(p.id),style:{borderRadius:"var(--mantine-radius-md)"},rightSection:h?(0,Re.jsx)(In,{size:"xs",circle:!0,variant:"light",children:h}):null},p.id)})}),(0,Re.jsx)(F,{hiddenFrom:"md",children:(0,Re.jsx)(De,{gap:6,children:n.map(p=>(0,Re.jsx)(In,{size:"lg",variant:p.id===d?.id&&!u?"filled":"light",color:p.id===d?.id&&!u?"indigo":"gray",style:{cursor:"pointer"},onClick:()=>f(p.id),children:p.title},p.id))})})]}),(0,Re.jsx)(je,{gap:"lg",style:{minWidth:0},children:u?u.length?u.map(p=>(0,Re.jsxs)(je,{gap:"xs",children:[(0,Re.jsxs)(ye,{size:"xs",fw:650,tt:"uppercase",c:"dimmed",children:[p.title," \xB7 ",p.items?.length??0]}),(0,Re.jsx)(Or,{className:"list-card",children:(0,Re.jsx)(wC,{items:p.items??[],render:m})})]},p.id)):(0,Re.jsx)(Mb,{icon:kn,title:"Nothing found",text:'No setting matches "'+l+'".'}):d&&(0,Re.jsxs)(je,{gap:"sm",children:[(0,Re.jsxs)(F,{children:[(0,Re.jsx)(xi,{order:2,children:d.title}),d.description&&(0,Re.jsx)(ye,{size:"sm",c:"dimmed",mt:4,children:d.description})]}),(0,Re.jsx)(Or,{className:"list-card",children:(0,Re.jsx)(wC,{items:d.items??[],render:m})})]})})]})]})}var qwe={ok:"green",warn:"orange",danger:"red",muted:"gray",accent:"blue"};function gh(e){return e?qwe[e]:void 0}var J=b(O(),1),Kwe=12,DN=3;function Xc(e){return e.replace(/ +-> +/g," \u2192 ").replace(/\s{2,}/g," \xB7 ")}function Yee(e){if(!e.hint)return!1;let t=new Set((e.badges??[]).map(r=>r.text.toLowerCase()));return t.size?!Xc(e.hint).split(" \xB7 ").every(r=>t.has(r.trim().toLowerCase())):!0}function Jee(e){return e.kind==="link"&&e.target.kind==="start-agent"}function CN({title:e,summary:t,toolbar:r,actions:n=[]}){let o=n.filter($i);return(0,J.jsxs)(De,{justify:"space-between",align:"flex-start",gap:"md",wrap:"wrap",children:[(0,J.jsxs)(je,{gap:4,style:{minWidth:0},children:[(0,J.jsx)(xi,{order:1,children:e}),t&&(0,J.jsx)(ye,{c:"dimmed",size:"sm",children:t})]}),(0,J.jsxs)(De,{gap:"xs",children:[r,o.map((i,a)=>(0,J.jsx)(Ju,{action:i,primary:Jee(i)},a))]})]})}function Xwe({note:e}){return(0,J.jsx)(Oa,{color:gh(e.tone)??"gray",variant:"light",p:"sm",radius:"md",icon:(0,J.jsx)(Wv,{size:18}),styles:{message:{fontSize:"var(--mantine-font-size-sm)"}},children:e.text})}function Qwe({fact:e}){let t=gh(e.tone);return(0,J.jsxs)("div",{className:"fact-tile",title:e.description,children:[(0,J.jsx)(ye,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",lts:.3,children:e.label}),(0,J.jsxs)(De,{gap:6,wrap:"nowrap",mt:4,children:[t&&(0,J.jsx)("span",{className:"status-dot",style:{"--dot":`var(--mantine-color-${t}-6)`}}),(0,J.jsx)(ye,{size:"sm",fw:600,style:{wordBreak:"break-word"},children:e.value})]}),e.meter&&(0,J.jsx)(dc,{mt:8,size:"sm",radius:"xl",value:Math.min(100,e.meter.value/Math.max(1,e.meter.max)*100),color:t??"indigo"}),e.details?.map((r,n)=>(0,J.jsx)(ye,{size:"xs",c:"dimmed",mt:2,children:r},n))]})}function Ywe({facts:e}){return(0,J.jsx)(Fm,{cols:{base:1,xs:2,md:3},spacing:"sm",verticalSpacing:"sm",children:e.map(t=>(0,J.jsx)(Qwe,{fact:t},t.id))})}function ete({lines:e}){let[t,r]=(0,ms.useState)(!1);if(!e.length)return null;let n=e.slice(0,DN),o=e.slice(DN),i=(a,s)=>(0,J.jsx)(ye,{size:"xs",c:"dimmed",ff:"monospace",style:{wordBreak:"break-word",whiteSpace:"pre-wrap"},children:a},s);return(0,J.jsxs)(F,{mt:4,children:[n.map(i),o.length>0&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Jf,{in:t,children:o.map((a,s)=>i(a,s+DN))}),(0,J.jsx)(xt,{onClick:()=>r(!t),mt:2,children:(0,J.jsxs)(De,{gap:2,children:[t?(0,J.jsx)(Bv,{size:12}):(0,J.jsx)(eE,{size:12}),(0,J.jsx)(ye,{size:"xs",c:"indigo",children:t?"Less":o.length+" more"})]})})]})]})}function tte({item:e}){return(0,J.jsx)(J.Fragment,{children:e.badges?.map(t=>(0,J.jsx)(In,{size:"sm",color:gh(t.tone)??"gray",children:t.text},t.text))})}function RN(e){return $i(e.primary)&&!e.disabled?e.primary:void 0}function rte({action:e,hint:t,light:r}){return e.kind==="operation"&&e.inline?(0,J.jsx)(F,{miw:160,maw:300,onClick:n=>n.stopPropagation(),children:(0,J.jsx)(IC,{action:e,summary:t})}):(0,J.jsx)(Ju,{action:e,size:"xs",variant:r?"light":"default"})}function Jwe(e,t){return e.kind==="operation"&&t.kind==="operation"?e.op===t.op&&JSON.stringify(e.input)===JSON.stringify(t.input):e.kind==="link"&&t.kind==="link"?JSON.stringify(e.target)===JSON.stringify(t.target):!1}function ote(e,t){return(e??[]).filter(r=>!t||!Jwe(r,t))}function SC({actions:e}){let t=e.filter($i);return t.length>2?(0,J.jsx)(qee,{actions:t}):(0,J.jsx)(J.Fragment,{children:t.map((r,n)=>(0,J.jsx)(Gee,{action:r},n))})}function eSe({item:e}){let t=Yu(),r=RN(e),n=r?.kind==="link";return(0,J.jsx)("div",{className:"item-row"+(n?" clickable":""),tabIndex:n?0:void 0,role:n?"button":void 0,onClick:n?()=>{t(r)}:void 0,onKeyDown:n?o=>o.key==="Enter"&&void t(r):void 0,style:e.disabled?{opacity:.65}:void 0,children:(0,J.jsxs)(De,{justify:"space-between",wrap:"wrap",align:"center",gap:"md",children:[(0,J.jsxs)(De,{gap:"sm",wrap:"nowrap",align:"flex-start",style:{minWidth:0,flex:"1 1 240px"},children:[e.icon&&(0,J.jsx)(ju,{name:e.icon,size:34}),(0,J.jsxs)(F,{style:{minWidth:0},children:[(0,J.jsxs)(De,{gap:8,wrap:"wrap",children:[(0,J.jsx)(ye,{fw:600,size:"sm",c:gh(e.tone),children:Xc(e.label)}),e.marked&&(0,J.jsx)(In,{size:"xs",variant:"dot",color:"indigo",children:"this folder"}),(0,J.jsx)(tte,{item:e})]}),Yee(e)&&(0,J.jsx)(ye,{size:"sm",c:"dimmed",style:{wordBreak:"break-word"},children:Xc(e.hint??"")}),e.description&&(0,J.jsx)(ye,{size:"xs",c:"dimmed",mt:2,children:e.description}),(0,J.jsx)(ete,{lines:e.details??[]}),e.disabled&&(0,J.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",mt:2,children:e.disabled})]})]}),(0,J.jsxs)(De,{gap:6,wrap:"nowrap",className:"row-actions",style:{flex:"none"},children:[(0,J.jsx)(SC,{actions:ote(e.actions,r)}),r&&(0,J.jsx)(rte,{action:r,hint:e.hint,light:n})]})]})})}function tSe({item:e}){let t=Yu(),r=RN(e),n=r?.kind==="link";return(0,J.jsx)(Or,{className:"item-card"+(n?" clickable":""),padding:"md",onClick:n?()=>{t(r)}:void 0,style:e.disabled?{opacity:.7}:void 0,children:(0,J.jsxs)(je,{gap:"sm",h:"100%",children:[(0,J.jsxs)(De,{justify:"space-between",wrap:"nowrap",align:"flex-start",children:[(0,J.jsxs)(De,{gap:"sm",wrap:"nowrap",style:{minWidth:0},children:[e.icon&&(0,J.jsx)(ju,{name:e.icon}),(0,J.jsxs)(F,{style:{minWidth:0},children:[(0,J.jsx)(ye,{fw:650,size:"sm",truncate:!0,children:Xc(e.label)}),Yee(e)&&(0,J.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,children:Xc(e.hint??"")})]})]}),(0,J.jsxs)(De,{gap:4,wrap:"nowrap",style:{flex:"none"},children:[e.marked&&(0,J.jsx)(In,{size:"sm",variant:"dot",color:"indigo",children:"this folder"}),(0,J.jsx)(tte,{item:e})]})]}),(0,J.jsx)(ete,{lines:e.details??[]}),e.disabled&&(0,J.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",children:e.disabled}),(r||e.actions?.length)&&(0,J.jsxs)(De,{justify:"flex-end",gap:6,mt:"auto",children:[(0,J.jsx)(SC,{actions:ote(e.actions,r)}),r&&(0,J.jsx)(rte,{action:r,hint:e.hint,light:!0})]})]})})}function rSe({section:e}){let t=e.columns??[];return(0,J.jsx)(dr.ScrollContainer,{minWidth:560,children:(0,J.jsxs)(dr,{highlightOnHover:!0,verticalSpacing:8,horizontalSpacing:"md",fz:"sm",children:[(0,J.jsx)(dr.Thead,{children:(0,J.jsxs)(dr.Tr,{children:[t.map(r=>(0,J.jsx)(dr.Th,{fz:"xs",c:"dimmed",tt:"uppercase",children:r.label},r.key)),(0,J.jsx)(dr.Th,{})]})}),(0,J.jsx)(dr.Tbody,{children:(e.items??[]).map(r=>{let n=RN(r);return(0,J.jsxs)(dr.Tr,{style:r.disabled?{opacity:.6}:void 0,children:[t.map(o=>(0,J.jsx)(dr.Td,{children:r.cells?.[o.key]??""},o.key)),(0,J.jsx)(dr.Td,{ta:"right",children:n&&(0,J.jsx)(Ju,{action:n,size:"compact-xs"})})]},r.id)})})]})})}function wC({items:e,render:t=r=>(0,J.jsx)(eSe,{item:r},r.id)}){let r=[],n;for(let o of e)o.group&&o.group!==n&&r.push((0,J.jsx)("div",{className:"group-heading",children:o.group},"g:"+o.group)),n=o.group,r.push(t(o));return(0,J.jsx)(J.Fragment,{children:r})}function oSe({section:e}){let t=(e.actions??[]).filter($i);return!e.title&&!e.summary&&!t.length?null:(0,J.jsxs)(De,{justify:"space-between",align:"flex-end",gap:"sm",children:[(0,J.jsxs)(F,{style:{minWidth:0},children:[e.title&&(0,J.jsx)(xi,{order:3,children:e.title}),e.summary&&(0,J.jsx)(ye,{size:"sm",c:"dimmed",children:e.summary})]}),t.length>0&&(0,J.jsx)(De,{gap:"xs",children:t.map((r,n)=>(0,J.jsx)(Ju,{action:r,primary:Jee(r),size:"xs"},n))})]})}function nSe({notes:e}){let t=e.filter(o=>(o.only===void 0||o.only==="web")&&!o.text.startsWith("* ="));if(!t.length)return null;let r=t.filter(o=>o.tone==="warn"||o.tone==="danger"),n=t.filter(o=>!r.includes(o));return(0,J.jsxs)(je,{gap:"xs",children:[r.length>0&&(0,J.jsx)(Oa,{color:r.some(o=>o.tone==="danger")?"red":"yellow",variant:"light",radius:"md",p:"sm",icon:(0,J.jsx)(Mv,{size:18}),children:(0,J.jsx)(je,{gap:4,children:r.map((o,i)=>(0,J.jsx)(ye,{size:"sm",children:o.text},i))})}),n.length>0&&(0,J.jsx)(je,{gap:2,children:n.map((o,i)=>(0,J.jsx)(ye,{size:"xs",c:gh(o.tone)??"dimmed",children:o.text},i))})]})}function iSe({lines:e}){let t=(0,ms.useRef)(null),r=e.join(`
|
|
219
|
+
`);return(0,ms.useEffect)(()=>{let n=t.current;n&&(n.scrollTop=n.scrollHeight)},[r]),(0,J.jsx)(Or,{children:(0,J.jsx)($r,{h:400,viewportRef:t,type:"auto",children:(0,J.jsx)(iv,{block:!0,children:r})})})}function aSe({section:e}){let t=e.items??[],r=e.facts??[],n=(e.actions??[]).filter($i),o=e.text??[];if(!r.length&&!t.length&&!n.length&&!e.summary&&!o.length)return null;let i=e.columns&&e.columnsOn!=="cli";return(0,J.jsxs)(je,{gap:"sm",children:[(0,J.jsx)(oSe,{section:e}),e.description&&(0,J.jsx)(ye,{size:"sm",c:"dimmed",mt:-4,children:e.description}),r.length>0&&(0,J.jsx)(Or,{children:(0,J.jsx)(Ywe,{facts:r})}),o.length>0&&(0,J.jsx)(iSe,{lines:o}),t.length>0&&(e.cards?(0,J.jsx)(Fm,{cols:{base:1,sm:2,lg:3},spacing:"md",children:t.map(a=>(0,J.jsx)(tSe,{item:a},a.id))}):(0,J.jsx)(Or,{className:"list-card",children:i?(0,J.jsx)(rSe,{section:e}):(0,J.jsx)(wC,{items:t})})),(0,J.jsx)(nSe,{notes:e.notes??[]})]})}function PN(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=o=>[o.label,o.hint,o.description,o.keywords,o.group,o.code].some(i=>i?.toLowerCase().includes(r));return{...e,sections:e.sections.map(o=>({...o,facts:[],actions:[],items:(o.items??[]).filter(n)})).filter(o=>o.items.length>0||(o.text?.length??0)>0)}}function nte({page:e,summary:t,toolbar:r}){return e.categories?(0,J.jsx)(Qee,{page:e,summary:t,toolbar:r}):(0,J.jsx)(sSe,{page:e,summary:t,toolbar:r})}function sSe({page:e,summary:t,toolbar:r}){let n=Yu(),[o,i]=(0,ms.useState)(""),a=(0,ms.useMemo)(()=>e.sections.reduce((d,u)=>d+(u.items?.length??0),0),[e]),s=(0,ms.useMemo)(()=>PN(e,o),[e,o]),l=e.empty,c=$i(l?.action)?l?.action:void 0;return(0,J.jsxs)(je,{gap:"xl",children:[(0,J.jsx)(CN,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,J.jsx)(Xwe,{note:e.notice}),a>Kwe&&(0,J.jsx)(er,{leftSection:(0,J.jsx)(kn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:o,onChange:d=>i(d.currentTarget.value),"aria-label":"Search this page"}),!wX(e)&&l?(0,J.jsx)(Mb,{title:l.title,text:l.text,action:c&&(0,J.jsx)(ht,{mt:"xs",onClick:()=>{n(c)},children:c.label})}):s.sections.map(d=>(0,J.jsx)(aSe,{section:d},d.id))]})}var ef=b(O(),1),lSe=200;function cSe(e,t){let r={};for(let i of e.params??[]){let a=t[i];typeof a=="string"&&a.length<=lSe&&(r[i]=a)}let n=e.tabs;if(!n)return r;let o=t[n.param];return{...r,[n.param]:n.choices.some(i=>i.value===o)?o:n.choices[0].value}}function dSe({view:e,params:t}){let r=hX(e,t),o=Object.keys(e.queries).map(c=>[c,ol(e.queries[c],r[c])]),i=o.find(([,c])=>c.error);if(i){let c=i[1].error;return(0,ef.jsx)(SN,{message:c.message,fix:c.fix,retry:()=>location.reload()})}if(o.some(([,c])=>c.pending))return(0,ef.jsx)(Xee,{});let a=e.build(Object.fromEntries(o.map(([c,d])=>[c,d.data])),t),s=e.tabs,l=s?(0,ef.jsx)(Yd,{size:"sm",data:s.choices.map(c=>({value:c.value,label:c.label})),value:t[s.param],onChange:c=>vo(nn(e.id,{[s.param]:c}))}):void 0;return(0,ef.jsx)(nte,{page:a,summary:e.summary,toolbar:l})}function ite({view:e,params:t}){let r=uQ(e);if(!r)return(0,ef.jsx)(SN,{message:"There is no page called "+e+".",fix:"Pick a page on the left."});let n=cSe(r,t);return(0,ef.jsx)(dSe,{view:r,params:n},e+JSON.stringify(n))}var ate=()=>wv({opened:!1,empty:!1,selected:-1,listId:"",query:"",registeredActions:new Set}),EN=e=>Sv(e);function vh(e,t){let r=t.getState();t.setState({...r,...e(t.getState())})}function ste(e){vh(()=>({opened:!0,selected:-1}),e)}function lte(e){vh(()=>({opened:!1}),e)}function cte(e){vh(t=>({opened:!t.opened,selected:t.opened?t.selected:-1}),e)}function dte(e,t){t.updateState(r=>({...r,selected:e}))}function uSe(e,t){t.updateState(r=>({...r,listId:e}))}function kC(e,t=document){let r=t.querySelector(e);if(r)return r;let n=t instanceof ShadowRoot?t.host.children:t.children;for(let o=0;o<n.length;o+=1){let i=n[o];if(i.shadowRoot){let s=kC(e,i.shadowRoot);if(s)return s}let a=kC(e,i);if(a)return a}return null}function CC(e,t){let r=t.getState(),n=r.listId?kC(`#${r.listId}`):null,o=n?.querySelector("[data-selected]"),i=n?.querySelectorAll("[data-action]")??[],a=e===-1?i.length-1:e===i.length?0:e,s=Il(a,0,i.length-1);return o?.removeAttribute("data-selected"),i[s]?.scrollIntoView({block:"nearest"}),i[s]?.setAttribute("data-selected","true"),dte(s,t),s}function fSe(e){return CC(e.getState().selected+1,e)}function mSe(e){return CC(e.getState().selected-1,e)}function pSe(e){let t=e.getState();kC(`#${t.listId} [data-selected]`)?.click()}function hSe(e,t){let r=t.getState();return r.registeredActions.add(e),()=>{r.registeredActions.delete(e)}}function gSe(e,t){vh(()=>({query:e}),t),Promise.resolve().then(()=>{CC(0,t),vh(r=>({empty:r.query.trim().length>0&&r.registeredActions.size===0||!1}),t)})}function vSe({clearQuery:e},t){t.updateState(r=>({...r,selected:-1,query:e?"":r.query,empty:e?!1:r.empty}))}var dn={open:ste,close:lte,toggle:cte,updateState:vh,setSelectedAction:dte,setListId:uSe,selectAction:CC,selectNextAction:fSe,selectPreviousAction:mSe,triggerSelectedAction:pSe,registerAction:hSe,setQuery:gSe,clearSpotlightState:vSe};function ute(){let e=ate();return[e,{open:()=>ste(e),close:()=>lte(e),toggle:()=>cte(e)}]}var[PC,hl]=ute(),{open:xSe,close:bSe,toggle:ySe}=hl;function DC(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var gl=b(O(),1);function _Se(e){return Array.isArray(e)?e.map(t=>t.trim()).join(",").toLowerCase().trim():typeof e=="string"?e.toLowerCase().trim():""}function ISe(e){return e.reduce((t,r)=>"actions"in r?[...t,...r.actions.map(n=>({...n,group:r.group}))]:[...t,r],[])}function wSe(e){let t={},r=[];return e.forEach(n=>{n.group?(t[n.group]||(t[n.group]={pushed:!1,data:{group:n.group,actions:[]}}),t[n.group].data.actions.push(n),t[n.group].pushed||(t[n.group].pushed=!0,r.push(t[n.group].data))):r.push(n)}),r}var fte=(e,t)=>{let r=e.trim().toLowerCase(),n=[[],[]];return ISe(t).forEach(i=>{i.label?.toLowerCase().includes(r)?n[0].push(i):(i.description?.toLowerCase().includes(r)||_Se(i.keywords).includes(r))&&n[1].push(i)}),wSe(n.flat())};function TN(e,t){if(!Array.isArray(e))return[];let r=0;return e.reduce((n,o)=>{if(r>=t)return n;if(DC(o)){let i=TN(o.actions,t-r);n.push({group:o.group,actions:i}),r+=i.length}else n.push(o),r+=1;return n},[])}var Oi=b(O(),1);var[mte,Ai]=Vt("Spotlight component was not found in tree");var no={root:"m_d2b315db",content:"m_3cd250e0",body:"m_d2abce9b",search:"m_f366a061",actionsList:"m_6e463822",action:"m_d49bb8ef",actionBody:"m_3d475731",actionSection:"m_832642f6",actionLabel:"m_6c2a1345",actionDescription:"m_a6d9d78d",empty:"m_82f78f74",footer:"m_ddcaf054",actionsGroup:"m_5a3e5f7b"};var SSe={dimmedSections:!0,highlightQuery:!1},xh=M((e,t)=>{let r=z("SpotlightAction",SSe,e),{className:n,style:o,classNames:i,styles:a,id:s,description:l,label:c,leftSection:d,rightSection:u,children:f,dimmedSections:m,highlightQuery:p,highlightColor:h,closeSpotlightOnTrigger:y,onClick:x,onMouseDown:v,keywords:_,vars:I,...S}=r,w=Ai(),P={classNames:i,styles:a},E=p&&typeof c=="string"?(0,Oi.jsx)(sv,{component:"span",highlight:w.query,color:h,...w.getStyles("actionLabel",P),children:c}):(0,Oi.jsx)("span",{...w.getStyles("actionLabel",P),children:c});return(0,Oi.jsx)(xt,{ref:t,"data-action":!0,...w.getStyles("action",{className:n,style:o,...P}),...S,onMouseDown:B=>{B.preventDefault(),v?.(B)},onClick:B=>{x?.(B),(y??w.closeOnActionTrigger)&&dn.close(w.store)},tabIndex:-1,children:f||(0,Oi.jsxs)(Oi.Fragment,{children:[d&&(0,Oi.jsx)(F,{component:"span",mod:{position:"left",dimmed:m},...w.getStyles("actionSection",P),children:d}),(0,Oi.jsxs)("span",{...w.getStyles("actionBody",P),children:[E,(0,Oi.jsx)("span",{...w.getStyles("actionDescription",P),children:l})]}),u&&(0,Oi.jsx)(F,{component:"span",mod:{position:"right",dimmed:m},...w.getStyles("actionSection",P),children:u})]})})});xh.classes=no;xh.displayName="@mantine/spotlight/SpotlightAction";var pte=b(O(),1);var kSe={},jb=M((e,t)=>{let{className:r,style:n,styles:o,classNames:i,label:a,children:s,...l}=z("SpotlightActionsGroup",kSe,e),c=Ai();return(0,pte.jsx)(F,{...c.getStyles("actionsGroup",{className:r,style:n,classNames:i,styles:o}),ref:t,...l,__vars:{"--spotlight-label":`'${a?.replace(/'/g,"\\'")}'`},children:s})});jb.classes=no;jb.displayName="@mantine/core/SpotlightActionsGroup";var hte=b(O(),1),RC=b(R(),1);var CSe={},Ub=M((e,t)=>{let{className:r,style:n,id:o,children:i,vars:a,classNames:s,styles:l,...c}=z("SpotlightActionsList",CSe,e),d=Ai(),u=`mantine-${(0,RC.useId)().replace(/:/g,"")}`,f=o||u;return(0,RC.useEffect)(()=>(dn.setListId(f,d.store),()=>dn.setListId("",d.store)),[]),(0,hte.jsx)($r.Autosize,{...d.getStyles("actionsList",{className:r,style:n,classNames:s,styles:l}),ref:t,type:"scroll",scrollbarSize:"var(--spotlight-actions-list-padding)",offsetScrollbars:"y",id:f,...c,children:i})});Ub.classes=no;Ub.displayName="@mantine/spotlight/SpotlightActionsList";var gte=b(O(),1);var PSe={},Vb=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightEmpty",PSe,e),s=Ai();return(0,gte.jsx)(F,{ref:t,...s.getStyles("empty",{classNames:o,styles:i,className:r,style:n}),...a})});Vb.classes=no;Vb.displayName="@mantine/spotlight/SpotlightEmpty";var vte=b(O(),1);var DSe={},EC=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightFooter",DSe,e),s=Ai();return(0,vte.jsx)(F,{ref:t,...s.getStyles("footer",{className:r,classNames:o,style:n,styles:i}),...a})});EC.classes=no;EC.displayName="@mantine/spotlight/SpotlightFooter";var $N=b(O(),1);function xte(e,t){if(!e)return[];let r=()=>dn.open(t);return Array.isArray(e)?e.map(n=>[n,r]):[[e,r]]}var RSe={size:600,yOffset:80,zIndex:Pt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:PC,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",maxHeight:400,scrollable:!1},Hb=M((e,t)=>{let r=z("SpotlightRoot",RSe,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,store:c,children:d,query:u,onQueryChange:f,transitionProps:m,clearQueryOnClose:p,shortcut:h,tagsToIgnore:y,triggerOnContentEditable:x,disabled:v,onSpotlightOpen:_,onSpotlightClose:I,forceOpened:S,closeOnActionTrigger:w,maxHeight:P,scrollable:E,...B}=r,H=lt(),{opened:Z,query:q}=EN(c),T=u||q,k=C=>{f?.(C),dn.setQuery(C,c)},$=K({name:"Spotlight",classes:no,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return zh(xte(h,c),y,x),br(()=>{Z?_?.():I?.()},[Z]),v?null:(0,$N.jsx)(mte,{value:{getStyles:$,query:T,setQuery:k,store:c,closeOnActionTrigger:w},children:(0,$N.jsx)(mo,{ref:t,...B,withCloseButton:!1,opened:Z||!!S,padding:0,onClose:()=>dn.close(c),className:o,style:i,classNames:Mi({theme:H,classNames:[no,n],props:r,stylesCtx:void 0}),styles:ma({theme:H,styles:a,props:r,stylesCtx:void 0}),transitionProps:{...m,onExited:()=>{p&&k(""),dn.clearSpotlightState({clearQuery:p},c),m?.onExited?.()}},__vars:{"--spotlight-max-height":E?W(P):void 0},__staticSelector:"Spotlight","data-scrollable":E||void 0,children:d})})});Hb.classes=no;Hb.displayName="@mantine/spotlight/SpotlightRoot";var bte=b(O(),1),yte=b(R(),1);var ESe={size:"lg"},Wb=M((e,t)=>{let{classNames:r,styles:n,onKeyDown:o,onChange:i,vars:a,value:s,...l}=z("SpotlightSearch",ESe,e),c=Ai(),d=c.getStyles("search"),[u,f]=(0,yte.useState)(!1),m=p=>{o?.(p),!u&&(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),dn.selectNextAction(c.store)),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),dn.selectPreviousAction(c.store)),(p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter")&&(p.preventDefault(),dn.triggerSelectedAction(c.store)))};return(0,bte.jsx)(ct,{ref:t,classNames:[{input:d.className},r],styles:[{input:d.style},n],...l,value:s??c.query,onChange:p=>{c.setQuery(p.currentTarget.value),i?.(p)},onKeyDown:m,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});Wb.classes=no;Wb.displayName="@mantine/spotlight/SpotlightSearch";var TSe={size:600,yOffset:80,limit:1/0,zIndex:Pt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:PC,filter:fte,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",highlightQuery:!1},un=M((e,t)=>{let r=z("Spotlight",TSe,e),{searchProps:n,filter:o,query:i,onQueryChange:a,actions:s,nothingFound:l,highlightQuery:c,limit:d,...u}=r,[f,m]=rt({value:i,defaultValue:"",finalValue:"",onChange:a}),p=TN(o(f,s),d).map(h=>{if(DC(h)){let y=h.actions.map(({id:x,...v})=>(0,gl.jsx)(xh,{highlightQuery:c,...v},x));return(0,gl.jsx)(jb,{label:h.group,children:y},h.group)}return(0,gl.jsx)(xh,{highlightQuery:c,...h},h.id)});return(0,gl.jsxs)(Hb,{...u,query:f,onQueryChange:m,ref:t,children:[(0,gl.jsx)(Wb,{...n}),(0,gl.jsxs)(Ub,{children:[p,p.length===0&&l&&(0,gl.jsx)(Vb,{children:l})]})]})});un.classes=no;un.displayName="@mantine/spotlight/Spotlight";un.Search=Wb;un.ActionsList=Ub;un.Action=xh;un.Empty=Vb;un.ActionsGroup=jb;un.Footer=EC;un.Root=Hb;un.open=hl.open;un.close=hl.close;un.toggle=hl.toggle;var _te=b(R(),1);var vl=b(O(),1),$Se=Bu("sessions.list"),ASe=Bu("settings.list");function Ite(){let e=ol($Se,{}).data,t=ol(ASe,{scope:"user"}).data,{setColorScheme:r}=ud(),n=fd("light")==="dark",o=(0,_te.useMemo)(()=>{let i=vk(oh).filter(c=>c.view).map(c=>{let d=oh.find(m=>m.children?.includes(c))?.label,u=bk[d??c.label]??kn,f=d?d+" \xB7 "+c.label:c.label;return{id:"view:"+c.view,label:f,description:"Go to "+f,leftSection:(0,vl.jsx)(u,{size:18,stroke:1.6}),onClick:()=>vo(nn(c.view))}}),a=[{id:"new-session",label:"New session",description:"Start an agent in a project of the sandbox",leftSection:(0,vl.jsx)(dp,{size:18}),onClick:()=>vo(nn("agents"))},{id:"scheme",label:n?"Light mode":"Dark mode",description:"Switch the colours of this page",leftSection:(0,vl.jsx)(Zv,{size:18}),onClick:()=>r(n?"light":"dark")}],s=(e?.sessions??[]).filter(c=>c.phase==="running"&&c.canOpen).map(c=>({id:"session:"+c.id,label:c.harness+" \xB7 "+(c.projectName??c.cwd),description:"Open the terminal of session "+c.id,keywords:[c.id,c.cwd],leftSection:(0,vl.jsx)(ju,{name:c.harness,size:24}),rightSection:(0,vl.jsx)(Qs,{size:16}),onClick:()=>vo("/s/"+c.id)})),l=(t?.rows??[]).map(c=>({id:"setting:"+c.id,label:c.label,description:c.id+(c.field.help?" \xB7 "+c.field.help:""),keywords:[c.id,c.category],leftSection:(0,vl.jsx)(KR,{size:18,stroke:1.6}),onClick:()=>vo(nn("settings")+"#"+Bb(c.id))}));return[{group:"Pages",actions:i},{group:"Commands",actions:a},...s.length?[{group:"Sessions",actions:s}]:[],...l.length?[{group:"Settings",actions:l}]:[]]},[e,t,n,r]);return(0,vl.jsx)(un,{actions:o,shortcut:["mod + K","/"],limit:12,highlightQuery:!0,scrollable:!0,maxHeight:480,nothingFound:"Nothing matches",searchProps:{leftSection:(0,vl.jsx)(kn,{size:18}),placeholder:"Search pages, sessions and settings\u2026"}})}var da=b(O(),1),OSe=Bu("sandbox.status");function zSe(e){let t=e.sandbox;if(e.shared?.limited)return{color:"gray",title:"Another user\u2019s sandbox",line:"Not shared",busy:!1};if(!t.running)return{color:"gray",title:"Stopped",line:"Start an agent to start it",busy:!1};let r=e.projects.reduce((i,a)=>i+a.sessions.length,0)+e.otherSessions.length,n=t.phase==="ready",o=t.startedAt?"up "+Tn(t.startedAt).replace(" ago",""):"running";return{color:n?"green":"yellow",title:n?"Running":t.phase.charAt(0).toUpperCase()+t.phase.slice(1),line:o+" \xB7 "+r+(r===1?" agent":" agents"),busy:!n}}function wte(){let{data:e,error:t}=ol(OSe,{}),r=e?zSe(e):t?{color:"red",title:"Cannot reach the sandbox",line:"Is sandbox web still running?",busy:!1}:null;return(0,da.jsx)(xt,{onClick:()=>vo(nn("sandbox")),p:"sm",w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)"},"aria-label":"Sandbox status",children:r?(0,da.jsxs)(De,{gap:"sm",wrap:"nowrap",children:[(0,da.jsx)("span",{className:"status-dot"+(r.busy?" pulse":""),style:{"--dot":`var(--mantine-color-${r.color}-6)`}}),(0,da.jsxs)(je,{gap:0,style:{minWidth:0},children:[(0,da.jsx)(ye,{size:"sm",fw:600,truncate:!0,children:r.title}),(0,da.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,children:r.line})]})]}):(0,da.jsxs)(je,{gap:6,children:[(0,da.jsx)(Sn,{h:12,w:"60%"}),(0,da.jsx)(Sn,{h:10,w:"80%"})]})})}var Oe=b(O(),1);function Ste(){return(0,Oe.jsxs)(De,{gap:10,wrap:"nowrap",children:[(0,Oe.jsx)("div",{className:"brand-mark",children:(0,Oe.jsx)(cp,{size:17,stroke:2})}),(0,Oe.jsxs)(F,{children:[(0,Oe.jsx)(ye,{fw:700,size:"sm",lh:1.1,children:"Sandbox"}),(0,Oe.jsx)(ye,{size:"xs",c:"dimmed",lh:1.1,children:"Windows development sandbox"})]})]})}function NSe(){let{setColorScheme:e}=ud(),t=fd("light")==="dark";return(0,Oe.jsx)(kt,{label:t?"Light mode":"Dark mode",children:(0,Oe.jsx)(bt,{size:"lg","aria-label":"Switch dark or light",onClick:()=>e(t?"light":"dark"),children:t?(0,Oe.jsx)(_E,{size:18,stroke:1.6}):(0,Oe.jsx)(Zv,{size:18,stroke:1.6})})})}function FSe(){return(0,Oe.jsx)(xt,{onClick:()=>hl.open(),px:"sm",py:7,w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)",background:"var(--app-bg)"},"aria-label":"Search and commands",children:(0,Oe.jsxs)(De,{gap:8,wrap:"nowrap",children:[(0,Oe.jsx)(kn,{size:15,color:"var(--app-muted)"}),(0,Oe.jsx)(ye,{size:"sm",c:"dimmed",style:{flex:1},children:"Search\u2026"}),(0,Oe.jsx)("span",{className:"kbd-hint",children:"Ctrl K"})]})})}function LSe({active:e,onPick:t}){let r=oh.filter(i=>i.view||i.children?.length),n=oh.filter(i=>!i.view&&!i.children?.length),o=(i,a=!1)=>{let s=bk[i.label]??cp,l=a?void 0:(0,Oe.jsx)(s,{size:18,stroke:1.6});if(i.children?.length)return(0,Oe.jsx)(Ba,{label:i.label,leftSection:l,childrenOffset:28,defaultOpened:fQ(i.children).includes(e),style:{borderRadius:"var(--mantine-radius-md)"},children:i.children.map(d=>o(d,!0))},i.label);let c=i.view;return(0,Oe.jsx)(Ba,{label:i.label,leftSection:l,active:c===e,href:nn(c),style:{borderRadius:"var(--mantine-radius-md)"},onClick:d=>{d.preventDefault(),t(),vo(nn(c))}},i.label)};return(0,Oe.jsxs)(je,{gap:2,children:[(0,Oe.jsx)("div",{className:"nav-group-label",children:"Workspace"}),r.map(i=>o(i)),n.length>0&&(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)("div",{className:"nav-group-label",children:"In the terminal menu"}),(0,Oe.jsxs)(ye,{size:"xs",c:"dimmed",px:12,lh:1.5,children:[n.map(i=>i.label).join(", "),": open"," ",(0,Oe.jsx)(ye,{span:!0,ff:"monospace",size:"xs",children:"sandbox"})," ","in a terminal on this PC."]})]})]})}function AN({active:e,bare:t=!1,children:r}){let[n,{toggle:o,close:i}]=h2(!1);return(0,Oe.jsxs)(Ar,{header:{height:{base:52,sm:0}},navbar:{width:256,breakpoint:"sm",collapsed:{mobile:!n}},padding:0,children:[(0,Oe.jsx)(Ar.Header,{className:"app-header",hiddenFrom:"sm",children:(0,Oe.jsxs)(De,{h:"100%",px:"md",gap:"sm",justify:"space-between",children:[(0,Oe.jsxs)(De,{gap:"sm",children:[(0,Oe.jsx)(rv,{opened:n,onClick:o,size:"sm","aria-label":"Navigation"}),(0,Oe.jsx)(Ste,{})]}),(0,Oe.jsx)(bt,{size:"lg","aria-label":"Search",onClick:()=>hl.open(),children:(0,Oe.jsx)(kn,{size:18})})]})}),(0,Oe.jsxs)(Ar.Navbar,{className:"app-navbar","aria-label":"Main",children:[(0,Oe.jsx)(Ar.Section,{p:"md",pb:"xs",visibleFrom:"sm",children:(0,Oe.jsx)(Ste,{})}),(0,Oe.jsx)(Ar.Section,{px:"md",py:"xs",children:(0,Oe.jsx)(wte,{})}),(0,Oe.jsx)(Ar.Section,{px:"md",pb:"xs",visibleFrom:"sm",children:(0,Oe.jsx)(FSe,{})}),(0,Oe.jsx)(Ar.Section,{grow:!0,component:$r,px:"xs",children:(0,Oe.jsx)(LSe,{active:e,onPick:i})}),(0,Oe.jsx)(Ar.Section,{p:"sm",style:{borderTop:"1px solid var(--app-border)"},children:(0,Oe.jsxs)(De,{justify:"space-between",children:[(0,Oe.jsx)(ye,{size:"xs",c:"dimmed",pl:6,children:"Loopback only \xB7 signed in"}),(0,Oe.jsx)(NSe,{})]})})]}),(0,Oe.jsx)(Ar.Main,{className:"app-main",style:t?{display:"flex",height:"100dvh",paddingBottom:0}:void 0,children:t?r:(0,Oe.jsx)("div",{className:"app-content",children:r})}),(0,Oe.jsx)(Ite,{})]})}var Oo=b(O(),1);function MSe(e){let t=/^#k=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}async function BSe(){let e=MSe(location.hash);if(e){history.replaceState(null,"",location.pathname+location.search);try{await DE.login(e)}catch{return"out"}}try{return await DE.info(),"in"}catch{return"out"}}function kte(){let[e,t]=(0,TC.useState)("checking"),r=mQ();return(0,TC.useEffect)(()=>{BSe().then(t)},[]),e==="checking"?(0,Oo.jsx)(ic,{h:"100dvh",children:(0,Oo.jsx)(uo,{})}):e==="out"?(0,Oo.jsx)(ic,{h:"100dvh",p:"md",style:{background:"var(--app-bg)"},children:(0,Oo.jsx)(Or,{maw:440,p:"xl",children:(0,Oo.jsxs)(je,{gap:"sm",align:"center",ta:"center",children:[(0,Oo.jsx)(ru,{size:52,radius:"xl",variant:"light",children:(0,Oo.jsx)(fE,{size:26,stroke:1.6})}),(0,Oo.jsx)(xi,{order:2,children:"Not signed in"}),(0,Oo.jsxs)(ye,{c:"dimmed",size:"sm",children:["This page only opens from this PC. In a terminal, run"," ",(0,Oo.jsx)(ye,{span:!0,ff:"monospace",fw:600,children:"sandbox web open"})," ",": it opens the web UI already signed in."]})]})})}):r.page==="terminal"?(0,Oo.jsx)(AN,{active:"sessions",bare:!0,children:(0,Oo.jsx)(wee,{id:r.id})}):(0,Oo.jsx)(AN,{active:r.view,children:(0,Oo.jsx)(ite,{view:r.view,params:r.params})})}var Cte=[500,1e3,2e3,4e3,8e3],jSe=6e4,$C=class{constructor(){Et(this,"socket",null);Et(this,"attempt",0);Et(this,"next",1);Et(this,"queue",[]);Et(this,"calls",new Map);Et(this,"subscriptions",new Map);Et(this,"shared",new Map);Et(this,"listeners",new Set);Et(this,"hidden",!1);Et(this,"releaseTimer")}setHidden(t){if(t!==this.hidden){if(this.hidden=t,window.clearTimeout(this.releaseTimer),t){if(this.socket?.readyState===WebSocket.OPEN)for(let r of this.subscriptions.keys())this.send({t:"unsubscribe",id:r});this.releaseTimer=window.setTimeout(()=>{this.hidden&&this.calls.size===0&&this.release()},jSe);return}if(this.socket?.readyState===WebSocket.OPEN)for(let[r,n]of this.subscriptions)this.send({t:"subscribe",id:r,query:n.query,input:n.input});else this.subscriptions.size&&this.connect()}}release(){let t=this.socket;this.socket=null,t?.close(1e3),this.listeners.forEach(r=>r(!1))}onConnection(t){return this.listeners.add(t),()=>this.listeners.delete(t)}connect(){if(this.socket)return this.socket;let t=location.protocol==="https:"?"wss:":"ws:",r=new WebSocket(t+"//"+location.host+"/api/rpc");return this.socket=r,r.onopen=()=>{if(this.attempt=0,this.listeners.forEach(n=>n(!0)),!this.hidden)for(let[n,o]of this.subscriptions)this.send({t:"subscribe",id:n,query:o.query,input:o.input});for(let n of this.queue.splice(0))r.send(n)},r.onmessage=n=>{if(typeof n.data!="string")return;let o;try{o=JSON.parse(n.data)}catch{return}let i=IX.safeParse(o);i.success&&this.receive(i.data)},r.onclose=()=>{if(this.socket!==r)return;this.socket=null,this.listeners.forEach(o=>o(!1));for(let o of this.calls.values())o.reject(new Error("The connection to the sandbox web server dropped."));this.calls.clear();let n=Cte[Math.min(this.attempt++,Cte.length-1)];this.subscriptions.size&&!this.hidden&&window.setTimeout(()=>this.connect(),n)},r}send(t){let r=JSON.stringify(t),n=this.connect();n.readyState===WebSocket.OPEN?n.send(r):this.queue.push(r)}async receive(t){let r=this.subscriptions.get(t.id);if(r){t.t==="data"&&r.data(t.output),t.t==="error"&&r.error(YO(t.error));return}let n=this.calls.get(t.id);if(n)switch(t.t){case"progress":n.handlers.progress?.(t.text);return;case"log":n.handlers.log?.(t.text,t.tone);return;case"ask":{let o=await n.handlers.ask(t.question);this.send({t:"answer",id:t.id,value:o});return}case"result":this.calls.delete(t.id),n.resolve(t.output);return;case"error":this.calls.delete(t.id),n.reject(YO(t.error));return}}call(t,r,n){let o="c"+this.next++;return new Promise((i,a)=>{this.calls.set(o,{handlers:n,resolve:i,reject:a}),this.send({t:"call",id:o,op:t,input:r})})}subscribe(t,r,n,o){let i=t+"\0"+JSON.stringify(r??null),a=this.shared.get(i);if(a)a.last&&n(a.last.output);else{let c={id:"s"+this.next++,listeners:new Set,last:void 0};a=c,this.shared.set(i,c),this.subscriptions.set(c.id,{query:t,input:r,data:d=>{c.last={output:d};for(let u of[...c.listeners])u.data(d)},error:d=>{c.last=void 0;for(let u of[...c.listeners])u.error(d)}}),this.hidden||this.send({t:"subscribe",id:c.id,query:t,input:r})}let s={data:n,error:o},l=a;return l.listeners.add(s),()=>{l.listeners.delete(s),!l.listeners.size&&(this.shared.delete(i),this.subscriptions.delete(l.id),this.socket?.readyState===WebSocket.OPEN&&this.send({t:"unsubscribe",id:l.id}))}}};var USe=["#e6e8ee","#c4c8d2","#9aa0ad","#6c7383","#4a5060","#30343f","#22252e","#1a1d24","#14161c","#0e1015"],Pte={primaryColor:"indigo",primaryShade:{light:6,dark:5},colors:{dark:USe},fontFamily:'"Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif',fontFamilyMonospace:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace',headings:{fontFamily:'"Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif',fontWeight:"650",sizes:{h1:{fontSize:"1.625rem"},h2:{fontSize:"1.375rem"},h3:{fontSize:"1.0625rem"}}},defaultRadius:"md",cursorType:"pointer",focusRing:"auto",components:{Card:Or.extend({defaultProps:{withBorder:!0,radius:"lg",padding:"lg",shadow:"none"}}),Paper:Qi.extend({defaultProps:{radius:"lg"}}),Button:ht.extend({defaultProps:{radius:"md",size:"sm"}}),ActionIcon:bt.extend({defaultProps:{variant:"subtle",color:"gray",radius:"md"}}),Badge:In.extend({defaultProps:{radius:"sm",variant:"light",tt:"none",fw:600}}),Tooltip:kt.extend({defaultProps:{withArrow:!0,openDelay:300,multiline:!0,maw:320}}),Modal:mo.extend({defaultProps:{radius:"lg",centered:!0,overlayProps:{blur:2,backgroundOpacity:.45}}}),Menu:Xr.extend({defaultProps:{radius:"md",shadow:"md",withinPortal:!0}}),NavLink:Ba.extend({defaultProps:{variant:"light"}}),Notification:Gd.extend({defaultProps:{radius:"md",withBorder:!0}}),SegmentedControl:Yd.extend({defaultProps:{radius:"md"}}),Select:Hs.extend({defaultProps:{allowDeselect:!1,checkIconPosition:"right"}}),Switch:ja.extend({defaultProps:{size:"md"}}),TextInput:er.extend({defaultProps:{spellCheck:!1}})}};var Qc=b(O(),1),VSe=new ZR({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}),AC=new $C;document.addEventListener("visibilitychange",()=>AC.setHidden(document.hidden));window.addEventListener("pagehide",()=>AC.release());window.addEventListener("pageshow",e=>{e.persisted&&AC.setHidden(!1)});var Dte=document.getElementById("root");Dte&&(0,Rte.createRoot)(Dte).render((0,Qc.jsx)(Iy,{theme:Pte,defaultColorScheme:"auto",children:(0,Qc.jsx)(DR,{client:VSe,children:(0,Qc.jsx)(xQ,{client:AC,children:(0,Qc.jsxs)(xR,{children:[(0,Qc.jsx)(ta,{position:"bottom-right",limit:4}),(0,Qc.jsx)(kte,{})]})})})}));
|